[Qemu-devel] [PATCH 3/4] kbd leds: usb kbd

2010-02-25 Thread Gerd Hoffmann
Add led status notification support to the usb kbd driver. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb-hid.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/hw/usb-hid.c b/hw/usb-hid.c index bf456bb..2e4e647 100644 --- a/hw/usb-hid.c +++

[Qemu-devel] [PATCH 0/4] keyboard led status tracking

2010-02-25 Thread Gerd Hoffmann
Hi, This patch series adds support for keyboard led status tracking to qemu. The first patch adds the infrastructure to set the led status and to register notify callbacks. Patches #2 and #3 add support for the usb and ps/2 keyboard drivers. Patch #4 makes vnc use the led notification to

[Qemu-devel] [PATCH 4/4] kbd keds: vnc

2010-02-25 Thread Gerd Hoffmann
Use led status notification support in vnc. The qemu vnc server keeps track of the capslock and numlock states based on the key presses it receives from the vnc client. But this fails in case the guests idea of the capslock and numlock state changes for other reasons. One case is guest reboot

[Qemu-devel] [PATCH 1/4] kbd leds: infrastructure

2010-02-25 Thread Gerd Hoffmann
Adds infrastructure for keyboard led status tracking to qemu. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- console.h | 14 ++ input.c | 50 ++ 2 files changed, 64 insertions(+), 0 deletions(-) diff --git a/console.h

[Qemu-devel] [PATCH 2/4] kbd leds: ps/2 kbd

2010-02-25 Thread Gerd Hoffmann
Add led status notification support to the ps/2 kbd driver. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/ps2.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/ps2.c b/hw/ps2.c index 15a6650..3dc3b15 100644 --- a/hw/ps2.c +++ b/hw/ps2.c @@ -185,6 +185,7 @@

[Qemu-devel] [PATCH] adding helper pci functions

2010-02-25 Thread Gerd Hoffmann
From: Izik Eidus iei...@redhat.com Signed-off-by: Izik Eidus iei...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/pci.h | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 37ebdc4..20c670e 100644 --- a/hw/pci.h

[Qemu-devel] [PATCH] move x509 file name defines to qemu-x509.h

2010-02-25 Thread Gerd Hoffmann
Want share them with vnc and spice. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- qemu-x509.h |9 + vnc-tls.c |7 +-- 2 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 qemu-x509.h diff --git a/qemu-x509.h b/qemu-x509.h new file mode 100644 index

[Qemu-devel] Re: [PATCH v3 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-25 Thread Jan Kiszka
Marcelo Tosatti wrote: On Thu, Feb 25, 2010 at 12:58:26AM +0100, Jan Kiszka wrote: Marcelo Tosatti wrote: On Thu, Feb 25, 2010 at 12:45:55AM +0100, Jan Kiszka wrote: Marcelo Tosatti wrote: On Wed, Feb 24, 2010 at 03:17:55PM +0100, Jan Kiszka wrote: Drop kvm_load_tsc in favor of

[Qemu-devel] [PATCH] qdev: Catch attempt to attach more than one device to a netdev

2010-02-25 Thread Markus Armbruster
Guest device and host netdev are peers, i.e. it's a 1:1 relation. However, we fail to enforce that: $ qemu -nodefaults --nographic -netdev user,id=net0 -device e1000,netdev=net0 -device virtio-net-pci,netdev=net0 -monitor stdio QEMU 0.12.50 monitor - type 'help' for more information

[Qemu-devel] [PATCH] scsi: Make device scsi-disk reject /dev/sg*

2010-02-25 Thread Markus Armbruster
You're supposed to use scsi-generic for that. Which rejects anything but /dev/sg*. Signed-off-by: Markus Armbruster arm...@redhat.com --- hw/scsi-disk.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index b2f61fe..ad8eb24 100644 ---

[Qemu-devel] Re: [PATCH] move x509 file name defines to qemu-x509.h

2010-02-25 Thread Juan Quintela
Gerd Hoffmann kra...@redhat.com wrote: Want share them with vnc and spice. Reviewed-by: Juan Quintela quint...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- qemu-x509.h |9 + vnc-tls.c |7 +-- 2 files changed, 10 insertions(+), 6 deletions(-) create

[Qemu-devel] Re: [PATCH] adding helper pci functions

2010-02-25 Thread Juan Quintela
Gerd Hoffmann kra...@redhat.com wrote: From: Izik Eidus iei...@redhat.com Signed-off-by: Izik Eidus iei...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/pci.h | 18 ++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/hw/pci.h b/hw/pci.h

[Qemu-devel] Re: [PATCH 1/4] kbd leds: infrastructure

2010-02-25 Thread Juan Quintela
Gerd Hoffmann kra...@redhat.com wrote: Adds infrastructure for keyboard led status tracking to qemu. } QEMUPutMouseEntry; +typedef struct QEMUPutLEDEntry { +QEMUPutLEDEvent *put_led; +void *opaque; +struct QEMUPutLEDEntry *next; +} QEMUPutLEDEntry; Please, change this to a

[Qemu-devel] Re: [PATCH 2/4] kbd leds: ps/2 kbd

2010-02-25 Thread Juan Quintela
Gerd Hoffmann kra...@redhat.com wrote: Add led status notification support to the ps/2 kbd driver. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/ps2.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/ps2.c b/hw/ps2.c index 15a6650..3dc3b15 100644 ---

[Qemu-devel] Re: [PATCH] adding helper pci functions

2010-02-25 Thread Izik Eidus
On 02/25/2010 10:41 AM, Gerd Hoffmann wrote: From: Izik Eidusiei...@redhat.com The true auther of this patch is Yaniv Kamay. Thanks. Signed-off-by: Izik Eidusiei...@redhat.com Signed-off-by: Gerd Hoffmannkra...@redhat.com ---

[Qemu-devel] Re: [PATCH] adding helper pci functions

2010-02-25 Thread Michael S. Tsirkin
On Thu, Feb 25, 2010 at 11:55:25AM +0100, Juan Quintela wrote: Gerd Hoffmann kra...@redhat.com wrote: From: Izik Eidus iei...@redhat.com Signed-off-by: Izik Eidus iei...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/pci.h | 18 ++ 1 files

[Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h

2010-02-25 Thread Michael S. Tsirkin
On Thu, Feb 18, 2010 at 11:28:14PM +0200, Blue Swirl wrote:     /* restore global registers */ -#include hostregs_helper.h +    asm(); +    env = (void *) saved_env_reg; Is this sufficient? I see __asm__ __volatile__(: : :memory) in virtio. Is memory clobber implied? What about

[Qemu-devel] Re: [PATCH] qdev: Catch attempt to attach more than one device to a netdev

2010-02-25 Thread Michael S. Tsirkin
On Thu, Feb 25, 2010 at 11:10:15AM +0100, Markus Armbruster wrote: Guest device and host netdev are peers, i.e. it's a 1:1 relation. However, we fail to enforce that: $ qemu -nodefaults --nographic -netdev user,id=net0 -device e1000,netdev=net0 -device virtio-net-pci,netdev=net0

[Qemu-devel] Re: [PATCH] scsi: Make device scsi-disk reject /dev/sg*

2010-02-25 Thread Michael S. Tsirkin
On Thu, Feb 25, 2010 at 11:23:52AM +0100, Markus Armbruster wrote: You're supposed to use scsi-generic for that. Which rejects anything but /dev/sg*. Signed-off-by: Markus Armbruster arm...@redhat.com --- hw/scsi-disk.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-)

[Qemu-devel] [PATCH 1/2] qdev: Add a DEV_NVECTORS_UNSPECIFIED enum for unspecified nr of MSI vectors

2010-02-25 Thread Amit Shah
net.c used a constant to signify no MSI vectors were specified. Extend that to all qdev devices. Signed-off-by: Amit Shah amit.s...@redhat.com Reported-by: Michael S. Tsirkin m...@redhat.com --- hw/qdev.c |2 +- hw/qdev.h |4 net.c |6 -- net.h |3 --- 4 files

[Qemu-devel] [PATCH 2/2] virtio-pci: Use DEV_NVECTORS_UNSPECIFIED instead of -1 for virtio-serial

2010-02-25 Thread Amit Shah
Use the named constant instead of -1. Signed-off-by: Amit Shah amit.s...@redhat.com Reported-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio-pci.c |8 +--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index bcd40f7..799f664 100644

[Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h

2010-02-25 Thread Paolo Bonzini
On 02/25/2010 12:40 PM, Michael S. Tsirkin wrote: On Thu, Feb 18, 2010 at 11:28:14PM +0200, Blue Swirl wrote: /* restore global registers */ -#include hostregs_helper.h +asm(); +env = (void *) saved_env_reg; Is this sufficient? I see __asm__ __volatile__(: : :memory) in virtio.

[Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h

2010-02-25 Thread Michael S. Tsirkin
On Thu, Feb 25, 2010 at 01:50:56PM +0100, Paolo Bonzini wrote: On 02/25/2010 12:40 PM, Michael S. Tsirkin wrote: On Thu, Feb 18, 2010 at 11:28:14PM +0200, Blue Swirl wrote: /* restore global registers */ -#include hostregs_helper.h +asm(); +env = (void *) saved_env_reg; Is

[Qemu-devel] Re: [PATCH v2 2/2] get rid of hostregs_helper.h

2010-02-25 Thread Paolo Bonzini
On 02/25/2010 02:04 PM, Michael S. Tsirkin wrote: Clobbering memory is not necessary since we are only caring about blocking assignments of env, which is by definition in a register Then I think you should add that as a clobber. Otherwise what prevents the compiler from reordering this asm

[Qemu-devel] Re: [patch uq/master 0/2] port qemu-kvm's -mem-path and -mem-prealloc to qemu

2010-02-25 Thread Avi Kivity
On 02/24/2010 11:11 PM, Marcelo Tosatti wrote: -mem-path option allows file backed guest memory. Applied, thanks. -- error compiling committee.c: too many arguments to function

[Qemu-devel] Re: [patch uq/master 1/2] Allocate memory below 4GB as one chunk

2010-02-25 Thread Avi Kivity
On 02/24/2010 11:11 PM, Marcelo Tosatti wrote: From: Avi Kivitya...@redhat.com Instead of allocating a separate chunk for the first 640KB and another for 1MB+, allocate one large chunk. This plays well in terms of alignment and size with large pages. Signed-off-by: Avi Kivitya...@redhat.com

[Qemu-devel] [PATCH 0/3] s390: Fix compile, add 0.12 machine type, backward compat

2010-02-25 Thread Amit Shah
Hello, This series fixes a compile error and adds 0.12 and 0.13 machine types, disabling newer virtio-serial features for 0.12. Note: The name for the machine type changes from s390-virtio to s390-virtio-vXX, this may not be compatible for 0.12. Amit Shah (3): s390-virtio: Fix compile error

[Qemu-devel] [PATCH 2/3] s390: Add a 0.12 machine type for compatibility

2010-02-25 Thread Amit Shah
Add a 0.12 s390-virtio machine type for compatibility with older versions. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/s390-virtio.c | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index 3582728..a3cbfb6 100644

[Qemu-devel] [PATCH 3/3] s390-virtio: Disable new virtio-serial features for 0.12 machine type

2010-02-25 Thread Amit Shah
Disable the MULTIPORT feature and MSI vectors for the 0.12 machine types; those features are added only for 0.13 onwards. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/s390-virtio.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/s390-virtio.c

[Qemu-devel] [PATCH 1/3] s390-virtio: Fix compile error for virtio-block init

2010-02-25 Thread Amit Shah
Commit 428c149b0be790b440e1cbee185b152cdb22feec modified the argument that virtio_blk_init takes. Update the s390 bus code that calls this function. Signed-off-by: Amit Shah amit.s...@redhat.com CC: Christoph Hellwig h...@lst.de --- hw/s390-virtio-bus.c |2 +- 1 files changed, 1

Re: [Qemu-devel] [RFC] wiki.qemu.org

2010-02-25 Thread Paul Brook
Before doing the switch, I need to figure out what to do with the current texi documentation. I think it makes sense to move qemu-doc.texi to a wiki page and remove it from the source repository. The other option would be to link to it as an external page and keep it within revision control.

[Qemu-devel] [PATCH 1/2] ppc440_bamboo: Add 0.12 and 0.13 machine types for backward compat

2010-02-25 Thread Amit Shah
Add a 0.12 machine type for compatibility with older versions. Mark the default one as 0.13. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/ppc440_bamboo.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c index

[Qemu-devel] [PATCH 2/2] ppc440_bamboo: Disable new virtio-serial features for 0.12 machine type

2010-02-25 Thread Amit Shah
Disable the MULTIPORT feature and MSI vectors for the 0.12 machine types; those features are added only for 0.13 onwards. Signed-off-by: Amit Shah amit.s...@redhat.com --- hw/ppc440_bamboo.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/ppc440_bamboo.c

[Qemu-devel] commit d354899 (Fix OpenBSD linker warning, 2010-02-23)

2010-02-25 Thread Paolo Bonzini
-if (b) -sprintf(b, ...); +if (b) { +memcpy(b, ..., sizeof(...)); +} What's wrong with strcpy? :-) (I doubt OpenBSD warns about that too). Paolo

[Qemu-devel] [PING 0.12] [PATCH v2 RESEND 2/5] fix undefined shifts by 32

2010-02-25 Thread Paolo Bonzini
On 02/04/2010 02:31 PM, Paolo Bonzini wrote: This one is for 0.12 too. Signed-off-by: Paolo Bonzinipbonz...@redhat.com --- vl.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vl.c b/vl.c index 39833fc..ea9a95c 100644 --- a/vl.c +++ b/vl.c @@ -2380,9 +2380,9 @@

Re: [Qemu-devel] [PATCH 1/4] kbd leds: infrastructure

2010-02-25 Thread Anthony Liguori
On 02/25/2010 02:39 AM, Gerd Hoffmann wrote: Adds infrastructure for keyboard led status tracking to qemu. Signed-off-by: Gerd Hoffmannkra...@redhat.com This is an obvious extension to the current API so I'm not necessarily opposed to it. But I wonder if it really makes sense to treat

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

2010-02-25 Thread Anthony Liguori
On 02/25/2010 01:49 AM, Avi Kivity wrote: On 02/24/2010 06:02 PM, Anthony Liguori wrote: Hi Chris, On 02/22/2010 04:52 PM, Chris Wright wrote: Please send in any agenda items you are interested in covering. I thought it might be easier to use the wiki for collecting agenda items instead of

Re: [Qemu-devel] [PATCH] rewrote timer implementation for rtl8139.

2010-02-25 Thread Paul Brook
+++ b/hw/rtl8139.c @@ -41,6 +41,10 @@ * segmentation offloading * Removed slirp.h dependency * Added rx/tx buffer reset when enabling rx/tx operation + * + * 2010-Feb-04 Frediano

[Qemu-devel] Re: [PATCH] qdev: Catch attempt to attach more than one device to a netdev

2010-02-25 Thread Markus Armbruster
Michael S. Tsirkin m...@redhat.com writes: On Thu, Feb 25, 2010 at 01:07:54PM +0100, Markus Armbruster wrote: Michael S. Tsirkin m...@redhat.com writes: On Thu, Feb 25, 2010 at 11:10:15AM +0100, Markus Armbruster wrote: Guest device and host netdev are peers, i.e. it's a 1:1 relation.

Re: [Qemu-devel] [PATCH 1/4] kbd leds: infrastructure

2010-02-25 Thread Gerd Hoffmann
On 02/25/10 15:15, Anthony Liguori wrote: But I wonder if it really makes sense to treat all of these things differently since we end up duplicating a lot of code. Would it make more sense to just introduce: typedef struct QEMUInputHandler { void (*put_kbd_event)(QEMUInputHandler *obj, int

[Qemu-devel] Re: [PATCH] qdev: Catch attempt to attach more than one device to a netdev

2010-02-25 Thread Gerd Hoffmann
Hi, Gerd, what do you think about changing the contract for property parse methods to return -EINVAL, -EBUSY and such? Hmm, wouldn't it make more sense to integrate with qerror somehow? cheers, Gerd

Re: [Qemu-devel] Re: [RFC][PATCH] performance improvement for windows guests, running on top of virtio block device

2010-02-25 Thread Paul Brook
Idle bottom halves (i.e. qemu_bh_schedule_idle) are just bugs waiting to happen, and should never be used for anything. Idle bottom halves make considerable more sense than the normal bottom halves. The fact that rescheduling a bottom half within a bottom half results in an infinite

[Qemu-devel] [PATCH v0 0/5]: QMP: some event fixes

2010-02-25 Thread Luiz Capitulino
The most important fix is wrt the STOP event, which is not being currently emitted. The doc revamp is also important. The other patches are small fixes. Thanks.

[Qemu-devel] [PATCH 1/5] block: Emit BLOCK_IO_ERROR before vm_stop() call

2010-02-25 Thread Luiz Capitulino
The next commit will move the STOP event into do_vm_stop(), to have the expected event sequence we need to emit the I/O error event before calling vm_stop(). The expected sequence is: { event: BLOCK_IO_ERROR [...] } { event: STOP } Signed-off-by: Luiz Capitulino lcapitul...@redhat.com ---

[Qemu-devel] [PATCH 2/5] QMP: Move STOP event into do_vm_stop()

2010-02-25 Thread Luiz Capitulino
I've introduced the STOP event in the main loop, this is wrong as it will be only emitted if the io thread is enabled. This fixes that by moving the STOP event to do_vm_stop(). Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- vl.c |2 +- 1 files changed, 1 insertions(+), 1

[Qemu-devel] [PATCH 3/5] QMP: Move RESET event into qemu_system_reset()

2010-02-25 Thread Luiz Capitulino
Nothing will change as that function is currently only called by the main loop code, but it's the right place for the RESET event, as it's where the reset is actually performed. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- vl.c |3 ++- 1 files changed, 2 insertions(+), 1

[Qemu-devel] [PATCH 4/5] QMP: Drop DEBUG event

2010-02-25 Thread Luiz Capitulino
This event has been introduced in the first round of QMP commits, turns out that it's based on the usage of the EXCP_DEBUG macro, which has discussable semantics when exposed through QMP. As libvirt doesn't use this, let's just drop it. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com ---

[Qemu-devel] [PATCH 5/5] QMP: Revamp the qmp-events.txt file

2010-02-25 Thread Luiz Capitulino
Now we can say it's useful, the following changes have been made: - Put events in alphabetical order - Add examples to all events - Document all 'data' members - Small corrections and cleanups Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- QMP/qmp-events.txt | 170

Re: [Qemu-devel] [PATCH 1/4] kbd leds: infrastructure

2010-02-25 Thread Anthony Liguori
On 02/25/2010 08:36 AM, Gerd Hoffmann wrote: On 02/25/10 15:15, Anthony Liguori wrote: But I wonder if it really makes sense to treat all of these things differently since we end up duplicating a lot of code. Would it make more sense to just introduce: typedef struct QEMUInputHandler { void

[Qemu-devel] Re: [PATCH v3 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-25 Thread Marcelo Tosatti
On Thu, Feb 25, 2010 at 09:48:47AM +0100, Jan Kiszka wrote: Marcelo Tosatti wrote: On Thu, Feb 25, 2010 at 12:58:26AM +0100, Jan Kiszka wrote: Marcelo Tosatti wrote: On Thu, Feb 25, 2010 at 12:45:55AM +0100, Jan Kiszka wrote: Marcelo Tosatti wrote: On Wed, Feb 24, 2010 at 03:17:55PM

[Qemu-devel] [PATCH] QMP: Introduce RTC_CHANGE event

2010-02-25 Thread Luiz Capitulino
Emitted whenever the RTC time changes. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- QMP/qmp-events.txt | 15 +++ hw/mc146818rtc.c |2 ++ monitor.c |3 +++ monitor.h |1 + sysemu.h |2 ++ vl.c |9 +

[Qemu-devel] [PATCH] QMP: Introduce WATCHDOG event

2010-02-25 Thread Luiz Capitulino
It's emitted whenever the watchdog device's timer expires. The action taken is provided in the 'data' member. Signed-off-by: Luiz Capitulino lcapitul...@redhat.com --- QMP/qmp-events.txt | 19 +++ hw/watchdog.c | 17 + monitor.c |3 +++

[Qemu-devel] Re: [PATCH v3 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-25 Thread Jan Kiszka
Marcelo Tosatti wrote: On Thu, Feb 25, 2010 at 09:48:47AM +0100, Jan Kiszka wrote: Marcelo Tosatti wrote: On Thu, Feb 25, 2010 at 12:58:26AM +0100, Jan Kiszka wrote: Marcelo Tosatti wrote: On Thu, Feb 25, 2010 at 12:45:55AM +0100, Jan Kiszka wrote: Marcelo Tosatti wrote: On Wed, Feb 24,

[Qemu-devel] Re: [PATCH v0 0/5]: QMP: some event fixes

2010-02-25 Thread Juan Quintela
Luiz Capitulino lcapitul...@redhat.com wrote: The most important fix is wrt the STOP event, which is not being currently emitted. The doc revamp is also important. The other patches are small fixes. Thanks. Acked-by: Juan Quintela quint...@redhat.com

[Qemu-devel] Re: [PATCH] QMP: Introduce WATCHDOG event

2010-02-25 Thread Richard W.M. Jones
On Thu, Feb 25, 2010 at 12:13:04PM -0300, Luiz Capitulino wrote: It's emitted whenever the watchdog device's timer expires. The action taken is provided in the 'data' member. Patch looks good to me - ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat

Re: [Qemu-devel] Re: [RFC][PATCH] performance improvement for windows guests, running on top of virtio block device

2010-02-25 Thread Anthony Liguori
On 02/25/2010 09:06 AM, Paul Brook wrote: Idle bottom halves (i.e. qemu_bh_schedule_idle) are just bugs waiting to happen, and should never be used for anything. Idle bottom halves make considerable more sense than the normal bottom halves. The fact that rescheduling a bottom half

[Qemu-devel] Re: [PATCH v3 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-25 Thread Marcelo Tosatti
On Thu, Feb 25, 2010 at 04:17:22PM +0100, Jan Kiszka wrote: Marcelo Tosatti wrote: On Thu, Feb 25, 2010 at 09:48:47AM +0100, Jan Kiszka wrote: Marcelo Tosatti wrote: On Thu, Feb 25, 2010 at 12:58:26AM +0100, Jan Kiszka wrote: Marcelo Tosatti wrote: On Thu, Feb 25, 2010 at 12:45:55AM

[Qemu-devel] Re: [PATCH v4 07/10] qemu-kvm: Cleanup/fix TSC and PV clock writeback

2010-02-25 Thread Jan Kiszka
Drop kvm_load_tsc in favor of level-dependent writeback in kvm_arch_load_regs. KVM's PV clock MSRs fall in the same category and should therefore only be written back on full sync. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Changes in v4: - only write TSC MSRs of SMP guests if they

Re: [Qemu-devel] Re: [RFC][PATCH] performance improvement for windows guests, running on top of virtio block device

2010-02-25 Thread Paul Brook
Very simply, without idle bottom halves, there's no way to implement polling with the main loop. If we dropped idle bottom halves, we would have to add explicit polling back to the main loop. How would you implement polling? AFAICS any sort of polling is by definition time based so use a

Re: [Qemu-devel] [PATCH 1/4] kbd leds: infrastructure

2010-02-25 Thread Gerd Hoffmann
On 02/25/10 16:07, Anthony Liguori wrote: On 02/25/2010 08:36 AM, Gerd Hoffmann wrote: I don't think so. Devil is in the details. Note that kbd_event and mouse_event go to the kbd/mouse drivers, whereas led_event comes from the kbd driver, so they are different albeit related beasts. Right, I

Re: [Qemu-devel] [PATCH 1/4] kbd leds: infrastructure

2010-02-25 Thread Anthony Liguori
On 02/25/2010 10:51 AM, Gerd Hoffmann wrote: On 02/25/10 16:07, Anthony Liguori wrote: On 02/25/2010 08:36 AM, Gerd Hoffmann wrote: I don't think so. Devil is in the details. Note that kbd_event and mouse_event go to the kbd/mouse drivers, whereas led_event comes from the kbd driver, so they

Re: [Qemu-devel] Re: [RFC][PATCH] performance improvement for windows guests, running on top of virtio block device

2010-02-25 Thread Avi Kivity
On 02/25/2010 05:06 PM, Paul Brook wrote: Idle bottom halves (i.e. qemu_bh_schedule_idle) are just bugs waiting to happen, and should never be used for anything. Idle bottom halves make considerable more sense than the normal bottom halves. The fact that rescheduling a bottom half

Re: [Qemu-devel] Re: [RFC][PATCH] performance improvement for windows guests, running on top of virtio block device

2010-02-25 Thread Anthony Liguori
On 02/25/2010 11:11 AM, Avi Kivity wrote: On 02/25/2010 05:06 PM, Paul Brook wrote: Idle bottom halves (i.e. qemu_bh_schedule_idle) are just bugs waiting to happen, and should never be used for anything. Idle bottom halves make considerable more sense than the normal bottom halves. The fact

Re: [Qemu-devel] Re: [RFC][PATCH] performance improvement for windows guests, running on top of virtio block device

2010-02-25 Thread Avi Kivity
On 02/25/2010 07:15 PM, Anthony Liguori wrote: I agree. Further, once we fine-grain device threading, the iothread essentially disappears and is replaced by device-specific threads. There's no idle anymore. That's a nice idea, but how is io dispatch handled? Is everything synchronous or

[Qemu-devel] Re: [PATCHv2 05/12] virtio: add APIs for queue fields

2010-02-25 Thread Anthony Liguori
On 02/25/2010 12:27 PM, Michael S. Tsirkin wrote: vhost needs physical addresses for ring and other queue fields, so add APIs for these. Signed-off-by: Michael S. Tsirkinm...@redhat.com --- hw/virtio.c | 50 ++ hw/virtio.h | 10 +-

[Qemu-devel] Re: [PATCHv2 02/12] kvm: add API to set ioeventfd

2010-02-25 Thread Anthony Liguori
On 02/25/2010 12:28 PM, Michael S. Tsirkin wrote: Comment on kvm usage: rather than require users to do if (kvm_enabled()) and/or ifdefs, this patch adds an API that, internally, is defined to stub function on non-kvm build, and checks kvm_enabled for non-kvm run. While rest of qemu code still

[Qemu-devel] Re: [PATCHv2 03/12] notifier: event notifier implementation

2010-02-25 Thread Anthony Liguori
On 02/25/2010 12:28 PM, Michael S. Tsirkin wrote: event notifiers are slightly generalized eventfd descriptors. Current implementation depends on eventfd because vhost is the only user, and vhost depends on eventfd anyway, but a stub is provided for non-eventfd case. We'll be able to further

[Qemu-devel] Re: [PATCHv2 08/12] virtio-pci: fill in notifier support

2010-02-25 Thread Anthony Liguori
On 02/25/2010 12:28 PM, Michael S. Tsirkin wrote: Support host/guest notifiers in virtio-pci. The last one only with kvm, that's okay because vhost relies on kvm anyway. Note on kvm usage: kvm ioeventfd API is implemented on non-kvm systems as well, this is the reason we don't need if

[Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-25 Thread Anthony Liguori
On 02/25/2010 12:28 PM, Michael S. Tsirkin wrote: This adds vhost net device support in qemu. Will be tied to tap device and virtio by following patches. Raw backend is currently missing, will be worked on/submitted separately. Signed-off-by: Michael S. Tsirkinm...@redhat.com ---

[Qemu-devel] Re: [PATCHv2 10/12] tap: add vhost/vhostfd options

2010-02-25 Thread Anthony Liguori
On 02/25/2010 12:28 PM, Michael S. Tsirkin wrote: This adds vhost binary option to tap, to enable vhost net accelerator. Default is off for now, we'll be able to make default on long term when we know it's stable. vhostfd option can be used by management, to pass in the fd. Assigning vhostfd

[Qemu-devel] Re: [PATCHv2 00/12] vhost-net: upstream integration

2010-02-25 Thread Anthony Liguori
On 02/25/2010 12:27 PM, Michael S. Tsirkin wrote: Here's a patchset with vhost support for upstream qemu, rabed to latest bits. Note that irqchip/MSI is no longer required for vhost, but you should not expect performance gains from vhost unless in-kernel irqchip is enabled (which is not in

Re: [Qemu-devel] [PATCHv2 05/12] virtio: add APIs for queue fields

2010-02-25 Thread Blue Swirl
On 2/25/10, Michael S. Tsirkin m...@redhat.com wrote: vhost needs physical addresses for ring and other queue fields, so add APIs for these. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio.c | 50 ++ hw/virtio.h | 10

[Qemu-devel] Re: [PATCH] target-sparc: fix --enable-debug build for 64 bit host

2010-02-25 Thread Blue Swirl
Thanks, applied. On 2/25/10, Stefan Weil w...@mail.berlios.de wrote: b551ec04ca45d1925417dd2ec7c1b7f115c84f1d fixed the compilation for 32 bit hosts, but introduced a new error for 64 bit hosts: tcg_temp_new_ptr needs a matching tcg_temp_free_ptr. Signed-off-by: Stefan Weil

[Qemu-devel] [PATCHv2 07/12] virtio: move typedef to qemu-common

2010-02-25 Thread Michael S. Tsirkin
make it possible to use type without header include Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio.h |1 - qemu-common.h |1 + 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/virtio.h b/hw/virtio.h index e12e8e3..b4cd877 100644 --- a/hw/virtio.h +++

[Qemu-devel] [PATCHv2 05/12] virtio: add APIs for queue fields

2010-02-25 Thread Michael S. Tsirkin
vhost needs physical addresses for ring and other queue fields, so add APIs for these. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio.c | 50 ++ hw/virtio.h | 10 +- 2 files changed, 59 insertions(+), 1 deletions(-)

[Qemu-devel] [PATCHv2 06/12] virtio: add set_status callback

2010-02-25 Thread Michael S. Tsirkin
vhost net backend needs to be notified when frontend status changes. Add a callback, similar to set_features. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/s390-virtio-bus.c |7 ++- hw/syborg_virtio.c |2 ++ hw/virtio-pci.c |9 - hw/virtio.h |

[Qemu-devel] [PATCHv2 04/12] virtio: add notifier support

2010-02-25 Thread Michael S. Tsirkin
Add binding API to set host/guest notifiers. Will be used by vhost. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio.c |5 - hw/virtio.h |3 +++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index 7c020a3..1f5e7be 100644 ---

Re: [Qemu-devel] Re: [RFC][PATCH] performance improvement for windows guests, running on top of virtio block device

2010-02-25 Thread malc
On Thu, 25 Feb 2010, Avi Kivity wrote: On 02/25/2010 07:15 PM, Anthony Liguori wrote: I agree. Further, once we fine-grain device threading, the iothread essentially disappears and is replaced by device-specific threads. There's no idle anymore. That's a nice idea, but how is

[Qemu-devel] [PATCHv2 01/12] tap: add interface to get device fd

2010-02-25 Thread Michael S. Tsirkin
Will be used by vhost to attach/detach to backend. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- net/tap.c |7 +++ net/tap.h |2 ++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/net/tap.c b/net/tap.c index 7a7320c..fc59fd4 100644 --- a/net/tap.c +++

[Qemu-devel] Re: [PATCH] target-sparc: fix --enable-debug build for 64 bit host

2010-02-25 Thread Jay Foad
On 25 February 2010 18:05, Stefan Weil w...@mail.berlios.de wrote: b551ec04ca45d1925417dd2ec7c1b7f115c84f1d fixed the compilation for 32 bit hosts, but introduced a new error for 64 bit hosts: Sorry. Thanks for fixing it. Jay.

[Qemu-devel] [PATCHv2 03/12] notifier: event notifier implementation

2010-02-25 Thread Michael S. Tsirkin
event notifiers are slightly generalized eventfd descriptors. Current implementation depends on eventfd because vhost is the only user, and vhost depends on eventfd anyway, but a stub is provided for non-eventfd case. We'll be able to further generalize this when another user comes along and we

[Qemu-devel] [PATCHv2 02/12] kvm: add API to set ioeventfd

2010-02-25 Thread Michael S. Tsirkin
Comment on kvm usage: rather than require users to do if (kvm_enabled()) and/or ifdefs, this patch adds an API that, internally, is defined to stub function on non-kvm build, and checks kvm_enabled for non-kvm run. While rest of qemu code still uses if (kvm_enabled()), I think this approach is

[Qemu-devel] [PATCHv2 08/12] virtio-pci: fill in notifier support

2010-02-25 Thread Michael S. Tsirkin
Support host/guest notifiers in virtio-pci. The last one only with kvm, that's okay because vhost relies on kvm anyway. Note on kvm usage: kvm ioeventfd API is implemented on non-kvm systems as well, this is the reason we don't need if (kvm_enabled()) around it. Signed-off-by: Michael S. Tsirkin

Re: [Qemu-devel] commit d354899 (Fix OpenBSD linker warning, 2010-02-23)

2010-02-25 Thread Blue Swirl
On 2/25/10, Paolo Bonzini pbonz...@redhat.com wrote: -if (b) -sprintf(b, ...); +if (b) { +memcpy(b, ..., sizeof(...)); +} What's wrong with strcpy? :-) (I doubt OpenBSD warns about that too).

[Qemu-devel] Re: [PATCHv2 09/12] vhost: vhost net support

2010-02-25 Thread Juan Quintela
Michael S. Tsirkin m...@redhat.com wrote: This adds vhost net device support in qemu. Will be tied to tap device and virtio by following patches. Raw backend is currently missing, will be worked on/submitted separately. +obj-y += vhost_net.o +obj-$(CONFIG_VHOST_NET) += vhost.o hy is

[Qemu-devel] [PATCHv2 11/12] tap: add API to retrieve vhost net header

2010-02-25 Thread Michael S. Tsirkin
will be used by virtio-net for vhost net support Signed-off-by: Michael S. Tsirkin m...@redhat.com --- net/tap.c |7 +++ net/tap.h |3 +++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/net/tap.c b/net/tap.c index 65797ef..9bb11fc 100644 --- a/net/tap.c +++

[Qemu-devel] [PATCHv2 00/12] vhost-net: upstream integration

2010-02-25 Thread Michael S. Tsirkin
Here's a patchset with vhost support for upstream qemu, rabed to latest bits. Note that irqchip/MSI is no longer required for vhost, but you should not expect performance gains from vhost unless in-kernel irqchip is enabled (which is not in upstream qemu now), and unless guest enables MSI. A

[Qemu-devel] [PATCHv2 09/12] vhost: vhost net support

2010-02-25 Thread Michael S. Tsirkin
This adds vhost net device support in qemu. Will be tied to tap device and virtio by following patches. Raw backend is currently missing, will be worked on/submitted separately. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Makefile.target |2 + configure | 21 ++ hw/vhost.c

[Qemu-devel] [PATCHv2 10/12] tap: add vhost/vhostfd options

2010-02-25 Thread Michael S. Tsirkin
This adds vhost binary option to tap, to enable vhost net accelerator. Default is off for now, we'll be able to make default on long term when we know it's stable. vhostfd option can be used by management, to pass in the fd. Assigning vhostfd implies vhost=on. Signed-off-by: Michael S. Tsirkin

[Qemu-devel] [PATCHv2 12/12] virtio-net: vhost net support

2010-02-25 Thread Michael S. Tsirkin
This connects virtio-net to vhost net backend. The code is structured in a way analogous to what we have with vnet header capability in tap. We start/stop backend on driver start/stop as well as on save and vm start (for migration). Signed-off-by: Michael S. Tsirkin m...@redhat.com ---

[Qemu-devel] Re: commit d354899 (Fix OpenBSD linker warning, 2010-02-23)

2010-02-25 Thread Paolo Bonzini
On 02/25/2010 06:37 PM, Blue Swirl wrote: What's wrong with strcpy?:-) (I doubt OpenBSD warns about that too). But of course, with code containing strcpy() you get this: LINK i386-softmmu/qemu i386-dis.o(.text+0x3aac): In function `oappend': /src/qemu/i386-dis.c:4656: warning:

[Qemu-devel] [ANNOUNCE] Release 0.12.2 of QEMU

2010-02-25 Thread Anthony Liguori
The QEMU team is pleased to announce the availability of the 0.12.3 release. This is a stable release of the 0.12 series and only contains bug fixes since 0.12.2. It can be downloaded from Savannah at: http://download.savannah.gnu.org/releases/qemu/qemu-0.12.3.tar.gz On behalf of the QEMU

Re: [Qemu-devel] [ANNOUNCE] Release 0.12.2 of QEMU

2010-02-25 Thread Natalia Portillo
Added to Official OS Support List. El 25/02/2010, a las 22:30, Anthony Liguori escribió: The QEMU team is pleased to announce the availability of the 0.12.3 release. This is a stable release of the 0.12 series and only contains bug fixes since 0.12.2. It can be downloaded from Savannah