Re: [Qemu-devel] [PATCH for-2.5 1/1] spapr: Handle failure of KVM_PPC_ALLOCATE_HTAB ioctl

2015-11-09 Thread Bharata B Rao
On Mon, Nov 09, 2015 at 07:46:55PM +1100, David Gibson wrote: > On Mon, Nov 09, 2015 at 03:24:15PM +1100, David Gibson wrote: > > On Tue, Nov 03, 2015 at 03:38:19PM +0530, Bharata B Rao wrote: > > > KVM_PPC_ALLOCATE_HTAB ioctl can return -ENOMEM for KVM guests and QEMU > > > never handled this

Re: [Qemu-devel] [PATCH v3 0/9] block: Fixes for bdrv_drain

2015-11-09 Thread Fam Zheng
On Mon, 11/09 11:42, Stefan Hajnoczi wrote: > On Mon, Nov 09, 2015 at 10:56:39AM +0800, Fam Zheng wrote: > > v3: Don't reuse coroutine in bdrv_aio_ioctl. [Stefan] > > Recursely call .bdrv_drain callback only. [Stefan, Paolo] > > I don't understand this change. I thought you want

Re: [Qemu-devel] [PATCH V3 6/6] virtio-pci: unbreak queue_enable read

2015-11-09 Thread Cornelia Huck
On Fri, 6 Nov 2015 16:02:49 +0800 Jason Wang wrote: > Guest always get zero when reading queue_enable. This violates > spec. Fixing this by setting the queue_enable to true during any guest > writing and setting it to zero during reset. > > Cc: Michael S. Tsirkin

Re: [Qemu-devel] [PULL v2 0/7] Block patches

2015-11-09 Thread Peter Maydell
On 9 November 2015 at 12:51, Peter Maydell wrote: > On 9 November 2015 at 10:08, Stefan Hajnoczi wrote: >> The following changes since commit c4a7bf54e588ff2de9fba0898b686156251b2063: >> >> Merge remote-tracking branch

Re: [Qemu-devel] [PATCH v10 00/30] qapi member collision (post-introspection cleanups, subset C')

2015-11-09 Thread Eric Blake
On 11/09/2015 02:59 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 11/06/2015 09:03 AM, Markus Armbruster wrote: >>> Eric Blake writes: > [...] Hopefully, we are converging on something that will be ready for a pull request, especially

Re: [Qemu-devel] [PATCH v6 3/4] qmp: add monitor command to add/remove a child

2015-11-09 Thread Alberto Garcia
Sorry again for the late review, here are my comments: On Fri 16 Oct 2015 10:57:45 AM CEST, Wen Congyang wrote: > +void qmp_x_blockdev_change(ChangeOperation op, const char *parent, > + bool has_child, const char *child, > + bool has_new_node,

[Qemu-devel] [PATCH for-2.5] hw/timer/hpet.c: Avoid signed integer overflow which results in bugs on OSX

2015-11-09 Thread Peter Maydell
Signed integer overflow in C is undefined behaviour, and the compiler is at liberty to assume it can never happen and optimize accordingly. In particular, the subtractions in hpet_time_after() and hpet_time_after64() were causing OSX clang to optimize the code such that it was prone to hangs and

Re: [Qemu-devel] [PATCH v10 24/30] qapi: Factor out QAPISchemaObjectType.check_clash()

2015-11-09 Thread Markus Armbruster
Eric Blake writes: > Consolidate two common sequences of clash detection into a > new QAPISchemaObjectType.check_clash() helper method. > > No change to generated code. > > Signed-off-by: Eric Blake > > --- > v10: rebase on new Variants.check_clash() > v9:

[Qemu-devel] [PATCH v5 2/8] e1000: Add support for migrating the entire MAC registers' array

2015-11-09 Thread Leonid Bloch
This patch enables the migration of the entire array of MAC registers during live migration. The entire array is just 128 KB long, so practically no penalty should be felt when transmitting it, additionally to the previously transmitted individual registers. The advantage here is eliminating the

[Qemu-devel] [PATCH v5 6/8] e1000: Fixing the received/transmitted octets' counters

2015-11-09 Thread Leonid Bloch
Previously, these 64-bit registers did not stick at their maximal values when (and if) they reached them, as they should do, according to the specs. This patch introduces a function that takes care of such registers, avoiding code duplication, making the relevant parts more compatible with the

[Qemu-devel] [PATCH v5 5/8] e1000: Fixing the received/transmitted packets' counters

2015-11-09 Thread Leonid Bloch
According to Intel's specs, these counters (as the other Statistic registers) stick at 0x when this maximal value is reached. Previously, they would reset after the max. value. Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman

Re: [Qemu-devel] [PATCH v3] virtio-blk: trivial code optimization

2015-11-09 Thread Paolo Bonzini
On 09/11/2015 10:03, arei.gong...@huawei.com wrote: > From: Gonglei > > 1. avoid possible superflous checking > 2. make code more robustness > > Signed-off-by: Gonglei > Reviewed-by: Fam Zheng > --- > v3: change the third

Re: [Qemu-devel] qemu : rbd block driver internal snapshot and vm_stop is hanging forever

2015-11-09 Thread Jason Dillaman
Can you reproduce with Ceph debug logging enabled (i.e. debug rbd=20 in your ceph.conf)? If you could attach the log to the Ceph tracker ticket I opened [1], that would be very helpful. [1] http://tracker.ceph.com/issues/13726 Thanks, Jason - Original Message - > From: "Alexandre

Re: [Qemu-devel] [PATCH v10 27/30] qapi: Track owner of each object member

2015-11-09 Thread Markus Armbruster
Eric Blake writes: > Future commits will migrate semantic checking away from parsing > and over to the various QAPISchema*.check() methods. But to > report an error message about an incorrect semantic use of a > member of an object type, it helps to know which type, command,

Re: [Qemu-devel] Qemu: Guest Linux hangs on Mac OS X 10.11

2015-11-09 Thread Peter Maydell
On 9 November 2015 at 13:40, Paolo Bonzini wrote: > > > On 09/11/2015 14:30, Peter Maydell wrote: >> After a bunch of "try building specific object files with optimization >> off to see where the problem goes away" tests, I've narrowed the >> problem down further: if you tell

Re: [Qemu-devel] [PATCH v10 24/30] qapi: Factor out QAPISchemaObjectType.check_clash()

2015-11-09 Thread Markus Armbruster
Eric Blake writes: > Consolidate two common sequences of clash detection into a > new QAPISchemaObjectType.check_clash() helper method. > > No change to generated code. > > Signed-off-by: Eric Blake > > --- > v10: rebase on new Variants.check_clash() > v9:

Re: [Qemu-devel] [PATCH] SeaBios: Fix reset procedure reentrancy problem on qemu-kvm platform

2015-11-09 Thread Kevin O'Connor
On Fri, Nov 06, 2015 at 09:12:34AM +, Xulei (Stone) wrote: > > >On Wed, Nov 04, 2015 at 08:48:20AM +0800, Gonglei wrote: > >> On 2015/11/3 14:58, Xulei (Stone, Euler) wrote: > >> > On qemu-kvm platform, when I reset a VM through "virsh reset", and > >> > coincidently > >> > the VM is in

[Qemu-devel] [PATCH 3/3] qemu, pkeys: add pkeys support for qemu migration

2015-11-09 Thread Huaitong Han
This patch adds pkeys support for qemu migration. Signed-off-by: Huaitong Han --- target-i386/machine.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/target-i386/machine.c b/target-i386/machine.c index a0df64b..1b190c7 100644 ---

[Qemu-devel] [PATCH v5 0/8] e1000: Various fixes and registers' implementation

2015-11-09 Thread Leonid Bloch
This series fixes issues with packet/octet counting in e1000's Statistic registers, fixes a bug in the packet address filtering procedure, and implements many MAC registers that were absent before, some Statistic counters among them. Besides this, the series introduces a parameter which, if set

Re: [Qemu-devel] [PATCH v10 25/30] qapi: Hoist tag collision check to Variants.check()

2015-11-09 Thread Markus Armbruster
Eric Blake writes: > Checking that a given QAPISchemaObjectTypeVariant.name is a > member of the corresponding QAPISchemaEnumType of the owning > QAPISchemaObjectTypeVariants.tag_member ensures that there are > no collisions in the generated C union for those tag values >

Re: [Qemu-devel] [PATCH v6 01/15] blockdev: Add missing bdrv_unref() in drive-backup

2015-11-09 Thread Alberto Garcia
On Wed 04 Nov 2015 07:57:33 PM CET, Max Reitz wrote: > All error paths after a successful bdrv_open() of target_bs should > contain a bdrv_unref(target_bs). This one did not yet, so add it. > > Signed-off-by: Max Reitz Reviewed-by: Alberto Garcia

Re: [Qemu-devel] qemu : rbd block driver internal snapshot and vm_stop is hanging forever

2015-11-09 Thread Stefan Priebe - Profihost AG
> - Original Message - >> From: "Alexandre DERUMIER" >> To: "ceph-devel" >> Cc: "qemu-devel" , jdur...@redhat.com >> Sent: Monday, November 9, 2015 5:48:45 AM >> Subject: Re: [Qemu-devel] qemu : rbd block driver

Re: [Qemu-devel] [PATCH] virtio-net: use the backend cross-endian capabilities

2015-11-09 Thread Greg Kurz
On Fri, 06 Nov 2015 18:45:04 +0100 Greg Kurz wrote: > When running a fully emulated device in cross-endian conditions, including > a virtio 1.0 device offered to a big endian guest, we need to fix the vnet > headers. This is currently handled by the

[Qemu-devel] [PATCH v5 7/8] e1000: Fixing the packet address filtering procedure

2015-11-09 Thread Leonid Bloch
Previously, if promiscuous unicast was enabled, a packet was received straight away, even if it was a multicast or a broadcast packet. This patch fixes that behavior, while making the filtering procedure a bit more human-readable. Signed-off-by: Leonid Bloch

Re: [Qemu-devel] [PATCH 0/7] int128: reparing broken 128 bit memory calculations

2015-11-09 Thread Paolo Bonzini
On 09/11/2015 13:01, Pierre Morel wrote: >>> This leads to have UINT64_MAX represented with {1, 0} instead of >>> {0, UINT64_MAX} while {1, 0} is 2^64. This again leads to have >>> unnecessary and obfuscating transformations with int128_2_64() to >>> test for UINT64_MAX and return {1,0} in

Re: [Qemu-devel] [PATCH v10 22/30] qapi: Simplify QAPISchemaObjectTypeVariants.check()

2015-11-09 Thread Markus Armbruster
Eric Blake writes: > From: Markus Armbruster > > Reduce the ugly flat union / simple union conditional by doing just > the essential work here, namely setting self.tag_member. > Move the rest to callers. > > Signed-off-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v9 00/56] Postcopy implementation

2015-11-09 Thread Dr. David Alan Gilbert
* Bharata B Rao (bhar...@linux.vnet.ibm.com) wrote: > On Mon, Nov 09, 2015 at 11:03:02AM +, Dr. David Alan Gilbert wrote: > > > > > > Oh, I think I see it; the following is untested, I'll grab a machine to > > try it on but it will take a little while: > > > > diff --git a/migration/ram.c

Re: [Qemu-devel] [PATCH v3] virtio-blk: trivial code optimization

2015-11-09 Thread Stefan Hajnoczi
On Mon, Nov 09, 2015 at 05:03:30PM +0800, arei.gong...@huawei.com wrote: > From: Gonglei > > 1. avoid possible superflous checking > 2. make code more robustness > > Signed-off-by: Gonglei > Reviewed-by: Fam Zheng > --- > v3:

Re: [Qemu-devel] qemu : rbd block driver internal snapshot and vm_stop is hanging forever

2015-11-09 Thread Alexandre DERUMIER
>>Can you reproduce with Ceph debug logging enabled (i.e. debug rbd=20 in your >>ceph.conf)? If you could attach the log to the Ceph tracker ticket I opened >>[1], that would be very helpful. >> >>[1] http://tracker.ceph.com/issues/13726 yes,I'm able to reproduce it 100%, I have attached the

[Qemu-devel] [PATCH 1/3] qemu, pkeys: add pkeys support for qemu cpuid handling

2015-11-09 Thread Huaitong Han
This patch adds pkeys support for qemu cpuid handling. Signed-off-by: Huaitong Han --- target-i386/cpu.c | 21 - target-i386/cpu.h | 4 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index

[Qemu-devel] [PATCH 2/3] qemu, pkeys: add pkeys support for qemu xsave state handling

2015-11-09 Thread Huaitong Han
This patch adds pkeys support for qemu xsave state handling. Signed-off-by: Huaitong Han --- target-i386/cpu.c | 2 ++ target-i386/cpu.h | 3 +++ target-i386/kvm.c | 3 +++ 3 files changed, 8 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index

[Qemu-devel] [PATCH 0/3] qemu, pkeys: add memory protection-key support

2015-11-09 Thread Huaitong Han
The protection-key feature provides an additional mechanism by which IA-32e paging controls access to usermode addresses. Hardware support for protection keys for user pages is enumerated with CPUID feature flag CPUID.7.0.ECX[3]:PKU. Software support is CPUID.7.0.ECX[4]:OSPKE with the setting of

Re: [Qemu-devel] [PATCH v6 12/15] blockdev: Keep track of monitor-owned BDS

2015-11-09 Thread Alberto Garcia
On Wed 04 Nov 2015 07:57:44 PM CET, Max Reitz wrote: > @@ -3519,11 +3537,18 @@ void qmp_x_blockdev_del(bool has_id, const char *id, > bdrv_get_device_or_node_name(bs)); > goto out; > } > + > +if (!blk && !bs->monitor_list.tqe_prev) { > +

Re: [Qemu-devel] [PATCH 1/3] qemu, pkeys: add pkeys support for qemu cpuid handling

2015-11-09 Thread Paolo Bonzini
On 09/11/2015 12:55, Huaitong Han wrote: > @@ -351,6 +362,7 @@ static const char *cpuid_6_feature_name[] = { >CPUID_7_0_EBX_FSGSBASE, CPUID_7_0_EBX_HLE, CPUID_7_0_EBX_AVX2, >CPUID_7_0_EBX_ERMS, CPUID_7_0_EBX_INVPCID, CPUID_7_0_EBX_RTM, >CPUID_7_0_EBX_RDSEED */

Re: [Qemu-devel] [PULL v2 0/7] Block patches

2015-11-09 Thread Peter Maydell
On 9 November 2015 at 10:08, Stefan Hajnoczi wrote: > The following changes since commit c4a7bf54e588ff2de9fba0898b686156251b2063: > > Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into > staging (2015-11-07 19:55:15 +) > > are available in the

[Qemu-devel] [Bug 1488363] Re: qemu 2.4.0 hangs using vfio for pci passthrough of graphics card

2015-11-09 Thread harrison.p...@gmail.com
This still affects the distro proxmox 4.0 and many users are affected "http://forum.proxmox.com/threads/24362-PCIe-passthrough-does-not-work; , is there any detail you guys need to fix this? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to

[Qemu-devel] [PATCH v5 3/8] e1000: Introduced an array to control the access to the MAC registers

2015-11-09 Thread Leonid Bloch
The array of uint8_t's which is introduced here, contains useful metadata about the MAC registers: if a register should be always accessible, or if it is accessible, but partly implemented, or if the register requires a certain compatibility flag to be accessed. Currently, 5 hypothetical flags are

[Qemu-devel] [PATCH v5 4/8] e1000: Trivial implementation of various MAC registers

2015-11-09 Thread Leonid Bloch
These registers appear in Intel's specs, but were not implemented. These registers are now implemented trivially, i.e. they are initiated with zero values, and if they are RW, they can be written or read by the driver, or read only if they are R (essentially retaining their zero values). For these

Re: [Qemu-devel] [PULL v2 0/7] Block patches

2015-11-09 Thread Marc-André Lureau
Hi - Original Message - > On 9 November 2015 at 12:51, Peter Maydell wrote: > > On 9 November 2015 at 10:08, Stefan Hajnoczi wrote: > >> The following changes since commit > >> c4a7bf54e588ff2de9fba0898b686156251b2063: > >> > >> Merge

Re: [Qemu-devel] [PATCH v9 00/56] Postcopy implementation

2015-11-09 Thread Bharata B Rao
On Mon, Nov 09, 2015 at 11:03:02AM +, Dr. David Alan Gilbert wrote: > > > Oh, I think I see it; the following is untested, I'll grab a machine to > try it on but it will take a little while: > > diff --git a/migration/ram.c b/migration/ram.c > index 62cf42b..e6db965 100644 > ---

Re: [Qemu-devel] [PATCH v6 05/33] acpi: add aml_object_type

2015-11-09 Thread Igor Mammedov
On Mon, 9 Nov 2015 13:35:51 +0200 "Michael S. Tsirkin" wrote: > On Fri, Oct 30, 2015 at 01:55:59PM +0800, Xiao Guangrong wrote: > > Implement ObjectType which is used by NVDIMM _DSM method in > > later patch > > > > Signed-off-by: Xiao Guangrong

Re: [Qemu-devel] [PATCH v10 23/30] qapi: Check for qapi collisions of flat union branches

2015-11-09 Thread Markus Armbruster
Eric Blake writes: > Right now, our ad hoc parser ensures that we cannot have a > flat union that introduces any qapi member names that would > conflict with the non-variant qapi members already present > from the union's base type (see flat-union-clash-member.json). > We want

Re: [Qemu-devel] [PATCH v6 10/15] block: Make bdrv_close() static

2015-11-09 Thread Alberto Garcia
On Wed 04 Nov 2015 07:57:42 PM CET, Max Reitz wrote: > There are no users of bdrv_close() left, except for one of bdrv_open()'s > failure paths, bdrv_close_all() and bdrv_delete(), and that is good. > Make bdrv_close() static so nobody makes the mistake of directly using > bdrv_close() again. > >

Re: [Qemu-devel] [PATCH v6 02/15] blockjob: Call bdrv_unref() on creation error

2015-11-09 Thread Alberto Garcia
On Wed 04 Nov 2015 07:57:34 PM CET, Max Reitz wrote: > If block_job_create() fails, it should release its reference to the > job's BDS. Normally, this is done in the callback provided by the > caller, but that callback will not be invoked if the block job failed to > be created. > > Signed-off-by:

Re: [Qemu-devel] Qemu: Guest Linux hangs on Mac OS X 10.11

2015-11-09 Thread Paolo Bonzini
On 09/11/2015 14:30, Peter Maydell wrote: > After a bunch of "try building specific object files with optimization > off to see where the problem goes away" tests, I've narrowed the > problem down further: if you tell clang to disable optimization by > adding __attribute__ ((optnone)) to the two

Re: [Qemu-devel] [PATCH V3 1/6] virtio-pci: fix 1.0 virtqueue migration

2015-11-09 Thread Cornelia Huck
On Fri, 6 Nov 2015 16:02:44 +0800 Jason Wang wrote: > We don't migrate the followings fields for virtio-pci: > > uint32_t dfselect; > uint32_t gfselect; > uint32_t guest_features[2]; > struct { > uint16_t num; > bool enabled; > uint32_t desc[2]; > uint32_t

Re: [Qemu-devel] Qemu: Guest Linux hangs on Mac OS X 10.11

2015-11-09 Thread Peter Maydell
On 9 November 2015 at 11:46, Peter Maydell wrote: > Yep, just confirmed that current master with commit b553a0428 > reverted displays the bug again. After a bunch of "try building specific object files with optimization off to see where the problem goes away" tests,

[Qemu-devel] [PATCH v5 1/8] e1000: Cosmetic and alignment fixes

2015-11-09 Thread Leonid Bloch
This fixes some alignment and cosmetic issues. The changes are made in order that the following patches in this series will look like integral parts of the code surrounding them, while conforming to the coding style. Although some changes in unrelated areas are also made. Signed-off-by: Leonid

[Qemu-devel] [PATCH v5 8/8] e1000: Implementing various counters

2015-11-09 Thread Leonid Bloch
This implements the following Statistic registers (various counters) according to Intel's specs: TSCTC GOTCL GOTCH GORCL GORCH MPRC BPRC RUCROC BPTC MPTC PTC... PRC... Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman

Re: [Qemu-devel] [PATCH v10 17/30] qapi: Simplify QAPISchemaObjectTypeMember.check()

2015-11-09 Thread Markus Armbruster
Eric Blake writes: > From: Markus Armbruster > > QAPISchemaObjectTypeMember.check() currently does four things: > > 1. Compute self.type > > 2. Accumulate members in all_members > >Only one caller cares: QAPISchemaObjectType.check() uses it to >

Re: [Qemu-devel] [PATCH v10 17/30] qapi: Simplify QAPISchemaObjectTypeMember.check()

2015-11-09 Thread Eric Blake
On 11/09/2015 05:31 AM, Markus Armbruster wrote: > Eric Blake writes: > >> From: Markus Armbruster >> >> QAPISchemaObjectTypeMember.check() currently does four things: >> >> 4. Check for collisions >> >>This piggyback on 3: before adding a new entry,

Re: [Qemu-devel] [PATCH v6 4/4] hmp: add monitor command to add/remove a child

2015-11-09 Thread Alberto Garcia
On Fri 16 Oct 2015 10:57:46 AM CEST, Wen Congyang wrote: > +.name = "blockdev_change", > +.args_type = "op:s,parent:B,child:B?,node:?", > +.params = "operation parent [child] [node]", [...] > +/* > + * FIXME: we must specify the parameter child,

Re: [Qemu-devel] [PATCH 0/2] atapi: fix NetBSD boot regression

2015-11-09 Thread Mark Cave-Ayland
On 09/11/15 19:05, John Snow wrote: > Marc noticed that a recent ATAPI permissions fix broke NetBSD 7.0's > installer ISO. > > The problem is that it's meaningless to check for !(cmd->flags & nondata) > if the command isn't supported, since all unsupported commands have > _no_ flags.

Re: [Qemu-devel] [PATCH v3] seccomp: add cacheflush to whitelist

2015-11-09 Thread Andrew Jones
On Mon, Nov 02, 2015 at 11:53:26PM +0100, Andrew Jones wrote: > cacheflush is an arm-specific syscall that qemu built for arm > uses. Add it to the whitelist, but only if we're linking with > a recent enough libseccomp. > > Signed-off-by: Andrew Jones > --- > v3: deal with

Re: [Qemu-devel] [PATCH 2.5 v5 0/11] dataplane snapshot fixes

2015-11-09 Thread Eric Blake
On 11/06/2015 02:13 PM, Denis V. Lunev wrote: >> That is a case of using libvirt to trigger internal snapshots... >> >>> The HMP monitor is legacy and also not used by modern libvirt. >> ...and libvirt is forced to use HMP for internal snapshots, since we >> _still_ haven't exposed internal

Re: [Qemu-devel] [PULL 29/57] migrate_start_postcopy: Command to trigger transition to postcopy

2015-11-09 Thread Eric Blake
[adding Markus for a qapi question] On 11/09/2015 10:28 AM, Juan Quintela wrote: > From: "Dr. David Alan Gilbert" > > Once postcopy is enabled (with migrate_set_capability), the migration > will still start on precopy mode. To cause a transition into postcopy > the: > >

[Qemu-devel] [PATCH] qga: fix append file open modes for win32

2015-11-09 Thread Kirk Allan
For append file open modes, use FILE_APPEND_DATA for the desired access for writing at the end of the file. Signed-off-by: Kirk Allan --- qga/commands-win32.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qga/commands-win32.c

Re: [Qemu-devel] [PATCH V3 1/6] virtio-pci: fix 1.0 virtqueue migration

2015-11-09 Thread Jason Wang
On 11/09/2015 08:56 PM, Cornelia Huck wrote: > On Fri, 6 Nov 2015 16:02:44 +0800 > Jason Wang wrote: > >> We don't migrate the followings fields for virtio-pci: >> >> uint32_t dfselect; >> uint32_t gfselect; >> uint32_t guest_features[2]; >> struct { >> uint16_t num;

[Qemu-devel] [v2 RESEND 1/2] cutils: add avx2 instruction optimization

2015-11-09 Thread Liang Li
buffer_find_nonzero_offset() is a hot function during live migration. Now it use SSE2 intructions for optimization. For platform supports AVX2 instructions, use the AVX2 instructions for optimization can help to improve the performance about 30% comparing to SSE2. Zero page check can be faster

[Qemu-devel] [v2 RESEND 2/2] configure: add options to config avx2

2015-11-09 Thread Liang Li
Add the '--enable-avx2' & '--disable-avx2' option so as to config the AVX2 instruction optimization. By default, avx2 optimization is enabled, if '--disable-avx2' is not set, configure will detect if the compiler can support AVX2 option, if yes, AVX2 optimization is eabled, else disabled.

[Qemu-devel] [v2 RESEND 0/2] add avx2 instruction optimization

2015-11-09 Thread Liang Li
buffer_find_nonzero_offset() is a hot function during live migration. Now it use SSE2 intructions for optimization. For platform supports AVX2 instructions, use the AVX2 instructions for optimization can help to improve the performance about 30% comparing to SSE2. Zero page check can be faster

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-09 Thread Alexey Kardashevskiy
On 11/10/2015 02:57 PM, Sukadev Bhattiprolu wrote: Alexey Kardashevskiy [a...@ozlabs.ru] wrote: | On 11/05/2015 10:06 AM, Sukadev Bhattiprolu wrote: | >Implement RTAS_SYSPARM_PROCESSOR_MODULE_INFO parameter to rtas_get_sysparm() | >call in qemu. This call returns the processor module (socket),

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-09 Thread Sukadev Bhattiprolu
Alexey Kardashevskiy [a...@ozlabs.ru] wrote: | >| When exactly does a socket become a module? The SPAPR spec uses "sockets" here. | > | >I am trying to get the terminology too :-) Is socket a slot where a | >module is attached? | | Sorry, no idea. Ok. | | | > | >I will change the variable

Re: [Qemu-devel] [PATCH v5 3/8] e1000: Introduced an array to control the access to the MAC registers

2015-11-09 Thread Jason Wang
On 11/09/2015 10:59 PM, Leonid Bloch wrote: > The array of uint8_t's which is introduced here, contains useful metadata > about the MAC registers: if a register should be always accessible, or if > it is accessible, but partly implemented, or if the register requires a > certain compatibility

Re: [Qemu-devel] [PATCH 1/8] qapi: Drop QERR_UNKNOWN_BLOCK_FORMAT_FEATURE

2015-11-09 Thread Eric Blake
On 11/09/2015 08:44 PM, Max Reitz wrote: > Just specifying a custom string is simpler in basically all places that > used it, and in addition, specifying the BB or node name is something we > generally do not do in other error messages when opening a BDS, so we > should not do it here. > > This

Re: [Qemu-devel] [PATCH v2 0/8] blockdev: Further BlockBackend work

2015-11-09 Thread Jeff Cody
On Tue, Nov 10, 2015 at 04:49:12AM +0100, Max Reitz wrote: > On 10.11.2015 04:45, Eric Blake wrote: > > [side question] > > > > On 11/09/2015 08:27 PM, Max Reitz wrote: > >> Overall, this series adds more uses for BlockBackends and makes the code > >> follow the "reference theory" more closely,

Re: [Qemu-devel] [PATCH v10 24/30] qapi: Factor out QAPISchemaObjectType.check_clash()

2015-11-09 Thread Eric Blake
On 11/09/2015 12:11 PM, Markus Armbruster wrote: > Eric Blake writes: > >> On 11/09/2015 06:00 AM, Markus Armbruster wrote: >>> Eric Blake writes: >>> Consolidate two common sequences of clash detection into a new

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-09 Thread Sukadev Bhattiprolu
Alexey Kardashevskiy [a...@ozlabs.ru] wrote: | On 11/05/2015 10:06 AM, Sukadev Bhattiprolu wrote: | >Implement RTAS_SYSPARM_PROCESSOR_MODULE_INFO parameter to rtas_get_sysparm() | >call in qemu. This call returns the processor module (socket), chip and core | >information as specified in section

Re: [Qemu-devel] [PATCH v2 1/1] target-ppc: Implement rtas_get_sysparm(PROCESSOR_MODULE_INFO)

2015-11-09 Thread Sukadev Bhattiprolu
David Gibson [da...@gibson.dropbear.id.au] wrote: | On Wed, Nov 04, 2015 at 03:06:05PM -0800, Sukadev Bhattiprolu wrote: | > Implement RTAS_SYSPARM_PROCESSOR_MODULE_INFO parameter to rtas_get_sysparm() | > call in qemu. This call returns the processor module (socket), chip and core | > information

Re: [Qemu-devel] [v2 0/2] add avx2 instruction optimization

2015-11-09 Thread Li, Liang Z
> Rather than trying to cater to multiple assembly instruction implementations > ourselves, have you tried taking the ideas in this earlier thread? > https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg05298.html > > Ideally, libc's memcmp() will already be using the most efficient assembly

Re: [Qemu-devel] [PATCH v6 3/4] qmp: add monitor command to add/remove a child

2015-11-09 Thread Wen Congyang
On 11/10/2015 12:04 AM, Kevin Wolf wrote: > Am 16.10.2015 um 10:57 hat Wen Congyang geschrieben: >> +## >> +# @ChangeOperation: >> +# >> +# An enumeration of block device change operation. >> +# >> +# @add: Add a new block driver state to a existed block driver state. >> +# >> +# @delete: Delete a

Re: [Qemu-devel] [PATCH V3 6/6] virtio-pci: unbreak queue_enable read

2015-11-09 Thread Jason Wang
On 11/09/2015 09:14 PM, Cornelia Huck wrote: > On Fri, 6 Nov 2015 16:02:49 +0800 > Jason Wang wrote: > >> Guest always get zero when reading queue_enable. This violates >> spec. Fixing this by setting the queue_enable to true during any guest >> writing and setting it to

[Qemu-devel] [PATCH v2 5/8] blockdev: Add list of monitor-owned BlockBackends

2015-11-09 Thread Max Reitz
The monitor does hold references to some BlockBackends so it should have a list of those BBs; blk_backends is a different list, as it contains references to all BBs (after a follow-up patch, that is), and that should not be changed because we do need such a list. monitor_remove_blk() is

[Qemu-devel] [PATCH v2 2/8] block: Add blk_next_inserted()

2015-11-09 Thread Max Reitz
This function skips to the next BlockBackend for which blk_is_inserted() is true. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- block/block-backend.c | 15 +++ include/sysemu/block-backend.h | 1 + 2 files changed, 16

[Qemu-devel] [PATCH v2 3/8] block: Add blk_commit_all() and blk_invalidate_cache_all()

2015-11-09 Thread Max Reitz
These functions will be changed to iterate through the BDS trees as defined by the BlockBackends instead of the list of root BDS, therefore prepare moving their code to the BlockBackend level. Signed-off-by: Max Reitz Reviewed-by: Eric Blake ---

[Qemu-devel] [PATCH v2 1/8] block: Add blk_name_taken()

2015-11-09 Thread Max Reitz
There may be BlockBackends which are not returned by blk_by_name(), but do exist and have a name. blk_name_taken() allows testing whether a specific name is in use already, independent of whether the BlockBackend with that name is accessible through blk_by_name(). Signed-off-by: Max Reitz

[Qemu-devel] [PATCH 7/8] block: Make bdrv_open() return a BDS

2015-11-09 Thread Max Reitz
There are no callers to bdrv_open() or bdrv_open_inherit() left that pass a pointer to a non-NULL BDS pointer as the first argument of these functions, so we can finally drop that parameter and just make them return the new BDS. Generally, the following pattern is applied: bs = NULL; ret

[Qemu-devel] [PATCH 6/8] block: Drop bdrv_new_root()

2015-11-09 Thread Max Reitz
It is unused now, so we may just as well drop it. Signed-off-by: Max Reitz --- block.c | 5 - include/block/block.h | 1 - 2 files changed, 6 deletions(-) diff --git a/block.c b/block.c index 395b7b0..0531992 100644 --- a/block.c +++ b/block.c @@ -243,11

Re: [Qemu-devel] [PATCH v2 0/8] blockdev: Further BlockBackend work

2015-11-09 Thread Max Reitz
On 10.11.2015 04:45, Eric Blake wrote: > [side question] > > On 11/09/2015 08:27 PM, Max Reitz wrote: >> Overall, this series adds more uses for BlockBackends and makes the code >> follow the "reference theory" more closely, in that any BlockBackend >> created (through -drive or blockdev-add) has

[Qemu-devel] [PATCH 5/8] block: Drop blk_new_with_bs()

2015-11-09 Thread Max Reitz
Its only caller is blk_new_open(), so we can just inline it there. Since bdrv_new_root() is only a wrapper around bdrv_new(), we can just use bdrv_new() instead. Signed-off-by: Max Reitz --- block/block-backend.c | 29 +++-- 1 file changed, 7

Re: [Qemu-devel] [PATCH v2 0/8] blockdev: Further BlockBackend work

2015-11-09 Thread Eric Blake
[side question] On 11/09/2015 08:27 PM, Max Reitz wrote: > Overall, this series adds more uses for BlockBackends and makes the code > follow the "reference theory" more closely, in that any BlockBackend > created (through -drive or blockdev-add) has a reference count of 1, and > that reference

Re: [Qemu-devel] [PATCH v10 22/30] qapi: Simplify QAPISchemaObjectTypeVariants.check()

2015-11-09 Thread Eric Blake
On 11/09/2015 05:38 AM, Markus Armbruster wrote: > Eric Blake writes: > >> From: Markus Armbruster >> >> Reduce the ugly flat union / simple union conditional by doing just >> the essential work here, namely setting self.tag_member. >> Move the rest to

Re: [Qemu-devel] [PATCH v10 23/30] qapi: Check for qapi collisions of flat union branches

2015-11-09 Thread Eric Blake
On 11/09/2015 05:56 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Right now, our ad hoc parser ensures that we cannot have a >> flat union that introduces any qapi member names that would >> conflict with the non-variant qapi members already present >> from the

[Qemu-devel] [PATCH v1 2/2] spapr: Handle failure of KVM_PPC_ALLOCATE_HTAB ioctl

2015-11-09 Thread Bharata B Rao
KVM_PPC_ALLOCATE_HTAB ioctl can return -ENOMEM for KVM guests and QEMU never handled this correctly. But this didn't cause any problems till now as KVM_PPC_ALLOCATE_HTAB ioctl returned with smaller than requested HTAB when enough contiguous memory wasn't available in the host. After the proposed

[Qemu-devel] [PATCH v1 0/2] Handle KVM_PPC_ALLOCATE_HTAB ioctl failure

2015-11-09 Thread Bharata B Rao
KVM_PPC_ALLOCATE_HTAB ioctl can now return errors and handle that correctly in QEMU. Also fix !CONFIG_KVM implementation of kvmppc_reset_htab() to return 0 instead of -1. Changes in v1 - Add a patch to fix !CONFIG_KVM implementation of kvmppc_reset_htab() so that make check passes

[Qemu-devel] [PATCH v1 1/2] ppc: Let kvmppc_reset_htab() return 0 for !CONFIG_KVM

2015-11-09 Thread Bharata B Rao
The !CONFIG_KVM implementation of kvmppc_reset_htab() returns -1 by default. Change this to return 0 so that we fall back to user space HTAB allocation for emulated guests. This fixes the make check failures for ppc64 emulated target. Signed-off-by: Bharata B Rao ---

Re: [Qemu-devel] [PATCH v10 25/30] qapi: Hoist tag collision check to Variants.check()

2015-11-09 Thread Eric Blake
On 11/09/2015 06:07 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Checking that a given QAPISchemaObjectTypeVariant.name is a >> member of the corresponding QAPISchemaEnumType of the owning >> QAPISchemaObjectTypeVariants.tag_member ensures that there are >> no

[Qemu-devel] [PATCH 4/8] block: Drop BB name from bad option error

2015-11-09 Thread Max Reitz
The information which BB is concerned does not seem useful enough to justify its existence in most other place (which may be related to qemu printing the -drive parameter in question anyway, and for blockdev-add the attribution is naturally unambiguous). Furthermore, as of a future patch,

[Qemu-devel] [PATCH 0/8] blockdev: (Nearly) free clean-up work

2015-11-09 Thread Max Reitz
After a lot has been restructed in the block layer in the past, we can now reap at least one of the fruits: Make bdrv_open() return a BDS! I tried to squeeze patch 8 of this series into my bdrv_close_all() series but noticed that won't work because bdrv_open_inherit() still has one instance of

[Qemu-devel] [PATCH 8/8] block: Assert !bs->refcnt in bdrv_close()

2015-11-09 Thread Max Reitz
The only caller of bdrv_close() left is bdrv_delete(). We may as well assert that, in a way (there are some things in bdrv_close() that make more sense under that assumption, such as the call to bdrv_release_all_dirty_bitmaps() which in turn assumes that no frozen bitmaps are attached to the BDS).

[Qemu-devel] [PATCH 3/8] block: Let bdrv_open_inherit() return the snapshot

2015-11-09 Thread Max Reitz
If bdrv_open_inherit() creates a snapshot BDS and *pbs is NULL, that snapshot BDS should be returned instead of the BDS under it. To this end, bdrv_append_temp_snapshot() now returns the snapshot BDS instead of just appending it on top of the snapshotted BDS, and that function is made static

[Qemu-devel] [PATCH 1/8] qapi: Drop QERR_UNKNOWN_BLOCK_FORMAT_FEATURE

2015-11-09 Thread Max Reitz
Just specifying a custom string is simpler in basically all places that used it, and in addition, specifying the BB or node name is something we generally do not do in other error messages when opening a BDS, so we should not do it here. This changes the output for iotest 036 (to the better, in

Re: [Qemu-devel] [v2 0/2] add avx2 instruction optimization

2015-11-09 Thread Eric Blake
On 11/09/2015 07:51 PM, Liang Li wrote: > buffer_find_nonzero_offset() is a hot function during live migration. > Now it use SSE2 intructions for optimization. For platform supports > AVX2 instructions, use the AVX2 instructions for optimization can help > to improve the performance about 30%

Re: [Qemu-devel] [PATCH v10 23/30] qapi: Check for qapi collisions of flat union branches

2015-11-09 Thread Eric Blake
On 11/09/2015 08:13 AM, Markus Armbruster wrote: > Markus Armbruster writes: > >> Eric Blake writes: >> >>> Right now, our ad hoc parser ensures that we cannot have a >>> flat union that introduces any qapi member names that would >>> conflict with the

Re: [Qemu-devel] [PATCH v10 24/30] qapi: Factor out QAPISchemaObjectType.check_clash()

2015-11-09 Thread Eric Blake
On 11/09/2015 07:49 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Consolidate two common sequences of clash detection into a >> new QAPISchemaObjectType.check_clash() helper method. >> >> No change to generated code. >> >> Signed-off-by: Eric Blake

[Qemu-devel] [v2 1/2] cutils: add avx2 instruction optimization

2015-11-09 Thread Liang Li
buffer_find_nonzero_offset() is a hot function during live migration. Now it use SSE2 intructions for optimization. For platform supports AVX2 instructions, use the AVX2 instructions for optimization can help to improve the performance about 30% comparing to SSE2. Zero page check can be faster

[Qemu-devel] [v2 2/2] configure: add options to config avx2

2015-11-09 Thread Liang Li
Add the '--enable-avx2' & '--disable-avx2' option so as to config the AVX2 instruction optimization. By default, avx2 optimization is enabled, if '--disable-avx2' is not set, configure will detect if the compiler can support AVX2 option, if yes, AVX2 optimization is eabled, else disabled.

[Qemu-devel] [v2 0/2] add avx2 instruction optimization

2015-11-09 Thread Liang Li
buffer_find_nonzero_offset() is a hot function during live migration. Now it use SSE2 intructions for optimization. For platform supports AVX2 instructions, use the AVX2 instructions for optimization can help to improve the performance about 30% comparing to SSE2. Zero page check can be faster

Re: [Qemu-devel] [PATCH 05/10] snapshot: create bdrv_all_find_snapshot helper

2015-11-09 Thread Stefan Hajnoczi
On Sat, Nov 07, 2015 at 06:54:55PM +0300, Denis V. Lunev wrote: This: > +int bdrv_all_find_snapshot(const char *name, BlockDriverState **first_bad_bs) > +{ > +QEMUSnapshotInfo sn; > +int err = 0; > +BlockDriverState *bs = NULL; > + > +while (err == 0 && (bs = bdrv_next(bs))) { >

[Qemu-devel] [PULL 07/57] Rename mis->file to from_src_file

2015-11-09 Thread Juan Quintela
From: "Dr. David Alan Gilbert" 'file' becomes confusing when you have flows in each direction; rename to make it clear. This leaves just the main forward direction ms->file, which is used in a lot of places and is probably not worth renaming given the churn. Signed-off-by:

  1   2   3   4   5   >