Re: [Qemu-devel] [PATCH V5 4/9] migration: split ufd_version_check onto receive/request features part

2017-05-18 Thread Alexey
On Tue, May 16, 2017 at 11:32:51AM +0100, Dr. David Alan Gilbert wrote: > * Alexey Perevalov (a.pereva...@samsung.com) wrote: > > This modification is necessary for userfault fd features which are > > required to be requested from userspace. > > UFFD_FEATURE_THREAD_ID is a one of such "on demand"

Re: [Qemu-devel] [PATCH] xics_kvm: cache already enabled vCPU ids

2017-05-18 Thread David Gibson
On Wed, May 17, 2017 at 04:38:20PM +0200, Greg Kurz wrote: > Since commit a45863bda90d ("xics_kvm: Don't enable KVM_CAP_IRQ_XICS if > already enabled"), we were able to re-hotplug a vCPU that had been hot- > unplugged ealier, thanks to a boolean flag in ICPState that we set when > enabling

Re: [Qemu-devel] [RFC PATCH v1 6/6] spapr: Fix migration of Radix guests

2017-05-18 Thread David Gibson
On Thu, May 18, 2017 at 10:33:05AM +0530, Bharata B Rao wrote: > On Wed, May 17, 2017 at 05:20:31PM +1000, David Gibson wrote: > > On Wed, May 17, 2017 at 12:45:39PM +0530, Bharata B Rao wrote: > > > On Wed, May 17, 2017 at 05:00:49PM +1000, David Gibson wrote: > > > > On Wed, May 17, 2017 at

Re: [Qemu-devel] [RFC PATCH] target/s390x/cpu_models: Set some additional feature bits for the "qemu" CPU

2017-05-18 Thread Thomas Huth
On 18.05.2017 11:00, Christian Borntraeger wrote: > On 05/18/2017 10:48 AM, David Hildenbrand wrote: >> On 18.05.2017 03:55, Thomas Huth wrote: >>> On 17.05.2017 18:49, David Hildenbrand wrote: On 17.05.2017 17:35, Thomas Huth wrote: > Currently we only present the plain z900 feature bits

Re: [Qemu-devel] [PULL 0/7] Migration pull request

2017-05-18 Thread Stefan Hajnoczi
On Wed, May 17, 2017 at 01:13:39PM +0200, Juan Quintela wrote: > Hi > > This pull request: > - drop block capability patch (now they is being reviewed) > - add following patches that got reviewed: > * page_cache.c into migration > * postcopy stuff into postocpy-ram.c > * check_migratable

Re: [Qemu-devel] [RFC PATCH] target/s390x/cpu_models: Set some additional feature bits for the "qemu" CPU

2017-05-18 Thread Thomas Huth
On 18.05.2017 11:14, David Hildenbrand wrote: > On 18.05.2017 11:05, Thomas Huth wrote: >> On 18.05.2017 11:00, Christian Borntraeger wrote: >>> On 05/18/2017 10:48 AM, David Hildenbrand wrote: On 18.05.2017 03:55, Thomas Huth wrote: > On 17.05.2017 18:49, David Hildenbrand wrote: >>

Re: [Qemu-devel] [PULL 0/3] hmp queue

2017-05-18 Thread Stefan Hajnoczi
On Wed, May 17, 2017 at 07:07:51PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The following changes since commit cdece0467c7cf8e3f4b3c3f0b13bf2c4fea9: > > block/win32: fix 'ret not initialized' warning (2017-05-16 15:34:18 +0100) >

Re: [Qemu-devel] [PULL 00/13] pci, virtio, vhost: fixes

2017-05-18 Thread Stefan Hajnoczi
On Thu, May 18, 2017 at 12:44:59AM +0300, Michael S. Tsirkin wrote: > This includes the previous pull request which still > does not appear to be in - not rebased so merging twice > will not cause conflicts. Note that patch 08 makes checkpatch > complain, patch 9 fixes that. > > The following

Re: [Qemu-devel] [PATCH v2 0/6] gdb updates and cputlb traces

2017-05-18 Thread Stefan Hajnoczi
On Wed, May 17, 2017 at 03:52:53PM +0100, Alex Bennée wrote: > Hi, > > Here is an update to the cputlb tracing and also a number of gdbstub > updates. The main changes to the cputlb tracing are making each flush > an explicit event instead of just dumping counts. This means you can > so analysis

[Qemu-devel] [PATCH v2] gluster: add support for PREALLOC_MODE_FALLOC

2017-05-18 Thread Niels de Vos
Add missing support for "preallocation=falloc" to the Gluster block driver. This change bases its logic on that of block/file-posix.c and removed the gluster_supports_zerofill() and qemu_gluster_zerofill() functiond in favour of #ifdef checks in an easy to read switch-statement. Both

Re: [Qemu-devel] [PATCH 2/3] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()

2017-05-18 Thread Kevin Wolf
Am 17.05.2017 um 22:16 hat Eric Blake geschrieben: > On 05/17/2017 12:09 PM, Stefan Hajnoczi wrote: > > Calling aio_poll() directly may have been fine previously, but this is > > the future, man! > > lol > > > The difference between an aio_poll() loop and > > BDRV_POLL_WHILE() is that

[Qemu-devel] [PATCH 1/3] numa: consolidate cpu_preplug fixups/checks for pc/arm/spapr

2017-05-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- include/sysemu/numa.h | 1 + hw/arm/virt.c | 16 ++-- hw/i386/pc.c | 17 + hw/ppc/spapr.c| 17 + numa.c| 22 ++ 5 files changed, 27

[Qemu-devel] [PATCH 2/3] numa: move default mapping init to machine

2017-05-18 Thread Igor Mammedov
there is no need use cpu_index_to_instance_props() for setting default cpu -> node mapping. Generic machine code can do it without cpu_index by just enabling already preset defaults in possible_cpus. PS: as bonus it makes one less user of cpu_index_to_instance_props() Signed-off-by: Igor

[Qemu-devel] [PATCH 0/3] numa: code consolidation and test fixup

2017-05-18 Thread Igor Mammedov
git repo for testing: https://github.com/imammedo/qemu.git cphp_numa_cfg_follow_up_v3_cleanups_v1 CC: qemu-...@nongnu.org CC: qemu-...@nongnu.org CC: Eduardo Habkost CC: David Gibson CC: Andrew Jones Igor Mammedov (3):

[Qemu-devel] [PATCH 3/3] numa: silence incomplete mapping warning under qtest

2017-05-18 Thread Igor Mammedov
Suggested-by: Markus Armbruster Signed-off-by: Igor Mammedov --- CC: Markus Armbruster --- hw/core/machine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/core/machine.c b/hw/core/machine.c index

Re: [Qemu-devel] [PATCH 3/3] migration: avoid recursive AioContext locking in save_vmstate()

2017-05-18 Thread Kevin Wolf
Am 17.05.2017 um 19:09 hat Stefan Hajnoczi geschrieben: > AioContext was designed to allow nested acquire/release calls. It uses > a recursive mutex so callers don't need to worry about nesting...or so > we thought. > > BDRV_POLL_WHILE() is used to wait for block I/O requests. It releases > the

Re: [Qemu-devel] [Qemu-block] [PATCH 2/3] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()

2017-05-18 Thread Kevin Wolf
Am 18.05.2017 um 10:06 hat Stefan Hajnoczi geschrieben: > On Thu, May 18, 2017 at 8:57 AM, Kevin Wolf wrote: > > Am 17.05.2017 um 22:16 hat Eric Blake geschrieben: > >> On 05/17/2017 12:09 PM, Stefan Hajnoczi wrote: > >> > Calling aio_poll() directly may have been fine

Re: [Qemu-devel] [PATCH v2] .gdbinit: load QEMU sub-commands when gdb starts

2017-05-18 Thread Stefan Hajnoczi
On Wed, May 17, 2017 at 01:40:42PM +0100, Stefan Hajnoczi wrote: > The scripts/qemu-gdb.py file is not easily discoverable. Add a .gdbinit > file so GDB either loads qemu-gdb.py automatically or prints a message > informing the user how to enable them (some systems disable ./.gdbinit > loading

Re: [Qemu-devel] [RFC PATCH] target/s390x/cpu_models: Set some additional feature bits for the "qemu" CPU

2017-05-18 Thread David Hildenbrand
On 18.05.2017 11:05, Thomas Huth wrote: > On 18.05.2017 11:00, Christian Borntraeger wrote: >> On 05/18/2017 10:48 AM, David Hildenbrand wrote: >>> On 18.05.2017 03:55, Thomas Huth wrote: On 17.05.2017 18:49, David Hildenbrand wrote: > On 17.05.2017 17:35, Thomas Huth wrote: >>

Re: [Qemu-devel] [PATCH v4 2/3] net/rocker: Plug memory leak in pci_rocker_init()

2017-05-18 Thread Mao Zhongyi
Hi, Philippe Thanks for your quick review:) On 05/18/2017 01:22 AM, Philippe Mathieu-Daudé wrote: Hi Mao, On 05/17/2017 08:12 AM, Mao Zhongyi wrote: pci_rocker_init() leaks a World when the name more than 9 chars, then return a negative value directly, doesn't make a correct cleanup. So add a

Re: [Qemu-devel] [RFC 0/2] pseries: Correct behaviour change for older machine types

2017-05-18 Thread Andrea Bolognani
On Thu, 2017-05-18 at 14:51 +1000, David Gibson wrote: > > I gave it a spin and I can no longer reproduce the issue, > > so for the entire series: > > > > Tested-by: Andrea Bolognani > > I'm actually kind of astonished it worked at all given the bug that > Laurent pointed

Re: [Qemu-devel] [PATCH 3/6] vhost: Update rings information for IOTLB earlier

2017-05-18 Thread Maxime Coquelin
On 05/17/2017 06:41 PM, Michael S. Tsirkin wrote: On Fri, May 12, 2017 at 01:21:18PM +0200, Maxime Coquelin wrote: On 05/11/2017 07:33 PM, Michael S. Tsirkin wrote: On Thu, May 11, 2017 at 02:32:43PM +0200, Maxime Coquelin wrote: Vhost-kernel backend need to receive IOTLB entries for rings

Re: [Qemu-devel] [PATCH 2/3] pseries: Restore PVR negotiation logic for pre-2.9 machine types

2017-05-18 Thread Greg Kurz
On Thu, 18 May 2017 15:45:21 +1000 David Gibson wrote: > "pseries" guests go through a hypervisor<->guest feature negotiation during > early boot. Part of this is finding a CPU compatibility mode which works > for both. > > In 152ef80 "pseries: Rewrite CAS PVR

Re: [Qemu-devel] [Qemu-block] [PATCH 2/3] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()

2017-05-18 Thread Stefan Hajnoczi
On Thu, May 18, 2017 at 8:57 AM, Kevin Wolf wrote: > Am 17.05.2017 um 22:16 hat Eric Blake geschrieben: >> On 05/17/2017 12:09 PM, Stefan Hajnoczi wrote: >> > Calling aio_poll() directly may have been fine previously, but this is >> > the future, man! >> >> lol >> >> > The

Re: [Qemu-devel] [PATCH 3/3] pseries: Improve tracing of CPU compatibility negotiation

2017-05-18 Thread Greg Kurz
On Thu, 18 May 2017 15:45:22 +1000 David Gibson wrote: > This makes some improvements to the debug tracepoints around the > negotiation of CPU compatibility mode during CAS. The traces are > reorganized to emphasise what the inputs and outputs of the process are, >

Re: [Qemu-devel] [PATCH 2/2] postcopy: Require RAMBlocks that are whole pages

2017-05-18 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > "Dr. David Alan Gilbert (git)" wrote: > > From: "Dr. David Alan Gilbert" > > > > It turns out that it's legal to create a VM with RAMBlocks that aren't > > a multiple of the pagesize in use; e.g. a 1025M

Re: [Qemu-devel] [Qemu-stable] [RESEND PATCH] virtio: allow broken device to notify guest

2017-05-18 Thread Fam Zheng
On Wed, 05/17 10:17, Greg Kurz wrote: > According to section 2.1.2 of the virtio-1 specification: > > "The device SHOULD set DEVICE_NEEDS_RESET when it enters an error state that > a reset is needed. If DRIVER_OK is set, after it sets DEVICE_NEEDS_RESET, > the device MUST send a device

Re: [Qemu-devel] [RFC PATCH] target/s390x/cpu_models: Set some additional feature bits for the "qemu" CPU

2017-05-18 Thread Christian Borntraeger
On 05/18/2017 10:48 AM, David Hildenbrand wrote: > On 18.05.2017 03:55, Thomas Huth wrote: >> On 17.05.2017 18:49, David Hildenbrand wrote: >>> On 17.05.2017 17:35, Thomas Huth wrote: Currently we only present the plain z900 feature bits to the guest, but QEMU already emulates some

Re: [Qemu-devel] [PATCH V5 7/9] migration: calculate vCPU blocktime on dst side

2017-05-18 Thread Alexey
On Tue, May 16, 2017 at 12:34:16PM +0100, Dr. David Alan Gilbert wrote: > * Alexey Perevalov (a.pereva...@samsung.com) wrote: > > This patch provides blocktime calculation per vCPU, > > as a summary and as a overlapped value for all vCPUs. > > > > This approach was suggested by Peter Xu, as an

Re: [Qemu-devel] [PATCH 1/3] pseries: Split CAS PVR negotiation out into a separate function

2017-05-18 Thread Laurent Vivier
On 18/05/2017 07:45, David Gibson wrote: > Guests of the qemu machine type go through a feature negotiation process > known as "client architecture support" (CAS) during early boot. This does > a number of things, one of which is finding a CPU compatibility mode which > can be supported by both

Re: [Qemu-devel] Add Markus Armbrusters code for Broadcom Perhiperals for ARM.

2017-05-18 Thread Markus Armbruster
IANAL, this wouldn't be legal advice even if I was one, yadda, yadda, here goes anyway: Eric Blake writes: > On 05/17/2017 04:25 PM, John Bradley wrote: >> Well unfortunately Eric. I don't understand your "top posted" slang. > > To learn what top-posting is: >

Re: [Qemu-devel] [PATCH 1/3] pseries: Split CAS PVR negotiation out into a separate function

2017-05-18 Thread Greg Kurz
On Thu, 18 May 2017 15:45:20 +1000 David Gibson wrote: > Guests of the qemu machine type go through a feature negotiation process > known as "client architecture support" (CAS) during early boot. This does > a number of things, one of which is finding a CPU

Re: [Qemu-devel] [Qemu-block] [PATCH 2/3] block: use BDRV_POLL_WHILE() in bdrv_rw_vmstate()

2017-05-18 Thread Stefan Hajnoczi
On Wed, May 17, 2017 at 9:16 PM, Eric Blake wrote: > On 05/17/2017 12:09 PM, Stefan Hajnoczi wrote: >> diff --git a/block/io.c b/block/io.c >> index cc56e90..f0041cd 100644 >> --- a/block/io.c >> +++ b/block/io.c >> @@ -2031,9 +2031,7 @@ bdrv_rw_vmstate(BlockDriverState *bs,

Re: [Qemu-devel] [PATCH 2/5] 9pfs: local: resolve special directories in paths

2017-05-18 Thread Greg Kurz
On Tue, 9 May 2017 11:12:58 +0200 Greg Kurz wrote: > On Fri, 5 May 2017 11:59:15 -0500 > Eric Blake wrote: > > > On 05/05/2017 09:37 AM, Greg Kurz wrote: > > > When using the mapped-file security mode, the creds of a path /foo/bar > > > are stored in the

Re: [Qemu-devel] [PATCH 3/5] 9pfs: local: simplify file opening

2017-05-18 Thread Greg Kurz
On Tue, 9 May 2017 11:23:05 +0200 Greg Kurz wrote: > On Fri, 5 May 2017 12:01:55 -0500 > Eric Blake wrote: > > > On 05/05/2017 09:37 AM, Greg Kurz wrote: > > > All paths in the virtfs directory now start with "./" (except the virtfs > > > root itself which

Re: [Qemu-devel] [PATCH 6/6] spec/vhost-user spec: Add IOMMU support

2017-05-18 Thread Maxime Coquelin
On 05/17/2017 06:48 PM, Michael S. Tsirkin wrote: On Thu, May 11, 2017 at 02:32:46PM +0200, Maxime Coquelin wrote: This patch specifies and implements the master/slave communication to support device IOTLB in slave. The vhost_iotlb_msg structure introduced for kernel backends is re-used,

Re: [Qemu-devel] [RFC PATCH] target/s390x/cpu_models: Set some additional feature bits for the "qemu" CPU

2017-05-18 Thread David Hildenbrand
On 17.05.2017 18:26, Aurelien Jarno wrote: > On 2017-05-17 17:35, Thomas Huth wrote: >> Currently we only present the plain z900 feature bits to the guest, >> but QEMU already emulates some additional features (but not all of >> the next CPU generation, so we can not use the next CPU level as >>

Re: [Qemu-devel] [PULL 0/9] pci, virtio, vhost: fixes

2017-05-18 Thread Stefan Hajnoczi
On Wed, May 10, 2017 at 10:07:58PM +0300, Michael S. Tsirkin wrote: > The following changes since commit 76d20ea0f1b26ebd5da2f5fb2fdf3250cde887bb: > > Merge remote-tracking branch 'armbru/tags/pull-qapi-2017-05-04-v3' into > staging (2017-05-09 15:49:14 -0400) > > are available in the git

Re: [Qemu-devel] [RFC PATCH] target/s390x/cpu_models: Set some additional feature bits for the "qemu" CPU

2017-05-18 Thread Aurelien Jarno
On 2017-05-18 03:55, Thomas Huth wrote: > On 17.05.2017 18:49, David Hildenbrand wrote: > > On 17.05.2017 17:35, Thomas Huth wrote: > > 2. I would recommend to not enable STFLE for now. Why? > > > > It is/was an indication that the system is running on a z9 (and > > implicitly has the basic

Re: [Qemu-devel] [PATCH 3/3] pseries: Improve tracing of CPU compatibility negotiation

2017-05-18 Thread Laurent Vivier
On 18/05/2017 07:45, David Gibson wrote: > This makes some improvements to the debug tracepoints around the > negotiation of CPU compatibility mode during CAS. The traces are > reorganized to emphasise what the inputs and outputs of the process are, > then distinguish the internal state of the

Re: [Qemu-devel] [PATCH v3 0/5] mc146818rtc: fix Windows VM clock faster

2017-05-18 Thread Paolo Bonzini
> > Looks great. Thanks for following up quickly on the reviews. > > Paolo, if it is okay to you, could you please consider to merge this > patchset? ;) Yes, I've already queued it, but I don't have many patches so I am delaying the pull request a bit (until at least I have time to test

Re: [Qemu-devel] [RFC PATCH] target/s390x/cpu_models: Set some additional feature bits for the "qemu" CPU

2017-05-18 Thread David Hildenbrand
On 18.05.2017 03:55, Thomas Huth wrote: > On 17.05.2017 18:49, David Hildenbrand wrote: >> On 17.05.2017 17:35, Thomas Huth wrote: >>> Currently we only present the plain z900 feature bits to the guest, >>> but QEMU already emulates some additional features (but not all of >>> the next CPU

Re: [Qemu-devel] [PULL 0/9] pci, virtio, vhost: fixes

2017-05-18 Thread Stefan Hajnoczi
On Thu, May 18, 2017 at 12:40:01AM +0300, Michael S. Tsirkin wrote: > On Mon, May 15, 2017 at 04:04:33PM +0300, Michael S. Tsirkin wrote: > > On Mon, May 15, 2017 at 01:58:40PM +0100, Stefan Hajnoczi wrote: > > > On Wed, May 10, 2017 at 10:07:58PM +0300, Michael S. Tsirkin wrote: > > > > The

[Qemu-devel] [PATCH 3/4] move cpu-exec.c

2017-05-18 Thread Yang Zhong
move cpu-exec.c to ./accel/tcg/ Signed-off-by: Yang Zhong --- Makefile.objs | 1 + Makefile.target | 4 +- accel/tcg/Makefile.objs | 1 + accel/tcg/cpu-exec.c| 686 accel/tcg/trace-events | 7 +

[Qemu-devel] [PATCH 1/4] split the tcg accelerator from accel.c file

2017-05-18 Thread Yang Zhong
there are two accelerators in qemu, kvm and tcg. kvm accelerator is defined in kvm-all.c, but tcg accelerator is defined in accel.c file. we split tcg accelerator from accel.c file and create one new accel directory,which will include kvm and tcg accel files. Signed-off-by: Yang Zhong

[Qemu-devel] [PATCH 4/4] move cpu-exec-common.c

2017-05-18 Thread Yang Zhong
move cpu-exec-common.c to accel/tcg Signed-off-by: Yang Zhong --- Makefile.target | 1 - accel/tcg/Makefile.objs | 2 +- accel/tcg/cpu-exec-common.c | 82 + cpu-exec-common.c | 82

[Qemu-devel] [PATCH 1/5] hmp: Use visitor api for hmp_migrate_set_parameter()

2017-05-18 Thread Juan Quintela
We only use it for int64 at this point, I am not able to find a way to parse an int with MiB units. Signed-off-by: Juan Quintela Reviewed-by: Markus Armbruster --- hmp.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hmp.c

[Qemu-devel] [PATCH 2/4] move cputlb.c

2017-05-18 Thread Yang Zhong
move cputlb.c to accel/tcg/ Signed-off-by: Yang Zhong --- Makefile.target |2 +- accel/tcg/Makefile.objs |1 + accel/tcg/cputlb.c | 1051 +++ cputlb.c| 1051

[Qemu-devel] [PATCH 0/5] Remove old MigrationParams

2017-05-18 Thread Juan Quintela
Hi Changes from v4: - make suggested logic change by eric - remove extra space in error message - allow migrate_set_capability block off when block migration is complied off (eric request) Please review [v4] - Address Markus review * better documentation messages (thanks) * reorganize

[Qemu-devel] [PATCH 5/5] block migration: Allow compile time disable

2017-05-18 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Many users now prefer to use drive_mirror over NBD as an alternative to the older migrate -b option; drive_mirror is more complex to setup but gives you more options (e.g. only migrating some of the disks if some of them are shared). Allow the

[Qemu-devel] [PATCH 3/5] migration: Remove use of old MigrationParams

2017-05-18 Thread Juan Quintela
We have change in the previous patch to use migration capabilities for it. Notice that we continue using the old command line flags from migrate command from the time being. Remove the set_params method as now it is empty. For savevm, one can't do a: savevm -b/-i foo but now one can do:

[Qemu-devel] [PATCH 2/5] migration: Create block capability

2017-05-18 Thread Juan Quintela
Create one capability for block migration and one parameter for incremental block migration. Signed-off-by: Juan Quintela --- - address all Markus comments - use Markus and Eric text descriptions - change logic another time - improve text messages --- hmp.c

[Qemu-devel] [PATCH 4/5] migration: Remove old MigrationParams

2017-05-18 Thread Juan Quintela
Not used anymore after moving block migration to use capabilities. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: zhanghailiang Reviewed-by: Peter Xu ---

Re: [Qemu-devel] [RFC PATCH 5/8] VFIO: Add new IOTCL for PASID Table bind propagation

2017-05-18 Thread Jean-Philippe Brucker
On 17/05/17 11:27, Liu, Yi L wrote: > On Fri, May 12, 2017 at 03:58:51PM -0600, Alex Williamson wrote: >> On Wed, 26 Apr 2017 18:12:02 +0800 >> "Liu, Yi L" wrote: >>> >>> +/* IOCTL for Shared Virtual Memory Bind */ >>> +struct vfio_device_svm { >>> + __u32 argsz; >>>

[Qemu-devel] [RFC PATCH V2 2/2] msi: Handle remappable format interrupt request

2017-05-18 Thread Lan Tianyu
From: Chao Gao According to VT-d spec Interrupt Remapping and Interrupt Posting -> Interrupt Remapping -> Interrupt Request Formats On Intel 64 Platforms, fields of MSI data register have changed. This patch avoids wrongly regarding a remappable format interrupt request as an

[Qemu-devel] [RFC PATCH V2 0/2] Qemu: Add Xen vIOMMU interrupt remapping function.

2017-05-18 Thread Lan Tianyu
Change since V1: 1) Move create/destroy vIOMMU and query vIOMMU capabilities to tool stack. 2) Fix some code style issue. This patchset is to deal with MSI interrupt remapping request when guest updates MSI registers. Repo: https://github.com/lantianyu/qemu/tree/xen_viommu_rfc_v2

[Qemu-devel] [PATCH v2] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread Thomas Huth
TEST BLOCK was likely once used to execute basic memory tests, but nowadays it's just a (slow) way to clear a page. Signed-off-by: Thomas Huth --- v2: - Use DEF_HELPER_FLAGS_2 instead for DEF_HELPER_2 for returning CC value - Convert real to absolute address - Added a check

[Qemu-devel] [RFC PATCH V2 1/2] xen-pt: bind/unbind interrupt remapping format MSI

2017-05-18 Thread Lan Tianyu
From: Chao Gao If a vIOMMU is exposed to guest, guest will configure the msi to remapping format. The original code isn't suitable to the new format. A new pair bind/unbind interfaces are added for this usage. This patch recognizes this case and use new interfaces to

Re: [Qemu-devel] [PATCH] trivial: Remove unneeded ifndef in memory.h

2017-05-18 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > All the file is surounded already by #ifndef CONFIG_USER_ONLY. > > Signed-off-by: Juan Quintela Ah yes, the patch that added the inner ifndef added it to every use of exec/hwaddr.h. Reviewed-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [Qemu-block] [PATCH 08/18] throttle-groups: do not use qemu_co_enter_next

2017-05-18 Thread Alberto Garcia
On Thu 11 May 2017 04:41:58 PM CEST, Paolo Bonzini wrote: > Prepare for removing this function; always restart throttled requests > from coroutine context. This will matter when restarting throttled > requests will have to acquire a CoMutex. > > Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH 1/9] migration: Create migration/xbzrle.h

2017-05-18 Thread Peter Xu
On Wed, May 17, 2017 at 05:47:48PM +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela Reviewed-by: Peter Xu > --- > include/migration/migration.h | 4 > migration/ram.c | 1 + > migration/xbzrle.c| 2 +- >

Re: [Qemu-devel] [RFC] qmp: Return 'user_creatable' & 'hotpluggable' fields on qom-list-types

2017-05-18 Thread Markus Armbruster
Eduardo Habkost writes: > Currently there's no way for QMP clients to get a list of device types > that are really usable with -device. This information would be useful > for management software and test scripts (like the device-crash-test > script I have submitted

Re: [Qemu-devel] [PATCH 2/9] migration: Split migration/channel.c for channel operations

2017-05-18 Thread Peter Xu
On Wed, May 17, 2017 at 05:47:49PM +0200, Juan Quintela wrote: > Create an include for its exported functions. > > Signed-off-by: Juan Quintela Reviewed-by: Peter Xu > --- > include/migration/migration.h | 7 - > migration/Makefile.objs | 2

Re: [Qemu-devel] [PATCH] e1000e: Fix a bug where guest hangs upon migration

2017-05-18 Thread Dr. David Alan Gilbert
* Sameeh Jubran (sam...@daynix.com) wrote: > The bug was caused by the "receive overrun" (bit #6 of the ICR register) > interrupt > which would be triggered post migration in a heavy traffic environment. Even > though the > "receive overrun" bit (#6) is masked out by the IMS register (refer to

Re: [Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent

2017-05-18 Thread Juan Quintela
Juan Quintela wrote: > Hi Hi And I got it wrong subject. What got target independent is savevm.c ram.c needs to "cleanup" first include/exec/ram_addr.h Sorry, Juan. > > Only reason that ram.c is compiled by target is because it use > TARGET_PAGE_BITS. As we already

Re: [Qemu-devel] [PATCH 0/2] Make migration/ram.c target independent

2017-05-18 Thread Peter Xu
On Wed, May 17, 2017 at 06:08:02PM +0200, Juan Quintela wrote: > Hi > > Only reason that ram.c is compiled by target is because it use > TARGET_PAGE_BITS. As we already have a function to export > TARGET_PAGE_SIZE, do the same. > After this, we can make it target independent. > > Please,

Re: [Qemu-devel] [RFC PATCH 3/8] iommu: Introduce iommu do invalidate API function

2017-05-18 Thread Liu, Yi L
On Fri, May 12, 2017 at 03:59:24PM -0600, Alex Williamson wrote: > On Wed, 26 Apr 2017 18:12:00 +0800 > "Liu, Yi L" wrote: > Hi Alex, Pls refer to the open I mentioned in this email, I need your comments on it to prepare the formal patchset for SVM virtualization. Thx. > >

[Qemu-devel] [PATCH] trivial: Remove unneeded ifndef in memory.h

2017-05-18 Thread Juan Quintela
All the file is surounded already by #ifndef CONFIG_USER_ONLY. Signed-off-by: Juan Quintela --- include/exec/memory.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 99e0f54..6b5b953 100644 --- a/include/exec/memory.h

Re: [Qemu-devel] [RFC PATCH 5/8] VFIO: Add new IOTCL for PASID Table bind propagation

2017-05-18 Thread Liu, Yi L
On Fri, May 12, 2017 at 03:58:51PM -0600, Alex Williamson wrote: > On Wed, 26 Apr 2017 18:12:02 +0800 > "Liu, Yi L" wrote: > > > From: "Liu, Yi L" > > > > This patch adds VFIO_IOMMU_SVM_BIND_TASK for potential PASID table > > binding requests. > >

Re: [Qemu-devel] [Bug 1691379] [NEW] NetBSD evbmips64el port installation doesn't work with qemu-system-mips64el.

2017-05-18 Thread Aurelien Jarno
On 2017-05-18 04:29, Kamil Rytarowski wrote: > On 17.05.2017 19:58, Kamil Rytarowski wrote: > > On 17.05.2017 10:10, Thomas Huth wrote: > >> On 17.05.2017 09:52, Utkarsh Anand wrote: > >>> Public bug reported: > >>> > >>> I successfully installed the NetBSD evbmips64el port on gxemul but was > >>>

[Qemu-devel] [PATCH v2 1/1] s390x/css: catch section mismatch on load

2017-05-18 Thread Halil Pasic
Prior to the virtio-ccw-2.7 machine (and commit 2a79eb1a), our virtio devices residing under the virtual-css bus do not have qdev_path based migration stream identifiers (because their qdev_path is NULL). The ids are instead generated when the device is registered as a composition of the so called

[Qemu-devel] [PATCH] qcow2: add allocated-size to image specific info

2017-05-18 Thread Vladimir Sementsov-Ogievskiy
Shows, how much data qcow2 allocates in underlying file. This should be helpful on non-sparse file systems, when qemu-img info "disk size" doesn't provide this information. Signed-off-by: Vladimir Sementsov-Ogievskiy --- Hi all. Here is an allocated-size feature for

Re: [Qemu-devel] [PATCH] qcow2: add allocated-size to image specific info

2017-05-18 Thread Kevin Wolf
Am 18.05.2017 um 12:09 hat Vladimir Sementsov-Ogievskiy geschrieben: > Shows, how much data qcow2 allocates in underlying file. This should > be helpful on non-sparse file systems, when qemu-img info "disk size" > doesn't provide this information. > > Signed-off-by: Vladimir Sementsov-Ogievskiy

[Qemu-devel] [PATCH] virtio-scsi: Unset hotplug handler when unrealize

2017-05-18 Thread Fam Zheng
This matches the qbus_set_hotplug_handler in realize and is important to release the final reference to the embedded VirtIODevice so that it is properly finalized. A use-after-free is fixed with this patch, indirectly: virtio_device_instance_finalize wasn't called at hot-unplug, and the

Re: [Qemu-devel] [PATCH] virtio-scsi: Unset hotplug handler when unrealize

2017-05-18 Thread Paolo Bonzini
On 18/05/2017 12:28, Fam Zheng wrote: > Like suggested by Paolo, it seems to make sense to do this clean up in > bus_unparent, but given how confused I got when working on this bug, I'm > not confident in my reasoning about the ref count balance in other > callers. Queued this for now. Paolo

[Qemu-devel] [PATCH] altera_timer: fix incorrect memset

2017-05-18 Thread Paolo Bonzini
Use sizeof instead of ARRAY_SIZE, fixing -Wmemset-elt-size with recent GCC versions. Signed-off-by: Paolo Bonzini --- hw/timer/altera_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/timer/altera_timer.c b/hw/timer/altera_timer.c index

Re: [Qemu-devel] [RFC PATCH 4/8] iommu/vt-d: Add iommu do invalidate function

2017-05-18 Thread Liu, Yi L
On Fri, May 12, 2017 at 03:59:18PM -0600, Alex Williamson wrote: > On Wed, 26 Apr 2017 18:12:01 +0800 > "Liu, Yi L" wrote: > > > From: Jacob Pan > > > > This patch adds Intel VT-d specific function to implement > > iommu_do_invalidate API. > >

Re: [Qemu-devel] [PATCH] qcow2: add allocated-size to image specific info

2017-05-18 Thread Denis V. Lunev
On 05/18/2017 01:25 PM, Kevin Wolf wrote: > Am 18.05.2017 um 12:09 hat Vladimir Sementsov-Ogievskiy geschrieben: >> Shows, how much data qcow2 allocates in underlying file. This should >> be helpful on non-sparse file systems, when qemu-img info "disk size" >> doesn't provide this information. >>

Re: [Qemu-devel] [PATCH] e1000e: Fix a bug where guest hangs upon migration

2017-05-18 Thread Paolo Bonzini
On 18/05/2017 12:04, Dr. David Alan Gilbert wrote: > * Sameeh Jubran (sam...@daynix.com) wrote: >> The bug was caused by the "receive overrun" (bit #6 of the ICR register) >> interrupt >> which would be triggered post migration in a heavy traffic environment. Even >> though the >> "receive

Re: [Qemu-devel] [PATCH] qcow2: add allocated-size to image specific info

2017-05-18 Thread Vladimir Sementsov-Ogievskiy
18.05.2017 13:25, Kevin Wolf wrote: Am 18.05.2017 um 12:09 hat Vladimir Sementsov-Ogievskiy geschrieben: Shows, how much data qcow2 allocates in underlying file. This should be helpful on non-sparse file systems, when qemu-img info "disk size" doesn't provide this information. Signed-off-by:

Re: [Qemu-devel] [PATCH 14/17] acpi: fix s3/s4 disabled type

2017-05-18 Thread Markus Armbruster
Marc-André Lureau writes: > Use a more specific bool type. > > Signed-off-by: Marc-André Lureau Why doesn't this run afoul backward compatibility? To answer the question, we need to enumerate affected external interfaces.

Re: [Qemu-devel] [PATCH v4 4/4] fsdev: QMP interface for throttling

2017-05-18 Thread Pradeep Jagadeesh
On 5/17/2017 7:09 PM, Eric Blake wrote: On 05/17/2017 11:29 AM, Greg Kurz wrote: First point: is fsdev a Linux-only feature, or can it be compiled on BSD? If it is Linux-only, then compiling a stub for Windows will still leave BSD broken, and your #ifdef is wrong. Fixing compilation on

Re: [Qemu-devel] [PATCH 3/6] vhost: Update rings information for IOTLB earlier

2017-05-18 Thread Maxime Coquelin
Hi Michael, On 05/18/2017 09:35 AM, Maxime Coquelin wrote: On 05/17/2017 06:41 PM, Michael S. Tsirkin wrote: On Fri, May 12, 2017 at 01:21:18PM +0200, Maxime Coquelin wrote: On 05/11/2017 07:33 PM, Michael S. Tsirkin wrote: On Thu, May 11, 2017 at 02:32:43PM +0200, Maxime Coquelin wrote:

Re: [Qemu-devel] [PATCH] trivial: Remove unneeded ifndef in memory.h

2017-05-18 Thread Laurent Vivier
On 18/05/2017 12:36, Juan Quintela wrote: > All the file is surounded already by #ifndef CONFIG_USER_ONLY. > > Signed-off-by: Juan Quintela > --- > include/exec/memory.h | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/include/exec/memory.h b/include/exec/memory.h

Re: [Qemu-devel] [PATCH] qcow2: add allocated-size to image specific info

2017-05-18 Thread Denis V. Lunev
On 05/18/2017 05:54 PM, Kevin Wolf wrote: > Am 18.05.2017 um 14:22 hat Denis V. Lunev geschrieben: >> On 05/18/2017 03:10 PM, Kevin Wolf wrote: >>> Am 18.05.2017 um 13:04 hat Vladimir Sementsov-Ogievskiy geschrieben: 18.05.2017 13:25, Kevin Wolf wrote: > Am 18.05.2017 um 12:09 hat

Re: [Qemu-devel] [PATCH v2] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread Richard Henderson
On 05/18/2017 06:20 AM, Aurelien Jarno wrote: +DEF_HELPER_FLAGS_2(testblock, TCG_CALL_NO_WG, i32, env, i64) As the helper does not read any values from the global, you can even use TCG_CALL_NO_RWG. By throwing an exception, we imply a read of all values along the exception path. r~

Re: [Qemu-devel] [PATCH 3/9] migration: Export qemu-file-channel.c functions in its own file

2017-05-18 Thread Juan Quintela
"Daniel P. Berrange" wrote: > On Thu, May 18, 2017 at 04:44:08PM +0100, Dr. David Alan Gilbert wrote: >> OK, similar copyright - but slightly different problem. >> These two lines come from include/migration/qemu-file.h; >> they were both added by Daniel in a9cfeb33bb23a81.

[Qemu-devel] qemu-system-sh4 -M r2d serial is broken.

2017-05-18 Thread Rob Landley
Serial input hangs after the first character in the 4.11 kernel: http://www.spinics.net/lists/linux-sh/msg51183.html Because they enabled support for a buffer size thing QEMU doesn't emulate right: http://www.spinics.net/lists/linux-sh/msg51189.html Rob

[Qemu-devel] [PATCH 9/9] migration: migration.h was not needed

2017-05-18 Thread Juan Quintela
This files don't use any function from migration.h, so drop it. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu --- block/qed.c | 1 - hw/i386/pc_q35.c| 1 -

[Qemu-devel] [PATCH 2/9] migration: Split migration/channel.c for channel operations

2017-05-18 Thread Juan Quintela
Create an include for its exported functions. Signed-off-by: Juan Quintela --- Add proper header --- include/migration/migration.h | 7 - migration/Makefile.objs | 2 +- migration/channel.c | 69 +++

[Qemu-devel] [PULL 06/18] migration: Remove old MigrationParams

2017-05-18 Thread Juan Quintela
Not used anymore after moving block migration to use capabilities. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: zhanghailiang Reviewed-by: Peter Xu ---

[Qemu-devel] [PULL 01/18] migration: Fix non-multiple of page size migration

2017-05-18 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Unfortunately it's legal to create a VM with a RAM size that's not a multiple of the underlying host page or huge page size. Recently I'd changed things to always send host sized pages, and that breaks if we have say a 1025MB guest on 2MB

[Qemu-devel] [PATCH 11/11] migration: Move include/migration/block.h into migration/

2017-05-18 Thread Juan Quintela
All functions were internal, except blk_mig_init() that is exported in misc.h now. Signed-off-by: Juan Quintela --- include/migration/misc.h | 8 migration/block.c| 3 ++- {include/migration => migration}/block.h | 2 --

Re: [Qemu-devel] [PATCH v2] gluster: add support for PREALLOC_MODE_FALLOC

2017-05-18 Thread Jeff Cody
On Thu, May 18, 2017 at 11:54:22AM +0200, Niels de Vos wrote: > Add missing support for "preallocation=falloc" to the Gluster block > driver. This change bases its logic on that of block/file-posix.c and > removed the gluster_supports_zerofill() and qemu_gluster_zerofill() > functiond in favour of

[Qemu-devel] [PATCH 1/1] target/arm: clear PMUVER field of AA64DFR0 when vPMU=off

2017-05-18 Thread Wei Huang
The PMUv3 driver of linux kernel (in arch/arm64/kernel/perf_event.c) relies on the PMUVER field of id_aa64dfr0_el1 to decide if PMU support is present or not. This patch clears the PMUVER field under TCG mode when vPMU=off. Without it, PMUv3 will init insider guest VMs even with vPMU=off. This

[Qemu-devel] [PATCH v5 0/9] Migration mini-cleanup

2017-05-18 Thread Juan Quintela
Hi Changes from v3 Only copyright notices: included the diff to make it easier to see: - channel.{c,h} -> goes to Daniel Berrange - qemu-file-channel.h -> same one than qemu-file-channel.c I hope this is ok now. Thanks, Juan. diff --git a/migration/channel.c b/migration/channel.c index

[Qemu-devel] [PATCH 7/9] migration: Remove qemu-file.h from vmstate.h

2017-05-18 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert -- minor rearangements due to the rebase --- include/hw/hw.h | 1 + include/migration/vmstate.h | 3 --- migration/block.c | 1 + migration/colo.c| 1 +

[Qemu-devel] [PATCH 3/9] migration: Export qemu-file-channel.c functions in its own file

2017-05-18 Thread Juan Quintela
Signed-off-by: Juan Quintela --- include/migration/migration.h | 1 + include/migration/qemu-file.h | 4 migration/channel.c | 1 + migration/colo.c | 1 + migration/migration.c | 1 + migration/qemu-file-channel.c | 1 +

Re: [Qemu-devel] [Qemu-ppc] [PATCH v10] migration: spapr: migrate pending_events of spapr state

2017-05-18 Thread Michael Roth
Quoting Daniel Henrique Barboza (2017-05-17 15:31:44) > > > On 05/16/2017 09:04 AM, Daniel Henrique Barboza wrote: > > > > > > On 05/16/2017 01:25 AM, David Gibson wrote: > >> On Mon, May 15, 2017 at 10:10:52AM -0300, Daniel Henrique Barboza wrote: > >>> From: Jianjun Duan

[Qemu-devel] [PULL 03/18] hmp: Use visitor api for hmp_migrate_set_parameter()

2017-05-18 Thread Juan Quintela
We only use it for int64 at this point, I am not able to find a way to parse an int with MiB units. Signed-off-by: Juan Quintela Reviewed-by: Markus Armbruster --- hmp.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hmp.c

  1   2   3   >