Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: factor out MemoryDevice interface

2018-04-12 Thread David Hildenbrand
On 13.04.2018 05:25, David Gibson wrote: > On Thu, Apr 12, 2018 at 04:36:33PM +0200, David Hildenbrand wrote: >> On the qmp level, we already have the concept of memory devices: >> "query-memory-devices" >> Right now, we only support NVDIMM and PCDIMM. >> >> We want to map other devices later i

[Qemu-devel] Purpose of memory-backend-file.discard-data

2018-04-12 Thread Michal Privoznik
Eduardo et al, I'm looking at 11ae6ed8affdd131e and I wanted to implement libvirt support for that. But more I look at it less I understand it. My understanding it is an optimization (although not very effective one since madvise() is/should be immediately followed by munmap()). So any application

Re: [Qemu-devel] [PATCH v2 1/2 for-2.12?] qapi: Parameter gl of DisplayType now accept an enum

2018-04-12 Thread Gerd Hoffmann
On Thu, Apr 12, 2018 at 03:11:53PM +0100, Elie Tournier wrote: > Hello, > > On Tue, Apr 10, 2018 at 03:33:35PM +0200, Gerd Hoffmann wrote: > > > # @off: Disable OpenGL (default). > > Just to be sure, I have to add @ in front of all parameter, right? > > > > > > > > + # 'on'Use OpenGL, pick

Re: [Qemu-devel] [PATCH 3/4] pc-bios/s390-ccw: fix non-sequential boot entries (eckd)

2018-04-12 Thread Thomas Huth
On 10.04.2018 17:01, Collin Walling wrote: > zIPL boot menu entries can be non-sequential. Let's account > for this issue for the s390 zIPL boot menu. Since this boot > menu is actually an imitation and is not completely capable > of everything the real zIPL menu can do, let's also print a > differ

Re: [Qemu-devel] [RFC PATCH] migration: discard RAMBlocks of type ram_device

2018-04-12 Thread Kirti Wankhede
On 4/12/2018 9:53 PM, Alex Williamson wrote: > On Thu, 12 Apr 2018 15:59:24 + > "Zhang, Yulei" wrote: > >>> -Original Message- >>> From: Alex Williamson [mailto:alex.william...@redhat.com] >>> Sent: Thursday, April 12, 2018 1:55 AM >>> To: Cédric Le Goater >>> Cc: qemu-devel@nongnu

Re: [Qemu-devel] [Bug Report] vm paused after succeeding to migrate

2018-04-12 Thread linzhecheng
> -邮件原件- > 发件人: Dr. David Alan Gilbert [mailto:dgilb...@redhat.com] > 发送时间: 2018年4月12日 20:37 > 收件人: linzhecheng ; pbonz...@redhat.com > 抄送: qemu-devel@nongnu.org; wangxin (U) ; > Zhoujian (jay) ; quint...@redhat.com > 主题: Re: [Qemu-devel] [Bug Report] vm paused after succeeding to migrate

Re: [Qemu-devel] [PATCH 2/4] pc-bios/s390-ccw: fix loadparm initialization and int conversion

2018-04-12 Thread Thomas Huth
On 12.04.2018 23:04, Farhan Ali wrote: > > > On 04/12/2018 04:57 PM, Collin Walling wrote: >> On 04/12/2018 02:57 PM, Thomas Huth wrote: >>> On 10.04.2018 17:01, Collin Walling wrote: Rename the loadparm char array in main.c to loadparm_str and increase the size by one byte to account f

Re: [Qemu-devel] [PATCH v2 1/3] pc-dimm: factor out MemoryDevice interface

2018-04-12 Thread David Gibson
On Thu, Apr 12, 2018 at 04:36:33PM +0200, David Hildenbrand wrote: > On the qmp level, we already have the concept of memory devices: > "query-memory-devices" > Right now, we only support NVDIMM and PCDIMM. > > We want to map other devices later into the address space of the guest. > Such devi

[Qemu-devel] [PATCH] vhost: do not verify ring mappings when IOMMU is enabled

2018-04-12 Thread Jason Wang
When IOMMU is enabled, we store virtqueue metadata as iova (though it may has _phys suffix) and access them through dma helpers. Any translation failures could be reported by IOMMU. In this case, trying to validate iova against gpa won't work and will cause a false error reporting. So this patch b

[Qemu-devel] [Bug 1763536] [NEW] go build fails under qemu-ppc64le-static (qemu-user)

2018-04-12 Thread David Wilder
Public bug reported: I am using qemu-user (built static) in a docker container environment. When running multi-threaded go commands in the container (go build for example) the process may hang, report segfaults or other errors. I built qemu-ppc64le from the upstream git (master). I see the probl

Re: [Qemu-devel] [PATCH 2/4] pc-bios/s390-ccw: fix loadparm initialization and int conversion

2018-04-12 Thread Farhan Ali
On 04/12/2018 04:57 PM, Collin Walling wrote: On 04/12/2018 02:57 PM, Thomas Huth wrote: On 10.04.2018 17:01, Collin Walling wrote: Rename the loadparm char array in main.c to loadparm_str and increase the size by one byte to account for a null termination when converting the loadparm string

Re: [Qemu-devel] [PATCH 2/4] pc-bios/s390-ccw: fix loadparm initialization and int conversion

2018-04-12 Thread Collin Walling
On 04/12/2018 02:57 PM, Thomas Huth wrote: > On 10.04.2018 17:01, Collin Walling wrote: >> Rename the loadparm char array in main.c to loadparm_str and >> increase the size by one byte to account for a null termination >> when converting the loadparm string to an int via atoui. Also >> allow the b

Re: [Qemu-devel] [PULL, 08/36] qapi: Remove qobject_to_X() functions

2018-04-12 Thread Eric Blake
On 04/12/2018 12:51 PM, Yuval Shaia wrote: > Hi Eric, > > On Mon, Mar 12, 2018 at 01:35:59PM -0500, Eric Blake wrote: >> From: Max Reitz >> >> They are no longer needed now. > > I'm doing some off-list development which use these functions. > Unfortunately i'm not subscribed (yet) to qemu-devel

Re: [Qemu-devel] [PATCH RFC] s390x: refactor reset/reipl handling

2018-04-12 Thread Paolo Bonzini
On 12/04/2018 21:26, David Hildenbrand wrote: > Calling pause_all_vcpus()/resume_all_vcpus() from a VCPU thread might > not be the best idea. As pause_all_vcpus() temporarily drops the qemu > mutex, two parallel calls to pause_all_vcpus() can be active at a time, > resulting in a deadlock. (either

Re: [Qemu-devel] [PATCH 07/19] block: Really pause block jobs on drain

2018-04-12 Thread Paolo Bonzini
On 12/04/2018 16:25, Kevin Wolf wrote: > This is already the order we have there. What is probably different from > what you envision is that after the parents have concluded, we still > check that they are still quiescent in every iteration. Yes, and that's the quadratic part. > What we could do

Re: [Qemu-devel] Bad icount read when running qemu-system-ppc64 and mfspr atbu guest instruction

2018-04-12 Thread Richard Henderson
On 04/11/2018 04:37 PM, Darrell Leinwand wrote: > Ah I see, that makes sense and the atb instructions are marked as unused in the mainline which when I compared I recall now that we modifed them because the guest software we are running is trying to use those special registers. > > I added the wra

Re: [Qemu-devel] [PATCH v3 00/22] More fully implement ARM PMUv3

2018-04-12 Thread Aaron Lindsay
On Apr 12 18:32, Peter Maydell wrote: > On 16 March 2018 at 20:30, Aaron Lindsay wrote: > > The ARM PMU implementation currently contains a basic cycle counter, but it > > is > > often useful to gather counts of other events and filter them based on > > execution mode. These patches flesh out the

[Qemu-devel] [PATCH RFC] s390x: refactor reset/reipl handling

2018-04-12 Thread David Hildenbrand
Calling pause_all_vcpus()/resume_all_vcpus() from a VCPU thread might not be the best idea. As pause_all_vcpus() temporarily drops the qemu mutex, two parallel calls to pause_all_vcpus() can be active at a time, resulting in a deadlock. (either by two VCPUs or by the main thread and a VCPU) Let's

Re: [Qemu-devel] [PATCH 4/5] migration: fix qemu carsh when RDMA live migration

2018-04-12 Thread Dr. David Alan Gilbert
* 858585 jemmy (jemmy858...@gmail.com) wrote: > On Thu, Apr 12, 2018 at 12:43 AM, Dr. David Alan Gilbert > wrote: > > * Lidong Chen (jemmy858...@gmail.com) wrote: > >> After postcopy, the destination qemu work in the dedicated > >> thread, so only invoke yield_until_fd_readable before postcopy > >

Re: [Qemu-devel] [PATCH 2/4] pc-bios/s390-ccw: fix loadparm initialization and int conversion

2018-04-12 Thread Thomas Huth
On 10.04.2018 17:01, Collin Walling wrote: > Rename the loadparm char array in main.c to loadparm_str and > increase the size by one byte to account for a null termination > when converting the loadparm string to an int via atoui. Also > allow the boot menu to be enabled when loadparm is set to an

Re: [Qemu-devel] [PATCH 5/5] migration: disable RDMA WRITR after postcopy started.

2018-04-12 Thread Dr. David Alan Gilbert
* 858585 jemmy (jemmy858...@gmail.com) wrote: > On Wed, Apr 11, 2018 at 11:56 PM, Dr. David Alan Gilbert > wrote: > > * Lidong Chen (jemmy858...@gmail.com) wrote: > >> RDMA write operations are performed with no notification to the destination > >> qemu, then the destination qemu can not wakeup. S

Re: [Qemu-devel] [PATCH] block/gluster: defend on legacy ftruncate api use

2018-04-12 Thread Niels de Vos
On Thu, Apr 12, 2018 at 11:21:42AM -0500, Eric Blake wrote: > n 04/12/2018 08:31 AM, Niels de Vos wrote: > > This change looks good to me, but a commit message would have been > > helpful. I suggest something like this: > > > > Gluster 4.0 changed the signature of glfs_ftruncate(). The function

Re: [Qemu-devel] [PATCH 1/4] pc-bios/s390-ccw: rename MAX_TABLE_ENTRIES to MAX_BOOT_ENTRIES

2018-04-12 Thread Thomas Huth
On 10.04.2018 17:01, Collin Walling wrote: > The MAX_TABLE_ENTRIES constant has a name that is too generic. As we > want to declare a limit for boot menu entries, let's rename it to a more > fitting MAX_BOOT_ENTRIES and set its value to 31 (30 boot entries and > 1 default entry). Also we move it fr

Re: [Qemu-devel] [Qemu-arm] [PATCH for-2.13 3/4] arm: always start from first_cpu when registering loader cpu reset callback

2018-04-12 Thread Peter Maydell
On 12 April 2018 at 17:40, Igor Mammedov wrote: > if arm_load_kernel() were passed non first_cpu, QEMU would end up > with partially set do_cpu_reset() callback leaving some CPUs without it. > > Make sure that do_cpu_reset() is registered for all CPUs by enumerating > CPUs from first_cpu. > > Sign

Re: [Qemu-devel] [PATCH for-2.13 1/4] arm: reuse arm_boot_address_space() in armv7m_load_kernel()

2018-04-12 Thread Peter Maydell
On 12 April 2018 at 17:40, Igor Mammedov wrote: > reduce code duplication by resusing arm_boot_address_space() > > Signed-off-by: Igor Mammedov > --- > include/hw/arm/arm.h | 2 ++ > hw/arm/armv7m.c | 10 +- > hw/arm/boot.c| 16 > 3 files changed, 11 insert

Re: [Qemu-devel] [PATCH 04/14] timer: ds1338 clarify HOUR handling

2018-04-12 Thread Peter Maydell
On 24 March 2018 at 19:24, Michael Davidsaver wrote: > Simplify and comment the translation between > registers and struct tm. > > Signed-off-by: Michael Davidsaver > --- > hw/timer/ds1338.c | 35 +-- > 1 file changed, 17 insertions(+), 18 deletions(-) > > diff --

Re: [Qemu-devel] [PATCH 03/14] timer: ds1338 persist 12-hour mode selection

2018-04-12 Thread Peter Maydell
On 24 March 2018 at 19:24, Michael Davidsaver wrote: > Need to save HOUR[HOUR12] bit to keep > track of guest selection of 12-hour mode. > Write through current time registers to > achieve this. Will be overwritten > by the next read/latch. > > Signed-off-by: Michael Davidsaver > --- > hw/timer

Re: [Qemu-devel] [PATCH 02/14] timer: ds1338 use registerfields.h

2018-04-12 Thread Peter Maydell
On 24 March 2018 at 19:24, Michael Davidsaver wrote: > Use names for registers and bits except > for R_CTRL which will be dealt with later, > and isn't modeled anyway. > > Signed-off-by: Michael Davidsaver > --- > hw/timer/ds1338.c | 84 > ++-

Re: [Qemu-devel] [PULL, 08/36] qapi: Remove qobject_to_X() functions

2018-04-12 Thread Yuval Shaia
Hi Eric, On Mon, Mar 12, 2018 at 01:35:59PM -0500, Eric Blake wrote: > From: Max Reitz > > They are no longer needed now. I'm doing some off-list development which use these functions. Unfortunately i'm not subscribed (yet) to qemu-devel so obviously missed this email. Is there any alternative

Re: [Qemu-devel] [PATCH v1] s390x/kvm: cleanup calls to cpu_synchronize_state()

2018-04-12 Thread Thomas Huth
On 12.04.2018 11:35, David Hildenbrand wrote: > We have a call to cpu_synchronize_state() on every kvm_arch_handle_exit(). > > Let's remove the ones that are no longer needed. > > Remaining places (for s390x) are in > - target/s390x/sigp.c, on the target CPU > - target/s390x/cpu.c:s390_cpu_get_cr

Re: [Qemu-devel] [PATCH v3 12/22] target/arm: Filter cycle counter based on PMCCFILTR_EL0

2018-04-12 Thread Aaron Lindsay
On Apr 12 18:15, Peter Maydell wrote: > On 16 March 2018 at 20:31, Aaron Lindsay wrote: > > The pmu_counter_filtered and pmu_op_start/finish functions are generic > > (as opposed to PMCCNTR-specific) to allow for the implementation of > > other events. > > > > Signed-off-by: Aaron Lindsay > > ---

Re: [Qemu-devel] [PATCH v3 00/22] More fully implement ARM PMUv3

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:30, Aaron Lindsay wrote: > The ARM PMU implementation currently contains a basic cycle counter, but it is > often useful to gather counts of other events and filter them based on > execution mode. These patches flesh out the implementations of various PMU > registers includi

Re: [Qemu-devel] [PATCH v3 17/22] target/arm: Split arm_ccnt_enabled into generic pmu_counter_enabled

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > Signed-off-by: Aaron Lindsay > Reviewed-by: Peter Maydell > --- > target/arm/helper.c | 11 --- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/target/arm/helper.c b/target/arm/helper.c > index f5e800e..2073d56 100644

Re: [Qemu-devel] [PATCH v3 16/22] target/arm: Implement PMOVSSET

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > Adding an array for v7VE+ CP registers was necessary so that PMOVSSET > wasn't defined for all v7 processors. > > Signed-off-by: Aaron Lindsay > --- > target/arm/helper.c | 32 +++- > 1 file changed, 31 insertions(+),

Re: [Qemu-devel] [PATCH v3 10/22] target/arm: Allow EL change hooks to do IO

2018-04-12 Thread Peter Maydell
On 12 April 2018 at 18:08, Aaron Lindsay wrote: > On Apr 12 17:53, Peter Maydell wrote: >> On 16 March 2018 at 20:31, Aaron Lindsay wrote: >> > During code generation, surround CPSR writes and exception returns which >> > call the EL change hooks with gen_io_start/end. The immediate need is >> >

Re: [Qemu-devel] [PATCH v3 09/22] target/arm: Add pre-EL change hooks

2018-04-12 Thread Peter Maydell
On 12 April 2018 at 18:01, Aaron Lindsay wrote: > On Apr 12 17:49, Peter Maydell wrote: >> Do we make the guarantee that if we call the pre-change hook >> then we will definitely subsequently call the post-change hook? >> (ie does the PMU hook rely on that?) > > Yes, the PMU relies on the pre- and

Re: [Qemu-devel] [PATCH v3 15/22] target/arm: Add ARM_FEATURE_V7VE for v7 Virtualization Extensions

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > Signed-off-by: Aaron Lindsay > --- > target/arm/cpu.c | 3 +++ > target/arm/cpu.h | 1 + > 2 files changed, 4 insertions(+) > > diff --git a/target/arm/cpu.c b/target/arm/cpu.c > index b0d032c..e544f1d 100644 > --- a/target/arm/cpu.c > +++ b/targ

[Qemu-devel] [PATCH v3] RFC: target/arm: Send interrupts on PMU counter overflow

2018-04-12 Thread Aaron Lindsay
On Mar 16 16:30, Aaron Lindsay wrote: > I aim to eventually add raising interrupts on counter overflow, but that is > not > covered by this patchset. I think I have a reasonable grasp of the mechanics > of > *how* to raise them, but am curious if anyone has thoughts on how to determine > *when* t

Re: [Qemu-devel] [PATCH v3 12/22] target/arm: Filter cycle counter based on PMCCFILTR_EL0

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > The pmu_counter_filtered and pmu_op_start/finish functions are generic > (as opposed to PMCCNTR-specific) to allow for the implementation of > other events. > > Signed-off-by: Aaron Lindsay > --- > target/arm/cpu.c| 3 ++ > target/arm/cpu.h

Re: [Qemu-devel] [PATCH v3 10/22] target/arm: Allow EL change hooks to do IO

2018-04-12 Thread Aaron Lindsay
On Apr 12 17:53, Peter Maydell wrote: > On 16 March 2018 at 20:31, Aaron Lindsay wrote: > > During code generation, surround CPSR writes and exception returns which > > call the EL change hooks with gen_io_start/end. The immediate need is > > for the PMU to access the clock and icount during EL ch

[Qemu-devel] [RFC] Intermediate block mirroring

2018-04-12 Thread Alberto Garcia
Hello, I mentioned this some time ago, but I'd like to retake it now: I'm checking how to copy arbitrary nodes on a backing chain, so if I have e.g. [A] <- [B] <- [C] <- [D] I'd like to end up with [A] <- [E] <- [C] <- [D] where [E] is a copy of [B]. The most obvious use case is to move

Re: [Qemu-devel] [PATCH v3 09/22] target/arm: Add pre-EL change hooks

2018-04-12 Thread Aaron Lindsay
On Apr 12 17:49, Peter Maydell wrote: > On 16 March 2018 at 20:31, Aaron Lindsay wrote: > > Because the design of the PMU requires that the counter values be > > converted between their delta and guest-visible forms for mode > > filtering, an additional hook which occurs before the EL is changed i

Re: [Qemu-devel] [PATCH v3 04/22] target/arm: Treat PMCCNTR as alias of PMCCNTR_EL0

2018-04-12 Thread Aaron Lindsay
On Apr 12 17:10, Peter Maydell wrote: > On 16 March 2018 at 20:31, Aaron Lindsay wrote: > > They share the same underlying state > > > > Signed-off-by: Aaron Lindsay > > --- > > target/arm/helper.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/target/arm/helper.c

Re: [Qemu-devel] [PATCH v3 10/22] target/arm: Allow EL change hooks to do IO

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > During code generation, surround CPSR writes and exception returns which > call the EL change hooks with gen_io_start/end. The immediate need is > for the PMU to access the clock and icount during EL change to support > mode filtering. > > Signed-o

Re: [Qemu-devel] [PATCH v3 09/22] target/arm: Add pre-EL change hooks

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > Because the design of the PMU requires that the counter values be > converted between their delta and guest-visible forms for mode > filtering, an additional hook which occurs before the EL is changed is > necessary. > > Signed-off-by: Aaron Lindsa

Re: [Qemu-devel] [PATCH v3 11/22] target/arm: Fix bitmask for PMCCFILTR writes

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > It was shifted to the left one bit too few. > > Signed-off-by: Aaron Lindsay > --- > target/arm/helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/arm/helper.c b/target/arm/helper.c > index 50eaed7..0102357 1

[Qemu-devel] [PATCH for-2.13 4/4] arm/boot: split load_dtb() from arm_load_kernel()

2018-04-12 Thread Igor Mammedov
load_dtb() depends on arm_load_kernel() to figure out place in RAM where it should be loaded, but it's not required for arm_load_kernel() to work. Sometimes it's neccesary for devices added with -device/device_add to be enumerated in DTB as well, which's lead to [1] and surrounding commits to add 2

[Qemu-devel] [PATCH for-2.13 2/4] platform-bus-device: use device plug callback instead of machine_done notifier

2018-04-12 Thread Igor Mammedov
platform-bus were using machine_done notifier to get and map (assign irq/mmio resources) dynamically added sysbus devices after all '-device' options had been processed. That however creates non obvious dependencies on ordering of machine_done notifiers and requires carefull line juggling to keep i

[Qemu-devel] [PATCH for-2.13 1/4] arm: reuse arm_boot_address_space() in armv7m_load_kernel()

2018-04-12 Thread Igor Mammedov
reduce code duplication by resusing arm_boot_address_space() Signed-off-by: Igor Mammedov --- include/hw/arm/arm.h | 2 ++ hw/arm/armv7m.c | 10 +- hw/arm/boot.c| 16 3 files changed, 11 insertions(+), 17 deletions(-) diff --git a/include/hw/arm/arm.h b/in

[Qemu-devel] [PATCH for-2.13 3/4] arm: always start from first_cpu when registering loader cpu reset callback

2018-04-12 Thread Igor Mammedov
if arm_load_kernel() were passed non first_cpu, QEMU would end up with partially set do_cpu_reset() callback leaving some CPUs without it. Make sure that do_cpu_reset() is registered for all CPUs by enumerating CPUs from first_cpu. Signed-off-by: Igor Mammedov --- hw/arm/boot.c | 2 +- 1 file c

[Qemu-devel] [PATCH for-2.13 0/4] arm: isolate and clean up dtb generation

2018-04-12 Thread Igor Mammedov
While working on cpu hotplug for mach-virt, I've noticed that DTB is generated incrementally across whole machvirt_init(). While it's fine for machines with static DTB, it won't really work in case of cpu hotplug and followed up reset since machine will load old DTB that doesn't account for hotplu

Re: [Qemu-devel] [PATCH v3 08/22] target/arm: Support multiple EL change hooks

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > Signed-off-by: Aaron Lindsay > --- > target/arm/cpu.c | 15 ++- > target/arm/cpu.h | 23 --- > target/arm/internals.h | 7 --- > 3 files changed, 26 insertions(+), 19 deletions(-) > > diff --git a/

Re: [Qemu-devel] [PATCH v3 07/22] target/arm: Fetch GICv3 state directly from CPUARMState

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > This eliminates the need for fetching it from el_change_hook_opaque, and > allows for supporting multiple el_change_hooks without having to hack > something together to find the registered opaque belonging to GICv3. > > Signed-off-by: Aaron Lindsay

Re: [Qemu-devel] [PATCH v3 06/22] target/arm: Mask PMU register writes based on PMCR_EL0.N

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > This is in preparation for enabling counters other than PMCCNTR > > Signed-off-by: Aaron Lindsay > --- > target/arm/helper.c | 24 +++- > 1 file changed, 15 insertions(+), 9 deletions(-) > > diff --git a/target/arm/helper.c b/

Re: [Qemu-devel] [RFC PATCH] migration: discard RAMBlocks of type ram_device

2018-04-12 Thread Alex Williamson
On Thu, 12 Apr 2018 15:59:24 + "Zhang, Yulei" wrote: > > -Original Message- > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Thursday, April 12, 2018 1:55 AM > > To: Cédric Le Goater > > Cc: qemu-devel@nongnu.org; Juan Quintela ; Dr . > > David Alan Gilbert ; D

Re: [Qemu-devel] [PATCH] block/gluster: defend on legacy ftruncate api use

2018-04-12 Thread Eric Blake
n 04/12/2018 08:31 AM, Niels de Vos wrote: > This change looks good to me, but a commit message would have been > helpful. I suggest something like this: > > Gluster 4.0 changed the signature of glfs_ftruncate(). The function > now has two additional arguments, namely prestat and poststat. The

Re: [Qemu-devel] [PATCH v3 05/22] target/arm: Reorganize PMCCNTR read, write, sync

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > pmccntr_read and pmccntr_write contained duplicate code that was already > being handled by pmccntr_sync. Split pmccntr_sync into pmccntr_op_start > and pmccntr_op_finish, passing the clock value between the two, to avoid > losing time between the

Re: [Qemu-devel] [PATCH v3 04/22] target/arm: Treat PMCCNTR as alias of PMCCNTR_EL0

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > They share the same underlying state > > Signed-off-by: Aaron Lindsay > --- > target/arm/helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/arm/helper.c b/target/arm/helper.c > index 5e48982..5634561 100644 >

Re: [Qemu-devel] [PATCH v3 02/22] target/arm: A15 PMCEID0 initialization style nit

2018-04-12 Thread Peter Maydell
On 16 March 2018 at 20:31, Aaron Lindsay wrote: > Signed-off-by: Aaron Lindsay > --- > target/arm/cpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/arm/cpu.c b/target/arm/cpu.c > index 022d8c5..072cbbf 100644 > --- a/target/arm/cpu.c > +++ b/target/arm/cpu.c >

Re: [Qemu-devel] [RFC PATCH] migration: discard RAMBlocks of type ram_device

2018-04-12 Thread Zhang, Yulei
> -Original Message- > From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Thursday, April 12, 2018 1:55 AM > To: Cédric Le Goater > Cc: qemu-devel@nongnu.org; Juan Quintela ; Dr . > David Alan Gilbert ; David Gibson > ; Zhang, Yulei ; Tian, > Kevin ; joonas.lahti...@linux.

Re: [Qemu-devel] [RFC PATCH V4 4/4] vifo: introduce new VFIO ioctl VFIO_IOMMU_GET_DIRTY_BITMAP

2018-04-12 Thread Eric Blake
On 04/10/2018 01:03 AM, Yulei Zhang wrote: > New VFIO ioctl VFIO_IOMMU_GET_DIRTY_BITMAP is used to fetch the > bitmap of pinned memory in iommu container, we need copy those > memory to the target during the migration as they are dirtied by > mdev devices. [meta-comment] This patch, and the other

Re: [Qemu-devel] Withdrawn: Tweak the NBD_OPT_SET_META_CONTEXT layout

2018-04-12 Thread Eric Blake
On 03/31/2018 07:24 AM, Eric Blake wrote: > As mentioned in earlier email threads, I experimented with an > alternative layout to the structs sent across the wire during > NBD_OPT_{LIST,SET}_META_CONTEXT, on the grounds that having the > namespace and leaf-name combined into one string that require

Re: [Qemu-devel] [PATCH v3 6/7] s390x/kvm: handle AP instruction interception

2018-04-12 Thread Tony Krowiak
On 04/11/2018 09:50 AM, Halil Pasic wrote: On 04/11/2018 03:20 PM, Tony Krowiak wrote: I may be all wrong, though... can we at least have a translation of ECA.28 and EECA.28 (the "ap is there" bit and the "ap instructions are interpreted" bit?) I think we have a misunderstanding here. I w

Re: [Qemu-devel] [PATCH v3 6/7] s390x/kvm: handle AP instruction interception

2018-04-12 Thread Tony Krowiak
On 04/09/2018 05:32 AM, Cornelia Huck wrote: On Fri, 6 Apr 2018 18:07:56 +0200 Halil Pasic wrote: On 04/05/2018 06:38 PM, Tony Krowiak wrote: On 04/03/2018 05:36 AM, Cornelia Huck wrote: On Mon, 2 Apr 2018 12:36:27 -0400 Tony Krowiak wrote: On 03/26/2018 05:03 AM, Pierre Morel wrote: O

Re: [Qemu-devel] [PATCH v3] monitor: let cur_mon be per-thread

2018-04-12 Thread Eric Blake
On 04/12/2018 01:11 AM, Peter Xu wrote: > In the future the monitor iothread may be accessing the cur_mon as > well (via monitor_qmp_dispatch_one()). Before we introduce a real > Out-Of-Band command, let's convert the cur_mon variable to be a > per-thread variable to make sure there won't be a rac

Re: [Qemu-devel] [PATCH v2 1/2 for-2.12?] qapi: Parameter gl of DisplayType now accept an enum

2018-04-12 Thread Eric Blake
On 04/12/2018 09:11 AM, Elie Tournier wrote: > Hello, > > On Tue, Apr 10, 2018 at 03:33:35PM +0200, Gerd Hoffmann wrote: >>> # @off: Disable OpenGL (default). > > Just to be sure, I have to add @ in front of all parameter, right? Yes. >>> You may be in luck - there is no instance of 'window-cl

Re: [Qemu-devel] [PATCH] migration: discard RAMBlocks of type ram_device

2018-04-12 Thread Cédric Le Goater
On 04/12/2018 04:11 PM, Paolo Bonzini wrote: > On 12/04/2018 15:51, Peter Maydell wrote: >> Paolo may have an opinion what the API here should be, but >> at the MemoryRegion level we already have a mix of functions >> memory_region_init_foo_nomigrate() and memory_region_init_foo(), >> which at the

[Qemu-devel] [PATCH v3 6/6] vhost-user: support registering external host notifiers

2018-04-12 Thread Tiwei Bie
This patch introduces VHOST_USER_PROTOCOL_F_HOST_NOTIFIER. With this feature negotiated, vhost-user backend can register memory region based host notifiers. And it will allow the guest driver in the VM to notify the hardware accelerator at the vhost-user backend directly. Signed-off-by: Tiwei Bie

Re: [Qemu-devel] [PATCH] migration: discard RAMBlocks of type ram_device

2018-04-12 Thread Eric Blake
On 04/12/2018 06:47 AM, Peter Maydell wrote: >> /* >> + * Identifies RAM blocks which should be discarded from migration. For >> + * the moment, it only applies to blocks backed by a 'ram_device' >> + * memory region. >> + */ >> +static inline bool ram_block_is_migratable(RAMBlock *block) >> +{ >

[Qemu-devel] [PATCH v3 3/6] vhost-user: support receiving file descriptors in slave_read

2018-04-12 Thread Tiwei Bie
Signed-off-by: Tiwei Bie --- hw/virtio/vhost-user.c | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index 91edd95453..9cea2c8c51 100644 --- a/hw/virtio/vhost-user.c +++ b/hw/virtio/vhost-

[Qemu-devel] [PATCH v3 5/6] vhost: allow backends to filter memory sections

2018-04-12 Thread Tiwei Bie
This patch introduces a vhost op for vhost backends to allow them to filter the memory sections that they can handle. Signed-off-by: Tiwei Bie --- hw/virtio/vhost-user.c| 11 +++ hw/virtio/vhost.c | 9 +++-- include/hw/virtio/vhost-backend.h | 4 3

[Qemu-devel] [PATCH v3 2/6] vhost-user: introduce shared vhost-user state

2018-04-12 Thread Tiwei Bie
When multi queue is enabled e.g. for a virtio-net device, each queue pair will have a vhost_dev, and the only thing shared between vhost devs currently is the chardev. This patch introduces a vhost-user state structure which will be shared by all vhost devs of the same virtio device. Signed-off-by

[Qemu-devel] [PATCH v3 4/6] virtio: support setting memory region based host notifier

2018-04-12 Thread Tiwei Bie
This patch introduces the support for setting memory region based host notifiers for virtio device. This is helpful when using a hardware accelerator for a virtio device, because hardware heavily depends on the notification, this will allow the guest driver in the VM to notify the hardware directly

[Qemu-devel] [PATCH v3 0/6] Extend vhost-user to support registering external host notifiers

2018-04-12 Thread Tiwei Bie
The original subject is: Extend vhost-user to support VFIO based accelerators Update notes Now, this patch set just focuses on adding the support for registering memory region based host notifiers. With this support, guest driver in the VM will be able to notify the hardware device a

[Qemu-devel] [PATCH v3 1/6] vhost-user: add Net prefix to internal state structure

2018-04-12 Thread Tiwei Bie
We are going to introduce a shared vhost user state which will be named as 'VhostUserState'. So add 'Net' prefix to the existing internal state structure in the vhost-user netdev to avoid conflict. Signed-off-by: Tiwei Bie --- net/vhost-user.c | 38 +++--- 1 file

[Qemu-devel] [Bug 1761401] Re: ARM/Neon: vcvt rounding error

2018-04-12 Thread Christophe Lyon
I updated my QEMU git tree such that it includes commit bd49e6027cbc207c, and the test now passes. Thanks for the prompt fix! ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. h

Re: [Qemu-devel] [PATCH v3 35/38] console: make screendump asynchronous

2018-04-12 Thread Dr. David Alan Gilbert
* Marc-André Lureau (marcandre.lur...@redhat.com) wrote: > Make screendump asynchronous to provide correct screendumps. > > HMP doesn't have async support, so it has to remain synchronous and > potentially incorrect to avoid potential races. > > Fixes: > https://bugzilla.redhat.com/show_bug.cgi?i

[Qemu-devel] [PATCH v2 2/3] machine: make MemoryHotplugState accessible via the machine

2018-04-12 Thread David Hildenbrand
Let's allow to query the MemoryHotplugState from the machine. This allows us to generically detect if a certain machine has support for memory devices, and to generically manage it (find free address range, plug/unplug a memory region). Signed-off-by: David Hildenbrand --- hw/i386/pc.c

[Qemu-devel] [PATCH v2 3/3] pc-dimm: factor out address space logic into MemoryDevice code

2018-04-12 Thread David Hildenbrand
To be able to reuse MemoryDevice logic from other devices besides pc-dimm, factor the relevant stuff out into the MemoryDevice code. As we don't care about slots for memory devices that are not pc-dimm, don't factor that part out. Most of this patch just moves checks and logic around. While at it

[Qemu-devel] [PATCH v2 0/3] pc-dimm: factor out MemoryDevice

2018-04-12 Thread David Hildenbrand
Right now we can only map PCDIMM/NVDIMM into guest address space. In the future, we might want to do the same for virtio devices - e.g. virtio-pmem or virtio-mem. Especially, they should be able to live side by side to each other. E.g. the virto based memory devices regions will not be exposed via

[Qemu-devel] [PATCH v2 1/3] pc-dimm: factor out MemoryDevice interface

2018-04-12 Thread David Hildenbrand
On the qmp level, we already have the concept of memory devices: "query-memory-devices" Right now, we only support NVDIMM and PCDIMM. We want to map other devices later into the address space of the guest. Such device could e.g. be virtio devices. These devices will have a guest memory range a

Re: [Qemu-devel] [PATCH v1 04/24] Makefile: Rename TARGET_DIRS to TARGET_LIST

2018-04-12 Thread Philippe Mathieu-Daudé
On 04/10/2018 04:38 PM, Alex Bennée wrote: > From: Fam Zheng > > To be more accurate on its purpose and make code that looks for a certain > target out of this variable more readable. > > Signed-off-by: Fam Zheng Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé > --- >

[Qemu-devel] buffer sharing across VMs - xen-zcopy and hyper_dmabuf discussion

2018-04-12 Thread Dongwon Kim
(changed subject and decoupling from udmabuf thread) On Wed, Apr 11, 2018 at 08:59:32AM +0300, Oleksandr Andrushchenko wrote: > On 04/10/2018 08:26 PM, Dongwon Kim wrote: > >On Tue, Apr 10, 2018 at 09:37:53AM +0300, Oleksandr Andrushchenko wrote: > >>On 04/06/2018 09:57 PM, Dongwon Kim wrote: > >>

Re: [Qemu-devel] [PATCH 07/19] block: Really pause block jobs on drain

2018-04-12 Thread Kevin Wolf
Am 12.04.2018 um 15:42 hat Paolo Bonzini geschrieben: > On 12/04/2018 15:27, Kevin Wolf wrote: > > Not sure I follow. Let's look at an example. Say, we have a block job > > BlockBackend as the root (because that uses proper layering, unlike > > devices which use aio_disable_external()), connected t

Re: [Qemu-devel] [PATCH v2 1/2 for-2.12?] qapi: Parameter gl of DisplayType now accept an enum

2018-04-12 Thread Elie Tournier
Hello, On Tue, Apr 10, 2018 at 03:33:35PM +0200, Gerd Hoffmann wrote: > > # @off: Disable OpenGL (default). Just to be sure, I have to add @ in front of all parameter, right? > > > > > + # 'on'Use OpenGL, pick context type automatically. > > > + # Would better be named 'auto' but is

Re: [Qemu-devel] [PATCH] migration: discard RAMBlocks of type ram_device

2018-04-12 Thread Paolo Bonzini
On 12/04/2018 15:51, Peter Maydell wrote: > Paolo may have an opinion what the API here should be, but > at the MemoryRegion level we already have a mix of functions > memory_region_init_foo_nomigrate() and memory_region_init_foo(), > which at the moment just control whether we call > vmstate_regis

[Qemu-devel] [PATCH for-2.12] linux-user/signal.c: Put AArch64 frame record in the right place

2018-04-12 Thread Peter Maydell
AArch64 stack frames include a 'frame record' which holds a pointer to the next frame record in the chain and the LR on entry to the function. The procedure calling standard doesn't mandate where exactly this frame record is in the stack frame, but for signal frames the kernel puts it right at the

[Qemu-devel] [PATCH qemu v3] device_tree: Increase FDT_MAX_SIZE to 1 MiB

2018-04-12 Thread Geert Uytterhoeven
It is not uncommon for a contemporary FDT to be larger than 64 KiB, leading to failures loading the device tree from sysfs: qemu-system-aarch64: qemu_fdt_setprop: Couldn't set ...: FDT_ERR_NOSPACE Hence increase the limit to 1 MiB, like on PPC. For reference, the largest arm64 DTB created fr

Re: [Qemu-devel] [PATCH] migration: discard RAMBlocks of type ram_device

2018-04-12 Thread Peter Maydell
On 12 April 2018 at 14:41, Cédric Le Goater wrote: > On 04/12/2018 02:08 PM, Peter Maydell wrote: >> On 12 April 2018 at 12:53, Dr. David Alan Gilbert >> wrote: >>> * Peter Maydell (peter.mayd...@linaro.org) wrote: David suggested on IRC that we would want a flag on the ramblock for "n

Re: [Qemu-devel] [PATCH 07/19] block: Really pause block jobs on drain

2018-04-12 Thread Paolo Bonzini
On 12/04/2018 15:27, Kevin Wolf wrote: > Not sure I follow. Let's look at an example. Say, we have a block job > BlockBackend as the root (because that uses proper layering, unlike > devices which use aio_disable_external()), connected to a qcow2 node > over file. > > 1. The block job issues a req

Re: [Qemu-devel] [PATCH] migration: discard RAMBlocks of type ram_device

2018-04-12 Thread Cédric Le Goater
On 04/12/2018 02:08 PM, Peter Maydell wrote: > On 12 April 2018 at 12:53, Dr. David Alan Gilbert wrote: >> * Peter Maydell (peter.mayd...@linaro.org) wrote: >>> David suggested on IRC that we would want a flag on the ramblock >>> for "not migratable", because there are other uses for "don't >>> mi

Re: [Qemu-devel] [Bug 1759264] Re: fpu/softfloat: round_to_int_and_pack refactor broke TriCore ftoi insns

2018-04-12 Thread Alex Bennée
Bastian Koppelmann writes: > On 04/11/2018 01:01 PM, Alex Bennée wrote: >> Bastian Koppelmann writes: >> >>> On 04/10/2018 10:07 PM, Alex Bennée wrote: Yeah it looks like it was missed, the round_to_uint code does it. Do you have a test case I can verify? >>> >>> For the NaN

Re: [Qemu-devel] [PATCH] block/gluster: defend on legacy ftruncate api use

2018-04-12 Thread Niels de Vos
This change looks good to me, but a commit message would have been helpful. I suggest something like this: Gluster 4.0 changed the signature of glfs_ftruncate(). The function now has two additional arguments, namely prestat and poststat. These provide not benefit for QEMU, so ignoring them a

Re: [Qemu-devel] [PATCH 07/19] block: Really pause block jobs on drain

2018-04-12 Thread Kevin Wolf
Am 12.04.2018 um 14:02 hat Paolo Bonzini geschrieben: > On 12/04/2018 13:53, Kevin Wolf wrote: > >> The problem I have is that there is a direction through which I/O flows > >> (parent-to-child), so why can't draining follow that natural direction. > >> Having to check for the parents' I/O, while d

Re: [Qemu-devel] [PATCH v1 2/2] fpu/softfloat: raise float_invalid for NaN in float_to_int

2018-04-12 Thread Alex Bennée
Peter Maydell writes: > On 12 April 2018 at 12:58, Alex Bennée wrote: >> Fixes https://bugs.launchpad.net/qemu/+bug/1759264 >> >> Signed-off-by: Alex Bennée >> Cc: Bastian Koppelmann >> --- >> fpu/softfloat.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/fpu/softfloat.c b/fpu/s

Re: [Qemu-devel] [PATCH v7 4/8] migration: Create socket-address parameter

2018-04-12 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > It will be used to store the uri parameters. We want this only for > tcp, so we don't set it for other uris. We need it to know what port > is migration running. > > Signed-off-by: Juan Quintela > > -- > > This used to be uri parameter, but it has

[Qemu-devel] [PATCH v2 5/5] qmp: add pmemload command

2018-04-12 Thread Simon Ruderich
Adapted patch from Baojun Wang [1] with the following commit message: I found this could be useful to have qemu-softmmu as a cross debugger (launch with -s -S command line option), then if we can have a command to load guest physical memory, we can use cross gdb to do some target d

[Qemu-devel] [PATCH v2 1/5] cpus: correct coding style in qmp_memsave/qmp_pmemsave

2018-04-12 Thread Simon Ruderich
Signed-off-by: Simon Ruderich --- cpus.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index 38eba8bff3..c78f430532 100644 --- a/cpus.c +++ b/cpus.c @@ -2263,8 +2263,9 @@ void qmp_memsave(int64_t addr, int64_t size, const char *filename, while (

[Qemu-devel] [PATCH v2 4/5] hmp: don't truncate size in hmp_memsave/hmp_pmemsave

2018-04-12 Thread Simon Ruderich
The called function takes an uint64_t as size parameter and qdict_get_int() returns an uint64_t. Don't truncate it needlessly to an uint32_t. Signed-off-by: Simon Ruderich --- hmp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hmp.c b/hmp.c index a25c7bd9a8..1e392055f7

[Qemu-devel] [PATCH v2 2/5] cpus: convert qmp_memsave/qmp_pmemsave to use qemu_open

2018-04-12 Thread Simon Ruderich
qemu_open() allow passing file descriptors to qemu which is used in restricted environments like libvirt where open() is prohibited. Suggested-by: Eric Blake Signed-off-by: Simon Ruderich --- cpus.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/cpus.

  1   2   >