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

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

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

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

[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

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

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

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

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

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

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 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 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 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 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] 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 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 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 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 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 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 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 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 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 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 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 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 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] 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 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] [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 v5 04/20] trace: convert code to use event iterators

2016-09-30 Thread Lluís Vilanova
Daniel P Berrange writes: > This converts the HMP/QMP monitor API implementations > and some internal trace control methods to use the new > trace event iterator APIs. > Reviewed-by: Stefan Hajnoczi > Signed-off-by: Daniel P. Berrange > --- > monitor.c | 26 ++ > trace/co

Re: [Qemu-devel] [Qemu-block] [PATCH v3] block: Turn on "unmap" in active commit

2016-09-30 Thread Stefan Hajnoczi
On Fri, Sep 30, 2016 at 10:12:05AM +0800, Fam Zheng wrote: > On Thu, 09/29 13:41, Stefan Hajnoczi wrote: > > On Tue, Sep 27, 2016 at 07:14:52PM +0800, Fam Zheng wrote: > > > We already specified BDRV_O_UNMAP when opening images in 'qemu-img > > > commit', but didn't turn on the "unmap" in the activ

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

2016-09-30 Thread Paolo Bonzini
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, please fix the problems below, that were reported by Coverity. Paolo ** CID 1363372: Uninitialized v

Re: [Qemu-devel] [PATCH v2 5/7] intel-iommu: add OnOffAuto intr_eim as "eim" property

2016-09-30 Thread Radim Krčmář
2016-09-30 13:13+0800, Peter Xu: > On Thu, Sep 29, 2016 at 01:23:27PM +0200, Radim Krčmář wrote: >> diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c >> @@ -2466,6 +2472,18 @@ static void vtd_realize(DeviceState *dev, Error >> **errp) >> exit(1); >> } >> >> +if (s->int

Re: [Qemu-devel] [PATCH v2 8/8] nvdimm docs: add nvdimm Read FIT function

2016-09-30 Thread Igor Mammedov
On Fri, 12 Aug 2016 14:54:10 +0800 Xiao Guangrong wrote: > Add the specification of Read FIT function should be squashed into 3/8 > > Signed-off-by: Xiao Guangrong > --- > docs/specs/acpi_nvdimm.txt | 38 +++--- > 1 file changed, 35 insertions(+), 3 deletions(-

Re: [Qemu-devel] [PATCH V15 00/12] Introduce COLO-Proxy

2016-09-30 Thread Paolo Bonzini
On 27/09/2016 04:22, Zhang Chen wrote: > COLO-proxy is a part of COLO project. COLO project is > composed of COLO-frame, COLO-proxy and block-replication. > It is used to compare the network package to help COLO > decide whether to do checkpoint. With COLO-proxy's help, > COLO greatly improves th

Re: [Qemu-devel] [PATCH v2 1/5] msix_init: assert programming error

2016-09-30 Thread Markus Armbruster
Alex Williamson writes: > On Thu, 29 Sep 2016 15:11:27 +0200 > Markus Armbruster wrote: > >> Alex Williamson writes: >> >> > On Tue, 13 Sep 2016 08:16:20 +0200 >> > Markus Armbruster wrote: >> > >> >> Cc: Alex for device assignment expertise. >> >> >> >> Cao jin writes: >> >> >> >> > O

Re: [Qemu-devel] [PATCH v5 09/20] trace: give each trace event a named TraceEvent struct

2016-09-30 Thread Lluís Vilanova
Daniel P Berrange writes: > Currently we only expose a TraceEvent array, which must > be indexed via the TraceEventID enum constants. This > changes the generator to expose a named TraceEvent > instance for each event, with an _EVENT suffix. > Signed-off-by: Daniel P. Berrange Besides the comme

Re: [Qemu-devel] [PATCH v5 14/20] trace: dynamically allocate trace_dstate in CPUState

2016-09-30 Thread Lluís Vilanova
Daniel P Berrange writes: > The CPUState struct has a bitmap tracking which VCPU > events are currently active. This is indexed based on > the event ID values, and sized according the maximum > TraceEventVCPUID enum value. > When we start dynamically assigning IDs at runtime, > we can't staticall

[Qemu-devel] [PATCH v2 2/3] qtest: evaluate endianness of the target in qtest_init()

2016-09-30 Thread Laurent Vivier
This allows to store it and not have to rescan the list each time we need it. Signed-off-by: Laurent Vivier Reviewed-by: Greg Kurz Reviewed-by: David Gibson --- tests/libqos/virtio-pci.c | 2 +- tests/libqtest.c | 96 +-- tests/libqtest.h

[Qemu-devel] [PATCH 07/12] virtio-input: convert to VIRTIO_DEF_DEVICE_VMSD

2016-09-30 Thread Halil Pasic
Refactor so the previously introduced VIRTIO_DEF_DEVICE_VMSD replaces VMSTATE_VIRTIO_DEVICE. Signed-off-by: Halil Pasic --- hw/input/virtio-input.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/hw/input/virtio-input.c b/hw/input/virtio-input.c index ccdf730..

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

2016-09-30 Thread Laurent Vivier
This series enables virtio tests on SPAPR by starting machines using qtest_pc_boot() or qtest_spapr_boot() to use the good libqos PCI framework (pc or spapr). It adds also some byte-swapping in virtio-pci.c as PCI is always little-endian and the endianness of the virtio device depends on the endia

[Qemu-devel] [PATCH 02/12] virtio-blk: convert to VIRTIO_DEF_DEVICE_VMSD

2016-09-30 Thread Halil Pasic
Refactor so the previously introduced VIRTIO_DEF_DEVICE_VMSD replaces VMSTATE_VIRTIO_DEVICE. Signed-off-by: Halil Pasic --- hw/block/virtio-blk.c | 17 + 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 3a6112f..c6f

[Qemu-devel] [PATCH v2 1/3] tests: use qtest_pc_boot()/qtest_shutdown() in virtio tests

2016-09-30 Thread Laurent Vivier
This patch replaces calls to qtest_start() and qtest_end() by calls to qtest_pc_boot() and qtest_shutdown(). This allows to initialize memory allocator and PCI interface functions. This will ease to enable virtio tests on other architectures by only adding a specific qtest_XXX_boot() (like qtest_s

[Qemu-devel] [PATCH 12/12] virtio: remove unused VMSTATE_VIRTIO_DEVICE

2016-09-30 Thread Halil Pasic
Previously we mande sure VMSTATE_VIRTIO_DEVICE is not used any more. Let us remove it along with the associated wrapper function. Signed-off-by: Halil Pasic --- hw/virtio/virtio.c | 6 -- include/hw/virtio/virtio.h | 20 2 files changed, 26 deletions(-) diff --

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

2016-09-30 Thread Laurent Vivier
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). Signed-off-by: Laurent Vivier --- tests/Makefile.include| 3 ++- tests/libqos/virtio-pci.c | 26 -- tests/virtio-9p-test.c| 12 +++- tes

[Qemu-devel] [PATCH 10/12] virtio-rng: convert to VIRTIO_DEF_DEVICE_VMSD

2016-09-30 Thread Halil Pasic
Refactor so the previously introduced VIRTIO_DEF_DEVICE_VMSD replaces VMSTATE_VIRTIO_DEVICE. Signed-off-by: Halil Pasic --- hw/virtio/virtio-rng.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index cd8ca10..018d44d

Re: [Qemu-devel] [Qemu-block] [PATCH v3] block: Turn on "unmap" in active commit

2016-09-30 Thread Kevin Wolf
Am 30.09.2016 um 04:12 hat Fam Zheng geschrieben: > On Thu, 09/29 13:41, Stefan Hajnoczi wrote: > > On Tue, Sep 27, 2016 at 07:14:52PM +0800, Fam Zheng wrote: > > > We already specified BDRV_O_UNMAP when opening images in 'qemu-img > > > commit', but didn't turn on the "unmap" in the active commit

[Qemu-devel] [PATCH 09/12] virtio-balloon: convert to VIRTIO_DEF_DEVICE_VMSD

2016-09-30 Thread Halil Pasic
Refactor so the previously introduced VIRTIO_DEF_DEVICE_VMSD replaces VMSTATE_VIRTIO_DEVICE. Signed-off-by: Halil Pasic --- hw/virtio/virtio-balloon.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 49a2f4a..

[Qemu-devel] [PATCH 06/12] virtio-gpu: do not use VMSTATE_VIRTIO_DEVICE

2016-09-30 Thread Halil Pasic
Refactor so that VMSTATE_VIRTIO_DEVICE macro which we want to remove in the future is not used any more. The device virtio-gpu is special because it actually does not adhere to the virtio migration schema, because device state is last. Signed-off-by: Halil Pasic --- hw/display/virtio-gpu.c | 39

[Qemu-devel] [PATCH 00/11] virtio migration: simplify vmstate helper

2016-09-30 Thread Halil Pasic
As a part of the long term effort to convert migration to vmstate the migration of virtio devices was recently partially switched to vmstate starting with the outer layer (commit 5943124cc "virtio: Migration helper function and macro" and the subsequent "virtio-*: Wrap in vmstate" commits). This w

[Qemu-devel] [PATCH 05/12] virtio-serial: convert to VIRTIO_DEF_DEVICE_VMSD

2016-09-30 Thread Halil Pasic
Refactor so the previously introduced VIRTIO_DEF_DEVICE_VMSD replaces VMSTATE_VIRTIO_DEVICE. Signed-off-by: Halil Pasic --- hw/char/virtio-serial-bus.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index db57a

<    1   2   3   4   >