Re: [Qemu-devel] RFC: virtio-rng and /dev/urandom

2016-04-16 Thread Paolo Bonzini
> Also, I do not believe /dev/urandom is FIPS compliant. Finally, the refill > policy is different, so it is not really true the algorithm is the same. > > All in all, other than a seed value it really doesn't make any sense. Of > course, none of this matters on newer Intel hardware ;) Right, b

[Qemu-devel] [PATCH] net: improve UDP/TCP checksum computation.

2016-04-16 Thread Jean-Christophe Dubois
This patch adds: * based on Eth, UDP, TCP struct present in eth.h instead of hardcoded indexes. * based on various macros present in eth.h. * allow to account for optional VLAN header. Signed-off-by: Jean-Christophe Dubois --- net/checksum.c | 83 --

Re: [Qemu-devel] [PATCH for-2.7 v2 01/17] block: Add BDRV_O_NO_LOCK

2016-04-16 Thread Denis V. Lunev
On 04/15/2016 06:27 AM, Fam Zheng wrote: 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 s

Re: [Qemu-devel] [PATCH for-2.7 v2 02/17] qapi: Add lock-image in blockdev-add options

2016-04-16 Thread Denis V. Lunev
On 04/15/2016 06:27 AM, Fam Zheng wrote: To allow overriding the default locking behavior when opening the image. Signed-off-by: Fam Zheng --- qapi/block-core.json | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 1d090

Re: [Qemu-devel] [PATCH for-2.7 v2 04/17] block: Introduce image file locking

2016-04-16 Thread Denis V. Lunev
On 04/15/2016 06:27 AM, Fam Zheng wrote: 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 | 42 ++ include/block/block_int.h | 12

Re: [Qemu-devel] [PATCH for-2.7 v2 05/17] raw-posix: Implement .bdrv_lockf

2016-04-16 Thread Denis V. Lunev
On 04/15/2016 06:27 AM, Fam Zheng wrote: virtlockd in libvirt locks the first byte, we lock byte 1 to avoid the intervene. Suggested-by: "Daniel P. Berrange" Signed-off-by: Fam Zheng --- block/raw-posix.c | 35 +++ 1 file changed, 35 insertions(+) diff --git

Re: [Qemu-devel] [PATCH for-2.7 v2 08/17] qemu-io: Add "-L" option for BDRV_O_NO_LOCK

2016-04-16 Thread Denis V. Lunev
On 04/15/2016 06:27 AM, Fam Zheng wrote: Signed-off-by: Fam Zheng --- qemu-io.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/qemu-io.c b/qemu-io.c index 288bba8..6bb6232 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -107,6 +107,7 @@ static void open_

Re: [Qemu-devel] [PATCH for-2.7 v2 03/17] blockdev: Add and parse "lock-image" option for block devices

2016-04-16 Thread Denis V. Lunev
On 04/15/2016 06:27 AM, Fam Zheng wrote: Honor the locking switch specified in CLI or QMP, and set the open flags for the image accordingly. Signed-off-by: Fam Zheng --- blockdev.c | 8 1 file changed, 8 insertions(+) diff --git a/blockdev.c b/blockdev.c index f1f520a..93bd43e 1006

Re: [Qemu-devel] [PATCH for-2.7 v2 09/17] qemu-img: Add "-L" option to sub commands

2016-04-16 Thread Denis V. Lunev
On 04/15/2016 06:27 AM, Fam Zheng wrote: If specified, BDRV_O_NO_LOCK flag will be set when opening the image. Signed-off-by: Fam Zheng --- qemu-img.c | 89 ++ 1 file changed, 72 insertions(+), 17 deletions(-) diff --git a/qemu-img

Re: [Qemu-devel] [PATCH for-2.7 v2 09/17] qemu-img: Add "-L" option to sub commands

2016-04-16 Thread Denis V. Lunev
On 04/16/2016 05:29 PM, Denis V. Lunev wrote: On 04/15/2016 06:27 AM, Fam Zheng wrote: If specified, BDRV_O_NO_LOCK flag will be set when opening the image. Signed-off-by: Fam Zheng --- qemu-img.c | 89 ++ 1 file changed, 72 inse

Re: [Qemu-devel] [PATCH for-2.7 v2 11/17] qemu-nbd: Add "--no-lock/-L" option

2016-04-16 Thread Denis V. Lunev
On 04/15/2016 06:28 AM, Fam Zheng wrote: Signed-off-by: Fam Zheng --- qemu-nbd.c| 6 +- qemu-nbd.texi | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/qemu-nbd.c b/qemu-nbd.c index b5751f8..37da7a9 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -464,7 +464,7 @@ int

Re: [Qemu-devel] [PATCH for-2.7 v2 00/17] block: Lock images when opening

2016-04-16 Thread Denis V. Lunev
On 04/15/2016 06:27 AM, Fam Zheng wrote: v2: Lock byte 1 in the image itself, no lock file. [Daniel] Fix migration (image are not locked in bdrv_open_common if BDRV_O_INACTIVE). [Denis] Simplify test case fixes because of the above. Add lock for RBD. Add "-L" option in "q

Re: [Qemu-devel] [PATCH RFC v2] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-04-16 Thread Aviv B.D.
see comments below. Thanks for your inputs, Aviv On Mon, Apr 11, 2016 at 6:40 AM, Peter Xu wrote: > Hi, Aviv, > > On Sat, Apr 09, 2016 at 09:03:38PM +0300, Aviv B.D. wrote: > > [...] > >> +static int vtd_get_did_dev(IntelIOMMUState *s, uint8_t bus_num, >> uint8_t devfn, uint16_t * domain_id) > >

Re: [Qemu-devel] [PATCH RFC v2] IOMMU: Add Support to VFIO devices with vIOMMU present

2016-04-16 Thread Aviv B.D.
See my comments below, Thanks, Aviv. On Mon, Apr 11, 2016 at 11:25 PM, Alex Williamson wrote: > > Some more detailed comments now that I have some faith that the host > IOMMU domain is working correctly... > > On Sat, 9 Apr 2016 21:03:38 +0300 > "Aviv B.D." wrote: > >> From: "Aviv Ben-David" >>

[Qemu-devel] [PULL 00/03] seccomp branch queue

2016-04-16 Thread Eduardo Otubo
ll-seccomp-20160416 for you to fetch changes up to 8e08f8a4a7f613af65b29fcc3ac3bfc2a08a3343: seccomp: adding sysinfo system call to whitelist (2016-04-16 20:27:44 +0200) seccomp br

[Qemu-devel] [PULL 01/03] configure: Enable seccomp sandbox for MIPS

2016-04-16 Thread Eduardo Otubo
From: James Hogan Enable seccomp on MIPS since libseccomp version 2.2.0 when MIPS support was first added. Signed-off-by: James Hogan Reviewed-by: Andrew Jones Acked-by: Eduardo Otubo --- configure | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configure b/configure index 5db29f0..f1

[Qemu-devel] [PULL 03/03] seccomp: adding sysinfo system call to whitelist

2016-04-16 Thread Eduardo Otubo
From: Miroslav Rezanina Newer version of nss-softokn libraries (> 3.16.2.3) use sysinfo call so qemu using rbd image hang after start when run in sandbox mode. To allow using rbd images in sandbox mode we have to whitelist it. Signed-off-by: Miroslav Rezanina Acked-by: Eduardo Otubo --- qemu

[Qemu-devel] [PULL 02/03] seccomp: Whitelist cacheflush since 2.2.0 not 2.2.3

2016-04-16 Thread Eduardo Otubo
From: James Hogan The cacheflush system call (found on MIPS and ARM) has been included in the libseccomp header since 2.2.0, so include it back to that version. Previously it was only enabled since 2.2.3 since that is when it was enabled properly for ARM. This will allow seccomp support to be en

[Qemu-devel] [Bug 1570134] Re: While committing snapshot qemu crashes with SIGABRT

2016-04-16 Thread Max Reitz
And the second patch, because I'm either too stupid to make Launchpad attach two files to a single comment, or because Launchpad actually doesn't want me to for some reason. ** Patch added: "0002-Quickfix-block-mirror-Refresh-stale-HBI-cache.patch" https://bugs.launchpad.net/qemu/+bug/1570134/

[Qemu-devel] [Bug 1570134] Re: While committing snapshot qemu crashes with SIGABRT

2016-04-16 Thread Max Reitz
Hi Matthew, Thank you for your report! Could you try again with these two patches applied? Alternatively, you may fetch the resulting tree from https://github.com/XanClic/qemu.git, branch lp-1570134-pl (https://github.com/XanClic/qemu/archive/lp-1570134-pl.zip). Max ** Patch added: "0001-Quickfi

Re: [Qemu-devel] [PATCH v1 1/2] block: fix description of @stats

2016-04-16 Thread Max Reitz
On 15.04.2016 07:46, Changlong Xie wrote: > Qemu does not support "info blockstats" now. It doesn't? Mine is more than happy to accept that command: $ x86_64-softmmu/qemu-system-x86_64 -nodefaults \ -drive if=none,id=drv0,driver=null-co \ -monitor stdio QEMU 2.5.90 monitor - type 'help' f

Re: [Qemu-devel] [PATCH v1 2/2] block: remove redundant stats of block_acct_start()

2016-04-16 Thread Max Reitz
On 15.04.2016 07:46, Changlong Xie wrote: > Signed-off-by: Changlong Xie > --- > block/accounting.c | 4 ++-- > dma-helpers.c | 2 +- > hw/block/nvme.c| 3 +-- > hw/block/virtio-blk.c | 6 ++ > hw/block/xen_disk.c| 6 ++ > hw/ide/atapi.c

Re: [Qemu-devel] [PATCH v2] qemu-img: check block status of backing file when converting.

2016-04-16 Thread Max Reitz
The patch looks pretty good now, just one small thing: (Don't let the wall of text scare you) On 15.04.2016 08:19, Ren Kimura wrote: > When converting images, check the block status of its backing file chain > to avoid needlessly reading zeros. > > Signed-off-by: Ren Kimura > --- > qemu-img.c |

Re: [Qemu-devel] [PATCH for-2.7 v2 04/17] block: Introduce image file locking

2016-04-16 Thread Max Reitz
On 15.04.2016 05:27, Fam Zheng wrote: > 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 | 42 ++ > include/block/block_i

Re: [Qemu-devel] [PATCH v3 00/13] IOMMU: Enable interrupt remapping for Intel IOMMU

2016-04-16 Thread Jan Kiszka
Hi Peter, series no longer applies to git master. What was the baseline? Do you have a public git repo as well? Jan On 2016-04-14 20:31, Peter Xu wrote: > v3 changes (all patch numbers corresponds to v2): > - patch 1 (-> v3 patch 13) > - move to the end of series [Alex] > - patch 10 (dropped)

Re: [Qemu-devel] [PATCH v3 02/13] intel_iommu: set IR bit for ECAP register

2016-04-16 Thread Jan Kiszka
On 2016-04-14 20:31, Peter Xu wrote: > Enable IR in IOMMU Extended Capability register. > > Signed-off-by: Peter Xu > --- > hw/i386/intel_iommu.c | 7 +++ > hw/i386/intel_iommu_internal.h | 2 ++ > 2 files changed, 9 insertions(+) > > diff --git a/hw/i386/intel_iommu.c b/hw/i386/in

Re: [Qemu-devel] [PATCH v3 12/13] q35: ioapic: add support for split irqchip and irqfd

2016-04-16 Thread Jan Kiszka
On 2016-04-14 20:31, Peter Xu wrote: > This patch allows Intel IR work with splitted irqchip. Two more fields > are added to IOAPICCommonState to support the translation process (For > future AMD IR support, we will need to provide another AMD-specific > callback for int_remap()). In split irqchip

Re: [Qemu-devel] [PATCH v2] qemu-img: check block status of backing file when converting.

2016-04-16 Thread Ren Kimura
> So the correct way to test this would be: > if (!(ret & BDRV_BLOCK_DATA) && !(ret & BDRV_BLOCK_ZERO)) > Or, shorter: > if (!(ret & (BDRV_BLOCK_DATA | BDRV_BLOCK_ZERO))) Oops! It's very trivial mistake. I'll fix it. > I originally said (in my reply to v1) that we may not fall through to > the ba

[Qemu-devel] [PATCH v3] qemu-img: check block status of backing file when converting.

2016-04-16 Thread Ren Kimura
When converting images, check the block status of its backing file chain to avoid needlessly reading zeros. Signed-off-by: Ren Kimura --- qemu-img.c | 27 +-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 06264d9..ad1df5f 100

Re: [Qemu-devel] [PATCH v3] fw_cfg: RFQDN rules, documentation

2016-04-16 Thread Michael S. Tsirkin
On Fri, Apr 15, 2016 at 05:39:33PM +0200, Markus Armbruster wrote: > [Context restored] > > "Michael S. Tsirkin" writes: > > > On Thu, Apr 14, 2016 at 01:29:20PM +0200, Markus Armbruster wrote: > >> The next use case to consider is a user picking a new name for a new > >> interface between host