[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 --- 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 +++ b/hw/usb-hid.c @@ -600,12 +600

[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 impro

[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 --- console.h | 14 ++ input.c | 50 ++ 2 files changed, 64 insertions(+), 0 deletions(-) diff --git a/console.h b/console.h index 916859d

[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 --- 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 @@ static void ps2_re

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

2010-02-25 Thread Gerd Hoffmann
From: Izik Eidus Signed-off-by: Izik Eidus Signed-off-by: Gerd Hoffmann --- 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 +++ b/hw/pci.h @@ -301,11 +301,29 @@ pci_config_set_d

[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 --- 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 000..095aec1 ---

[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 fa

[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 --- 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 --- a/hw/scsi-disk.c

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

2010-02-25 Thread Juan Quintela
Gerd Hoffmann wrote: > Want share them with vnc and spice. Reviewed-by: Juan Quintela > Signed-off-by: Gerd Hoffmann > --- > 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-

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

2010-02-25 Thread Juan Quintela
Gerd Hoffmann wrote: > From: Izik Eidus > > Signed-off-by: Izik Eidus > Signed-off-by: Gerd Hoffmann > --- > 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 > +++ b/hw/

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

2010-02-25 Thread Juan Quintela
Gerd Hoffmann 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 QLIST(), c

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

2010-02-25 Thread Juan Quintela
Gerd Hoffmann wrote: > Add led status notification support to the ps/2 kbd driver. > > Signed-off-by: Gerd Hoffmann > --- > 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/ps

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

2010-02-25 Thread Juan Quintela
Gerd Hoffmann wrote: > Use led status notification support in vnc. > +static void kbd_leds(void *opaque, int ledstate) > +{ > +VncState *vs = opaque; > +int caps, num; > + > +caps = ledstate & QEMU_CAPS_LOCK_LED ? 1 : 0; > +num = ledstate & QEMU_NUM_LOCK_LED ? 1 : 0; I think it

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

2010-02-25 Thread Paolo Bonzini
On 02/25/2010 12:03 PM, Juan Quintela wrote: > +caps = ledstate & QEMU_CAPS_LOCK_LED ? 1 : 0; > +num = ledstate & QEMU_NUM_LOCK_LED ? 1 : 0; I think it is clearer to use a bool. bool caps = ledstate& QEMU_CAPS_LOCK_LED; Are we assuming a C99 bool elsewhere? For example, I se

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

2010-02-25 Thread Gerd Hoffmann
On 02/25/10 11:23, Markus Armbruster wrote: You're supposed to use scsi-generic for that. Which rejects anything but /dev/sg*. Well, it isn't *that* easy. The SG_IO ioctl used by scsi-generic works on tons of devices in linux, not only /dev/sg*. I've seen patches floading around which chan

[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 Eidus The true auther of this patch is Yaniv Kamay. Thanks. Signed-off-by: Izik Eidus Signed-off-by: Gerd Hoffmann ---

[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 wrote: > > From: Izik Eidus > > > > Signed-off-by: Izik Eidus > > Signed-off-by: Gerd Hoffmann > > --- > > hw/pci.h | 18 ++ > > 1 files changed, 18 insertions(+), 0 deletions(-) > > > > diff --git

[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? Wh

[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 -mo

[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 > --- > hw/scsi-disk.c |5 + > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git

[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 Reported-by: "Michael S. Tsirkin" --- hw/qdev.c |2 +- hw/qdev.h |4 net.c |6 -- net.h |3 --- 4 files changed, 9 insertions(+), 6 deletion

[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 Reported-by: "Michael S. Tsirkin" --- 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 --- a/hw/virtio-pci.c +++ b/hw/vir

[Qemu-devel] Re: [PATCH v3 04/10] qemu-kvm: Clean up mpstate synchronization

2010-02-25 Thread Jan Kiszka
Jan Kiszka wrote: > Marcelo Tosatti wrote: >> On Wed, Feb 24, 2010 at 03:17:52PM +0100, Jan Kiszka wrote: >>> Push mpstate reading/writing into kvm_arch_load/save_regs and, on x86, >>> properly synchronize with halted in the accessor functions. >>> >>> Signed-off-by: Jan Kiszka >>> @@ -1290,6 +131

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

2010-02-25 Thread Markus Armbruster
Gerd Hoffmann writes: > On 02/25/10 11:23, Markus Armbruster wrote: >> You're supposed to use scsi-generic for that. Which rejects anything >> but /dev/sg*. > > Well, it isn't *that* easy. The SG_IO ioctl used by scsi-generic > works on tons of devices in linux, not only /dev/sg*. I've seen Y

[Qemu-devel] Re: [PATCH RFC 00/48] Convert device_add to QObject / QError

2010-02-25 Thread Michael S. Tsirkin
On Wed, Feb 24, 2010 at 06:55:12PM +0100, Markus Armbruster wrote: > Why this is such a big job? There are two issues with a naive > conversion: > > * Error message degradation > > The error messages are worded for -device. They aren't so hot to > begin with: we typically have many -device

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

2010-02-25 Thread Michael S. Tsirkin
On Thu, Feb 25, 2010 at 05:24:43PM +0530, Amit Shah wrote: > net.c used a constant to signify no MSI vectors were specified. Extend > that to all qdev devices. > > Signed-off-by: Amit Shah > Reported-by: "Michael S. Tsirkin" Acked-by: Michael S. Tsirkin > --- > hw/qdev.c |2 +- > hw/qdev

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

2010-02-25 Thread Michael S. Tsirkin
On Thu, Feb 25, 2010 at 05:24:44PM +0530, Amit Shah wrote: > Use the named constant instead of -1. > > Signed-off-by: Amit Shah > Reported-by: "Michael S. Tsirkin" Acked-by: Michael S. Tsirkin > --- > hw/virtio-pci.c |8 +--- > 1 files changed, 5 insertions(+), 3 deletions(-) > > di

[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" 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. >> However, we fail to enforce that: >> >> $ qemu -nodefaults --nographic -netdev user,id=net0 -device >> e1000,netdev=net0

[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 01:07:54PM +0100, Markus Armbruster wrote: > "Michael S. Tsirkin" 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. > >> However, we fail to enforce that: > >> > >> $

[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" writes: > On Thu, Feb 25, 2010 at 01:07:54PM +0100, Markus Armbruster wrote: >> "Michael S. Tsirkin" 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. >> >> However, we

[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 v

[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 *) s

[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

[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 Kivity 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 Kivity (cherry picked from commit cfe0c

[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 fo

[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 --- 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 --- a/hw/s390-virtio.c

[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 --- hw/s390-virtio.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index a

[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 CC: Christoph Hellwig --- hw/s390-virtio-bus.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/

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 cont

[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 --- 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 1ab9872..aa9f594 100644 -

[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 --- hw/ppc440_bamboo.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c i

[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 Bonzini --- 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 @@ static void numa_add(c

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 Hoffmann 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 all of these thing

[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 Fredian

[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" writes: > On Thu, Feb 25, 2010 at 01:07:54PM +0100, Markus Armbruster wrote: >> "Michael S. Tsirkin" 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. >> >> However, we

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 key

[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 in

[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 --- hw/ide/core.c |

[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 --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c

[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 --- vl.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/vl.

[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 --- QMP/qmp-events.txt |

[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 --- 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, 20

[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 --- QMP/qmp-events.txt | 15 +++ hw/mc146818rtc.c |2 ++ monitor.c |3 +++ monitor.h |1 + sysemu.h |2 ++ vl.c |9 + 6 files changed, 32 i

[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 --- QMP/qmp-events.txt | 19 +++ hw/watchdog.c | 17 + monitor.c |3 +++ monitor.h |1 +

[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:

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

2010-02-25 Thread Juan Quintela
Luiz Capitulino 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

[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 http://people.redhat.com/~rjo

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 withi

[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, 20

[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 --- Changes in v4: - only write TSC MSRs of SMP guests if they are non-zero, ie. after

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

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 ar

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 withi

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 t

[Qemu-devel] [PATCH v4 04/10] qemu-kvm: Clean up mpstate synchronization

2010-02-25 Thread Jan Kiszka
Push mpstate reading/writing into kvm_arch_load/save_regs and, on x86, properly synchronize with halted in the accessor functions. At this chance, drop the special reset of interrupt_request and halted in kvm_arch_cpu_reset. The former is done via memset in cpu_reset, the latter in apic_init_reset

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. Tsirkin --- hw/virtio.c | 50 ++ hw/virtio.h | 10 +- 2 files changed

[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 u

[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 gen

[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 (kvm_enabl

[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. Tsirkin --- Makefile.target |2 +

[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 imp

[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 upstr

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:33 AM, 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 io dispa

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 wrote: > vhost needs physical addresses for ring and other queue fields, > so add APIs for these. > > Signed-off-by: Michael S. Tsirkin > --- > hw/virtio.c | 50 ++ > hw/virtio.h | 10 +- > 2 files c

[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 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 > --- > target-sparc/

[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 --- 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 +++ b/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 --- hw/virtio.c | 50 ++ hw/virtio.h | 10 +- 2 files changed, 59 insertions(+), 1 deletions(-) diff --git a/hw/vi

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

2010-02-25 Thread Stefan Weil
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 --- target-sparc/translate.c |2 +- 1 files changed, 1 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 --- hw/s390-virtio-bus.c |7 ++- hw/syborg_virtio.c |2 ++ hw/virtio-pci.c |9 - hw/virtio.h |1 + 4 files c

[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 --- 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 --- a/hw/virtio.c +++

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 i

[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 --- 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 +++ b/net/tap.c @@ -269,6 +26

[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 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 se

[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 cle

[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 wrote: > > -if (b) > > -sprintf(b, "..."); > > +if (b) { > > +memcpy(b, "...", sizeof("...")); > > +} > > > > What's wrong with strcpy? :-) (I doubt OpenBSD warns about that too). B

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

2010-02-25 Thread Juan Quintela
"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. > +obj-y += vhost_net.o +obj-$(CONFIG_VHOST_NET) += vhost.o hy is vhost_net.o confi

[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 --- 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 +++ b/net/tap.c @@ -491,3 +49

  1   2   >