Re: [Qemu-devel] [PATCH v18 11/21] replay: recording and replaying clock ticks

2015-09-23 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 17/09/2015 18:24, Pavel Dovgalyuk wrote: > > +if ((now < last || now > (last + get_max_clock_jump())) > > +&& replay_mode == REPLAY_MODE_NONE) { > > notifier_list_notify(&clock->reset_notifiers, &now); > > Thi

Re: [Qemu-devel] [PATCH v18 13/21] icount: improve counting for record/replay

2015-09-23 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 17/09/2015 18:24, Pavel Dovgalyuk wrote: > > #endif > > > > +/* CPU thread can infinitely wait for event after > > + missing the warp */ > > +qemu_clock_warp(QEMU_CLOCK_VIRTUAL); > > qemu_clock_run_all_timers(); > > It is

[Qemu-devel] [PATCH V6 1/2] sd.h: Move sd.h to include/hw/sd/

2015-09-23 Thread Sai Pavan Boddu
Create a sd directory under include/hw/ and move sd.h to same. Signed-off-by: Sai Pavan Boddu Reviewed-by: Alistair Francis --- Changes for V6: Fix commit message. Changes for V5: None Changes for V4: Fix commit message. Changes for V3: None. --- hw/sd/milkymist-memcard.c | 2 +-

[Qemu-devel] [PATCH V6 0/2] Move sdhci.h to include/hw/sd

2015-09-23 Thread Sai Pavan Boddu
Move sdhci.h splitting it into common and internal. Create a new directory for sd in include/hw/. Correct paths of sd.h in at every instance of #include. Sai Pavan Boddu (2): sd.h: Move sd.h to include/hw/sd/ sdhci: Split sdhci.h for public and internal device usage hw/sd/milkymist-memcard.c

[Qemu-devel] [PATCH V6 2/2] sdhci: Split sdhci.h for public and internal device usage

2015-09-23 Thread Sai Pavan Boddu
Split sdhci.h into Pubilc version (i.e include/hw/sd/sdhci.h) and Internal version (i.e hw/sd/sdhci-interna.h) based on register declarations and object declaration. Signed-off-by: Sai Pavan Boddu Reviewed-by: Alistair Francis --- Changes for V6: Fix commit message. Chages for V5: Rename

Re: [Qemu-devel] [PATCH 1/1] target-i386: get/put MSR_TSC_AUX across reset and migration

2015-09-23 Thread Paolo Bonzini
On 23/09/2015 08:27, Amit Shah wrote: > There's one report of migration breaking due to missing MSR_TSC_AUX > save/restore. Fix this by adding a new subsection that saves the state > of this MSR. > > https://bugzilla.redhat.com/show_bug.cgi?id=1261797 It turns out that the MSR is already saved

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

2015-09-23 Thread Igor Mammedov
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 same machine-type is being > used. > > The bug was fixed by commit 93

Re: [Qemu-devel] [PATCH v18 13/21] icount: improve counting for record/replay

2015-09-23 Thread Paolo Bonzini
On 23/09/2015 09:22, Pavel Dovgaluk wrote: > Sometimes tcg thread halts in qemu_tcg_wait_io_event function, > waiting for any external event. Virtual clock does not run, because > warp is not called. warp call in main_loop_wait proceeds virtual > clock and allows tcg thread to run further. Ok, t

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

2015-09-23 Thread Thomas Huth
On 21/09/15 18:53, Laurent Vivier wrote: > 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 mecha

Re: [Qemu-devel] MAINTAINERS leaves too many files uncovered

2015-09-23 Thread Kevin Wolf
Am 22.09.2015 um 20:07 hat Eric Blake geschrieben: > On 09/22/2015 03:13 AM, Markus Armbruster wrote: > > >> Full list of unmaintained files now: > > [...] > > > > > docs/bitmaps.md > > docs/blkdebug.txt > > docs/blkverify.txt > > > docs/live-block-ops.txt > > > docs/qcow2-cache.txt > > docs/q

Re: [Qemu-devel] MAINTAINERS leaves too many files uncovered

2015-09-23 Thread Alberto Garcia
On Wed 23 Sep 2015 10:24:55 AM CEST, Kevin Wolf wrote: >> > include/qemu/throttle.h >> >> Block? > > Would be covered if it were in the correct place (include/block/). > > Should we add a separate section for I/O throttling, maintained by > Berto, as well? So far it's part of the block layer cor

Re: [Qemu-devel] [PATCH v2 REPOST] oslib-win32: only provide localtime_r/gmtime_r if missing

2015-09-23 Thread Daniel P. Berrange
On Tue, Sep 22, 2015 at 07:49:40PM +0200, Stefan Weil wrote: > Hi, > > I suggest cleaning some comments, mostly using the "official" > spellings for MinGW and Mingw-w64. > > Am 22.09.2015 um 16:13 schrieb Daniel P. Berrange: > > The oslib-win32 file currently provides a localtime_r and > > gmtime

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

2015-09-23 Thread Daniel P. Berrange
On Tue, Sep 22, 2015 at 05:35:59PM +0100, 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 th

Re: [Qemu-devel] [PATCH v18 13/21] icount: improve counting for record/replay

2015-09-23 Thread Pavel Dovgaluk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 23/09/2015 09:22, Pavel Dovgaluk wrote: > > Sometimes tcg thread halts in qemu_tcg_wait_io_event function, > > waiting for any external event. Virtual clock does not run, because > > warp is not called. warp c

Re: [Qemu-devel] [PATCH v6 3/4] block: add a 'blockdev-snapshot' QMP command

2015-09-23 Thread Alberto Garcia
On Tue 22 Sep 2015 06:38:27 PM CEST, Max Reitz wrote: >> +.name = "blockdev-snapshot", >> +.args_type = "node:s,overlay:s", >> +.mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot, > > As of 7fad30f06eb6aa57aaa8f3d264288f24ae7646f0, this needs to be > qmp_marshal

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

2015-09-23 Thread Thomas Huth
On 17/09/15 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 are o

Re: [Qemu-devel] [PATCH v5 02/46] qapi: Clean up qapi.py per pep8

2015-09-23 Thread Markus Armbruster
Eric Blake writes: > On 09/22/2015 08:00 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Silence pep8, and make pylint a bit happier. Just style cleanups; >>> no semantic changes. >> >> I had planned to clean it up after resolving the TODO fold into >> QAPISchema, but I'm fine with

Re: [Qemu-devel] [PATCH v5 0/4] qapi: child add/delete support

2015-09-23 Thread Dr. David Alan Gilbert
* Wen Congyang (we...@cn.fujitsu.com) wrote: > On 09/22/2015 07:15 PM, Dr. David Alan Gilbert wrote: > > * Wen Congyang (we...@cn.fujitsu.com) wrote: > >> If quorum's child is broken, we can use mirror job to replace it. > >> But sometimes, the user only need to remove the broken child, and > >> ad

Re: [Qemu-devel] [PATCH v5 0/4] qapi: child add/delete support

2015-09-23 Thread Wen Congyang
On 09/23/2015 05:21 PM, Dr. David Alan Gilbert wrote: > * Wen Congyang (we...@cn.fujitsu.com) wrote: >> On 09/22/2015 07:15 PM, Dr. David Alan Gilbert wrote: >>> * Wen Congyang (we...@cn.fujitsu.com) wrote: If quorum's child is broken, we can use mirror job to replace it. But sometimes, t

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

2015-09-23 Thread Igor Mammedov
On Mon, 21 Sep 2015 14:22:23 +0200 Paolo Bonzini wrote: > > > On 21/09/2015 13:50, Igor Mammedov wrote: > > it's attempt to workaround virtio bug reported earlier: > > http://lists.nongnu.org/archive/html/qemu-devel/2015-08/msg00522.html > > where virtio can't handle buffer that crosses border

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

2015-09-23 Thread Paolo Bonzini
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 for guest bugs as far from the hypervisor as possible. If we

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/22/2015 09:23 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> Expose some weaknesses in the generator: we don't always forbid >>> the generation of structs that contain multiple members that map >> >> Slightly misleading. args-name-clash is a clash between

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

2015-09-23 Thread Igor Mammedov
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 any further comments and reviews. Hopefully we can make > this palatable for upstream, modulo

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

2015-09-23 Thread Marc-André Lureau
ping On Thu, Sep 17, 2015 at 6:08 PM, wrote: > From: Marc-André Lureau > > QAPI_EVENT_VSERPORT_CHANGE reports changes of a virtio serial port > state. However, the events may be for different ports, but the throttle > mechanism may replace the event for a different port, since it only > checks

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

2015-09-23 Thread Markus Armbruster
Paolo Bonzini writes: > On 22/09/2015 10:16, Markus Armbruster wrote: > >> John Snow writes: >> >>> "To build QEMU, you'd generally [some basic steps that have generally >>> worked for a long time], but for up-to-date authoritative information, >>> please do: >>> >>> mkdir path_to/build_dir >>>

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

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 man

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 different > throttling implem

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. > > Signed-off-by: Marc-André Lureau >

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 support

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 > --- > monitor.c | 36 ++---

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 cleaning. > > Signed-off-by:

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 > --- > monitor.c | 58

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 addres

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 misu

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 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 next commits). >> >> Signed-off-by: Marc-André Lureau >> -

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 error handling; right now a botched device_add >> ivhsmem com

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 makes sense to push w

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 | 13 +

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 this printf be a bit more clea

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

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 for

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 same machine-type is

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

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 vectors. Return an error when receiving too many of them. >> >>

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

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 g

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 a

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 to

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 on this patch. >>> >

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] [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 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 of an accomplice in this crime

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 ps

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

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 guest, meaning a QEMU upgrade would expose di

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",

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 if (msix_present()) checks s

[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] [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 current eventfd to be manipul

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 > @@ -923,26 +933,29 @@ static int ram_save

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. >>> >>> Signed-off-by: Marc-André

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 Gilbert > --- > migration/

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 follow

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 exposed QEMU version information to the

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 bit hairy. > > > > Si

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 l

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] 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 "BlockDriv

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] 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 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 u

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 any further comm

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

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 Berto

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 a

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 e

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); > > +bdrv_unr

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. For struct types,

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 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. Signed-off-by: Markus Armbruster >>

[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

[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: check-qte

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

[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 +++ b/tests/libqtest.c @@ -46,7 +46,6 @@ struct

[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: they're

[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: s

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

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

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] 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 gues

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 acc

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

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

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

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 Berto

  1   2   3   4   >