Re: [Qemu-devel] [PATCH] Fix build for less common build directories names

2016-10-14 Thread Stefan Weil
On 10/14/16 12:01, Stefan Hajnoczi wrote: dirname should only contain QEMU source tree subdirectory paths (e.g. hw/net). How did you get a comma in there? I tried an out-of-tree build in a directory called 'a,b' but it doesn't trigger the issue. I'd like to understand how to reproduce the

Re: [Qemu-devel] [PATCH v4 4/6] tests: rename target_big_endian() as qvirtio_is_big_endian()

2016-10-14 Thread Greg Kurz
On Fri, 14 Oct 2016 10:58:53 +0200 Laurent Vivier wrote: > Move the definition to libqos/virtio.h as it must be used > only with virtio functions. > > Add a QVirtioDevice parameter as it will be needed to > know if the virtio device is using virtio 1.0 specification > and

[Qemu-devel] invtsc + migration + TSC scaling

2016-10-14 Thread Eduardo Habkost
I have been wondering: should we allow live migration with the invtsc flag enabled, if TSC scaling is available on the destination? For reference, this is what the Intel SDM says about invtsc: The time stamp counter in newer processors may support an enhancement, referred to as invariant

Re: [Qemu-devel] [PATCHv2 0/2] dma-helpers: explicitly pass alignment into DMA helpers

2016-10-14 Thread John Snow
On 10/14/2016 07:41 AM, Mark Cave-Ayland wrote: This is a follow-up to the thread at https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg01396.html which introduces an explicit alignment to the DMA helpers to facilitate conversion of the macio controller over to use the now byte-aligned

[Qemu-devel] [PATCH] trace: fix group name generation

2016-10-14 Thread Greg Kurz
Since commit "80dd5c4918ab trace: introduce a formal group name for trace events", tracetool generates C variable names and macro definitions out of the path to the trace-events-all file. The current code takes care of turning '/' and '-' characters into underscores so that the resulting names

Re: [Qemu-devel] [PATCH v2 1/4] fdc: Add a floppy qbus

2016-10-14 Thread John Snow
On 09/30/2016 03:39 PM, Kevin Wolf wrote: This adds a qbus to the floppy controller that should contain the floppy drives eventually. At the moment it just exists and is empty. Not unlike myself. Signed-off-by: Kevin Wolf --- hw/block/fdc.c | 40

Re: [Qemu-devel] [PATCH] trace: fix group name generation

2016-10-14 Thread Eric Blake
On 10/14/2016 04:26 PM, Greg Kurz wrote: > Since commit "80dd5c4918ab trace: introduce a formal group name for trace > events", tracetool generates C variable names and macro definitions out > of the path to the trace-events-all file. > > The current code takes care of turning '/' and '-'

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v6 2/2] migration: migrate QTAILQ

2016-10-14 Thread Jianjun Duan
On 10/14/2016 11:39 AM, Paolo Bonzini wrote: > >>> Another possibility is a macro like >>> >>> #define field_at_offset(base, offset, type) \ >>>((type) (((char *) (base)) + (offset))) >>> >>> so that you can do >>> >>>*field_at_offset(void **, elm, (entry) + QTAILQ_NEXT_OFFSET) = NULL;

Re: [Qemu-devel] [PATCH v6 26/35] tests: add atomic_add-bench

2016-10-14 Thread Emilio G. Cota
On Tue, Oct 11, 2016 at 14:40:52 -0500, Richard Henderson wrote: > From: "Emilio G. Cota" > > With this microbenchmark we can measure the overhead of emulating atomic > instructions with a configurable degree of contention. > > The benchmark spawns $n threads, each performing $o

Re: [Qemu-devel] [PATCH v4 5/6] tests: use qtest_pc_boot()/qtest_shutdown() in virtio tests

2016-10-14 Thread Greg Kurz
On Fri, 14 Oct 2016 10:58:54 +0200 Laurent Vivier wrote: > This patch replaces calls to qtest_start() and qtest_end() by > calls to qtest_pc_boot() and qtest_shutdown(). > > This allows to initialize memory allocator and PCI interface > functions. This will ease to enable

Re: [Qemu-devel] [PATCH v4 12/20] ppc/xics: Add xics to the monitor "info pic" command

2016-10-14 Thread Cédric Le Goater
On 10/14/2016 07:30 AM, David Gibson wrote: > On Mon, Oct 03, 2016 at 09:24:48AM +0200, Cédric Le Goater wrote: >> From: Benjamin Herrenschmidt >> >> Useful to debug interrupt problems. >> >> Signed-off-by: Benjamin Herrenschmidt >> [clg: -

Re: [Qemu-devel] [PATCH 2/2] ARM: Virt: ACPI: Build an IORT table with RC and ITS nodes

2016-10-14 Thread Auger Eric
Drew, On 13/10/2016 17:11, Andrew Jones wrote: > On Thu, Oct 13, 2016 at 12:55:43PM +0200, Eric Auger wrote: >> From: Prem Mallappa >> >> This patch builds an IORT table that features a root complex node and >> an ITS node. This complements the ITS description in the

Re: [Qemu-devel] [PATCH v3 3/5] tests: use qtest_pc_boot()/qtest_shutdown() in virtio tests

2016-10-14 Thread Laurent Vivier
On 14/10/2016 10:11, Greg Kurz wrote: > On Fri, 7 Oct 2016 19:54:54 +0200 > Laurent Vivier wrote: > >> On 07/10/2016 18:38, Greg Kurz wrote: >>> On Sat, 1 Oct 2016 20:56:02 +0200 >>> Laurent Vivier wrote: >>> This patch replaces calls to

[Qemu-devel] [PATCH v2 2/2] ARM: Virt: ACPI: Build an IORT table with RC and ITS nodes

2016-10-14 Thread Eric Auger
From: Prem Mallappa This patch builds an IORT table that features a root complex node and an ITS node. This complements the ITS description in the ACPI MADT table and allows vhost-net on ACPI guest. Signed-off-by: Prem Mallappa

[Qemu-devel] [PATCH v2 0/2] ACPI IORT generation for ITS support

2016-10-14 Thread Eric Auger
This series completes the support of MSIs for ACPI guest featuring an ITS. It generates an ACPI IORT table which describes the IO relationship between the root complex and the ITS. This typically enables vhost-net support on such guest. The series applies on top of Drew's series: [PATCH 0/2]

[Qemu-devel] [PATCH v4 3/6] tests: move QVirtioBus pointer into QVirtioDevice

2016-10-14 Thread Laurent Vivier
This allows to not have to pass bus and device for every virtio functions. Signed-off-by: Laurent Vivier --- tests/libqos/virtio-mmio.c | 1 + tests/libqos/virtio-pci.c | 2 + tests/libqos/virtio.c | 77 +++- tests/libqos/virtio.h | 51

[Qemu-devel] [PATCH v2 2/4] qga: drop unnecessary GA_CHANNEL_UNIX_LISTEN checks

2016-10-14 Thread Stefan Hajnoczi
Throughout the code there are c->listen_channel checks which manage the listen socket file descriptor (waiting for accept(2), closing the file descriptor, etc). These checks are currently preceded by explicit c->method == GA_CHANNEL_UNIX_LISTEN checks. Explicit GA_CHANNEL_UNIX_LISTEN checks are

Re: [Qemu-devel] [PATCH v2 0/2] ACPI IORT generation for ITS support

2016-10-14 Thread no-reply
Hi, Your series failed automatic build test. Please find the testing commands and their output below. If you have docker installed, you can probably reproduce it locally. Type: series Message-id: 1476435295-21885-1-git-send-email-eric.au...@redhat.com Subject: [Qemu-devel] [PATCH v2 0/2] ACPI

Re: [Qemu-devel] [PATCH] Fix build for less common build directories names

2016-10-14 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 07:36:07PM +0100, Peter Maydell wrote: > On 13 October 2016 at 19:29, Stefan Weil wrote: > > scripts/tracetool generates a C preprocessor macro from the name of the > > build directory. Any characters which are possible in a directory name > > but not

Re: [Qemu-devel] [PATCHv3 0/7] Improve PCI IO window orgnaization for pseries

2016-10-14 Thread Laurent Vivier
On 14/10/2016 07:41, David Gibson wrote: > On Thu, Oct 13, 2016 at 09:10:38PM -0700, no-re...@patchew.org wrote: >> Hi, >> >> Your series seems to have some coding style problems. See output below for >> more information: > > So.. this one is a fairly standard false positive. checkpatch >

Re: [Qemu-devel] [PATCH v4 17/20] ppc/pnv: Add cut down PSI bridge model and hookup external interrupt

2016-10-14 Thread Benjamin Herrenschmidt
On Fri, 2016-10-14 at 17:32 +1100, David Gibson wrote: > >  static void pnv_lpc_isa_irq_handler_cpld(void *opaque, int n, int level) > >  { > > -    /* We don't yet emulate the PSI bridge which provides the external > > - * interrupt, so just drop interrupts on the floor > > - */ > > +   

Re: [Qemu-devel] [PATCH v4 17/20] ppc/pnv: Add cut down PSI bridge model and hookup external interrupt

2016-10-14 Thread David Gibson
On Mon, Oct 03, 2016 at 09:24:53AM +0200, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > The PSI (Processor Service Interface) is one of the engines of the > "Bridge" unit which connects the different interfaces to the Power > Processor. > > This adds just

Re: [Qemu-devel] [PATCH v4 17/20] ppc/pnv: Add cut down PSI bridge model and hookup external interrupt

2016-10-14 Thread Cédric Le Goater
>> --- a/hw/ppc/pnv.c >> +++ b/hw/ppc/pnv.c >> @@ -318,15 +318,24 @@ static void ppc_powernv_reset(void) >> * have a CPLD that will collect the SerIRQ and shoot them as a >> * single level interrupt to the P8 chip. So let's setup a hook >> * for doing just that. >> - * >> - * Note: The

Re: [Qemu-devel] [Qemu-ppc] [PULL 0/4] ppc patches for qemu-2.7 stable branch

2016-10-14 Thread Greg Kurz
On Fri, 14 Oct 2016 09:28:35 +1100 David Gibson wrote: > On Thu, Oct 13, 2016 at 12:57:19PM +0100, Peter Maydell wrote: > > On 13 October 2016 at 12:54, Peter Maydell > > wrote: > > > On 13 October 2016 at 06:15, David Gibson

Re: [Qemu-devel] [PATCH 08/11] spapr_events: add support for dedicated hotplug event source

2016-10-14 Thread Bharata B Rao
On Wed, Oct 12, 2016 at 06:13:56PM -0500, Michael Roth wrote: > Hotplug events were previously delivered using an EPOW interrupt > and were queued by linux guests into a circular buffer. For traditional > EPOW events like shutdown/resets, this isn't an issue, but for hotplug > events there are

[Qemu-devel] [PATCH v4 6/6] tests: enable virtio tests on SPAPR

2016-10-14 Thread Laurent Vivier
but disable MSI-X tests on SPAPR as we can't check the result (the memory region used on PC is not readable on SPAPR). Signed-off-by: Laurent Vivier --- tests/Makefile.include| 3 ++- tests/libqos/virtio-pci.c | 24 ++-- tests/virtio-9p-test.c|

Re: [Qemu-devel] [QEMU PATCH v6 1/2] migration: extend VMStateInfo

2016-10-14 Thread Dr. David Alan Gilbert
* Jianjun Duan (du...@linux.vnet.ibm.com) wrote: > Current migration code cannot handle some data structures such as > QTAILQ in qemu/queue.h. Here we extend the signatures of put/get > in VMStateInfo so that customized handling is supported. > > Signed-off-by: Jianjun Duan

[Qemu-devel] [PATCH v2] socket: add atomic QEMU_SOCK_NONBLOCK flag

2016-10-14 Thread Stefan Hajnoczi
The socket(2) and accept(2) syscalls have been extended to take flags that affect the socket atomically at creation time. This not only avoids the overhead of additional system calls but also closes the race condition with forking threads. This patch adds support for the SOCK_NONBLOCK flag.

Re: [Qemu-devel] [PATCH 0/5] More thread sanitizer fixes and atomic.h improvements

2016-10-14 Thread Paolo Bonzini
On 13/10/2016 21:29, Emilio G. Cota wrote: > qht-bench: relax test_start/stop atomic accesses > > test_start/stop are used only as flags to loop on. Barriers are > unnecessary, > since no dependent data is transferred among threads apart from the flags > themselves. >

Re: [Qemu-devel] [PATCH] Fix build for less common build directories names

2016-10-14 Thread Stefan Hajnoczi
On Thu, Oct 13, 2016 at 08:29:30PM +0200, Stefan Weil wrote: > scripts/tracetool generates a C preprocessor macro from the name of the > build directory. Any characters which are possible in a directory name > but not allowed in a macro name must be substituted, otherwise builds > will fail. > >

Re: [Qemu-devel] [PATCH] Fix build for less common build directories names

2016-10-14 Thread Paolo Bonzini
On 14/10/2016 11:53, Stefan Hajnoczi wrote: > > Why does it need to care about the build directory name at all? > > Ideally builds should be entirely deterministically reproducible > > whatever the path to the source or build directory names is... > > It's trying to construct the relative path

Re: [Qemu-devel] [PATCH v2 03/20] target-ppc: move back cpu_exec_init() to init

2016-10-14 Thread Laurent Vivier
On 14/10/2016 06:07, David Gibson wrote: > On Thu, Oct 13, 2016 at 06:24:45PM +0200, Laurent Vivier wrote: >> We have now the cpu_exec_realize() in realize, >> so the init part must be in init. >> >> As cpu_exec_unrealize() is called from cpu_common_finalize(), >> remove the call from

Re: [Qemu-devel] [PATCH v4 13/20] ppc/xics: introduce helpers to find an ICP from some (CPU) index

2016-10-14 Thread Cédric Le Goater
On 10/14/2016 07:34 AM, David Gibson wrote: > On Mon, Oct 03, 2016 at 09:24:49AM +0200, Cédric Le Goater wrote: >> Today, the Interrupt Presentation Controllers (ICP) are stored in an >> array under the base class XICSState. They are simply indexed using >> the CPU index field of CPUState. This

Re: [Qemu-devel] [PATCH v2 01/20] exec: split cpu_exec_init()

2016-10-14 Thread Greg Kurz
On Thu, 13 Oct 2016 18:24:43 +0200 Laurent Vivier wrote: > Extract the realize part to cpu_exec_realize(), update all > calls to cpu_exec_init() to add cpu_exec_realize() to > have no functionnal change. > > Put in cpu_exec_init() what initializes the CPU, > in

[Qemu-devel] [PATCH v2 1/2] ACPI: Add IORT Structure definition

2016-10-14 Thread Eric Auger
From: Prem Mallappa ACPI Spec 6.0 introduces IO Remapping Table Structure. This patch introduces the definitions required to describe the IO relationship between the PCIe root complex and the ITS. This conforms to: "IO Remapping Table System Software on ARM

Re: [Qemu-devel] [PATCH 06/18] qed: Implement .bdrv_drain

2016-10-14 Thread Fam Zheng
On Thu, 10/13 19:34, Paolo Bonzini wrote: > From: Fam Zheng > > 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. To > comply with the bdrv_drain semantics, we should make sure it remains >

Re: [Qemu-devel] [QEMU PATCH v6 2/2] migration: migrate QTAILQ

2016-10-14 Thread Dr. David Alan Gilbert
* Jianjun Duan (du...@linux.vnet.ibm.com) wrote: > Currently we cannot directly transfer a QTAILQ instance because of the > limitation in the migration code. Here we introduce an approach to > transfer such structures. We created VMStateInfo vmstate_info_qtailq > for QTAILQ. Similar VMStateInfo

Re: [Qemu-devel] [PATCH v4 19/20] ppc/pnv: Add Naples chip support for LPC interrupts

2016-10-14 Thread David Gibson
On Mon, Oct 03, 2016 at 09:24:55AM +0200, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > It adds the Naples chip which supports proper LPC interrupts via the > LPC controller rather than via an external CPLD. > > Signed-off-by: Benjamin Herrenschmidt

Re: [Qemu-devel] [PATCH v2 3/8] nvdimm acpi: introduce _FIT

2016-10-14 Thread Xiao Guangrong
On 10/13/2016 09:33 PM, Igor Mammedov wrote: On Wed, 12 Oct 2016 16:20:07 +0800 Xiao Guangrong wrote: On 10/11/2016 07:49 PM, Igor Mammedov wrote: On Mon, 10 Oct 2016 21:09:30 +0800 Xiao Guangrong wrote: On 10/10/2016 08:51

Re: [Qemu-devel] [PATCH v3 00/13] pc: q35: x2APIC support in kvm_apic mode

2016-10-14 Thread Igor Mammedov
On Thu, 13 Oct 2016 21:05:54 -0700 (PDT) no-re...@ec2-52-6-146-230.compute-1.amazonaws.com wrote: > Hi, > > Your series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. [..] >

Re: [Qemu-devel] [PATCH] eepro100: Fix memory leak and simplify code for VMStateDescription

2016-10-14 Thread Dr. David Alan Gilbert
* Stefan Weil (s...@weilnetz.de) wrote: > Instead of allocating a VMStateDescription for each NIC instance, > the code now uses a single constant VMStateDescription for all > instances. That implies that the name field is always the same. Doesn't this break migration compatibility? You might be

[Qemu-devel] [PATCH v4 0/6] tests: enable virtio tests on SPAPR

2016-10-14 Thread Laurent Vivier
This series enables virtio tests on SPAPR by starting machines using qtest_pc_boot() or qtest_spapr_boot() to use the good libqos PCI framework (pc or spapr). It adds also some byte-swapping in virtio-pci.c as PCI is always little-endian and the endianness of the virtio device depends on the

[Qemu-devel] [PATCH v4 1/6] tests: fix memory leak in virtio-scsi-test

2016-10-14 Thread Laurent Vivier
vs is allocated in qvirtio_scsi_pci_init() and never freed. Signed-off-by: Laurent Vivier --- tests/virtio-scsi-test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/virtio-scsi-test.c b/tests/virtio-scsi-test.c index 79088bb..94d75b1 100644 ---

[Qemu-devel] How to get the guest virtual address when the guest program is executed?

2016-10-14 Thread 凌英剑
Hi all, I've been trying to get GVA when the memory access instruction is executed,so I traced a function tcg_qemu_tb_exec() and I found the address used by ld/st operations is HVA. I would like to know how can I transform HVA to GVA? if I record GVA during the TB translation,will I miss some

Re: [Qemu-devel] [PATCH 03/18] mirror: use bdrv_drained_begin/bdrv_drained_end

2016-10-14 Thread Paolo Bonzini
On 14/10/2016 11:43, Fam Zheng wrote: > On Thu, 10/13 19:34, Paolo Bonzini wrote: >> Ensure that there are no changes between the last check to >> bdrv_get_dirty_count and the switch to the target. >> >> There is already a bdrv_drained_end call, we only need to ensure >> that bdrv_drained_begin

Re: [Qemu-devel] [PATCH 1/2] KVM: page track: add a new notifier type: track_flush_slot

2016-10-14 Thread Jike Song
On 10/11/2016 05:47 PM, Paolo Bonzini wrote: > > > On 11/10/2016 11:21, Xiao Guangrong wrote: >> >> >> On 10/11/2016 04:54 PM, Paolo Bonzini wrote: >>> >>> >>> On 11/10/2016 04:39, Xiao Guangrong wrote: On 10/11/2016 02:32 AM, Paolo Bonzini wrote: > > > On 10/10/2016

Re: [Qemu-devel] [PATCH 06/18] qed: Implement .bdrv_drain

2016-10-14 Thread Paolo Bonzini
On 14/10/2016 12:33, Fam Zheng wrote: >> > +bdrv_aio_flush(s->bs->file->bs, qed_clear_need_check, s); > If this one has to change, what about the other bdrv_aio_flush(s->bs, ...) > down > in this call path: > > qed_need_check_timer_cb > qed_clear_need_check >

Re: [Qemu-devel] [PATCH v4 13/20] ppc/xics: introduce helpers to find an ICP from some (CPU) index

2016-10-14 Thread David Gibson
On Mon, Oct 03, 2016 at 09:24:49AM +0200, Cédric Le Goater wrote: > Today, the Interrupt Presentation Controllers (ICP) are stored in an > array under the base class XICSState. They are simply indexed using > the CPU index field of CPUState. This made sense for the current > derived classes, spapr

Re: [Qemu-devel] [PATCH 02/11] spapr_hcall: use spapr_ovec_* interfaces for CAS options

2016-10-14 Thread Bharata B Rao
On Wed, Oct 12, 2016 at 06:13:50PM -0500, Michael Roth wrote: > Currently we access individual bytes of an option vector via > ldub_phys() to test for the presence of a particular capability > within that byte. Currently this is only done for the "dynamic > reconfiguration memory" capability bit.

Re: [Qemu-devel] [PATCH] tests: add mac99 and g3beige in boot-serial-test

2016-10-14 Thread Laurent Vivier
On 13/10/2016 22:26, Thomas Huth wrote: > On 13.10.2016 21:53, Laurent Vivier wrote: >> g3beige (pmac_oldworld) and mac99 (pmac_newworld) are missing in >> boot-serial-test. >> >> Perhaps because serial output of OpenBIOS is only enabled with >> '-nographic' > > IIRC clearly, I've left them out

[Qemu-devel] [PATCH v4 4/6] tests: rename target_big_endian() as qvirtio_is_big_endian()

2016-10-14 Thread Laurent Vivier
Move the definition to libqos/virtio.h as it must be used only with virtio functions. Add a QVirtioDevice parameter as it will be needed to know if the virtio device is using virtio 1.0 specification and thus is always little-endian (to do) Signed-off-by: Laurent Vivier ---

Re: [Qemu-devel] [PATCH v4 15/20] ppc/xics: Add "native" XICS subclass

2016-10-14 Thread Cédric Le Goater
On 10/14/2016 08:10 AM, David Gibson wrote: > On Mon, Oct 03, 2016 at 09:24:51AM +0200, Cédric Le Goater wrote: >> From: Benjamin Herrenschmidt >> >> This provides access to the MMIO based Interrupt Presentation >> Controllers (ICP) as found on a POWER8 system. >> >> A

Re: [Qemu-devel] [PATCH 07/18] block: introduce bdrv_poll_while and bdrv_wakeup

2016-10-14 Thread Paolo Bonzini
On 14/10/2016 12:42, Fam Zheng wrote: >> > diff --git a/block/qed.c b/block/qed.c >> > index 1a7ef0a..dcb5fb9 100644 >> > --- a/block/qed.c >> > +++ b/block/qed.c >> > @@ -354,7 +354,9 @@ static void qed_start_need_check_timer(BDRVQEDState *s) >> > static void

Re: [Qemu-devel] [PATCH 07/18] block: introduce bdrv_poll_while and bdrv_wakeup

2016-10-14 Thread Fam Zheng
On Thu, 10/13 19:34, Paolo Bonzini wrote: > We want the BDS event loop to run exclusively in the iothread that > owns the BDS's AioContext. This function and macro provides the > synchronization between the two event loops. > > Signed-off-by: Paolo Bonzini > --- >

Re: [Qemu-devel] [PATCH 1/2] KVM: page track: add a new notifier type: track_flush_slot

2016-10-14 Thread Paolo Bonzini
On 14/10/2016 12:37, Jike Song wrote: > Hi Paolo & Alex, > > IIUC, passing file descriptors means touching QEMU and the UAPI between > QEMU and VFIO. Would you guys have a look at below draft patch? If it's > on the correct direction, I'll send the split ones. Thanks! > > -- > Thanks, > Jike >

Re: [Qemu-devel] [PATCH v4 19/20] ppc/pnv: Add Naples chip support for LPC interrupts

2016-10-14 Thread Cédric Le Goater
On 10/14/2016 08:36 AM, David Gibson wrote: > On Mon, Oct 03, 2016 at 09:24:55AM +0200, Cédric Le Goater wrote: >> From: Benjamin Herrenschmidt >> >> It adds the Naples chip which supports proper LPC interrupts via the >> LPC controller rather than via an external CPLD.

Re: [Qemu-devel] [PATCH 07/11] spapr: add hotplug interrupt machine options

2016-10-14 Thread Bharata B Rao
On Wed, Oct 12, 2016 at 06:13:55PM -0500, Michael Roth wrote: > This adds machine options of the form: > > -machine pseries,legacy-hotplug-events=true > -machine pseries,legacy-hotplug-events=false > > to denote whether or not we wish to force the use of "legacy" style > hotplug events,

[Qemu-devel] [PATCH v2 1/4] qga: drop unused sockaddr in accept(2) call

2016-10-14 Thread Stefan Hajnoczi
ga_channel_listen_accept() is currently hard-coded to support only AF_UNIX because the struct sockaddr_un type is used. This function should work with any address family. Drop the sockaddr since the client address is unused and is an optional argument to accept(2). Signed-off-by: Stefan

Re: [Qemu-devel] [PATCH 05/18] block: change drain to look only at one child at a time

2016-10-14 Thread Fam Zheng
On Thu, 10/13 19:34, Paolo Bonzini wrote: > bdrv_requests_pending is checking children to also wait until internal > requests (such as metadata writes) have completed. However, checking > children is in general overkill. Children requests can be of two kinds: > > - requests caused by an

Re: [Qemu-devel] [PATCH v4 10/20] ppc/xics: Make the ICSState a list

2016-10-14 Thread David Gibson
On Mon, Oct 03, 2016 at 09:24:46AM +0200, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > Instead of an array of fixed sized blocks, use a list, as we will need > to have sources with variable number of interrupts. SPAPR only uses > a single entry. Native

Re: [Qemu-devel] [PATCH v4 18/20] ppc/pnv: Add OCC model stub with interrupt support

2016-10-14 Thread David Gibson
On Mon, Oct 03, 2016 at 09:24:54AM +0200, Cédric Le Goater wrote: > From: Benjamin Herrenschmidt > > The OCC is an on-chip microcontroller based on a ppc405 core used > for various power management tasks. It comes with a pile of additional > hardware sitting on the PIB

Re: [Qemu-devel] [PATCH v4 10/20] ppc/xics: Make the ICSState a list

2016-10-14 Thread Cédric Le Goater
On 10/14/2016 07:32 AM, David Gibson wrote: > On Mon, Oct 03, 2016 at 09:24:46AM +0200, Cédric Le Goater wrote: >> From: Benjamin Herrenschmidt >> >> Instead of an array of fixed sized blocks, use a list, as we will need >> to have sources with variable number of

Re: [Qemu-devel] [PATCH V6 0/2] Add option to configure guest vPMU

2016-10-14 Thread Andrew Jones
On Thu, Oct 13, 2016 at 05:19:37PM +0100, Peter Maydell wrote: > On 4 October 2016 at 22:38, Wei Huang wrote: > > This patchset adds a pmu=[on/off] option to enable/disable vPMU support > > for guest VM. There are several reasons to justify this option. First, > > vPMU can be

[Qemu-devel] [PATCH v4 2/6] tests: don't check if qtest_spapr_boot() returns NULL

2016-10-14 Thread Laurent Vivier
qtest_spapr_boot()/qtest_pc_boot()/qtest_boot() call qtest_vboot() and qtest_vboot() calls g_malloc(), and g_malloc() never fails: if memory allocation fails, the application is terminated. Signed-off-by: Laurent Vivier --- tests/libqos/libqos.c | 1 + tests/rtas-test.c

[Qemu-devel] [PATCH v4 5/6] tests: use qtest_pc_boot()/qtest_shutdown() in virtio tests

2016-10-14 Thread Laurent Vivier
This patch replaces calls to qtest_start() and qtest_end() by calls to qtest_pc_boot() and qtest_shutdown(). This allows to initialize memory allocator and PCI interface functions. This will ease to enable virtio tests on other architectures by only adding a specific qtest_XXX_boot() (like

Re: [Qemu-devel] [PATCHv3 7/7] spapr: Improved placement of PCI host bridges in guest memory map

2016-10-14 Thread Laurent Vivier
On 14/10/2016 01:29, David Gibson wrote: > From 98f07c09c6d72218800d6cfbf44b973a88ece2aa Mon Sep 17 00:00:00 2001 > From: David Gibson > Date: Fri, 14 Oct 2016 10:21:00 +1100 > Subject: [PATCH] spapr: Improved placement of PCI host bridges in guest memory > map > >

Re: [Qemu-devel] [PATCH v3 3/5] tests: use qtest_pc_boot()/qtest_shutdown() in virtio tests

2016-10-14 Thread Greg Kurz
On Fri, 7 Oct 2016 19:54:54 +0200 Laurent Vivier wrote: > On 07/10/2016 18:38, Greg Kurz wrote: > > On Sat, 1 Oct 2016 20:56:02 +0200 > > Laurent Vivier wrote: > > > >> This patch replaces calls to qtest_start() and qtest_end() by > >> calls to

[Qemu-devel] [PATCH v2 3/4] sockets: add AF_VSOCK support

2016-10-14 Thread Stefan Hajnoczi
Add the AF_VSOCK address family so that qemu-ga will be able to use virtio-vsock. The AF_VSOCK address family uses address tuples. The cid is the unique identifier comparable to an IP address. AF_VSOCK does not use name resolution so it's easy to convert between struct sockaddr_vm

[Qemu-devel] [PATCH v2 4/4] qga: add vsock-listen method

2016-10-14 Thread Stefan Hajnoczi
Add AF_VSOCK (virtio-vsock) support as an alternative to virtio-serial. $ qemu-system-x86_64 -device vhost-vsock-pci,guest-cid=3 ... (guest)# qemu-ga -m vsock-listen -p 3:1234 Signed-off-by: Stefan Hajnoczi Reviewed-by: Michael Roth ---

[Qemu-devel] [PATCH v2 0/4] qga: add vsock-listen

2016-10-14 Thread Stefan Hajnoczi
v2: * s/seasy/easy/ typo fix in commit description [Eric] * Use %n to check for trailing characters in addresses [Eric] * Added Mike's R-b This patch series adds virtio-vsock support to the QEMU guest agent. $ qemu-system-x86_64 -device vhost-vsock-pci,guest-cid=3 ... (guest)# qemu-ga -m

Re: [Qemu-devel] [PATCH v4 06/12] block/nbd: Accept SocketAddress

2016-10-14 Thread Ashijeet Acharya
On Thu, Oct 13, 2016 at 5:12 PM, Kevin Wolf wrote: > Am 28.09.2016 um 22:55 hat Max Reitz geschrieben: >> Add a new option "address" to the NBD block driver which accepts a >> SocketAddress. >> >> "path", "host" and "port" are still supported as legacy options and are >> mapped

Re: [Qemu-devel] [PATCH 03/18] mirror: use bdrv_drained_begin/bdrv_drained_end

2016-10-14 Thread Fam Zheng
On Thu, 10/13 19:34, Paolo Bonzini wrote: > Ensure that there are no changes between the last check to > bdrv_get_dirty_count and the switch to the target. > > There is already a bdrv_drained_end call, we only need to ensure > that bdrv_drained_begin is not called twice. > > Cc:

[Qemu-devel] [PATCH] milkymist-pfpu: fix potential integer overflow

2016-10-14 Thread Michael Walle
Since the lm32 is a 32 bit architecture, just return a 32 bit value which is then converted to a 64 bit value. Spotted by coverity, CID 1005506. Signed-off-by: Michael Walle --- hw/misc/milkymist-pfpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH] trace: fix group name generation

2016-10-14 Thread Greg Kurz
On Fri, 14 Oct 2016 16:31:01 -0500 Eric Blake wrote: > On 10/14/2016 04:26 PM, Greg Kurz wrote: > > Since commit "80dd5c4918ab trace: introduce a formal group name for trace > > events", tracetool generates C variable names and macro definitions out > > of the path to the

[Qemu-devel] [PATCH v3 3/3] exec: call cpu_exec_exit() from a CPU unrealize common function

2016-10-14 Thread Laurent Vivier
As cpu_exec_exit() mirrors the cpu_exec_realizefn(), rename it as cpu_exec_unrealizefn(). Create and register a cpu_common_unrealizefn() function for the CPU device class and call cpu_exec_unrealizefn() from this function. Remove cpu_exec_exit() from cpu_common_finalize() (which mirrors init,

Re: [Qemu-devel] [PATCH v2 3/4] fdc: Move qdev properties to FloppyDrive

2016-10-14 Thread John Snow
On 09/30/2016 03:39 PM, Kevin Wolf wrote: This makes the FloppyDrive qdev object actually useful: Now that it has all properties that don't belong to the controller, you can actually use '-device floppy' and get a working result. Command line semantics is consistent with CD-ROM drives: By

[Qemu-devel] [PATCH v3 2/3] exec: rename cpu_exec_init() as cpu_exec_realizefn()

2016-10-14 Thread Laurent Vivier
Modify all CPUs to call it from XXX_cpu_realizefn() function. Remove all the cannot_destroy_with_object_finalize_yet as unsafe references have been moved to cpu_exec_realizefn(). (tested with QOM command provided by commit 4c315c27) for arm: Setting of cpu->mp_affinity is moved from

Re: [Qemu-devel] [Qemu-block] [PATCH] rbd: make the code better readable

2016-10-14 Thread 李秀波
JohnSnow 写到: > > >On 10/14/2016 05:51 AM, Xiubo Li wrote: >> Make it a bit clear and better readable. >> > >Suggestion: "Make it clearer and more readable." > Yes, see the next version. >> >> if (qemu_rbd_set_auth(cluster, secretid, errp) < 0) { >>

Re: [Qemu-devel] [PATCH] eepro100: Fix memory leak and simplify code for VMStateDescription

2016-10-14 Thread Stefan Weil
On 10/14/16 10:25, Dr. David Alan Gilbert wrote: * Stefan Weil (s...@weilnetz.de) wrote: Instead of allocating a VMStateDescription for each NIC instance, the code now uses a single constant VMStateDescription for all instances. That implies that the name field is always the same. Doesn't

[Qemu-devel] how to get the default cpu for a softmmu

2016-10-14 Thread Dennis Luehring
i can get a list of all supported CPUs by using the -cpu ? commandline but which CPU is selected if i don't give the -cpu parameter on normal qemu start of a softmmu?

Re: [Qemu-devel] [PATCH v8 3/6] vfio iommu: Add support for mediated devices

2016-10-14 Thread Kirti Wankhede
On 10/12/2016 4:01 PM, Tian, Kevin wrote: >> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] >> Sent: Tuesday, October 11, 2016 4:29 AM >> > [...] >> diff --git a/drivers/vfio/vfio_iommu_type1.c >> b/drivers/vfio/vfio_iommu_type1.c >> index 2ba19424e4a1..ce6d6dcbd9a8 100644 >> ---

[Qemu-devel] [PATCHv2 1/2] dma-helpers: explicitly pass alignment into DMA helpers

2016-10-14 Thread Mark Cave-Ayland
The hard-coded default alignment is BDRV_SECTOR_SIZE, however this is not necessarily the case for all platforms. Use this as the default alignment for all current callers. Signed-off-by: Mark Cave-Ayland Reviewed-by: Eric Blake Acked-by: John

[Qemu-devel] [PATCHv2 0/2] dma-helpers: explicitly pass alignment into DMA helpers

2016-10-14 Thread Mark Cave-Ayland
This is a follow-up to the thread at https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg01396.html which introduces an explicit alignment to the DMA helpers to facilitate conversion of the macio controller over to use the now byte-aligned DMA helpers. Patch 1 introduces an alignment

[Qemu-devel] [PATCHv2 2/2] macio: switch over to new byte-aligned DMA helpers

2016-10-14 Thread Mark Cave-Ayland
Now that the DMA helpers are byte-aligned they can be called directly from the macio routines rather than emulating byte-aligned accesses via multiple block-level accesses. Signed-off-by: Mark Cave-Ayland Reviewed-by: Eric Blake Reviewed-by:

[Qemu-devel] [PATCH v2 2/2] gdbstub: Fix vCont behaviour

2016-10-14 Thread Claudio Imbrenda
When GDB issues a "vCont", QEMU was not handling it correctly when multiple VCPUs are active. For vCont, for each thread (VCPU), it can be specified whether to single step, continue or stop that thread. The default is to stop a thread. However, when (for example) "vCont;s:2" is issued, all VCPUs

[Qemu-devel] [PATCH v2 1/2] move vm_start to cpus.c

2016-10-14 Thread Claudio Imbrenda
This patch: * moves vm_start to cpus.c . * exports qemu_vmstop_requested, since it's needed by vm_start . * extracts vm_prepare_start from vm_start; it does what vm_start did, except restarting the cpus. vm_start now calls vm_prepare_start. * moves the call to qemu_clock_enable away from

Re: [Qemu-devel] [PATCH 4/4] hostmem-file: Register TYPE_MEMORY_BACKEND_FILE properties as class properties

2016-10-14 Thread Igor Mammedov
On Thu, 13 Oct 2016 18:26:42 -0300 Eduardo Habkost wrote: > To do the conversion, the file_backend_class_init() was moved > after the getter/setter functions. The old > file_backend_instance_init() function was removed because it is > not needed anymore. > > The NULL errp

Re: [Qemu-devel] [PATCH v8 3/6] vfio iommu: Add support for mediated devices

2016-10-14 Thread Tian, Kevin
> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > Sent: Friday, October 14, 2016 7:36 PM > > > On 10/12/2016 4:01 PM, Tian, Kevin wrote: > >> From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > >> Sent: Tuesday, October 11, 2016 4:29 AM > >> > > [...] > >> diff --git

Re: [Qemu-devel] [PATCH 1/4] machine: Register TYPE_MACHINE properties as class properties

2016-10-14 Thread Igor Mammedov
On Thu, 13 Oct 2016 18:26:39 -0300 Eduardo Habkost wrote: > When doing the conversion, the NULL errp arguments on the > property registration calls were changed to _abort. > > Signed-off-by: Eduardo Habkost So many property registrations look pretty

[Qemu-devel] [PATCH v11 18/19] block: Add 'base-node' parameter to the 'block-stream' command

2016-10-14 Thread Alberto Garcia
The way to specify the node from which to copy data in the block-stream operation is by using the 'base' parameter. This parameter however takes a file name, not a node name. Since we want to be able to perform this operation using only node names, this patch adds a new 'base-node' parameter.

[Qemu-devel] [PATCH v11 07/19] block: Block all nodes involved in the block-commit operation

2016-10-14 Thread Alberto Garcia
After a successful block-commit operation all nodes between top and base are removed from the backing chain, and top's overlay needs to be updated to point to base. Because of that we should prevent other block jobs from messing with them. This patch blocks all operations in these nodes in

[Qemu-devel] [PATCH v11 11/19] docs: Document how to stream to an intermediate layer

2016-10-14 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- docs/live-block-ops.txt | 36 +--- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/docs/live-block-ops.txt b/docs/live-block-ops.txt index a257087..2211d14 100644 --- a/docs/live-block-ops.txt +++

Re: [Qemu-devel] [QEMU PATCH v6 2/2] migration: migrate QTAILQ

2016-10-14 Thread Paolo Bonzini
On 14/10/2016 12:44, Dr. David Alan Gilbert wrote: >> > +#define QTAILQ_RAW_INSERT_TAIL(head, elm, entry) do { >> > \ >> > +*((void **) ((char *) (elm) + (entry) + QTAILQ_NEXT_OFFSET)) = >> > NULL; \ >> > +*((void **) ((char *) (elm) + (entry) +

Re: [Qemu-devel] [PATCH v2 1/2] ACPI: Add IORT Structure definition

2016-10-14 Thread Auger Eric
Hi Drew, On 14/10/2016 13:30, Andrew Jones wrote: > On Fri, Oct 14, 2016 at 10:54:54AM +0200, Eric Auger wrote: >> From: Prem Mallappa >> >> ACPI Spec 6.0 introduces IO Remapping Table Structure. This patch >> introduces the definitions required to describe the IO

Re: [Qemu-devel] [PATCH v2 3/8] nvdimm acpi: introduce _FIT

2016-10-14 Thread Igor Mammedov
On Fri, 14 Oct 2016 15:43:50 +0800 Xiao Guangrong wrote: > On 10/13/2016 09:33 PM, Igor Mammedov wrote: > > On Wed, 12 Oct 2016 16:20:07 +0800 > > Xiao Guangrong wrote: > > > >> On 10/11/2016 07:49 PM, Igor Mammedov wrote: >

Re: [Qemu-devel] [PATCH 1/2] KVM: page track: add a new notifier type: track_flush_slot

2016-10-14 Thread Jike Song
On 10/14/2016 06:43 PM, Paolo Bonzini wrote: > > > On 14/10/2016 12:37, Jike Song wrote: >> Hi Paolo & Alex, >> >> IIUC, passing file descriptors means touching QEMU and the UAPI between >> QEMU and VFIO. Would you guys have a look at below draft patch? If it's >> on the correct direction, I'll

[Qemu-devel] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}()

2016-10-14 Thread Alberto Garcia
bdrv_drain_all() doesn't allow the caller to do anything after all pending requests have been completed but before block jobs are resumed. This patch splits bdrv_drain_all() into _begin() and _end() for that purpose. It also adds aio_{disable,enable}_external() calls to disable external clients

[Qemu-devel] [PATCH v11 16/19] qemu-iotests: Add iotests.supports_quorum()

2016-10-14 Thread Alberto Garcia
There's many tests that need Quorum support in order to run. At the moment each test implements its own check to see if Quorum is enabled. This patch centralizes all those checks in a new function called iotests.supports_quorum(). Signed-off-by: Alberto Garcia ---

[Qemu-devel] [PATCH v11 17/19] qemu-iotests: Test streaming to a Quorum child

2016-10-14 Thread Alberto Garcia
Quorum children are special in the sense that they're not directly attached to a block backend but they're not used as backing images either. However the intermediate block streaming code supports streaming to them. This is a test case for that scenario. Signed-off-by: Alberto Garcia

[Qemu-devel] [PATCH v11 13/19] qemu-iotests: Test block-stream operations in parallel

2016-10-14 Thread Alberto Garcia
This test case checks that it's possible to launch several stream operations in parallel in the same snapshot chain, each one involving a different set of nodes. Signed-off-by: Alberto Garcia --- tests/qemu-iotests/030 | 80 ++

  1   2   3   >