Re: [Qemu-devel] [v19 0/4] AMD IOMMU

2016-09-30 Thread David Kiarie
On Fri, Sep 30, 2016 at 4:55 PM, Paolo Bonzini wrote: > > > On 20/09/2016 17:42, David Kiarie wrote: >> Hi all, >> >> This patchset adds basic AMD IOMMU emulation support to Qemu. >> >> Resent this with some changes suggested by Michael. > > > Hi David, Hi Paolo, > > please fix the problems belo

Re: [Qemu-devel] [PATCH v2 7/7] intel-iommu: keep buggy EIM enabled in 2.7 machine type

2016-09-30 Thread Radim Krčmář
2016-09-30 13:40+0800, Peter Xu: > On Thu, Sep 29, 2016 at 01:23:29PM +0200, Radim Krčmář wrote: > > [...] > >> @@ -2481,11 +2482,14 @@ static void vtd_realize(DeviceState *dev, Error >> **errp) >> if (s->intr_eim == ON_OFF_AUTO_AUTO && !x86_iommu->intr_supported) { >> s->intr_eim

Re: [Qemu-devel] Virtio-net cli parameters

2016-09-30 Thread Stefan Hajnoczi
On Thu, Sep 29, 2016 at 04:11:27PM +0200, Pradeep Kiruvale wrote: > Hi Stefan, > > On 28 September 2016 at 10:29, Stefan Hajnoczi wrote: > > > On Mon, Sep 26, 2016 at 05:41:55PM +0200, Pradeep Kiruvale wrote: > > > I want to add couple of new cli options for the virtio-net driver and use > > > t

Re: [Qemu-devel] [PATCH 00/12] virtio: cleanup ioeventfd start/stop

2016-09-30 Thread Stefan Hajnoczi
On Wed, Sep 21, 2016 at 03:18:47PM +0200, Paolo Bonzini wrote: > Opinions, reviews and bug reports? Looks good in general but I've skipped the tricky parts. Stefan signature.asc Description: PGP signature

Re: [Qemu-devel] [PATCH v2 01/12] vfio/pci: Use local error object in vfio_initfn

2016-09-30 Thread Auger Eric
Hi Markus, On 22/09/2016 17:42, Markus Armbruster wrote: > Eric Auger writes: > >> To prepare for migration to realize, let's use a local error >> object in vfio_initfn. Also let's use the same error prefix for all >> error messages. >> >> On top of the 1-1 conversion, we start using a common er

Re: [Qemu-devel] [PATCH v4 05/11] target-i386: Remove underscores from property names

2016-09-30 Thread Eduardo Habkost
On Fri, Sep 30, 2016 at 09:29:58AM +0200, Jiri Denemark wrote: > On Thu, Sep 29, 2016 at 18:14:53 -0300, Eduardo Habkost wrote: > > Instead of translating the feature name entries when adding > > property names, store the actual property names in the feature > > name array. > > > > Signed-off-by:

Re: [Qemu-devel] [PATCH v4 11/11] target-i386: Return runnability information on query-cpu-definitions

2016-09-30 Thread Eduardo Habkost
On Fri, Sep 30, 2016 at 10:02:49AM +0200, Paolo Bonzini wrote: > On 29/09/2016 23:14, Eduardo Habkost wrote: > > +/* Return the feature property name for a feature flag bit */ > > +static const char *x86_cpu_feature_name(FeatureWord w, int bitnr) > > +{ > > +/* XSAVE components are automaticall

Re: [Qemu-devel] [PATCH v2 07/12] vfio: Pass an error object to vfio_get_group

2016-09-30 Thread Auger Eric
Hi Markus, On 22/09/2016 19:01, Markus Armbruster wrote: > Eric Auger writes: > >> Pass an error object to prepare for migration to VFIO-PCI realize. >> >> Signed-off-by: Eric Auger >> >> --- >> >> v2: creation >> --- >> hw/vfio/common.c | 20 +++- >> hw/vfio/pci.c

Re: [Qemu-devel] [PATCH 12/12] virtio: inline set_host_notifier_internal

2016-09-30 Thread Stefan Hajnoczi
On Wed, Sep 21, 2016 at 03:18:59PM +0200, Paolo Bonzini wrote: > This is only called from virtio_bus_set_host_notifier. > > Signed-off-by: Paolo Bonzini > --- > hw/virtio/virtio-bus.c | 60 > +- > 1 file changed, 25 insertions(+), 35 deletions(-)

Re: [Qemu-devel] [PATCH v2 02/12] vfio/pci: Pass an error object to vfio_populate_device

2016-09-30 Thread Auger Eric
Markus, On 22/09/2016 17:49, Markus Armbruster wrote: > Eric Auger writes: > >> Pass an error object to prepare for migration to VFIO-PCI realize. >> The returned value will be removed later on. >> >> The case where error recovery cannot be enabled is not converted into >> an error object but di

Re: [Qemu-devel] [PATCH v2 09/12] vfio/pci: Conversion to realize

2016-09-30 Thread Auger Eric
Hi, On 22/09/2016 19:24, Markus Armbruster wrote: > Eric Auger writes: > >> This patch converts VFIO PCI to realize function. >> >> Also original initfn errors now are propagated using QEMU >> error objects. All errors are formatted with the same pattern: >> "vfio: %s: the error description" >>

Re: [Qemu-devel] [PATCH 10/12] virtio: do not export set_host_notifier_internal

2016-09-30 Thread Stefan Hajnoczi
On Wed, Sep 21, 2016 at 03:18:57PM +0200, Paolo Bonzini wrote: > ioeventfd_disabled was the only reason for the default > implementation of virtio_device_start_ioeventfd_impl not to use > virtio_bus_set_host_notifier. This is now fixed, and the sole entry > point to set up ioeventfd can now be vir

Re: [Qemu-devel] [PATCH v2 04/12] vfio/pci: Pass an error object to vfio_intx_enable

2016-09-30 Thread Auger Eric
Markus, On 22/09/2016 18:27, Markus Armbruster wrote: > Eric Auger writes: > >> Pass an error object to prepare for migration to VFIO-PCI realize. >> >> The error object is propagated downto vfio_intx_enable_kvm > > down to vfio_intx_enable_kvm(). > > (feel free to omit the () I automatically

Re: [Qemu-devel] [PATCH v2 05/12] vfio/pci: Pass an error object to vfio_add_capabilities

2016-09-30 Thread Auger Eric
Hi Markus, On 22/09/2016 18:52, Markus Armbruster wrote: > Eric Auger writes: > >> Pass an error object to prepare for migration to VFIO-PCI realize. >> The error is cascaded downto vfio_add_std_cap and then vfio_msi(x)_setup, >> vfio_setup_pcie_cap. >> >> vfio_add_ext_cap does not return anythi

Re: [Qemu-devel] [PATCH 08/12] virtio: remove set_handler argument from set_host_notifier_internal

2016-09-30 Thread Stefan Hajnoczi
On Wed, Sep 21, 2016 at 03:18:55PM +0200, Paolo Bonzini wrote: > Make virtio_device_start_ioeventfd_impl use the same logic as > dataplane to set up the host notifier. This removes the need > for the set_handler argument in set_host_notifier_internal. > > This is a first step towards using virtio

Re: [Qemu-devel] [PATCH 07/12] Revert "virtio: Introduce virtio_add_queue_aio"

2016-09-30 Thread Stefan Hajnoczi
On Wed, Sep 21, 2016 at 03:18:54PM +0200, Paolo Bonzini wrote: > This reverts commit 872dd82c83745a603d2e07a03d34313eb6467ae4. > virtio_add_queue_aio is unused. > > Signed-off-by: Paolo Bonzini > --- > hw/virtio/virtio.c | 38 -- > include/hw/virtio/vi

Re: [Qemu-devel] [PATCH v2] tests: Run qtest cases in parallel

2016-09-30 Thread Marc-André Lureau
Hi On Thu, Sep 29, 2016 at 12:13 PM Fam Zheng wrote: > Previously all qtest cases in a category, such as check-qtest-y, are > executed in a single long gtester command. This patch separates each > test into its own make target to allow better parallism, unless gcov is > configured. > > Slightly

Re: [Qemu-devel] [PATCH 04/12] virtio: introduce virtio_device_ioeventfd_enabled

2016-09-30 Thread Stefan Hajnoczi
On Wed, Sep 21, 2016 at 03:18:51PM +0200, Paolo Bonzini wrote: > This will be used to forbid iothread configuration when the > proxy does not allow using ioeventfd. To simplify the implementation, > change the direction of the ioeventfd_disabled callback too. > > Signed-off-by: Paolo Bonzini > -

Re: [Qemu-devel] [PATCH v2 4/8] nvdimm acpi: implement Read FIT function

2016-09-30 Thread Igor Mammedov
On Fri, 12 Aug 2016 14:54:06 +0800 Xiao Guangrong wrote: > Read FIT whose function index is 0x is reserved by QEMU to read > the piece of FIT buffer. Please refer to docs/specs/acpi_nvdimm.txt for > detailed info Pls, squash this patch into 3/8 > > Signed-off-by: Xiao Guangrong > ---

Re: [Qemu-devel] [PATCH v2 3/8] nvdimm acpi: introduce _FIT

2016-09-30 Thread Igor Mammedov
On Fri, 12 Aug 2016 14:54:05 +0800 Xiao Guangrong wrote: > _FIT is required for hotplug support, guest will inquire the updated > device info from it if a hotplug event is received > > As FIT buffer is not completely mapped into guest address space, so a > new function, Read FIT whose function i

Re: [Qemu-devel] [PATCH 03/12] virtio: add start_ioeventfd and stop_ioeventfd to VirtioDeviceClass

2016-09-30 Thread Stefan Hajnoczi
On Wed, Sep 21, 2016 at 03:18:50PM +0200, Paolo Bonzini wrote: > Allow customization of the start and stop of ioeventfd. This will > allow direct start of dataplane without passing through the default > ioeventfd handlers, which in turn allows using the dataplane logic > instead of virtio_add_queu

Re: [Qemu-devel] [PATCH v3 8/8] vmxnet3: remove unnecessary internal msix state flag

2016-09-30 Thread Markus Armbruster
Cao jin writes: > On 09/29/2016 10:42 PM, Markus Armbruster wrote: >> Cao jin writes: >> > >>> static int vmxnet3_post_load(void *opaque, int version_id) >>> { >>> VMXNET3State *s = opaque; >>> -PCIDevice *d = PCI_DEVICE(s); >>> >>> net_tx_pkt_init(&s->tx_pkt, PCI_DEVICE(s),

Re: [Qemu-devel] [PATCH v2 1/1] qga: minimal support for fstrim for Windows guests

2016-09-30 Thread Marc-André Lureau
Hi On Fri, Sep 30, 2016 at 2:55 PM Denis V. Lunev wrote: > From: Denis Plotnikov > > Unfortunately, there is no public Windows API to start trimming the > filesystem. The only viable way here is to call 'defrag.exe /L' for > each volume. > > This is working since Win8 and Win2k12. > > Signed-of

[Qemu-devel] [PATCH v8 35/36] spapr_nvram: Add 'lock-mode' property

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/nvram/spapr_nvram.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/nvram/spapr_nvram.c b/hw/nvram/spapr_nvram.c index 4de5f70..b679e0b 100644 --- a/hw/nvram/spapr_nvram.c +++ b/hw/nvram/spapr_nvram.c @@ -39,6 +39,7 @@ typedef struct sPAPRNVRAM {

Re: [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-30 Thread Kevin Wolf
Am 30.09.2016 um 04:04 hat Fam Zheng geschrieben: > On Thu, 09/29 12:39, Kevin Wolf wrote: > > Am 29.09.2016 um 11:55 hat Fam Zheng geschrieben: > > > On Thu, 09/29 11:29, Kevin Wolf wrote: > > > > Am 28.09.2016 um 09:04 hat Fam Zheng geschrieben: > > > > > Handling this is similar to what is done

[Qemu-devel] [PATCH v8 34/36] onenand: Add 'lock-mode' property

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/onenand.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/block/onenand.c b/hw/block/onenand.c index 8d84227..9b058e8 100644 --- a/hw/block/onenand.c +++ b/hw/block/onenand.c @@ -778,6 +778,7 @@ static int onenand_initfn(SysBusDevice *sbd)

[Qemu-devel] [PATCH v8 36/36] sd: Add 'lock-mode' property

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/sd/sd.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 8e88e83..6c18fb8 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -124,6 +124,7 @@ struct SDState { qemu_irq readonly_cb; qemu_irq inserted_cb; BlockBackend

[Qemu-devel] [PATCH v8 32/36] m25p80: Add 'lock-mode' property

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/m25p80.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index d29ff4c..3c1765a 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -380,6 +380,7 @@ typedef struct Flash { SSISlave parent_obj;

[Qemu-devel] [PATCH v8 33/36] nand: Add 'lock-mode' property

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/nand.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/block/nand.c b/hw/block/nand.c index c69e675..75b5a68 100644 --- a/hw/block/nand.c +++ b/hw/block/nand.c @@ -64,6 +64,7 @@ struct NANDFlashState { int page_shift, oob_shift, erase_shif

[Qemu-devel] [PATCH v8 31/36] fdc: Add lock-mode qdev properties

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/fdc.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index b79873a..20684b8 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -158,6 +158,7 @@ typedef enum FDiskFlags { typedef struct

[Qemu-devel] [PATCH v8 26/36] iotests: Disable image locking in 085

2016-09-30 Thread Fam Zheng
The cases is about live snapshot features. Disable image locking because otherwise a few tests are going to fail because we reuse the same images at blockdev-add. Signed-off-by: Fam Zheng --- tests/qemu-iotests/085 | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/qe

[Qemu-devel] [PATCH v8 29/36] ahci: Use shared lock for shared storage migration

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/ahci-test.c | 27 +-- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/tests/ahci-test.c b/tests/ahci-test.c index 9c0adce..838ff45 100644 --- a/tests/ahci-test.c +++ b/tests/ahci-test.c @@ -1132,10 +1132,14 @@ static void

[Qemu-devel] [PATCH v8 30/36] tests/postcopy: Use shared lock for images

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/postcopy-test.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/postcopy-test.c b/tests/postcopy-test.c index 41ed1a9..3ec4d01 100644 --- a/tests/postcopy-test.c +++ b/tests/postcopy-test.c @@ -371,12 +371,14 @@ static void tes

[Qemu-devel] [PATCH v8 20/36] qemu-iotests: 046: Move version detection out from verify_io

2016-09-30 Thread Fam Zheng
So the image lock won't complain. Signed-off-by: Fam Zheng --- tests/qemu-iotests/046 | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046 index e528b67..f15ccbf 100755 --- a/tests/qemu-iotests/046 +++ b/test

[Qemu-devel] [PATCH v8 28/36] qemu-iotests: Add test case 153 for image locking

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/153 | 197 + tests/qemu-iotests/153.out | 426 + tests/qemu-iotests/group | 1 + 3 files changed, 624 insertions(+) create mode 100755 tests/qemu-iotest

[Qemu-devel] [PATCH v8 27/36] tests: Use null-co:// instead of /dev/null

2016-09-30 Thread Fam Zheng
With image locking, opening /dev/null can fail when multiple tests run in parallel (make -j2, for example). Use null-co:// as the null protocol doesn't do image locking. While it's arguable we could special-case /dev/null, /dev/zero, /dev/urandom etc in raw-posix driver, it is not really necessary

[Qemu-devel] [PATCH v8 24/36] iotests: 087: Disable image locking in cases where file is shared

2016-09-30 Thread Fam Zheng
Otherwise the error handling we are expecting will be masked by the preceding image locking check, and is going to be indistinguishable because the error messages are all the same. Signed-off-by: Fam Zheng --- tests/qemu-iotests/087 | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/qemu

[Qemu-devel] [PATCH v8 19/36] pflash: Add "lock-mode" property

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/pflash_cfi01.c | 10 ++ hw/block/pflash_cfi02.c | 9 + 2 files changed, 19 insertions(+) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 62d7a56..df82471 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c

[Qemu-devel] [PATCH v8 25/36] iotests: 130: Check image info locklessly

2016-09-30 Thread Fam Zheng
By the time _img_info is run, QEMU process's resources may still be on its way being cleaned up, asynchronously, even though the process itself is already gone after the "kill -KILL" and "wait" commands in _cleanup_qemu. Change the last HMP command to 'q' to ensure the locks are released. Signed-

[Qemu-devel] [PATCH v8 21/36] qemu-iotests: 091: Prepare for image lock

2016-09-30 Thread Fam Zheng
We should wait for the QEMU process to terminate and close the image before we check the data. Also use shared lock in migration source and target. Signed-off-by: Fam Zheng --- tests/qemu-iotests/091 | 9 +++-- tests/qemu-iotests/091.out | 1 + 2 files changed, 8 insertions(+), 2 deleti

[Qemu-devel] [PATCH v8 22/36] qemu-iotests: 030: Disable image locking when checking test image

2016-09-30 Thread Fam Zheng
The VM is running, qemu-io would fail the lock acquisition. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/030 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030 index 107049b..acae67e 100755 --- a/tests/qe

[Qemu-devel] [PATCH v8 17/36] nvme: Apply lock-mode when initialize

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/nvme.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index cef3bb4..318dc94 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -829,7 +829,7 @@ static int nvme_init(PCIDevice *pci_dev) { Nv

[Qemu-devel] [PATCH v8 23/36] iotests: 087: Disable image locking in cases where file is shared

2016-09-30 Thread Fam Zheng
Otherwise the error handling we are expecting will be masked by the preceding image locking check, and is going to be indistinguishable because the error messages are all the same. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- tests/qemu-iotests/087 | 2 ++ 1 file changed, 2 insertions(+)

[Qemu-devel] [PATCH v8 14/36] scsi-generic: Apply lock-mode when realize

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/scsi/scsi-generic.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c index 7a588a7..4f131e8 100644 --- a/hw/scsi/scsi-generic.c +++ b/hw/scsi/scsi-generic.c @@ -502,12 +502,19 @@ static void scsi_generic_rea

[Qemu-devel] [PATCH v8 18/36] usb-storage: Apply lock-mode when realize

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/usb/dev-storage.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index c607f76..6d0c00e 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -600,6 +600,11 @@ static void usb_msd_realize_storage(USBDe

[Qemu-devel] [PATCH v8 09/36] qemu-nbd: Add "--no-lock/-L" option

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- qemu-nbd.c| 7 ++- qemu-nbd.texi | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index 99297a5..6585b2c 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -102,6 +102,7 @@ static void usage(const c

[Qemu-devel] [PATCH v8 10/36] block: Don't lock drive-backup target image in none mode

2016-09-30 Thread Fam Zheng
As a very special case, in sync=none mode, the source is the backing image of the target, which will be RO opened again. This won't work with image locking because the first open could be exclusive. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz --- blockdev.c | 5 + 1 file changed, 5 inse

[Qemu-devel] [PATCH v8 13/36] scsi-disk: Apply lock-mode when realize

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/scsi/scsi-disk.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 88beaf4..fb406a0 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -2288,6 +2288,12 @@ static void scsi_realize(SCSIDevice *dev, E

[Qemu-devel] [PATCH v8 16/36] ide: Apply lock-mode when initialize

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/ide/core.c | 10 +- hw/ide/qdev.c | 2 +- include/hw/ide/internal.h | 3 ++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index b0e42a6..a426baf 100644 --- a/hw/ide/core.c +++ b/hw/i

[Qemu-devel] [PATCH v8 07/36] qemu-img: Add "-L" option to sub commands

2016-09-30 Thread Fam Zheng
If specified, BDRV_O_NO_LOCK flag will be set when opening the image. Signed-off-by: Fam Zheng --- qemu-img.c | 91 +- 1 file changed, 72 insertions(+), 19 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index ceffefe..e8d0e78 100644

[Qemu-devel] [PATCH v8 12/36] virtio-blk: Apply lock-mode when realize

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/block/virtio-blk.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 3a6112f..ce65615 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -896,6 +896,11 @@ static void virtio_blk_device_realiz

[Qemu-devel] [PATCH v8 15/36] qdev: Add "lock-mode" to block device options

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- hw/core/qdev-properties.c| 10 ++ include/hw/block/block.h | 1 + include/hw/qdev-properties.h | 3 +++ 3 files changed, 14 insertions(+) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 311af6d..829b143 100644 --- a/hw/core/

[Qemu-devel] [PATCH v8 08/36] qemu-img: Update documentation of "-L" option

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- qemu-img-cmds.hx | 44 ++-- qemu-img.c | 1 + qemu-img.texi| 3 +++ 3 files changed, 26 insertions(+), 22 deletions(-) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index f054599..eaca454 100644 --- a/qemu-img-cm

[Qemu-devel] [PATCH v8 04/36] osdep: Add qemu_lock_fd and qemu_unlock_fd

2016-09-30 Thread Fam Zheng
They are wrappers of POSIX fcntl "file private locking". Signed-off-by: Fam Zheng --- include/qemu/osdep.h | 2 ++ util/osdep.c | 29 + 2 files changed, 31 insertions(+) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 9e9fa61..f773f49 100644 -

[Qemu-devel] [PATCH v8 11/36] block: Add blk_lock_image

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/block-backend.c | 18 ++ include/sysemu/block-backend.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/block/block-backend.c b/block/block-backend.c index 0bd19ab..dc1ad36 100644 --- a/block/block-backend.c +++ b/block/block-ba

[Qemu-devel] [PATCH v8 05/36] raw-posix: Add image locking support

2016-09-30 Thread Fam Zheng
virtlockd in libvirt locks the first byte, we lock byte 1 to avoid the intervene. Both file and host device protocols are covered. The complication is with reopen. We have three different locking states, namely "unlocked", "shared locked" and "exclusively locked". When we reopen, the new fd may

[Qemu-devel] [PATCH v8 06/36] qemu-io: Add "-L" option for BDRV_O_NO_LOCK

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- qemu-io.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index db129ea..5c14eba 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -108,6 +108,7 @@ static void open_help(void) " -r, -- open file read-only\n"

[Qemu-devel] [PATCH v8 01/36] block: Add flag bits for image locking

2016-09-30 Thread Fam Zheng
Later the block layer will automatically lock the images to avoid unexpected concurrent accesses to the same image, which will easily corrupt the metadata or user data, unless in some very special cases, like migration. The exceptional cases like shared storage migration and testing should set BDR

[Qemu-devel] [PATCH v8 03/36] block: Introduce image file locking

2016-09-30 Thread Fam Zheng
Block drivers can implement this new operation .bdrv_lockf to actually lock the image in the protocol specific way. Signed-off-by: Fam Zheng --- block.c | 52 +++ include/block/block.h | 4 +++- include/block/block_int.h | 5 +++

[Qemu-devel] [PATCH v8 02/36] qapi: Add ImageLockMode

2016-09-30 Thread Fam Zheng
Signed-off-by: Fam Zheng --- qapi/block-core.json | 18 ++ 1 file changed, 18 insertions(+) diff --git a/qapi/block-core.json b/qapi/block-core.json index 92193ab..22e8d04 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2754,3 +2754,21 @@ 'data' : { 'parent':

[Qemu-devel] [PATCH v8 00/36] block: Image locking series

2016-09-30 Thread Fam Zheng
Hi all, I wanted to post something before the long holiday as promised, but I couldn't refine or test enough due to limited time. Please take this as an RFC and do a high level review. Thanks. v8: Move user interface option from block device to qdev. [Kevin] Add "exclusive" back. [Kevin]

Re: [Qemu-devel] [PATCH 1/2] vhost: enable any layout feature

2016-09-30 Thread Maxime Coquelin
On 09/29/2016 11:23 PM, Maxime Coquelin wrote: On 09/29/2016 10:21 PM, Michael S. Tsirkin wrote: On Thu, Sep 29, 2016 at 10:05:22PM +0200, Maxime Coquelin wrote: On 09/29/2016 07:57 PM, Michael S. Tsirkin wrote: On Thu, Sep 29, 2016 at 05:30:53PM +0200, Maxime Coquelin wrote: ... Befo

Re: [Qemu-devel] [PATCH v4 0/2] Produce better termination message

2016-09-30 Thread Paolo Bonzini
On 27/09/2016 17:24, Michal Privoznik wrote: > v3 of: > http://lists.nongnu.org/archive/html/qemu-devel/2016-09/msg05058.html > > diff to v3: > - Rework 2/2 so that no malloc() is done in signal handler since it's not > re-entrant. > > Michal Privoznik (2): > util: Introduce qemu_get_pid_nam

Re: [Qemu-devel] [PATCH v7 3/4] vfio iommu: Add support for mediated devices

2016-09-30 Thread Kirti Wankhede
On 9/30/2016 8:40 AM, Jike Song wrote: > On 09/30/2016 10:58 AM, Jike Song wrote: >> On 09/29/2016 11:06 PM, Kirti Wankhede wrote: >>> >>> >>> On 9/29/2016 7:47 AM, Jike Song wrote: +Guangrong On 08/25/2016 11:53 AM, Kirti Wankhede wrote: >>> >>> ... >>> > +static long vfio_iom

Re: [Qemu-devel] [PATCH v4] hw/misc: Add simple measurement hardware

2016-09-30 Thread Paolo Bonzini
On 30/09/2016 12:45, Dr. David Alan Gilbert wrote: >> > >> > This version of the implementation depends on port io, but if there's >> > interest I'll add mmio as well. > Other than a couple of nits I'll mention below (and Stefan's comment) > I don't see why we shouldn't have this; although we'll

[Qemu-devel] [PATCH 07/22] qcow2-bitmap: introduce auto-loading bitmaps

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Auto loading bitmaps are bitmaps in Qcow2, with AUTO flag set. They are loaded at image open and becomes BdrvDirtyBitmap's for corresponding drive. These bitmaps are deleted from Qcow2 image after loading to avoid conflicts. Extra data in bitmaps is not supported for now. Signed-off-by: Vladimir

[Qemu-devel] [PATCH 04/22] block/dirty-bitmap: add deserialize_ones func

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Add bdrv_dirty_bitmap_deserialize_ones() function, which is needed for qcow2 bitmap loading, to handle unallocated bitmap parts, marked as all-ones. Reviewed-by: Kevin Wolf Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 7 +++ include/block/dirty-bitmap.h |

Re: [Qemu-devel] [PATCH v2 5/6] intc: make HMP 'info irq' and 'info pic' commands use InterruptStatsProvider interface

2016-09-30 Thread Paolo Bonzini
On 26/09/2016 22:23, Hervé Poussineau wrote: > Signed-off-by: Hervé Poussineau > --- > hmp-commands-info.hx | 12 - > hmp.c | 65 > ++ > hmp.h | 2 ++ > hw/intc/i8259.c| 36

Re: [Qemu-devel] [PATCH v2 0/9] A couple of fixes for ThreadSanitizer

2016-09-30 Thread Paolo Bonzini
On 22/09/2016 12:13, Alex Bennée wrote: > Hi, > > This is v2 of the ThreadSanitizer fixes. Changes from the last > version: > > - added Marc-André's review tags > - added qga/command: use QEMU atomic primitives > - simplified ui/vnc-enc-tight: remove switch and have single return > - fi

[Qemu-devel] [PATCH 10/22] block/dirty-bitmap: add bdrv_dirty_bitmap_next()

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 7 +++ include/block/dirty-bitmap.h | 3 +++ 2 files changed, 10 insertions(+) diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c index 0314581..392d660 100644 --- a/block/dirty-bitmap.c +++ b/block/dirty-bi

[Qemu-devel] [Bug 1629282] [NEW] QEMU (still) hangs on Windows 7 install

2016-09-30 Thread Mary Sherman
Public bug reported: I'm trying to install Windows 7 as guest, but the machine still hangs (more precisely, the windows icon keeps flashing, but never goes past this stage). I think this is a different bug from https://bugs.launchpad.net/qemu/+bug/1581936. Specifically, its happens when the OVMF

Re: [Qemu-devel] [PATCH 00/18] Dirty bitmaps postcopy migration

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
ping For now there are some notes mostly about accessory patches. What about migration itself? On 16.08.2016 13:25, Vladimir Sementsov-Ogievskiy wrote: v2: some bugs fixed, iotests a bit changed and merged into one test. based on block-next (https://github.com/XanClic/qemu/commits/block-next)

[Qemu-devel] [PATCH 22/22] specs/qcow2: do not use wording 'bitmap header'

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
For now bitmap directory entry some times called 'bitmap header'. This patch leaves only one name - 'bitmap directory entry'. The name 'bitmap header' creates misunderstandings with 'qcow2 header' and 'qcow2 bitmap header extension' (which is extension of qcow2 header) Signed-off-by: Vladimir Seme

Re: [Qemu-devel] [PATCH 1/1] target-i386: Correct family/model/stepping for Opteron_G3 (2350)

2016-09-30 Thread Paolo Bonzini
On 30/09/2016 12:28, Denis V. Lunev wrote: > From: Evgeny Yakovlev > > Current CPU definition for AMD Opteron third generation includes > features like SSE4a and LAHF_LM support in emulated CPUID. These > features are present in K8 rev.E or K10 CPUs and later. However, > current G3 family and m

[Qemu-devel] [PATCH 11/22] qcow2-bitmap: add qcow2_store_persistent_bitmaps()

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Realize block bitmap stroing interface, to allow qcow2 images store persistent bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 241 +++ block/qcow2.c| 2 + block/qcow2.h| 2 + 3 files changed, 245

[Qemu-devel] [PATCH 08/22] block/dirty-bitmap: add autoload field to BdrvDirtyBitmap

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Mirror AUTO flag from Qcow2 bitmap in BdrvDirtyBitmap. This will be needed in future, to save this flag back to Qcow2 for persistent bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 15 +++ block/qcow2-bitmap.c | 2 ++ include/block/dir

[Qemu-devel] [PATCH 09/22] block: introduce persistent dirty bitmaps

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
New field BdrvDirtyBitmap.persistent means, that bitmap should be saved on bdrv_close, using format driver. Format driver should maintain bitmap storing. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block.c | 30 ++ block/dirty-bitmap.c

[Qemu-devel] [PATCH 05/22] qcow2-bitmap: structs and consts

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Create block/qcow2-bitmap.c Add data structures and constraints accordingly to docs/specs/qcow2.txt Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/Makefile.objs | 2 +- block/qcow2-bitmap.c | 47 +++ block/qcow2.h| 29 +

[Qemu-devel] [PATCH 12/22] qcow2-bitmap: add IN_USE flag

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
This flag means that the bitmap is now in use by the software or was not successfully saved. In any way, with this flag set the bitmap data must be considered inconsistent and should not be loaded. With current implementation this flag is never set, as we just remove bitmaps from the image after l

[Qemu-devel] [PATCH 03/22] block: fix bdrv_dirty_bitmap_granularity signature

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Make getter signature const-correct. This allows other functions with const dirty bitmap parameter use bdrv_dirty_bitmap_granularity(). Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Kevin Wolf Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 2 +- i

[Qemu-devel] [PATCH v2 1/1] qga: minimal support for fstrim for Windows guests

2016-09-30 Thread Denis V. Lunev
From: Denis Plotnikov Unfortunately, there is no public Windows API to start trimming the filesystem. The only viable way here is to call 'defrag.exe /L' for each volume. This is working since Win8 and Win2k12. Signed-off-by: Denis V. Lunev Signed-off-by: Denis Plotnikov CC: Michael Roth CC:

[Qemu-devel] [PATCH 18/22] qapi: add md5 checksum of last dirty bitmap level to query-block

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Reviewed-by: John Snow Reviewed-by: Eric Blake Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 1 + include/qemu/hbitmap.h | 8 qapi/block-core.json | 5 - util/hbitmap.c | 8 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a

[Qemu-devel] [PATCH 19/22] iotests: test qcow2 persistent dirty bitmap

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/165 | 87 ++ tests/qemu-iotests/165.out | 5 +++ tests/qemu-iotests/group | 1 + 3 files changed, 93 insertions(+) create mode 100755 tests/qemu-iotests/165 create mode 100644

[Qemu-devel] [PATCH 13/22] qcow2-bitmap: check constraints

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Check bitmap header constraints as specified in docs/specs/qcow2.txt Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c index 8cf40f0..1c3abe

[Qemu-devel] [PATCH 17/22] qmp: add autoload parameter to block-dirty-bitmap-add

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Optional. Default is false. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev --- blockdev.c | 22 -- qapi/block-core.json | 7 ++- qmp-commands.hx | 5 - 3 files changed, 30 insertions(+), 4 deletions(-) diff --git a/blockde

[Qemu-devel] [PATCH 20/22] qcow2-dirty-bitmap: refcounts

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Calculate refcounts for dirty bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 60 ++ block/qcow2-refcount.c | 14 +++- block/qcow2.h | 5 + 3 files changed, 74 insertions(+), 5 deletions(-) d

[Qemu-devel] [PATCH 01/22] hbitmap: improve dirty iter

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Make dirty iter resistant to resetting bits in corresponding HBitmap. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/hbitmap.h | 24 ++-- util/hbitmap.c | 23 ++- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/includ

[Qemu-devel] [PATCH 06/22] qcow2: add dirty bitmaps extension

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Add dirty bitmap extension as specified in docs/specs/qcow2.txt. For now, just mirror extension header into Qcow2 state and check constraints. For now, disable image resize if it has bitmaps. It will be fixed later. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2.c | 83

[Qemu-devel] [PATCH v7 00/22] qcow2: persistent dirty bitmaps

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
v7: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=refs%2Ftags%2Fqcow2-bitmap-v7 based on block-next (https://github.com/XanClic/qemu/commits/block-next) - a lot of refactoring and reordering of patches. - dead code removed (bdrv_dirty_bitmap_load, etc.) - do not maintain extra data

[Qemu-devel] [PATCH 15/22] qcow2-bitmap: add autoclear bit

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Add autoclear bit for handling rewriting image by old qemu version. If autoclear bit is not set, but bitmaps extension is found it would not be loaded and warning will be generated. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 4 block/qcow2.c| 12 +++

[Qemu-devel] [PATCH 16/22] qmp: add persistent flag to block-dirty-bitmap-add

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Add optional 'persistent' flag to qmp command block-dirty-bitmap-add. Default is false. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev --- blockdev.c | 12 +++- qapi/block-core.json | 7 ++- qmp-commands.hx | 5 - 3 files changed, 21 i

Re: [Qemu-devel] [Qemu-block] [PATCH] block: modify top-id's comments

2016-09-30 Thread Stefan Hajnoczi
On Fri, Sep 30, 2016 at 11:48:44AM +0200, Kashyap Chamarthy wrote: > On Fri, Sep 30, 2016 at 04:53:38PM +0800, Wang WeiWei wrote: > > Kevin Wolf's advice: > > http://lists.gnu.org/archive/html/qemu-devel/2016-09/msg02391.html > > IIUC, what Stefan meant is to write a simple descriptive commit mess

[Qemu-devel] [PATCH 14/22] qcow2: delete bitmaps on truncate

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
This will not touch loaded bitmaps, as they are alredy removed from the image. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/qcow2-bitmap.c | 38 ++ block/qcow2.c| 9 ++--- block/qcow2.h| 2 ++ 3 files changed, 46 insertions(+), 3

Re: [Qemu-devel] [PATCH v1 1/1] target-arm: A64: Fix decoding of iss_sf in disas_ld_lit

2016-09-30 Thread Edgar E. Iglesias
On Fri, Sep 30, 2016 at 12:42:27PM +0200, Thomas Huth wrote: > On 30.09.2016 12:19, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Fix the decoding of iss_sf in disas_ld_lit. > > The SF (Sixty-Four) field in the ISS (Instruction Specific Syndrome) > > is a bit that specifies the w

Re: [Qemu-devel] [PATCH 3/3] tests: enable virtio tests on SPAPR

2016-09-30 Thread Greg Kurz
On Fri, 30 Sep 2016 12:30:08 +0200 Laurent Vivier wrote: > On 30/09/2016 12:18, Greg Kurz wrote: > > On Thu, 29 Sep 2016 19:15:07 +0200 > > Laurent Vivier wrote: > > > >> but disable MSI-X tests on SPAPR as we can't check the result > >> (the memory region used on PC is not readable on SPAPR)

[Qemu-devel] [PATCH 02/22] tests: add hbitmap iter test

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Test that hbitmap iter is resistant to bitmap resetting. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev --- tests/test-hbitmap.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tests/test-hbitmap.c b/tests/test-hbitmap.c index 0ed918c..e24377f

[Qemu-devel] [PULL 2/8] s390x/pci: assign msix io region for each pci device

2016-09-30 Thread Christian Borntraeger
From: Yi Min Zhao For efficiency we now assign one msix io region for each pci device and provide it with the pointer to the zPCI device as opaque parameter. In addition, we remove msix address space and add msix io region as a subregion to the root memory region of pci device. Signed-off-by: Yi

[Qemu-devel] [PULL 8/8] s390x/kvm: fix build against qemu_uuid

2016-09-30 Thread Christian Borntraeger
commit 9c5ce8db2e5c ("vl: Switch qemu_uuid to QemuUUID") changed most users of qemu_uuid but not all. Fix a build error on s390/kvm. Reviewed-by: Fam Zheng Signed-off-by: Christian Borntraeger --- target-s390x/kvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target-s390

[Qemu-devel] [PULL 7/8] s390x/css: {c, h, t, r, x}sch: require enable AND device number valid

2016-09-30 Thread Christian Borntraeger
From: Sascha Silbe According to the PoP, subchannels are only considered operational if they are enabled _and_ the device number is valid. With the current checks being enabled _or_ having a valid device number was sufficient. This caused qemu to allow IO on subchannels that were not enabled. Fi

[Qemu-devel] [PATCH 21/22] specs/qcow2: fix bitmap granularity qemu-specific note

2016-09-30 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- docs/specs/qcow2.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt index 80cdfd0..d3e292f 100644 --- a/docs/specs/qcow2.txt +++ b/docs/specs/qcow2.txt @@ -472,8 +472,7 @@ Structure

<    1   2   3   4   >