Re: [Qemu-devel] fw_cfg DMA security

2015-10-22 Thread Gerd Hoffmann
Hi, > One complication I thought of was that it might be tricky to deal with > the implications of allowing this DMA to specify any old address to > fill with fw_cfg data. > > So, for example, since Red Hat is working on SMM. Would a DMA to SMRAM > be protected? > > I haven't watched the fw_cf

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

2015-10-22 Thread Michael S. Tsirkin
On Fri, Oct 23, 2015 at 12:13:53PM +0800, Cao jin wrote: > 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 noti

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-22 Thread Markus Armbruster
Eduardo Habkost writes: > On Wed, Oct 21, 2015 at 12:54:23PM +0200, Markus Armbruster wrote: >> Valerio Aimale writes: > [...] >> > There's also a similar patch, floating around the internet, the uses >> > shared memory, instead of sockets, as inter-process communication >> > between libvmi and

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-22 Thread Markus Armbruster
Valerio Aimale writes: > On 10/22/15 5:50 AM, Markus Armbruster wrote: >> Valerio Aimale writes: >> >>> On 10/21/15 4:54 AM, Markus Armbruster wrote: [...] Can you give an example? >>> Yes. I was trying to dump the full extent of physical memory of a VM >>> that has 8GB memory space (balloo

[Qemu-devel] fw_cfg DMA security

2015-10-22 Thread Jordan Justen
Back when I was looking at fw_cfg support for -kernel in OVMF, I noted that it took a while to read the kernel. We improved the perf substantially by using a 'rep insb' instruction, which I think kvm special cases to minimize VM traps. Nevertheless, I thought that it would be good to implement a D

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: > >> >> The least verbose naming convention for a conversion function I can >> think of right now is TBase(), where T is the name of a type with a >> base. Compare: >> >> foo((Parent *)child, blah) >> foo(ChildBase(c

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

2015-10-22 Thread Markus Armbruster
Eric Blake writes: > On 10/22/2015 08:26 AM, Eric Blake wrote: > >>> PATCH 08-15 appear to be a purely mechanical switch to u. and from kind >>> to type, except for a qapi.py hunk that looks like it should be in PATCH >>> 07, and a comment update to tests/qapi-schema/union-clash-type.json. >>> Di

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 issue I previously re

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

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

[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, don't rely on member.c_

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

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

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

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

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

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

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

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

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

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

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

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

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

[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: http://repo.or.cz/qemu/ericb.git/shortlog/refs/heads/q

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

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

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

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

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

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

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

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

[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 insertions(+), 3 deletions(-) di

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 the

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] [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&m=144544635330193&w=2 >> >> >> Lan Tianyu

[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 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockd

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

[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 v7 06/10] block: Add "drained begin/end" for transactional external 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. Signed-off-by: Fam Zheng Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf --- blockdev.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/blockde

[Qemu-devel] [PATCH v7 05/10] block: Introduce "drained begin/end" API

2015-10-22 Thread Fam Zheng
The semantics is that after bdrv_drained_begin(bs), bs will not get new external requests until the matching bdrv_drained_end(bs). Signed-off-by: Fam Zheng --- block/io.c| 17 + include/block/block.h | 19 +++ include/block/block_int.h | 2 ++

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: On 10/18/2015 03:53 PM, Leonid Bloch w

[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 --- a/aio-posix.c +++ b

[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 @@ -374,6 +374,29 @@ static void tes

[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 -- 2 files changed, 10

[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 | 5 async.c | 3 +

[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 deletions(-) diff --git a/nbd.c b/nbd.c index fbc66be..dab

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

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

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| I'll have my music baro

Re: [Qemu-devel] [PATCH v2 0/3] target-i386: save/restore vcpu's TSC rate during migration

2015-10-22 Thread Haozhong Zhang
On Thu, Oct 22, 2015 at 04:45:21PM -0200, Eduardo Habkost wrote: > On Tue, Oct 20, 2015 at 03:22:51PM +0800, Haozhong Zhang wrote: > > This patchset enables QEMU to save/restore vcpu's TSC rate during the > > migration. When cooperating with KVM which supports TSC scaling, guest > > programs can ob

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

2015-10-22 Thread Eric Blake
On 10/21/2015 07:34 AM, Markus Armbruster wrote: > > The least verbose naming convention for a conversion function I can > think of right now is TBase(), where T is the name of a type with a > base. Compare: > > foo((Parent *)child, blah) > foo(ChildBase(child), blah) > > Tolerable? W

Re: [Qemu-devel] Question about odd snapshot behaviour

2015-10-22 Thread Sam Bobroff
On Mon, Oct 19, 2015 at 02:50:17PM +0200, Kevin Wolf wrote: > [ CC: qemu-block ] > > Am 19.10.2015 um 07:27 hat Sam Bobroff geschrieben: > > Hi all, > > > > While working through the QEMU code that saves and loads snapshots, I've > > noticed some confusing behaviour when using named VM snapshots

[Qemu-devel] [PATCH] vfio/pci: Hide device PCIe capability on non-express buses for PCIe VMs

2015-10-22 Thread Alex Williamson
When we have a PCIe VM, such as Q35, guests start to care more about valid configurations of devices relative to the VM view of the PCI topology. Windows will error with a Code 10 for an assigned device if a PCIe capability is found for a device on a conventional bus. We also have the possibility

[Qemu-devel] [PATCH] pci: Adjust PCI config limit based on bus topology

2015-10-22 Thread Alex Williamson
A conventional PCI bus does not support config space accesses above the standard 256 byte configuration space. PCIe-to-PCI bridges are not permitted to forward transactions if the extended register address field is non-zero and must handle it as an unsupported request (PCIe bridge spec rev 1.0, 4.

Re: [Qemu-devel] [PATCH v2 1/8] i.MX: Standardize i.MX serial debug.

2015-10-22 Thread Peter Crosthwaite
On Wed, Oct 21, 2015 at 2:35 PM, Jean-Christophe Dubois wrote: > The goal is to have debug code always compiled during build. > > We standardize all debug output on the following format: > > [QOM_TYPE_NAME]reporting_function: debug message > > We also replace IPRINTF with qemu_log_mask(). The qemu

Re: [Qemu-devel] [PATCH] target-tilegx: Implement prefetch instructions in pipe y2

2015-10-22 Thread Chen Gang
On 10/23/15 01:53, Richard Henderson wrote: > On 10/20/2015 05:26 AM, Chen Gang wrote: >>> From 14fe2a651b3f5729f1d402dfcd6eb5f7da0f42b1 Mon Sep 17 00:00:00 2001 >> From: Chen Gang >> Date: Tue, 20 Oct 2015 23:19:02 +0800 >> Subject: [PATCH] target-tilegx: Implement prefetch instructions in pipe y

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-22 Thread Valerio Aimale
On 10/22/15 3:47 PM, Eduardo Habkost wrote: On Thu, Oct 22, 2015 at 01:57:13PM -0600, Valerio Aimale wrote: On 10/22/15 1:12 PM, Eduardo Habkost wrote: On Wed, Oct 21, 2015 at 12:54:23PM +0200, Markus Armbruster wrote: Valerio Aimale writes: [...] There's also a similar patch, floating arou

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-22 Thread Eduardo Habkost
On Thu, Oct 22, 2015 at 01:57:13PM -0600, Valerio Aimale wrote: > On 10/22/15 1:12 PM, Eduardo Habkost wrote: > >On Wed, Oct 21, 2015 at 12:54:23PM +0200, Markus Armbruster wrote: > >>Valerio Aimale writes: > >[...] > >>>There's also a similar patch, floating around the internet, the uses > >>>sha

Re: [Qemu-devel] exec: About DISAS_JUMP and DISAS_UPDATE

2015-10-22 Thread Peter Maydell
On 22 October 2015 at 19:28, Sergey Fedorov wrote: > Hi all, > > I am trying to understand what the difference should be between > DISAS_JUMP and DISAS_UPDATE. Actually, these macros have comments in > include/exec/exec-all.h which say that DISAS_JUMP should be used when > only PC was modified dyn

Re: [Qemu-devel] [PATCH v3 4/5] Enable fw_cfg DMA interface for ARM

2015-10-22 Thread Gabriel L. Somlo
On Sat, 19 Sep 2015, Laszlo Ersek wrote: > Got some good news: with those two fixups in place (register block > size corrected, and dma_enabled set via device property), I could > test the AAVMF / ArmVirtPkg / > patches. > > On my APM Mustang, downloading a decompressed kernel (14,475,776 > bytes)

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

2015-10-22 Thread Paolo Bonzini
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 >> compliance to the bdrv_drain semantics we should make su

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-22 Thread Valerio Aimale
On 10/22/15 2:03 PM, Eric Blake wrote: On 10/22/2015 01:57 PM, Valerio Aimale wrote: pmemmap would return the following json { 'success' : 'true', 'map_filename' : '/tmp/QEM_mmap_1234567' } In general, it is better if the client controls the filename, and not qemu. This is because

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

2015-10-22 Thread Matthias Lange
This patch appends "ACPI0007" as the HID to each processor object. Until commit 20843d processor objects used to have a _HID. According to the ACPI spec this is not required but removing it breaks systems which relied on the HID. As it does no harm it is safe to add _HID to processor objects and r

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-22 Thread Eric Blake
On 10/22/2015 01:57 PM, Valerio Aimale wrote: > > pmemmap would return the following json > > { > 'success' : 'true', > 'map_filename' : '/tmp/QEM_mmap_1234567' > } In general, it is better if the client controls the filename, and not qemu. This is because things like libvirt like to r

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-22 Thread Valerio Aimale
On 10/22/15 1:12 PM, Eduardo Habkost wrote: On Wed, Oct 21, 2015 at 12:54:23PM +0200, Markus Armbruster wrote: Valerio Aimale writes: [...] There's also a similar patch, floating around the internet, the uses shared memory, instead of sockets, as inter-process communication between libvmi and

Re: [Qemu-devel] exec: About DISAS_JUMP and DISAS_UPDATE

2015-10-22 Thread Richard Henderson
On 10/22/2015 08:28 AM, Sergey Fedorov wrote: Hi all, I am trying to understand what the difference should be between DISAS_JUMP and DISAS_UPDATE. Actually, these macros have comments in include/exec/exec-all.h which say that DISAS_JUMP should be used when only PC was modified dynamically wherea

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

2015-10-22 Thread Paolo Bonzini
On 22/10/2015 19:39, Radim Krčmář wrote: > 2015-10-22 18:14+0200, Paolo Bonzini: >> On 22/10/2015 18:02, Eric Blake wrote: >>> I see a bug in there: >> >> Of course. You shouldn't have told me what the bug was, I deserved >> to look for it myself. :) > > It rather seems that you don't want spoi

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

2015-10-22 Thread Paolo Bonzini
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 the lpc chip", Nov 14 2012) added the ich9_apm_ctrl_ch

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

2015-10-22 Thread Michael S. Tsirkin
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. Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 48 -

[Qemu-devel] [PULL] vhost: build fix

2015-10-22 Thread Michael S. Tsirkin
The following changes since commit 3c23402d4032f69af44a87fdb8019ad3229a4f31: hw/isa/lpc_ich9: inject the SMI on the VCPU that is writing to APM_CNT (2015-10-22 14:39:09 +0300) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for y

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-22 Thread Eduardo Habkost
On Wed, Oct 21, 2015 at 12:54:23PM +0200, Markus Armbruster wrote: > Valerio Aimale writes: [...] > > There's also a similar patch, floating around the internet, the uses > > shared memory, instead of sockets, as inter-process communication > > between libvmi and QEMU. I've never used that. > > B

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-22 Thread Eric Blake
On 10/22/2015 12:43 PM, Valerio Aimale wrote: > > What if there was a qmp command, say 'pmemmap' then when invoked, > performs the following: > > qmp_pmemmap( [...]) { > > char *template = "/tmp/QEM_mmap_XXX"; Why not let the caller pass in the file name, rather than opening it ourselv

Re: [Qemu-devel] [PATCH v2 0/3] target-i386: save/restore vcpu's TSC rate during migration

2015-10-22 Thread Eduardo Habkost
On Tue, Oct 20, 2015 at 03:22:51PM +0800, Haozhong Zhang wrote: > This patchset enables QEMU to save/restore vcpu's TSC rate during the > migration. When cooperating with KVM which supports TSC scaling, guest > programs can observe a consistent guest TSC rate even though they are > migrated among m

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-22 Thread Valerio Aimale
On 10/21/15 4:54 AM, Markus Armbruster wrote: Valerio Aimale writes: On 10/19/15 1:52 AM, Markus Armbruster wrote: Valerio Aimale writes: On 10/16/15 2:15 AM, Markus Armbruster wrote: vale...@aimale.com writes: All- I've produced a patch for the current QEMU HEAD, for libvmi to introsp

[Qemu-devel] exec: About DISAS_JUMP and DISAS_UPDATE

2015-10-22 Thread Sergey Fedorov
Hi all, I am trying to understand what the difference should be between DISAS_JUMP and DISAS_UPDATE. Actually, these macros have comments in include/exec/exec-all.h which say that DISAS_JUMP should be used when only PC was modified dynamically whereas DISAS_UPDATE should be used when some other CP

Re: [Qemu-devel] QEMU patch to allow VM introspection via libvmi

2015-10-22 Thread Valerio Aimale
On 10/22/15 5:50 AM, Markus Armbruster wrote: Valerio Aimale writes: On 10/21/15 4:54 AM, Markus Armbruster wrote: Valerio Aimale writes: On 10/19/15 1:52 AM, Markus Armbruster wrote: Valerio Aimale writes: On 10/16/15 2:15 AM, Markus Armbruster wrote: vale...@aimale.com writes: All

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

2015-10-22 Thread Eduardo Habkost
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 the host TSC rate. > > The loading is controlled by a new cpu option 'lo

[Qemu-devel] [PULL v3 4/4] configure: avoid polluting global CFLAGS with tasn1 flags

2015-10-22 Thread Daniel P. Berrange
The previous commit commit 9a2fd4347c40321f5cbb4ab4220e759fcbf87d03 Author: Daniel P. Berrange Date: Mon Apr 13 14:01:39 2015 +0100 crypto: add sanity checking of TLS x509 credentials defined new variables $TEST_LIBS and $TEST_CFLAGS and used them in tests/Makefile to augment $LIBS

[Qemu-devel] [PULL v3 3/4] crypto: add sanity checking of plaintext/ciphertext length

2015-10-22 Thread Daniel P. Berrange
When encrypting/decrypting data, the plaintext/ciphertext buffers are required to be a multiple of the cipher block size. If this is not done, nettle will abort and gcrypt will report an error. To get consistent behaviour add explicit checks upfront for the buffer sizes. Signed-off-by: Daniel P. B

[Qemu-devel] [PULL v3 2/4] crypto: don't let builtin aes crash if no IV is provided

2015-10-22 Thread Daniel P. Berrange
If no IV is provided, then use a default IV of all-zeros instead of crashing. This gives parity with gcrypt and nettle backends. Signed-off-by: Daniel P. Berrange --- crypto/cipher-builtin.c| 14 +- tests/test-crypto-cipher.c | 30 ++ 2 files changed,

[Qemu-devel] [PULL v3 0/4] Misc fixes for crypto code module

2015-10-22 Thread Daniel P. Berrange
The following changes since commit ca3e40e233e87f7b29442311736a82da01c0df7b: Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2015-10-22 12:41:44 +0100) are available in the git repository at: https://github.com/berrange/qemu.git tags/qcrypto-fixes-pull-

[Qemu-devel] [PULL v3 1/4] crypto: allow use of nettle/gcrypt to be selected explicitly

2015-10-22 Thread Daniel P. Berrange
Currently the choice of whether to use nettle or gcrypt is made based on what gnutls is linked to. There are times when it is desirable to be able to force build against a specific library. For example, if testing changes to QEMU's crypto code all 3 possible backends need to be checked regardless o

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

2015-10-22 Thread Kevin O'Connor
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 the lpc chip", Nov 14 2012) added the > > > ich9_apm_ctrl_changed() ioport write callback function such th

Re: [Qemu-devel] [PATCH] target-tilegx: Implement prefetch instructions in pipe y2

2015-10-22 Thread Richard Henderson
On 10/20/2015 05:26 AM, Chen Gang wrote: From 14fe2a651b3f5729f1d402dfcd6eb5f7da0f42b1 Mon Sep 17 00:00:00 2001 From: Chen Gang Date: Tue, 20 Oct 2015 23:19:02 +0800 Subject: [PATCH] target-tilegx: Implement prefetch instructions in pipe y2 Originally, tilegx qemu only implement prefetch instr

Re: [Qemu-devel] [PULL 00/10] collected tcg patches

2015-10-22 Thread Peter Maydell
On 22 October 2015 at 12:02, Peter Maydell wrote: > Hi. I'm going to hold off on processing this pull for a few days > in the hope that the gcc compile farm's ppc64be box is working > again... ...now applied, thanks. (The folks behind the gcc cfarm did a very fast job with getting the packages in

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

2015-10-22 Thread Radim Krčmář
2015-10-22 18:14+0200, Paolo Bonzini: > On 22/10/2015 18:02, Eric Blake wrote: >> I see a bug in there: > > Of course. You shouldn't have told me what the bug was, I deserved > to look for it myself. :) It rather seems that you don't want spoilers, :) I see two bugs now. > bool memeqzero4_paol

[Qemu-devel] [PATCH] virtio-9p: add savem handlers

2015-10-22 Thread Greg Kurz
We don't support migration of mounted 9p shares. This is handled by a migration blocker. One would expect, however, to be able to migrate if the share is unmounted. Unfortunately virtio-9p-device does not register savevm handlers at all ! Migration succeeds and leaves the guest with a dangling dev

Re: [Qemu-devel] [PATCH 00/40] Patch Round-up for stable 2.4.1, freeze on 2015-10-29

2015-10-22 Thread Cole Robinson
On 10/21/2015 02:05 PM, Cole Robinson wrote: > On 10/21/2015 01:51 PM, Michael Roth wrote: >> Hi everyone, >> >> The following new patches are queued for QEMU stable v2.4.1: >> >> https://github.com/mdroth/qemu/commits/stable-2.4-staging >> >> The release is planned for 2015-11-03: >> >> http:/

Re: [Qemu-devel] [PULL 0/8] QOM CPUState patch queue 2015-10-22

2015-10-22 Thread Peter Maydell
On 22 October 2015 at 17:22, Andreas Färber wrote: > Hello Peter, > > This is my QOM CPU patch queue. Please pull. > > Remaining maintainers should've had more than enough time to object or ack > now. > > Regards, > Andreas > > Cc: Peter Maydell > > Cc: Peter Crosthwaite > > The following chang

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

2015-10-22 Thread Alberto Garcia
On Thu 22 Oct 2015 05:13:55 PM CEST, Alberto Garcia wrote: > 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. Answering myself: it's

Re: [Qemu-devel] cpu modelling and hotplug

2015-10-22 Thread Andreas Färber
Hi, Am 22.10.2015 um 03:27 schrieb Zhu Guihua: > May I know whether the discussion is still ongoing? We did have some discussions at KVM Forum, you may want to check the video recording of my CPU hot-plug talk (end was cut off, I think). > I checked Andreas's git tree, there was no changes about

Re: [Qemu-devel] [PATCH QEMU-XEN v4 1/9] xen_console: correctly cleanup primary console on teardown.

2015-10-22 Thread Stefano Stabellini
On Wed, 21 Oct 2015, Ian Campbell wrote: > All of the work in con_disconnect applies to the primary console case > (when xendev->dev is NULL). Therefore remove the early check and bail > and allow it to fall through. All of the existing code is correctly > conditional already. > > The ->dev and ->

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

2015-10-22 Thread Eric Blake
On 10/22/2015 08:26 AM, Eric Blake wrote: >> PATCH 08-15 appear to be a purely mechanical switch to u. and from kind >> to type, except for a qapi.py hunk that looks like it should be in PATCH >> 07, and a comment update to tests/qapi-schema/union-clash-type.json. >> Did I miss anything? >> >> Com

Re: [Qemu-devel] [PATCH v3 9/9] kvm/x86: Hyper-V kvm exit

2015-10-22 Thread Paolo Bonzini
On 22/10/2015 18:10, Andrey Smetanin wrote: > A new vcpu exit is introduced to notify the userspace of the > changes in Hyper-V SynIC configuration triggered by guest writing to the > corresponding MSRs. > > Changes v3: > * added KVM_EXIT_HYPERV types and structs notes into docs Thanks. The ch

  1   2   3   4   >