Re: [Qemu-devel] [PATCH V2] Add -f option to qemu-nbd

2011-11-18 Thread Paolo Bonzini
On 11/18/2011 02:25 AM, Chun Yan Liu wrote: Yes. I have tested using same device twice as described in my previous mail. Without lock: If issuing "qemu-nbd -c /dev/nbd0 disk.img" and "qemu-nbd -c /dev/nbd0 disk1.img" almost at the same time, both can pass nbd_init() and get to nbd_client(), the

Re: [Qemu-devel] Windows 7 shutdown causes BSOD

2011-11-18 Thread hkran
On 11/17/2011 07:08 PM, Gleb Natapov wrote: On Thu, Nov 17, 2011 at 06:55:14PM +0800, hkran wrote: On 11/17/2011 02:37 PM, Gleb Natapov wrote: On Thu, Nov 17, 2011 at 02:29:47PM +0800, hkran wrote: On 11/16/2011 06:51 PM, Gleb Natapov wrote: On Wed, Nov 16, 2011 at 10:48:15AM +, Stefan Ha

[Qemu-devel] [PATCH] block: Use bdrv functions to replace file operation in qcow.c

2011-11-18 Thread Li Zhi Hui
Since common file operation functions lack of error detection and use much more I/O syscalls, so change them to bdrv series functions and reduce I/O request. Signed-off-by: Li Zhi Hui --- block/qcow.c | 42 +++--- 1 files changed, 23 insertions(+), 19 dele

Re: [Qemu-devel] [v9 Patch 1/6 - updated]Qemu: Enhance "info block" to display host cache setting

2011-11-18 Thread supriya kannery
Luiz Capitulino wrote: On Fri, 11 Nov 2011 15:39:29 +0530 Supriya Kannery wrote: On 11/11/2011 12:17 PM, Supriya Kannery wrote: hostcache gets added to qapi-types.h from the change done in qapi-schema.json. Hence above change has to be ignored. Pls find updated patch. git am says thi

Re: [Qemu-devel] [v9 Patch 2/6]Qemu: Error classes for file reopen and data sync failure

2011-11-18 Thread supriya kannery
Luiz Capitulino wrote: On Fri, 11 Nov 2011 12:17:35 +0530 Supriya Kannery wrote: New error classes defined for file reopen failure and data sync error Signed-off-by: Supriya Kannery --- qerror.c |8 qerror.h |6 ++ 2 files changed, 14 insertions(+) Index: qemu/qerr

Re: [Qemu-devel] [PATCH V4 00/10] Xen PCI Passthrough

2011-11-18 Thread Stefano Stabellini
I start to be happy with this series; I welcome everyone that has an opinion on PCI passthrough on Xen to give it a read. Thanks, Stefano On Thu, 17 Nov 2011, Anthony PERARD wrote: > > Hi all, > > This patch series introduces the PCI passthrough for Xen. > > First, we have HostPCIDevice that

Re: [Qemu-devel] [PATCH] block: Use bdrv functions to replace file operation in qcow.c

2011-11-18 Thread Stefan Hajnoczi
On Fri, Nov 18, 2011 at 9:12 AM, Li Zhi Hui wrote: > +    tmp = g_malloc0(sizeof(uint64_t)*l1_size); > +    ret = bdrv_pwrite(qcow_bs, header_size, tmp, sizeof(uint64_t)*l1_size); > +    g_free(tmp); > +    if (ret != sizeof(uint64_t)*l1_size) { > +        goto exit; >     } qemu-img create -f qc

Re: [Qemu-devel] [v9 Patch 3/6]Qemu: Cmd "block_set_hostcache" for dynamic cache change

2011-11-18 Thread supriya kannery
Luiz Capitulino wrote: On Fri, 11 Nov 2011 12:17:48 +0530 Supriya Kannery wrote: + +ret = bdrv_open(bs, bs->filename, bdrv_flags, drv); +if (ret < 0) { +/* Reopen failed. Try to open with original flags */ +qerror_report(QERR_REOPEN_FILE_FAILED, bs->filename); +

Re: [Qemu-devel] [PATCH] block: Use bdrv functions to replace file operation in qcow.c

2011-11-18 Thread Paolo Bonzini
On 11/18/2011 11:59 AM, Stefan Hajnoczi wrote: +tmp = g_malloc0(sizeof(uint64_t)*l1_size); > +ret = bdrv_pwrite(qcow_bs, header_size, tmp, sizeof(uint64_t)*l1_size); > +g_free(tmp); > +if (ret != sizeof(uint64_t)*l1_size) { > +goto exit; > } That means 400 MB of

Re: [Qemu-devel] wiki summary

2011-11-18 Thread Barak Azulay
On Thursday 17 November 2011 21:58:03 Michael Roth wrote: > On 11/17/2011 10:34 AM, Barak Azulay wrote: > > On Thursday 17 November 2011 02:48:50 Michael Roth wrote: > >> I've tried to summarize the pros/cons, points, and proposals outlined in > >> this thread at the following wiki: > >> > >> http

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Fixing some spelling in docs/libcacard.txt

2011-11-18 Thread Stefan Hajnoczi
On Tue, Nov 15, 2011 at 11:57:14AM +, matthias@googlemail.com wrote: > From: Matthias Brugger > > > Signed-off-by: Matthias Brugger > --- > docs/libcacard.txt | 12 ++-- > 1 files changed, 6 insertions(+), 6 deletions(-) Thanks, applied to the trivial patches tree: http://re

Re: [Qemu-devel] [Qemu-trivial] [PATCH] monitor: Fix file_completion() to check for stat() failure

2011-11-18 Thread Stefan Hajnoczi
On Wed, Nov 16, 2011 at 03:43:47PM +0100, Markus Armbruster wrote: > stat() can fail for a file name just read with readdir(). Easiest way > to trigger is a dangling symbolic link --- look ma, no race! When it > fails, file_completion() uses sb.st_mode uninitialized. If the > directory bit happe

Re: [Qemu-devel] [Qemu-trivial] [PATCH] gdbstub: Fix GDBRegisterState memory leak and use g_new0 to allocate it

2011-11-18 Thread Stefan Hajnoczi
On Thu, Nov 17, 2011 at 07:22:58PM +0100, Stefan Weil wrote: > cppcheck reported a memory leak which is fixed here. > > I also replaced the corresponding g_malloc0 by g_new0 because > that helps reviewers, and it is required by latest recommendations > anyway. > > Signed-off-by: Stefan Weil > --

Re: [Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-18 Thread Stefano Stabellini
On Tue, 15 Nov 2011, Stefano Stabellini wrote: > On Tue, 15 Nov 2011, Anthony Liguori wrote: > > On 11/15/2011 08:51 AM, stefano.stabell...@eu.citrix.com wrote: > > > From: Stefano Stabellini > > > > > > Xen doesn't need full RTC emulation in Qemu because the RTC is already > > > emulated by the hy

Re: [Qemu-devel] Memory sync algorithm during migration

2011-11-18 Thread Oliver Hookins
On Tue, Nov 15, 2011 at 11:47:58AM +0100, ext Juan Quintela wrote: > Takuya Yoshikawa wrote: > > Adding qemu-devel ML to CC. > > > > Your question should have been sent to qemu-devel ML because the logic > > is implemented in QEMU, not KVM. > > > > (2011/11/11 1:35), Oliver Hookins wrote: > >> Hi,

Re: [Qemu-devel] [v9 Patch 2/6]Qemu: Error classes for file reopen and data sync failure

2011-11-18 Thread Luiz Capitulino
On Fri, 18 Nov 2011 14:59:40 +0530 supriya kannery wrote: > Luiz Capitulino wrote: > > On Fri, 11 Nov 2011 12:17:35 +0530 > > Supriya Kannery wrote: > > > > > >> New error classes defined for file reopen failure and data > >> sync error > >> > >> Signed-off-by: Supriya Kannery > >> > >> ---

Re: [Qemu-devel] [PATCH 1.0 v2] scsi: fix fw path

2011-11-18 Thread Kevin Wolf
Am 15.11.2011 17:36, schrieb Paolo Bonzini: > The pre-1.0 firmware path for SCSI devices already included the LUN > using the suffix argument to add_boot_device_path. I missed that when > making channel and LUN customizable. Avoid that it is included twice, and > convert the colons to commas for

Re: [Qemu-devel] [PATCH 1.0] scsi-disk: guess geometry

2011-11-18 Thread Kevin Wolf
Am 15.11.2011 16:57, schrieb Paolo Bonzini: > Old operating systems rely on correct geometry to convert from CHS > addresses to LBA. Providing correct data is necessary for them to boot. > > Signed-off-by: Paolo Bonzini > --- > This fixes booting the FreeDOS image on bochs.sf.net with >

Re: [Qemu-devel] hostfwd_add and -netdev user

2011-11-18 Thread Jan Kiszka
On 2011-11-16 08:07, Markus Armbruster wrote: > Maybe I'm missing something, but it looks like hostfwd_add doesn't fully > work with -netdev. > > Command definition from hmp-commands.hx: > > { > .name = "hostfwd_add", > .args_type = "arg1:s,arg2:s?,arg3:s?", > .

Re: [Qemu-devel] [PATCH] slirp: Clean up net_slirp_hostfwd_remove()'s use of get_str_sep()

2011-11-18 Thread Jan Kiszka
On 2011-11-16 12:45, Markus Armbruster wrote: > get_str_sep() can fail, but net_slirp_hostfwd_remove() doesn't check. > Works, because it initializes buf[] to "", which get_str_sep() doesn't > touch when it fails. Coverity doesn't like it, and neither do I. > > Change it to work exactly like slir

Re: [Qemu-devel] [RFC] dump memory when host pci device is used by guest

2011-11-18 Thread Jan Kiszka
On 2011-11-16 14:29, Dave Anderson wrote: > > > - Original Message - >> Hi, all >> >> 'virsh dump' can not work when host pci device is used by guest. We have >> discussed this issue here: >> http://lists.nongnu.org/archive/html/qemu-devel/2011-10/msg00736.html >> >> We have determined to

Re: [Qemu-devel] [PATCH] virtio-blk: fix cross-endian config space

2011-11-18 Thread Kevin Wolf
Am 15.11.2011 12:07, schrieb Paolo Bonzini: > Signed-off-by: Paolo Bonzini > --- > hw/virtio-blk.c |6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c > index 01aeb28..4a15f0c 100644 > --- a/hw/virtio-blk.c > +++ b/hw/virtio-blk.c

Re: [Qemu-devel] [PATCH v2 3/6] scsi: fix parsing of allocation length field

2011-11-18 Thread Kevin Wolf
Am 14.11.2011 14:31, schrieb Paolo Bonzini: > - several MMC commands were parsed wrong by QEMU because their allocation > length/parameter list length is placed in a non-standard position in > the CDB (i.e. it is different from most commands with the same value in > bits 5-7). > > - SEND VOLUME TA

Re: [Qemu-devel] hostfwd_add and -netdev user

2011-11-18 Thread Markus Armbruster
Jan Kiszka writes: > On 2011-11-16 08:07, Markus Armbruster wrote: >> Maybe I'm missing something, but it looks like hostfwd_add doesn't fully >> work with -netdev. >> >> Command definition from hmp-commands.hx: >> >> { >> .name = "hostfwd_add", >> .args_type = "arg1:

Re: [Qemu-devel] [PATCH v2 0/6] scsi/atapi: MMC fixes

2011-11-18 Thread Kevin Wolf
Am 14.11.2011 14:31, schrieb Paolo Bonzini: > This patch includes a bunch of fixes for problems reported by Thomas > Schmitt. He tested all but the sixth over the weekend; the sixth patch > replaces http://permalink.gmane.org/gmane.comp.emulators.qemu/124794 > which in his testing was unreliable.

Re: [Qemu-devel] hostfwd_add and -netdev user

2011-11-18 Thread Jan Kiszka
On 2011-11-18 11:07, Markus Armbruster wrote: > Jan Kiszka writes: > >> On 2011-11-16 08:07, Markus Armbruster wrote: >>> Maybe I'm missing something, but it looks like hostfwd_add doesn't fully >>> work with -netdev. >>> >>> Command definition from hmp-commands.hx: >>> >>> { >>> .nam

Re: [Qemu-devel] [0/5] Assorted small pseries bug fixes

2011-11-18 Thread Alexander Graf
On 14.11.2011, at 04:18, David Gibson wrote: > This series contains a number of small bugfixes for the pseries > machine. > Thanks, applied all to ppc-next and ppc-1.0. Alex

Re: [Qemu-devel] [Qemu-ppc] [PATCH] pseries: Fix qdev.id handling in the VIO bus code

2011-11-18 Thread Alexander Graf
On 16.11.2011, at 06:25, David Gibson wrote: > On Wed, Nov 16, 2011 at 03:53:13PM +1100, David Gibson wrote: >> From: Michael Ellerman >> >> When the user creates a device on the command line with -device, they >> can specify the id, using id=foo. Currently the VIO bus code overwrites >> this i

Re: [Qemu-devel] [RFC] Add a .mailmap to map pre-git-conversion authors to friendly names

2011-11-18 Thread Andreas Färber
Am 17.11.2011 19:10, schrieb Peter Maydell: > ...nobody cares at all either way? (in which case we should commit > it for my personal benefit if nothing else ;-)) Had a brief look at it, but didn't check the SVN "email addresses". I like the idea in general. > On 26 October 2011 18:36, Peter Mayd

Re: [Qemu-devel] [PATCH 1.0 v2] scsi: fix fw path

2011-11-18 Thread Andreas Färber
Am 18.11.2011 13:35, schrieb Kevin Wolf: > Am 15.11.2011 17:36, schrieb Paolo Bonzini: >> The pre-1.0 firmware path for SCSI devices already included the LUN >> using the suffix argument to add_boot_device_path. I missed that when >> making channel and LUN customizable. Avoid that it is included

Re: [Qemu-devel] [PATCH v2 3/6] scsi: fix parsing of allocation length field

2011-11-18 Thread Paolo Bonzini
On 11/18/2011 02:07 PM, Kevin Wolf wrote: > -cmd->xfer = ldl_be_p(&buf[10]); > +cmd->xfer = ldl_be_p(&buf[10])& 0xULL; Makes me wonder why we don't have an unsigned version of ldl_be_p... Yes, that was on my list for 1.1. Paolo

Re: [Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-18 Thread Anthony Liguori
On 11/18/2011 05:46 AM, Stefano Stabellini wrote: On Tue, 15 Nov 2011, Stefano Stabellini wrote: On Tue, 15 Nov 2011, Anthony Liguori wrote: On 11/15/2011 08:51 AM, stefano.stabell...@eu.citrix.com wrote: From: Stefano Stabellini Xen doesn't need full RTC emulation in Qemu because the RTC is

Re: [Qemu-devel] [PATCH 1.0 v2] scsi: fix fw path

2011-11-18 Thread Paolo Bonzini
On 11/18/2011 02:36 PM, Andreas Färber wrote: Am 18.11.2011 13:35, schrieb Kevin Wolf: Am 15.11.2011 17:36, schrieb Paolo Bonzini: The pre-1.0 firmware path for SCSI devices already included the LUN using the suffix argument to add_boot_device_path. I missed that when making channel and LUN cu

[Qemu-devel] [PATCH 9/9] scsi-block: always use SG_IO for MMC devices

2011-11-18 Thread Kevin Wolf
From: Paolo Bonzini CD burning messes up the state of the host page cache and host block device. Just pass all operations down to the device, even though that might have slightly worse performance. Everything else just is not reliable in combination with burning. Reported-by: Thomas Schmitt S

[Qemu-devel] Avoiding memory API conversion races

2011-11-18 Thread Benoît Canet
The following files still contains references to cpu_register_io_memory. hw/bonito.c hw/lm32_sys.c hw/lm32_timer.c hw/lm32_uart.c hw/mcf5206.c hw/mcf_fec.c hw/mcf_intc.c hw/mcf_uart.c hw/omap2.c hw/omap_dma.c hw/omap_dss.c hw/omap_gpio.c hw/omap.h hw/omap_i2c.c hw/omap_l4.c hw/omap_lcdc.c hw/omap_

[Qemu-devel] Guest floppy regression hits qemu-kvm, qemu is not affected

2011-11-18 Thread Lucas Meneghel Rodrigues
Hi guys, Today during the last 'sanity' qemu-kvm testing, we've noticed a recurring problem: guest OS does not see the floppy, making the windows installs time out. This problem has been extensively discussed on qemu and qemu is fine here, problem is specific with qemu-kvm. http://comments.g

[Qemu-devel] [PATCH 3/9] scsi-disk: guess geometry

2011-11-18 Thread Kevin Wolf
From: Paolo Bonzini Old operating systems rely on correct geometry to convert from CHS addresses to LBA. Providing correct data is necessary for them to boot. Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hw/scsi-disk.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(

Re: [Qemu-devel] [PATCH 1.0 v2] scsi: fix fw path

2011-11-18 Thread Kevin Wolf
Am 18.11.2011 14:59, schrieb Paolo Bonzini: > On 11/18/2011 02:36 PM, Andreas Färber wrote: >> Am 18.11.2011 13:35, schrieb Kevin Wolf: >>> Am 15.11.2011 17:36, schrieb Paolo Bonzini: The pre-1.0 firmware path for SCSI devices already included the LUN using the suffix argument to add_boot

Re: [Qemu-devel] [PATCH 1.0 v2] scsi: fix fw path

2011-11-18 Thread Paolo Bonzini
On 11/18/2011 03:10 PM, Kevin Wolf wrote: Whatever you think is best. I already included the other patch in the pull request, so any other change would have to be on top. Ok, I'll put together a formal patch today and test it with seabios. Paolo

Re: [Qemu-devel] wiki summary

2011-11-18 Thread Adam Litke
On Fri, Nov 18, 2011 at 01:25:04PM +0200, Barak Azulay wrote: > On Thursday 17 November 2011 21:58:03 Michael Roth wrote: > > On 11/17/2011 10:34 AM, Barak Azulay wrote: > > > On Thursday 17 November 2011 02:48:50 Michael Roth wrote: > > >> I've tried to summarize the pros/cons, points, and proposa

Re: [Qemu-devel] Avoiding memory API conversion races

2011-11-18 Thread Andreas Färber
Am 18.11.2011 15:05, schrieb Benoît Canet: > > The following files still contains references to cpu_register_io_memory. > hw/openpic.c > hw/ppc4xx_pci.c > hw/ppce500_pci.c > hw/prep_pci.c > > I'll do the following leaving omap to Peter and the rest to Avi. Is this for 1.0 or 1.1? If the latter,

Re: [Qemu-devel] [PATCH 2/8] qcow2: Return real error code in qcow2_write_snapshots

2011-11-18 Thread Stefan Hajnoczi
On Thu, Nov 17, 2011 at 3:13 PM, Kevin Wolf wrote: > -    /* update the various header fields */ > +    /* > +     * Update the header to point to the new snapshot table. This requires > the > +     * new table and its refcounts to be stable on disk. > +     * > +     * FIXME This should be done

[Qemu-devel] [PATCH 5/9] scsi: update list of commands

2011-11-18 Thread Kevin Wolf
From: Paolo Bonzini Add more commands and their names, and remove SEEK(6) which is obsolete. Instead, use SET_CAPACITY which is still in SSC. Tested-by: Thomas Schmitt Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hw/scsi-bus.c | 25 +++-- hw/scsi-defs.h |

Re: [Qemu-devel] Avoiding memory API conversion races

2011-11-18 Thread Benoît Canet
I believe it's 1.1. 2011/11/18 Andreas Färber > Am 18.11.2011 15:05, schrieb Benoît Canet: > > > > The following files still contains references to cpu_register_io_memory. > > > hw/openpic.c > > hw/ppc4xx_pci.c > > hw/ppce500_pci.c > > hw/prep_pci.c > > > > I'll do the following leaving omap to

Re: [Qemu-devel] wiki summary

2011-11-18 Thread Michael Roth
On 11/18/2011 05:25 AM, Barak Azulay wrote: On Thursday 17 November 2011 21:58:03 Michael Roth wrote: On 11/17/2011 10:34 AM, Barak Azulay wrote: On Thursday 17 November 2011 02:48:50 Michael Roth wrote: I've tried to summarize the pros/cons, points, and proposals outlined in this thread at th

[Qemu-devel] [PATCH 8/9] scsi: pass down REQUEST SENSE to the device when there is no stored sense

2011-11-18 Thread Kevin Wolf
From: Paolo Bonzini This will let scsi-block/scsi-generic report progress on long operations. Reported-by: Thomas Schmitt Tested-by: Thomas Schmitt Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hw/scsi-bus.c |4 +--- hw/scsi-disk.c |8 ++-- hw/scsi.h |2 ++

Re: [Qemu-devel] [RFC] Add a .mailmap to map pre-git-conversion authors to friendly names

2011-11-18 Thread Peter Maydell
On 18 November 2011 13:30, Andreas Färber wrote: > Am 17.11.2011 19:10, schrieb Peter Maydell: >>> +Aurelien Jarno aurel32 >>> >>> +Blue Swirl blueswir1 >>> >>> +Anthony Liguori aliguori >>> >>> +Edgar E. Iglesias edgar_igl >>> >>> +malc malc >>> +Paul Brook pbrook >>> >>> +Andrze

Re: [Qemu-devel] Avoiding memory API conversion races

2011-11-18 Thread Peter Maydell
2011/11/18 Benoît Canet : > I'll do the following leaving omap to Peter and the rest to Avi. My schedule's looking pretty stuffed full so I'm not sure I'll have much or any time for omap in the next three months. I'll see if I can squeeze out some time for doing this conversion, but at some point

[Qemu-devel] [PATCH 2/9] scsi: fix fw path

2011-11-18 Thread Kevin Wolf
From: Paolo Bonzini The pre-1.0 firmware path for SCSI devices already included the LUN using the suffix argument to add_boot_device_path. I missed that when making channel and LUN customizable. Avoid that it is included twice, and convert the colons to commas for consistency with other kinds o

[Qemu-devel] qemu & kernel :address generated are non-uniform

2011-11-18 Thread sparsh mittal
Hello I am using marss with qemu, but this question is related to qemu & kernel. When I use: qemu-system-x86_64 -m 4G myImage.img and print physical addresses that are passed to cache hierarchy, I see that the physical addresses are not in uniform range: for example: GBrange numberOfAddresses 0

[Qemu-devel] [PATCH 4/9] atapi: kill MODE SENSE(6), fix MODE SENSE(10)

2011-11-18 Thread Kevin Wolf
From: Paolo Bonzini Mode page 2A of emulated ATAPI DVD-ROM should have page length 0x14 like SCSI CD-ROM, rather than 0x12. Mode page length is off by 8, as it should contain the length of the payload after the first two bytes. MODE SENSE(6) should be thrown out of ATAPI DVD-ROM emulation. It

[Qemu-devel] [PATCH 6/9] scsi: fix parsing of allocation length field

2011-11-18 Thread Kevin Wolf
From: Paolo Bonzini - several MMC commands were parsed wrong by QEMU because their allocation length/parameter list length is placed in a non-standard position in the CDB (i.e. it is different from most commands with the same value in bits 5-7). - SEND VOLUME TAG length was multiplied by 40 whic

Re: [Qemu-devel] [Xen-devel] [PATCH V4 04/10] configure: Introduce --enable-xen-pci-passthrough.

2011-11-18 Thread Konrad Rzeszutek Wilk
On Thu, Nov 17, 2011 at 03:17:07PM +, Anthony PERARD wrote: > Signed-off-by: Anthony PERARD > --- > Makefile.target |2 ++ > configure | 25 + > 2 files changed, 27 insertions(+), 0 deletions(-) > > diff --git a/Makefile.target b/Makefile.target > index a1

Re: [Qemu-devel] [PATCH 1/4] xen: introduce mc146818rtcxen

2011-11-18 Thread Anthony Liguori
On 11/18/2011 05:46 AM, Stefano Stabellini wrote: On Tue, 15 Nov 2011, Stefano Stabellini wrote: On Tue, 15 Nov 2011, Anthony Liguori wrote: On 11/15/2011 08:51 AM, stefano.stabell...@eu.citrix.com wrote: From: Stefano Stabellini Xen doesn't need full RTC emulation in Qemu because the RTC is

[Qemu-devel] [PATCH 1/9] Documentation: Add section about iSCSI LUNS to qemu-doc

2011-11-18 Thread Kevin Wolf
From: Ronnie Sahlberg Add a new section about using iSCSI LUNs with qemu and provide a short example on how to set up a target and access it using the built-in initiator Signed-off-by: Ronnie Sahlberg Signed-off-by: Kevin Wolf --- qemu-doc.texi | 56 +

[Qemu-devel] [SeaBIOS PATCH] usb: fix boot paths

2011-11-18 Thread Paolo Bonzini
The fw paths for USB devices that SeaBIOS computes are off-by-one, because QEMU builds those paths with a numbering that starts from one (see usb_fill_port and usb_hub_initfn in QEMU). Fix that so that the numbering agrees. --- src/boot.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions

Re: [Qemu-devel] [PATCH] block: Use bdrv functions to replace file operation in qcow.c

2011-11-18 Thread Stefan Hajnoczi
On Fri, Nov 18, 2011 at 11:10 AM, Paolo Bonzini wrote: > On 11/18/2011 11:59 AM, Stefan Hajnoczi wrote: >> >> +    tmp = g_malloc0(sizeof(uint64_t)*l1_size); >> >  +    ret = bdrv_pwrite(qcow_bs, header_size, tmp, >> > sizeof(uint64_t)*l1_size); >> >  +    g_free(tmp); >> >  +    if (ret != sizeof

[Qemu-devel] [PULL 0/9] Block patches for 1.0

2011-11-18 Thread Kevin Wolf
The following changes since commit 3f5bd4e1b874590d3d76e031530799a4610da6dc: Update version to 1.0-rc2 (2011-11-14 11:26:32 -0600) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Paolo Bonzini (8): scsi: fix fw path scsi-disk: guess geometry

Re: [Qemu-devel] [Xen-devel] [PATCH V4 05/10] Introduce HostPCIDevice to access a pci device on the host.

2011-11-18 Thread Konrad Rzeszutek Wilk
On Thu, Nov 17, 2011 at 03:17:08PM +, Anthony PERARD wrote: > Signed-off-by: Anthony PERARD > --- > Makefile.target |1 + > hw/host-pci-device.c | 279 > ++ > hw/host-pci-device.h | 75 ++ > 3 files changed, 355 insertio

[Qemu-devel] [PATCH 7/9] scsi: remove block descriptors from CDs

2011-11-18 Thread Kevin Wolf
From: Paolo Bonzini Reported-by: Thomas Schmitt Tested-by: Thomas Schmitt Signed-off-by: Paolo Bonzini Signed-off-by: Kevin Wolf --- hw/scsi-disk.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c index 0b06fef..9dd2be8 100644 --- a/h

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

2011-11-18 Thread Andreas Färber
Am 12.11.2011 11:08, schrieb Andreas Färber: > Am 10.11.2011 12:29, schrieb Andreas Färber: >> Am 10.11.2011 11:32, schrieb Alexander Graf: >>> >>> On 10.11.2011, at 10:53, Andreas Färber wrote: >>> Is there a known issue with running multiple instances of qemu-system-s390x? I got a hang

[Qemu-devel] Compile Error 1.0-rc2

2011-11-18 Thread erik . rull
Hi all, when compiling the 1.0-rc2, I get the following error: CClibhw64/9pfs/virtio-9p.o /home/erik/qemu-1.0-rc2/hw/9pfs/virtio-9p.c: In function 'dotl_to_at_flags': /home/erik/qemu-1.0-rc2/hw/9pfs/virtio-9p.c:81: error: 'AT_REMOVEDIR' undeclared (first use in this function) /home/erik/qem

Re: [Qemu-devel] [PATCH] slirp: Clean up net_slirp_hostfwd_remove()'s use of get_str_sep()

2011-11-18 Thread Stefan Hajnoczi
On Wed, Nov 16, 2011 at 03:45:59PM +0100, Markus Armbruster wrote: > get_str_sep() can fail, but net_slirp_hostfwd_remove() doesn't check. > Works, because it initializes buf[] to "", which get_str_sep() doesn't > touch when it fails. Coverity doesn't like it, and neither do I. > > Change it to w

[Qemu-devel] [PATCH 0/4] misc block fixes

2011-11-18 Thread Paolo Bonzini
See individual patches, all for 1.0. Paolo Bonzini (4): virtio-blk: fix cross-endian config space usb-msd: do not register twice in the boot order scsi: fix fw path scsi-generic: add as boot device hw/pci-hotplug.c |3 ++- hw/scsi-bus.c | 11 +++ hw/scsi-disk.c|

[Qemu-devel] [PATCH 1/4] virtio-blk: fix cross-endian config space

2011-11-18 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- v1->v2: do not rely on blkcfg since it is now guest-endian hw/virtio-blk.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/virtio-blk.c b/hw/virtio-blk.c index 01aeb28..0d6f53b 100644 --- a/hw/virtio-blk.c +++ b/hw/virtio

[Qemu-devel] [PATCH 3/4] scsi: fix fw path

2011-11-18 Thread Paolo Bonzini
The pre-1.0 firmware path for SCSI devices already included the LUN using the suffix argument to add_boot_device_path. Avoid that it is included twice, and, for consistency with the OpenFirmware spec: 1) move the "channel" to a separate device path; 2) convert the colons to commas; 3) use hex for

[Qemu-devel] [PATCH 2/4] usb-msd: do not register twice in the boot order

2011-11-18 Thread Paolo Bonzini
USB mass storage devices are registered twice in the boot order. To avoid having to keep the two paths in sync, pass the bootindex property down to the scsi-disk device and let it register itself. Signed-off-by: Paolo Bonzini --- hw/pci-hotplug.c |3 ++- hw/scsi-bus.c|7 +-- hw/s

[Qemu-devel] [PATCH 4/4] scsi-generic: add as boot device

2011-11-18 Thread Paolo Bonzini
There is no reason why a scsi-generic device cannot boot if it has the right type, and indeed it provides already a bootindex property. So register those devices too. Signed-off-by: Paolo Bonzini --- hw/scsi-generic.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/h

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

2011-11-18 Thread Alexander Graf
On 10.11.2011, at 10:32, Andreas Färber wrote: > 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 > > Now with -kernel and -drive if=virtio on s390-next I got the follo

Re: [Qemu-devel] [SeaBIOS PATCH] usb: fix boot paths

2011-11-18 Thread Paolo Bonzini
On 11/18/2011 03:59 PM, Paolo Bonzini wrote: The fw paths for USB devices that SeaBIOS computes are off-by-one, because QEMU builds those paths with a numbering that starts from one (see usb_fill_port and usb_hub_initfn in QEMU). Fix that so that the numbering agrees. Signed-off-by: Paolo Bonz

[Qemu-devel] [PATCH] console: Fix segfault on screendump without VGA adapter

2011-11-18 Thread Alexander Graf
When trying to create a screen dump without having any VGA adapter inside the guest, QEMU segfaults. This is because it's trying to switch back to the "previous" screen it was on before dumping the VGA screen. Unfortunately, in my case there simply is no previous screen so it accesses a NULL point

[Qemu-devel] [PATCH rebased 3/4] scsi: fix fw path

2011-11-18 Thread Paolo Bonzini
The pre-1.0 firmware path for SCSI devices already included the LUN using the suffix argument to add_boot_device_path. Avoid that it is included twice, and convert the colons to commas for consistency with other kinds of devices Signed-off-by: Paolo Bonzini --- hw/scsi-bus.c |4 ++-- 1 file

Re: [Qemu-devel] Compile Error 1.0-rc2

2011-11-18 Thread Paolo Bonzini
On 11/18/2011 04:28 PM, erik.r...@rdsoftware.de wrote: Hi all, when compiling the 1.0-rc2, I get the following error: CClibhw64/9pfs/virtio-9p.o /home/erik/qemu-1.0-rc2/hw/9pfs/virtio-9p.c: In function 'dotl_to_at_flags': /home/erik/qemu-1.0-rc2/hw/9pfs/virtio-9p.c:81: error: 'AT_REMOVED

Re: [Qemu-devel] [PATCH 5/8] qcow2: Return real error in qcow2_snapshot_goto

2011-11-18 Thread Stefan Hajnoczi
On Thu, Nov 17, 2011 at 3:13 PM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- >  block/qcow2-snapshot.c |   50 +-- >  1 files changed, 39 insertions(+), 11 deletions(-) > > diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c > index 066d

Re: [Qemu-devel] [PATCH 5/8] qcow2: Return real error in qcow2_snapshot_goto

2011-11-18 Thread Kevin Wolf
Am 18.11.2011 17:08, schrieb Stefan Hajnoczi: > On Thu, Nov 17, 2011 at 3:13 PM, Kevin Wolf wrote: >> Signed-off-by: Kevin Wolf >> --- >> block/qcow2-snapshot.c | 50 >> +-- >> 1 files changed, 39 insertions(+), 11 deletions(-) >> >> diff --git a/bl

Re: [Qemu-devel] Compile Error 1.0-rc2

2011-11-18 Thread Erik Rull
Paolo Bonzini wrote: On 11/18/2011 04:28 PM, erik.r...@rdsoftware.de wrote: Hi all, when compiling the 1.0-rc2, I get the following error: CC libhw64/9pfs/virtio-9p.o /home/erik/qemu-1.0-rc2/hw/9pfs/virtio-9p.c: In function 'dotl_to_at_flags': /home/erik/qemu-1.0-rc2/hw/9pfs/virtio-9p.c:81: er

Re: [Qemu-devel] [PATCH 6/8] qcow2: Fix order of refcount updates in qcow2_snapshot_goto

2011-11-18 Thread Stefan Hajnoczi
On Thu, Nov 17, 2011 at 3:13 PM, Kevin Wolf wrote: > -    /* FIXME This is too late! */ > -    ret = qcow2_update_snapshot_refcount(bs, s->l1_table_offset, s->l1_size, > 1); > +    if (ret < 0) { > +        goto fail; > +    } > + > +    g_free(sn_l1_table); Prevent double-free if qcow2_update_s

Re: [Qemu-devel] [PATCH 6/8] qcow2: Fix order of refcount updates in qcow2_snapshot_goto

2011-11-18 Thread Kevin Wolf
Am 18.11.2011 17:28, schrieb Stefan Hajnoczi: > On Thu, Nov 17, 2011 at 3:13 PM, Kevin Wolf wrote: >> -/* FIXME This is too late! */ >> -ret = qcow2_update_snapshot_refcount(bs, s->l1_table_offset, >> s->l1_size, 1); >> +if (ret < 0) { >> +goto fail; >> +} >> + >> +g_f

[Qemu-devel] [PATCH 1.0 0/2] Fix compilation of 9pfs on old systems

2011-11-18 Thread Paolo Bonzini
Old systems do not have AT_REMOVEDIR, and 9pfs fails to compile on them. Patch 2 fixes that, patch 1 actually let me test it on Linux. :) Probably the same push-down should be done also for open(2) flags, for consistency. For example, some systems may not have O_DIRECTORY. However, this would be

[Qemu-devel] [PATCH 1.0 1/2] 9p: allow compiling the dummy virtio-9p-handle.c code on Linux

2011-11-18 Thread Paolo Bonzini
Avoid a conflict on the definition of struct file_handle by using a replacement name. Signed-off-by: Paolo Bonzini --- hw/9pfs/virtio-9p-handle.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/hw/9pfs/virtio-9p-handle.c b/hw/9pfs/virtio-9p-handle.c index 0a778b4..2788

[Qemu-devel] [PATCH 1.0 2/2] 9p: pass dotl flags to the unlinkat method

2011-11-18 Thread Paolo Bonzini
AT_REMOVEDIR is not defined on all systems. Pass the raw flags from the 9p protocol, which are always there. Signed-off-by: Paolo Bonzini --- hw/9pfs/virtio-9p-handle.c | 12 +++- hw/9pfs/virtio-9p.c| 10 -- 2 files changed, 11 insertions(+), 11 deletions(-) diff --

Re: [Qemu-devel] [PATCH 8/8] qcow2: Fix error path in qcow2_snapshot_load_tmp

2011-11-18 Thread Stefan Hajnoczi
On Thu, Nov 17, 2011 at 3:13 PM, Kevin Wolf wrote: > +    s->l1_table = new_l1_table; > +    g_free(s->l1_table); O_o .oO( immediately frees new_l1_table?! ) Stefan

Re: [Qemu-devel] [PATCH 0/8] qcow2: Fix error paths for internal snapshots

2011-11-18 Thread Stefan Hajnoczi
On Thu, Nov 17, 2011 at 3:13 PM, Kevin Wolf wrote: > This is more or less the same kind of fixes that we made in the rest of qcow2 > last year: Return the right error codes and make the order of operations safe > so that a crash can lead to no more than cluster leaks. > > Although all of these are

Re: [Qemu-devel] [PATCH 8/8] qcow2: Fix error path in qcow2_snapshot_load_tmp

2011-11-18 Thread Kevin Wolf
Am 18.11.2011 17:45, schrieb Stefan Hajnoczi: > On Thu, Nov 17, 2011 at 3:13 PM, Kevin Wolf wrote: >> +s->l1_table = new_l1_table; >> +g_free(s->l1_table); > > O_o .oO( immediately frees new_l1_table?! ) This was just a test to see if you're still awake at patch 8. *cough* Ok, I guess

[Qemu-devel] [PATCH] fmodaudio: Remove unused variable 'bits16' (reported by cppcheck)

2011-11-18 Thread Stefan Weil
The variable is assigned a value which is never used, so remove variable and assignment. Signed-off-by: Stefan Weil --- audio/fmodaudio.c |6 ++ 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/audio/fmodaudio.c b/audio/fmodaudio.c index c34cf53..fabf84d 100644 --- a/audio/

Re: [Qemu-devel] [PATCH][qemu-iotests] Test loading internal snapshots

2011-11-18 Thread Kevin Wolf
Am 05.08.2011 16:37, schrieb Kevin Wolf: > Test loading internal snapshots where the L1 table of the snapshot > is smaller than the current L1 table. > > Signed-off-by: Kevin Wolf I just noticed that this still isn't merged. Christoph? Kevin

Re: [Qemu-devel] [PATCH] fmodaudio: Remove unused variable 'bits16' (reported by cppcheck)

2011-11-18 Thread malc
On Fri, 18 Nov 2011, Stefan Weil wrote: > The variable is assigned a value which is never used, > so remove variable and assignment. > Applied, thanks. -- mailto:av1...@comtv.ru

[Qemu-devel] [PATCH v2 0/9] qcow2: Fix error paths for internal snapshots

2011-11-18 Thread Kevin Wolf
Kevin Wolf (9): qcow2: Return real error code in qcow2_read_snapshots qcow2: Return real error code in qcow2_write_snapshots qcow2: Update snapshot table information at once qcow2: Cleanups and memleak fix in qcow2_snapshot_create qcow2: Rework qcow2_snapshot_create error handling qcow2

[Qemu-devel] [PATCH v2 3/9] qcow2: Update snapshot table information at once

2011-11-18 Thread Kevin Wolf
Failing in the middle wouldn't help with the integrity of the image, so doing everything in a single request seems better. Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 22 ++ 1 files changed, 10 insertions(+), 12 deletions(-) diff --git a/block/qcow2-snapshot.c b

[Qemu-devel] [PATCH v2 4/9] qcow2: Cleanups and memleak fix in qcow2_snapshot_create

2011-11-18 Thread Kevin Wolf
sn->id_str could be leaked before this. The rest of this patch changes comments, fixes coding style or removes checks that are unnecessary with g_malloc. Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 26 +++--- 1 files changed, 11 insertions(+), 15 deletions(-) di

[Qemu-devel] [PATCH v2 8/9] qcow2: Fix order in qcow2_snapshot_delete

2011-11-18 Thread Kevin Wolf
First the snapshot must be deleted and only then the refcounts can be decreased. Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 48 +--- 1 files changed, 33 insertions(+), 15 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-sna

[Qemu-devel] [PATCH v2 7/9] qcow2: Fix order of refcount updates in qcow2_snapshot_goto

2011-11-18 Thread Kevin Wolf
The refcount updates must be moved so that in the worst case we can get cluster leaks, but refcounts may never be too low. Signed-off-by: Kevin Wolf --- block/qcow2-refcount.c |7 - block/qcow2-snapshot.c | 61 ++- 2 files changed, 50 inserti

[Qemu-devel] [PATCH v2 6/9] qcow2: Return real error in qcow2_snapshot_goto

2011-11-18 Thread Kevin Wolf
Besides fixing the return code, this adds some comments that make clear how the code works and that it potentially breaks images if we fail in the wrong place. Actually fixing this is left for the next patch. Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 51 +++

[Qemu-devel] [PATCH v2 9/9] qcow2: Fix error path in qcow2_snapshot_load_tmp

2011-11-18 Thread Kevin Wolf
If the bdrv_read() of the snapshot's L1 table fails, return the right error code and make sure that the old L1 table is still loaded and we don't break the BlockDriverState completely. Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 34 ++ 1 files changed

[Qemu-devel] [PATCH v2 1/9] qcow2: Return real error code in qcow2_read_snapshots

2011-11-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 25 - block/qcow2.c |5 +++-- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index bdc33ba..4134bbc 100644 --- a/block/qcow2-snapshot.c ++

[Qemu-devel] [PATCH v2 5/9] qcow2: Rework qcow2_snapshot_create error handling

2011-11-18 Thread Kevin Wolf
Increase refcounts only after allocating a new L1 table has succeeded in order to make leaks less likely. If writing the snapshot table fails, revert in-memory state to be consistent with that on disk. While at it, make it return the real error codes instead of -1. Signed-off-by: Kevin Wolf ---

[Qemu-devel] [PATCH v2 2/9] qcow2: Return real error code in qcow2_write_snapshots

2011-11-18 Thread Kevin Wolf
Doesn't immediately fix anything as the callers don't use the return value, but they will be fixed next. Signed-off-by: Kevin Wolf --- block/qcow2-snapshot.c | 48 ++-- 1 files changed, 38 insertions(+), 10 deletions(-) diff --git a/block/qcow2-snap

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

2011-11-18 Thread Alex Williamson
On Thu, 2011-11-17 at 11:02 +1100, David Gibson wrote: > On Tue, Nov 15, 2011 at 11:01:28AM -0700, Alex Williamson wrote: > > On Tue, 2011-11-15 at 17:34 +1100, David Gibson wrote: > > > On Thu, Nov 03, 2011 at 02:12:24PM -0600, Alex Williamson wrote: > > > > +Groups, Devices, IOMMUs, oh my > > >

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

2011-11-18 Thread Scott Wood
On Fri, Nov 18, 2011 at 01:32:56PM -0700, Alex Williamson wrote: > Hmm, that might be cleaner than eliminating the size with just using > _IO(). So we might have something like: > > #define VFIO_IOMMU_MAP_DMA _IOWR(';', 106, struct vfio_dma_map) > #define VFIO_IOMMU_MAP_DMA_V2