Re: [Qemu-devel] [PATCH 2/6] e1000: Trivial implementation of various MAC registers

2015-10-22 Thread Jason Wang
On 10/22/2015 10:05 PM, Leonid Bloch wrote: > On Thu, Oct 22, 2015 at 10:19 AM, Jason Wang wrote: >> >> >> On 10/21/2015 05:13 PM, Leonid Bloch wrote: >>> Hi Jason, thanks for the review! >>> >>> On Tue, Oct 20, 2015 at 8:40 AM, Jason Wang wrote:

[Qemu-devel] [PATCH v7 07/10] block: Add "drained begin/end" for transactional backup

2015-10-22 Thread Fam Zheng
This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. Move the assignment to state->bs up right after bdrv_drained_begin, so that we can use it in the clean callback. The abort callback will still check bs->job and state->job, so

[Qemu-devel] [PATCH v7 09/10] block: Add "drained begin/end" for internal snapshot

2015-10-22 Thread Fam Zheng
This ensures the atomicity of the transaction by avoiding processing of external requests such as those from ioeventfd. state->bs is assigned right after bdrv_drained_begin. Because it was used as the flag for deletion or not in abort, now we need a separate flag - InternalSnapshotState.created.

[Qemu-devel] [PATCH v10 09/25] qapi: Prefer typesafe upcasts to qapi base classes

2015-10-22 Thread Eric Blake
A previous patch (commit 1e6c1616) made it possible to directly cast from a qapi type to its base type. A future patch will do likewise for structs. However, it requires the client code to use a C cast, which turns off compiler type-safety checks if the client gets it wrong. So this patch adds

[Qemu-devel] [PATCH v10 22/25] qapi: Finish converting to new qapi union layout

2015-10-22 Thread Eric Blake
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This

[Qemu-devel] [PATCH v10 04/25] qapi: Reserve '*List' type names for list types

2015-10-22 Thread Eric Blake
Type names ending in 'List' can clash with qapi list types in generated C. We don't currently use such names. It is easier to outlaw them now than to worry about how to resolve such a clash in the future. For precedence, see commit 4dc2e69, which did the same for names ending in 'Kind' versus

[Qemu-devel] [PATCH v10 23/25] qapi: Reserve 'u' member name

2015-10-22 Thread Eric Blake
Now that we have separated union tag values from colliding with non-variant C names, by naming the union 'u', we should reserve this name for our use. Note that we want to forbid 'u' even in a struct with no variants, because it is possible for a future qemu release to extend QMP in a

[Qemu-devel] [PATCH v10 07/25] qapi-visit: Split off visit_type_FOO_fields forward decl

2015-10-22 Thread Eric Blake
We generate a static visit_type_FOO_fields() for every type FOO. However, sometimes we need a forward declaration. Split the code to generate the forward declaration out of gen_visit_implicit_struct() into a new gen_visit_fields_decl(), and also prepare for a forward declaration to be emitted

[Qemu-devel] [PATCH v10 16/25] sockets: Convert to new qapi union layout

2015-10-22 Thread Eric Blake
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This

[Qemu-devel] [PATCH v10 24/25] qapi: Remove outdated tests related to QMP/branch collisions

2015-10-22 Thread Eric Blake
Now that branches are in a separate C namespace, we can remove the restrictions in the parser that claim a branch name would collide with QMP, and delete the negative tests that are no longer problematic. A separate patch can then add positive tests to qapi-schema-test to test that any corner

[Qemu-devel] [PATCH v10 20/25] memory: Convert to new qapi union layout

2015-10-22 Thread Eric Blake
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This

[Qemu-devel] [PATCH v7 10/10] tests: Add test case for aio_disable_external

2015-10-22 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf --- tests/test-aio.c | 24 1 file changed, 24 insertions(+) diff --git a/tests/test-aio.c b/tests/test-aio.c index 03cd45d..1623803 100644 --- a/tests/test-aio.c +++ b/tests/test-aio.c

[Qemu-devel] [PATCH v7 03/10] dataplane: Mark host notifiers' client type as "external"

2015-10-22 Thread Fam Zheng
They will be excluded by type in the nested event loops in block layer, so that unwanted events won't be processed there. Signed-off-by: Fam Zheng Reviewed-by: Kevin Wolf --- hw/block/dataplane/virtio-blk.c | 5 ++--- hw/scsi/virtio-scsi-dataplane.c | 18

[Qemu-devel] [PATCH v7 04/10] aio: introduce aio_{disable, enable}_external

2015-10-22 Thread Fam Zheng
Signed-off-by: Fam Zheng --- aio-posix.c | 3 ++- aio-win32.c | 3 ++- include/block/aio.h | 38 ++ 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index f0f9122..0467f23 100644 ---

[Qemu-devel] [PATCH v10 03/25] qapi: More robust conditions for when labels are needed

2015-10-22 Thread Eric Blake
We were using regular expressions to see if ret included any earlier text that emitted a 'goto out;' line, to decide whether we needed to output an 'out:' label. But this is fragile, if the ret text can possibly combine more than one generated function body, where the first function used a goto

[Qemu-devel] [PATCH v10 02/25] qapi: More idiomatic string operations

2015-10-22 Thread Eric Blake
Rather than slicing the end of a string, we can use python's endswith(). And rather than creating a set of characters, we can search for a character within a string. Signed-off-by: Eric Blake --- v10: new patch --- scripts/qapi.py | 6 +++--- 1 file changed, 3

[Qemu-devel] [PATCH v10 19/25] input: Convert to new qapi union layout

2015-10-22 Thread Eric Blake
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This

[Qemu-devel] [PATCH v10 10/25] qapi: Unbox base members

2015-10-22 Thread Eric Blake
Rather than storing a base class as a pointer to a box, just store the fields of that base class in the same order, so that a child struct can be directly cast to its parent. This gives less malloc overhead, less pointer dereferencing, and even less generated code. Compare to the earlier commit

[Qemu-devel] [PATCH v10 14/25] tests: Convert to new qapi union layout

2015-10-22 Thread Eric Blake
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This

[Qemu-devel] [PATCH v10 18/25] char: Convert to new qapi union layout

2015-10-22 Thread Eric Blake
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This

Re: [Qemu-devel] [Qemu-ppc] PPC VCPU ID packing via KVM_CAP_PPC_SMT

2015-10-22 Thread David Gibson
On Mon, Oct 19, 2015 at 02:34:47PM +1100, Sam Bobroff wrote: > Hi everyone, > > It's currently possible to configure QEMU and KVM such that (on a Power 7 or 8 > host) users are unable to create as many VCPUs as they might reasonably > expect. > I'll outline one fairly straight forward solution

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/3] prep: do not use CPU_LOG_IOPORT, convert to tracepoints

2015-10-22 Thread David Gibson
On Fri, Oct 16, 2015 at 03:16:11PM +0200, Paolo Bonzini wrote: > These messages are disabled by default; a perfect usecase for tracepoints. > Convert them over. > > Signed-off-by: Paolo Bonzini Looks good to me. Applied to ppc-next. -- David Gibson|

Re: [Qemu-devel] [RFC PATCH 0/2] target-ppc migration fixes

2015-10-22 Thread da...@gibson.dropbear.id.au
On Sun, Sep 20, 2015 at 10:31:01PM +0200, Alexander Graf wrote: > > > On 14.09.15 21:30, Mark Cave-Ayland wrote: > > Whilst trying to fix migration of g3beige/mac99 images I came up with the > > following patchset. The first patch is really cosmetic, while the second > > patch > > alters the

[Qemu-devel] [PATCH v7 01/10] aio: Add "is_external" flag for event handlers

2015-10-22 Thread Fam Zheng
All callers pass in false, and the real external ones will switch to true in coming patches. Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf --- aio-posix.c | 6 - aio-win32.c

[Qemu-devel] [PATCH v7 02/10] nbd: Mark fd handlers client type as "external"

2015-10-22 Thread Fam Zheng
So we could distinguish it from internal used fds, thus avoid handling unwanted events in nested aio polls. Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf --- nbd.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Qemu-devel] [PATCH v7 00/10] block: Protect nested event loop with bdrv_drained_begin and bdrv_drained_end

2015-10-22 Thread Fam Zheng
v7: Exclude bdrv_drain and bdrv_qed_drain patches, they'll follow the bdrv_drain fix for bdrv_aio_flush. Fix internal snapshot clean. v6: Add Kevin's rev-by in patches 1-3, 6-8, 10, 12. Add Jeff's rev-by in patches 1, 2, 6-8, 10. 04: Fix spelling and wording in comments. [Jeff]

Re: [Qemu-devel] [PATCH v2 3/3] target-i386: load the migrated vcpu's TSC rate

2015-10-22 Thread Haozhong Zhang
On Thu, Oct 22, 2015 at 04:11:37PM -0200, Eduardo Habkost wrote: > On Tue, Oct 20, 2015 at 03:22:54PM +0800, Haozhong Zhang wrote: > > Set vcpu's TSC rate to the migrated value (if any). If KVM supports TSC > > scaling, guest programs will observe TSC increasing in the migrated rate > > other than

[Qemu-devel] [PATCH v7 08/10] block: Add "drained begin/end" for transactional blockdev-backup

2015-10-22 Thread Fam Zheng
Similar to the previous patch, make sure that external events are not dispatched during transaction operations. Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf --- blockdev.c | 9 - 1 file changed, 8

Re: [Qemu-devel] [PATCH v4 2/2] enable multi-function hot-add

2015-10-22 Thread Cao jin
Hi Michael On 10/22/2015 10:37 PM, Michael S. Tsirkin wrote: On Thu, Oct 22, 2015 at 07:57:52PM +0800, Cao jin wrote: Enable pcie device multifunction hot, just ensure the function 0 added last, then driver will got the notification to scan all the function in the slot. Signed-off-by: Cao jin

Re: [Qemu-devel] [PATCH] hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT

2015-10-22 Thread Jordan Justen
On 2015-10-22 12:46:56, Paolo Bonzini wrote: > > On 22/10/2015 20:04, Kevin O'Connor wrote: > > On Thu, Oct 22, 2015 at 10:40:08AM +0200, Paolo Bonzini wrote: > >> On 21/10/2015 20:36, Jordan Justen wrote: > >>> On 2015-10-20 11:14:00, Laszlo Ersek wrote: > Commit 4d00636e97b7 ("ich9: Add

[Qemu-devel] [PATCH v10 11/25] qapi-visit: Remove redundant functions for flat union base

2015-10-22 Thread Eric Blake
The code for visiting the base class of a child struct created visit_type_Base_fields() which covers all fields of Base; while the code for visiting the base class of a flat union created visit_type_Union_fields() covering all fields of the base except the discriminator. But since the base class

[Qemu-devel] [PATCH v10 12/25] qapi: Start converting to new qapi union layout

2015-10-22 Thread Eric Blake
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This

[Qemu-devel] [PATCH v10 08/25] qapi-types: Refactor base fields output

2015-10-22 Thread Eric Blake
Move code from gen_union() into gen_struct_fields() in order for a later patch to share code when enumerating inherited fields for struct types. No change to generated code. Signed-off-by: Eric Blake --- v10: new patch, split off of 5/17 --- scripts/qapi-types.py | 21

[Qemu-devel] [PATCH v10 00/25] qapi collision reduction (post-introspection subset B')

2015-10-22 Thread Eric Blake
No pending prerequisites (applies to current master) Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv10b and I plan to eventually forcefully update my branch with the rest of the v5 series, at:

[Qemu-devel] [PATCH v10 06/25] vnc: Hoist allocation of VncBasicInfo to callers

2015-10-22 Thread Eric Blake
A future qapi patch will rework generated structs with a base class to be unboxed. In preparation for that, change the code that allocates then populates an info struct to instead merely populate the fields of an info field passed in as a parameter (renaming vnc_basic_info_get* to

[Qemu-devel] [PATCH v10 13/25] qapi-visit: Convert to new qapi union layout

2015-10-22 Thread Eric Blake
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This

[Qemu-devel] [PATCH v10 15/25] block: Convert to new qapi union layout

2015-10-22 Thread Eric Blake
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This

[Qemu-devel] [PATCH v10 25/25] qapi: Simplify gen_struct_field()

2015-10-22 Thread Eric Blake
Rather than having all callers pass a name, type, and optional flag, have them instead pass a QAPISchemaObjectTypeMember which already has all that information. No change to generated code. Signed-off-by: Eric Blake --- v10: no change v9: rebase after kind/base cleanups,

Re: [Qemu-devel] [PATCH v2 3/3] target-i386: load the migrated vcpu's TSC rate

2015-10-22 Thread Haozhong Zhang
On Thu, Oct 22, 2015 at 04:11:37PM -0200, Eduardo Habkost wrote: > On Tue, Oct 20, 2015 at 03:22:54PM +0800, Haozhong Zhang wrote: > > Set vcpu's TSC rate to the migrated value (if any). If KVM supports TSC > > scaling, guest programs will observe TSC increasing in the migrated rate > > other than

Re: [Qemu-devel] [PATCH v6 11/12] qed: Implement .bdrv_drain

2015-10-22 Thread Fam Zheng
On Thu, 10/22 22:59, Paolo Bonzini wrote: > > > On 22/10/2015 12:53, Kevin Wolf wrote: > > Am 22.10.2015 um 08:32 hat Fam Zheng geschrieben: > >> The "need_check_timer" is used to clear the "NEED_CHECK" flag in the > >> image header after a grace period once metadata update has finished. In > >>

Re: [Qemu-devel] [RFC PATCH 0/3] Qemu/IXGBE: Add live migration support for SRIOV NIC

2015-10-22 Thread Lan Tianyu
On 2015年10月22日 02:39, Alex Williamson wrote: > On Thu, 2015-10-22 at 00:52 +0800, Lan Tianyu wrote: >> This patchset is Qemu part for live migration support for SRIOV NIC. >> kernel part patch information is in the following link. >> http://marc.info/?l=kvm=144544635330193=2 >> >> >> Lan Tianyu

[Qemu-devel] [PATCH v10 01/25] tests/qapi-schema: Test for reserved names, empty struct

2015-10-22 Thread Eric Blake
We are failing to detect a collision between a QMP member and the implicit 'has_*' flag for another optional QMP member. The easiest fix would be for a future patch to reserve the entire "has[-_]" namespace for member names (the collision is also possible for branch names within flat unions, but

[Qemu-devel] [PATCH v10 05/25] qapi: Reserve 'q_*' and 'has_*' member names

2015-10-22 Thread Eric Blake
c_name() produces names starting with 'q_' when protecting a QMP member name that would fail to directly compile, but in doing so can cause clashes with any QMP name already beginning with 'q-' or 'q_'. Likewise, we create a C name 'has_' for any optional member, that can clash with any QMP name

[Qemu-devel] [PATCH v10 21/25] tpm: Convert to new qapi union layout

2015-10-22 Thread Eric Blake
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This

Re: [Qemu-devel] [PULL] vhost-user: fix up rhel6 build

2015-10-22 Thread Laurent Desnogues
Hello, On Thu, Oct 22, 2015 at 9:37 PM, Michael S. Tsirkin wrote: > Build on RHEL6 fails: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42875 > > Apparently unnamed unions couldn't use C99 named field initializers. > Let's just name the payload union field. This fixes the

Re: [Qemu-devel] [PATCH 0/6] qobject: Make conversion from QObject * accept null

2015-10-22 Thread Markus Armbruster
Luiz Capitulino writes: > On Thu, 15 Oct 2015 16:15:31 +0200 > Markus Armbruster wrote: > >> The qobject_to_FOO() crash on null, which is a trap for the unwary. >> Return null instead, and simplify a few callers. >> >> Throw in a patch to drop

Re: [Qemu-devel] What's the intended use of log.h logging? (was: [PATCH 2/3] log: report hmp/qmp command and qmp event)

2015-10-22 Thread Stefan Hajnoczi
On Wed, Oct 21, 2015 at 01:22:22PM +0100, Peter Maydell wrote: > On 21 October 2015 at 11:41, Stefan Hajnoczi wrote: > > DPRINTF() falls under both #1 and #2. Care needs to be taken to > > separate the logging from the tracing when converting DPRINTF(). > > > > Side note: we

Re: [Qemu-devel] [RFC Patch 11/12] IXGBEVF: Migrate VF statistic data

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 12:37:43AM +0800, Lan Tianyu wrote: > VF statistic regs are read-only and can't be migrated via writing back > directly. > > Currently, statistic data returned to user space by the driver is not equal > to value of statistic regs. VF driver records value of statistic regs

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 12:37:32AM +0800, Lan Tianyu wrote: > This patchset is to propose a new solution to add live migration support for > 82599 > SRIOV network card. > > Im our solution, we prefer to put all device specific operation into VF and > PF driver and make code in the Qemu more

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 07:01:01AM -0600, Alex Williamson wrote: > On Thu, 2015-10-22 at 15:32 +0300, Michael S. Tsirkin wrote: > > On Wed, Oct 21, 2015 at 01:20:27PM -0600, Alex Williamson wrote: > > > The trouble here is that the VF needs to be unplugged prior to the start > > > of migration

Re: [Qemu-devel] [PATCH] i386/acpi: add _HID to processor nodes

2015-10-22 Thread Matthias Lange
On 10/22/2015 03:02 PM, Michael S. Tsirkin wrote: > On Thu, Oct 22, 2015 at 02:42:05PM +0200, Matthias Lange wrote: >> On 10/22/2015 01:48 PM, Michael S. Tsirkin wrote: >>> On Thu, Oct 22, 2015 at 12:38:11PM +0200, Matthias Lange wrote: Processor nodes created via the acpi/aml framework

Re: [Qemu-devel] [PATCH] qapi-schema: mark InetSocketAddress as mandatory again

2015-10-22 Thread Eric Blake
On 10/22/2015 04:25 AM, Daniel P. Berrange wrote: > Revert the qapi-schema.json change done in: > > commit 0983f5e6af76d5df8c6346cbdfff9d8305fb6da0 > Author: Daniel P. Berrange > Date: Tue Sep 1 14:46:50 2015 +0100 > > sockets: allow port to be NULL when

Re: [Qemu-devel] [PATCH v2 03/16] sockets: allow port to be NULL when listening on IP address

2015-10-22 Thread Daniel P. Berrange
On Thu, Oct 22, 2015 at 02:10:26PM +0200, Markus Armbruster wrote: > Peter Maydell writes: > > > On 22 October 2015 at 10:43, Daniel P. Berrange wrote: > >> For reasons I don't understand, it appears that even string > >> fields which are marked as

Re: [Qemu-devel] [RFC Patch 06/12] IXGBEVF: Add self emulation layer

2015-10-22 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 01:58:19PM -0700, Alexander Duyck wrote: > On 10/21/2015 09:37 AM, Lan Tianyu wrote: > >In order to restore VF function after migration, add self emulation layer > >to record regs' values during accessing regs. > > > >Signed-off-by: Lan Tianyu > >---

Re: [Qemu-devel] [PATCH] i386/acpi: add _HID to processor nodes

2015-10-22 Thread Matthias Lange
On 10/22/2015 01:48 PM, Michael S. Tsirkin wrote: > On Thu, Oct 22, 2015 at 12:38:11PM +0200, Matthias Lange wrote: >> Processor nodes created via the acpi/aml framework currently don't >> feature a _HID string. This patch appends "ACPI0007" as the _HID >> string to each processor node. >> >>

[Qemu-devel] [PATCH] i386/acpi: add _HID to processor nodes

2015-10-22 Thread Matthias Lange
Processor nodes created via the acpi/aml framework currently don't feature a _HID string. This patch appends "ACPI0007" as the _HID string to each processor node. Signed-off-by: Matthias Lange --- hw/i386/acpi-build.c | 1 + 1 file changed, 1 insertion(+) diff

Re: [Qemu-devel] [PATCH v6 2/4] pcie: Add support for Single Root I/O Virtualization (SR/IOV)

2015-10-22 Thread Dotan Barak
I have minor comments, to use the new helper functions. Thanks Dotan > -Original Message- > From: Knut Omang [mailto:knut.om...@oracle.com] > Sent: Thursday, October 22, 2015 11:02 AM > To: qemu-devel@nongnu.org > Cc: Paolo Bonzini ; Richard Henderson >

Re: [Qemu-devel] What's the intended use of log.h logging?

2015-10-22 Thread Paolo Bonzini
On 22/10/2015 14:26, Stefan Hajnoczi wrote: > printk() - plain old printf > printk_once() - uses a static bool for once-only semantics, > modulo races between CPUs > printk_ratelimited() - time-based rate-limiting > > (And if you need to configure the ratelimit threshold, you

Re: [Qemu-devel] [PATCH v6 0/4] pcie: Add support for Single Root I/O Virtualization

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 10:01:31AM +0200, Knut Omang wrote: > This patch set implements generic support for SR/IOV as an extension to the > core PCIe functionality, similar to the way other capabilities such as AER > is implemented. We are in soft freeze now so I'd rather defer this until 2.5 is

Re: [Qemu-devel] [RFC Patch 00/12] IXGBE: Add live migration support for SRIOV NIC

2015-10-22 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 01:20:27PM -0600, Alex Williamson wrote: > The trouble here is that the VF needs to be unplugged prior to the start > of migration because we can't do effective dirty page tracking while the > device is connected and doing DMA. That's exactly what patch 12/12 is trying to

Re: [Qemu-devel] Coding style for errors

2015-10-22 Thread Lluís Vilanova
Markus Armbruster writes: > Lluís Vilanova writes: [...] >> So, is there any agreement on what should be used? If so, could that please >> be >> added to CODING_STYLE? > I think HACKING would be a better fit. What about this? (at the end of HACKING) Feel free to add

Re: [Qemu-devel] [PULL 00/38] vhost, pc, virtio features, fixes, cleanups

2015-10-22 Thread Peter Maydell
On 22 October 2015 at 12:40, Michael S. Tsirkin wrote: > On Wed, Oct 21, 2015 at 03:06:57PM +0100, Peter Maydell wrote: >> On 21 October 2015 at 11:26, Michael S. Tsirkin wrote: >> > The following changes since commit >> >

Re: [Qemu-devel] [PATCH] qapi-schema: mark InetSocketAddress as mandatory again

2015-10-22 Thread Daniel P. Berrange
On Thu, Oct 22, 2015 at 06:22:29AM -0600, Eric Blake wrote: > On 10/22/2015 04:25 AM, Daniel P. Berrange wrote: > > Revert the qapi-schema.json change done in: > > > > commit 0983f5e6af76d5df8c6346cbdfff9d8305fb6da0 > > Author: Daniel P. Berrange > > Date: Tue Sep 1

Re: [Qemu-devel] [RFC Patch 09/12] IXGBEVF: Add live migration support for VF driver

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 12:37:41AM +0800, Lan Tianyu wrote: > To let VF driver in the guest to know migration status, Qemu will > fake PCI configure reg 0xF0 and 0xF1 to show migrate status and > get ack from VF driver. I guess this works for current devices but not using 0xF0/0xF1 registers is

Re: [Qemu-devel] [RFC Patch 05/12] IXGBE: Add new sysfs interface of "notify_vf"

2015-10-22 Thread Michael S. Tsirkin
On Wed, Oct 21, 2015 at 01:52:48PM -0700, Alexander Duyck wrote: > Also have you even considered the MSI-X configuration on the VF? I haven't > seen anything anywhere that would have migrated the VF's MSI-X configuration > from BAR 3 on one system to the new system. Hypervisors do this for

Re: [Qemu-devel] [RFC Patch 08/12] IXGBEVF: Rework code of finding the end transmit desc of package

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 12:37:40AM +0800, Lan Tianyu wrote: > When transmit a package, the end transmit desc of package > indicates whether package is sent already. Current code records > the end desc's pointer in the next_to_watch of struct tx buffer. > This code will be broken if shifting desc

Re: [Qemu-devel] [PATCH 14/23] userfaultfd: wake pending userfaults

2015-10-22 Thread Andrea Arcangeli
On Thu, Oct 22, 2015 at 02:10:56PM +0200, Peter Zijlstra wrote: > On Thu, May 14, 2015 at 07:31:11PM +0200, Andrea Arcangeli wrote: > > @@ -255,21 +259,23 @@ int handle_userfault(struct vm_area_struct *vma, > > unsigned long address, > > * through poll/read(). > > */ > >

Re: [Qemu-devel] [PATCH] i386/acpi: add _HID to processor nodes

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 03:34:46PM +0200, Matthias Lange wrote: > On 10/22/2015 03:02 PM, Michael S. Tsirkin wrote: > > On Thu, Oct 22, 2015 at 02:42:05PM +0200, Matthias Lange wrote: > >> On 10/22/2015 01:48 PM, Michael S. Tsirkin wrote: > >>> On Thu, Oct 22, 2015 at 12:38:11PM +0200, Matthias

[Qemu-devel] [PATCH v10 17/25] net: Convert to new qapi union layout

2015-10-22 Thread Eric Blake
We have two issues with our qapi union layout: 1) Even though the QMP wire format spells the tag 'type', the C code spells it 'kind', requiring some hacks in the generator. 2) The C struct uses an anonymous union, which places all tag values in the same namespace as all non-variant members. This

Re: [Qemu-devel] [PATCH v9 07/17] qapi: Start converting to new qapi union layout

2015-10-22 Thread Markus Armbruster
Eric Blake writes: > We have two issues with our qapi union layout: > 1) Even though the QMP wire format spells the tag 'type', the > C code spells it 'kind', requiring some hacks in the generator. > 2) The C struct uses an anonymous union, which places all tag > values in the

[Qemu-devel] [PATCH] fw_cfg: move internal function call docs to header file

2015-10-22 Thread Gabriel L. Somlo
Move documentation for fw_cfg functions internal to qemu from docs/specs/fw_cfg.txt to the fw_cfg.h header file, next to their prototype declarations, formatted as doc-comments. Suggested-by: Peter Maydell Cc: Laszlo Ersek Cc: Gerd Hoffmann

Re: [Qemu-devel] DO_UPCAST confusion

2015-10-22 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 22/10/2015 15:55, Eric Blake wrote: > Or maybe container_of_first(), to make it obvious that the parent > class is the first member. > > But how often does it really matter whether the container of the > parent class had the parent as the

[Qemu-devel] [PATCH v2 4/5] block: Add 'x-blockdev-del' QMP command

2015-10-22 Thread Alberto Garcia
This command is still experimental, hence the name. This is the companion to 'blockdev-add'. It allows deleting a BlockBackend with its associated BlockDriverState tree, or a BlockDriverState that is not attached to any backend. In either case, the command fails if the reference count is greater

Re: [Qemu-devel] [PATCH 14/23] userfaultfd: wake pending userfaults

2015-10-22 Thread Peter Zijlstra
On Thu, Oct 22, 2015 at 04:18:31PM +0200, Andrea Arcangeli wrote: > The risk of memory corruption is still zero no matter what happens > here, in the extremely rare case the app will get a SIGBUS or a That might still upset people, SIGBUS isn't something an app can really recover from. > I'm

Re: [Qemu-devel] [PATCH 14/23] userfaultfd: wake pending userfaults

2015-10-22 Thread Andrea Arcangeli
On Thu, Oct 22, 2015 at 05:15:09PM +0200, Peter Zijlstra wrote: > Indefinitely is such a long time, we should try and finish > computation before the computer dies etc. :-) Indefinitely as read_seqcount_retry, eventually it makes progress. Even returning 0 from the page fault can trigger it

Re: [Qemu-devel] [PATCH v9 08/17] tests: Convert to new qapi union layout

2015-10-22 Thread Markus Armbruster
Eric Blake writes: > On 10/22/2015 08:01 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> We have two issues with our qapi union layout: >>> 1) Even though the QMP wire format spells the tag 'type', the >>> C code spells it 'kind', requiring some

[Qemu-devel] [RFC PATCH v3 2/4] kernel: Add definitions for GICv3 attributes

2015-10-22 Thread Pavel Fedin
This temporary patch adds kernel API definitions. Use proper header update procedure after these features are released. Signed-off-by: Pavel Fedin --- linux-headers/asm-arm64/kvm.h | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git

Re: [Qemu-devel] [PATCH v9 07/17] qapi: Start converting to new qapi union layout

2015-10-22 Thread Eric Blake
On 10/22/2015 07:54 AM, Markus Armbruster wrote: > > This is clever and ugly in equal measure. I respect that. Fortunately, > it's also temporary. > >> Flat unions do not need the anonymous union for the tag member, >> as we already fixed that to use the member name instead of 'kind' >> back

Re: [Qemu-devel] DO_UPCAST confusion

2015-10-22 Thread Eric Blake
On 10/22/2015 06:00 AM, Markus Armbruster wrote: > Peter Maydell writes: > >> On 21 October 2015 at 23:49, Eric Blake wrote: >>> I much prefer the name container_of() (which is a bit more obvious that >>> it is finding the container or derived type

Re: [Qemu-devel] [PATCH] copy, dd: simplify and optimize NUL bytes detection

2015-10-22 Thread Paolo Bonzini
On 22/10/2015 17:17, Pádraig Brady wrote: >> > Nice trick indeed. On the other hand, the first 16 bytes are enough to >> > rule out 99.99% (number out of thin hair) of the non-zero blocks, so >> > that's where you want to optimize. Checking them an unsigned long at a >> > time, or fetching a

[Qemu-devel] configure claims I requested feature nettle when I didn't...

2015-10-22 Thread Peter Maydell
[pm215@gcc1-power7 all]$ ../../configure ERROR: User requested feature nettle configure was not able to find it. Install nettle devel ...but as you can see I didn't ask for nettle explicitly at all, so configure should fall back to disabling it, not exiting with an error. configure

Re: [Qemu-devel] [PATCH] qapi-schema: mark InetSocketAddress as mandatory again

2015-10-22 Thread Eric Blake
On 10/22/2015 06:42 AM, Daniel P. Berrange wrote: >>> +++ b/qapi-schema.json >>> @@ -2614,9 +2614,7 @@ >>> # >>> # @host: host part of the address >>> # >>> -# @port: port part of the address, or lowest port if @to is present. >>> -#Kernel selects a free port if omitted for listener

Re: [Qemu-devel] configure claims I requested feature nettle when I didn't...

2015-10-22 Thread Daniel P. Berrange
On Thu, Oct 22, 2015 at 04:17:10PM +0100, Peter Maydell wrote: > [pm215@gcc1-power7 all]$ ../../configure > ERROR: User requested feature nettle >configure was not able to find it. >Install nettle devel > > ...but as you can see I didn't ask for nettle explicitly at all, > so

Re: [Qemu-devel] [PATCH] copy, dd: simplify and optimize NUL bytes detection

2015-10-22 Thread Paolo Bonzini
On 22/10/2015 16:37, Eric Blake wrote: >> > + /* Check first 16 bytes manually. */ >> > + for (len = 0; len < 16; len++) >> > +{ >> > + if (! bufsize) >> > +return true; >> > + if (*p) >> > +return false; >> > + p++; >> > + bufsize--; >> > +} >> > +

[Qemu-devel] [PATCH v2 2/5] backup: keep an extra reference to the target image during the job

2015-10-22 Thread Alberto Garcia
During the 'drive-backup' operation the target image only has the monitor reference, therefore there's nothing that prevents its deletion using the 'x-blockdev-del' command before the block job has finished. Although the operation itself does not allow the user to set a node name that can be used

[Qemu-devel] [RFC PATCH v3 3/4] hw/intc/arm_gicv3_kvm: Implement get/put functions

2015-10-22 Thread Pavel Fedin
This actually implements pre_save and post_load methods for in-kernel vGICv3. Signed-off-by: Pavel Fedin --- hw/intc/arm_gicv3_kvm.c | 456 +++- 1 file changed, 452 insertions(+), 4 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 2/6] e1000: Trivial implementation of various MAC registers

2015-10-22 Thread Leonid Bloch
On Thu, Oct 22, 2015 at 10:19 AM, Jason Wang wrote: > > > > On 10/21/2015 05:13 PM, Leonid Bloch wrote: > > Hi Jason, thanks for the review! > > > > On Tue, Oct 20, 2015 at 8:40 AM, Jason Wang wrote: > >> > >> > >> On 10/18/2015 03:53 PM, Leonid Bloch

Re: [Qemu-devel] [PATCH v9 00/17] qapi collision reduction (post-introspection subset B')

2015-10-22 Thread Markus Armbruster
Eric Blake writes: > Pending prerequisite: Markus' qapi-next branch (which has the first > half of my subset B patches): > git://repo.or.cz/qemu/armbru.git pull-qapi-2015-10-15 > https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg03321.html > > Pending prerequisite:

[Qemu-devel] [PATCH v2 0/5] Add 'x-blockdev-del' command

2015-10-22 Thread Alberto Garcia
Here's the new version of the blockdev-del command. The first change is that I renamed it to 'x-blockdev-del' as Markus suggested. I also extended the test cases, which should be way more robust now. This actually made me realize that there's tricky scenarios that require changes in other parts

Re: [Qemu-devel] [PATCH v4 2/2] enable multi-function hot-add

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 07:57:52PM +0800, Cao jin wrote: > Enable pcie device multifunction hot, just ensure the function 0 > added last, then driver will got the notification to scan all the > function in the slot. > > Signed-off-by: Cao jin > --- > hw/pci/pci.c

Re: [Qemu-devel] [PATCH v6 0/4] pcie: Add support for Single Root I/O Virtualization

2015-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2015 at 02:22:12PM +, Dotan Barak wrote: > I tested those patches on QEMU v2.3.0 and they work > (i.e. it adds to ability for emulated device to work SR-IOV). > > However, when I based my model on newer version of QEMU (i.e. upstream) with > the new SR-IOV patches from Knut,

Re: [Qemu-devel] [PATCH] copy, dd: simplify and optimize NUL bytes detection

2015-10-22 Thread Pádraig Brady
On 22/10/15 15:44, Paolo Bonzini wrote: > > > On 22/10/2015 16:37, Eric Blake wrote: + /* Check first 16 bytes manually. */ + for (len = 0; len < 16; len++) +{ + if (! bufsize) +return true; + if (*p) +return false; +

[Qemu-devel] [RFC PATCH v3 4/4] hw/intc/arm_gicv3_common: Add vmstate descriptors

2015-10-22 Thread Pavel Fedin
Add state structure descriptors and actually enable live migration. In order to describe fixed-size bitmaps, VMSTATE_BITMAP_STATIC() macro is introduced. Signed-off-by: Pavel Fedin --- hw/intc/arm_gicv3_common.c | 58 -

Re: [Qemu-devel] [RFC Patch 06/12] IXGBEVF: Add self emulation layer

2015-10-22 Thread Alexander Duyck
On 10/22/2015 05:50 AM, Michael S. Tsirkin wrote: On Wed, Oct 21, 2015 at 01:58:19PM -0700, Alexander Duyck wrote: On 10/21/2015 09:37 AM, Lan Tianyu wrote: In order to restore VF function after migration, add self emulation layer to record regs' values during accessing regs. Signed-off-by:

[Qemu-devel] [PATCH v2 1/5] mirror: keep an extra reference to the target image during the job

2015-10-22 Thread Alberto Garcia
During the 'drive-mirror' operation the target image only has the monitor reference, therefore there's nothing that prevents its deletion using the 'x-blockdev-del' command before the block job has finished. Signed-off-by: Alberto Garcia --- block/mirror.c | 6 ++ 1 file

[Qemu-devel] [PATCH 24/40] ide: unify io_buffer_offset increments

2015-10-22 Thread Michael Roth
From: John Snow IDEState's io_buffer_offset was originally added to keep track of offsets in AHCI rather exclusively, but it was added to IDEState instead of an AHCI-specific structure. AHCI fakes all PIO transfers using DMA and a scatter-gather list. When the core or atapi

[Qemu-devel] [PATCH 34/40] qdev: Protect device-list-properties against broken devices

2015-10-22 Thread Michael Roth
From: Markus Armbruster Several devices don't survive object_unref(object_new(T)): they crash or hang during cleanup, or they leave dangling pointers behind. This breaks at least device-list-properties, because qmp_device_list_properties() needs to create a device to find its

Re: [Qemu-devel] [PATCH v9 05/17] qapi: Unbox base members

2015-10-22 Thread Markus Armbruster
Eric Blake writes: > On 10/21/2015 07:34 AM, Markus Armbruster wrote: > > @@ -218,9 +216,11 @@ static void channel_event(int event, > SpiceChannelEventInfo *info) > } > > if (info->flags & SPICE_CHANNEL_EVENT_FLAG_ADDR_EXT) { > -

[Qemu-devel] [PATCH] pc: allow raising low memory via max-ram-below-4g option

2015-10-22 Thread Gerd Hoffmann
This patch extends the functionality of the max-ram-below-4g option to also allow increasing lowmem. While being at it also rework the lowmem calculation logic and add a longish comment describing how it works and what the compatibility constrains are. Signed-off-by: Gerd Hoffmann

[Qemu-devel] [PATCH v3 18/21] ide: Account for failed and invalid operations

2015-10-22 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- hw/ide/core.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index b559f1b..dd7e9c5 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -574,7 +574,6 @@ static void

<    1   2   3   4   >