Re: [Qemu-devel] [PULL 00/10] ui: vnc cleanups, input-linux kbd fix.

2016-10-13 Thread Peter Maydell
60ccc886cea91: > > Merge remote-tracking branch 'remotes/kraxel/tags/pull-usb-20161012-1' into > staging (2016-10-12 14:05:23 +0100) > > are available in the git repository at: > > > git://git.kraxel.org/qemu tags/pull-ui-20161013-1 > > for you to fetch changes up

Re: [Qemu-devel] Async savevm using userfaultfd(2)

2016-10-13 Thread Andrea Arcangeli
Hello, On Thu, Oct 13, 2016 at 09:30:49AM +0100, Dr. David Alan Gilbert wrote: > I think it should, or at least I think all other kernel things end up being > caught by userfaultfd during postcopy. Yes indeed, it will work. vhost blocks in its own task context inside the kernel and the

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

2016-10-13 Thread Andrew Jones
On Thu, Oct 13, 2016 at 12:55:42PM +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 relationship > between the PCIe root complex and the ITS. >

Re: [Qemu-devel] [PATCH 02/15] xen: Fix coding style warnings

2016-10-13 Thread Emil Condrea
Oh, I see. Because gmail messes up the alignment but raw diff looked fine I thought that you were seeing the same issue as I see on email client. I will align the quoted strings properly with the first parameter and I will send another series. Thanks, Emil On Thu, Oct 13, 2016 at 2:35 PM,

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

2016-10-13 Thread Andrew Jones
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 ACPI MADT > table and allows vhost-net on ACPI guest.

Re: [Qemu-devel] [PATCH v8 4/6] docs: Add Documentation for Mediated devices

2016-10-13 Thread Alex Williamson
On Thu, 13 Oct 2016 14:52:09 +0530 Kirti Wankhede wrote: > On 10/13/2016 3:14 AM, Alex Williamson wrote: > > On Thu, 13 Oct 2016 00:32:48 +0530 > > Kirti Wankhede wrote: > > > >> On 10/12/2016 9:29 PM, Alex Williamson wrote: > >>> On Wed, 12 Oct

Re: [Qemu-devel] [dpdk-dev] [PATCH 1/2] vhost: enable any layout feature

2016-10-13 Thread Yang, Zhiyong
Hi, Yuanhan: > -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Yuanhan Liu > Sent: Wednesday, October 12, 2016 11:22 AM > To: Michael S. Tsirkin ; Thomas Monjalon > > Cc: Wang, Zhihong ; Maxime

Re: [Qemu-devel] chardev's and fd's in monitors

2016-10-13 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@gmail.com) wrote: > Hi > > On Wed, Oct 12, 2016 at 11:15 PM Dr. David Alan Gilbert > wrote: > > > Hi, > > I had a look at a couple of readline like libraries; > > editline and linenoise. A difficulty with using them is that > > they

[Qemu-devel] Guest with multiple monitors support with qemu-system-ppc

2016-10-13 Thread Programmingkid
Is it possible to use a multiple guest setup in qemu-system-ppc. I know qemu-system-i386 does support this feature using spice and qxl. I don't think spice is available for a Mac OS X host so I probably can't use it. QEMU is used in emulation mode if that helps.

Re: [Qemu-devel] [PATCH v14 13/21] qdict: allow qdict_crumple to accept compound types as values

2016-10-13 Thread Kevin Wolf
Am 13.10.2016 um 14:35 hat Markus Armbruster geschrieben: > Cc: Kevin for discussion of QemuOpts dotted key convention > > "Daniel P. Berrange" writes: > > > Currently qdict_crumple requires a totally flat QDict as its > > input. i.e. all values in the QDict must be scalar

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

2016-10-13 Thread Kirti Wankhede
On 10/12/2016 3:36 AM, Alex Williamson wrote: > On Tue, 11 Oct 2016 01:58:34 +0530 > Kirti Wankhede wrote: > ... >> +static struct vfio_group *vfio_group_from_dev(struct device *dev) >> +{ >> +struct vfio_device *device; >> +struct vfio_group *group; >> +int

Re: [Qemu-devel] [PATCH v8 4/6] docs: Add Documentation for Mediated devices

2016-10-13 Thread Paolo Bonzini
On 13/10/2016 16:36, Alex Williamson wrote: >> > >> > Libvirt would have parent and type_id in XML. No two vendors can own >> > same parent device. So I don't think vendors would collide even having >> > same type_id, since pair would always be unique. > > We have a goal of

[Qemu-devel] [PATCH v2 02/20] target-i386: move back cpu_exec_init() to init

2016-10-13 Thread Laurent Vivier
We have now the cpu_exec_realize() in realize, so the init part must be in init. I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "athlon-x86_64-cpu") CC: Eduardo

[Qemu-devel] [PATCH v2 07/20] target-cris: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "crisv17-cris-cpu") CC: Edgar E. Iglesias Signed-off-by: Laurent Vivier

[Qemu-devel] [PATCH v2 10/20] target-microblaze: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "microblaze-cpu") CC: Edgar E. Iglesias Signed-off-by: Laurent Vivier

[Qemu-devel] [PATCH v2 18/20] target-unicore32: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "any-unicore32-cpu") CC: Guan Xuetao Signed-off-by: Laurent Vivier ---

Re: [Qemu-devel] [PATCH 1/2] target-mips: Fix Loongson multimedia 'or' instruction.

2016-10-13 Thread Yongbok Kim
On 13/10/2016 08:09, Heiher wrote: > From: Heiher > > Signed-off-by: Heiher > Signed-off-by: Fuxin Zhang > --- > target-mips/translate.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target-mips/translate.c

Re: [Qemu-devel] [PATCH] nvic: allow to set pending status for not active interrupts

2016-10-13 Thread Peter Maydell
On 7 October 2016 at 10:42, wrote: > From: Marcin Krzeminski > > According to ARM DUI 0552A 4.2.10. NVIC set pending status > also for disabled interrupts. This patch adds possibility > to emulate this in Qemu. > > Signed-off-by: Marcin

Re: [Qemu-devel] [PATCH 11/22] qcow2-bitmap: add qcow2_store_persistent_bitmaps()

2016-10-13 Thread Vladimir Sementsov-Ogievskiy
On 07.10.2016 22:24, Max Reitz wrote: On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote: Realize block bitmap stroing interface, to allow qcow2 images store [snip] +uint64_t end = MIN(bm_size, sector + dsc); +uint64_t write_size = +

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

2016-10-13 Thread Alex Williamson
On Thu, 13 Oct 2016 20:04:43 +0530 Kirti Wankhede wrote: > On 10/12/2016 3:36 AM, Alex Williamson wrote: > > On Tue, 11 Oct 2016 01:58:34 +0530 > > Kirti Wankhede wrote: > > > ... > > > >> +static struct vfio_group *vfio_group_from_dev(struct

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

2016-10-13 Thread Paolo Bonzini
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 deleted once .bdrv_drain is called. The change to

[Qemu-devel] [PATCH 04/18] block: add BDS field to count in-flight requests

2016-10-13 Thread Paolo Bonzini
Unlike tracked_requests, this field also counts throttled requests, and remains non-zero if an AIO operation needs a BH to be "really" completed. With this change, it is no longer necessary to have a dummy BdrvTrackedRequest for requests that are never serialising, and it is no longer necessary

[Qemu-devel] [PATCH 13/18] replication: pass BlockDriverState to reopen_backing_file

2016-10-13 Thread Paolo Bonzini
This will be needed in the next patch to retrieve the AioContext. Signed-off-by: Paolo Bonzini --- block/replication.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/block/replication.c b/block/replication.c index 5231a00..af47479

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

2016-10-13 Thread Paolo Bonzini
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 --- block/block-backend.c | 7 +-- block/io.c

[Qemu-devel] [PATCH 14/18] block: prepare bdrv_reopen_multiple to release AioContext

2016-10-13 Thread Paolo Bonzini
After the next patch bdrv_drain_all will have to be called without holding any AioContext. Prepare to do this by adding an AioContext argument to bdrv_reopen_multiple. Signed-off-by: Paolo Bonzini --- block.c | 4 ++-- block/commit.c| 2 +-

Re: [Qemu-devel] [PATCH] machine: Fix replacement of '_' by '-' in machine property names

2016-10-13 Thread Eduardo Habkost
On Thu, Oct 13, 2016 at 06:44:14PM +0200, Markus Armbruster wrote: > machine_set_property() replaces '_' by '-' in the property name. > Except it fails to replace an initial '_'. Screwed up in commit > b0ddb8b. Reproducer: "-M pc,__foo_bar=true" produces "Property > '._-foo-bar' not found". > >

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

2016-10-13 Thread Peter Maydell
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 problematic for cross-migration between different SoC as perf > counters

[Qemu-devel] [PATCH v2 11/20] target-mips: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "mips-cpu") CC: Aurelien Jarno Signed-off-by: Laurent Vivier ---

[Qemu-devel] [PATCH v2 06/20] target-alpha: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "pca56-alpha-cpu") CC: Richard Henderson Signed-off-by: Laurent Vivier ---

[Qemu-devel] [PATCH v2 08/20] target-lm32: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "lm32-full-lm32-cpu") CC: Michael Walle Signed-off-by: Laurent Vivier ---

[Qemu-devel] [PATCH v2 12/20] target-moxie: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "moxie-cpu") CC: Anthony Green Signed-off-by: Laurent Vivier ---

[Qemu-devel] [PATCH v2 13/20] target-openrisc: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "or1200-or32-cpu") CC: Jia Liu Signed-off-by: Laurent Vivier ---

[Qemu-devel] [PATCH v2 19/20] target-xtensa: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "dc233c-xtensa-cpu") CC: Max Filippov Signed-off-by: Laurent Vivier ---

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 3/6] migration: extend VMStateInfo

2016-10-13 Thread Jianjun Duan
On 10/13/2016 09:32 AM, Halil Pasic wrote: > > > On 10/13/2016 06:23 PM, Jianjun Duan wrote: >> >> >> On 10/13/2016 03:48 AM, Halil Pasic wrote: >>> >>> >>> On 10/13/2016 10:22 AM, Paolo Bonzini wrote: >> No, I disagree. We shouldn't be worried about making intrusive changes to

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

2016-10-13 Thread Auger Eric
Hi Drew, On 13/10/2016 17:00, Andrew Jones wrote: > On Thu, Oct 13, 2016 at 12:55:42PM +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

[Qemu-devel] [PATCH 01/18] replication: interrupt failover if the main device is closed

2016-10-13 Thread Paolo Bonzini
Without this change, there is a race condition in tests/test-replication. Depending on how fast the failover job (active commit) runs, there is a chance of two bad things happening: 1) replication_done can be called after the secondary has been closed and hence when the BDRVReplicationState is

[Qemu-devel] [PATCH 00/18] dataplane: remove RFifoLock (including almost all previously sent patches)

2016-10-13 Thread Paolo Bonzini
This patch reorganizes aio_poll callers to establish new rules for dataplane locking. The idea is that I/O operations on a dataplane BDS (i.e. one where the AioContext is not the main one) do not call aio_poll anymore. Instead, they wait for the operation to end in the other I/O thread, at which

Re: [Qemu-devel] [PATCH] machine: Fix replacement of '_' by '-' in machine property names

2016-10-13 Thread Eduardo Habkost
On Thu, Oct 13, 2016 at 06:44:14PM +0200, Markus Armbruster wrote: > machine_set_property() replaces '_' by '-' in the property name. > Except it fails to replace an initial '_'. Screwed up in commit > b0ddb8b. Reproducer: "-M pc,__foo_bar=true" produces "Property > '._-foo-bar' not found". > >

[Qemu-devel] [PATCH v2 00/20] Split cpu_exec_init() into an init and a realize part

2016-10-13 Thread Laurent Vivier
Since commit 42ecaba ("target-i386: Call cpu_exec_init() on realize"), , commit 6dd0f83 ("target-ppc: Move cpu_exec_init() call to realize function"), and commit c6644fc ("s390x/cpu: Get rid of side effects when creating a vcpu"), cpu_exec_init() has been moved to realize function for some

Re: [Qemu-devel] [PATCH] tests: cleanup ptimer-test

2016-10-13 Thread Peter Maydell
On 26 September 2016 at 14:37, Paolo Bonzini wrote: > 1) ptimer-test is not a qtest---it runs the ptimer.c code directly in the > ptimer-test process > > 2) ptimer-test has its own stubs file, so there is no need to add more > stubs to stubs/vmstate.c > > Signed-off-by: Paolo

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

2016-10-13 Thread Stefan Weil
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. Reported-by: Li Qiang Signed-off-by: Stefan Weil ---

[Qemu-devel] [PATCH 10/18] sheepdog: use bdrv_poll_while and bdrv_wakeup

2016-10-13 Thread Paolo Bonzini
These ensure that bdrv_poll_while will exit for a BlockDriverState that is not in the main AioContext. Signed-off-by: Paolo Bonzini --- block/sheepdog.c | 67 1 file changed, 38 insertions(+), 29 deletions(-) diff

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 3/6] migration: extend VMStateInfo

2016-10-13 Thread Jianjun Duan
On 10/13/2016 03:48 AM, Halil Pasic wrote: > > > On 10/13/2016 10:22 AM, Paolo Bonzini wrote: No, I disagree. We shouldn't be worried about making intrusive changes >> to all invocations or declarations, if that leads to a simpler API. If VMStateInfo was meant for complete

[Qemu-devel] [PATCH v2 09/20] target-m68k: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "any-m68k-cpu") CC: Greg Ungerer Signed-off-by: Laurent Vivier ---

Re: [Qemu-devel] [PATCH v8 4/6] docs: Add Documentation for Mediated devices

2016-10-13 Thread Alex Williamson
On Thu, 13 Oct 2016 18:00:07 +0200 Paolo Bonzini wrote: > On 13/10/2016 16:36, Alex Williamson wrote: > >> > > >> > Libvirt would have parent and type_id in XML. No two vendors can own > >> > same parent device. So I don't think vendors would collide even having > >> > same

[Qemu-devel] [PATCH v2 20/20] exec: move cpu_exec_init() to cpu_common_initfn()

2016-10-13 Thread Laurent Vivier
As all XX_cpu_initfn() call cpu_exec_init(), we can move it to cpu_common_initfn(). CC: Eduardo Habkost Signed-off-by: Laurent Vivier --- include/exec/exec-all.h | 1 - include/qom/cpu.h | 1 + qom/cpu.c | 2 ++

Re: [Qemu-devel] [Qemu-ppc] [QEMU PATCH v5 3/6] migration: extend VMStateInfo

2016-10-13 Thread Halil Pasic
On 10/13/2016 06:23 PM, Jianjun Duan wrote: > > > On 10/13/2016 03:48 AM, Halil Pasic wrote: >> >> >> On 10/13/2016 10:22 AM, Paolo Bonzini wrote: > No, I disagree. We shouldn't be worried about making intrusive changes >>> to all invocations or declarations, if that leads to a

[Qemu-devel] [PATCH 02/18] blockjob: introduce .drain callback for jobs

2016-10-13 Thread Paolo Bonzini
This is required to decouple block jobs from running in an AioContext. With multiqueue block devices, a BlockDriverState does not really belong to a single AioContext. The solution is to first wait until all I/O operations are complete; then loop in the main thread for the block job to complete

[Qemu-devel] [PATCH 18/18] aio: convert from RFifoLock to QemuRecMutex

2016-10-13 Thread Paolo Bonzini
It is simpler and a bit faster, and QEMU does not need the contention callbacks (and thus the fairness) anymore. Reviewed-by: Fam Zheng Signed-off-by: Paolo Bonzini --- async.c | 8 ++--- include/block/aio.h | 3 +-

Re: [Qemu-devel] [PATCH] target-mips: Fix Loongson pandn instruction.

2016-10-13 Thread Yongbok Kim
On 13/10/2016 03:17, Heiher wrote: > From: Heiher > > pandn FD, FS, FT > Operation: FD = ((NOT FS) AND FT) > > Signed-off-by: Heiher > Signed-off-by: Fuxin Zhang > --- > target-mips/translate.c | 4 +++- > 1 file changed, 3

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

2016-10-13 Thread Laurent Vivier
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 cpu_exec_realize() what adds it to the environment. Remove error parameter from cpu_exec_init() as it

[Qemu-devel] [PATCH v2 16/20] target-tilegx: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (not tested with QOM command as tilegx is only available in linux-user mode) CC: Chen Gang Signed-off-by: Laurent Vivier ---

[Qemu-devel] [PATCH v2 15/20] target-sparc: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "sparc-cpu") CC: Artyom Tarasenko Signed-off-by: Laurent Vivier ---

Re: [Qemu-devel] [PATCH 2/2] target-mips: Fix Loongson multimedia instructions.

2016-10-13 Thread Yongbok Kim
On 13/10/2016 08:10, Heiher wrote: > From: Heiher > > Needed to emit FPU exception on Loongson multimedia instructions > executing if Status:CU1 is clear. or FPR changes may be missed > on Linux. > > Signed-off-by: Heiher > Signed-off-by: Fuxin Zhang

[Qemu-devel] [PATCH] machine: Fix replacement of '_' by '-' in machine property names

2016-10-13 Thread Markus Armbruster
machine_set_property() replaces '_' by '-' in the property name. Except it fails to replace an initial '_'. Screwed up in commit b0ddb8b. Reproducer: "-M pc,__foo_bar=true" produces "Property '._-foo-bar' not found". Error messages using a mangled name rather than the name the user actually

Re: [Qemu-devel] [PATCH v7 00/22] qcow2: persistent dirty bitmaps

2016-10-13 Thread John Snow
On 10/01/2016 09:37 AM, Max Reitz wrote: On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote: v7: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=refs%2Ftags%2Fqcow2-bitmap-v7 based on block-next (https://github.com/XanClic/qemu/commits/block-next) It should be noted that

[Qemu-devel] [PATCH 15/18] block: only call aio_poll on the current thread's AioContext

2016-10-13 Thread Paolo Bonzini
aio_poll is not thread safe; for example bdrv_drain can hang if the last in-flight I/O operation is completed in the I/O thread after the main thread has checked bs->in_flight. The bug remains latent as long as all of it is called within aio_context_acquire/aio_context_release, but this will

[Qemu-devel] [PATCH 16/18] iothread: release AioContext around aio_poll

2016-10-13 Thread Paolo Bonzini
This is the first step towards having fine-grained critical sections in dataplane threads, which will resolve lock ordering problems between address_space_* functions (which need the BQL when doing MMIO, even after we complete RCU-based dispatch) and the AioContext. Because AioContext does not

[Qemu-devel] dpdk/vpp and cross-version migration for vhost

2016-10-13 Thread Michael S. Tsirkin
Hi! So it looks like we face a problem with cross-version migration when using vhost. It's not new but became more acute with the advent of vhost user. For users to be able to migrate between different versions of the hypervisor the interface exposed to guests by hypervisor must stay unchanged.

Re: [Qemu-devel] [PATCH v1 3/3] target-ppc: implement xxbr[qdwh] instruction

2016-10-13 Thread Richard Henderson
On 10/12/2016 07:21 PM, David Gibson wrote: +static void gen_bswap32x4(TCGv_i64 outh, TCGv_i64 outl, + TCGv_i64 inh, TCGv_i64 inl) +{ +TCGv_i64 hi = tcg_temp_new_i64(); +TCGv_i64 lo = tcg_temp_new_i64(); + +tcg_gen_bswap64_i64(hi, inh); +

[Qemu-devel] [PATCH v2 05/20] target-arm: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
Setting of cpu->mp_affinity is moved from arm_cpu_initfn() to arm_cpu_realizefn() as setting of cpu_index is now done in cpu_exec_realize(). I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided

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

2016-10-13 Thread Paolo Bonzini
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 operation on bs, e.g. a bdrv_aio_write to bs causing a

[Qemu-devel] [PATCH 09/18] nfs: use bdrv_poll_while and bdrv_wakeup

2016-10-13 Thread Paolo Bonzini
These will make it possible to use nfs_get_allocated_file_size on a file that is not in the main AioContext. Signed-off-by: Paolo Bonzini --- block/nfs.c | 47 +-- 1 file changed, 29 insertions(+), 18 deletions(-) diff --git

[Qemu-devel] [PATCH 12/18] iothread: detach all block devices before stopping them

2016-10-13 Thread Paolo Bonzini
Soon bdrv_drain will not call aio_poll itself on iothreads. If block devices are left hanging off the iothread's AioContext, there will be no one to do I/O for those poor devices. Signed-off-by: Paolo Bonzini --- iothread.c | 10 ++ 1 file changed, 10 insertions(+)

[Qemu-devel] [PATCH 08/18] nfs: move nfs_set_events out of the while loops

2016-10-13 Thread Paolo Bonzini
nfs_set_events only needs to be called once before entering the while loop; afterwards, nfs_process_read and nfs_process_write take care of it. Signed-off-by: Paolo Bonzini --- block/nfs.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[Qemu-devel] [PATCH 17/18] qemu-thread: introduce QemuRecMutex

2016-10-13 Thread Paolo Bonzini
GRecMutex is new in glib 2.32, so we cannot use it. Introduce a recursive mutex in qemu-thread instead, which will be used instead of RFifoLock. Reviewed-by: Fam Zheng Signed-off-by: Paolo Bonzini --- include/qemu/thread-posix.h | 6 ++

[Qemu-devel] [PATCH v2 04/20] target-s390: move back cpu_exec_init() to init

2016-10-13 Thread Laurent Vivier
We have now the cpu_exec_realize() in realize, so the init part must be in init. I've removed the cannot_destroy_with_object_finalize_yet field as it should be removed by commit c6644fc. (tested with QOM command provided by commit 4c315c27 with "z890.3-s390-cpu") CC: Richard Henderson

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

2016-10-13 Thread Laurent Vivier
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 ppc_cpu_unrealizefn(). CC: Bharata B Rao CC: Alexander Graf CC: qemu-...@nongnu.org

[Qemu-devel] [PATCH v2 14/20] target-sh4: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "sh7750r-superh-cpu") CC: Aurelien Jarno Signed-off-by: Laurent Vivier

[Qemu-devel] [PATCH v2 17/20] target-tricore: move cpu_exec_realize() to realize function

2016-10-13 Thread Laurent Vivier
I've removed the cannot_destroy_with_object_finalize_yet field as unsafe references have been moved to cpu_exec_realize(). (tested with QOM command provided by commit 4c315c27 with "tc1796-tricore-cpu") CC: Bastian Koppelmann Signed-off-by: Laurent Vivier

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

2016-10-13 Thread Paolo Bonzini
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-sta...@nongnu.org Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 11/18] aio: introduce qemu_get_current_aio_context

2016-10-13 Thread Paolo Bonzini
This will be used by bdrv_poll_while (and thus by bdrv_drain) to choose how to wait for I/O completion. Reviewed-by: Fam Zheng Signed-off-by: Paolo Bonzini --- include/block/aio.h | 15 +++ iothread.c | 9 +

[Qemu-devel] [PATCH 1/1] slirp: VMState conversion; tcpcb

2016-10-13 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Convert the migration of the struct tcpcb to use a VMStateDescription, the rest of it will come later. Mostly mechanical, except for conversion of some 'char' to uint8_t to ensure portability. Tested with -netdev

Re: [Qemu-devel] [PATCH] machine: Fix replacement of '_' by '-' in machine property names

2016-10-13 Thread Eric Blake
On 10/13/2016 11:44 AM, Markus Armbruster wrote: > machine_set_property() replaces '_' by '-' in the property name. > Except it fails to replace an initial '_'. Screwed up in commit > b0ddb8b. Reproducer: "-M pc,__foo_bar=true" produces "Property > '._-foo-bar' not found". > > Error messages

Re: [Qemu-devel] [PATCH 2/5] cpus: use atomic_read to read seqlock-protected variables

2016-10-13 Thread Emilio G. Cota
On Mon, Oct 10, 2016 at 15:59:04 +0200, Paolo Bonzini wrote: > There is a data race if the variable is written concurrently to the > read. In C11 this has undefined behavior. Use atomic_read. The > write side does not need atomic_set, because it is protected by a > mutex. Is tsan happy with

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

2016-10-13 Thread Stefan Weil
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. Signed-off-by: Stefan Weil --- I had problems with a

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

2016-10-13 Thread Peter Maydell
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 allowed in a macro name must be substituted, otherwise builds > will fail.

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

2016-10-13 Thread Emilio G. Cota
On Thu, Oct 13, 2016 at 03:39:55 -0400, Paolo Bonzini wrote: > > On Mon, Oct 10, 2016 at 15:59:02 +0200, Paolo Bonzini wrote: > > > See each patch. My attempt at fixing whatever I did when I obviously > > > didn't know enough^W about the C11 memory model, and at setting a > > > better example for

[Qemu-devel] [PATCH v5] timer: a9gtimer: remove loop to auto-increment comparator

2016-10-13 Thread P J P
From: Prasad J Pandit ARM A9MP processor has a peripheral timer with an auto-increment register, which holds an increment step value. A user could set this value to zero. When auto-increment control bit is enabled, it leads to an infinite loop in 'a9_gtimer_update' while

Re: [Qemu-devel] [PATCH v4] timer: a9gtimer: remove loop to auto-increment comparator

2016-10-13 Thread P J P
+-- On Thu, 13 Oct 2016, Peter Maydell wrote --+ | I suggest you try putting in some sample values for the | various variables to confirm that your new code produces the | same answers that the old code did. Yep, sent a revised patch v5. Thank you. -- Prasad J Pandit / Red Hat Product Security

Re: [Qemu-devel] [PATCH v3 0/4] target-arm: Handle tagged addresses when loading PC

2016-10-13 Thread Tom Hanson
On 10/12/2016 01:50 PM, Thomas Hanson wrote: ... > > Still looking into handling of tagged addresses for exceptions and > exception returns. Will handle that as a separate patch set. Peter, Looking at arm_cpu_do_interrupt_aarch64() and the ARM spec, the new PC value is always an offset

[Qemu-devel] [PATCH v3] usb: Change *_exitfn return type from int to void

2016-10-13 Thread Akanksha Srivastava
The *_exitfn functions cannot fail and should not be returning int. This also removes the passthru_exitfn since this callback does nothing as of now. This was suggested as a Bite-sized task for code cleanup. Signed-off-by: Akanksha Srivastava ---

Re: [Qemu-devel] [PATCH 2/4] block/ssh: Add InetSocketAddress and accept it

2016-10-13 Thread Ashijeet Acharya
On Tue, Oct 11, 2016 at 1:07 PM, Ashijeet Acharya wrote: > Add InetSocketAddress compatibility to SSH driver. > > Add a new option "server" to the SSH block driver which then accepts > a InetSocketAddress. > > "host" and "port" are supported as legacy options and are

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

2016-10-13 Thread Laurent Vivier
g3beige (pmac_oldworld) and mac99 (pmac_newworld) are missing in boot-serial-test. Perhaps because serial output of OpenBIOS is only enabled with '-nographic' Signed-off-by: Laurent Vivier --- tests/boot-serial-test.c | 4 1 file changed, 4 insertions(+) diff --git

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

2016-10-13 Thread Thomas Huth
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 because they are basically already tested with the

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

2016-10-13 Thread Michael Roth
Quoting Stefan Hajnoczi (2016-10-12 10:07:33) > On Fri, Oct 07, 2016 at 12:07:41PM -0500, Michael Roth wrote: > > Quoting Stefan Hajnoczi (2016-10-06 11:40:18) > > > Add AF_VSOCK (virtio-vsock) support as an alternative to virtio-serial. > > > > > > $ qemu-system-x86_64 -device

[Qemu-devel] [PATCH v6 02/15] nbd: Treat flags vs. command type as separate fields

2016-10-13 Thread Eric Blake
Current upstream NBD documents that requests have a 16-bit flags, followed by a 16-bit type integer; although older versions mentioned only a 32-bit field with masking to find flags. Since the protocol is in network order (big-endian over the wire), the ABI is unchanged; but dealing with the

[Qemu-devel] [PATCH v6 04/15] nbd: Rename NbdClientSession to NBDClientSession

2016-10-13 Thread Eric Blake
It's better to use consistent capitalization of the namespace used for NBD functions; we have more instances of NBD* than Nbd*. Signed-off-by: Eric Blake --- v6: new patch --- block/nbd-client.h | 6 +++--- block/nbd-client.c | 26 +- block/nbd.c

[Qemu-devel] [PATCH v6 01/15] nbd: Add qemu-nbd -D for human-readable description

2016-10-13 Thread Eric Blake
The NBD protocol allows servers to advertise a human-readable description alongside an export name during NBD_OPT_LIST. Add an option to pass through the user's string to the NBD client. Doing this also makes it easier to test commit 200650d4, which is the client counterpart of receiving the

[Qemu-devel] [PATCH v6 14/15] nbd: Implement NBD_CMD_WRITE_ZEROES on server

2016-10-13 Thread Eric Blake
Upstream NBD protocol recently added the ability to efficiently write zeroes without having to send the zeroes over the wire, along with a flag to control whether the client wants to allow a hole. Note that when it comes to requiring full allocation, vs. permitting optimizations, the NBD spec

[Qemu-devel] [PATCH v6 13/15] nbd: Improve server handling of shutdown requests

2016-10-13 Thread Eric Blake
NBD commit 6d34500b clarified how clients and servers are supposed to behave before closing a connection. It added NBD_REP_ERR_SHUTDOWN (for the server to announce it is about to go away during option haggling, so the client should quit sending NBD_OPT_* other than NBD_OPT_ABORT) and ESHUTDOWN

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

2016-10-13 Thread Jianjun Duan
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 --- hw/display/virtio-gpu.c | 6 ++-

[Qemu-devel] [PATCH v10 07/10] hbitmap: serialization

2016-10-13 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Functions to serialize / deserialize(restore) HBitmap. HBitmap should be saved to linear sequence of bits independently of endianness and bitmap array element (unsigned long) size. Therefore Little Endian is chosen. These functions

[Qemu-devel] [PATCH v10 08/10] block: BdrvDirtyBitmap serialization interface

2016-10-13 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Several functions to provide necessary access to BdrvDirtyBitmap for block-migration.c Signed-off-by: Vladimir Sementsov-Ogievskiy [Add the "finish" parameters. - Fam] Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH v6 06/15] nbd: Share common reply-sending code in server

2016-10-13 Thread Eric Blake
Rather than open-coding NBD_REP_SERVER, reuse the code we already have by adding a length parameter. Additionally, the refactoring will make adding NBD_OPT_GO in a later patch easier. Signed-off-by: Eric Blake --- v6: improve (and add) function comments v5: no change v4: no

[Qemu-devel] [PATCH v6 09/15] nbd: Let server know when client gives up negotiation

2016-10-13 Thread Eric Blake
The NBD spec says that a client should send NBD_OPT_ABORT rather than just dropping the connection, if the client doesn't like something the server sent during option negotiation. This is a best-effort attempt only, and can only be done in places where we know the server is still in sync with

[Qemu-devel] [PATCH v6 07/15] nbd: Send message along with server NBD_REP_ERR errors

2016-10-13 Thread Eric Blake
The NBD Protocol allows us to send human-readable messages along with any NBD_REP_ERR error during option negotiation; make use of this fact for clients that know what to do with our message. Signed-off-by: Eric Blake --- v6: tweak comments, fix indentation v5: don't leak

[Qemu-devel] [PATCH v6 03/15] nbd: Rename NBDRequest to NBDRequestData

2016-10-13 Thread Eric Blake
We have both 'struct NBDRequest' and 'struct nbd_request'; making it confusing to see which does what. Furthermore, we want to rename nbd_request to align with our normal CamelCase naming conventions. So, rename the struct which is used to associate the data received during request callbacks,

[Qemu-devel] [PATCH v6 11/15] nbd: Less allocation during NBD_OPT_LIST

2016-10-13 Thread Eric Blake
Since we know that the maximum name we are willing to accept is small enough to stack-allocate, rework the iteration over NBD_OPT_LIST responses to reuse a stack buffer rather than allocating every time. Furthermore, we don't even have to allocate if we know the server's length doesn't match what

[Qemu-devel] [PATCH v6 00/15] nbd: efficient write zeroes

2016-10-13 Thread Eric Blake
v5 was here, but missed 2.7 freeze: https://lists.gnu.org/archive/html/qemu-devel/2016-07/msg04053.html Since then, I've rebased the series, and the bulk of the changes were to use consistent NBDFoo CamelCase naming, as well as to improve the commit messages for questions raised on v5. Also

  1   2   3   4   >