Re: [Qemu-devel] [PATCH] README: fill out some useful quickstart information

2015-09-23 Thread Daniel P. Berrange
On Wed, Sep 23, 2015 at 12:00:08PM +0200, Paolo Bonzini wrote: > > > On 23/09/2015 11:52, Markus Armbruster wrote: > > > I don't think this is necessary. We should remove duplicate information > > > from qemu-doc.texi, developer documentation doesn't belong in manuals. > > > > Just to avoid

Re: [Qemu-devel] [PATCH 0/3] pc: Set hw_version on all machine classes

2015-09-23 Thread Laszlo Ersek
On 09/23/15 10:04, Igor Mammedov wrote: > On Tue, 22 Sep 2015 17:16:24 -0300 > Eduardo Habkost wrote: > >> In 2012, QEMU had a bug where it exposed QEMU version information >> to the guest, meaning a QEMU upgrade would expose different >> hardware to the guest OS even if the

Re: [Qemu-devel] [PATCH v3 17/46] ivshmem: improve debug messages

2015-09-23 Thread Claudio Fontana
On 23.09.2015 12:29, Marc-André Lureau wrote: > On Tue, Sep 22, 2015 at 4:23 PM, Claudio Fontana > wrote: >> This MSI-X use vs not use is a bit confusing to me. >> I see that the use of MSI is controlled mainly by IVSHMEM_MSI (Property >> "msi"), >> but then there are

Re: [Qemu-devel] [PATCH 0/3] pc: Set hw_version on all machine classes

2015-09-23 Thread Laszlo Ersek
On 09/23/15 13:47, Igor Mammedov wrote: > On Wed, 23 Sep 2015 12:37:08 +0200 > Laszlo Ersek wrote: > >> On 09/23/15 10:04, Igor Mammedov wrote: >>> On Tue, 22 Sep 2015 17:16:24 -0300 >>> Eduardo Habkost wrote: >>> In 2012, QEMU had a bug where it

Re: [Qemu-devel] [RFC PATCH 02/10] vfio: Generalize vfio_listener_region_add failure path

2015-09-23 Thread Laurent Vivier
On 17/09/2015 15:09, David Gibson wrote: > If a DMA mapping operation fails in vfio_listener_region_add() it > checks to see if we've already completed initial setup of the > container. If so it reports an error so the setup code can fail > gracefully, otherwise throws a hw_error(). > > There

Re: [Qemu-devel] [RFC PATCH 03/10] vfio: Check guest IOVA ranges against host IOMMU capabilities

2015-09-23 Thread Thomas Huth
On 17/09/15 15:09, David Gibson wrote: > The current vfio core code assumes that the host IOMMU is capable of > mapping any IOVA the guest wants to use to where we need. However, real > IOMMUs generally only support translating a certain range of IOVAs (the > "DMA window") not a full 64-bit

Re: [Qemu-devel] [PATCH v3 09/46] ivshmem: more qdev conversion

2015-09-23 Thread Marc-André Lureau
On Tue, Sep 22, 2015 at 4:00 PM, Claudio Fontana wrote: > On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> Use the latest qemu device modeling API, in particular, convert to >> realize to fix the

Re: [Qemu-devel] [RFC PATCH 05/10] memory: Allow replay of IOMMU mapping notifications

2015-09-23 Thread Thomas Huth
On 17/09/15 15:09, David Gibson wrote: > When we have guest visible IOMMUs, we allow notifiers to be registered > which will be informed of all changes to IOMMU mappings. This is used by > vfio to keep the host IOMMU mappings in sync with guest IOMMU mappings. > > However, unlike with a memory

Re: [Qemu-devel] [PATCH v3 30/46] ivshmem: reset mask on device reset

2015-09-23 Thread Marc-André Lureau
Hi On Wed, Sep 16, 2015 at 2:15 PM, Claudio Fontana wrote: > probably you wanted to say "it should be reset, like the interrupt status". yes, thanks -- Marc-André Lureau

[Qemu-devel] [PATCH v2] qom: allow properties to be registered against classes

2015-09-23 Thread Daniel P. Berrange
When there are many instances of a given class, registering properties against the instance is wasteful of resources. The majority of objects have a statically defined list of possible properties, so most of the properties are easily registerable against the class. Only those properties which are

Re: [Qemu-devel] [PATCH 04/16] quorum: Convert to BdrvChild

2015-09-23 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:08 PM CEST, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/quorum.c | 63 > ++ Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [PATCH 02/16] vmdk: Use BdrvChild instead of BDS for references to extents

2015-09-23 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:06 PM CEST, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/vmdk.c | 99 > +++- > 1 file changed, 51 insertions(+), 48 deletions(-) Reviewed-by: Alberto Garcia

Re: [Qemu-devel] [PATCH v2] docs: describe the QEMU build system structure / design

2015-09-23 Thread Paolo Bonzini
A few nits that missed my first review: On 23/09/2015 11:59, Daniel P. Berrange wrote: > +A further complication for the system and userspace emulator binaries is > +that two separate binaries need to be generated. A further complication for the system emulator binaries (Windows does not

Re: [Qemu-devel] [PATCH v2 3/5] monitor: rename QDict *data->qdict

2015-09-23 Thread Daniel P. Berrange
On Thu, Sep 17, 2015 at 06:08:48PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > As suggested by Markus Armbruster, this is a bit more specific for the > event qdict than 'data'. > > Signed-off-by: Marc-André Lureau

Re: [Qemu-devel] [RFC PATCH 01/10] vfio: Remove unneeded union from VFIOContainer

2015-09-23 Thread Thomas Huth
On 17/09/15 15:09, David Gibson wrote: > Currently the VFIOContainer iommu_data field contains a union with > different information for different host iommu types. However: >* It only actually contains information for the x86-like "Type1" iommu >* Because we have a common listener the

Re: [Qemu-devel] [RFC PATCH 00/10] pseries: Allow VFIO devices on spapr-pci-host-bridge

2015-09-23 Thread Thomas Huth
On 17/09/15 15:09, David Gibson wrote: > Currently the pseries machine type uses two types of PCI Host Bridge > (PHB) devices: "spapr-pci-host-bridge" the 'normal' variant intended > for emulated PCI devices, and "spapr-pci-vfio-host-bridge" intended > for VFIO devices. > > When using VFIO with

Re: [Qemu-devel] [PATCH 2/2] ram_find_and_save_block: Split out the finding

2015-09-23 Thread Amit Shah
On (Wed) 16 Sep 2015 [19:11:54], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Split out the finding of the dirty page and all the wrap detection > into a separate function since it was getting a bit hairy. > > Signed-off-by: Dr. David Alan

Re: [Qemu-devel] [PATCH v5 03/46] qapi: Test for C member name collisions

2015-09-23 Thread Eric Blake
On 09/23/2015 03:43 AM, Markus Armbruster wrote: >> Commit 1e6c1616 was where we quit burning the C member name 'base'. >> Prior to that time, members of base classes did not clash with variant >> names because of the C boxing. > > For union types. For struct types, we still box the base. I'd

Re: [Qemu-devel] [PATCH v2 5/5] monitor: remove old entries from event hash table

2015-09-23 Thread Daniel P. Berrange
On Thu, Sep 17, 2015 at 06:08:50PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Do not let the hash table grow without limit, schedule a cleanup for > outdated event. > > Signed-off-by: Marc-André Lureau > ---

Re: [Qemu-devel] [PATCH v2 4/5] monitor: throttle QAPI_EVENT_VSERPORT_CHANGE by "id"

2015-09-23 Thread Daniel P. Berrange
On Thu, Sep 17, 2015 at 06:08:49PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Use a hash table to lookup the pending event corresponding to the "id" > field. The hash table may grow without limit here, the following patch > will add some

Re: [Qemu-devel] [PATCH v3 18/46] ivshmem: improve error

2015-09-23 Thread Marc-André Lureau
On Tue, Sep 22, 2015 at 4:26 PM, Claudio Fontana wrote: > Seems an interrupted sentence... > > ... improve error handling? improve error messages? ack -- Marc-André Lureau

Re: [Qemu-devel] [RFC PATCH 06/10] vfio: Allow hotplug of containers onto existing guest IOMMU mappings

2015-09-23 Thread Thomas Huth
On 18/09/15 01:31, David Gibson wrote: > On Thu, Sep 17, 2015 at 10:54:24AM -0600, Alex Williamson wrote: >> On Thu, 2015-09-17 at 23:09 +1000, David Gibson wrote: >>> At present the memory listener used by vfio to keep host IOMMU mappings >>> in sync with the guest memory image assumes that if a

Re: [Qemu-devel] [PATCH v3 40/46] tests: add ivshmem qtest

2015-09-23 Thread Marc-André Lureau
Hi On Tue, Sep 22, 2015 at 4:44 PM, Claudio Fontana wrote: > I find this kind of macro use an aberration, but it is common use in QEMU > (unfortunately), and becoming worse. > > If somebody else wants to step in and add his own tag on this I would feel > like less

Re: [Qemu-devel] [RFC PATCH 09/10] spapr_iommu: Provide a function to switch a TCE table to allowing VFIO

2015-09-23 Thread Thomas Huth
On 17/09/15 18:54, Alex Williamson wrote: > On Thu, 2015-09-17 at 23:09 +1000, David Gibson wrote: >> Because of the way non-VFIO guest IOMMU operations are KVM accelerated, not >> all TCE tables (guest IOMMU contexts) can support VFIO devices. Currently, >> this is decided at creation time. >>

Re: [Qemu-devel] [PATCH 0/3] pc: Set hw_version on all machine classes

2015-09-23 Thread Igor Mammedov
On Wed, 23 Sep 2015 12:37:08 +0200 Laszlo Ersek wrote: > On 09/23/15 10:04, Igor Mammedov wrote: > > On Tue, 22 Sep 2015 17:16:24 -0300 > > Eduardo Habkost wrote: > > > >> In 2012, QEMU had a bug where it exposed QEMU version information > >> to the

Re: [Qemu-devel] No error report when using the qemu-img.exe toconvert a disk to vmdk format which is saved on a disk that has no morespace

2015-09-23 Thread Kevin Wolf
Am 23.09.2015 um 13:30 hat Guangmu Zhu geschrieben: > If the "BlockDriver" is "bdrv_vmdk", the function "vmdk_co_write" will be > called instead. In function "vmdk_write_extent" I see "ret = bdrv_pwrite > (extent->file, write_offset, write_buf, write_len);". So the "extend->file" is > "bdrv_file",

[Qemu-devel] [PATCH v3] spapr: generate DT node names

2015-09-23 Thread Laurent Vivier
When DT node names for PCI devices are generated by SLOF, they are generated according to the type of the device (for instance, ethernet for virtio-net-pci device). Node name for hotplugged devices is generated by QEMU. This patch adds the mechanic to QEMU to create the node name according to the

Re: [Qemu-devel] No error report when using the qemu-img.exe toconvert a disk to vmdk format which is saved on a disk that has no morespace

2015-09-23 Thread Guangmu Zhu
Thanks for your reply. I read the source code again and have some question: 1. qume-img wrote the target file in the function "bdrv_aligned_pwritev" which called the "drv->bdrv_co_writev" function. I haven't know how the qume-img found the right driver for "drv", but I guessed it's

Re: [Qemu-devel] No error report when using the qemu-img.exe toconvert a disk to vmdk format which is saved on a disk that has no morespace

2015-09-23 Thread Guangmu Zhu
Correct a mistake: So though the "count" would be "-EINVAL" if error occurred while writing some file, the return value will always be zero. Maybe I missed something? Sorry. Guangmu Zhu - Thanks for your reply. I read the source code again and

Re: [Qemu-devel] [PATCH] pc: memhotplug: rise minimum DIMM addr/size alignment to 128Mb

2015-09-23 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > > > On 23/09/2015 11:36, Igor Mammedov wrote: > > Also it's QEMU bug/fault and pushing workaround to upper layers > > doesn't seem right when it's much easier to do it in QEMU itself. > > No, it's virtio's bug. It makes sense to push workaround

Re: [Qemu-devel] [PATCH v10 5/7] vhost: introduce vhost_backend_get_vq_index method

2015-09-23 Thread Eric Blake
On 09/18/2015 08:58 AM, Yuanhan Liu wrote: > Minusing the idx with the base(dev->vq_index) for vhost-kernel, and s/Minusing/Subtracting/ > then adding it back for vhost-user doesn't seem right. Here introduces > a new method vhost_backend_get_vq_index() for getting the right vq > index for

Re: [Qemu-devel] [PATCH v2 2/5] monitor: introduce MonitorQAPIEventDelay callback

2015-09-23 Thread Daniel P. Berrange
On Thu, Sep 17, 2015 at 06:08:47PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Move the delay handling in a seperate function that can be changed for > different throttling implementations, as will be done in following commits. > >

Re: [Qemu-devel] [PATCH v3 05/46] ivshmem: factor out the incoming fifo handling

2015-09-23 Thread Marc-André Lureau
Hi On Tue, Sep 22, 2015 at 4:01 PM, Claudio Fontana wrote: > On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> Make a new function fifo_update_and_get() that can be reused by other >> functions (in

Re: [Qemu-devel] [PATCH v3 04/46] ivshmem: fix number of bytes to push to fifo

2015-09-23 Thread Marc-André Lureau
Hi On Wed, Sep 16, 2015 at 11:28 AM, Claudio Fontana wrote: > (should we rely on sizeof(long) here?) This is unrelated to the fix (MIN/MAX). I will add a patch to change the protocol. -- Marc-André Lureau

Re: [Qemu-devel] [PATCH] pc: memhotplug: rise minimum DIMM addr/size alignment to 128Mb

2015-09-23 Thread Igor Mammedov
On Wed, 23 Sep 2015 11:38:56 +0200 Paolo Bonzini wrote: > > > On 23/09/2015 11:36, Igor Mammedov wrote: > > Also it's QEMU bug/fault and pushing workaround to upper layers > > doesn't seem right when it's much easier to do it in QEMU itself. > > No, it's virtio's bug. It

Re: [Qemu-devel] [RFC PATCH 03/10] vfio: Check guest IOVA ranges against host IOMMU capabilities

2015-09-23 Thread David Gibson
On Wed, Sep 23, 2015 at 12:10:46PM +0200, Thomas Huth wrote: > On 17/09/15 15:09, David Gibson wrote: > > The current vfio core code assumes that the host IOMMU is capable of > > mapping any IOVA the guest wants to use to where we need. However, real > > IOMMUs generally only support translating

Re: [Qemu-devel] [PATCH v7 11/14] block/backup: support block job transactions

2015-09-23 Thread Markus Armbruster
John, your MUA turned the QMP examples to mush. You may want to teach it manners. John Snow writes: > On 09/22/2015 06:34 PM, Eric Blake wrote: >> On 09/22/2015 03:08 PM, John Snow wrote: >>> Eric, Markus: I've CC'd you for some crazy what-if QAPI questions >>> after my R-B

Re: [Qemu-devel] [RFC PATCH 07/10] spapr_pci: Allow PCI host bridge DMA window to be configured

2015-09-23 Thread Thomas Huth
On 17/09/15 15:09, David Gibson wrote: > At present the PCI host bridge (PHB) for the pseries machine type has a > fixed DMA window from 0..1GB (in PCI address space) which is mapped to real > memory via the PAPR paravirtualized IOMMU. > > For better support of VFIO devices, we're going to want

Re: [Qemu-devel] [PATCH v3 41/46] ivshmem: do not keep shm_fd open

2015-09-23 Thread Claudio Fontana
On 22.09.2015 16:59, Marc-André Lureau wrote: > Hi > > - Original Message - >> On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: >>> From: Marc-André Lureau >>> >>> Remove shm_fd from device state, closing it as early as possible to avoid >>> leaks. >>>

[Qemu-devel] [PATCH v2] docs: describe the QEMU build system structure / design

2015-09-23 Thread Daniel P. Berrange
Developers who are new to QEMU, or have a background familiarity with GNU autotools, can have trouble getting their head around the home-grown QEMU build system. This document attempts to explain the structure / design of the configure script and the various Makefile pieces that live across the

Re: [Qemu-devel] [PATCH v3 29/46] ivshmem: error on too many eventfd received

2015-09-23 Thread Marc-André Lureau
Hi On Wed, Sep 16, 2015 at 2:14 PM, Claudio Fontana wrote: > On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> The number of eventfd that can be handled per peer is limited by the >> number of

Re: [Qemu-devel] [PATCH 2/2] target-ppc: fix xscmpodp and xscmpudp decoding

2015-09-23 Thread Tom Musta
The modern versions of the ISA require that reserved instruction bits be ignored for server class processors (see Book I, section 1.3.3). I believe older versions of the ISA allowed for Illegal Instruction Interrupt or "Boundedly Undefined", which is, of course, much less specific. QEMU supports

Re: [Qemu-devel] [PATCH 1/2] Move dirty page search state into separate structure

2015-09-23 Thread Amit Shah
On (Wed) 16 Sep 2015 [19:11:53], Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Pull the sarch state for one iteration of the dirty page typo in 'search' > search into a structure. > > Signed-off-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH 2/2] ram_find_and_save_block: Split out the finding

2015-09-23 Thread Dr. David Alan Gilbert
* Amit Shah (amit.s...@redhat.com) wrote: > On (Wed) 16 Sep 2015 [19:11:54], Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Split out the finding of the dirty page and all the wrap detection > > into a separate function since it was getting a

Re: [Qemu-devel] [PATCH v3 0/5] add ACPI node for fw_cfg on pc and arm

2015-09-23 Thread Gabriel L. Somlo
On Wed, Sep 23, 2015 at 11:50:05AM +0200, Igor Mammedov wrote: > On Thu, 17 Sep 2015 10:56:29 -0400 > "Gabriel L. Somlo" wrote: > > > New since v2: > > > > - pc/i386 node in ssdt only on machine types *newer* than 2.4 > > (as suggested by Eduardo) > > > > I appreciate

Re: [Qemu-devel] [RFC PATCH 01/10] vfio: Remove unneeded union from VFIOContainer

2015-09-23 Thread Laurent Vivier
On 17/09/2015 15:09, David Gibson wrote: > Currently the VFIOContainer iommu_data field contains a union with > different information for different host iommu types. However: >* It only actually contains information for the x86-like "Type1" iommu >* Because we have a common listener the

Re: [Qemu-devel] [PATCH] README: fill out some useful quickstart information

2015-09-23 Thread Paolo Bonzini
On 23/09/2015 11:52, Markus Armbruster wrote: > > I don't think this is necessary. We should remove duplicate information > > from qemu-doc.texi, developer documentation doesn't belong in manuals. > > Just to avoid misunderstandings: I wouldn't object to splitting > qemu-doc.texi into a user

Re: [Qemu-devel] [PATCH 03/16] blkverify: Convert s->test_file to BdrvChild

2015-09-23 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:07 PM CEST, Kevin Wolf wrote: > @@ -151,7 +151,7 @@ static void blkverify_close(BlockDriverState *bs) > { > BDRVBlkverifyState *s = bs->opaque; > > -bdrv_unref(s->test_file); > +bdrv_unref_child(bs, s->test_file); > s->test_file = NULL; > } You are

Re: [Qemu-devel] No error report when using the qemu-img.exe toconvert a disk to vmdk format which is saved on a disk that has no morespace

2015-09-23 Thread Guangmu Zhu
If the "BlockDriver" is "bdrv_vmdk", the function "vmdk_co_write" will be called instead. In function "vmdk_write_extent" I see "ret = bdrv_pwrite(extent->file, write_offset, write_buf, write_len);". So the "extend->file" is "bdrv_file", is it? Thanks. Guangmu Zhu

Re: [Qemu-devel] [PATCH 06/16] block: Remove bdrv_open_image()

2015-09-23 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:10 PM CEST, Kevin Wolf wrote: > It is unused now. > > Signed-off-by: Kevin Wolf Reviewed-by: Alberto Garcia Berto

Re: [Qemu-devel] [PATCH 05/16] block: Convert bs->file to BdrvChild

2015-09-23 Thread Kevin Wolf
Am 22.09.2015 um 20:36 hat Max Reitz geschrieben: > On 17.09.2015 15:48, Kevin Wolf wrote: > > This patch removes the temporary duplication between bs->file and > > bs->file_child by converting everything to BdrvChild. > > > > Signed-off-by: Kevin Wolf > > --- > > block.c

Re: [Qemu-devel] [PATCH v2 1/5] monitor: split MonitorQAPIEventState

2015-09-23 Thread Daniel P. Berrange
On Thu, Sep 17, 2015 at 06:08:46PM +0200, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Create a separate structure MonitorQAPIEventPending for holding the data > related to pending event. > > The next commits are going to reuse this structure for

Re: [Qemu-devel] [RFC PATCH 04/10] vfio: Record host IOMMU's available IO page sizes

2015-09-23 Thread Thomas Huth
On 17/09/15 15:09, David Gibson wrote: > Depending on the host IOMMU type we determine and record the available page > sizes for IOMMU translation. We'll need this for other validation in > future patches. > > Signed-off-by: David Gibson > --- > hw/vfio/common.c

Re: [Qemu-devel] [PATCH v3 17/46] ivshmem: improve debug messages

2015-09-23 Thread Marc-André Lureau
On Tue, Sep 22, 2015 at 4:23 PM, Claudio Fontana wrote: > This MSI-X use vs not use is a bit confusing to me. > I see that the use of MSI is controlled mainly by IVSHMEM_MSI (Property > "msi"), > but then there are if (msix_present()) checks spread around. > > Could

Re: [Qemu-devel] [PATCH v3 20/46] ivshmem: simplify a bit the code

2015-09-23 Thread Claudio Fontana
On 22.09.2015 16:56, Marc-André Lureau wrote: > > > - Original Message - >> On 15.09.2015 18:07, marcandre.lur...@redhat.com wrote: >>> From: Marc-André Lureau >>> >>> Use some more explicit variables to simplify the code. >>> >>> nth_eventfd variable is the

[Qemu-devel] [PATCH v2 2/7] libqtest: Clean up unused QTestState member sigact_old

2015-09-23 Thread Markus Armbruster
Unused since commit d766825. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/libqtest.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index e5188e0..8dede56 100644 --- a/tests/libqtest.c +++

[Qemu-devel] [PATCH v2 7/7] Revert "qdev: Use qdev_get_device_class() for -device , help"

2015-09-23 Thread Markus Armbruster
This reverts commit 31bed5509dfcbdfc293154ce81086a4dbd7a80b6. The reverted commit changed qdev_device_help() to reject abstract devices and devices that have cannot_instantiate_with_device_add_yet set, to fix crash bugs like -device x86_64-cpu,help. Rejecting abstract devices makes sense:

Re: [Qemu-devel] [RFC PATCH 03/10] vfio: Check guest IOVA ranges against host IOMMU capabilities

2015-09-23 Thread Laurent Vivier
On 17/09/2015 15:09, David Gibson wrote: > The current vfio core code assumes that the host IOMMU is capable of > mapping any IOVA the guest wants to use to where we need. However, real > IOMMUs generally only support translating a certain range of IOVAs (the > "DMA window") not a full 64-bit

[Qemu-devel] [PATCH v2 1/2] Move dirty page search state into separate structure

2015-09-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Pull the search state for one iteration of the dirty page search into a structure. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Amit Shah --- migration/ram.c | 55

Re: [Qemu-devel] [PATCH v5 01/46] qapi: Sort qapi-schema tests

2015-09-23 Thread Eric Blake
On 09/23/2015 09:09 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 09/21/2015 03:57 PM, Eric Blake wrote: >>> Recent changes to qapi have provided quite a bit of churn in >>> the makefile, because we are inconsistent on what order test >>> names appear in, and on

Re: [Qemu-devel] [PATCH v5 03/46] qapi: Test for C member name collisions

2015-09-23 Thread Markus Armbruster
Eric Blake writes: > On 09/23/2015 03:43 AM, Markus Armbruster wrote: > >>> Commit 1e6c1616 was where we quit burning the C member name 'base'. >>> Prior to that time, members of base classes did not clash with variant >>> names because of the C boxing. >> >> For union types.

Re: [Qemu-devel] [PATCH 7/7] tests: Simplify how qom-test is run

2015-09-23 Thread Markus Armbruster
Andreas Färber writes: > Am 18.09.2015 um 16:24 schrieb Markus Armbruster: >> Andreas Färber writes: >>> Am 18.09.2015 um 14:00 schrieb Markus Armbruster: Add it to check-qtest-generic-y instead of check-qtest-$(target)-y for every target.

Re: [Qemu-devel] [PATCH 03/16] blkverify: Convert s->test_file to BdrvChild

2015-09-23 Thread Alberto Garcia
On Wed 23 Sep 2015 03:58:23 PM CEST, Kevin Wolf wrote: >> > @@ -151,7 +151,7 @@ static void blkverify_close(BlockDriverState *bs) >> > { >> > BDRVBlkverifyState *s = bs->opaque; >> > >> > -bdrv_unref(s->test_file); >> > +bdrv_unref_child(bs, s->test_file); >> > s->test_file =

Re: [Qemu-devel] [PATCH v5 03/46] qapi: Test for C member name collisions

2015-09-23 Thread Eric Blake
On 09/23/2015 08:02 AM, Markus Armbruster wrote: >> However, I'm not sure it would always help. The conversion of >> netdev_add to full qapi relies on being able to access the variant >> through a named struct (such as NetdevTapOptions); unboxing the variant >> would get rid of the convenient

[Qemu-devel] [Bug 1498144] Re: Failure booting hurd with qemu-system-i386 on ARM

2015-09-23 Thread PeteVine
I can't get any more useful info - either the script is expecting some outdated version of python or there's simply nothing else to see cause qemu failed to start. For example: (gdb) source qemu-gdb.py (gdb) run Starting program: /usr/bin/qemu-system-i386 -m 512 -hda

Re: [Qemu-devel] [PATCH 10/16] block/io: Make bdrv_requests_pending() public

2015-09-23 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/io.c| 2 +- > include/block/block_int.h | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz In addition: Shouldn't we iterate over

[Qemu-devel] [PATCH v2 6/7] qdev: Protect device-list-properties against broken devices

2015-09-23 Thread 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 properties. Broken in commit f4eb32b "qmp:

[Qemu-devel] [PATCH v2 4/7] device-introspect-test: New, covering device introspection

2015-09-23 Thread Markus Armbruster
The test doesn't check that the output makes any sense, only that QEMU survives. Useful since we've had an astounding number of crash bugs around there. In fact, we have a bunch of them right now: several devices crash or hang, and all CPUs leave a dangling pointer behind. The test skips

Re: [Qemu-devel] [PATCH v2 4/7] device-introspect-test: New, covering device introspection

2015-09-23 Thread Eric Blake
On 09/23/2015 08:09 AM, Markus Armbruster wrote: > The test doesn't check that the output makes any sense, only that QEMU > survives. Useful since we've had an astounding number of crash bugs > around there. > > In fact, we have a bunch of them right now: several devices crash or > hang, and all

Re: [Qemu-devel] [RFC PATCH 04/10] vfio: Record host IOMMU's available IO page sizes

2015-09-23 Thread Laurent Vivier
On 17/09/2015 15:09, David Gibson wrote: > Depending on the host IOMMU type we determine and record the available page > sizes for IOMMU translation. We'll need this for other validation in > future patches. > > Signed-off-by: David Gibson > --- >

Re: [Qemu-devel] [PATCH v2 1/3] qapi: convert NumaOptions into a flat union

2015-09-23 Thread Eric Blake
On 09/23/2015 08:27 AM, Kővágó, Zoltán wrote: > Changes the NumaOptions to flat union from a simple one. This is > required by my later OptsVisitor patch to preserve backward > compatibility. > > Strictly speaking this would break QMP compatibility (as specified in > docs/qapi-code-gen.txt), but

Re: [Qemu-devel] [PATCH v5 01/46] qapi: Sort qapi-schema tests

2015-09-23 Thread Markus Armbruster
Eric Blake writes: > On 09/21/2015 03:57 PM, Eric Blake wrote: >> Recent changes to qapi have provided quite a bit of churn in >> the makefile, because we are inconsistent on what order test >> names appear in, and on whether to re-wrap the list of tests or >> just add

[Qemu-devel] [PATCH v2 3/7] libqtest: New hmp() & friends

2015-09-23 Thread Markus Armbruster
New convenience function hmp() to facilitate use of human-monitor-command in tests. Use it to simplify its existing uses. To blend into existing libqtest code, also add qtest_hmpv() and qtest_hmp(). That, and the egregiously verbose GTK-Doc comment format make this patch look bigger than it is.

[Qemu-devel] [PATCH v2 1/3] qapi: convert NumaOptions into a flat union

2015-09-23 Thread Kővágó, Zoltán
Changes the NumaOptions to flat union from a simple one. This is required by my later OptsVisitor patch to preserve backward compatibility. Strictly speaking this would break QMP compatibility (as specified in docs/qapi-code-gen.txt), but since no QMP command use this structure, it's not an

[Qemu-devel] [PATCH v2 0/3] qapi-flattening and preparation of -audiodev option

2015-09-23 Thread Kővágó, Zoltán
Here is the second version of my qapi flattening attempts. This is now based on Eric Blake's "post-introspection cleanups, and qapi-ify netdev_add" patch series[1], which contains some of my previous commits. What remains here: NumaOptions flattening (with proposed documentation changes from

Re: [Qemu-devel] [PATCH 01/16] block: Introduce BDS.file_child

2015-09-23 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:05 PM CEST, Kevin Wolf wrote: > Store the BdrvChild for bs->file. At this point, bs->file_child->bs just > duplicates the bs->file pointer. Later, it will completely replace it. > > Signed-off-by: Kevin Wolf > --- Reviewed-by: Alberto Garcia

Re: [Qemu-devel] [PATCH v5 01/46] qapi: Sort qapi-schema tests

2015-09-23 Thread Eric Blake
On 09/21/2015 03:57 PM, Eric Blake wrote: > Recent changes to qapi have provided quite a bit of churn in > the makefile, because we are inconsistent on what order test > names appear in, and on whether to re-wrap the list of tests or > just add arbitrary line lengths. Writing the list in a sorted

Re: [Qemu-devel] [PATCH v3 1/1] block/gluster: add support for multiple gluster backup volfile servers

2015-09-23 Thread Peter Krempa
On Tue, Sep 22, 2015 at 04:06:54 -0400, Prasanna Kalever wrote: > > > On 09/21/2015 05:24 AM, Prasanna Kumar Kalever wrote: > > > This patch adds a way to specify multiple backup volfile servers to the > > > gluster > > > block backend of QEMU with tcp|rdma transport types and their port > > >

Re: [Qemu-devel] [PATCH v5 03/46] qapi: Test for C member name collisions

2015-09-23 Thread Markus Armbruster
Eric Blake writes: > On 09/23/2015 08:02 AM, Markus Armbruster wrote: > >>> However, I'm not sure it would always help. The conversion of >>> netdev_add to full qapi relies on being able to access the variant >>> through a named struct (such as NetdevTapOptions); unboxing the

Re: [Qemu-devel] [PATCH v2 2/2] PCI-e device multi-function hot-add support

2015-09-23 Thread Cao jin
Hi Alex, On 09/23/2015 01:51 AM, Alex Williamson wrote: On Tue, 2015-09-22 at 18:08 +0800, Cao jin wrote: Hi Alex On 09/22/2015 02:00 AM, Alex Williamson wrote: Please use different subjects that uniquely identify what each patch does, don't simply re-use the subject for the cover patch on

Re: [Qemu-devel] [PATCH 05/16] block: Convert bs->file to BdrvChild

2015-09-23 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:09 PM CEST, Kevin Wolf wrote: > @@ -1929,6 +1925,11 @@ void bdrv_close(BlockDriverState *bs) > bdrv_unref(backing_hd); > } > > +if (bs->file != NULL) { > +bdrv_unref(bs->file->bs); > +bs->file = NULL; > +} >

Re: [Qemu-devel] [PATCH 03/16] blkverify: Convert s->test_file to BdrvChild

2015-09-23 Thread Kevin Wolf
Am 23.09.2015 um 15:01 hat Alberto Garcia geschrieben: > On Thu 17 Sep 2015 03:48:07 PM CEST, Kevin Wolf wrote: > > > @@ -151,7 +151,7 @@ static void blkverify_close(BlockDriverState *bs) > > { > > BDRVBlkverifyState *s = bs->opaque; > > > > -bdrv_unref(s->test_file); > > +

[Qemu-devel] [PATCH v2 1/7] tests: Fix how qom-test is run

2015-09-23 Thread Markus Armbruster
We want to run qom-test for every architecture, without having to manually add it to every architecture's list of tests. Commit 3687d53 accomplished this by adding it to every architecture's list automatically. However, some architectures inherit their tests from others, like this:

[Qemu-devel] [PATCH v2 5/7] qmp: Fix device-list-properties not to crash for abstract device

2015-09-23 Thread Markus Armbruster
Broken in commit f4eb32b "qmp: show QOM properties in device-list-properties", v2.1. Cc: qemu-sta...@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- qmp.c | 6 ++ tests/device-introspect-test.c | 15

[Qemu-devel] [PATCH] hw/arm/virt: smbios: inform guest of kvm

2015-09-23 Thread Andrew Jones
ARM/AArch64 KVM guests don't have any way to identify themselves as KVM guests (x86 guests use a CPUID leaf). Now, we could discuss all sorts of reasons why guests shouldn't need to know that, but then there's always some case where it'd be nice... Anyway, now that we have SMBIOS tables in ARM

[Qemu-devel] [PATCH v2 2/2] ram_find_and_save_block: Split out the finding

2015-09-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Split out the finding of the dirty page and all the wrap detection into a separate function since it was getting a bit hairy. Signed-off-by: Dr. David Alan Gilbert --- migration/ram.c | 84

[Qemu-devel] [PATCH v2 2/3] qapi: change NetLegacy into a flat union

2015-09-23 Thread Kővágó, Zoltán
This is required to keep backward compatibility while applying the proposed changes to OptsVisitor in the next commit. Strictly speaking this change breaks QMP compatibility, but since this struct is only used by the (legacy) -net option, it's not a problem. (The command line syntax doesn't

[Qemu-devel] [PATCH v2 0/2] Split up ram_find_and_save_block

2015-09-23 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Chop up ram_find_and_save_block so it's smaller again. (from comments on my postcopy patch that adds more to it). This pair is based on top of my previous 5 patch cleanup series posted in August, but rebased on current qemu master. Dave Dr.

Re: [Qemu-devel] [PATCH] hw/arm/virt: smbios: inform guest of kvm

2015-09-23 Thread Wei Huang
On 9/23/15 09:18, Andrew Jones wrote: > ARM/AArch64 KVM guests don't have any way to identify > themselves as KVM guests (x86 guests use a CPUID leaf). Now, we > could discuss all sorts of reasons why guests shouldn't need to > know that, but then there's always some case where it'd be One

Re: [Qemu-devel] [PATCH v3 05/25] tcg: Allow extra data to be attached to insn_start

2015-09-23 Thread Kevin O'Connor
On Tue, Sep 22, 2015 at 01:24:47PM -0700, Richard Henderson wrote: > With an eye toward having this data replace the gen_opc_* arrays > that each target collects in order to enable restore_state_from_tb. Hi Richard, Instead of having each architecture front-end determine the constants to be

Re: [Qemu-devel] [PATCH 08/16] block: Manage backing file references in bdrv_set_backing_hd()

2015-09-23 Thread Max Reitz
On 17.09.2015 15:48, Kevin Wolf wrote: > This simplifies the code somewhat, especially when dropping whole > backing file subchains. > > The exception is the mirroring code that does adventurous things with > bdrv_swap() and in order to keep it working, I had to duplicate most of >

[Qemu-devel] [PATCH v2 0/7] Fix device introspection regressions

2015-09-23 Thread Markus Armbruster
QMP command device-list-properties regressed in 2.1: it can crash or leave dangling pointers behind. -device FOO,help regressed in 2.2: it no longer works for non-pluggable devices. I tried to fix that some time ago[*], but my fix failed review. This is my second, more comprehensive try. PATCH

Re: [Qemu-devel] [PATCH 03/16] blkverify: Convert s->test_file to BdrvChild

2015-09-23 Thread Alberto Garcia
On Thu 17 Sep 2015 03:48:07 PM CEST, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/blkverify.c | 41 + > 1 file changed, 21 insertions(+), 20 deletions(-) > Reviewed-by: Alberto Garcia Berto

[Qemu-devel] [PATCH v2 3/3] qapi: support nested structs in OptsVisitor

2015-09-23 Thread Kővágó, Zoltán
The current OptsVisitor flattens the whole structure, if there are same named fields under different paths (like `in' and `out' in `Audiodev'), the current visitor can't cope with them (for example setting `frequency=44100' will set the in's frequency to 44100 and leave out's frequency

[Qemu-devel] Loading image/elf to cpu that has different not system memory address space

2015-09-23 Thread Marcin Krzemiński
Hello, I am trying to write a model of embedded board that have corterx-m3 and cotex a9 processors. Because M3 see different memory at address 0x0 than A9 (m3 has small rom, a9 has whole ram) I created different address space for m3 (thanks Peter Crosthwaite! for hints how to do this!). Now I

[Qemu-devel] [PATCH] spice-qemu-char: do not use port device when it is not active

2015-09-23 Thread Pavel Grunt
Avoid segmentation fault when the webdav channel (spice port channel) is used with the vnc display: #0 0x77ab2594 in spice_char_device_state_opaque_get (dev=0x0) at char_device.c:700 #1 0x77b0def3 in spice_server_port_event (sin=, event=) at spicevmc.c:572 #2

[Qemu-devel] [PATCH] pc: Set broken_reserved_end on pc-*-2.4, not 2.5

2015-09-23 Thread Eduardo Habkost
Version 1 of the pc-*-2.5 machine class series was applied to the PCI tree instead of v3 (which was rebased after the broken_reserved_end patch by Igor was included). This patch includes the missing hunks from v3, to make sure broken_reserved_end is set at the right machine class. Signed-off-by:

Re: [Qemu-devel] [PATCH v2] docs: describe the QEMU build system structure / design

2015-09-23 Thread John Snow
On 09/23/2015 05:59 AM, Daniel P. Berrange wrote: > Developers who are new to QEMU, or have a background familiarity > with GNU autotools, can have trouble getting their head around the > home-grown QEMU build system. This document attempts to explain > the structure / design of the configure

Re: [Qemu-devel] [PATCH] hw/arm/virt: smbios: inform guest of kvm

2015-09-23 Thread Peter Maydell
On 23 September 2015 at 07:18, Andrew Jones wrote: > ARM/AArch64 KVM guests don't have any way to identify > themselves as KVM guests (x86 guests use a CPUID leaf). Now, we > could discuss all sorts of reasons why guests shouldn't need to > know that, but then there's always

Re: [Qemu-devel] [PATCH v2] docs: describe the QEMU build system structure / design

2015-09-23 Thread Laszlo Ersek
On 09/23/15 17:46, Laszlo Ersek wrote: > before, and Jon commented that you probably pronounced it as "a dot-exe Aaargh, John <-> Jon drives me crazy. Sorry. Laszlo

  1   2   3   >