Re: [Qemu-devel] [RFC v1 2/3] intel_iommu: add 256 bits qi_desc support

2019-02-13 Thread Tian, Kevin
> From: Peter Xu [mailto:pet...@redhat.com] > Sent: Thursday, February 14, 2019 3:14 PM > > > > > > When 256 bits invalidation descriptor is used, the guest driver > > > should be responsible to fill in zeros into reserved fields. > > > > > > Another question: is val[2] & val[3] used in any place

Re: [Qemu-devel] [PATCH v3 1/2] hostmem: simplify ifdef-s in file_backend_memory_alloc()

2019-02-13 Thread Wei Yang
Maybe change the title s/hotmem/hostmem-file/ would be more proper. I missed this in previous review. On Thu, Feb 14, 2019 at 11:10:03AM +0800, Stefan Hajnoczi wrote: >From: Igor Mammedov > >cleanup file_backend_memory_alloc() by using one CONFIG_POSIX ifdef >instead of several ones within

Re: [Qemu-devel] [RFC v1 2/3] intel_iommu: add 256 bits qi_desc support

2019-02-13 Thread Peter Xu
On Thu, Feb 14, 2019 at 02:27:30PM +0800, Yi Sun wrote: > On 19-02-14 11:24:35, Peter Xu wrote: > > On Thu, Feb 14, 2019 at 09:52:04AM +0800, Yi Sun wrote: > > > > [...] > > > > > > > > > /* Fetch an Invalidation Descriptor from the Invalidation Queue > > > > > > > */ > > > > > > > -static bool

Re: [Qemu-devel] [Qemu-ppc] [PATCH 13/13] spapr: add KVM support to the 'dual' machine

2019-02-13 Thread Cédric Le Goater
On 2/14/19 4:35 AM, David Gibson wrote: > On Wed, Feb 13, 2019 at 11:07:49AM +0100, Greg Kurz wrote: >> On Wed, 13 Feb 2019 09:22:46 +0100 >> Cédric Le Goater wrote: >> >>> On 2/13/19 2:32 AM, David Gibson wrote: On Tue, Feb 12, 2019 at 08:18:19AM +0100, Cédric Le Goater wrote: > On 2/1

Re: [Qemu-devel] [PATCH v4 1/2] pcie: Add a simple PCIe ACS (Access Control Services) helper function

2019-02-13 Thread Knut Omang
On Wed, 2019-02-13 at 12:13 -0700, Alex Williamson wrote: > On Wed, 13 Feb 2019 10:29:58 +0100 > Knut Omang wrote: > > > Add a helper function to add PCIe capability for Access Control Services > > (ACS) > > This is redundant to the commit title. > > > ACS support in the associated root port is

[Qemu-devel] [Bug 1815078] Re: Qemu 3.1.0 risc-v mie.MEIE

2019-02-13 Thread RTOS Pharos
So I tried it but got the error: ERROR: missing file ../qemu-3.1.0/ui/keycodemapdb/README This is not a GIT checkout but module content appears to be missing. Do not use 'git archive' or GitHub download links to acquire QEMU source archives. Non-GIT builds are only supported with source archives

Re: [Qemu-devel] [PATCH] configure: improve usbfs check

2019-02-13 Thread Thomas Huth
On 2019-02-13 22:18, Thomas Petazzoni wrote: > The current check to test if usbfs support should be compiled or not > solely relies on the presence of , without > actually checking that all definition used by Qemu are provided by > this header file. > > With sufficiently old kernel headers, may b

Re: [Qemu-devel] [PATCH 0/2] spapr/irq: remove the XICS offset adjustment for the dual machine

2019-02-13 Thread Cédric Le Goater
On 2/14/19 1:49 AM, David Gibson wrote: > On Wed, Feb 13, 2019 at 10:07:54PM +0100, Cédric Le Goater wrote: >> Hello, >> >> When using the 'dual' interrupt mode, the source numbers of both sPAPR >> IRQ backends are aligned to share a common IRQ number space and to use >> a similar mapping of the ma

[Qemu-devel] [PATCH RESEND v4] drive-mirror: add incremental mode

2019-02-13 Thread mahaocong
From: mahaocong This patch adds possibility to start mirroring with user-created-bitmap. On full mode, mirror create a non-named-bitmap by scanning whole block-chain, and on top mode, mirror create a bitmap by scanning the top block layer. So I think I can copy a user-created-bitmap and use it as

[Qemu-devel] [Bug 1815078] Re: Qemu 3.1.0 risc-v mie.MEIE

2019-02-13 Thread RTOS Pharos
OK, I'll give it a try and give you some feedback. Thanks -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1815078 Title: Qemu 3.1.0 risc-v mie.MEIE Status in QEMU: Fix Committed Bug description:

Re: [Qemu-devel] [PATCH v3 3/3] blkdebug: Add latency injection rule type

2019-02-13 Thread Markus Armbruster
Marc Olson via Qemu-devel writes: > On 2/13/19 7:48 AM, Max Reitz wrote: >> On 12.02.19 22:21, Marc Olson wrote: >>> On 1/11/19 7:00 AM, Max Reitz wrote: On 12.11.18 08:06, Marc Olson wrote: >> [...] >> > diff --git a/qapi/block-core.json b/qapi/block-core.json > index d4fe710..72f78

Re: [Qemu-devel] [RFC v1 2/3] intel_iommu: add 256 bits qi_desc support

2019-02-13 Thread Yi Sun
On 19-02-14 11:24:35, Peter Xu wrote: > On Thu, Feb 14, 2019 at 09:52:04AM +0800, Yi Sun wrote: > > [...] > > > > > > > /* Fetch an Invalidation Descriptor from the Invalidation Queue */ > > > > > > -static bool vtd_get_inv_desc(dma_addr_t base_addr, uint32_t offset, > > > > > > +static bool vtd

[Qemu-devel] [PATCH] softfloat: Support float_round_to_odd more places

2019-02-13 Thread Richard Henderson
Previously this was only supported for roundAndPackFloat64. Include support in round_canonical, round_to_int, roundAndPackFloat32, roundAndPackInt32, roundAndPackInt64, roundAndPackUint64. This does not include any of the floatx80 routines, as we do not have users for that rounding mode there. Si

Re: [Qemu-devel] [PATCH 2/2] pcie: Don't allow extended config space access via conventional PCI bridges

2019-02-13 Thread Alexey Kardashevskiy
On 14/02/2019 16:08, David Gibson wrote: > In hardware it's possible, if odd, to have a configuration like: > > PCIe host bridge > \- PCIe to PCI bridge >\- PCI to PCIe bridge > \- PCIe device > > The PCIe extended configuration space on the device won't be > accessible to the host,

Re: [Qemu-devel] [PATCH 0/4] target/arm: Implement ARMv8.2-FHM

2019-02-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214034345.24722-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 0/4] target/arm: Implement ARMv8.2-FHM Type: series Message-id: 201902140343

Re: [Qemu-devel] [PATCH v4] drive-mirror: add incremental mode

2019-02-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214052809.44336-1-mahaocong_w...@163.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v4] drive-mirror: add incremental mode Message-id: 20190214052809.44336-1-mahaocon

Re: [Qemu-devel] [PATCH v4] drive-mirror: add incremental mode

2019-02-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214052809.44336-1-mahaocong_w...@163.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214052809.44336-1-mahaocong_w...@163.com Subject: [Qemu-devel] [PATCH v4] drive-mirror: add in

Re: [Qemu-devel] [PATCH 0/2] Some small cleanups and corrections to PCI-E handling

2019-02-13 Thread David Gibson
On Thu, Feb 14, 2019 at 04:08:06PM +1100, David Gibson wrote: > Here are a couple of cleanups for PCI-E handling which arose out of > some other work I have in progress. At least the first of these > patches has been posted before as part of a different series, but > wasn't ready to go at the time

Re: [Qemu-devel] [PATCH v2 12/15] s390x/tcg: Implement XxC and checks for most FP instructions

2019-02-13 Thread Richard Henderson
On 2/13/19 11:53 AM, David Hildenbrand wrote: > On 13.02.19 20:31, Richard Henderson wrote: >> On 2/13/19 6:33 AM, David Hildenbrand wrote: >>> With the floating-point extension facility >>> - CONVERT FROM LOGICAL >>> - CONVERT TO LOGICAL >>> - CONVERT TO FIXED >>> - CONVERT FROM FIXED >>> - LOAD F

[Qemu-devel] [PATCH v4] drive-mirror: add incremental mode

2019-02-13 Thread mahaocong
From: mahaocong This patch adds possibility to start mirroring with user-created-bitmap. On full mode, mirror create a non-named-bitmap by scanning whole block-chain, and on top mode, mirror create a bitmap by scanning the top block layer. So I think I can copy a user-created-bitmap and use it as

[Qemu-devel] [PATCH qemu v2 2/4] vfio/spapr: Rename local systempagesize variable

2019-02-13 Thread Alexey Kardashevskiy
The "systempagesize" name suggests that it is the host system page size while it is the smallest page size of memory backing the guest RAM so let's rename it to stop confusion. This should cause no behavioral change. Signed-off-by: Alexey Kardashevskiy --- hw/vfio/spapr.c | 6 +++--- 1 file chan

[Qemu-devel] [PATCH qemu v2 4/4] spapr: Support NVIDIA V100 GPU with NVLink2

2019-02-13 Thread Alexey Kardashevskiy
NVIDIA V100 GPUs have on-board RAM which is mapped into the host memory space and accessible as normal RAM via an NVLink bus. The VFIO-PCI driver implements special regions for such GPUs and emulates an NVLink bridge. NVLink2-enabled POWER9 CPUs also provide address translation services which inclu

[Qemu-devel] [PATCH qemu v2 3/4] vfio: Make vfio_get_region_info_cap public

2019-02-13 Thread Alexey Kardashevskiy
This makes vfio_get_region_info_cap() to be used in quirks. Signed-off-by: Alexey Kardashevskiy --- include/hw/vfio/vfio-common.h | 2 ++ hw/vfio/common.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-commo

[Qemu-devel] [PATCH qemu v2 1/4] vfio/spapr: Fix indirect levels calculation

2019-02-13 Thread Alexey Kardashevskiy
The current code assumes that we can address more bits on a PCI bus for DMA than we really can but there is no way knowing the actual limit. This makes a better guess for the number of levels and if the kernel fails to allocate that, this increases the level numbers till succeeded or reached the 6

[Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-13 Thread Alexey Kardashevskiy
This is for passing through NVIDIA V100 GPUs on POWER9 systems. This implements a subdriver for NVIDIA V100 GPU with coherent memory and NPU/ATS support available in the POWER9 CPU. 1/4 is a preparation for bigger DMA windows. 2/4 is a small cleanup. Here is the kernel driver: https://git.kernel

[Qemu-devel] [PATCH qemu] pci: Move NVIDIA vendor id to the rest of ids

2019-02-13 Thread Alexey Kardashevskiy
sPAPR code will use it too so move it from VFIO to the common code. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Reviewed-by: Alistair Francis --- Previous version was RFC, this is is not. --- include/hw/pci/pci_ids.h | 2 ++ hw/vfio/pci-quirks.c | 2 -- 2 files changed

[Qemu-devel] [PATCH 1/2] pci: Simplify pci_bus_is_root()

2019-02-13 Thread David Gibson
pci_bus_is_root() currently relies on a method in the PCIBusClass. But it's always known if a PCI bus is a root bus when we create it, so using a dynamic method is overkill. This replaces it with an IS_ROOT bit in a new flags field, which is set on root buses and otherwise clear. As a bonus this

[Qemu-devel] [PATCH 0/2] Some small cleanups and corrections to PCI-E handling

2019-02-13 Thread David Gibson
Here are a couple of cleanups for PCI-E handling which arose out of some other work I have in progress. At least the first of these patches has been posted before as part of a different series, but wasn't ready to go at the time. David Gibson (2): pci: Simplify pci_bus_is_root() pcie: Don't a

[Qemu-devel] [PATCH 2/2] pcie: Don't allow extended config space access via conventional PCI bridges

2019-02-13 Thread David Gibson
In hardware it's possible, if odd, to have a configuration like: PCIe host bridge \- PCIe to PCI bridge \- PCI to PCIe bridge \- PCIe device The PCIe extended configuration space on the device won't be accessible to the host, because the cycles can't traverse the conventional PCI bus on

Re: [Qemu-devel] [PATCH qemu 0/3] spapr_pci, vfio: NVIDIA V100 + P9 passthrough

2019-02-13 Thread David Gibson
On Mon, Feb 11, 2019 at 06:46:32PM +1100, Alexey Kardashevskiy wrote: > > > On 11/02/2019 17:07, Alex Williamson wrote: > > On Mon, 11 Feb 2019 14:49:49 +1100 > > Alexey Kardashevskiy wrote: > > > >> On 08/02/2019 16:28, David Gibson wrote: > >>> On Thu, Feb 07, 2019 at 08:26:20PM -0700, Alex W

Re: [Qemu-devel] [PATCH qemu 0/3] spapr_pci, vfio: NVIDIA V100 + P9 passthrough

2019-02-13 Thread David Gibson
On Mon, Feb 11, 2019 at 02:49:49PM +1100, Alexey Kardashevskiy wrote: > > > On 08/02/2019 16:28, David Gibson wrote: > > On Thu, Feb 07, 2019 at 08:26:20PM -0700, Alex Williamson wrote: > >> On Fri, 8 Feb 2019 13:29:37 +1100 > >> Alexey Kardashevskiy wrote: > >> > >>> On 08/02/2019 02:18, Alex W

[Qemu-devel] [PATCH 5/5] virtio-balloon: Safely handle BALLOON_PAGE_SIZE < host page size

2019-02-13 Thread David Gibson
The virtio-balloon always works in units of 4kiB (BALLOON_PAGE_SIZE), but we can only actually discard memory in units of the host page size. Now, we handle this very badly: we silently ignore balloon requests that aren't host page aligned, and for requests that are host page aligned we discard th

[Qemu-devel] [PATCH 4/5] virtio-balloon: Use ram_block_discard_range() instead of raw madvise()

2019-02-13 Thread David Gibson
Currently, virtio-balloon uses madvise() with MADV_DONTNEED to actually discard RAM pages inserted into the balloon. This is basically a Linux only interface (MADV_DONTNEED exists on some other platforms, but doesn't always have the same semantics). It also doesn't work on hugepages and has some

[Qemu-devel] [PATCH 2/5] virtio-balloon: Corrections to address verification

2019-02-13 Thread David Gibson
The virtio-balloon device's verification of the address given to it by the guest has a number of faults: * The addresses here are guest physical addresses, which should be 'hwaddr' rather than 'ram_addr_t' (the distinction is admittedly pretty subtle and confusing) * We don't ch

[Qemu-devel] [PATCH 0/5] Improve balloon handling of pagesizes other than 4kiB

2019-02-13 Thread David Gibson
I posted some RFCs for this back in December, but didn't wrap it up in time for 3.1. Posting again for inclusion in 4.0. The virtio-balloon devices was never really thought out for cases other than 4kiB pagesize on both guest and host. It works in some cases, but in others can be ineffectual or

[Qemu-devel] [PATCH 1/5] virtio-balloon: Remove unnecessary MADV_WILLNEED on deflate

2019-02-13 Thread David Gibson
When the balloon is inflated, we discard memory place in it using madvise() with MADV_DONTNEED. And when we deflate it we use MADV_WILLNEED, which sounds like it makes sense but is actually unnecessary. The misleadingly named MADV_DONTNEED just discards the memory in question, it doesn't set any

[Qemu-devel] [PATCH 3/5] virtio-balloon: Rework ballon_page() interface

2019-02-13 Thread David Gibson
This replaces the balloon_page() internal interface with ballon_inflate_page(), with a slightly different interface. The new interface will make future alterations simpler. Signed-off-by: David Gibson Reviewed-by: David Hildenbrand Reviewed-by: Michael S. Tsirkin --- hw/virtio/virtio-balloon.

[Qemu-devel] [PATCH v4 06/11] virtio: get avail bytes check for packed ring

2019-02-13 Thread wexu
From: Wei Xu Add packed ring headcount check. Common part of split/packed ring are kept. Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 197 - 1 file changed, 179 insertions(+), 18 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/vi

[Qemu-devel] [PULL 0/1] Block patches

2019-02-13 Thread Stefan Hajnoczi
The following changes since commit 0b5e750bea635b167eb03d86c3d9a09bbd43bc06: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2019-02-12 10:53:37 +) are available in the Git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request f

[Qemu-devel] [PULL 1/1] virtio-blk: set correct config size for the host driver

2019-02-13 Thread Stefan Hajnoczi
From: Changpeng Liu Commit caa1ee43 "vhost-user-blk: add discard/write zeroes features support" added fields to struct virtio_blk_config. This changes the size of the config space and breaks migration from QEMU 3.1 and older: qemu-system-ppc64: get_pci_config_device: Bad config data: i=0x10 read

Re: [Qemu-devel] [PATCH v2] blockdev: acquire aio_context for bitmap add/remove

2019-02-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190212200750.27521-1-js...@redhat.com/ Hi, This series failed the docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGIN === #!/

[Qemu-devel] [PATCH v4 09/11] virtio-net: update the head descriptor in a chain lastly

2019-02-13 Thread wexu
From: Wei Xu This is a helper for packed ring. To support packed ring, the head descriptor in a chain should be updated lastly since no 'avail_idx' like in packed ring to explicitly tell the driver side that all payload is ready after having done the chain, so the head is always visible immediat

[Qemu-devel] [PATCH v4 08/11] virtio: event suppression support for packed ring

2019-02-13 Thread wexu
From: Wei Xu Difference between 'avail_wrap_counter' and 'last_avail_wrap_counter': For Tx(guest transmitting), they are the same after each pop of a desc. For Rx(guest receiving), they are also the same when there are enough descriptors to carry the payload for a packet(e.g. usually 16 descs ar

[Qemu-devel] [PATCH v4 10/11] virtio: migration support for packed ring

2019-02-13 Thread wexu
From: Wei Xu Both userspace and vhost-net/user are supported with this patch. A new subsection is introduced for packed ring, only 'last_avail_idx' and 'last_avail_wrap_counter' are saved/loaded presumably based on all the others relevant data(inuse, used/avail index and wrap count should be the

[Qemu-devel] [PATCH v4 05/11] virtio: queue/descriptor check helpers for packed ring

2019-02-13 Thread wexu
From: Wei Xu These are descriptor available and queue empty check helpers. Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 56 +- 1 file changed, 55 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 54dc0

[Qemu-devel] [PATCH v4 11/11] virtio: CLI and provide packed ring feature bit by default

2019-02-13 Thread wexu
From: Wei Xu Add userspace and vhost kernel/user support. Add CLI "ring_packed=true/false" to enable/disable packed ring provision. Usage: -device virtio-net-pci,netdev=xx,mac=xx:xx:xx:xx:xx:xx,ring_packed=false By default it is provided. Signed-off-by: Wei Xu --- hw/net/vhost_net.c

[Qemu-devel] [PATCH v4 01/11] virtio: rename structure for packed ring

2019-02-13 Thread wexu
From: Wei Xu Redefine packed ring structure according to Qemu nomenclature. Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index a1ff647..eafb4cc 100644 --- a/hw/virtio/virtio.c +++ b/hw/

[Qemu-devel] [PATCH v4 00/11] packed ring virtio-net backends support

2019-02-13 Thread wexu
From: Wei Xu https://github.com/Whishay/qemu.git Userspace and vhost-net backend test has been done with upstream kernel in guest. v3->v4: - add version number to the subject of each patch.(mst) v2->v3: v2/01 - drop it since the header has been synchronized from kernel.(mst & jason)

[Qemu-devel] [PATCH v4 07/11] virtio: fill/flush/pop for packed ring

2019-02-13 Thread wexu
From: Wei Xu last_used_idx/wrap_counter should be equal to last_avail_idx/wrap_counter after a successful flush. Batching in vhost-net & dpdk testpmd is not equivalently supported in userspace backend, but a chained descriptors for Rx is similarly presented as a lightweight batch, so a write bar

[Qemu-devel] [PATCH v4 04/11] virtio: initialize wrap counter for packed ring

2019-02-13 Thread wexu
From: Wei Xu Set to 'true' by default due to spec. Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 1a98e61..54dc098 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -1238,6 +1238,9 @@ v

[Qemu-devel] [PATCH v4 03/11] virtio: initialize packed ring region

2019-02-13 Thread wexu
From: Wei Xu Initialize packed ring memory region with correct size and attribute. Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 6769e54..1a98e61 100644 --- a/hw/vir

[Qemu-devel] [PATCH v4 02/11] virtio: device/driver area size calculation helper for split ring

2019-02-13 Thread wexu
From: Wei Xu There is slight size difference between split/packed rings. This is a refactor of split ring as well as a helper to expand device and driver area size calculation for packed ring. Signed-off-by: Wei Xu --- hw/virtio/virtio.c | 16 ++-- 1 file changed, 10 insertions(+)

Re: [Qemu-devel] [PATCH v3 2/2] hostmem-file: reject invalid pmem file sizes

2019-02-13 Thread Wei Yang
On Thu, Feb 14, 2019 at 11:10:04AM +0800, Stefan Hajnoczi wrote: >Guests started with NVDIMMs larger than the underlying host file produce >confusing errors inside the guest. This happens because the guest >accesses pages beyond the end of the file. > >Check the pmem file size on startup and print

Re: [Qemu-devel] [PATCH 0/4] target/arm: Implement ARMv8.2-FHM

2019-02-13 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214034345.24722-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 0/4] target/arm: Implement ARMv8.2-FHM Message-id: 20190214034345.24722-1-ri

[Qemu-devel] [PATCH 1/4] target/arm: Split out recompute_hflags et al

2019-02-13 Thread Richard Henderson
We will use these to minimize the computation for every call to cpu_get_tb_cpu_state. For now, the env->hflags variable is not used. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 22 +++- target/arm/helper.h| 3 + target/arm/internals.h | 3 + target/arm/helper.c| 2

[Qemu-devel] [PATCH 4/4] target/arm: Rely on hflags correct in cpu_get_tb_cpu_state

2019-02-13 Thread Richard Henderson
This is the payoff. >From perf record -g data of ubuntu 18 boot and shutdown: BEFORE: - 23.02% 2.82% qemu-system-aar [.] helper_lookup_tb_ptr - 20.22% helper_lookup_tb_ptr + 10.05% tb_htable_lookup - 9.13% cpu_get_tb_cpu_state 3.20% aa64_va_parameters_both

[Qemu-devel] [PATCH 3/4] target/arm: Assert hflags is correct in cpu_get_tb_cpu_state

2019-02-13 Thread Richard Henderson
Make sure that we are updating env->hflags everywhere required. Signed-off-by: Richard Henderson --- target/arm/helper.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/arm/helper.c b/target/arm/helper.c index d8249f0eae..3c8724883d 100644 --- a/target/arm/helper.c +++ b/target/arm/

[Qemu-devel] [PATCH 0/4] target/arm: Reduce overhead of cpu_get_tb_cpu_state

2019-02-13 Thread Richard Henderson
We've talked about this before, caching state to reduce the amount of computation that happens looking up each TB. I know that Peter has been concerned that we would not be able to reliably maintain all of the places that need to be updates to keep this up-to-date. Well, modulo dirty tricks with

[Qemu-devel] [PATCH 2/4] target/arm: Rebuild hflags at el changes and MSR writes

2019-02-13 Thread Richard Henderson
Now setting, but not relying upon, env->hflags. Signed-off-by: Richard Henderson --- target/arm/internals.h | 1 + linux-user/syscall.c | 1 + target/arm/cpu.c | 1 + target/arm/helper-a64.c| 3 +++ target/arm/helper.c| 2 ++ target/arm/machine.c | 1 +

[Qemu-devel] [PATCH 3/4] target/arm: Implement VFMAL and VFMSL for aarch32

2019-02-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/cpu.h | 5 ++ target/arm/translate.c | 104 + 2 files changed, 80 insertions(+), 29 deletions(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 15085a94ff..84d24044fe 100644 --- a/target/arm/c

[Qemu-devel] [PATCH 1/4] target/arm: Add helpers for FMLAL and FMLSL

2019-02-13 Thread Richard Henderson
Note that float16_to_float32 rightly squashes SNaN to QNaN. But of course pickNaNMulAdd, for ARM, selects SNaNs first. So we have to preserve SNaN long enough for the correct NaN to be selected. Thus float16_to_float32_by_bits. Signed-off-by: Richard Henderson --- target/arm/helper.h | 9

[Qemu-devel] [PATCH 2/4] target/arm: Implement FMLAL and FMLSL for aarch64

2019-02-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/cpu.h | 5 target/arm/translate-a64.c | 49 +- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 47238e4245..15085a94ff 100644 --- a/target/ar

[Qemu-devel] [PATCH 4/4] target/arm: Enable ARMv8.2-FHM for -cpu max

2019-02-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/arm/cpu.c | 1 + target/arm/cpu64.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index edf6e0e1f1..f4aa6202f5 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -2002,6 +2002,7 @@ static void arm_max_

[Qemu-devel] [PATCH 0/4] target/arm: Implement ARMv8.2-FHM

2019-02-13 Thread Richard Henderson
Tested with RISU vs Foundation Model, both a32 and a64. I am aware of a trivial conflict with the ARMv8.3-JSConv patch set. I just thought it was easier to manage separately based on master. r~ Richard Henderson (4): target/arm: Add helpers for FMLAL and FMLSL target/arm: Implement FMLAL a

Re: [Qemu-devel] [PATCH v3 00/11] packed ring virtio-net backends support

2019-02-13 Thread Wei Xu
On Wed, Feb 13, 2019 at 09:17:57AM -0500, Michael S. Tsirkin wrote: > On Wed, Feb 13, 2019 at 08:25:35AM -0500, w...@redhat.com wrote: > > From: Wei Xu > > > > https://github.com/Whishay/qemu.git > > > > Userspace and vhost-net backedn test has been done with upstream kernel > > in guest. > >

Re: [Qemu-devel] [PATCH v4] virtio-blk: set correct config size for the host driver

2019-02-13 Thread Stefan Hajnoczi
On Wed, Feb 13, 2019 at 06:45:20PM +0100, Stefano Garzarella wrote: > I'm not sure if using the feature_sizes array the migration works well. > I mean if we have QEMU 3.1 with a single queue and we want to migrate to > QEMU 4.0 with a single queue, the config_size could be different, > because VIRT

Re: [Qemu-devel] [PATCH 13/13] spapr: add KVM support to the 'dual' machine

2019-02-13 Thread David Gibson
On Wed, Feb 13, 2019 at 09:22:46AM +0100, Cédric Le Goater wrote: > On 2/13/19 2:32 AM, David Gibson wrote: > > On Tue, Feb 12, 2019 at 08:18:19AM +0100, Cédric Le Goater wrote: > >> On 2/12/19 2:11 AM, David Gibson wrote: > >>> On Mon, Jan 07, 2019 at 07:39:46PM +0100, Cédric Le Goater wrote: > >>

Re: [Qemu-devel] [RFC v1 2/3] intel_iommu: add 256 bits qi_desc support

2019-02-13 Thread Peter Xu
On Thu, Feb 14, 2019 at 09:52:04AM +0800, Yi Sun wrote: [...] > > > > > /* Fetch an Invalidation Descriptor from the Invalidation Queue */ > > > > > -static bool vtd_get_inv_desc(dma_addr_t base_addr, uint32_t offset, > > > > > +static bool vtd_get_inv_desc(IntelIOMMUState *s, > > > > >

Re: [Qemu-devel] [PATCH qemu RFC 3/7] pci: Move NVIDIA vendor id to the rest of ids

2019-02-13 Thread Alex Williamson
On Thu, 14 Feb 2019 13:26:49 +1100 Alexey Kardashevskiy wrote: > Ping? 3 months today :) How about a non-RFC? > On 16/01/2019 15:20, Alexey Kardashevskiy wrote: > > Ping, anyone? > > > > On 14/12/2018 14:36, Alexey Kardashevskiy wrote: > >> > >> > >> On 21/11/2018 05:27, Alistair Francis wro

Re: [Qemu-devel] [PATCH qemu] spapr/rtas: Force big endian compile for rtas

2019-02-13 Thread David Gibson
On Wed, Feb 13, 2019 at 05:00:50PM +1100, Alexey Kardashevskiy wrote: > > > On 01/02/2019 11:40, Alexey Kardashevskiy wrote: > > At the moment the rtas's Makefile uses generic QEMU rules which means > > that when QEMU is compiled on a little endian system, the spapr-rtas.bin > > is compiled as li

Re: [Qemu-devel] [Qemu-ppc] [PATCH 13/13] spapr: add KVM support to the 'dual' machine

2019-02-13 Thread David Gibson
On Wed, Feb 13, 2019 at 11:07:49AM +0100, Greg Kurz wrote: > On Wed, 13 Feb 2019 09:22:46 +0100 > Cédric Le Goater wrote: > > > On 2/13/19 2:32 AM, David Gibson wrote: > > > On Tue, Feb 12, 2019 at 08:18:19AM +0100, Cédric Le Goater wrote: > > >> On 2/12/19 2:11 AM, David Gibson wrote: > > >>

[Qemu-devel] [PATCH v3 2/2] hostmem-file: reject invalid pmem file sizes

2019-02-13 Thread Stefan Hajnoczi
Guests started with NVDIMMs larger than the underlying host file produce confusing errors inside the guest. This happens because the guest accesses pages beyond the end of the file. Check the pmem file size on startup and print a clear error message if the size is invalid. Fixes: https://bugzill

Re: [Qemu-devel] [PATCH v3 00/17] block: local qiov helper

2019-02-13 Thread Stefan Hajnoczi
On Thu, Feb 07, 2019 at 01:24:28PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > Here is a new simple helper for a very often patter > around qemu_iovec_init_external, when we need simple qiov with only > one iov, initialized from external buffer. > > v3: Hi Vladimir, "make check" is

[Qemu-devel] [PATCH v3 1/2] hostmem: simplify ifdef-s in file_backend_memory_alloc()

2019-02-13 Thread Stefan Hajnoczi
From: Igor Mammedov cleanup file_backend_memory_alloc() by using one CONFIG_POSIX ifdef instead of several ones within the function to make it simpler to follow. Signed-off-by: Igor Mammedov Suggested-by: Wei Yang Reviewed-by: Wei Yang Message-Id: <20190213123858.24620-1-imamm...@redhat.com>

[Qemu-devel] [PATCH v3 0/2] hostmem-file: reject invalid pmem file sizes

2019-02-13 Thread Stefan Hajnoczi
v3: * Added Patch 1 by Igor [Wei] * Moved pmem size check after mem_path check [Wei] Guests started with NVDIMMs larger than the underlying host file produce confusing errors inside the guest. This happens because the guest accesses pages beyond the end of the file. Check the pmem file size on

Re: [Qemu-devel] [PATCH v2 6/6] block/dirty-bitmaps: move comment block

2019-02-13 Thread Eric Blake
On 2/13/19 5:23 PM, John Snow wrote: > Simply move the big status enum comment block to above the status > function, and document it as being deprecated. The whole confusing > block can get deleted in three releases time. > > Signed-off-by: John Snow > --- > block/dirty-bitmap.c | 36 +++

Re: [Qemu-devel] [PATCH v2] hostmem-file: reject invalid pmem file sizes

2019-02-13 Thread Stefan Hajnoczi
On Wed, Feb 13, 2019 at 04:13:18PM +0800, Wei Yang wrote: > On Wed, Feb 13, 2019 at 03:14:01PM +0800, Stefan Hajnoczi wrote: > >diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c > >index ba601ce940..d62689179b 100644 > >--- a/backends/hostmem-file.c > >+++ b/backends/hostmem-file.c > >

Re: [Qemu-devel] [PATCH v2 2/6] block/dirty-bitmaps: rename frozen predicate helper

2019-02-13 Thread Eric Blake
On 2/13/19 5:23 PM, John Snow wrote: > "Frozen" was a good description a long time ago, but it isn't adequate now. > Rename the frozen predicate to has_successor to make the semantics of the > predicate more clear to outside callers. > > In the process, remove some calls to frozen() that no longer

Re: [Qemu-devel] [PATCH v2 1/6] block/dirty-bitmap: add recording and busy properties

2019-02-13 Thread Eric Blake
On 2/13/19 5:23 PM, John Snow wrote: > The current API allows us to report a single status, which we've defined as: > > Frozen: has a successor, treated as qmp_locked, may or may not be enabled. > Locked: no successor, qmp_locked. may or may not be enabled. > Disabled: Not frozen or locked, disabl

Re: [Qemu-devel] [PATCH for-next 3/6] blkdebug: Add @iotype error option

2019-02-13 Thread Eric Blake
On 12/3/18 11:52 AM, Max Reitz wrote: > This new error option allows users of blkdebug to inject errors only on > certain kinds of I/O operations. Users usually want to make a very > specific operation fail, not just any; but right now they simply hope > that the event that triggers the error inje

Re: [Qemu-devel] [PATCH for-next 5/6] blkdebug: Inject errors on .bdrv_co_block_status()

2019-02-13 Thread Eric Blake
On 12/3/18 11:52 AM, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > qapi/block-core.json | 5 - > block/blkdebug.c | 8 > 2 files changed, 12 insertions(+), 1 deletion(-) > Reviewed-by: Eric Blake -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919

Re: [Qemu-devel] [PATCH for-next 4/6] blkdebug: Add "none" event

2019-02-13 Thread Eric Blake
On 12/3/18 11:52 AM, Max Reitz wrote: > Together with @iotypes and @sector, this can be used to trap e.g. the > first read or write access to a certain sector without having to know > what happens internally in the block layer, i.e. which "real" events > happen right before such an access. > > Sig

Re: [Qemu-devel] [PATCH for-next 1/6] qemu-img: Move quiet into ImgConvertState

2019-02-13 Thread Eric Blake
On 12/3/18 11:52 AM, Max Reitz wrote: > Move img_convert()'s quiet flag into the ImgConvertState so it is > accessible by nested functions. -q dictates that it suppresses anything > but errors, so if those functions want to emit warnings, they need to > query this flag first. (There currently are

Re: [Qemu-devel] [PATCH qemu RFC 3/7] pci: Move NVIDIA vendor id to the rest of ids

2019-02-13 Thread Alexey Kardashevskiy
Ping? 3 months today :) On 16/01/2019 15:20, Alexey Kardashevskiy wrote: > Ping, anyone? > > On 14/12/2018 14:36, Alexey Kardashevskiy wrote: >> >> >> On 21/11/2018 05:27, Alistair Francis wrote: >>> On Tue, Nov 13, 2018 at 12:42 AM Alexey Kardashevskiy >>> wrote: sPAPR code will use

Re: [Qemu-devel] [PATCH v3 03/12] block: Filtered children access functions

2019-02-13 Thread Eric Blake
On 2/13/19 4:53 PM, Max Reitz wrote: > What bs->file and bs->backing mean depends on the node. For filter > nodes, both signify a node that will eventually receive all R/W > accesses. For format nodes, bs->file contains metadata and data, and > bs->backing will not receive writes -- instead, writ

[Qemu-devel] [Bug 1815078] Re: Qemu 3.1.0 risc-v mie.MEIE

2019-02-13 Thread Palmer Dabbelt
LMK if that patch doesn't fix your issue. QEMU master is pretty stable for RISC-V right now and since there's a handful of intertwined patches the best bet is probably just to use the commit hash above. This should be fixed in the 4.0 release, which is targeted for the middle of April. ** Change

Re: [Qemu-devel] [Qemu-block] [RFC PATCH] coroutines: generate wrapper code

2019-02-13 Thread Stefan Hajnoczi
On Wed, Feb 13, 2019 at 11:09:56AM +0100, Kevin Wolf wrote: > Am 13.02.2019 um 07:58 hat Stefan Hajnoczi geschrieben: > > On Tue, Feb 12, 2019 at 12:58:40PM +0100, Kevin Wolf wrote: > > > Am 12.02.2019 um 04:22 hat Stefan Hajnoczi geschrieben: > > > > On Mon, Feb 11, 2019 at 09:38:37AM +, Vladi

Re: [Qemu-devel] [RFC v1 2/3] intel_iommu: add 256 bits qi_desc support

2019-02-13 Thread Yi Sun
On 19-02-13 18:42:24, Peter Xu wrote: > On Wed, Feb 13, 2019 at 05:00:41PM +0800, Yi Sun wrote: > > [...] > > > > > > > > > /* context entry operations */ > > > > #define vtd_get_ce_size(s, ce) \ > > > > @@ -65,6 +66,9 @@ > > > > #define vtd_pe_get_slpt_base(pe) ((pe)->val[0] & > > > > VTD_

Re: [Qemu-devel] [RFC] arm: Allow system registers for KVM guests to be changed by QEMU code

2019-02-13 Thread gengdongjiu
I think Peter's patch is good, I will resubmit my series patches based on this. On 2019/2/14 4:18, Alex Bennée wrote: > > Peter Maydell writes: > >> On Wed, 13 Feb 2019 at 16:29, Alex Bennée wrote: >>> >>> >>> Peter Maydell writes: >>> At the moment the Arm implementations of kvm_arch_{g

Re: [Qemu-devel] [PATCH] spapr: fix out of bounds write in spapr_populate_drmem_v2

2019-02-13 Thread David Gibson
On Wed, Feb 13, 2019 at 03:29:26PM -0200, Fabiano Rosas wrote: > buf_len is uint8_t which is not large enough to hold the result of: > > nr_entries * sizeof(struct sPAPRDrconfCellV2) + sizeof(uint32_t); > > for a nr_entries greater than 10. > > This causes the allocated buffer 'int_buf' to be

Re: [Qemu-devel] [PATCH 0/2] spapr/irq: remove the XICS offset adjustment for the dual machine

2019-02-13 Thread David Gibson
On Wed, Feb 13, 2019 at 10:07:54PM +0100, Cédric Le Goater wrote: > Hello, > > When using the 'dual' interrupt mode, the source numbers of both sPAPR > IRQ backends are aligned to share a common IRQ number space and to use > a similar mapping of the machine qemu_irq array which is indexed by > the

[Qemu-devel] [PATCH] i386, acpi: check acpi_memory_hotplug capacity in pre_plug

2019-02-13 Thread Wei Yang
Currently we do device realization like below: hotplug_handler_pre_plug() dc->realize() hotplug_handler_plug() Before we do device realization and plug, we would allocate necessary resources and check the capacity. While we leave acpi_memory_hotplug capacity check in the last step. This

Re: [Qemu-devel] [PATCH v6 00/35] target/riscv: Convert to decodetree

2019-02-13 Thread Palmer Dabbelt
On Wed, 13 Feb 2019 01:06:41 PST (-0800), Bastian Koppelmann wrote: On 2/13/19 3:15 AM, Palmer Dabbelt wrote: On Tue, Feb 12, 2019 at 3:21 PM Palmer Dabbelt wrote: [snip] Do you, by any chance, have a v7? It looks like there's quite a few merge conflicts here, and while I'm OK fixing them

Re: [Qemu-devel] [edk2] nonzero LUN on USB Bulk Only Transfer fails with QEMU+edk2

2019-02-13 Thread Laszlo Ersek
On 02/13/19 18:00, Philippe Mathieu-Daudé wrote: > On 2/13/19 9:37 AM, Laszlo Ersek wrote: >> >> using QEMU, when I specify a nonzero LUN for the hard disk that sits on >> the "SCSI bus" that embodies the USB Bulk Only Transfer device, then >> UsbMassStorageDxe fails to recognize the hard disk. >>

Re: [Qemu-devel] [PATCH v3 0/3] Trivial cleanup in hw/acpi

2019-02-13 Thread Wei Yang
On Wed, Feb 13, 2019 at 02:45:01PM +0100, Laurent Vivier wrote: >On 13/02/2019 09:56, Philippe Mathieu-Daudé wrote: >> Hi Laurent, >> >> On 2/13/19 9:49 AM, Laurent Vivier wrote: >>> On 12/02/2019 06:34, Michael S. Tsirkin wrote: On Tue, Feb 12, 2019 at 01:22:24PM +0800, Wei Yang wrote: >

Re: [Qemu-devel] [PULL 0/3] Bitmaps patches

2019-02-13 Thread John Snow
On 2/13/19 6:49 PM, John Snow wrote: > The following changes since commit 0b5e750bea635b167eb03d86c3d9a09bbd43bc06: > > Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' > into staging (2019-02-12 10:53:37 +) > > are available in the Git repository at: > > https:

[Qemu-devel] [PULL 3/3] blockdev: acquire aio_context for bitmap add/remove

2019-02-13 Thread John Snow
When bitmaps are persistent, they may incur a disk read or write when bitmaps are added or removed. For configurations like virtio-dataplane, failing to acquire this lock will abort QEMU when disk IO occurs. We used to acquire aio_context as part of the bitmap lookup, so re-introduce the lock for

[Qemu-devel] [PULL 1/3] dirty-bitmap: Expose persistent flag to 'query-block'

2019-02-13 Thread John Snow
From: Eric Blake Since qemu currently doesn't flush persistent bitmaps to disk until shutdown (which might be MUCH later), it's useful if 'query-block' at least shows WHICH bitmaps will (eventually) make it to persistent storage. Update affected iotests. Signed-off-by: Eric Blake Reviewed-by:

[Qemu-devel] [PATCH v2 4/6] block/dirty-bitmap: explicitly lock bitmaps with successors

2019-02-13 Thread John Snow
Instead of implying a locked status, make it explicit. Now, bitmaps in use by migration, NBD or backup operations are all treated the same way with the same code paths. Signed-off-by: John Snow Reviewed-by: Eric Blake --- block/dirty-bitmap.c | 9 + 1 file changed, 5 insertions(+), 4 de

[Qemu-devel] [PULL 2/3] block/dirty-bitmap: Documentation and Comment fixups

2019-02-13 Thread John Snow
The meaning of the states has changed subtly over time, this should bring the understanding more in-line with the current, actual usages. Reported-by: Eric Blake Signed-off-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy Message-id: 20190202011048.12343-1-js...@

  1   2   3   4   5   >