Re: [Qemu-devel] [PATCH] hostmem-file: plug a small leak

2016-04-14 Thread Markus Armbruster
Paolo Bonzini writes: > On 14/04/2016 17:44, Igor Mammedov wrote: >> On Thu, 14 Apr 2016 15:24:10 +0200 >> Paolo Bonzini wrote: >> >>> On 14/04/2016 13:34, Igor Mammedov wrote: On Wed, 13 Apr 2016 18:57:40 +0200 marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau

[Qemu-devel] [PATCH] Revert "acpi: mark PMTIMER as unlocked"

2016-04-14 Thread Gerd Hoffmann
This reverts commit 7070e085d490c396f9237c8f10bf8b6e69cd0066. Commit message claims locking is not needed, but that appears to not be true, seabios ehci driver runs into timekeeping problems with this, see https://bugzilla.redhat.com/show_bug.cgi?id=1322713 Signed-off-by: Gerd Hoffmann -

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

2016-04-14 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..6330f2a 100

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

2016-04-14 Thread Changlong Xie
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 | 12 hw/ide/core.c

[Qemu-devel] [PATCH v1 0/2] small fix of block/account

2016-04-14 Thread Changlong Xie
Changlong Xie (2): block: fix description of @stats block: remove redundant stats of block_acct_start() block/accounting.c | 4 ++-- block/block-backend.c | 2 +- dma-helpers.c | 2 +- hw/block/nvme.c| 3 +-- hw/block/virtio-blk.c | 6 ++ hw

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

2016-04-14 Thread Changlong Xie
Qemu does not support "info blockstats" now. Signed-off-by: Changlong Xie --- block/block-backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/block-backend.c b/block/block-backend.c index d74f670..05d5d09 100644 --- a/block/block-backend.c +++ b/block/block-backen

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

2016-04-14 Thread Ren Kimura
Max Thank you for reviewing. OK. I'll fix these and send version 2 later. Thanks

Re: [Qemu-devel] [PATCH] hw/virtio/balloon: Fixes for different host page sizes

2016-04-14 Thread David Gibson
On Thu, 14 Apr 2016 19:34:05 +0100 "Dr. David Alan Gilbert" wrote: > * Thomas Huth (th...@redhat.com) wrote: > > On 14.04.2016 13:47, Dr. David Alan Gilbert wrote: > > > * Thomas Huth (th...@redhat.com) wrote: > > > > > >> That would mean a regression compared to what we have today. Currentl

[Qemu-devel] [PATCH v3 13/13] q35: add "int-remap" flag to enable intr

2016-04-14 Thread Peter Xu
One flag is added to specify whether to enable INTR for emulated IOMMU. By default, interrupt remapping is not supportted. To enable it, we should specify something like: $ qemu-system-x86_64 -M q35,iommu=on,intr=on To be more clear, the following command: $ qemu-system-x86_64 -M q35,iommu=on W

[Qemu-devel] [PATCH v3 09/13] intel_iommu: Add support for PCI MSI remap

2016-04-14 Thread Peter Xu
This patch enables interrupt remapping for PCI devices. To play the trick, one memory region "iommu_ir" is added as child region of the original iommu memory region, covering range 0xfeeX (which is the address range for APIC). All the writes to this range will be taken as MSI, and translation

[Qemu-devel] [PATCH v3 08/13] intel_iommu: add IR translation faults defines

2016-04-14 Thread Peter Xu
Adding translation fault definitions for interrupt remapping. Please refer to VT-d spec section 7.1. Signed-off-by: Peter Xu --- hw/i386/intel_iommu_internal.h | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/i386/intel_iommu_internal.h b/hw/i386/intel_iommu_internal.h index

[Qemu-devel] [PATCH v3 07/13] intel_iommu: provide helper function vtd_get_iommu

2016-04-14 Thread Peter Xu
Moves acpi_get_iommu() under VT-d to make it a public function. Signed-off-by: Peter Xu --- hw/i386/acpi-build.c | 7 +-- hw/i386/intel_iommu.c | 13 + include/hw/i386/intel_iommu.h | 2 ++ 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/hw/i386

[Qemu-devel] [PATCH v3 04/13] intel_iommu: define interrupt remap table addr register

2016-04-14 Thread Peter Xu
Defined Interrupt Remap Table Address register to store IR table pointer. Also, do proper handling on global command register writes to store table pointer and its size. One more debug flag "DEBUG_IR" is added for interrupt remapping. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c |

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

2016-04-14 Thread Peter Xu
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/intel_iommu.c index 4b0558e..17668d6 100644 --- a/hw/i386

[Qemu-devel] [PATCH v3 05/13] intel_iommu: handle interrupt remap enable

2016-04-14 Thread Peter Xu
Handle writting to IRE bit in global command register. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 00b873c..4d14124 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386

[Qemu-devel] [PATCH for-2.7 v2 17/17] qemu-iotests: Add test case 152 for image locking

2016-04-14 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/152 | 106 tests/qemu-iotests/152.out | 237 + tests/qemu-iotests/group | 1 + 3 files changed, 344 insertions(+) create mode 100755 tests/qemu-iotests/152 create mode 100644

[Qemu-devel] [PATCH v3 03/13] acpi: add DMAR scope definition for root IOAPIC

2016-04-14 Thread Peter Xu
To enable interrupt remapping for intel IOMMU device, each IOAPIC device in the system reported via ACPI MADT must be explicitly enumerated under one specific remapping hardware unit. This patch adds the root-complex IOAPIC into the default DMAR device. Please refer to VT-d spec 8.3.1.1 for more i

[Qemu-devel] [PATCH for-2.7 v2 16/17] block: Turn on image locking by default

2016-04-14 Thread Fam Zheng
Now that test cases are covered, we can turn it on. Signed-off-by: Fam Zheng --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 93bd43e..87d22c3 100644 --- a/blockdev.c +++ b/blockdev.c @@ -383,7 +383,7 @@ static void extract_common_b

[Qemu-devel] [PATCH v3 01/13] intel_iommu: allow queued invalidation for IR

2016-04-14 Thread Peter Xu
Queued invalidation is required for IR. This patch add basic support for interrupt cache invalidate requests. Since we currently have no IR cache implemented yet, we can just skip all interrupt cache invalidation requests for now. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 9 ++

[Qemu-devel] [PATCH for-2.7 v2 15/17] qemu-iotests: Disable image lock when checking test image

2016-04-14 Thread Fam Zheng
The VM is running, qemu-io would fail the lock acquisition. Signed-off-by: Fam Zheng --- 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 3ac2443..fa996ef 100755 --- a/tests/qemu-iotests/030 +++ b/tes

[Qemu-devel] [PATCH for-2.7 v2 14/17] qemu-iotests: Wait for QEMU processes before checking image in 091

2016-04-14 Thread Fam Zheng
We should wait for the QEMU process to terminate and close the image before we check the data. Signed-off-by: Fam Zheng --- tests/qemu-iotests/091 | 3 +++ tests/qemu-iotests/091.out | 1 + 2 files changed, 4 insertions(+) diff --git a/tests/qemu-iotests/091 b/tests/qemu-iotests/091 index 3

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

2016-04-14 Thread Peter Xu
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 mode, IOAPIC is working in user space, only u

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

2016-04-14 Thread Fam Zheng
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 main(int argc, char **argv) off_t fd_size

[Qemu-devel] [PATCH v3 11/13] ioapic: introduce ioapic_entry_parse() helper

2016-04-14 Thread Peter Xu
Abstract IOAPIC entry parsing logic into a helper function for further reuse. Signed-off-by: Peter Xu --- hw/intc/ioapic.c | 83 ++-- 1 file changed, 50 insertions(+), 33 deletions(-) diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index 9233

[Qemu-devel] [PATCH for-2.7 v2 13/17] qemu-iotests: 046: Move version detection out from verify_io

2016-04-14 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 e0be46c..40c4bc0 100755 --- a/tests/qemu-iotests/046 +++ b/test

[Qemu-devel] [PATCH v3 10/13] q35: ioapic: add support for emulated IOAPIC IR

2016-04-14 Thread Peter Xu
This patch translates all IOAPIC interrupts into MSI ones. One pseudo ioapic address space is added to transfer the MSI message. By default, it will be system memory address space. When IR is enabled, it will be IOMMU address space. Currently, only emulated IOAPIC is supported. Idea suggested by

[Qemu-devel] [PATCH for-2.7 v2 10/17] qemu-img: Update documentation of "-L" option

2016-04-14 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 e7cded6..fa87942 100644 --- a/qemu-img-cm

[Qemu-devel] [PATCH v3 06/13] intel_iommu: define several structs for IOMMU IR

2016-04-14 Thread Peter Xu
Several data structs are defined to better support the rest of the patches: IRTE to parse remapping table entries, and IOAPIC/MSI related structure bits to parse interrupt entries to be filled in by guest kernel. Signed-off-by: Peter Xu --- include/hw/i386/intel_iommu.h | 60

[Qemu-devel] [PATCH for-2.7 v2 12/17] qemu-iotests: 140: Disable image lock for qemu-io access

2016-04-14 Thread Fam Zheng
The VM is still on, the image locking check would complain. Signed-off-by: Fam Zheng --- tests/qemu-iotests/140 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/140 b/tests/qemu-iotests/140 index 05e4506..412b26f 100755 --- a/tests/qemu-iotests/140 +++ b/tes

[Qemu-devel] [PATCH for-2.7 v2 06/17] gluster: Implement .bdrv_lockf

2016-04-14 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/gluster.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/block/gluster.c b/block/gluster.c index 51e154c..c23e944 100644 --- a/block/gluster.c +++ b/block/gluster.c @@ -672,6 +672,32 @@ static void qemu_gluster_close(BlockDri

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

2016-04-14 Thread Fam Zheng
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_help(void) " -r, -- open file read-only\n"

[Qemu-devel] [PATCH for-2.7 v2 07/17] rbd: Implement image locking

2016-04-14 Thread Fam Zheng
librbd has the locking API that can be used to implement .bdrv_lockf. Signed-off-by: Fam Zheng --- block/rbd.c | 25 + 1 file changed, 25 insertions(+) diff --git a/block/rbd.c b/block/rbd.c index 5bc5b32..a495083 100644 --- a/block/rbd.c +++ b/block/rbd.c @@ -810,6 +810

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

2016-04-14 Thread Peter Xu
v3 changes (all patch numbers corresponds to v2): - patch 1 (-> v3 patch 13) - move to the end of series [Alex] - patch 10 (dropped) - drop this one, since re-worked on IOAPIC support, so we do not need this any more. - patch 12 (-> v3 patch 10) - leverage MSI path for IOAPIC IR [Jan] - p

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

2016-04-14 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 | 89 ++ 1 file changed, 72 insertions(+), 17 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 1697762..327be44 100644

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

2016-04-14 Thread Fam Zheng
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 a/block/raw-posix.c b/block/raw-posix.c inde

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

2016-04-14 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 | 42 ++ include/block/block_int.h | 12 2 files changed, 54 insertions(

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

2016-04-14 Thread Fam Zheng
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 100644 --- a/blockdev.c +++ b/blockdev.c @@ -382,

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

2016-04-14 Thread Fam Zheng
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 1d09079..2913f3e 100644 --- a/qapi/block-core.json

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

2016-04-14 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 for-2.7 v2 00/17] block: Lock images when opening

2016-04-14 Thread Fam Zheng
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 "qemu-img" and "qemu-nbd" too. [Denis] Add tes

[Qemu-devel] [PATCH] block: Inactivate all nodes at migration source

2016-04-14 Thread Fam Zheng
qcow2 is not necessarily the top layer node. Since bdrv_inactivate() doesn't recurse, we should ensure all block nodes are inactivated. Signed-off-by: Fam Zheng --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index d4939b4..1c575e4 100644 --- a/b

Re: [Qemu-devel] [PATCH 0/2] ppc: Fixes for LSWX and LSWI instructions

2016-04-14 Thread David Gibson
On Thu, Apr 14, 2016 at 05:14:51PM +0200, Thomas Huth wrote: > These two patches fix the bad range checks in the LSWI and LSWX > instructions. > > To see the change in behavior for the lswx instruction, you can use the > "emulator" test from the kvm-unit-tests suite - code can be found here: > >

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 00/10] ppc: preparing pnv landing

2016-04-14 Thread David Gibson
On Wed, Apr 13, 2016 at 11:15:15AM +0200, Cédric Le Goater wrote: > On 03/22/2016 12:14 AM, David Gibson wrote: > > On Mon, Mar 21, 2016 at 01:52:30PM +0100, Cédric Le Goater wrote: > >> Hello, > >> > >> This is a first mini-serie of patches adding support for new ppc SPRs. > >> They were taken fro

[Qemu-devel] [PATCH 3/3] powerpc: Update TM user feature bits in scan_features()

2016-04-14 Thread Anton Blanchard
We need to update the user TM feature bits (PPC_FEATURE2_HTM and PPC_FEATURE2_HTM) to mirror what we do with the kernel TM feature bit. At the moment, if firmware reports TM is not available we turn off the kernel TM feature bit but leave the userspace ones on. Userspace thinks it can execute TM i

[Qemu-devel] [PATCH 2/3] powerpc: Update cpu_user_features2 in scan_features()

2016-04-14 Thread Anton Blanchard
scan_features() updates cpu_user_features but not cpu_user_features2. Amongst other things, cpu_user_features2 contains the user TM feature bits which we must keep in sync with the kernel TM feature bit. Signed-off-by: Anton Blanchard Cc: sta...@vger.kernel.org --- arch/powerpc/kernel/prom.c |

[Qemu-devel] [PATCH 1/3] powerpc: scan_features() updates incorrect bits

2016-04-14 Thread Anton Blanchard
The real LE feature entry in the ibm_pa_feature struct has the wrong number of elements. Instead of checking for byte 5, bit 0, we check for byte 0, bit 0, and we also incorrectly update cpu user feature bit 5. Fixes: 44ae3ab3358e ("powerpc: Free up some CPU feature bits by moving out MMU-related

[Qemu-devel] [PATCH] virtio: reserve device id for virtio crypto

2016-04-14 Thread Gonglei
Reserve a device ID for virtio crypto device to avoid collisions with other new virtio devices. Because 19 had been reserved for virtio socket device, I'd like to reserve 20 for crypto device. Suggested-by: Cornelia Huck Signed-off-by: Gonglei --- content.tex | 2 ++ 1 file changed, 2 insertio

Re: [Qemu-devel] [PATCH] rng-random: rename RndRandom to RngRandom

2016-04-14 Thread Wei, Jiangang
I'm not sure... Any comments and suggestions are welcome. Thanks in advance. On Fri, 2016-04-15 at 09:36 +0800, Wei Jiangang wrote: > Usually, Random Number Generator is abbreviated to RNG/rng. > so replacing RndRandom with RngRandom seems more reasonable > and keep consistent with RngBackend. > >

Re: [Qemu-devel] [PATCH] smbios: fix typo

2016-04-14 Thread Cao jin
hi, this is a typo patch, could I get confirmed? For your quick reference: System Management BIOS (SMBIOS) Reference Specification, version 3.0.0. chapter 5.2.1 & 5.2.2 On 04/09/2016 05:13 PM, Cao jin wrote: ping? On 03/29/2016 05:57 PM, Cao jin wrote: sorry mjt, I intended to cc qemu-

[Qemu-devel] [PATCH] rng-random: rename RndRandom to RngRandom

2016-04-14 Thread Wei Jiangang
Usually, Random Number Generator is abbreviated to RNG/rng. so replacing RndRandom with RngRandom seems more reasonable and keep consistent with RngBackend. Signed-off-by: Wei Jiangang --- backends/rng-random.c | 18 +- include/hw/virtio/virtio-rng.h | 2 +- include/sys

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.6 2/2] block: Fix blk_aio_write_zeroes()

2016-04-14 Thread Max Reitz
On 13.04.2016 13:06, Kevin Wolf wrote: > Commit 57d6a428 broke blk_aio_write_zeroes() because in some write > functions in the call path don't have an explicit length argument but > reuse qiov->size instead. Which is great, except that write_zeroes > doesn't have a qiov, which this commit interpret

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.6 1/2] qemu-io: Support 'aio_write -z'

2016-04-14 Thread Max Reitz
On 13.04.2016 13:06, Kevin Wolf wrote: > This allows testing blk_aio_write_zeroes(). > > Signed-off-by: Kevin Wolf > --- > qemu-io-cmds.c | 64 > +++--- > 1 file changed, 48 insertions(+), 16 deletions(-) > > diff --git a/qemu-io-cmds.c b/qem

Re: [Qemu-devel] [Qemu-block] [PATCH for-2.6 1/2] qemu-io: Support 'aio_write -z'

2016-04-14 Thread Max Reitz
On 13.04.2016 13:06, Kevin Wolf wrote: > This allows testing blk_aio_write_zeroes(). > > Signed-off-by: Kevin Wolf > --- > qemu-io-cmds.c | 64 > +++--- > 1 file changed, 48 insertions(+), 16 deletions(-) Despite the continuing use of int ins

Re: [Qemu-devel] [PATCH v2 for-2.6] nbd: Don't kill server on client that doesn't request TLS

2016-04-14 Thread Max Reitz
On 15.04.2016 00:02, Eric Blake wrote: > Upstream NBD documents (as of commit 4feebc95) that servers MAY > choose to operate in a conditional mode, where it is up to the > client whether to use TLS. For qemu's case, we want to always be > in FORCEDTLS mode, because of the risk of man-in-the-middle

[Qemu-devel] [ANNOUNCE] QEMU 2.6.0-rc2 is now available

2016-04-14 Thread Michael Roth
Hello, On behalf of the QEMU Team, I'd like to announce the availability of the third release candidate for the QEMU 2.6 release. This release is meant for testing purposes and should not be used in a production environment. http://wiki.qemu.org/download/qemu-2.6.0-rc2.tar.bz2 A note from the m

Re: [Qemu-devel] [PATCH for-2.6] nbd: Don't fail handshake on NBD_OPT_LIST descriptions

2016-04-14 Thread Max Reitz
On 15.04.2016 00:07, Eric Blake wrote: > On 04/14/2016 03:31 PM, Max Reitz wrote: >> On 08.04.2016 03:09, Eric Blake wrote: >>> The NBD Protocol states that NBD_REP_SERVER may set >>> 'length > sizeof(namelen) + namelen'; in which case the rest >>> of the packet is a UTF-8 description of the export

Re: [Qemu-devel] Customizing ARM Emulation boards?

2016-04-14 Thread Peter Maydell
On 14 April 2016 at 18:03, Alexander Duff wrote: > (This is cross-posted from the general discussion mailing list) (Doesn't appear to be cc'd anywhere but qemu-devel ?) > I'm emulating routers running OpenWrt for ARM using the realview-eb-mpcore > machine and I've run into the problem of not bei

Re: [Qemu-devel] [PATCH for-2.6?] qemu-iotests: iotests: fail hard if not run via "check"

2016-04-14 Thread Max Reitz
On 14.04.2016 13:32, Sascha Silbe wrote: > Running an iotests-based Python test directly might appear to work, > but may fail in subtle ways and is insecure: > > - It creates files with predictable file names in a world-writable > location (/var/tmp). > > - Tests expect the environment to be se

Re: [Qemu-devel] [PATCH for-2.6] nbd: Don't fail handshake on NBD_OPT_LIST descriptions

2016-04-14 Thread Eric Blake
On 04/14/2016 03:31 PM, Max Reitz wrote: > On 08.04.2016 03:09, Eric Blake wrote: >> The NBD Protocol states that NBD_REP_SERVER may set >> 'length > sizeof(namelen) + namelen'; in which case the rest >> of the packet is a UTF-8 description of the export. While we >> don't know of any NBD servers

[Qemu-devel] [PATCH v2 for-2.6] nbd: Don't kill server on client that doesn't request TLS

2016-04-14 Thread Eric Blake
Upstream NBD documents (as of commit 4feebc95) that servers MAY choose to operate in a conditional mode, where it is up to the client whether to use TLS. For qemu's case, we want to always be in FORCEDTLS mode, because of the risk of man-in-the-middle attacks, and since we never export more than o

Re: [Qemu-devel] [PATCH for-2.6] nbd: Don't kill server on client that doesn't request TLS

2016-04-14 Thread Eric Blake
On 04/14/2016 03:08 PM, Max Reitz wrote: > On 07.04.2016 22:29, Eric Blake wrote: >> Upstream NBD is documenting that servers MAY choose to operate >> in a conditional mode, where it is up to the client whether to >> use TLS. For qemu's case, we want to always be in FORCEDTLS >> mode, because of t

Re: [Qemu-devel] [PATCH for 2.6 1/1] nbd: fix assert() on qemu-nbd stop

2016-04-14 Thread Max Reitz
On 14.04.2016 12:20, Denis V. Lunev wrote: > From: Pavel Butsykin > > From time to time qemu-nbd is crashing on the following assert: > assert(state == TERMINATING); > nbd_export_closed > nbd_export_put > main > and the state at the moment of the crash is evaluated to TERMINATE. >

Re: [Qemu-devel] [PATCH for-2.6] nbd: Don't fail handshake on NBD_OPT_LIST descriptions

2016-04-14 Thread Max Reitz
On 08.04.2016 03:09, Eric Blake wrote: > The NBD Protocol states that NBD_REP_SERVER may set > 'length > sizeof(namelen) + namelen'; in which case the rest > of the packet is a UTF-8 description of the export. While we > don't know of any NBD servers that send this description yet, > we had better

[Qemu-devel] Customizing ARM Emulation boards?

2016-04-14 Thread Alexander Duff
Hello, (This is cross-posted from the general discussion mailing list) I'm emulating routers running OpenWrt for ARM using the realview-eb-mpcore machine and I've run into the problem of not being able to create more than one NIC. For what it's worth, when specifying that the NIC should be an

[Qemu-devel] qemu crash or a black screen display when i run it in windows

2016-04-14 Thread hulia javir
every time i run qemu in windows , it crash or a black screen dispaly , i don't understand why eventhough the same command run perfectly on ubuntu ./arm-softmmu/qemu-system-arm -M versatilepb -kernel zimage -initrd rootfs.img -append "console=ttyAMAO" rdinit=/sbin/init" -m 256 qemu was configure an

Re: [Qemu-devel] [PATCH for-2.6] nbd: Don't kill server on client that doesn't request TLS

2016-04-14 Thread Max Reitz
On 07.04.2016 22:29, Eric Blake wrote: > Upstream NBD is documenting that servers MAY choose to operate > in a conditional mode, where it is up to the client whether to > use TLS. For qemu's case, we want to always be in FORCEDTLS > mode, because of the risk of man-in-the-middle attacks, and since

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

2016-04-14 Thread Matthew Schumacher
It still fails with ext4: #0 0x7fbaa12b33f8 in raise () at /lib64/libc.so.6 #1 0x7fbaa12b4ffa in abort () at /lib64/libc.so.6 #2 0x7fbaa12abc17 in __assert_fail_base () at /lib64/libc.so.6 #3 0x7fbaa12abcc2 in () at /lib64/libc.so.6 #4 0x5646b990f926 in mirror_run (s=0x56

[Qemu-devel] [PATCH] target-i386: add AMD CPUID.1:edx aliases to x86_cpu_get_migratable_flags

2016-04-14 Thread Radim Krčmář
QEMU complains about -cpu host on an AMD machine: warning: host doesn't support requested feature: CPUID.8001H:EDX [bit 0] For bits 0,1,3,4,5,6,7,8,9,12,13,14,15,16,17,23,24. Host does support them, but x86_cpu_get_migratable_flags filters unnamed features and drops these bits without realiz

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

2016-04-14 Thread Max Reitz
On 13.04.2016 15:24, Ren Kimura wrote: > Signed-off-by: Ren Kimura How about you put what you wrote in the 0/1 email here? (But with s/it's/its/ :-)) > --- > qemu-img.c | 27 --- > 1 file changed, 24 insertions(+), 3 deletions(-) > > diff --git a/qemu-img.c b/qemu-img.

[Qemu-devel] [PATCH v3 3/4] cpu-exec: elide more icount code if CONFIG_USER_ONLY

2016-04-14 Thread Sergey Fedorov
From: Paolo Bonzini Signed-off-by: Paolo Bonzini [Alex Bennée: #ifndef replay code to match elided functions] Signed-off-by: Alex Bennée Signed-off-by: Sergey Fedorov --- cpu-exec.c | 8 1 file changed, 8 insertions(+) diff --git a/cpu-exec.c b/cpu-exec.c index 4cba4efc92b2..3694234

[Qemu-devel] [PATCH v3 0/4] tcg: Misc clean-up patches

2016-04-14 Thread Sergey Fedorov
From: Sergey Fedorov This patch series consists of various general TCG clean-up patches extracted from Paolo's MTTCG tree [1] and Alex's MTTCG base enablement tree [2]. I also add here a patch from myself to rework tb_invalidated_flag based on the Paolo's "tcg: move tb_invalidated_flag to CPUStat

[Qemu-devel] [PATCH v3 2/4] tcg: reorganize tb_find_physical loop

2016-04-14 Thread Sergey Fedorov
From: Alex Bennée Put some comments and improve code structure. This should help reading the code. Signed-off-by: Alex Bennée [Sergey Fedorov: provide commit message; bring back resetting of tb_invalidated_flag] Signed-off-by: Sergey Fedorov Reviewed-by: Richard Henderson --- cpu-exec.c | 4

[Qemu-devel] [PATCH v3 4/4] tcg: rework tb_invalidated_flag

2016-04-14 Thread Sergey Fedorov
From: Sergey Fedorov 'tb_invalidated_flag' was meant to catch two events: * some TB has been invalidated by tb_phys_invalidate(); * the whole translation buffer has been flushed by tb_flush(). Then it was checked: * in cpu_exec() to ensure that the last executed TB can be safely linked to

[Qemu-devel] [PATCH v3 1/4] tcg: code_bitmap is not used by user-mode emulation

2016-04-14 Thread Sergey Fedorov
From: Paolo Bonzini Signed-off-by: Paolo Bonzini [Sergey Fedorov: eliminate the field entirely in user-mode] Signed-off-by: Sergey Fedorov Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée --- Changes in v2: * The field is eliminated entirely in user-mode translate-all.c | 11 +

Re: [Qemu-devel] [PATCH] qemu-iotests: 041: More robust assertion on quorum node

2016-04-14 Thread Max Reitz
On 13.04.2016 05:43, Fam Zheng wrote: > Block nodes are now assigned names automatically, therefore the test > case is fragile in using fixed indices in result. Introduce a method in > iotests.py and do the matching more sensibly. > > Signed-off-by: Fam Zheng > --- > tests/qemu-iotests/041

Re: [Qemu-devel] [patch] firmware: qemu_fw_cfg.c: potential unintialized variable

2016-04-14 Thread Dan Carpenter
Ah... I see now. You're right. Thanks for the explanation. On my config those functions are no-ops so the variable isn't initialized. If they were enabled then *probably* it wouldn't generate a warning. Probably just silencing the warning is the way to go though... I bet GCC optimizes it awa

Re: [Qemu-devel] [patch] firmware: qemu_fw_cfg.c: potential unintialized variable

2016-04-14 Thread Gabriel L. Somlo
On Thu, Apr 14, 2016 at 12:33:37PM +0300, Dan Carpenter wrote: > It acpi_acquire_global_lock() return AE_NOT_CONFIGURED then "glk" isn't > initialized, which, if you got very unlucky, could cause a bug. > > Signed-off-by: Dan Carpenter > > diff --git a/drivers/firmware/qemu_fw_cfg.c b/drivers/fi

Re: [Qemu-devel] [patch] firmware: qemu_fw_cfg.c: potential unintialized variable

2016-04-14 Thread Gabriel L. Somlo
On Thu, Apr 14, 2016 at 10:12:53PM +0300, Dan Carpenter wrote: > On Thu, Apr 14, 2016 at 02:40:06PM -0400, Gabriel L. Somlo wrote: > > On Thu, Apr 14, 2016 at 12:33:37PM +0300, Dan Carpenter wrote: > > > It acpi_acquire_global_lock() return AE_NOT_CONFIGURED then "glk" isn't > > ^

Re: [Qemu-devel] [PATCH v2] [WIP] [RFC ]Add initial 9pfs support for Windows hosts v2

2016-04-14 Thread Greg Kurz
Hi Michael, I have some more comments that should end up in a preliminary patch. Cheers. -- Greg On Tue, 12 Apr 2016 09:52:00 +0200 Michael Fritscher wrote: > It was tested on Windows & Linux hosts, on the later no obvious regressions > could be found. The guest was a Knoppix 7.6.0 live cd.

Re: [Qemu-devel] [patch] firmware: qemu_fw_cfg.c: potential unintialized variable

2016-04-14 Thread Dan Carpenter
On Thu, Apr 14, 2016 at 02:40:06PM -0400, Gabriel L. Somlo wrote: > On Thu, Apr 14, 2016 at 12:33:37PM +0300, Dan Carpenter wrote: > > It acpi_acquire_global_lock() return AE_NOT_CONFIGURED then "glk" isn't > ^ ^ > Ifreturns > > > initi

Re: [Qemu-devel] [PATCH for 2.6] wxx: Fix broken TCP networking (regression)

2016-04-14 Thread Peter Maydell
On 14 April 2016 at 18:46, Stefan Weil wrote: > It is broken since commit c619644067f98098dcdbc951e2dda79e97560afa. > > Reported-by: Michael Fritscher > Signed-off-by: Stefan Weil > --- > > Networking with QEMU for Windows is currently not usable, > see bug report https://bugs.launchpad.net/qemu

Re: [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X

2016-04-14 Thread Peter Maydell
On 14 April 2016 at 19:47, Programmingkid wrote: > > On Apr 14, 2016, at 2:39 PM, Peter Maydell wrote: > >> On 14 April 2016 at 19:24, Programmingkid wrote: >>> I did a fresh clone of the QEMU repository. Then tried building QEMU. This >>> is >>> the error I saw: >>> >>> CCcontrib/ivshmem-c

Re: [Qemu-devel] [PATCH v14 09/19] tests: Add check-qnull

2016-04-14 Thread Eric Blake
On 04/14/2016 11:37 AM, Markus Armbruster wrote: > There's one unusual bit: the other check-q*.c leave the visitor stuff to > the test-*-visitor.c, but this one doesn't. Hmm. Yeah, but the other test-*-visitor don't muck with internal reference counts of qnull_. I guess I just call it out more p

Re: [Qemu-devel] [PATCH for 2.6] wxx: Fix broken TCP networking (regression)

2016-04-14 Thread Michael Fritscher
Hello Samuel, > Michael, what do you mean by "slow", the bandwidth, or the time to > connect? Does it help if you disable ipv6? @Ipv6: I'll test it tomorrow. I tested with wget http://www.heise.de. On the guest program point of view, it seems to hang at waiting at the first patch of data after

Re: [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X

2016-04-14 Thread Programmingkid
On Apr 14, 2016, at 2:39 PM, Peter Maydell wrote: > On 14 April 2016 at 19:24, Programmingkid wrote: >> I did a fresh clone of the QEMU repository. Then tried building QEMU. This is >> the error I saw: >> >> CCcontrib/ivshmem-client/ivshmem-client.o >> CCcontrib/ivshmem-client/main.o

Re: [Qemu-devel] [patch] firmware: qemu_fw_cfg.c: potential unintialized variable

2016-04-14 Thread Gabriel L. Somlo
On Thu, Apr 14, 2016 at 12:33:37PM +0300, Dan Carpenter wrote: > It acpi_acquire_global_lock() return AE_NOT_CONFIGURED then "glk" isn't ^ ^ Ifreturns > initialized, which, if you got very unlucky, could cause a bug. In principle I'm

Re: [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X

2016-04-14 Thread Peter Maydell
On 14 April 2016 at 19:24, Programmingkid wrote: > I did a fresh clone of the QEMU repository. Then tried building QEMU. This is > the error I saw: > > CCcontrib/ivshmem-client/ivshmem-client.o > CCcontrib/ivshmem-client/main.o > LINK ivshmem-client > collect2: error: ld terminated

Re: [Qemu-devel] [PATCH 4/5] tcg: reorder removal from lists in tb_phys_invalidate

2016-04-14 Thread Sergey Fedorov
On 14/04/16 18:13, Paolo Bonzini wrote: > On 14/04/2016 16:45, Sergey Fedorov wrote: >> Personally, I'm not so >> happy trying to use pc/cs_base/flags to mark an invalid TB. Are my >> worries unreasonable? :) > Can you explain your worries? > > The advantages are that it's O(1) and it obviously doe

Re: [Qemu-devel] [PATCH] hw/virtio/balloon: Fixes for different host page sizes

2016-04-14 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > On 14.04.2016 13:47, Dr. David Alan Gilbert wrote: > > * Thomas Huth (th...@redhat.com) wrote: > > > >> That would mean a regression compared to what we have today. Currently, > >> the ballooning is working OK for 64k guests on a 64k ppc host - rather > >>

Re: [Qemu-devel] [PATCH 4/5] tcg: reorder removal from lists in tb_phys_invalidate

2016-04-14 Thread Sergey Fedorov
On 14/04/16 18:13, Paolo Bonzini wrote: > This is very similar to the current code. From 10,000 feet, because > tb_find_fast calls tb_find_slow, this could indeed work, but I'm a bit > concerned about how to order the removal of the jump lists. As long as we always link/unlink TBs under tb_lock t

Re: [Qemu-devel] [PATCH] fix missing event_notifier_init_fd() function on Mac OS X

2016-04-14 Thread Programmingkid
On Apr 8, 2016, at 7:25 AM, Markus Armbruster wrote: > [Wasn't delivered correctly by eggs.gnu.org, resending] > > Paolo Bonzini writes: > >> On 30/03/2016 18:35, Programmingkid wrote: >>> Remove macro that prevents event_notifier_init_fd() function from being >>> compiled on Mac OS X. >>> >

Re: [Qemu-devel] [PATCH for 2.6] wxx: Fix broken TCP networking (regression)

2016-04-14 Thread Samuel Thibault
Hello, Stefan Weil, on Thu 14 Apr 2016 19:46:17 +0200, wrote: > Michael Fritscher reported that it is still slow, so > more fixes might be needed. Michael, what do you mean by "slow", the bandwidth, or the time to connect? Does it help if you disable ipv6? Samuel

Re: [Qemu-devel] [PATCH for 2.6] wxx: Fix broken TCP networking (regression)

2016-04-14 Thread Michael Fritscher
> It is broken since commit c619644067f98098dcdbc951e2dda79e97560afa. > > Reported-by: Michael Fritscher > Signed-off-by: Stefan Weil > --- > > Networking with QEMU for Windows is currently not usable, > see bug report https://bugs.launchpad.net/qemu/+bug/1569988. > > With this patch, it seems to

[Qemu-devel] [PATCH for 2.6] wxx: Fix broken TCP networking (regression)

2016-04-14 Thread Stefan Weil
It is broken since commit c619644067f98098dcdbc951e2dda79e97560afa. Reported-by: Michael Fritscher Signed-off-by: Stefan Weil --- Networking with QEMU for Windows is currently not usable, see bug report https://bugs.launchpad.net/qemu/+bug/1569988. With this patch, it seems to work again at le

Re: [Qemu-devel] [PATCH v14 09/19] tests: Add check-qnull

2016-04-14 Thread Markus Armbruster
There's one unusual bit: the other check-q*.c leave the visitor stuff to the test-*-visitor.c, but this one doesn't. Hmm.

Re: [Qemu-devel] [PATCH 4/5] tcg: reorder removal from lists in tb_phys_invalidate

2016-04-14 Thread Paolo Bonzini
On 14/04/2016 17:36, Sergey Fedorov wrote: > IIUC we always modify tb_jmp_cache/tb_phys_hash under tb_lock. We're > just gonna do tb_jmp_cache lookup outside of tb_lock. I think write > memory barrier in tb_phys_invalidate() paired with read memory memory > barrier in tb_find_fast()/tb_find_slow(

Re: [Qemu-devel] [PATCH] hostmem-file: plug a small leak

2016-04-14 Thread Paolo Bonzini
On 14/04/2016 17:44, Igor Mammedov wrote: > On Thu, 14 Apr 2016 15:24:10 +0200 > Paolo Bonzini wrote: > >> On 14/04/2016 13:34, Igor Mammedov wrote: >>> On Wed, 13 Apr 2016 18:57:40 +0200 >>> marcandre.lur...@redhat.com wrote: >>> From: Marc-André Lureau Signed-off-by: Marc-A

Re: [Qemu-devel] [PATCH v14 10/19] qapi: Add visit_type_null() visitor

2016-04-14 Thread Markus Armbruster
Eric Blake writes: > Right now, qmp-output-visitor happens to produce a QNull result > if nothing is actually visited between the creation of the visitor > and the request for the resulting QObject. A stronger protocol > would require that a QMP output visit MUST visit something. But > to still

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

2016-04-14 Thread Matthew Schumacher
Sure, I did the same test and still got a SIGABRT, but the debug looks a little different: Backtrace: #0 0x7f8f0d46a3f8 in raise () at /lib64/libc.so.6 #1 0x7f8f0d46bffa in abort () at /lib64/libc.so.6 #2 0x7f8f0d462c17 in __assert_fail_base () at /lib64/libc.so.6 #3 0x7f8f0d4

Re: [Qemu-devel] post-copy is broken?

2016-04-14 Thread Andrea Arcangeli
Adding linux-mm too, On Thu, Apr 14, 2016 at 01:34:41PM +0100, Dr. David Alan Gilbert wrote: > * Andrea Arcangeli (aarca...@redhat.com) wrote: > > > The next suspect is the massive THP refcounting change that went > > upstream recently: > > > As further debug hint, can you try to disable THP and

  1   2   >