Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Avi Kivity
On 03/24/2010 10:32 PM, Anthony Liguori wrote: So far, a libqemu.so with a flexible transport that could be used directly by a libvirt user (ala cairo/gdk type interactions) seems like the best solution to me. libqemu.so would be a C API. C is not the first choice for writing GUIs or mana

[Qemu-devel] [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-24 Thread Cam Macdonell
This patch adds a driver for my shared memory PCI device using the uio_pci interface. The driver has three memory regions. The first memory region is for device registers for sending interrupts. The second BAR is for receiving MSI-X interrupts and the third memory region maps the shared memory.

[Qemu-devel] [PATCH v3 2/2] Inter-VM shared memory PCI device

2010-03-24 Thread Cam Macdonell
Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository. -device ivshmem,size=[,shm=] Interrupts are su

[Qemu-devel] [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-24 Thread Cam Macdonell
Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository. Changes in this version are using the qdev format a

[Qemu-devel] [PATCH v3 1/2] Support adding a file to qemu's ram allocation

2010-03-24 Thread Cam Macdonell
This avoids the need of using qemu_ram_alloc and mmap with MAP_FIXED to map a host file into guest RAM. This function mmaps the opened file anywhere and adds the memory to the ram blocks. Usage is qemu_ram_mmap(fd, size, MAP_SHARED, offset); --- cpu-common.h |1 + exec.c | 33 ++

[Qemu-devel] [PATCH 4/4] Add virtio disk identification support

2010-03-24 Thread john cooper
Return serial string to the guest application via ioctl driver call. Note this form of interface to the guest userland was the consensus when the prior version using the ATA_IDENTIFY came under dispute. Signed-off-by: john cooper --- diff --git a/drivers/block/virtio_blk.c b/drivers/block/virti

[Qemu-devel] [PATCH 3/4] Add virtio disk identification support

2010-03-24 Thread john cooper
Add virtio-blk device id (s/n) support via virtio request. Signed-off-by: john cooper --- diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 3c64af0..cd66806 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -69,6 +69,8 @@ static void blk_done(st

[Qemu-devel] [PATCH 2/4] Add virtio disk identification support

2010-03-24 Thread john cooper
Fix bug which truncated serial string to 8 bytes, nul terminate. Signed-off-by: john cooper --- diff --git a/vl.c b/vl.c index d69250c..b74cbba 100644 --- a/vl.c +++ b/vl.c @@ -1162,7 +1162,7 @@ DriveInfo *drive_init(QemuOpts *opts, void *opaque, dinfo->on_write_error = on_write_error;

[Qemu-devel] [PATCH 1/4] Add virtio disk identification support

2010-03-24 Thread john cooper
Add virtio-blk device id (s/n) support via virtio request. Remove artifacts of pci and ATA_IDENTIFY implementation relative to prior versions. Signed-off-by: john cooper --- diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 9915840..358b0af 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio-blk.c @

[Qemu-devel] [PATCH 0/4] Add virtio disk identification support

2010-03-24 Thread john cooper
This series adds the minimal support to qemu and virtio_blk to support passing of a virtio_blk serial id string from qemu through the guest driver and to the guest userland. This is derived in part from a patch set posted by Rusty some time ago, but has been minimized to remove support for prior v

Re: [Qemu-devel] virtio block device and sysfs

2010-03-24 Thread john cooper
john cooper wrote: > Marc Haber wrote: >> Hi, >> >> On Mon, Mar 22, 2010 at 02:26:11AM -0400, john cooper wrote: >>> I could have swore I sent out a guest-driver-app-interface-less >>> version of the patch using virtio to pass the S/N but didn't find it in >>> the archives. I did however locate it

[Qemu-devel] Re: [PATCH 10/15] virtio-serial: Add QMP events for failed port/device add

2010-03-24 Thread Amit Shah
On (Wed) Mar 24 2010 [17:34:15], Luiz Capitulino wrote: > On Wed, 24 Mar 2010 20:19:28 +0530 > Amit Shah wrote: > > > When adding a port or a device to the guest fails, management software > > might be interested in knowing and then cleaning up the host-side of the > > port. Introduce QMP events

[Qemu-devel] about cpu_register_physical_memory_offset

2010-03-24 Thread Michael Qiu
Hi all, I'm really confused by the code in this function. Can anyone tell me the exact meaning for the arguments used for this function? target_phys_addr_t start_addr ram_addr_t size ram_addr_t phys_offset ram_addr_t region_offset Best regards

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Jamie Lokier
Anthony Liguori wrote: > It's a statement of correctness really. Devices should never deal with > target_phys_addr_t's. Shouldn't they? On real hardware, 64-bit PCI devices switch to being 32-bit PCI when plugged into a 32-bit motherboard slot. > The question is, should a pci_addr_t or a sysbu

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Jamie Lokier
Juan Quintela wrote: > Blue Swirl wrote: > > Hi, > > > > Here's some planning for getting most files compiled as few times as > > possible. Comments and suggestions are welcome. > > I took some thought about this at some point. Problems here start from > "Recursive Makefile condered Harmful (tm)

Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Jamie Lokier
Anthony Liguori wrote: > But the advantage is that if libvirt provided an API for a QMP transport > encapsulated in their secure protocol, then provided the plumbed that > API through their Python interface, you could use it for free in Python > without having to reinvent the wheel. It's not fr

RE: [Qemu-devel] Re: KVM call agenda for Mar 23

2010-03-24 Thread Zhang, Xiantao
Jes Sorensen wrote: > On 03/23/10 13:45, Anthony Liguori wrote: >> I don't think we can pull in: >> >> - extboot >> - ia64 >> - in-kernel pit[1] >> - associated command line options >> - device passthrough >> >> The question is, if we dropped those things, would people actually >> use qemu.git in

[Qemu-devel] [PATCH 08/10] target-alpha: Emit goto_tb opcodes.

2010-03-24 Thread Richard Henderson
Use an ExitStatus enumeration instead of magic numbers as the return value from translate_one. Emit goto_tb opcodes when ending a TB via a direct branch. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 339 ++ 1 files changed, 193 ins

[Qemu-devel] [PATCH 10/10] target-alpha: Enable NPTL.

2010-03-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- configure|1 + linux-user/syscall.c |2 +- target-alpha/cpu.h | 28 +--- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 6bc40a3..6b50b6a 100755 --- a/configure +++ b/

[Qemu-devel] [PATCH 09/10] target-alpha: Implement load-locked/store-conditional properly.

2010-03-24 Thread Richard Henderson
Use __sync_bool_compare_and_swap to yield correctly atomic results. As yet, this assumes running on an strict-memory-ordering host (i.e. x86), since we're still "implementing" the memory-barrier instructions as nops. Rename the "lock" cpu field to "lock_addr" and add a "lock_value" field to be use

[Qemu-devel] [PATCH 00/10, v3] target-alpha improvements

2010-03-24 Thread Richard Henderson
Changes from v1->v2: * Use setcond and goto_tb. Changes from v2->v3: * Enable NPTL. I don't see how any sort of emulation of cmpxchg/load-locked is working for any currently enabled nptl target. I think how I've approached handling load-locked for alpha is probably the easiest way. Slightly

[Qemu-devel] [PATCH 03/10] target-alpha: Implement rs/rc properly.

2010-03-24 Thread Richard Henderson
This is a per-cpu flag; there's no need for a spinlock of any kind. We were also failing to manipulate the flag with $31 as a target reg and failing to clear the flag on execution of a return-from-interrupt instruction. Signed-off-by: Richard Henderson --- linux-user/main.c|5 +

[Qemu-devel] [PATCH 07/10] target-alpha: Use non-inverted arguments to gen_{f}cmov.

2010-03-24 Thread Richard Henderson
The inverted conditions as argument to the function looks wrong at a glance inside translate_one. Since we have an easy function to produce the inversion now, use it. Signed-off-by: Richard Henderson --- target-alpha/translate.c | 37 +++-- 1 files changed, 19

[Qemu-devel] [PATCH 06/10] target-alpha: Use setcond for int comparisons.

2010-03-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-alpha/translate.c | 43 ++- 1 files changed, 22 insertions(+), 21 deletions(-) diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 90a14f5..80b5f52 100644 --- a/target-alpha/translate.c +++ b

[Qemu-devel] [PATCH 05/10] target-alpha: Implement cvtlq inline.

2010-03-24 Thread Richard Henderson
It's a simple shift and mask sequence. Signed-off-by: Richard Henderson --- target-alpha/helper.h|1 - target-alpha/op_helper.c |7 --- target-alpha/translate.c | 21 - 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/target-alpha/helper.h b/t

[Qemu-devel] [PATCH 02/10] target-alpha: Implement cpys{, n, e} inline.

2010-03-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target-alpha/helper.h|4 -- target-alpha/op_helper.c | 18 -- target-alpha/translate.c | 78 +++-- 3 files changed, 74 insertions(+), 26 deletions(-) diff --git a/target-alpha/helper.h b/target-alpha

[Qemu-devel] [PATCH 01/10] target-alpha: Add flags markups to helpers.h.

2010-03-24 Thread Richard Henderson
Almost all alpha helpers are at least TCG_CALL_CONST and a fair few are also TCG_CALL_PURE. Signed-off-by: Richard Henderson --- target-alpha/helper.h | 184 1 files changed, 92 insertions(+), 92 deletions(-) diff --git a/target-alpha/helper.h b

[Qemu-devel] [PATCH 04/10] target-alpha: Implement cvtql inline.

2010-03-24 Thread Richard Henderson
It's a simple mask and shift sequence. Also, fix a typo in the actual masks used. Signed-off-by: Richard Henderson --- target-alpha/helper.h|4 target-alpha/op_helper.c | 20 target-alpha/translate.c | 45 +++-- 3 file

Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Jamie Lokier
Avi Kivity wrote: > On 03/24/2010 02:32 PM, Anthony Liguori wrote: > >>You don't get a directory filled with a zillion socket files pointing > >>at dead guests. Agree that's a poor return on investment. > > > > > >Deleting it on atexit combined with flushing the whole directory at > >startup is

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Anthony Liguori
On 03/24/2010 06:05 PM, Paul Brook wrote: On 03/24/2010 05:33 PM, Paul Brook wrote: But now there is a bigger problem, how to pass the property to the device. It's not fair to require the user to remember to set it. It should not be a property of the device. All devices have a n

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Paul Brook
> On 03/24/2010 05:33 PM, Paul Brook wrote: > >> But now there is a bigger problem, how to pass the property to the > >> device. It's not fair to require the user to remember to set it. > > > > It should not be a property of the device. All devices have a native > > endianness (for PCI this is litt

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Anthony Liguori
On 03/24/2010 05:47 PM, Paul Brook wrote: Actually, Anthony suggested at some point to just use 64 bits for TARGET_PHYS_ADDR_BITS and remove the need for hw32/64. I think that people emulationg 32bits on 32bits would suffer, but have no clue how much. Anthony, what was the idea? Sacrific

[Qemu-devel] Re: hi, may I ask some help on the paravirtualization of KVM?

2010-03-24 Thread Charles Duffy
Liang YANG wrote: Maybe I solove the problem. I use the qemu-img make a new GustOS img. And install the debian5 on the image file with option -net nic, model=virtio. ./x86_64-softmmu/qemu-system-x86_64 -hda debian.img -cdrom debian.iso -net nic, model=virtio This email reads as: -net nic, m

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Anthony Liguori
On 03/24/2010 05:33 PM, Paul Brook wrote: But now there is a bigger problem, how to pass the property to the device. It's not fair to require the user to remember to set it. It should not be a property of the device. All devices have a native endianness (for PCI this is little-endian), and

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Paul Brook
> Actually, Anthony suggested at some point to just use 64 bits for > TARGET_PHYS_ADDR_BITS and remove the need for hw32/64. > > I think that people emulationg 32bits on 32bits would suffer, but have > no clue how much. Anthony, what was the idea? Sacrificing runtime performance to avoid rebuild

[Qemu-devel] Significant performance regression in qemu-system-mips.

2010-03-24 Thread Rob Landley
I have a native build under qemu that gets killed if it doesn't produce a line of output for 60 seconds (hang detection enforced by the host monitoring qemu's stdout with --nographic, not from within qemu). In the most recent release version, it never came close to triggering on mips with a 30

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Paul Brook
> But now there is a bigger problem, how to pass the property to the > device. It's not fair to require the user to remember to set it. It should not be a property of the device. All devices have a native endianness (for PCI this is little-endian), and the intermediate busses/interconnects shoul

[Qemu-devel] Re: [PATCH] update bochs vbe interface

2010-03-24 Thread Juan Quintela
Gerd Hoffmann wrote: > On 03/24/10 18:04, Juan Quintela wrote: >> Gerd Hoffmann wrote: >>> The bochs vbe interface got a new register a while back, which specifies >>> the linear framebuffer size in 64k units. This patch adds support for >>> the new register to qemu. With this patch applied vga

[Qemu-devel] Re: [PATCH v2] update bochs vbe interface

2010-03-24 Thread Juan Quintela
Gerd Hoffmann wrote: > The bochs vbe interface got a new register a while back, which specifies > the linear framebuffer size in 64k units. This patch adds support for > the new register to qemu. With this patch applied vgabios 0.6c works > with qemu. > > [ v2: Don't savevm the new register. D

Re: [Qemu-devel] TBL register permissions for PPC

2010-03-24 Thread Dmitry Ilyevsky
Hello All, Please review patch for TBL SPR read access for generic PPC. *Description:* POWER specification docs define TBL/TBU SPRs as readable in user and privileged modes. Therefore SPRs permissions were changed in gen_tbl function in target-ppc/translate_init.c file. *Testing:* Tested with

Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Anthony Liguori
On 03/24/2010 04:25 PM, Luiz Capitulino wrote: I see it as a related problem, because what seems to be under discussion is the quality of our interfaces with humans and tools. Also, when we were discussing the usuability problems I remember that you *WARNING: I might be wrong here, please

Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Luiz Capitulino
On Wed, 24 Mar 2010 21:54:09 +0100 Alexander Graf wrote: > > On 24.03.2010, at 21:32, Anthony Liguori wrote: > > > On 03/24/2010 03:12 PM, Luiz Capitulino wrote: > >> On Wed, 24 Mar 2010 21:49:45 +0200 > >> Avi Kivity wrote: > >> > >> > >>> On 03/24/2010 06:42 PM, Luiz Capitulino wrote: >

Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Luiz Capitulino
On Wed, 24 Mar 2010 15:32:42 -0500 Anthony Liguori wrote: > On 03/24/2010 03:12 PM, Luiz Capitulino wrote: > > On Wed, 24 Mar 2010 21:49:45 +0200 > > Avi Kivity wrote: > > > > > >> On 03/24/2010 06:42 PM, Luiz Capitulino wrote: > >> > >>> On Wed, 24 Mar 2010 12:42:16 +0200 > >>> Avi Ki

Re: [Qemu-devel] [PATCH 2/2] machine opts framework

2010-03-24 Thread Anthony Liguori
On 03/24/2010 03:58 PM, Glauber Costa wrote: On Wed, Mar 24, 2010 at 02:43:35PM -0500, Anthony Liguori wrote: On 03/24/2010 02:26 PM, Glauber Costa wrote: This patch adds initial support for the -machine option, that allows command line specification of machine attributes (always rely

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Aurelien Jarno
On Wed, Mar 24, 2010 at 10:24:12PM +0200, Blue Swirl wrote: > On 3/24/10, Michael S. Tsirkin wrote: > > On Wed, Mar 24, 2010 at 10:05:10PM +0200, Blue Swirl wrote: > > > On 3/24/10, Michael S. Tsirkin wrote: > > > > On Tue, Mar 23, 2010 at 11:43:51PM +0200, Blue Swirl wrote: > > > > > rtl8139

Re: [Qemu-devel] [PATCH 2/2] machine opts framework

2010-03-24 Thread Glauber Costa
On Wed, Mar 24, 2010 at 02:43:35PM -0500, Anthony Liguori wrote: > On 03/24/2010 02:26 PM, Glauber Costa wrote: > >This patch adds initial support for the -machine option, that allows > >command line specification of machine attributes (always relying on safe > >defaults). Besides its value per-se,

Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Alexander Graf
On 24.03.2010, at 21:32, Anthony Liguori wrote: > On 03/24/2010 03:12 PM, Luiz Capitulino wrote: >> On Wed, 24 Mar 2010 21:49:45 +0200 >> Avi Kivity wrote: >> >> >>> On 03/24/2010 06:42 PM, Luiz Capitulino wrote: >>> On Wed, 24 Mar 2010 12:42:16 +0200 Avi Kivity wrote:

[Qemu-devel] [PATCH] Compile ide/core only once

2010-03-24 Thread Blue Swirl
Make win2k install hack unconditional as it is still restricted to x86 only in vl.c. Replace TARGET_PAGE_SIZE with 4096 because that figure is already used later. Signed-off-by: Blue Swirl --- Makefile.objs|1 + Makefile.target | 11 ---

[Qemu-devel] x86_64: iret in long mode resets %fs and %gs base (doesn't on real CPUs)

2010-03-24 Thread Vegard Nossum
Hi, I've been investigating why some of my code failed on qemu, but succeeded in bochs and on real hardware. In particular, it turns out that qemu would reset the FS/GS_BASE_MSR whenever I did iret from ring 0 to 3. I traced it down to this bit of code (in target-i386/op_helper.c): static inline

Re: [Qemu-devel] [PATCH] qemu: jaso-parser: Output the content of invalid keyword

2010-03-24 Thread Luiz Capitulino
On Wed, 24 Mar 2010 17:00:14 +0100 Markus Armbruster wrote: > Amos Kong writes: > > > When input some invialid word 'unknowcmd' through QMP port, qemu outputs > > this > > error message: > > "parse error: invalid keyword `%s'" > > This patch makes qemu output the content of invalid keyword, li

[Qemu-devel] Re: [PATCH 10/15] virtio-serial: Add QMP events for failed port/device add

2010-03-24 Thread Luiz Capitulino
On Wed, 24 Mar 2010 20:19:28 +0530 Amit Shah wrote: > When adding a port or a device to the guest fails, management software > might be interested in knowing and then cleaning up the host-side of the > port. Introduce QMP events to signal such errors. I'm completely unfamiliar with virtio-seria

Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Anthony Liguori
On 03/24/2010 03:12 PM, Luiz Capitulino wrote: On Wed, 24 Mar 2010 21:49:45 +0200 Avi Kivity wrote: On 03/24/2010 06:42 PM, Luiz Capitulino wrote: On Wed, 24 Mar 2010 12:42:16 +0200 Avi Kivity wrote: So, at best qemud is a toy for people who are annoyed by libvirt.

[Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Blue Swirl
On 3/24/10, Michael S. Tsirkin wrote: > On Wed, Mar 24, 2010 at 10:24:12PM +0200, Blue Swirl wrote: > > On 3/24/10, Michael S. Tsirkin wrote: > > > On Wed, Mar 24, 2010 at 10:05:10PM +0200, Blue Swirl wrote: > > > > On 3/24/10, Michael S. Tsirkin wrote: > > > > > On Tue, Mar 23, 2010 at 11

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Anthony Liguori
On 03/24/2010 03:24 PM, Blue Swirl wrote: On 3/24/10, Michael S. Tsirkin wrote: On Wed, Mar 24, 2010 at 10:05:10PM +0200, Blue Swirl wrote: > On 3/24/10, Michael S. Tsirkin wrote: > > On Tue, Mar 23, 2010 at 11:43:51PM +0200, Blue Swirl wrote: > > > rtl8139.c, e1000.c: need to

[Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Michael S. Tsirkin
On Wed, Mar 24, 2010 at 10:24:12PM +0200, Blue Swirl wrote: > On 3/24/10, Michael S. Tsirkin wrote: > > On Wed, Mar 24, 2010 at 10:05:10PM +0200, Blue Swirl wrote: > > > On 3/24/10, Michael S. Tsirkin wrote: > > > > On Tue, Mar 23, 2010 at 11:43:51PM +0200, Blue Swirl wrote: > > > > > rtl8139

[Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Blue Swirl
On 3/24/10, Michael S. Tsirkin wrote: > On Wed, Mar 24, 2010 at 10:05:10PM +0200, Blue Swirl wrote: > > On 3/24/10, Michael S. Tsirkin wrote: > > > On Tue, Mar 23, 2010 at 11:43:51PM +0200, Blue Swirl wrote: > > > > rtl8139.c, e1000.c: need to convert ldl/stl to > cpu_physical_memory_read/wr

[Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Michael S. Tsirkin
On Wed, Mar 24, 2010 at 10:05:10PM +0200, Blue Swirl wrote: > On 3/24/10, Michael S. Tsirkin wrote: > > On Tue, Mar 23, 2010 at 11:43:51PM +0200, Blue Swirl wrote: > > > rtl8139.c, e1000.c: need to convert ldl/stl to > > cpu_physical_memory_read/write. > > > > > > I don't see how it would help.

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Richard Henderson
On 03/24/2010 10:07 AM, Richard Henderson wrote: > struct CPUSmallCommonState > { > // most of the stuff from CPU_COMMON. > // sorted for some thought of padding elimination. ;-) > }; > > struct CPULargeCommonState > { > CPUTLBEntry tlb_table[NB_MMU_MODES][CPU_TLB_SIZE]; > target_

Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Luiz Capitulino
On Wed, 24 Mar 2010 21:49:45 +0200 Avi Kivity wrote: > On 03/24/2010 06:42 PM, Luiz Capitulino wrote: > > On Wed, 24 Mar 2010 12:42:16 +0200 > > Avi Kivity wrote: > > > > > >> So, at best qemud is a toy for people who are annoyed by libvirt. > >> > > Is the reason for doing this in q

[Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Blue Swirl
On 3/24/10, Michael S. Tsirkin wrote: > On Tue, Mar 23, 2010 at 11:43:51PM +0200, Blue Swirl wrote: > > rtl8139.c, e1000.c: need to convert ldl/stl to > cpu_physical_memory_read/write. > > > I don't see how it would help. These still get target_phys_addr_t which > is per-target. Further, a ton

Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Avi Kivity
On 03/24/2010 06:42 PM, Luiz Capitulino wrote: On Wed, 24 Mar 2010 12:42:16 +0200 Avi Kivity wrote: So, at best qemud is a toy for people who are annoyed by libvirt. Is the reason for doing this in qemu because libvirt is annoying? Mostly. I don't see how adding yet another la

[Qemu-devel] [PATCH v2] update bochs vbe interface

2010-03-24 Thread Gerd Hoffmann
The bochs vbe interface got a new register a while back, which specifies the linear framebuffer size in 64k units. This patch adds support for the new register to qemu. With this patch applied vgabios 0.6c works with qemu. [ v2: Don't savevm the new register. Doing so breaks migration,

[Qemu-devel] Re: [PATCH] update bochs vbe interface

2010-03-24 Thread Gerd Hoffmann
On 03/24/10 18:04, Juan Quintela wrote: Gerd Hoffmann wrote: The bochs vbe interface got a new register a while back, which specifies the linear framebuffer size in 64k units. This patch adds support for the new register to qemu. With this patch applied vgabios 0.6c works with qemu. Signed-o

Re: [Qemu-devel] [PATCH 2/2] machine opts framework

2010-03-24 Thread Anthony Liguori
On 03/24/2010 02:26 PM, Glauber Costa wrote: This patch adds initial support for the -machine option, that allows command line specification of machine attributes (always relying on safe defaults). Besides its value per-se, it is the saner way we found to allow for enabling/disabling of kvm's in-

[Qemu-devel] Re: [PATCH 3/3] monitor: Convert do_migrate() to QError

2010-03-24 Thread Luiz Capitulino
On Tue, 23 Mar 2010 19:07:21 +0100 Markus Armbruster wrote: > Human monitor error message changes from "unknown migration protocol: > FOO" to "Invalid parameter uri". > > The conversion is shallow: the FOO_start_outgoing_migration() aren't > converted. Converting them is a big job for relativel

[Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Michael S. Tsirkin
On Tue, Mar 23, 2010 at 11:43:51PM +0200, Blue Swirl wrote: > rtl8139.c, e1000.c: need to convert ldl/stl to cpu_physical_memory_read/write. I don't see how it would help. These still get target_phys_addr_t which is per-target. Further, a ton of devices do cpu_register_physical_memory/qemu_registe

[Qemu-devel] Re: [PATCH 2/4] monitor: New argument type 'b'

2010-03-24 Thread Luiz Capitulino
On Tue, 23 Mar 2010 11:27:56 +0100 Markus Armbruster wrote: > This is a boolean value. Human monitor accepts "on" or "off". > Consistent with option parsing (see parse_option_bool()). > > Signed-off-by: Markus Armbruster > --- > monitor.c | 31 +++ > 1 files chan

[Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Juan Quintela
Blue Swirl wrote: > On 3/24/10, Juan Quintela wrote: >> Blue Swirl wrote: >> > Hi, >> > >> > Here's some planning for getting most files compiled as few times as >> > possible. Comments and suggestions are welcome. >> >> >> I took some thought about this at some point. Problems here start f

[Qemu-devel] [PATCH 1/2] early set current_machine

2010-03-24 Thread Glauber Costa
this way, the machine_init function itself can know which machine is current in use, not only the late init code. --- vl.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index d69250c..ceddeac 100644 --- a/vl.c +++ b/vl.c @@ -4841,6 +4841,9 @@ int main(int

[Qemu-devel] [PATCH 0/2] machine opts framework

2010-03-24 Thread Glauber Costa
This patch adds initial support for the -machine option, that allows command line specification of machine attributes (always relying on safe defaults). Besides its value per-se, it is the saner way we found to allow for enabling/disabling of kvm's in-kernel irqchip. A machine with in-kernel-i

[Qemu-devel] [PATCH 2/2] machine opts framework

2010-03-24 Thread Glauber Costa
This patch adds initial support for the -machine option, that allows command line specification of machine attributes (always relying on safe defaults). Besides its value per-se, it is the saner way we found to allow for enabling/disabling of kvm's in-kernel irqchip. A machine with in-kernel-irqch

[Qemu-devel] Re: [PATCH 0/4] monitor: Convert do_set_link() to QObject, QError

2010-03-24 Thread Luiz Capitulino
On Tue, 23 Mar 2010 11:27:54 +0100 Markus Armbruster wrote: > PATCH 3/4 changes syntax of set_link's second argument from up|down to > on|off. I feel that the argument needs to be boolean in QMP, and this > is the simplest way to get it. > > Alternatives I could try if the syntax change is unwa

Re: [Qemu-devel] [PATCH 3/3] S390: Don't compile in virtio-pci

2010-03-24 Thread Blue Swirl
On 3/24/10, Alexander Graf wrote: > Blue Swirl wrote: > > On 3/24/10, Alexander Graf wrote: > > > >> As soon as virtio-pci.c gets compiled and used on S390 the internal qdev > magic > >> gets confused and tries to give us PCI devices instead of S390 virtio > devices. > >> > >> Since we

[Qemu-devel] Re: [RFC] vhost-blk implementation

2010-03-24 Thread Michael S. Tsirkin
On Wed, Mar 24, 2010 at 10:58:50AM -0700, Badari Pulavarty wrote: > Michael S. Tsirkin wrote: >> On Tue, Mar 23, 2010 at 12:55:07PM -0700, Badari Pulavarty wrote: >> >>> Michael S. Tsirkin wrote: >>> On Tue, Mar 23, 2010 at 10:57:33AM -0700, Badari Pulavarty wrote: >

Re: [Qemu-devel] [PATCH 3/3] S390: Don't compile in virtio-pci

2010-03-24 Thread Alexander Graf
Blue Swirl wrote: > On 3/24/10, Alexander Graf wrote: > >> As soon as virtio-pci.c gets compiled and used on S390 the internal qdev >> magic >> gets confused and tries to give us PCI devices instead of S390 virtio >> devices. >> >> Since we don't have PCI on S390, we can safely not compile

Re: [Qemu-devel] [PATCH 3/3] S390: Don't compile in virtio-pci

2010-03-24 Thread Blue Swirl
On 3/24/10, Alexander Graf wrote: > As soon as virtio-pci.c gets compiled and used on S390 the internal qdev magic > gets confused and tries to give us PCI devices instead of S390 virtio > devices. > > Since we don't have PCI on S390, we can safely not compile virtio-pci at all. > > In order t

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Blue Swirl
On 3/24/10, Richard Henderson wrote: > On 03/24/2010 02:47 AM, Paolo Bonzini wrote: > > > 1) make CPUState define only common fields. Include CPUState at the > > beginning of each per-target CPUXYZState. > > > > Irritatingly, the common fields contain quite big TLBs. And the > offsets from the

[Qemu-devel] Re: [RFC] vhost-blk implementation

2010-03-24 Thread Badari Pulavarty
Michael S. Tsirkin wrote: On Tue, Mar 23, 2010 at 12:55:07PM -0700, Badari Pulavarty wrote: Michael S. Tsirkin wrote: On Tue, Mar 23, 2010 at 10:57:33AM -0700, Badari Pulavarty wrote: Michael S. Tsirkin wrote: On Mon, Mar 22, 2010 at 05:34:04PM -0700, Badari Pu

[Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Blue Swirl
On 3/24/10, Juan Quintela wrote: > Blue Swirl wrote: > > Hi, > > > > Here's some planning for getting most files compiled as few times as > > possible. Comments and suggestions are welcome. > > > I took some thought about this at some point. Problems here start from > "Recursive Makefile co

[Qemu-devel] [PATCH 2/3] S390: Tell user why VM creation failed

2010-03-24 Thread Alexander Graf
The KVM kernel module on S390 refuses to create a VM when the switch_amode kernel parameter is not used. Since that is not exactly obvious, let's give the user a nice warning. Signed-off-by: Alexander Graf --- kvm-all.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --gi

[Qemu-devel] [PATCH 3/3] S390: Don't compile in virtio-pci

2010-03-24 Thread Alexander Graf
As soon as virtio-pci.c gets compiled and used on S390 the internal qdev magic gets confused and tries to give us PCI devices instead of S390 virtio devices. Since we don't have PCI on S390, we can safely not compile virtio-pci at all. In order to do this I added a new config option "CONFIG_PCI"

[Qemu-devel] [PATCH 1/3] S390: Add stub for cpu_get_phys_page_debug

2010-03-24 Thread Alexander Graf
We don't implement any virtual memory in the S390 target so far, so let's add a stub for this now mandatory function. Fixes building of S390 target. Signed-off-by: Alexander Graf --- target-s390x/helper.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/target-s390x/

[Qemu-devel] [PATCH 0/3] Fix S390x target

2010-03-24 Thread Alexander Graf
We're in a bad situation with the S390 qemu target. It only works with KVM, so people can't test it when they don't have access to a real S390 machine. While trying to build and use s390x-softmmu again I stumbled across a couple of issues, all addressed in this patch set. The patches should all no

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Paul Brook
> 1) make CPUState define only common fields. Include CPUState at the > beginning of each per-target CPUXYZState. > >>> > >>> Irritatingly, the common fields contain quite big TLBs. And the > >>> offsets from the start of env affect the compactness of the code > >>> generated from TCG. We

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Richard Henderson
On 03/24/2010 07:45 AM, Paolo Bonzini wrote: > On 03/24/2010 12:19 PM, Richard Henderson wrote: >> On 03/24/2010 02:47 AM, Paolo Bonzini wrote: >>> 1) make CPUState define only common fields. Include CPUState at the >>> beginning of each per-target CPUXYZState. >> >> Irritatingly, the common fields

[Qemu-devel] Re: [PATCH] update bochs vbe interface

2010-03-24 Thread Juan Quintela
Gerd Hoffmann wrote: > The bochs vbe interface got a new register a while back, which specifies > the linear framebuffer size in 64k units. This patch adds support for > the new register to qemu. With this patch applied vgabios 0.6c works > with qemu. > > Signed-off-by: Gerd Hoffmann It breaks

Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Luiz Capitulino
On Wed, 24 Mar 2010 12:42:16 +0200 Avi Kivity wrote: > So, at best qemud is a toy for people who are annoyed by libvirt. Is the reason for doing this in qemu because libvirt is annoying? I don't see how adding yet another layer/daemon is going to improve ours and user's life (the same applies f

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Paolo Bonzini
On 03/24/2010 03:56 PM, Paul Brook wrote: On 03/24/2010 12:19 PM, Richard Henderson wrote: On 03/24/2010 02:47 AM, Paolo Bonzini wrote: 1) make CPUState define only common fields. Include CPUState at the beginning of each per-target CPUXYZState. Irritatingly, the common fields contain quite b

Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Paul Brook
> Paul Brook writes: > >> > IMO the no_user flag is a bug, and should not exist. > >> > >> Sorry, what's that? > > > > Usually an indication that a device has been incorrectly or inproperly > > converted to the qdev interface. > > Can also be an indication that the device can't support multiple >

Re: [Qemu-devel] [PATCH] qemu: jaso-parser: Output the content of invalid keyword

2010-03-24 Thread Markus Armbruster
Amos Kong writes: > When input some invialid word 'unknowcmd' through QMP port, qemu outputs this > error message: > "parse error: invalid keyword `%s'" > This patch makes qemu output the content of invalid keyword, like: > "parse error: invalid keyword `unknowcmd'" > > Signed-off-by: Amos Kong

Re: [Qemu-devel] Re: [libvirt] Supporting hypervisor specific APIs in libvirt

2010-03-24 Thread Markus Armbruster
Paul Brook writes: >> > IMO the no_user flag is a bug, and should not exist. >> >> Sorry, what's that? > > Usually an indication that a device has been incorrectly or inproperly > converted to the qdev interface. Can also be an indication that the device can't support multiple instances. For

[Qemu-devel] [PATCH] qemu: jaso-parser: Output the content of invalid keyword

2010-03-24 Thread Amos Kong
When input some invialid word 'unknowcmd' through QMP port, qemu outputs this error message: "parse error: invalid keyword `%s'" This patch makes qemu output the content of invalid keyword, like: "parse error: invalid keyword `unknowcmd'" Signed-off-by: Amos Kong --- json-parser.c |8 ++

Re: [Qemu-devel] [PATCH -V2 00/22] virtio-9p: paravirtual file system passthrough

2010-03-24 Thread Luiz Capitulino
On Wed, 24 Mar 2010 09:28:36 +0530 "Aneesh Kumar K. V" wrote: > On Tue, 23 Mar 2010 20:17:33 -0300, Luiz Capitulino > wrote: > > On Tue, 16 Mar 2010 14:44:58 +0530 > > "Aneesh Kumar K.V" wrote: > > > > > Hi, > > > > > > > > > This patch series adds a paravirtual file system passthrough mech

Re: [Qemu-devel] Re: Compile files only once: some planning

2010-03-24 Thread Paul Brook
> On 03/24/2010 12:19 PM, Richard Henderson wrote: > > On 03/24/2010 02:47 AM, Paolo Bonzini wrote: > >> 1) make CPUState define only common fields. Include CPUState at the > >> beginning of each per-target CPUXYZState. > > > > Irritatingly, the common fields contain quite big TLBs. And the > > off

[Qemu-devel] [PATCH 15/15] virtio-serial: Handle scatter/gather input from the guest

2010-03-24 Thread Amit Shah
Current guests don't send more than one iov but it can change later. Ensure we handle that case. Signed-off-by: Amit Shah CC: Avi Kivity --- hw/virtio-serial-bus.c | 12 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c

[Qemu-devel] [PATCH 14/15] virtio-serial: Handle scatter-gather buffers for control messages

2010-03-24 Thread Amit Shah
Current control messages are small enough to not be split into multiple buffers but we could run into such a situation in the future or a malicious guest could cause such a situation. So handle the entire iov request for control messages. Also ensure the size of the control request is >= what we

[Qemu-devel] [PATCH 13/15] iov: Add iov_to_buf and iov_size helpers

2010-03-24 Thread Amit Shah
iov_to_buf() puts the buffer contents in the iov in a linearized buffer. iov_size() gets the length of the contents in the iov. The iov_to_buf() function is the memcpy_to_iovec() function that was used in virtio-ballon.c. Signed-off-by: Amit Shah --- hw/iov.c| 37

[Qemu-devel] [PATCH 12/15] iov: Introduce a new file for helpers around iovs, add iov_from_buf()

2010-03-24 Thread Amit Shah
The virtio-net code uses iov_fill() which fills an iov from a linear buffer. The virtio-serial-bus code does something similar in an open-coded function. Create a new iov.c file that has iov_from_buf(). Convert virtio-net and virtio-serial-bus over to use this functionality. virtio-net used ints

[Qemu-devel] [PATCH 11/15] virtio-serial: Send out guest data to ports only if port is opened

2010-03-24 Thread Amit Shah
Data should be written only when ports are open. Signed-off-by: Amit Shah --- hw/virtio-serial-bus.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hw/virtio-serial-bus.c b/hw/virtio-serial-bus.c index efcc66c..80fbff4 100644 --- a/hw/virtio-serial-bus.c +++ b/hw/vi

[Qemu-devel] [PATCH 10/15] virtio-serial: Add QMP events for failed port/device add

2010-03-24 Thread Amit Shah
When adding a port or a device to the guest fails, management software might be interested in knowing and then cleaning up the host-side of the port. Introduce QMP events to signal such errors. Signed-off-by: Amit Shah CC: Luiz Capitulino --- QMP/qmp-events.txt | 48 ++

  1   2   >