Re: [Qemu-devel] [PATCH 1/4] qemu-options: Remove remainders of the -tdf option

2018-05-02 Thread Markus Armbruster
Thomas Huth writes: > The -tdf options has been removed with d07aa197c5a1556449361a0cbb5108e2, > but apparently I forgot to remove the corresponding two lines from > qemu-options.hx. > > Signed-off-by: Thomas Huth > --- > qemu-options.hx | 3 --- > 1 file changed, 3 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH v4 4/5] target/ppc: add hash MMU support for PowerNV POWER9 machines

2018-05-02 Thread David Gibson
On Thu, May 03, 2018 at 07:52:32AM +0200, Cédric Le Goater wrote: > On 05/03/2018 02:58 AM, David Gibson wrote: > > On Tue, Apr 24, 2018 at 02:41:47PM +0200, Cédric Le Goater wrote: > >> On 04/24/2018 02:03 PM, Cédric Le Goater wrote: > +hwaddr ppc_hash64_hpt_reg(PowerPCCPU *cpu) > +{ > >

Re: [Qemu-devel] [PATCH 2/3] block/file-posix: File locking during creation

2018-05-02 Thread Fam Zheng
On Sat, 04/28 13:03, Max Reitz wrote: > On 2018-04-27 08:22, Fam Zheng wrote: > > On Sat, 04/21 00:09, Max Reitz wrote: > >> When creating a file, we should take the WRITE and RESIZE permissions. > >> We do not need either for the creation itself, but we do need them for > >> clearing and resizing

[Qemu-devel] [PATCH] usb-host: skip open on pending postload bh

2018-05-02 Thread Gerd Hoffmann
usb-host emulates a device unplug after live migration, because the device state is unknown and unplug/replug makes sure the guest re-initializes the device into a working state. This can't be done in post-load though, so post-load just schedules a bottom half which executes after vmload is comple

[Qemu-devel] [PATCH 3/8] spapr: Remove unhelpful helpers from rtas_start_cpu()

2018-05-02 Thread David Gibson
rtas_start_cpu() calls spapr_cpu_update_tb_offset() and spapr_cpu_set_endianness() to initialize certain things in the new cpu's state. This is the only caller of those helpers, and they're each only a few lines long, so we might as well just fold them into the caller. In addition, those helpers

Re: [Qemu-devel] [PATCH v3 07/35] spapr/xive: introduce the XIVE Event Queues

2018-05-02 Thread David Gibson
On Thu, May 03, 2018 at 08:07:54AM +0200, Cédric Le Goater wrote: > On 05/03/2018 07:45 AM, David Gibson wrote: > > On Thu, Apr 26, 2018 at 11:48:06AM +0200, Cédric Le Goater wrote: > >> On 04/26/2018 09:25 AM, David Gibson wrote: > >>> On Thu, Apr 19, 2018 at 02:43:03PM +0200, Cédric Le Goater wro

Re: [Qemu-devel] [PATCH v2 1/2] xlnx-zdma: Add a model of the Xilinx ZynqMP generic DMA

2018-05-02 Thread Edgar E. Iglesias
On Wed, May 02, 2018 at 10:06:39PM +0200, Francisco Iglesias wrote: > Add a model of the generic DMA found on Xilinx ZynqMP. Hi Francisco, A few more comments: > > Signed-off-by: Francisco Iglesias > Signed-off-by: Edgar E. Iglesias > --- > hw/dma/Makefile.objs | 1 + > hw/dma/xln

[Qemu-devel] [PATCH 2/8] spapr: Clean up rtas_start_cpu() & rtas_stop_self()

2018-05-02 Thread David Gibson
This makes several minor cleanups to these functions: * Follow usual convention of an early exit on error, rather than having most of the body in an if * Clearer naming of cpu and cpu_. Now callcpu is the cpu from which the RTAS call is invoked, newcpu is the cpu which we're starting

Re: [Qemu-devel] [PATCH for-2.13 02/10] spapr: Remove support for PowerPC 970 with pseries machine type

2018-05-02 Thread David Gibson
On Fri, Apr 20, 2018 at 02:25:23PM +0200, Greg Kurz wrote: > On Tue, 17 Apr 2018 17:17:14 +1000 > David Gibson wrote: > > > Current POWER cpus allow for a VRMA, a special mapping which describes a > > guest's view of memory when in real mode (MMU off, from the guest's point > > of view). Older c

[Qemu-devel] [PATCH 1/8] target/ppc: Add ppc_store_lpcr() helper

2018-05-02 Thread David Gibson
There are some fields in the cpu state which need to be updated when the LPCR register is changed, which is done by ppc_hash64_update_rmls() and ppc_hash64_update_vrma(). Code which alters env->spr[SPR_LPCR] needs to call them afterwards to make sure the state is up to date. That's easy to get wr

[Qemu-devel] [PATCH 4/8] spapr: Make a helper to set up cpu entry point state

2018-05-02 Thread David Gibson
Under PAPR, only the boot CPU is active when the system starts. Other cpus must be explicitly activated using an RTAS call. The entry state for the boot and secondary cpus isn't identical, but it has some things in common. We're going to add a bit more common setup later, too, so to simplify make

Re: [Qemu-devel] [PATCH qemu] qom: Document qom/device-list-properties implementation specific

2018-05-02 Thread Alexey Kardashevskiy
On 2/5/18 7:50 pm, Paolo Bonzini wrote: > On 02/05/2018 11:33, Alexey Kardashevskiy wrote: >>> +# Note: the handler creates an object, enumerates properties and >>> destroys >>> +# the object so it only lists properties created in >>> TypeInfo::instance_init(). >>> +# Since th

[Qemu-devel] [PATCH 5/8] spapr: Clean up LPCR updates from hypercalls

2018-05-02 Thread David Gibson
There are several places in spapr_hcall.c where we need to update the LPCR value on all CPUs. We do this with the set_spr() helper. That's not really correct because this directly sets the SPR value, without going through the ppc_store_lpcr() helper which may need to update state based on the LPC

[Qemu-devel] [PATCH 0/8] spapr: Cleanups to startup and LPCR handling

2018-05-02 Thread David Gibson
This is an assortment of patches cleaning up how we handle startup / entry of CPUs for the pseries machine type. In particular it makes a number of cleanups to the way we manage the LPCR register. I've posted versions of most of these patches before, however there have been enough reworks and re-

[Qemu-devel] [PATCH 7/8] spapr: Move PAPR mode cpu setup fully to spapr code

2018-05-02 Thread David Gibson
cpu_ppc_set_papr() does several things: 1) it sets up the virtual hypervisor interface 2) it prevents the cpu from ever entering hypervisor mode 3) it tells KVM that we're emulating a cpu in PAPR mode and 4) it configures the LPCR and AMOR (hypervisor privileged registers) so tha

[Qemu-devel] [PATCH 6/8] target/ppc: Delay initialization of LPCR_UPRT for secondary cpus

2018-05-02 Thread David Gibson
In cpu_ppc_set_papr() the UPRT and GTSE bits of the LPCR default value are initialized based on on ppc64_radix_guest(). Which seems reasonable, except that ppc64_radix_guest() is based on spapr->patb_entry which is only set up in spapr_machine_reset, called _after_ cpu_ppc_set_papr() for boot cpus

[Qemu-devel] [PATCH 8/8] spapr: Clean up handling of LPCR power-saving exit bits

2018-05-02 Thread David Gibson
To prevent spurious wakeups on cpus that are supposed to be disabled, we need to clear the LPCR bits which control certain wakeup events. spapr_cpu_reset() has separate cases here for boot and non-boot (initially inactive) cpus. rtas_start_cpu() then turns the LPCR bits on when the non-boot cpus a

Re: [Qemu-devel] [PATCH v2 0/5] checkpatch: backport UTF-8 fixes and MAINTAINERS check

2018-05-02 Thread Fam Zheng
On Tue, 05/01 14:04, Stefan Hajnoczi wrote: > On Mon, Apr 30, 2018 at 05:56:30AM -0700, no-re...@patchew.org wrote: > > === OUTPUT BEGIN === > > Checking PATCH 1/5: checkpatch: add a --strict check for utf-8 in commit > > logs... > > WARNING: line over 80 characters > > #101: FILE: scripts/checkpa

Re: [Qemu-devel] [PATCH v3 07/35] spapr/xive: introduce the XIVE Event Queues

2018-05-02 Thread Cédric Le Goater
On 05/03/2018 07:45 AM, David Gibson wrote: > On Thu, Apr 26, 2018 at 11:48:06AM +0200, Cédric Le Goater wrote: >> On 04/26/2018 09:25 AM, David Gibson wrote: >>> On Thu, Apr 19, 2018 at 02:43:03PM +0200, Cédric Le Goater wrote: The Event Queue Descriptor (EQD) table is an internal table of th

Re: [Qemu-devel] [PATCH 08/10] intel-iommu: maintain per-device iova ranges

2018-05-02 Thread Peter Xu
On Fri, Apr 27, 2018 at 11:37:24PM +, Tian, Kevin wrote: [...] > > Self NAK on this... > > > > More than half of the whole series tries to solve the solo problem > > that we unmapped some pages that were already mapped, which proved > > to > > be wrong. Now if we squash the change we will d

[Qemu-devel] [PATCH] hw/arm: Don't fail qtest due to missing SD card in -nodefaults mode

2018-05-02 Thread Thomas Huth
When running omap1/2 or pxa2xx based ARM machines with -nodefaults, they bail out immediately complaining about a "missing SecureDigital device". That's not how the "default" devices in vl.c are meant to work - it should be possible for a board to also start up without default devices. So let's tur

Re: [Qemu-devel] [PATCH v4 4/5] target/ppc: add hash MMU support for PowerNV POWER9 machines

2018-05-02 Thread Cédric Le Goater
On 05/03/2018 02:58 AM, David Gibson wrote: > On Tue, Apr 24, 2018 at 02:41:47PM +0200, Cédric Le Goater wrote: >> On 04/24/2018 02:03 PM, Cédric Le Goater wrote: +hwaddr ppc_hash64_hpt_reg(PowerPCCPU *cpu) +{ +CPUPPCState *env = &cpu->env; + +/* We should not reach

[Qemu-devel] [PATCH] net: Silence 'has no peer' messages in testing mode

2018-05-02 Thread Thomas Huth
When running qtests with -nodefaults, we are not interested in these 'XYZ has no peer' messages. Signed-off-by: Thomas Huth --- net/net.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/net/net.c b/net/net.c index 29f8398..58bf85e 100644 --- a/net/net.c +++ b/ne

Re: [Qemu-devel] [PATCH v3 07/35] spapr/xive: introduce the XIVE Event Queues

2018-05-02 Thread David Gibson
On Thu, Apr 26, 2018 at 11:48:06AM +0200, Cédric Le Goater wrote: > On 04/26/2018 09:25 AM, David Gibson wrote: > > On Thu, Apr 19, 2018 at 02:43:03PM +0200, Cédric Le Goater wrote: > >> The Event Queue Descriptor (EQD) table is an internal table of the > >> XIVE routing sub-engine. It specifies on

Re: [Qemu-devel] [PATCH v3 06/35] spapr/xive: introduce a XIVE interrupt presenter model

2018-05-02 Thread David Gibson
On Thu, Apr 26, 2018 at 07:15:29PM +0200, Cédric Le Goater wrote: > On 04/26/2018 11:27 AM, Cédric Le Goater wrote: > > On 04/26/2018 09:11 AM, David Gibson wrote: > >> On Thu, Apr 19, 2018 at 02:43:02PM +0200, Cédric Le Goater wrote: [snip] > >>> +static void xive_tm_os_write(void *opaque, hwaddr

Re: [Qemu-devel] [PATCH v3 06/35] spapr/xive: introduce a XIVE interrupt presenter model

2018-05-02 Thread David Gibson
On Thu, Apr 26, 2018 at 11:27:21AM +0200, Cédric Le Goater wrote: > On 04/26/2018 09:11 AM, David Gibson wrote: > > On Thu, Apr 19, 2018 at 02:43:02PM +0200, Cédric Le Goater wrote: > >> The XIVE presenter engine uses a set of registers to handle priority > >> management and interrupt acknowledgmen

Re: [Qemu-devel] [PATCH v3 06/35] spapr/xive: introduce a XIVE interrupt presenter model

2018-05-02 Thread David Gibson
On Wed, May 02, 2018 at 09:39:44AM +0200, Cédric Le Goater wrote: > >> > >> +static XiveNVT *spapr_xive_get_nvt(XiveFabric *xf, uint32_t server) > >> +{ > >> +PowerPCCPU *cpu = spapr_find_cpu(server); > >> + > >> +return cpu ? XIVE_NVT(cpu->intc) : NULL; > >> +} > > > > So this is a bit

Re: [Qemu-devel] [PATCH] x86/cpu: Enable CLDEMOTE(Demote Cache Line) cpu feature

2018-05-02 Thread Liu, Jingqi
Yes. The corresponding patch in KVM refers to the following link: https://www.spinics.net/lists/kernel/msg2792864.html Thanks. -Original Message- From: Eduardo Habkost [mailto:ehabk...@redhat.com] Sent: Thursday, May 3, 2018 11:05 AM To: Liu, Jingqi Cc: qemu-devel@nongnu.org; pbonz...@r

Re: [Qemu-devel] [PATCH qemu v2 1/2] memory/hmp: Print owners/parents in "info mtree"

2018-05-02 Thread Alexey Kardashevskiy
On 30/4/18 7:53 pm, Paolo Bonzini wrote: > On 30/04/2018 08:25, Alexey Kardashevskiy wrote: >> +DeviceState *dev = (DeviceState *) object_dynamic_cast(obj, >> TYPE_DEVICE); >> +const char *id = object_property_print(obj, "id", true, NULL); > > The only objects that have an "id" property a

Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock

2018-05-02 Thread Peter Xu
On Mon, Apr 30, 2018 at 09:20:42AM +0200, Paolo Bonzini wrote: > On 28/04/2018 04:24, Peter Xu wrote: > 2) Can we just reuse qemu BQL here? > >>> I would prefer not. As I mentioned, at least I have spent too much > >>> time on fighting BQL already. I really hope we can start to use > >>> iso

Re: [Qemu-devel] [PATCH v3 04/35] spapr/xive: introduce a XIVE interrupt controller for sPAPR

2018-05-02 Thread David Gibson
On Thu, Apr 26, 2018 at 12:43:29PM +0200, Cédric Le Goater wrote: > On 04/26/2018 06:20 AM, David Gibson wrote: > > On Tue, Apr 24, 2018 at 11:46:04AM +0200, Cédric Le Goater wrote: > >> On 04/24/2018 08:51 AM, David Gibson wrote: > >>> On Thu, Apr 19, 2018 at 02:43:00PM +0200, Cédric Le Goater wro

Re: [Qemu-devel] [PATCH v3 03/35] ppc/xive: introduce the XiveFabric interface

2018-05-02 Thread David Gibson
On Wed, May 02, 2018 at 05:28:23PM +0200, Cédric Le Goater wrote: > On 04/27/2018 08:32 AM, David Gibson wrote: > > On Thu, Apr 26, 2018 at 12:30:42PM +0200, Cédric Le Goater wrote: > >> On 04/26/2018 05:54 AM, David Gibson wrote: > >>> On Tue, Apr 24, 2018 at 11:33:11AM +0200, Cédric Le Goater wro

Re: [Qemu-devel] [PATCH v2 4/4] vfio/quirks: Enable ioeventfd quirks to be handled by vfio directly

2018-05-02 Thread Peter Xu
On Tue, May 01, 2018 at 10:43:46AM -0600, Alex Williamson wrote: [...] > -static void vfio_ioeventfd_exit(VFIOIOEventFD *ioeventfd) > +static void vfio_ioeventfd_exit(VFIOPCIDevice *vdev, VFIOIOEventFD > *ioeventfd) > { > QLIST_REMOVE(ioeventfd, next); > + > memory_region_del_eventfd(

Re: [Qemu-devel] [PATCH v2 3/4] vfio/quirks: ioeventfd quirk acceleration

2018-05-02 Thread Alex Williamson
On Thu, 3 May 2018 11:36:35 +0800 Peter Xu wrote: > On Tue, May 01, 2018 at 10:43:32AM -0600, Alex Williamson wrote: > > [...] > > > @@ -743,6 +843,60 @@ static void vfio_nvidia_quirk_mirror_write(void > > *opaque, hwaddr addr, > >addr + mirror->offset, data, size);

Re: [Qemu-devel] [PATCH v2 3/4] vfio/quirks: ioeventfd quirk acceleration

2018-05-02 Thread Peter Xu
On Tue, May 01, 2018 at 10:43:32AM -0600, Alex Williamson wrote: [...] > @@ -743,6 +843,60 @@ static void vfio_nvidia_quirk_mirror_write(void *opaque, > hwaddr addr, >addr + mirror->offset, data, size); > trace_vfio_quirk_nvidia_bar0_msi_ack(vdev->vbasedev.na

Re: [Qemu-devel] [PATCH] migration: fix saving normal page even if it's been compressed

2018-05-02 Thread Xiao Guangrong
On 05/02/2018 10:46 AM, Peter Xu wrote: On Sat, Apr 28, 2018 at 04:10:45PM +0800, guangrong.x...@gmail.com wrote: From: Xiao Guangrong Fix the bug introduced by da3f56cb2e767016 (migration: remove ram_save_compressed_page()), It should be 'return' rather than 'res' Sorry for this stupid mis

Re: [Qemu-devel] [PATCH] x86/cpu: Enable CLDEMOTE(Demote Cache Line) cpu feature

2018-05-02 Thread Eduardo Habkost
On Fri, May 04, 2018 at 11:57:33AM +0800, Jingqi Liu wrote: > The CLDEMOTE instruction hints to hardware that the cache line that > contains the linear address should be moved("demoted") from > the cache(s) closest to the processor core to a level more distant > from the processor core. This may ac

Re: [Qemu-devel] [PATCH v2 02/19] spapr: introduce a skeleton for the XIVE interrupt controller

2018-05-02 Thread David Gibson
On Thu, Apr 26, 2018 at 10:17:13AM +0200, Cédric Le Goater wrote: > On 04/26/2018 07:36 AM, David Gibson wrote: > > On Thu, Apr 19, 2018 at 07:40:09PM +0200, Cédric Le Goater wrote: > >> On 04/16/2018 06:26 AM, David Gibson wrote: > >>> On Thu, Apr 12, 2018 at 10:18:11AM +0200, Cédric Le Goater wro

Re: [Qemu-devel] [PATCH] migration: fix saving normal page even if it's been compressed

2018-05-02 Thread Peter Xu
On Wed, May 02, 2018 at 04:30:39PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Sat, Apr 28, 2018 at 04:10:45PM +0800, guangrong.x...@gmail.com wrote: > > > From: Xiao Guangrong > > > > > > Fix the bug introduced by da3f56cb2e767016 (migration: remove > > >

[Qemu-devel] [PATCH] x86/cpu: Enable CLDEMOTE(Demote Cache Line) cpu feature

2018-05-02 Thread Jingqi Liu
The CLDEMOTE instruction hints to hardware that the cache line that contains the linear address should be moved("demoted") from the cache(s) closest to the processor core to a level more distant from the processor core. This may accelerate subsequent accesses to the line by other cores in the same

Re: [Qemu-devel] [PATCH v2 1/1] migration: calculate expected_downtime with ram_bytes_remaining()

2018-05-02 Thread David Gibson
On Fri, Apr 20, 2018 at 07:57:34PM +0100, Dr. David Alan Gilbert wrote: > * David Gibson (da...@gibson.dropbear.id.au) wrote: > > > > > So. AFAICT the estimate of page dirty rate is based on the assumption > > that page dirties are independent of each other - one page is as > > likely to be dir

Re: [Qemu-devel] [PATCH v2 1/1] migration: calculate expected_downtime with ram_bytes_remaining()

2018-05-02 Thread David Gibson
On Sun, Apr 22, 2018 at 12:42:49AM +0530, Balamuruhan S wrote: > On Thu, Apr 19, 2018 at 09:48:17PM +1000, David Gibson wrote: > > On Thu, Apr 19, 2018 at 10:14:52AM +0530, Balamuruhan S wrote: > > > On Wed, Apr 18, 2018 at 09:36:33AM +0100, Dr. David Alan Gilbert wrote: > > > > * Balamuruhan S (ba

Re: [Qemu-devel] [RFC for-2.13 1/7] spapr: Maximum (HPT) pagesize property

2018-05-02 Thread David Gibson
On Wed, May 02, 2018 at 06:06:38PM -0300, Murilo Opsfelder Araujo wrote: > On Thu, Apr 19, 2018 at 04:29:11PM +1000, David Gibson wrote: > > The way the POWER Hash Page Table (HPT) MMU is virtualized by KVM HV means > > that every page that the guest puts in the pagetables must be truly > > physica

Re: [Qemu-devel] release retrospective, next release timing, numbering

2018-05-02 Thread David Gibson
On Mon, Apr 30, 2018 at 04:23:59PM +0200, Greg Kurz wrote: > On Fri, 27 Apr 2018 16:51:03 +0100 > Peter Maydell wrote: > > > Hi; I usually let people forget about releases for a month or > > so before bringing this topic up, but: > > > > (1) do we want to call the next release 2.13, or something

Re: [Qemu-devel] [PATCH] migration: introduce decompress-error-check

2018-05-02 Thread Peter Xu
On Wed, May 02, 2018 at 03:57:13PM +0100, Dr. David Alan Gilbert wrote: > * Peter Xu (pet...@redhat.com) wrote: > > On Fri, Apr 27, 2018 at 06:40:09PM +0800, Xiao Guangrong wrote: > > > > > > > > > On 04/27/2018 05:31 PM, Peter Xu wrote: > > > > On Fri, Apr 27, 2018 at 11:15:37AM +0800, Xiao Guan

[Qemu-devel] [PATCH v5 1/2] slirp: Add "query-usernet" QMP command

2018-05-02 Thread Fam Zheng
HMP "info usernet" has been available but it isn't ideal for programmed use cases. This closes the gap in QMP by adding a counterpart "query-usernet" command. It is basically translated from the HMP slirp_connection_info() loop, which now calls the QMP implementation and prints the data, just like

[Qemu-devel] [PATCH v5 2/2] tests: Use query-usernet instead of 'info usernet'

2018-05-02 Thread Fam Zheng
Signed-off-by: Fam Zheng Reviewed-by: Eric Blake --- tests/vm/basevm.py | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 3a2d508c35..dcfa6597ad 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -101,7 +101,

[Qemu-devel] [PATCH v5 0/2] slirp: Add query-usernet QMP command

2018-05-02 Thread Fam Zheng
v5: Fix QAPI example in comments. [Eric] v4: vlan -> hub. [Samuel] Free 'info. [Samuel] v3: - Add Eric's rev-by to patch 2. - Address Eric's comments on patch 1: * Fix spell/grammar: "programmed", "awaiting". * Fix include "qapi/qapi-commands-net.h". * Underscores to dash

Re: [Qemu-devel] [PATCH v4 1/2] slirp: Add "query-usernet" QMP command

2018-05-02 Thread Fam Zheng
On Wed, 05/02 14:41, Eric Blake wrote: > On 05/02/2018 02:30 AM, Fam Zheng wrote: > > HMP "info usernet" has been available but it isn't ideal for programmed > > use cases. This closes the gap in QMP by adding a counterpart > > "query-usernet" command. It is basically translated from > > the HMP sl

Re: [Qemu-devel] [PATCH qemu] vfio/spapr: Allow backing bigger guest IOMMU pages with smaller physical pages

2018-05-02 Thread Alexey Kardashevskiy
On 3/5/18 11:03 am, David Gibson wrote: > On Wed, May 02, 2018 at 06:59:53PM +1000, Alexey Kardashevskiy wrote: >> On 2/5/18 4:37 pm, David Gibson wrote: >>> On Wed, May 02, 2018 at 02:45:57PM +1000, Alexey Kardashevskiy wrote: At the moment the PPC64/pseries guest only supports 4K/64K/16M IOM

Re: [Qemu-devel] [PATCH qemu] vfio/spapr: Allow backing bigger guest IOMMU pages with smaller physical pages

2018-05-02 Thread David Gibson
On Wed, May 02, 2018 at 06:59:53PM +1000, Alexey Kardashevskiy wrote: > On 2/5/18 4:37 pm, David Gibson wrote: > > On Wed, May 02, 2018 at 02:45:57PM +1000, Alexey Kardashevskiy wrote: > >> At the moment the PPC64/pseries guest only supports 4K/64K/16M IOMMU > >> pages and POWER8 CPU supports the e

Re: [Qemu-devel] [PATCH v4 4/5] target/ppc: add hash MMU support for PowerNV POWER9 machines

2018-05-02 Thread David Gibson
On Tue, Apr 24, 2018 at 02:41:47PM +0200, Cédric Le Goater wrote: > On 04/24/2018 02:03 PM, Cédric Le Goater wrote: > >> +hwaddr ppc_hash64_hpt_reg(PowerPCCPU *cpu) > >> +{ > >> +CPUPPCState *env = &cpu->env; > >> + > >> +/* We should not reach this routine on sPAPR machines */ > >> +as

Re: [Qemu-devel] [PATCH v4 3/5] target/ppc: add hash MMU definitions for ISA v3.0

2018-05-02 Thread David Gibson
On Tue, Apr 24, 2018 at 01:30:43PM +0200, Cédric Le Goater wrote: > The HPTE bits definitions are slightly modified in ISA v3.0. Let's add > some helpers to hide the differences in the hash MMU code. > > Signed-off-by: Cédric Le Goater > --- > hw/ppc/spapr_hcall.c| 5 +++-- > target/ppc/mmu

[Qemu-devel] [PATCH v2 13/14] target/arm: Implement FMOV (immediate) for fp16

2018-05-02 Thread Richard Henderson
From: Alex Bennée All the hard work is already done by vfp_expand_imm, we just need to make sure we pick up the correct size. Cc: qemu-sta...@nongnu.org Signed-off-by: Alex Bennée [rth: Merge unallocated_encoding check with TCGMemOp conversion.] Signed-off-by: Richard Henderson --- target/arm

[Qemu-devel] [PATCH v2 11/14] target/arm: Implement FCMP for fp16

2018-05-02 Thread Richard Henderson
From: Alex Bennée These where missed out from the rest of the half-precision work. Cc: qemu-sta...@nongnu.org Signed-off-by: Alex Bennée [rth: Diagnose lack of FP16 before fp_access_check] Signed-off-by: Richard Henderson --- target/arm/helper-a64.h| 2 ++ target/arm/helper-a64.c| 10

[Qemu-devel] [PATCH v2 07/14] target/arm: Implement FCVT (scalar, fixed-point) for fp16

2018-05-02 Thread Richard Henderson
Cc: qemu-sta...@nongnu.org Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index d794744aec..e19d97e8f1 100644 -

[Qemu-devel] [PATCH v2 08/14] target/arm: Introduce and use read_fp_hreg

2018-05-02 Thread Richard Henderson
Cc: qemu-sta...@nongnu.org Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index e19d97e8f1..8c63d5e743 100644 --- a/target/

[Qemu-devel] [PATCH v2 14/14] target/arm: Fix sqrt_f16 exception raising

2018-05-02 Thread Richard Henderson
From: Alex Bennée We are meant to explicitly pass fpst, not cpu_env. Cc: qemu-sta...@nongnu.org Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/targ

[Qemu-devel] [PATCH v2 12/14] target/arm: Implement FCSEL for fp16

2018-05-02 Thread Richard Henderson
From: Alex Bennée These were missed out from the rest of the half-precision work. Cc: qemu-sta...@nongnu.org Signed-off-by: Alex Bennée [rth: Fix erroneous check vs type] Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 31 +-- 1 file changed, 25 i

[Qemu-devel] [PATCH v2 10/14] target/arm: Implement FP data-processing (3 source) for fp16

2018-05-02 Thread Richard Henderson
We missed all of the scalar fp16 fma operations. Cc: qemu-sta...@nongnu.org Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 48 ++ 1 file changed, 48 insertions(+) diff --git a/target/arm/translate-a64.c b/t

[Qemu-devel] [PATCH v2 09/14] target/arm: Implement FP data-processing (2 source) for fp16

2018-05-02 Thread Richard Henderson
We missed all of the scalar fp16 binary operations. Cc: qemu-sta...@nongnu.org Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 65 ++ 1 file changed, 65 insertions(+) diff --git a/target/arm/translate-a64.c

[Qemu-devel] [PATCH v2 03/14] target/arm: Fix float16 to/from int16

2018-05-02 Thread Richard Henderson
The instruction "ucvtf v0.4h, v04h, #2", with input 0x8000u, overflows the intermediate float16 to infinity before we have a chance to scale the output. Use float64 as the intermediate type so that no input argument (uint32_t in this case) can overflow or round before scaling. Given the declared

[Qemu-devel] [PATCH v2 05/14] target/arm: Implement FMOV (general) for fp16

2018-05-02 Thread Richard Henderson
Adding the fp16 moves to/from general registers. Cc: qemu-sta...@nongnu.org Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index c64

[Qemu-devel] [PATCH v2 06/14] target/arm: Implement FCVT (scalar, integer) for fp16

2018-05-02 Thread Richard Henderson
Cc: qemu-sta...@nongnu.org Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/helper.h| 6 +++ target/arm/helper.c| 38 +- target/arm/translate-a64.c | 96 ++ 3 files changed, 122 insertions(+), 18

[Qemu-devel] [PATCH v2 02/14] target/arm: Implement vector shifted FCVT for fp16

2018-05-02 Thread Richard Henderson
While we have some of the scalar paths for FCVT for fp16, we failed to decode the fp16 version of these instructions. Cc: qemu-sta...@nongnu.org Signed-off-by: Richard Henderson --- v2: Use parens with (x << y) >> z. --- target/arm/translate-a64.c | 65 --

[Qemu-devel] [PATCH v2 04/14] target/arm: Clear SVE high bits for FMOV

2018-05-02 Thread Richard Henderson
Use write_fp_dreg and clear_vec_high to zero the bits that need zeroing for these cases. Cc: qemu-sta...@nongnu.org Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/tar

[Qemu-devel] [PATCH v2 01/14] target/arm: Implement vector shifted SCVF/UCVF for fp16

2018-05-02 Thread Richard Henderson
While we have some of the scalar paths for *CVF for fp16, we failed to decode the fp16 version of these instructions. Cc: qemu-sta...@nongnu.org Signed-off-by: Richard Henderson --- v2: Use parens with (x << y) >> z. --- target/arm/translate-a64.c | 33 - 1 file

[Qemu-devel] [PATCH v2 00/14] target/arm: Fixups for ARM_FEATURE_V8_FP16

2018-05-02 Thread Richard Henderson
When running the gcc testsuite with current aarch64-linux-user, the testsuite detects the presence of the fp16 extension and enables lots of extra tests for builtins. Quite a few of these new tests fail because we missed implementing some instructions. We really should go back and verify that not

Re: [Qemu-devel] [PATCH v4] linux-user: remove useless padding in flock64 structure

2018-05-02 Thread Richard Henderson
On 05/02/2018 02:57 PM, Laurent Vivier wrote: > Since commit 8efb2ed5ec ("linux-user: Correct signedness of > target_flock l_start and l_len fields"), flock64 structure uses > abi_llong for l_start and l_len in place of "unsigned long long" > this should force them to be aligned accordingly to the

Re: [Qemu-devel] [PATCH 2/3] qemu-img: Use only string options in img_open_opts

2018-05-02 Thread Max Reitz
On 2018-05-03 00:00, Eric Blake wrote: > On 05/02/2018 03:20 PM, Max Reitz wrote: >> img_open_opts() takes a QemuOpts and converts them to a QDict, so all >> values therein are strings.  Then it may try to call qdict_get_bool(), >> however, which will fail with a segmentation fault every time: > >

Re: [Qemu-devel] [PATCH 3/3] iotests: Add test for -U/force-share conflicts

2018-05-02 Thread Eric Blake
On 05/02/2018 03:20 PM, Max Reitz wrote: Signed-off-by: Max Reitz --- tests/qemu-iotests/153 | 17 + tests/qemu-iotests/153.out | 16 2 files changed, 33 insertions(+) Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc.

Re: [Qemu-devel] [PATCH 2/3] qemu-img: Use only string options in img_open_opts

2018-05-02 Thread Eric Blake
On 05/02/2018 03:20 PM, Max Reitz wrote: img_open_opts() takes a QemuOpts and converts them to a QDict, so all values therein are strings. Then it may try to call qdict_get_bool(), however, which will fail with a segmentation fault every time: I have no idea if it's worth fixing qdict_get_bool

[Qemu-devel] [PATCH v4] linux-user: remove useless padding in flock64 structure

2018-05-02 Thread Laurent Vivier
Since commit 8efb2ed5ec ("linux-user: Correct signedness of target_flock l_start and l_len fields"), flock64 structure uses abi_llong for l_start and l_len in place of "unsigned long long" this should force them to be aligned accordingly to the target rules. So we can remove the padding field and t

Re: [Qemu-devel] [PATCH 1/3] qemu-io: Use purely string blockdev options

2018-05-02 Thread Eric Blake
On 05/02/2018 03:20 PM, Max Reitz wrote: Currently, qemu-io only uses string-valued blockdev options (as all are converted directly from QemuOpts) -- with one exception: -U adds the force-share option as a boolean. This in itself is already a bit questionable, but a real issue is that it also as

Re: [Qemu-devel] [Qemu-block] [RFC 0/7] block: Try to use correctly typed blockdev options

2018-05-02 Thread Max Reitz
On 2018-05-02 23:32, Max Reitz wrote: > (Sorry, Markus, sorry, Kevin, if this series makes you angry.) > > The subject says it all, I think. The original issue I was assigned to > solve is this: > > $ ./qemu-img info --image-opts driver=null-co,size=42 > image: json:{"driver": "null-co",

[Qemu-devel] [RFC 7/7] iotests: Test internal option typing

2018-05-02 Thread Max Reitz
It would be nice if qemu used the correct types for blockdev options internally, even if the user specified string values (either through -drive or by being not so nice and using json:{} with string values). This patch adds a test verifying that fact. Signed-off-by: Max Reitz --- tests/qemu-iote

[Qemu-devel] [RFC 4/7] block: Add bdrv_open_string_opts()

2018-05-02 Thread Max Reitz
This function is to be used by callers that cannot guarantee that all values in @options are correctly typed. In the future, we would like this function to be gone, of course, but for now it at least lets us begin a proper separation of legacy interfaces. Signed-off-by: Max Reitz --- include/bl

[Qemu-devel] [RFC 3/7] block: Make use of qdict_set_default_bool()

2018-05-02 Thread Max Reitz
When dealing with blockdev option QDicts that contain purely string values, it is not really advisable to break that by adding non-string values. But it does make sense to use the correct type for QDicts that may contain non-string values already, so do that. Signed-off-by: Max Reitz --- block.

[Qemu-devel] [RFC 5/7] block: Add blk_new_open_string_opts()

2018-05-02 Thread Max Reitz
This is an interface to bdrv_open_string_opts(). Signed-off-by: Max Reitz --- include/sysemu/block-backend.h | 2 ++ block/block-backend.c | 30 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/include/sysemu/block-backend.h b/include/sysemu

[Qemu-devel] [RFC 2/7] block: Let change-medium add detect-zeroes as bool

2018-05-02 Thread Max Reitz
There is no reason to use the wrong type here. Signed-off-by: Max Reitz --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index c31bf3d98d..76f811c415 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2654,7 +2654,7 @@ void qmp_blockdev_change_

[Qemu-devel] [RFC 0/7] block: Try to use correctly typed blockdev options

2018-05-02 Thread Max Reitz
(Sorry, Markus, sorry, Kevin, if this series makes you angry.) The subject says it all, I think. The original issue I was assigned to solve is this: $ ./qemu-img info --image-opts driver=null-co,size=42 image: json:{"driver": "null-co", "size": "42"} [...] As you can see, "size" get

[Qemu-devel] [RFC 6/7] block: Use {blk_new, bdrv}_open_string_opts()

2018-05-02 Thread Max Reitz
This patch makes every caller of blk_new_open() and bdrv_open() instead call blk_new_open_string_opts() or bdrv_open_string_opts(), respectively, when needed. That is the case when the blockdev options QDict may contain incorrectly typed string values. In fact, all callers converted in this patch

[Qemu-devel] [RFC 1/7] qdict: Add qdict_set_default_bool()

2018-05-02 Thread Max Reitz
Signed-off-by: Max Reitz --- include/qapi/qmp/qdict.h | 1 + qobject/qdict.c | 13 + 2 files changed, 14 insertions(+) diff --git a/include/qapi/qmp/qdict.h b/include/qapi/qmp/qdict.h index 2cc3e906f7..a6fb89302d 100644 --- a/include/qapi/qmp/qdict.h +++ b/include/qapi/qmp/

Re: [Qemu-devel] [RFC for-2.13 1/7] spapr: Maximum (HPT) pagesize property

2018-05-02 Thread Murilo Opsfelder Araujo
On Thu, Apr 19, 2018 at 04:29:11PM +1000, David Gibson wrote: > The way the POWER Hash Page Table (HPT) MMU is virtualized by KVM HV means > that every page that the guest puts in the pagetables must be truly > physically contiguous, not just GPA-contiguous. In effect this means that > an HPT gues

[Qemu-devel] [PATCH 3/3] iotests: Add test for -U/force-share conflicts

2018-05-02 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/153 | 17 + tests/qemu-iotests/153.out | 16 2 files changed, 33 insertions(+) diff --git a/tests/qemu-iotests/153 b/tests/qemu-iotests/153 index a0fd815483..ec508c758f 100755 --- a/tests/qemu-iotests/153 +++ b/

[Qemu-devel] [PATCH 2/3] qemu-img: Use only string options in img_open_opts

2018-05-02 Thread Max Reitz
img_open_opts() takes a QemuOpts and converts them to a QDict, so all values therein are strings. Then it may try to call qdict_get_bool(), however, which will fail with a segmentation fault every time: $ ./qemu-img info -U --image-opts \ driver=file,filename=/dev/null,force-share=off [1]

[Qemu-devel] [PATCH 0/3] qemu-io/img: Fix -U/force-share conflict testing

2018-05-02 Thread Max Reitz
qemu-img and qemu-io try to detect when you use both -U and force-share manually, but a conflict is not rejected with an error message but with a segmentation fault. I guess that works, but it's probably not the way it was meant to be. Max Reitz (3): qemu-io: Use purely string blockdev options

[Qemu-devel] [PATCH 1/3] qemu-io: Use purely string blockdev options

2018-05-02 Thread Max Reitz
Currently, qemu-io only uses string-valued blockdev options (as all are converted directly from QemuOpts) -- with one exception: -U adds the force-share option as a boolean. This in itself is already a bit questionable, but a real issue is that it also assumes the value already existing in the opt

Re: [Qemu-devel] [RFC PATCH v3 00/30] replay additions

2018-05-02 Thread Dominique Fuchs
C:\msys64\mingw64\bin\ar.exe: creating libfdt/libfdt.a make[1]: *** No rule to make target „/home/Dominique/qemu/capstone/capstone.lib“. Stop. make: *** [Makefile:503: subdir-capstone] Error 2 I just stumbled across the same error while building qemu 2.12 on MSYS2/mingw64, which led me to this

[Qemu-devel] [PATCH v2 1/2] xlnx-zdma: Add a model of the Xilinx ZynqMP generic DMA

2018-05-02 Thread Francisco Iglesias
Add a model of the generic DMA found on Xilinx ZynqMP. Signed-off-by: Francisco Iglesias Signed-off-by: Edgar E. Iglesias --- hw/dma/Makefile.objs | 1 + hw/dma/xlnx-zdma.c | 835 + include/hw/dma/xlnx-zdma.h | 84 + 3 files chang

[Qemu-devel] [PATCH v2 0/2] xlnx-zynqmp: Add emulation of the ZynqMP GDMA and ADMA

2018-05-02 Thread Francisco Iglesias
Hi, The ZynqMP Soc contains two separate instances of a generic DMA, one located in the FPD (full power domain) called GDMA and a second one located in the LPD (low power domain) called ADMA. This patch series attempts to add emulation support for these two DMAs on the ZynqMP board. The first patc

[Qemu-devel] [PATCH v2 2/2] xlnx-zynqmp: Connect the ZynqMP GDMA and ADMA

2018-05-02 Thread Francisco Iglesias
The ZynqMP contains two instances of a generic DMA, the GDMA, located in the FPD (full power domain), and the ADMA, located in LPD (low power domain). This patch adds these two DMAs to the ZynqMP board. Signed-off-by: Francisco Iglesias --- hw/arm/xlnx-zynqmp.c | 53

Re: [Qemu-devel] [PATCH v1 1/2] xlnx-zdma: Add a model of the Xilinx ZynqMP generic DMA

2018-05-02 Thread francisco iglesias
On 30 April 2018 at 15:42, Edgar E. Iglesias wrote: > On Sun, Apr 29, 2018 at 02:43:28AM +0200, Francisco Iglesias wrote: > > Add a model of the generic DMA found on Xilinx ZynqMP. > > > Hi Francisco, > > I think we need to look at the VMStateDescription, some state > seems to be missing... > > C

Re: [Qemu-devel] [PATCH v1 1/2] xlnx-zdma: Add a model of the Xilinx ZynqMP generic DMA

2018-05-02 Thread francisco iglesias
On 30 April 2018 at 15:27, Sai Pavan Boddu wrote: > Hi Francisco, > > On Sun, Apr 29, 2018 at 02:43:28AM +0200, Francisco Iglesias wrote: > > Add a model of the generic DMA found on Xilinx ZynqMP. > > > > Signed-off-by: Francisco Iglesias > > Signed-off-by: Edgar E. Iglesias > > --- > > hw/dma

Re: [Qemu-devel] [PATCH v3] linux-user: remove useless padding in flock64 structure

2018-05-02 Thread Richard Henderson
On 05/02/2018 11:25 AM, Laurent Vivier wrote: > --- a/linux-user/arm/target_structs.h > +++ b/linux-user/arm/target_structs.h > @@ -49,4 +49,13 @@ struct target_shmid_ds { > abi_ulong __unused5; > }; > > +#if defined(TARGET_ABI32) > +struct target_oabi_flock64 { Isn't ABI32 implied by the

Re: [Qemu-devel] [PATCH] vhost-user+postcopy: Use qemu_set_nonblock

2018-05-02 Thread Eric Blake
On 05/02/2018 05:55 AM, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Use qemu_set_nonblock rather than a simple fcntl; cleaner and I have no reason to change other flags. Reported-by: Peter Maydell Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost-user.c | 2 +

Re: [Qemu-devel] [PATCH v4 1/2] slirp: Add "query-usernet" QMP command

2018-05-02 Thread Eric Blake
On 05/02/2018 02:30 AM, Fam Zheng wrote: HMP "info usernet" has been available but it isn't ideal for programmed use cases. This closes the gap in QMP by adding a counterpart "query-usernet" command. It is basically translated from the HMP slirp_connection_info() loop, which now calls the QMP imp

Re: [Qemu-devel] [RFC PATCH v3 00/30] replay additions

2018-05-02 Thread Pavel Dovgalyuk
I used --disable-capstone for building under Windows. ⁣Отправлено с помощью BlueMail ​ На 2 Май 2018 г., 21:24, в 21:24, Dominique Fuchs написал:п>C:\msys64\mingw64\bin\ar.exe: creating libfdt/libfdt.a >make[1]: *** No rule to make target >„/home/Dominique/qemu/capstone/capstone.lib“. Stop. >m

Re: [Qemu-devel] [PATCH v12 13/21] migration: Calculate transferred ram correctly

2018-05-02 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > On multifd we send data from more places that main channel. > > Signed-off-by: Juan Quintela > --- > migration/migration.c | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/migration/migration.c b/migration/migrat

Re: [Qemu-devel] [PATCH 9/9] target/arm: Implement FP data-processing (3 source) for fp16

2018-05-02 Thread Richard Henderson
On 05/01/2018 04:21 AM, Alex Bennée wrote: > > Richard Henderson writes: > >> We missed all of the scalar fp16 fma operations. >> >> Signed-off-by: Richard Henderson >> --- >> target/arm/translate-a64.c | 48 >> ++ >> 1 file changed, 48 insertions(+

  1   2   3   4   >