Re: [Qemu-devel] [F.A.Q.] the advantages of a shared tool/kernel Git repository, tools/perf/ and tools/kvm/

2011-11-09 Thread Ingo Molnar
* Américo Wang wrote: > On Tue, Nov 8, 2011 at 5:32 PM, Ingo Molnar wrote: > > > > So i think you should seriously consider moving your projects > > *into* tools/ instead of trying to get other projects to move out > > ... > > > > You should at least *try* the unified model before criticising

[Qemu-devel] [PATCH v2 RESEND] scripts/analyse-9p-simpletrace.py: Add symbolic names for 9p operations.

2011-11-09 Thread Harsh Prateek Bora
Currently, we just print the numerical value of 9p operation identifier in case of RERROR which is less meaningful for readability. Mapping 9p operation ids to symbolic names provides a better tracelog: RERROR (tag = 1 , id = TWALK , err = " No such file or directory ") RERROR (tag

[Qemu-devel] [PATCHi v2] scripts/analyse-9p-simpletrace.py: Add symbolic names for 9p operations.

2011-11-09 Thread Harsh Prateek Bora
Currently, we just print the numerical value of 9p operation identifier in case of RERROR which is less meaningful for readability. Mapping 9p operation ids to symbolic names provides a better tracelog: RERROR (tag = 1 , id = TWALK , err = 2 ) RERROR (tag = 1 , id = TUNLINKAT , err

Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp

2011-11-09 Thread Stefan Weil
Am 10.11.2011 00:45, schrieb Alexander Graf: On 09.11.2011, at 13:47, Luiz Capitulino wrote: On Wed, 09 Nov 2011 11:27:22 +0100 Andreas Färber wrote: Am 09.11.2011 06:58, schrieb Stefan Weil: Am 09.11.2011 02:38, schrieb Alexander Graf: Commit 79627472db3 introduced breakage in compiling

[Qemu-devel] [Bug 888016] Re: RHEL 6.1 guest fails to boot with vhost

2011-11-09 Thread pradeep
i hits this issue on host: 3.1.0+ also -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/888016 Title: RHEL 6.1 guest fails to boot with vhost Status in QEMU: New Bug description: Tried to boot 6

[Qemu-devel] Milky Mist fbconfig misconfigured

2011-11-09 Thread C.W. Betts
I noticed when looking through Qemu's source code to find out about OpenGL in it, I noticed that the array glx_fbconfig_attr had two GLX_GREEN_SIZE methods defined. Is this on purpose, or a bug?

Re: [Qemu-devel] [PATCH 1/3] usb-hub: wakeup on attach

2011-11-09 Thread hkran
On 11/01/2011 10:56 PM, Gerd Hoffmann wrote: When attaching a new device we must send a wakeup request to the root hub, otherwise the guest will not notice the new device in case the usb hub is suspended. Signed-off-by: Gerd Hoffmann --- hw/usb-hub.c |1 + 1 files changed, 1 insertions(+)

Re: [Qemu-devel] [PATCH] s390x: initialize virtio dev region

2011-11-09 Thread Peter Maydell
On 10 November 2011 01:45, Alexander Graf wrote: > On 10.11.2011, at 02:36, Peter Maydell wrote: >> This looks a bit fishy -- cpu_physical_memory_map() takes a >> target_phys_addr_t but you're passing it a ram_addr_t. > > Meh. Always those types ... :) In the simple case ("ram starts at 0, not mu

Re: [Qemu-devel] [PATCH v4] block:add-cow file format

2011-11-09 Thread Dong Xu Wang
2011/11/9 Kevin Wolf : > Am 27.10.2011 10:52, schrieb Dong Xu Wang: >> Provide a new file format: add-cow. The usage can be found in add-cow.txt of >> this patch. >> >> Signed-off-by: Dong Xu Wang >> --- >>  Makefile.objs          |    1 + >>  block.c                |    2 +- >>  block.h          

Re: [Qemu-devel] [PATCH 00/10] qemu_fclose() error handling fixes (v2)

2011-11-09 Thread Anthony Liguori
On 11/09/2011 04:03 PM, Eduardo Habkost wrote: I am not sure if this is appropriate post-freeze, I will let the maintainers decide this. Personally I think the code is more reliable with these changes, but on the other hand the only bugs it fixes are on the error paths. What bug does this fix?

Re: [Qemu-devel] [PATCH] migration: fix detached migration with fd

2011-11-09 Thread Stefan Berger
On 11/09/2011 03:29 PM, Juan Quintela wrote: Migration with fd uses s->mon to pass the fd. But we only assign the s->mon for !detached migration. Fix it. Once there add a comment indicating that s->mon has two uses. I had encounter the NULL pointer problem when suspending using 'virsh save.

Re: [Qemu-devel] [PATCH] s390x: initialize virtio dev region

2011-11-09 Thread Alexander Graf
On 10.11.2011, at 02:36, Peter Maydell wrote: > On 10 November 2011 01:19, Alexander Graf wrote: >> @@ -184,6 +186,13 @@ static void s390_init(ram_addr_t my_ram_size, >> memory_region_init_ram(ram, NULL, "s390.ram", my_ram_size); >> memory_region_add_subregion(sysmem, 0, ram); >> >> +

Re: [Qemu-devel] [PATCH] s390x: initialize virtio dev region

2011-11-09 Thread Peter Maydell
On 10 November 2011 01:19, Alexander Graf wrote: > @@ -184,6 +186,13 @@ static void s390_init(ram_addr_t my_ram_size, >     memory_region_init_ram(ram, NULL, "s390.ram", my_ram_size); >     memory_region_add_subregion(sysmem, 0, ram); > > +    /* clear virtio region */ > +    virtio_region_len = m

Re: [Qemu-devel] [F.A.Q.] the advantages of a shared tool/kernel Git repository, tools/perf/ and tools/kvm/

2011-11-09 Thread Alexander Graf
On 09.11.2011, at 09:23, Ingo Molnar wrote: > > * Ted Ts'o wrote: > >> On Tue, Nov 08, 2011 at 01:55:09PM +0100, Ingo Molnar wrote: >> >>> I guess you can do well with a split project as well - my main >>> claim is that good compatibility comes *naturally* with >>> integration. >> >> Here

[Qemu-devel] [PATCH] s390x: initialize virtio dev region

2011-11-09 Thread Alexander Graf
When running the s390x virtio machine we can potentially use uninitialized memory for the virtio device backing ram. That can lead to weird breakge. So let's better initialize it to 0 properly. Reported-by: Andreas Färber Signed-off-by: Alexander Graf --- hw/s390-virtio.c |9 + 1 f

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO Driver core framework

2011-11-09 Thread Christian Benvenuti (benve)
Here are few minor comments on vfio_iommu.c ... > diff --git a/drivers/vfio/vfio_iommu.c b/drivers/vfio/vfio_iommu.c > new file mode 100644 > index 000..029dae3 > --- /dev/null > +++ b/drivers/vfio/vfio_iommu.c > @@ -0,0 +1,530 @@ > +/* > + * VFIO: IOMMU DMA mapping support > + * > + * Copyrig

Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp

2011-11-09 Thread Anthony Liguori
On 11/09/2011 05:45 PM, Alexander Graf wrote: On 09.11.2011, at 13:47, Luiz Capitulino wrote: On Wed, 09 Nov 2011 11:27:22 +0100 Andreas Färber wrote: Am 09.11.2011 06:58, schrieb Stefan Weil: Am 09.11.2011 02:38, schrieb Alexander Graf: Commit 79627472db3 introduced breakage in compiling

Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp

2011-11-09 Thread Anthony Liguori
On 11/09/2011 05:44 PM, Alexander Graf wrote: On 10.11.2011, at 00:38, Anthony Liguori wrote: On 11/09/2011 05:12 PM, Alexander Graf wrote: We have been using it that way in the past and I am not aware of a patch that removed ancient cleanups, so it's good practice to keep it working that w

Re: [Qemu-devel] [PATCH v2] qmp: add test tool for QMP

2011-11-09 Thread Anthony Liguori
On 11/09/2011 05:58 PM, Luiz Capitulino wrote: On Wed, 09 Nov 2011 14:15:04 -0600 Anthony Liguori wrote: On 11/08/2011 11:55 PM, Mark Wu wrote: Anthony wrote this quickly to aid in testing. It's similar to qmp-shell with a few important differences: 1) It is not interactive. That makes it

[Qemu-devel] [RFC 1/2] block: let bdrv_set_key be used for authentication

2011-11-09 Thread Josh Durgin
Add a BlockDriverState member 'needs_auth' to distinguish between drives that require authentication and those that are encrypted. Update the block_passwd monitor command and error strings to be about generic passwords instead of encryption. Signed-off-by: Josh Durgin --- block.c | 27

[Qemu-devel] [RFC 2/2] rbd: implement bdrv_set_key

2011-11-09 Thread Josh Durgin
We can't connect to the cluster before the key is set, so this step is moved to qemu_rbd_open_finish. Each bdrv function will fail before the key is set. Signed-off-by: Josh Durgin --- block/rbd.c | 160 +- 1 files changed, 113 insertions(

[Qemu-devel] [RFC 0/2] rbd authentication

2011-11-09 Thread Josh Durgin
These patches allow keys to be passed to rbd devices for authentication via the same interface that qcow uses for encryption - the monitor block_passwd command. Since rbd cannot read anything from the cluster before authenticating, the size of the device is unknown until the key is set. At this po

Re: [Qemu-devel] [PATCH v2] qmp: add test tool for QMP

2011-11-09 Thread Luiz Capitulino
On Wed, 09 Nov 2011 14:15:04 -0600 Anthony Liguori wrote: > On 11/08/2011 11:55 PM, Mark Wu wrote: > > Anthony wrote this quickly to aid in testing. It's similar to qmp-shell > > with > > a few important differences: > > > > 1) It is not interactive. That makes it useful for scripting. > > > >

Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp

2011-11-09 Thread Alexander Graf
On 09.11.2011, at 13:47, Luiz Capitulino wrote: > On Wed, 09 Nov 2011 11:27:22 +0100 > Andreas Färber wrote: > >> Am 09.11.2011 06:58, schrieb Stefan Weil: >>> Am 09.11.2011 02:38, schrieb Alexander Graf: Commit 79627472db3 introduced breakage in compiling the s390x-softmmu target. In

Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp

2011-11-09 Thread Alexander Graf
On 10.11.2011, at 00:38, Anthony Liguori wrote: > On 11/09/2011 05:12 PM, Alexander Graf wrote: >> >>> We have been using it that way in the past and I am not aware of a patch >>> that removed ancient cleanups, so it's good practice to keep it working >>> that way. >>> >>> When I do a git pull

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO Driver core framework

2011-11-09 Thread Alex Williamson
On Wed, 2011-11-09 at 15:08 -0600, Christian Benvenuti (benve) wrote: > > > > + > > > > +struct vfio_group { > > > > + dev_t devt; > > > > + unsigned intgroupid; > > > > > > This groupid is returned by the device_group callback you recently > > added > > >

Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp

2011-11-09 Thread Anthony Liguori
On 11/09/2011 05:12 PM, Alexander Graf wrote: We have been using it that way in the past and I am not aware of a patch that removed ancient cleanups, so it's good practice to keep it working that way. When I do a git pull I don't know whether or what it may bring. Always doing make clean just-

Re: [Qemu-devel] qemu and qemu.git -> Migration + disk stress introduces qcow2 corruptions

2011-11-09 Thread Lucas Meneghel Rodrigues
On 11/09/2011 05:25 PM, Juan Quintela wrote: Lucas Meneghel Rodrigues wrote: Hi guys, here I am, reporting yet another issue with qemu. This time, it's something that was first reported in January, and Juan proposed a patch for it: http://comments.gmane.org/gmane.comp.emulators.qemu/89009 [PA

Re: [Qemu-devel] [PATCH 1/2] Reopen files after migration

2011-11-09 Thread Lucas Meneghel Rodrigues
On 11/09/2011 05:16 PM, Juan Quintela wrote: We need to invalidate the Read Cache on the destination, otherwise we have corruption. Easy way to reproduce it is: - create an qcow2 images - start qemu on destination of migration (qemu -incoming tcp:...) - start qemu on source of migration an

Re: [Qemu-devel] [TestDays] s390x emulation error

2011-11-09 Thread Alexander Graf
On 10.11.2011, at 00:23, Andreas Färber wrote: > Am 10.11.2011 00:21, schrieb Alexander Graf: >> >> >> Am 10.11.2011 um 00:20 schrieb Andreas Färber : >> >>> Am 10.11.2011 00:18, schrieb Alexander Graf: Am 09.11.2011 um 23:53 schrieb Andreas Färber : > I get the following error: >

Re: [Qemu-devel] [TestDays] s390x emulation error

2011-11-09 Thread Andreas Färber
Am 10.11.2011 00:21, schrieb Alexander Graf: > > > Am 10.11.2011 um 00:20 schrieb Andreas Färber : > >> Am 10.11.2011 00:18, schrieb Alexander Graf: >>> Am 09.11.2011 um 23:53 schrieb Andreas Färber : I get the following error: $ s390x-softmmu/qemu-system-s390x qemu-system-s3

Re: [Qemu-devel] [TestDays] s390x emulation error

2011-11-09 Thread Alexander Graf
Am 10.11.2011 um 00:20 schrieb Andreas Färber : > Am 10.11.2011 00:18, schrieb Alexander Graf: >> Am 09.11.2011 um 23:53 schrieb Andreas Färber : >>> I get the following error: >>> >>> $ s390x-softmmu/qemu-system-s390x >>> qemu-system-s390x: Guest moved used index from 0 to 47802 >>> >>> Same

Re: [Qemu-devel] [TestDays] s390x emulation error

2011-11-09 Thread Alexander Graf
Am 10.11.2011 um 00:17 schrieb Andreas Färber : > Am 09.11.2011 23:53, schrieb Andreas Färber: >> I get the following error: >> >> $ s390x-softmmu/qemu-system-s390x >> qemu-system-s390x: Guest moved used index from 0 to 47802 > > This is coming from hw/virtio.c: > > static int virtqueue_num_h

Re: [Qemu-devel] [TestDays] s390x emulation error

2011-11-09 Thread Andreas Färber
Am 10.11.2011 00:18, schrieb Alexander Graf: > Am 09.11.2011 um 23:53 schrieb Andreas Färber : >> I get the following error: >> >> $ s390x-softmmu/qemu-system-s390x >> qemu-system-s390x: Guest moved used index from 0 to 47802 >> >> Same if specifying SLES 11 SP2 Beta8 DVD .iso via -cdrom. >> >> Fir

Re: [Qemu-devel] [TestDays] s390x emulation error

2011-11-09 Thread Alexander Graf
Am 09.11.2011 um 23:53 schrieb Andreas Färber : > Hello, > > I get the following error: > > $ s390x-softmmu/qemu-system-s390x > qemu-system-s390x: Guest moved used index from 0 to 47802 > > Same if specifying SLES 11 SP2 Beta8 DVD .iso via -cdrom. > > First time trying it, am I missing anyth

Re: [Qemu-devel] [TestDays] s390x emulation error

2011-11-09 Thread Andreas Färber
Am 09.11.2011 23:53, schrieb Andreas Färber: > I get the following error: > > $ s390x-softmmu/qemu-system-s390x > qemu-system-s390x: Guest moved used index from 0 to 47802 This is coming from hw/virtio.c: static int virtqueue_num_heads(VirtQueue *vq, unsigned int idx) { uint16_t num_heads =

Re: [Qemu-devel] [PATCH] pci-stub: fix compile breakage with qmp

2011-11-09 Thread Alexander Graf
Am 09.11.2011 um 19:01 schrieb Andreas Färber : > Am 09.11.2011 18:57, schrieb Anthony Liguori: >> On 11/09/2011 04:27 AM, Andreas Färber wrote: >>> Am 09.11.2011 06:58, schrieb Stefan Weil: Am 09.11.2011 02:38, schrieb Alexander Graf: > Commit 79627472db3 introduced breakage in compilin

[Qemu-devel] [TestDays] s390x emulation error

2011-11-09 Thread Andreas Färber
Hello, I get the following error: $ s390x-softmmu/qemu-system-s390x qemu-system-s390x: Guest moved used index from 0 to 47802 Same if specifying SLES 11 SP2 Beta8 DVD .iso via -cdrom. First time trying it, am I missing anything? The error message is not really telling either way and should be f

[Qemu-devel] [PATCH 06/10] stdio_pclose: return -errno on error (v2)

2011-11-09 Thread Eduardo Habkost
This is what qemu_fclose() expects. Changes v1 -> v2: - On success, keep returning pclose() return value, instead of always 0. Signed-off-by: Eduardo Habkost --- savevm.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/savevm.c b/savevm.c index 6e60c18..5112d66 100644

[Qemu-devel] [PATCH 02/10] QEMUFileCloseFunc: add return value documentation (v2)

2011-11-09 Thread Eduardo Habkost
qemu_fclose() and QEMUFile->close will return -errno on error, and any positive value on success. We need the positive non-zero success values because migration-exec.c:exec_close() relies on non-zero return values to get the process exit code. Changes v1 -> v2: - Cosmetic spelling change on comm

[Qemu-devel] [PATCH 08/10] exec_close(): return -errno on errors

2011-11-09 Thread Eduardo Habkost
All qemu_fclose() callers were already changed to accept any negative value as error, so we now can change it to return -errno. When the process exits with a non-zero exit code, we return -EIO to as a fake errno value. Signed-off-by: Eduardo Habkost --- migration-exec.c |9 +++-- 1 file

[Qemu-devel] [PATCH 00/10] qemu_fclose() error handling fixes (v2)

2011-11-09 Thread Eduardo Habkost
I am not sure if this is appropriate post-freeze, I will let the maintainers decide this. Personally I think the code is more reliable with these changes, but on the other hand the only bugs it fixes are on the error paths. Changes v1 -> v2: - Patch 2: Cosmetic spelling change on comment text

[Qemu-devel] [PATCH 09/10] tcp_close(): check for close() errors too

2011-11-09 Thread Eduardo Habkost
In case close() fails, we want to report the error back. Signed-off-by: Eduardo Habkost --- migration-tcp.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/migration-tcp.c b/migration-tcp.c index 5aa742c..fd5fd56 100644 --- a/migration-tcp.c +++ b/migration-tcp.c @@

[Qemu-devel] [PATCH 10/10] unix_close(): check for close() errors too

2011-11-09 Thread Eduardo Habkost
In case close() fails, we want to report the error back. Signed-off-by: Eduardo Habkost --- migration-unix.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/migration-unix.c b/migration-unix.c index 8596353..197285c 100644 --- a/migration-unix.c +++ b/migration-unix

[Qemu-devel] [PATCH 03/10] exec_close(): accept any negative value as qemu_fclose() error

2011-11-09 Thread Eduardo Habkost
Note that we don't return the unchanged return value back yet, because we need to change all qemu_fclose() callers to accept any positive value as success. Signed-off-by: Eduardo Habkost --- migration-exec.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/migration-exec

[Qemu-devel] [PATCH 01/10] savevm: use qemu_file_set_error() instead of setting last_error directly

2011-11-09 Thread Eduardo Habkost
Some code uses qemu_file_set_error() already, so use it everywhere when setting last_error, for consistency. Signed-off-by: Eduardo Habkost --- savevm.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/savevm.c b/savevm.c index bee16c0..2dab5dc 100644 --- a/savevm.c ++

Re: [Qemu-devel] [F.A.Q.] the advantages of a shared tool/kernel Git repository, tools/perf/ and tools/kvm/

2011-11-09 Thread Anca Emanuel
"I'd even argue that that C library is obviously something the kernelshould offer as well - so klibc is the way to go and would help usfurther streamline this and keep Linux quality high." I think there is code to share. Why not ?

[Qemu-devel] [PATCH 04/10] migrate_fd_cleanup: accept any negative qemu_fclose() value as error

2011-11-09 Thread Eduardo Habkost
Also, we now return the qemu_fclose() value unchanged to the caller. For reference, the migrate_fd_cleanup() callers are the following: - migrate_fd_completed(): any negative value is considered an error, so the change is OK. - migrate_fd_error(): doesn't check the migrate_fd_cleanup() return va

[Qemu-devel] [PATCH 07/10] stdio_fclose: return -errno on errors

2011-11-09 Thread Eduardo Habkost
This is what qemu_fclose() expects. Signed-off-by: Eduardo Habkost --- savevm.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/savevm.c b/savevm.c index 5112d66..ee49288 100644 --- a/savevm.c +++ b/savevm.c @@ -244,9 +244,11 @@ static int stdio_pclose(void *opaque)

[Qemu-devel] [PATCH 05/10] qemu_fclose: return last_error if set (v2)

2011-11-09 Thread Eduardo Habkost
This will make sure no error will be missed as long as callers always check for qemu_fclose() return value. For reference, this is the complete list of qemu_fclose() callers: - exec_close(): already fixed to check for negative values, not -1 - migrate_fd_cleanup(): already fixed to consider only

Re: [Qemu-devel] [PATCH 0/3] Standardize on TCGReg for entry points

2011-11-09 Thread Richard Henderson
On 11/09/2011 12:19 PM, Stefan Weil wrote: > Did you get all needed cross packages from your host's > distribution? Which one? No. I built the compilers myself, and downloaded the relevant -devel packages from a selection of fedora and debian to install by hand into in the compiler sys-root. r~

[Qemu-devel] [PATCH] hw/pc.c: Fix use-while-uninitialized of fd_type[]

2011-11-09 Thread Peter Maydell
Fix a use-while-uninitialized of the fd_type[] array (introduced in commit 34d4260e1, noticed by Coverity). This is more theoretical than practical, since it's quite hard to get here with floppy==NULL (the qdev_try_create() of the isa-fdc device has to fail). Signed-off-by: Peter Maydell --- hw/

Re: [Qemu-devel] [PATCH 1/2] Reopen files after migration

2011-11-09 Thread Anthony Liguori
On 11/09/2011 03:10 PM, Juan Quintela wrote: Anthony Liguori wrote: On 11/09/2011 01:16 PM, Juan Quintela wrote: We need to invalidate the Read Cache on the destination, otherwise we have corruption. Easy way to reproduce it is: - create an qcow2 images - start qemu on destination of migrati

Re: [Qemu-devel] [PATCH 1/2] Reopen files after migration

2011-11-09 Thread Juan Quintela
Anthony Liguori wrote: > On 11/09/2011 01:16 PM, Juan Quintela wrote: >> We need to invalidate the Read Cache on the destination, otherwise we >> have corruption. Easy way to reproduce it is: >> >> - create an qcow2 images >> - start qemu on destination of migration (qemu -incoming tcp:...)

[Qemu-devel] [PATCH] hw/usb-net.c: Fix precedence bug when checking rndis_state

2011-11-09 Thread Peter Maydell
"!X == 2" is always false (spotted by Coverity), so the checks for whether rndis is in the correct state would never fire. Signed-off-by: Peter Maydell --- NB that although I tested that this doesn't break non-rndis usb-net, I don't have a test image that uses rndis usb-net, so treat this patch w

Re: [Qemu-devel] qemu and qemu.git -> Migration + disk stress introduces qcow2 corruptions

2011-11-09 Thread Anthony Liguori
On 11/09/2011 03:00 PM, Michael S. Tsirkin wrote: On Wed, Nov 09, 2011 at 02:22:02PM -0600, Anthony Liguori wrote: On 11/09/2011 02:18 PM, Michael S. Tsirkin wrote: On Wed, Nov 09, 2011 at 11:35:54AM -0600, Anthony Liguori wrote: On 11/09/2011 11:02 AM, Avi Kivity wrote: On 11/09/2011 06:39 P

Re: [Qemu-devel] qemu and qemu.git -> Migration + disk stress introduces qcow2 corruptions

2011-11-09 Thread Michael S. Tsirkin
On Wed, Nov 09, 2011 at 02:22:02PM -0600, Anthony Liguori wrote: > On 11/09/2011 02:18 PM, Michael S. Tsirkin wrote: > >On Wed, Nov 09, 2011 at 11:35:54AM -0600, Anthony Liguori wrote: > >>On 11/09/2011 11:02 AM, Avi Kivity wrote: > >>>On 11/09/2011 06:39 PM, Anthony Liguori wrote: > > Mig

Re: [Qemu-devel] qemu and qemu.git -> Migration + disk stress introduces qcow2 corruptions

2011-11-09 Thread Juan Quintela
"Michael S. Tsirkin" wrote: > On Wed, Nov 09, 2011 at 11:35:54AM -0600, Anthony Liguori wrote: >> On 11/09/2011 11:02 AM, Avi Kivity wrote: >> >On 11/09/2011 06:39 PM, Anthony Liguori wrote: >> >> >> >>Migration with qcow2 is not a supported feature for 1.0. Migration is >> >>only supported with

[Qemu-devel] [PATCH] hw/pxa2xx.c: Fix handling of R/WC bits in PMCR

2011-11-09 Thread Peter Maydell
Fix a bug in handling the write-one-to-clear bits in the PMCR which meant that we would always clear the bit even if the value written was a zero. Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell --- hw/pxa2xx.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) dif

[Qemu-devel] [PATCH] migration: fix detached migration with fd

2011-11-09 Thread Juan Quintela
Migration with fd uses s->mon to pass the fd. But we only assign the s->mon for !detached migration. Fix it. Once there add a comment indicating that s->mon has two uses. Bug reported by: Wen Congyang Signed-off-by: Juan Quintela CC: Wen Congyang --- migration.c | 12 ++-- 1 fi

Re: [Qemu-devel] qemu and qemu.git -> Migration + disk stress introduces qcow2 corruptions

2011-11-09 Thread Anthony Liguori
On 11/09/2011 02:18 PM, Michael S. Tsirkin wrote: On Wed, Nov 09, 2011 at 11:35:54AM -0600, Anthony Liguori wrote: On 11/09/2011 11:02 AM, Avi Kivity wrote: On 11/09/2011 06:39 PM, Anthony Liguori wrote: Migration with qcow2 is not a supported feature for 1.0. Migration is only supported wit

Re: [Qemu-devel] [PATCH 0/3] Standardize on TCGReg for entry points

2011-11-09 Thread Stefan Weil
Am 09.11.2011 19:03, schrieb Richard Henderson: This is the direction in which I believe we should fix the s390 compilation failure. I've cross-compiled --target-list=i386-softmmu for every tcg host to make sure that they all build. The second patch cannot be split into per-host patches, lest it

Re: [Qemu-devel] qemu and qemu.git -> Migration + disk stress introduces qcow2 corruptions

2011-11-09 Thread Michael S. Tsirkin
On Wed, Nov 09, 2011 at 11:35:54AM -0600, Anthony Liguori wrote: > On 11/09/2011 11:02 AM, Avi Kivity wrote: > >On 11/09/2011 06:39 PM, Anthony Liguori wrote: > >> > >>Migration with qcow2 is not a supported feature for 1.0. Migration is > >>only supported with raw images using coherent shared sto

Re: [Qemu-devel] [PATCH v2] qmp: add test tool for QMP

2011-11-09 Thread Anthony Liguori
On 11/08/2011 11:55 PM, Mark Wu wrote: Anthony wrote this quickly to aid in testing. It's similar to qmp-shell with a few important differences: 1) It is not interactive. That makes it useful for scripting. 2) qmp-shell: (QEMU) set_password protocol=vnc password=foo 3) qmp: $ qmp set_passw

Re: [Qemu-devel] [F.A.Q.] the advantages of a shared tool/kernel Git repository, tools/perf/ and tools/kvm/

2011-11-09 Thread Arnaldo Carvalho de Melo
Em Wed, Nov 09, 2011 at 02:25:09PM -0500, Jim Paris escreveu: > Arnaldo Carvalho de Melo wrote: > > Em Wed, Nov 09, 2011 at 11:40:01AM +0100, Gerd Hoffmann escreveu: > > > As far I know it is pretty much impossible to figure the > > > foreground/background colors of the terminal you are running on.

[Qemu-devel] [PATCH] hw/pl061: Remove pointless comparison of array to null

2011-11-09 Thread Peter Maydell
Remove a pointless comparison of an array to null. (There is no need to check whether s->out[i] is non-null as qemu_set_irq will do that for us.) Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell --- hw/pl061.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --

Re: [Qemu-devel] [PATCH 1/2] Reopen files after migration

2011-11-09 Thread Anthony Liguori
On 11/09/2011 01:16 PM, Juan Quintela wrote: We need to invalidate the Read Cache on the destination, otherwise we have corruption. Easy way to reproduce it is: - create an qcow2 images - start qemu on destination of migration (qemu -incoming tcp:...) - start qemu on source of migration an

Re: [Qemu-devel] qemu and qemu.git -> Migration + disk stress introduces qcow2 corruptions

2011-11-09 Thread Juan Quintela
Anthony Liguori wrote: > On 11/09/2011 11:02 AM, Avi Kivity wrote: >> On 11/09/2011 06:39 PM, Anthony Liguori wrote: >>> >>> Migration with qcow2 is not a supported feature for 1.0. Migration is >>> only supported with raw images using coherent shared storage[1]. >>> >>> [1] NFS is only coherent

Re: [Qemu-devel] qemu and qemu.git -> Migration + disk stress introduces qcow2 corruptions

2011-11-09 Thread Juan Quintela
Lucas Meneghel Rodrigues wrote: > Hi guys, here I am, reporting yet another issue with qemu. This time, > it's something that was first reported in January, and Juan proposed a > patch for it: > > http://comments.gmane.org/gmane.comp.emulators.qemu/89009 > > [PATCH 4/5] Reopen files after migratio

[Qemu-devel] [PATCH] MAINTAINERS: Delete spurious '.'

2011-11-09 Thread Peter Maydell
Signed-off-by: Peter Maydell --- If anything qualifies as a trivial patch, this does :-) MAINTAINERS |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7ee301e..b465299 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -20,7 +20,7 @@ Description

Re: [Qemu-devel] [PATCH] hw/omap_gpmc.c: Add missing 'break's to fix 8 bit NAND writes

2011-11-09 Thread Anthony Liguori
On 11/09/2011 11:42 AM, Peter Maydell wrote: Add missing 'break' statements which would have meant that writing to an 8 bit NAND device was broken. Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell Applied. Thanks. Regards, Anthony Liguori --- This is an embarrassing bug.

Re: [Qemu-devel] [PATCH] i386: derive '-cpu host' from KVM_GET_SUPPORTED_CPUID

2011-11-09 Thread Anthony Liguori
On 11/09/2011 07:44 AM, Avi Kivity wrote: The fact that a host cpu supports a feature doesn't mean that QEMU and KVM will also support it, yet -cpuid host brings host features wholesale. We need to whitelist each feature separately to make sure we support it. This patch adds KVM whitelisting (by

Re: [Qemu-devel] [PATCH] hw/omap_dss.c: Fix !-vs-~ bug in handling DISPC_CONTROL

2011-11-09 Thread Anthony Liguori
On 11/09/2011 11:20 AM, Peter Maydell wrote: Fix a bug revealed by a coverity scan (see bug 887883) which meant that we would never print the warning about unpredictable behaviour if a nonexistent overlay is enabled. Signed-off-by: Peter Maydell Applied. Thanks. Regards, Anthony Liguori -

Re: [Qemu-devel] [PATCH 1.0 v3] configure: fix detection for xattr.h on modern distributions

2011-11-09 Thread Anthony Liguori
On 11/09/2011 06:44 AM, Avi Kivity wrote: Modern distributions place xattr.h in /usr/include/sys, and fold libattr.so into libc. They also don't have an ENOATTR. Make configure detect this, and add a qemu-xattr.h file that directs the #include to the right place. Signed-off-by: Avi Kivity Ap

Re: [Qemu-devel] [PATCH] hpet: fix infinite loop in qemu_run_timers with -icount enabled

2011-11-09 Thread Anthony Liguori
On 11/08/2011 07:18 PM, Max Filippov wrote: hpet_timer timer callback rearms itself based on difference between current HPET tick counter and comparator value. Difference calculated by the hpet_calculate_diff function is limited to non-negative values. cur_tick is calculated via hpet_get_ticks t

Re: [Qemu-devel] [PATCH] win32: remove broken timers

2011-11-09 Thread Anthony Liguori
On 11/09/2011 05:46 AM, Paolo Bonzini wrote: The non-dynticks timer variations are broken, so they can be removed. Signed-off-by: Paolo Bonzini Applied. Thanks. Regards, Anthony Liguori --- qemu-timer.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/qemu-ti

Re: [Qemu-devel] [PATCH] Clean up assertion in get_boot_devices_list()

2011-11-09 Thread Anthony Liguori
On 11/08/2011 03:58 AM, Markus Armbruster wrote: g_strdup() can't fail, remove assertion. Assert its argument can't be null, because that's not obvious (add_boot_device_path() ensures it). Signed-off-by: Markus Armbruster Applied. Thanks. Regards, Anthony Liguori --- vl.c |2 +- 1

Re: [Qemu-devel] [PATCH 1.0] Replace WriteFileEx with WriteFile in qemu_create_pidfile

2011-11-09 Thread Anthony Liguori
On 11/07/2011 08:36 AM, Fabien Chouteau wrote: The function that writes pidfile for win32 uses WriteFileEx which is an asynchronous IO function. The arguments given to WriteFileEx are allocated on the stack and one of them is "in out". When the IO operation is actually executed the calling functi

[Qemu-devel] QEMU Shix board maintainer status

2011-11-09 Thread Peter Maydell
Hi; I've just noticed that QEMU's MAINTAINERS file lists the Shix board like this: # Shix # M: Magnus Damm # S: Orphan # F: hw/shix.c which doesn't seem very consistent (since it lists a maintainer but "Orphan" means "no maintainer"). Should we: (a) upgrade it to "S: Odd Fixes" (b) downgrade it

Re: [Qemu-devel] Summary of CD, DVD passthrough tests with -drive if=scsi

2011-11-09 Thread Thomas Schmitt
Hi, i reported nastily bahaving SCSI commands SEND CUE SHEET, SET STREAMING, FORMAT UNIT, READ DISC STRUCTURE, REQUEST SENSE , RESERVE TRACK. This was with -drive file=/dev/sg2,if=scsi Paolo Bonzini wrote: > I fixed all of these; [...] > The bugs were simply that QEMU did not compute the length

[Qemu-devel] [PATCH] hw/tc58128.c: Remove unnecessary check for g_malloc failure

2011-11-09 Thread Peter Maydell
Remove a check for g_malloc failing: this never happens. Also use g_malloc rather than g_malloc0 as we immediately memset the entire region and so zero-initialising it is pointless. Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell --- hw/tc58128.c |6 +- 1 files changed

[Qemu-devel] [Bug 887516] Re: VFP support reported for the PXA270

2011-11-09 Thread Benoît Canet
linux-user/elfload.c's AT_HWCAP was not reflecting cpu features. Patch Reviewed-By and posted to the mailling list. ** Changed in: qemu Status: New => Fix Released ** Changed in: qemu Assignee: (unassigned) => Benoît Canet (benoit-canet) -- You received this bug notification because

Re: [Qemu-devel] [F.A.Q.] the advantages of a shared tool/kernel Git repository, tools/perf/ and tools/kvm/

2011-11-09 Thread Jim Paris
Arnaldo Carvalho de Melo wrote: > Em Wed, Nov 09, 2011 at 11:40:01AM +0100, Gerd Hoffmann escreveu: > > Hi, > > > > > What we want to have is to have a set of distinctive colors - just > > > two (background, foreground) colors are not enough - we also need > > > colors to highlight certain inf

[Qemu-devel] [PATCH] linux-user/elfload.c: Don't memset(NULL..) if malloc() failed

2011-11-09 Thread Peter Maydell
If a malloc() in copy_elf_strings() failed we would call memset() before the "did malloc fail?" check. Fix this by moving to the glib alloc/free routines for this memory so we can use g_try_malloc0 rather than having a separate memset(). Spotted by Coverity (see bug 887883). Signed-off-by: Peter M

[Qemu-devel] [PATCH 1/2] Reopen files after migration

2011-11-09 Thread Juan Quintela
We need to invalidate the Read Cache on the destination, otherwise we have corruption. Easy way to reproduce it is: - create an qcow2 images - start qemu on destination of migration (qemu -incoming tcp:...) - start qemu on source of migration and do one install. - migrate at the end of insta

[Qemu-devel] [PATCH 2/2] drive_open: Add invalidate option for block devices

2011-11-09 Thread Juan Quintela
Linux allows to invalidate block devices. This is needed for the incoming migration part. Signed-off-by: Juan Quintela --- block.h |2 ++ block/raw-posix.c | 24 blockdev.c|8 3 files changed, 30 insertions(+), 4 deletions(-) diff -

[Qemu-devel] [RFC PATCH 0/2] Fix migration with NFS & iscsi/Fiber channel

2011-11-09 Thread Juan Quintela
Hi Some formats (like qcow2) need to "reread" its metadata after migration (notice that after discussing it with Kevin, it looks like even raw needs this re-read because it can be resized nowadays). Notice that this is different of the consistence issues that we used to have and fixed on NFS with

[Qemu-devel] [PATCH] hw/lan9118.c: Add missing 'break' to fix buffer overrun

2011-11-09 Thread Peter Maydell
Add a missing 'break' statement to fix a buffer overrun when executing the EEPROM write-all command. Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell --- hw/lan9118.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/lan9118.c b/hw/lan9118.c index 634b

[Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch

2011-11-09 Thread Pavel Borzenkov
When SDL support is disabled, there is no way to build QEMU without Cocoa support on MacOS X. This patch adds '--disable-cocoa' switch and allows to build QEMU without both SDL and Cocoa frontends. Signed-off-by: Pavel Borzenkov --- configure | 11 ++- 1 files changed, 6 insertions(+),

Re: [Qemu-devel] [PATCH 0/3] Standardize on TCGReg for entry points

2011-11-09 Thread Andreas Färber
Am 09.11.2011 19:03, schrieb Richard Henderson: > This is the direction in which I believe we should fix the s390 > compilation failure. I've cross-compiled --target-list=i386-softmmu > for every tcg host to make sure that they all build. Thanks Richard, I was planning to do the same thing. :) 1

[Qemu-devel] [PATCH] hw/omap_intc.c: Avoid crash on access to nonexistent banked registers

2011-11-09 Thread Peter Maydell
Avoid a crash due to null pointer dereference if a guest attempts to access banked registers for a nonexistent bank. Spotted by Coverity (see bug 887883). Signed-off-by: Peter Maydell --- hw/omap_intc.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/omap_intc.c

Re: [Qemu-devel] [PATCH 1.0 v2] configure: fix detection for xattr.h on modern distributions

2011-11-09 Thread Stefan Weil
Am 09.11.2011 11:33, schrieb Avi Kivity: Modern distributions place xattr.h in /usr/include/sys, and fold libattr.so into libc. They also don't have an ENOATTR. Make configure detect this, and add a qemu-xattr.h file that directs the #include to the right place. Signed-off-by: Avi Kivity ---

Re: [Qemu-devel] [PATCH] i386: derive '-cpu host' from KVM_GET_SUPPORTED_CPUID

2011-11-09 Thread Sasha Levin
On Wed, 2011-11-09 at 20:00 +0200, Avi Kivity wrote: > On 11/09/2011 07:56 PM, Anthony Liguori wrote: > > On 11/09/2011 07:44 AM, Avi Kivity wrote: > >> The fact that a host cpu supports a feature doesn't mean that QEMU > >> and KVM > >> will also support it, yet -cpuid host brings host features wh

Re: [Qemu-devel] [PATCH] win32: remove broken timers

2011-11-09 Thread Stefan Weil
Am 09.11.2011 12:46, schrieb Paolo Bonzini: The non-dynticks timer variations are broken, so they can be removed. Signed-off-by: Paolo Bonzini --- qemu-timer.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index f11a28d..cd026c6 100644 --- a

Re: [Qemu-devel] [PATCH 4/5] integratorcp: convert integratorcm to VMState

2011-11-09 Thread Avi Kivity
On 11/09/2011 07:43 PM, Anthony Liguori wrote: >> Every MemoryRegion field in qemu today is either immutable or slaved to >> another register. We could have a system to annotate every field, but >> it's pointless. > > > If I'm writing a device and doing save/restore and I happen to use a > MemoryR

[Qemu-devel] [PATCH 2/3] tcg: Use TCGReg for standard tcg-target entry points.

2011-11-09 Thread Richard Henderson
Including tcg_out_ld, tcg_out_st, tcg_out_mov, tcg_out_movi. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c | 13 +++-- tcg/hppa/tcg-target.c | 12 ++-- tcg/i386/tcg-target.c | 13 +++-- tcg/ia64/tcg-target.c | 12 ++-- tcg/mips/tcg-target.

[Qemu-devel] [PATCH 3/3] tcg-sparc: Fix set-but-not used warnings.

2011-11-09 Thread Richard Henderson
In both cases, val is computed, but then not used in the subsequent line, which then re-computes the quantity in a different type (int32_t vs unsigned long). Keep the computation type that's been working so far. Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.c |4 1 files ch

[Qemu-devel] [PATCH 1/3] tcg: Standardize on TCGReg as the enum for hard registers

2011-11-09 Thread Richard Henderson
Most targets did not name the enum; tci used TCGRegister. Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.h |4 ++-- tcg/hppa/tcg-target.h |4 ++-- tcg/i386/tcg-target.h |4 ++-- tcg/ia64/tcg-target.h |4 ++-- tcg/mips/tcg-target.h |4 ++-- tcg/ppc/tcg-target.h

[Qemu-devel] [PATCH 0/3] Standardize on TCGReg for entry points

2011-11-09 Thread Richard Henderson
This is the direction in which I believe we should fix the s390 compilation failure. I've cross-compiled --target-list=i386-softmmu for every tcg host to make sure that they all build. The second patch cannot be split into per-host patches, lest it introduce regressions on the way to fixing them.

Re: [Qemu-devel] [RFC PATCH] vfio: VFIO Driver core framework

2011-11-09 Thread Alex Williamson
On Wed, 2011-11-09 at 02:11 -0600, Christian Benvenuti (benve) wrote: > I have not gone through the all patch yet, but here are > my first comments/questions about the code in vfio_main.c > (and pci/vfio_pci.c). Thanks! Comments inline... > > -Original Message- > > From: Alex Williamson

  1   2   3   >