[Qemu-devel] [PATCH v3 18/19] usb-mtp: convert init to realize

2014-09-19 Thread arei.gonglei
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-mtp.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 0820046..108ece8 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -1060,7 +1060,7 @@ st

[Qemu-devel] [PATCH v3 12/19] dev-serial: convert init to realize

2014-09-19 Thread arei.gonglei
From: Gonglei In this way, all the implementations now use error_setg instead of error_report for reporting error. Signed-off-by: Gonglei Reviewed-by: Paolo Bonzini --- hw/usb/dev-serial.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/hw/usb/dev-seria

Re: [Qemu-devel] [PATCH v2 00/19] usb: convert device init to realize

2014-09-19 Thread Markus Armbruster
Paolo Bonzini writes: > Il 18/09/2014 19:15, Markus Armbruster ha scritto: >> >> Thanks for doing this work. If you can do a bit more of the same, here >> are a few more device model init() methods I'd love to have converted, >> because they use qerror_report_err(): >> >> hw/char/serial-pci.c

[Qemu-devel] [PATCH v3] qemu-char: Do not disconnect when there's data for reading

2014-09-19 Thread Zifei Tong
After commit 812c1057f6175ac9a9829fa2920a2b5783814193 (Handle G_IO_HUP in tcp_chr_read for tcp chardev), connections are disconnected when in G_IO_HUP condition. However, it's possible that there is still data for reading in the channel. In that case, the remaining data is not handled. I saw a re

Re: [Qemu-devel] [PATCH v2] ivshmem: use error_report

2014-09-19 Thread David Marchand
On 09/19/2014 01:17 AM, Andrew Jones wrote: Replace all the fprintf(stderr, ...) calls with error_report. Also make sure exit() consistently uses the error code 1. A few calls used -1. Signed-off-by: Andrew Jones --- hw/misc/ivshmem.c | 39 +++ 1 file chan

[Qemu-devel] [PATCH 1/2] usb-bus: introduce a wrapper function to check speed

2014-09-19 Thread arei.gonglei
From: Gonglei In this way, we can check speed directly, don't need call usb_device_attach(), which has other conditions, such as checking the chardev is open. Cc: Paolo Bonzini Cc: Gerd Hoffmann Signed-off-by: Gonglei --- hw/usb/bus.c | 14 +- include/hw/usb.h | 1 + 2 files

[Qemu-devel] [PATCH 0/2] usb-serial: only check speed once at realize time

2014-09-19 Thread arei.gonglei
From: Gonglei This patch series based on [PATCH v3 00/19] usb: convert device init to realize As Paolo's comments: usb port speed check could be extracted to a separate function usb_check_attach, that is called just once at realize time, even if !s->cs->be_open. Please review, Thanks. :) Go

[Qemu-devel] [PATCH 2/2] usb-serial: only check speed once at realize time

2014-09-19 Thread arei.gonglei
From: Gonglei Whatever the chardev is open or not, we should assure the speed is matched each other. So, call usb_check_attach() check speed. And then pass &error_abort at all calls to usb_device_attach(). Cc: Paolo Bonzini Cc: Gerd Hoffmann Signed-off-by: Gonglei --- hw/usb/dev-serial.c | 1

[Qemu-devel] [PATCH] qemu-socket: Polish errors for connect() and listen() failure

2014-09-19 Thread Markus Armbruster
connect() doesn't "connect to socket", it connects a socket to an address and, if it's of type SOCK_STREAM, initiates a connection. Scratch "to". listen() does "set socket to listening mode", but it sounds awkward. Change to "listen on socket". Signed-off-by: Markus Armbruster --- include/qapi/

Re: [Qemu-devel] [PATCH v2] ivshmem: use error_report

2014-09-19 Thread zhanghailiang
On 2014/9/19 7:17, Andrew Jones wrote: Replace all the fprintf(stderr, ...) calls with error_report. Also make sure exit() consistently uses the error code 1. A few calls used -1. Signed-off-by: Andrew Jones --- hw/misc/ivshmem.c | 39 +++ 1 file changed,

Re: [Qemu-devel] [PATCH 0/6] pc: bring ACPI table size below to 2.0 levels, try fixing -initrd for good

2014-09-19 Thread Gerd Hoffmann
Hi, > However, there is another problem. As the ACPI tables grow, we need > to move the address at which linuxboot.bin loads the initrd. This > address is placed close to the end of memory, but it is QEMU that > tells linuxboot.bin where exactly the initrd is to be loaded. And > QEMU cannot r

Re: [Qemu-devel] [PATCH] qemu-socket: Polish errors for connect() and listen() failure

2014-09-19 Thread Gonglei (Arei)
> Subject: [Qemu-devel] [PATCH] qemu-socket: Polish errors for connect() and > listen() failure > > connect() doesn't "connect to socket", it connects a socket to an > address and, if it's of type SOCK_STREAM, initiates a connection. > Scratch "to". > > listen() does "set socket to listening mode

Re: [Qemu-devel] [PATCH v1] vl: Fix possible freed memory accessing

2014-09-19 Thread Markus Armbruster
zhanghailiang writes: > The logic of pcmcia_socket_unregister is wrong, > which will cause a freed memory accessing > > Signed-off-by: zhanghailiang > --- > Hi, > > The function pcmcia_socket_unregister seemes to be unused, > Should it be removed? Thanks. I think we should remove the whole thin

Re: [Qemu-devel] [PATCH 0/6] pc: bring ACPI table size below to 2.0 levels, try fixing -initrd for good

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 09:36, Gerd Hoffmann ha scritto: > Hmm. That assumes we are running seabios, where we know how much memory > we actually need. Right. However, note that this only affects one patch in the series (patch 3). Patches 1-2 are useful to unify Xen-specific behavior with other hypervisor

Re: [Qemu-devel] [PATCH 0/2] usb-serial: only check speed once at realize time

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 09:25, arei.gong...@huawei.com ha scritto: > From: Gonglei > > This patch series based on > [PATCH v3 00/19] usb: convert device init to realize > > As Paolo's comments: > > usb port speed check could be extracted to a separate > function usb_check_attach, that is called just on

Re: [Qemu-devel] [PATCH v1] vl: Fix possible freed memory accessing

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 05:37, zhanghailiang ha scritto: > The logic of pcmcia_socket_unregister is wrong, > which will cause a freed memory accessing > > Signed-off-by: zhanghailiang > --- > Hi, > > The function pcmcia_socket_unregister seemes to be unused, > Should it be removed? Thanks. Perhaps---howe

Re: [Qemu-devel] [PATCH 0/2] usb-serial: only check speed once at realize time

2014-09-19 Thread Gonglei (Arei)
> Il 19/09/2014 09:25, arei.gong...@huawei.com ha scritto: > > From: Gonglei > > > > This patch series based on > > [PATCH v3 00/19] usb: convert device init to realize > > > > As Paolo's comments: > > > > usb port speed check could be extracted to a separate > > function usb_check_attach, that i

Re: [Qemu-devel] [PATCH 0/2] pflash (UEFI varstore) migration shortcut for libvirt

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 08:48, Alexey Kardashevskiy ha scritto: > Right now we use NVRAM on sPAPR as: > -drive id=id3,if=none,file=qemu_nvram.img > -global spapr-nvram.drive=id3 > > So the NVRAM file is BlockDriverState and HMP's "migrate -b" copies the > content just fine. > > What is missing here? Thanks

Re: [Qemu-devel] migration: qemu-coroutine-lock.c:141: qemu_co_mutex_unlock: Assertion `mutex->locked == 1' failed

2014-09-19 Thread Alexey Kardashevskiy
On 09/18/2014 07:56 PM, Paolo Bonzini wrote: > Il 18/09/2014 05:26, Alexey Kardashevskiy ha scritto: >> On 09/18/2014 01:07 AM, Stefan Hajnoczi wrote: >>> On Wed, Sep 17, 2014 at 2:44 PM, Alexey Kardashevskiy >>> wrote: On 09/17/2014 07:25 PM, Paolo Bonzini wrote: btw any better idea of

Re: [Qemu-devel] [RFC v2 1/3] blockdev: Add function to search for orphaned drives

2014-09-19 Thread Markus Armbruster
John Snow writes: > Signed-off-by: John Snow > --- > blockdev.c| 19 +++ > include/sysemu/blockdev.h | 1 + > vl.c | 5 + > 3 files changed, 25 insertions(+) > > diff --git a/blockdev.c b/blockdev.c > index b361fbb..5e7c93a 100644 > ---

Re: [Qemu-devel] [PATCH v2] ivshmem: use error_report

2014-09-19 Thread zhanghailiang
On 2014/9/19 15:34, zhanghailiang wrote: On 2014/9/19 7:17, Andrew Jones wrote: Replace all the fprintf(stderr, ...) calls with error_report. Also make sure exit() consistently uses the error code 1. A few calls used -1. Signed-off-by: Andrew Jones --- hw/misc/ivshmem.c | 39

Re: [Qemu-devel] migration: qemu-coroutine-lock.c:141: qemu_co_mutex_unlock: Assertion `mutex->locked == 1' failed

2014-09-19 Thread Kevin Wolf
Am 16.09.2014 um 14:59 hat Paolo Bonzini geschrieben: > Il 16/09/2014 14:52, Kevin Wolf ha scritto: > > Yes, that's true. We can't fix this problem in qcow2, though, because > > it's a more general one. I think we must make sure that > > bdrv_invalidate_cache() doesn't yield. > > > > Either by fo

[Qemu-devel] [PATCH 0/2] serial: cleanups for physical serial port passthrough

2014-09-19 Thread Paolo Bonzini
Patch 1 ensures that the serial port state is the same at VM startup and after reset. Patch 2 ensures that the poll_msl field is computed at reset time (rather than arbitrarily later), so that it becomes -1 for serial ports backed by PTYs, sockets, etc. Please review! Paolo Paolo Bonzini (2):

[Qemu-devel] [PATCH 2/2] serial: check if backed by a physical serial port at realize time

2014-09-19 Thread Paolo Bonzini
Right now, s->poll_msl may linger at "0" value for an arbitrarily long time, until serial_update_msl is called for the first time. This is unnecessary, and will lead to the s->poll_msl field being unnecessarily migrated. We can call serial_update_msl immediately at realize time (via serial_reset)

[Qemu-devel] [PATCH 1/2] serial: reset state at startup

2014-09-19 Thread Paolo Bonzini
When a serial port is started, its initial state is all zero. Make it consistent with reset state instead. Signed-off-by: Paolo Bonzini --- hw/char/serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/char/serial.c b/hw/char/serial.c index 764e184..4523ccb 100644 --- a/hw/char/serial

Re: [Qemu-devel] [RFC] vfio: migration to trace points

2014-09-19 Thread Stefan Hajnoczi
On Wed, Sep 03, 2014 at 09:45:14AM +0100, Eric Auger wrote: > This patch removes all DPRINTF and replace them by trace points. > A few DPRINTF used in error cases were transformed into error_report. > > Signed-off-by: Eric Auger The subject line says "RFC". Are you proposing this patch for merg

Re: [Qemu-devel] [PATCH v3 0/3] block: Always compile virtio-blk dataplane

2014-09-19 Thread Paolo Bonzini
Il 10/09/2014 08:17, Fam Zheng ha scritto: > v3: Fix -ENOBUFS. > v2: Import virtio_vring.h. > > Fam Zheng (3): > virtio: Import virtio_vring.h > vring: Better error handling if num is too large > block: Always compile virtio-blk dataplane > > configure | 21 +

[Qemu-devel] [PATCH 1/1] vpc.c: Add VHD resize support

2014-09-19 Thread Lucian Petrut
This patch introduces resize support for dynamic and fixed VHD images. Note that differencing VHD images do not support this operation. In order to resize dynamic VHDs, the BAT region may need to be extended. This may require moving the first data blocks, making room for it to expand. This requir

Re: [Qemu-devel] [PATCH 1/2] serial: reset state at startup

2014-09-19 Thread Chen, Tiejun
On 2014/9/19 16:54, Paolo Bonzini wrote: When a serial port is started, its initial state is all zero. Make it consistent with reset state instead. Signed-off-by: Paolo Bonzini --- hw/char/serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/char/serial.c b/hw/char/serial.c index

Re: [Qemu-devel] [RFC PATCH v3] Support vhd type VHD_DIFFERENCING

2014-09-19 Thread Stefan Hajnoczi
On Wed, Sep 10, 2014 at 09:32:15PM +0800, Xiaodong Gong wrote: > Now qemu only supports vhd type VHD_FIXED and VHD_DYNAMIC, > so qemu can't read snapshot volume of vhd, and can't support > other storage features of vhd file. > > This patch add read parent information in function "vpc_open", > read

Re: [Qemu-devel] [RFC PATCH v2 00/10] virtio-scsi: Dataplane on single iothread

2014-09-19 Thread Paolo Bonzini
Il 06/08/2014 07:34, Fam Zheng ha scritto: > Hi all, > > This series adds "iothread" property to virtio-scsi in a way just similar to > virtio-blk, and turns all scsi devices to run on top of it. > > Example: > > -object iothread,id=iothread-1 \ > -device virtio-scsi-pci,id=virtio-scsi-

Re: [Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-09-19 Thread Paolo Bonzini
Il 06/08/2014 07:35, Fam Zheng ha scritto: > This implements the core part of dataplane feature of virtio-scsi. > > A few fields are added in VirtIOSCSICommon to maintain the dataplane > status. These fields are managed by a new source file: > virtio-scsi-dataplane.c. > > Most code in this file w

Re: [Qemu-devel] [RFC PATCH v2 10/10] virtio-scsi: Hook up with dataplane

2014-09-19 Thread Paolo Bonzini
Il 06/08/2014 07:35, Fam Zheng ha scritto: > This enables the virtio-scsi-dataplane code by setting the iothread > in virtio-scsi device, and makes any function that is called by > back from dataplane to cooperate with the caller: they need to be > vring/iothread aware when handling the requests an

Re: [Qemu-devel] [RFC v2 2/3] Add units-per-idebus property

2014-09-19 Thread Markus Armbruster
John Snow writes: > Signed-off-by: John Snow > --- > blockdev.c| 10 -- > device-hotplug.c | 2 +- > hw/i386/pc_q35.c | 3 ++- > include/hw/boards.h | 3 ++- > include/sysemu/blockdev.h | 2 +- > vl.c | 19 +++-

Re: [Qemu-devel] [PATCH] block: delete cow block driver

2014-09-19 Thread Stefan Hajnoczi
On Tue, Sep 16, 2014 at 03:24:24PM +0100, Stefan Hajnoczi wrote: > This patch removes support for the cow file format. > > Normally we do not break backwards compatibility but in this case there > is no impact and it is the most logical option. Extraordinary claims > require extraordinary evidenc

Re: [Qemu-devel] [PATCH] block: vhdx - fix reading beyond pointer during image creation

2014-09-19 Thread Stefan Hajnoczi
On Tue, Sep 16, 2014 at 03:12:06PM -0400, Jeff Cody wrote: > In vhdx_create_metadata(), we allocate 40 bytes to entry_buffer for > the various metadata table entries. However, we write out 64kB from > that buffer into the new file. Only write out the correct 40 bytes. > > Signed-off-by: Jeff Cod

Re: [Qemu-devel] [RFC v2 3/3] ahci: implement -cdrom and -hd[a-d]

2014-09-19 Thread Markus Armbruster
John Snow writes: > Signed-off-by: John Snow > --- > hw/i386/pc_q35.c | 3 +++ > hw/ide/ahci.c| 31 +++ > hw/ide/ahci.h| 3 +++ > 3 files changed, 37 insertions(+) > > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c > index fd26fe1..0f33696 100644 > --- a/

Re: [Qemu-devel] [PATCH v2 0/9] virtio: fix virtio child recount in transports

2014-09-19 Thread Gonglei (Arei)
Hi, Michael, Paolo and Markus This patch series fix an obvious resource leak issue about virtio devices. Maybe those should be merged in qemu-stable tree IMHO. But the patch serial using property_alias function which introduce a regression (-device FOO,?) such as: before: virtio-blk-pci.physical

Re: [Qemu-devel] [RFC v2 0/3] Q35/AHCI -cdrom/-hda desugaring

2014-09-19 Thread Markus Armbruster
John Snow writes: > This is an extremely rough/quick sketch of > a -cdrom/-hda desugaring fix for Q35/AHCI. > > Before I spent any time on it, I wanted feedback > from Markus or anyone else who had concerns about > how this problem would get fixed. > > This is, then, rough approach #2. > > Highli

[Qemu-devel] [[PATCH v2] 1/1] vpc.c: Add VHD resize support

2014-09-19 Thread Lucian Petrut
This patch introduces resize support for dynamic and fixed VHD images. Note that differencing VHD images do not support this operation. In order to resize dynamic VHDs, the BAT region may need to be extended. This may require moving the first data blocks, making room for it to expand. This requir

Re: [Qemu-devel] [PATCH] block: Validate node-name

2014-09-19 Thread Stefan Hajnoczi
On Wed, Sep 17, 2014 at 01:31:06PM +0200, Kevin Wolf wrote: > The device_name of a BlockDriverState is currently checked because it is > always used as a QemuOpts ID and qemu_opts_create() checks whether such > IDs are wellformed. > > node-name is supposed to share the same namespace, but it isn't

Re: [Qemu-devel] [PATCH v5 0/1] async: aio_context_new(): Handle event_notifier_init failure

2014-09-19 Thread Stefan Hajnoczi
On Thu, Sep 18, 2014 at 02:30:48PM +0300, Chrysostomos Nanakos wrote: > v4->v5 > -- > * Set thread_id before calling aio_context_new(). That way > qmp_query_iothreads() > will display thread_id -1 for a failed IOThread object than an uninitialized > value. > * qemu_init_main_loop() will re

Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix

2014-09-19 Thread Pavel Dovgaluk
Hi, Paolo! > From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > From: Pavel Dovgalyuk > > This patch postpones vapic_paddr initialization, which is performed > during migration. When vapic_paddr is synchronized within the migration > process, apic_common functio

Re: [Qemu-devel] [PATCH 00/15] AHCI test helper refactors

2014-09-19 Thread Markus Armbruster
John Snow writes: > The original version of the AHCI test base > which is now staged for being merged, processes > the ahci_identify test in a monolithic fashion. > > In authoring new tests, it became necessary and > obvious as to how the operation of this device > should be factored out to ease

Re: [Qemu-devel] [PATCH v2] vmdk: Fix integer overflow in offset calculation

2014-09-19 Thread Max Reitz
On 15.09.2014 04:32, Fam Zheng wrote: This fixes the bug introduced by commit c6ac36e (vmdk: Optimize cluster allocation). $ ~/build/master/qemu-io /stor/vm/arch.vmdk -c 'write 2G 1k' write failed: Invalid argument Reported-by: Mark Cave-Ayland Signed-off-by: Fam Zheng --- block/vmdk.c

Re: [Qemu-devel] [PATCH v2] vmdk: Fix integer overflow in offset calculation

2014-09-19 Thread Max Reitz
On 19.09.2014 13:52, Max Reitz wrote: On 15.09.2014 04:32, Fam Zheng wrote: This fixes the bug introduced by commit c6ac36e (vmdk: Optimize cluster allocation). $ ~/build/master/qemu-io /stor/vm/arch.vmdk -c 'write 2G 1k' write failed: Invalid argument Reported-by: Mark Cave-Ayland Signed-off

[Qemu-devel] [RFC patch 3/6] vfio: make vfio build on s390

2014-09-19 Thread frank . blaschka
From: Frank Blaschka This patch adds some small changes to make vfio build on s390. Signed-off-by: Frank Blaschka --- drivers/vfio/Kconfig |2 +- drivers/vfio/pci/vfio_pci_rdwr.c |8 2 files changed, 9 insertions(+), 1 deletion(-) --- a/drivers/vfio/Kconfig +++ b/

[Qemu-devel] [RFC patch 1/6] KVM: s390: Enable PCI instructions

2014-09-19 Thread frank . blaschka
Enable PCI instructions for s390 KVM. Signed-off-by: Frank Blaschka --- arch/s390/kvm/kvm-s390.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/arch/s390/kvm/kvm-s390.c +++ b/arch/s390/kvm/kvm-s390.c @@ -1787,7 +1787,7 @@ static int __init kvm_s390_init(void) } m

[Qemu-devel] [RFC patch 0/6] vfio based pci pass-through for qemu/KVM on s390

2014-09-19 Thread frank . blaschka
This set of patches implements a vfio based solution for pci pass-through on the s390 platform. The kernel stuff is pretty much straight forward, but qemu needs more work. Most interesting patch is: vfio: make vfio run on s390 platform I hope Alex & Alex can give me some guidance how to do the

[Qemu-devel] [RFC patch 5/6] s390: implement pci instruction

2014-09-19 Thread frank . blaschka
From: Frank Blaschka This patch implements the s390 pci instructions in qemu. This allows to attach qemu pci devices including vfio. This does not mean the devices are functional but at least detection and config/memory space access is working. Signed-off-by: Frank Blaschka --- target-s390

[Qemu-devel] [RFC patch 2/6] iommu: add iommu for s390 platform

2014-09-19 Thread frank . blaschka
From: Frank Blaschka Add a basic iommu for the s390 platform. The code is pretty simple since on s390 each PCI device has its own virtual io address space starting at the same vio address. For this a domain could hold only one pci device. Also there is no relation between pci devices so each devi

[Qemu-devel] [RFC patch 6/6] vfio: make vfio run on s390 platform

2014-09-19 Thread frank . blaschka
From: Frank Blaschka Following changes are made because of platform differences: 1) s390 does not support mmap'ing of PCI BARs so we have to go via slow path 2) no intx support 3) no classic MSIX interrupts. The pci hw understands the concept of requesting MSIX irqs but irqs are delivered as

Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 12:43, Pavel Dovgaluk ha scritto: > I've tested this patch with replay. I enabled VM reset (which was previously > disabled for replay) > while loading the VM state and discovered the following problem. > vapic_enable function in kvmapic.c retrieves cpu number with the > get_kpcr_nu

[Qemu-devel] [RFC patch 4/6] s390: Add PCI bus support

2014-09-19 Thread frank . blaschka
From: Frank Blaschka This patch implements a pci bus for s390x together with some infrastructure to generate and handle hotplug events. It also provides device configuration/unconfiguration via sclp instruction interception. Signed-off-by: Frank Blaschka --- default-configs/s390x-softmmu.

Re: [Qemu-devel] [PATCH 1/2] pc-dimm: No numa option shouldn't break hotplug memory feature

2014-09-19 Thread Igor Mammedov
On Wed, 17 Sep 2014 16:32:20 +0800 Hu Tao wrote: > On Tue, Sep 16, 2014 at 06:39:15PM +0800, zhanghailiang wrote: > > If we do not configure numa option, memory hotplug should work as well. > > It should not depend on numa option. > > > > Steps to reproduce: > > (1) Start VM: qemu-kvm -m 1024,sl

Re: [Qemu-devel] [PATCH 1/2] pc-dimm: No numa option shouldn't break hotplug memory feature

2014-09-19 Thread Igor Mammedov
On Tue, 16 Sep 2014 18:39:15 +0800 zhanghailiang wrote: > If we do not configure numa option, memory hotplug should work as well. > It should not depend on numa option. > > Steps to reproduce: > (1) Start VM: qemu-kvm -m 1024,slots=4,maxmem=8G > (2) Hotplug memory > It will fail and reports: > "

Re: [Qemu-devel] [PATCH v3 0/3] block: Always compile virtio-blk dataplane

2014-09-19 Thread Stefan Hajnoczi
On Wed, Sep 10, 2014 at 02:17:48PM +0800, Fam Zheng wrote: > v3: Fix -ENOBUFS. > v2: Import virtio_vring.h. > > Fam Zheng (3): > virtio: Import virtio_vring.h > vring: Better error handling if num is too large > block: Always compile virtio-blk dataplane > > configure

Re: [Qemu-devel] [PATCH 00/15] AHCI test helper refactors

2014-09-19 Thread Stefan Hajnoczi
On Fri, Sep 19, 2014 at 12:53:22PM +0200, Markus Armbruster wrote: > John Snow writes: > > > The original version of the AHCI test base > > which is now staged for being merged, processes > > the ahci_identify test in a monolithic fashion. > > > > In authoring new tests, it became necessary and >

Re: [Qemu-devel] [PATCH 1/2] serial: reset state at startup

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 11:17, Chen, Tiejun ha scritto: > On 2014/9/19 16:54, Paolo Bonzini wrote: >> When a serial port is started, its initial state is all zero. Make >> it consistent with reset state instead. >> >> Signed-off-by: Paolo Bonzini >> --- >> hw/char/serial.c | 1 + >> 1 file changed, 1 in

Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix

2014-09-19 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > Il 19/09/2014 12:43, Pavel Dovgaluk ha scritto: > > I've tested this patch with replay. I enabled VM reset (which was > > previously disabled for > replay) > > while loading the VM state and discovered the follo

Re: [Qemu-devel] [PATCH 0/6] pc: bring ACPI table size below to 2.0 levels, try fixing -initrd for good

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 09:36, Gerd Hoffmann ha scritto: > Hi, > >> However, there is another problem. As the ACPI tables grow, we need >> to move the address at which linuxboot.bin loads the initrd. This >> address is placed close to the end of memory, but it is QEMU that >> tells linuxboot.bin where e

Re: [Qemu-devel] [PATCH] virtio-balloon: Fix ballooning not working correctly when hotplug memory

2014-09-19 Thread Igor Mammedov
On Mon, 15 Sep 2014 20:29:38 +0800 zhanghailiang wrote: > When do memory balloon, it references the ram_size as the real ram size of VM, > But here ram_size is not include the hotplugged memory, and the result will > be confused. > > Steps to reproduce: > (1)Start VM: qemu -m size=1024,slots=4,m

Re: [Qemu-devel] [Spice-devel] screen freezed for 2-3 minutes on spice connect on xen windows 7 domU's with qxl after save/restore

2014-09-19 Thread Fabio Fantoni
Il 12/09/2014 16:46, Fabio Fantoni ha scritto: Il 08/07/2014 12:34, Fabio Fantoni ha scritto: Il 08/07/2014 12:06, Fabio Fantoni ha scritto: Il 08/07/2014 10:53, David Jaša ha scritto: Hi, On Út, 2014-07-08 at 10:13 +0200, Fabio Fantoni wrote: On xen 4.5 (tried with qemu 2.0.0/2.1-rc0, spice

Re: [Qemu-devel] [PATCH] block: Validate node-name

2014-09-19 Thread Stefan Hajnoczi
On Wed, Sep 17, 2014 at 01:31:06PM +0200, Kevin Wolf wrote: > The device_name of a BlockDriverState is currently checked because it is > always used as a QemuOpts ID and qemu_opts_create() checks whether such > IDs are wellformed. > > node-name is supposed to share the same namespace, but it isn't

[Qemu-devel] [PULL 00/01] Adding new syscalls to seccomp whitelist

2014-09-19 Thread Eduardo Otubo
The following changes since commit 10e11f4d2bf171f99c6b13883a510acfbc5dd585: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2014-09-18 20:02:01 +0100) are available in the git repository at: git://github.com/otubo/qemu.git tags/goto-upstream for you to fetch ch

[Qemu-devel] [PULL 01/01] seccomp: whitelist syscalls fallocate(), fadvise64(), inotify_init1() and inotify_add_watch()

2014-09-19 Thread Eduardo Otubo
From: Philipp Gesang fallocate() is needed for snapshotting. If it isn’t whitelisted $ qemu-img create -f qcow2 x.qcow 1G Formatting 'x.qcow', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 lazy_refcounts=off $ qemu-kvm -display none -monitor stdio -sandbox on x.qcow

Re: [Qemu-devel] [PATCH] Fix cross compilation (nm command)

2014-09-19 Thread Paolo Bonzini
Il 18/09/2014 22:07, Peter Maydell ha scritto: > On 18 September 2014 12:55, Stefan Weil wrote: >> Commit c261d774fb9093d00e0938a19f502fb220f62718 added one more binutils >> tool: nm also needs a cross prefix. >> >> Signed-off-by: Stefan Weil > > Heh, completely missed that when reviewing the or

Re: [Qemu-devel] [PATCH v4] Add HMP command "info memory-devices"

2014-09-19 Thread Igor Mammedov
On Thu, 18 Sep 2014 16:09:32 +0800 zhugh wrote: > Hi, > > Could anyone help to review this patch? > If there was no problem, could help to merge it? > > thanks! > zhu > > On Mon, 2014-09-15 at 19:31 +0800, Zhu Guihua wrote: > > Provides HMP equivalent of QMP query-memory-devices command. > >

Re: [Qemu-devel] [PATCH 08/14] ppc: introduce gen_op_mfcr/gen_op_mtcr

2014-09-19 Thread Paolo Bonzini
Il 18/09/2014 23:38, Richard Henderson ha scritto: > On 09/15/2014 08:03 AM, Paolo Bonzini wrote: >> +static inline void gen_op_mfcr(TCGv_i32 dest, int first_cr, int shift) >> +{ >> +tcg_gen_shli_i32(dest, cpu_crf[first_cr >> 2], shift); >> +} >> + >> +static inline void gen_op_mtcr(int first_c

Re: [Qemu-devel] [PATCH 4/4] block: avoid creating oversized writes in multiwrite_merge

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 00:56, Peter Lieven ha scritto: >> > So I think if we treat it just as a hint for multiwrite, we can avoid >> > writing code to split oversized requests. They always worked so far, we >> > can certainly wait until we have a real bug fix. > I would not treat this as a hint. I would us

Re: [Qemu-devel] [question] virtio-blk performance degradationhappened with virito-serial

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 07:53, Fam Zheng ha scritto: > Any ideas? The obvious, but hardish one is to switch to epoll (one epoll fd per AioContext, plus one for iohandler.c). This would require converting iohandler.c to a GSource. Paolo

Re: [Qemu-devel] [PULL 13/21] apic_common: vapic_paddr synchronization fix

2014-09-19 Thread Paolo Bonzini
Il 19/09/2014 14:50, Pavel Dovgaluk ha scritto: > vapic_paddr depends on cpu_number. cpu_number cannot be retrieved when > do_vapic_enable executes. > Thus we cannot reconstruct vapic_paddr in that function. cpu_number will always be zero, because do_vapic_enable is only executed for smp_cpus ==

Re: [Qemu-devel] [PATCH v2] pc-dimm/numa: Fix stat of memory size in node when hotplug memory

2014-09-19 Thread Igor Mammedov
On Thu, 18 Sep 2014 20:07:08 +0800 zhanghailiang wrote: > When do memory hotplug, if there is numa node, we should add > the memory size to the corresponding node memory size. > > For now, it mainly affects the result of hmp command "info numa". > > Signed-off-by: zhanghailiang > --- > v2: >

Re: [Qemu-devel] [PATCH 13/14] ppc: inline ppc_set_crf when clearer

2014-09-19 Thread Paolo Bonzini
Il 18/09/2014 22:33, Tom Musta ha scritto: >> > Do not go through the loop when we're setting the four CR fields to >> > separate constants or conditions. This is clearer than putting together >> > 4-bit value and passing it. > I guess "clearer" is in the eye of the beholder :) > > In genera

Re: [Qemu-devel] [PATCH 11/14] ppc: store CR registers in 32 1-bit registers

2014-09-19 Thread Paolo Bonzini
Il 18/09/2014 22:25, Tom Musta ha scritto: > This breaks what you did in patch 5, which used LE bit numbering to > perform shifts. Yeah, I change "1 << x" to "8 >> x" in this patch for the fcmp helpers, but not the others. > And it breaks other code that uses the old LE > convention. I'll fix it

Re: [Qemu-devel] [PATCH v3] qemu-char: Do not disconnect when there's data for reading

2014-09-19 Thread Kirill Batuzov
On 19.09.2014 11:12, Zifei Tong wrote: After commit 812c1057f6175ac9a9829fa2920a2b5783814193 (Handle G_IO_HUP in tcp_chr_read for tcp chardev), connections are disconnected when in G_IO_HUP condition. However, it's possible that there is still data for reading in the channel. In that case, the r

Re: [Qemu-devel] [PATCH 0/2] Handle interferences between multiple children drivers and stream and commit

2014-09-19 Thread Benoît Canet
On Fri, Sep 19, 2014 at 12:35:36AM -0400, Jeff Cody wrote: > On Mon, Sep 15, 2014 at 04:21:18PM +0200, Benoît Canet wrote: > > We do not want to try to stream or commit with a base argument through > > a multiple children driver. > > > > Handle this case. > > > > Benoît Canet (2): > > block: I

Re: [Qemu-devel] [PATCH v1] vl: Fix possible freed memory accessing

2014-09-19 Thread Peter Maydell
On 18 September 2014 23:54, Markus Armbruster wrote: > I think we should remove the whole thing: pcmcia_sockets, > pcmcia_socket_register(), pcmcia_socket_unregister, pcmcia_info(). > Here's why. > > It serves just one purpose: "info pcmcia". HMP-only, therefore not a > stable interface. But is

Re: [Qemu-devel] [PULL 00/01] Adding new syscalls to seccomp whitelist

2014-09-19 Thread Peter Maydell
On 19 September 2014 06:22, Eduardo Otubo wrote: > The following changes since commit 10e11f4d2bf171f99c6b13883a510acfbc5dd585: > > Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging > (2014-09-18 20:02:01 +0100) > > are available in the git repository at: > > > git://g

Re: [Qemu-devel] [INVITE] OVMF BoF session at the KVM Forum 2014

2014-09-19 Thread Ard Biesheuvel
On 18 September 2014 05:18, Laszlo Ersek wrote: > On 09/18/14 13:44, Andreas Färber wrote: >> Hello Laszlo, >> >> Am 18.09.2014 um 10:23 schrieb Laszlo Ersek: >>> I've been made an offer that I couldn't refuse :) to "organize" a Birds >>> of a Feather session concerning OVMF at the KVM Forum 2014.

Re: [Qemu-devel] [PULL 00/01] Adding new syscalls to seccomp whitelist

2014-09-19 Thread Eduardo Otubo
On Fri, Sep 19, 2014 at 4:15 PM, Peter Maydell wrote: > On 19 September 2014 06:22, Eduardo Otubo > wrote: >> The following changes since commit 10e11f4d2bf171f99c6b13883a510acfbc5dd585: >> >> Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging >> (2014-09-18 20:02:01 +01

[Qemu-devel] [PULL 00/59] Block patches

2014-09-19 Thread Stefan Hajnoczi
The following changes since commit 10e11f4d2bf171f99c6b13883a510acfbc5dd585: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2014-09-18 20:02:01 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request for you to

[Qemu-devel] [PULL 01/59] block/vhdx.c: Mark parent_vhdx_guid variable as unused

2014-09-19 Thread Stefan Hajnoczi
From: Peter Maydell The parent_vhdx_guid variable is defined but never used, which provokes complaints from newer versions of clang. Since the variable definition is here acting as documentation of the image format, mark it with the 'unused' attribute to keep the compiler happy rather than simply

[Qemu-devel] [PULL 07/59] block: Drop bdrv_em_co_aiocb_info.cancel

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng Also drop the now unused ->done pointer. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block.c | 21 - 1 file changed, 21 deletions(-) diff --git a/block.c b/block.c index a9a48df..1ce7b99 100644 --- a/block.c +++ b/block.c @@ -4763,22 +4763,

[Qemu-devel] [PULL 03/59] aio-win32: fix uninitialized use of have_select_revents

2014-09-19 Thread Stefan Hajnoczi
From: Paolo Bonzini Always initialize it with the return value of aio_prepare. Reported-by: TeLeMan Signed-off-by: Paolo Bonzini Reviewed-by: Stefan Hajnoczi Reviewed-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- aio-win32.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) dif

[Qemu-devel] [PULL 02/59] ide/atapi: Mark non-data commands as complete

2014-09-19 Thread Stefan Hajnoczi
From: John Snow When the command completion code in IDE and AHCI was unified to put all command completion inside of a callback, "cmd_done," we neglected to ensure that all AHCI/ATAPI command paths would eventually register as finished. for the PCI interface to IDE this is not a problem because c

[Qemu-devel] [PULL 05/59] block: Add refcnt in BlockDriverAIOCB

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng This will be useful in synchronous cancel emulation with bdrv_aio_cancel_async. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block.c | 12 +++- include/block/aio.h | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/block.

[Qemu-devel] [PULL 04/59] ide/ahci: Check for -ECANCELED in aio callbacks

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng Before, bdrv_aio_cancel will either complete the request (like normal) and call CB with an actual return code, or skip calling the request (for example when the IO req is not submitted by thread pool yet). We will change bdrv_aio_cancel to do it differently: always call CB before

[Qemu-devel] [PULL 09/59] thread-pool: Convert thread_pool_aiocb_info.cancel to cancel_async

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng The .cancel_async shares the same the first half with .cancel: try to steal the request if not submitted yet. In this case set the elem to THREAD_DONE status and ret to -ECANCELED, which means thread_pool_completion_bh will call the cb with -ECANCELED. If the request is already s

[Qemu-devel] [PULL 12/59] iscsi: Convert iscsi_aiocb_info.cancel to .cancel_async

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng Also drop the unused field "canceled". Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block/iscsi.c | 17 ++--- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index 84bcae8..f8328d6 100644 --- a/block/iscsi

[Qemu-devel] [PULL 08/59] block: Drop bdrv_em_aiocb_info.cancel

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/block.c b/block.c index 1ce7b99..45d3a5b 100644 --- a/block.c +++ b/block.c @@ -4681,18 +4681,8 @@ typedef struct BlockDriverAIOCBSync { int i

[Qemu-devel] [PULL 06/59] block: Add bdrv_aio_cancel_async

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng This is the async version of bdrv_aio_cancel, which doesn't block the caller. It guarantees that the cb is called either before returning or some time later. bdrv_aio_cancel can base on bdrv_aio_cancel_async, later we can convert all .io_cancel implementations to .io_cancel_async

[Qemu-devel] [PULL 11/59] dma: Convert dma_aiocb_info.cancel to .cancel_async

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng Just forward the request to bdrv_aio_cancel_async. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- dma-helpers.c | 20 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/dma-helpers.c b/dma-helpers.c index f6811fa..207b21e 100644 --

[Qemu-devel] [PULL 14/59] blkdebug: Drop blkdebug_aiocb_info.cancel

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block/blkdebug.c | 15 +-- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/block/blkdebug.c b/block/blkdebug.c index 69b330e..08131b3 100644 --- a/block/blkdebug.c +++ b/block/blkdebug.c @@ -5

[Qemu-devel] [PULL 10/59] linux-aio: Convert laio_aiocb_info.cancel to .cancel_async

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng Just call io_cancel (2), if it fails, it means the request is not canceled, so the event loop will eventually call qemu_laio_process_completion. In qemu_laio_process_completion, change to call the cb unconditionally. It is required by bdrv_aio_cancel_async. Signed-off-by: Fam Zh

[Qemu-devel] [PULL 13/59] archipelago: Drop archipelago_aiocb_info.cancel

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng The cancelled flag is no longer useful. Later the request will complete as before, and cb will be called. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block/archipelago.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/block

[Qemu-devel] [PULL 15/59] blkverify: Drop blkverify_aiocb_info.cancel

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng Also the finished pointer is not used any more. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block/blkverify.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/block/blkverify.c b/block/blkverify.c index 163064c..460393f 100644 --- a/block

[Qemu-devel] [PULL 19/59] quorum: Convert quorum_aiocb_info.cancel to .cancel_async

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng Before, we cancel all the child requests with bdrv_aio_cancel, then free the acb.. Now we just kick off asynchronous cancellation of child requests and return, we know quorum_aio_cb will be called later, so in the end quorum_aio_finalize will take care of calling the caller's cb.

[Qemu-devel] [PULL 16/59] curl: Drop curl_aiocb_info.cancel

2014-09-19 Thread Stefan Hajnoczi
From: Fam Zheng Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block/curl.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/block/curl.c b/block/curl.c index 938f9d9..6f5d6ae 100644 --- a/block/curl.c +++ b/block/curl.c @@ -613,14 +613,8 @@ out_noclean: return -EINVA

[Qemu-devel] [PULL 27/59] aio-win32: avoid out-of-bounds access to the events array

2014-09-19 Thread Stefan Hajnoczi
From: Paolo Bonzini If ret is WAIT_TIMEOUT and there was an event returned by select(), we can write to a location after the end of the array. But in that case we can retry the WaitForMultipleObjects call with the same set of events, so just move the event[ret - WAIT_OBJECT_0] assignment inside

  1   2   >