[Qemu-devel] [Bug 1523246] Re: Virtio-blk does not support TRIM

2019-04-12 Thread Thomas Huth
The DISCARD feature has now been implemented in QEMU, too: https://git.qemu.org/?p=qemu.git;a=commitdiff;h=37b06f8d46fe602e630e4 ** Changed in: qemu Status: Confirmed => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to

[Qemu-devel] [Bug 1486278] Re: 'info vnc' monitor command does not show websocket information

2019-04-12 Thread Thomas Huth
I think this has been fixed in QEMU v2.10.0 with this commit here: https://git.qemu.org/?p=qemu.git;a=commitdiff;h=0a9667ecdb6d7da90a2ef64 ** Changed in: qemu Status: New => Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed

Re: [Qemu-devel] [RISU v2] i386: Add avx512 state to reginfo_t

2019-04-12 Thread Richard Henderson
On 4/11/19 4:05 PM, Jan Bobek wrote: > Looks fine to me. I suppose if I had written it, I would have included > more comments and/or #define's to make some bits more obvious (all the > magic constants look a bit scary until you read the Intel manual), but > nevermind that. You're right that it abs

Re: [Qemu-devel] [PATCH for-4.1] hw/input: Add a CONFIG_PS2 switch for the ps2.c file

2019-04-12 Thread Paolo Bonzini
On 11/04/19 20:22, Thomas Huth wrote: > ps2.c only needs to be compiled if we are building pckbd.c or pl050.c. > > Signed-off-by: Thomas Huth > --- > hw/input/Kconfig | 5 + > hw/input/Makefile.objs | 2 +- > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff --git a/hw/input/Kc

Re: [Qemu-devel] [PATCH] target/i386: sev: add 'sev-max-guests' field to 'query-sev-capabilities'

2019-04-12 Thread Laszlo Ersek
On 04/11/19 21:02, Singh, Brijesh wrote: > > > On 4/11/19 1:10 PM, Laszlo Ersek wrote: >> On 04/11/19 19:59, Singh, Brijesh wrote: >>> There are limited numbers of the SEV guests that can be run concurrently. >>> A management applications may need to know this limit so that it can place >>> SEV V

Re: [Qemu-devel] [PATCH] target/i386: sev: add 'sev-max-guests' field to 'query-sev-capabilities'

2019-04-12 Thread Paolo Bonzini
On 11/04/19 21:02, Singh, Brijesh wrote: > > > On 4/11/19 1:10 PM, Laszlo Ersek wrote: >> On 04/11/19 19:59, Singh, Brijesh wrote: >>> There are limited numbers of the SEV guests that can be run concurrently. >>> A management applications may need to know this limit so that it can place >>> SEV V

Re: [Qemu-devel] [PATCH for 4.1 v3 6/6] riscv: Add a generic spike machine

2019-04-12 Thread Ian Campbell
On Thu, 2019-04-11 at 13:35 -0700, Alistair Francis wrote: > > > > +if (!qtest_enabled()) { > > > > +info_report("The Spike v1.09.1 machine has been > > > > depreceated. " > > > > +"Please use the deneric spike machine and > > > > specify the ISA " > > > > "generic"

Re: [Qemu-devel] [PATCH v2] target/i386: kvm: add VMX migration blocker

2019-04-12 Thread Paolo Bonzini
On 10/04/19 20:26, Cole Robinson wrote: > On 11/20/18 6:44 AM, Dr. David Alan Gilbert wrote: >> * Paolo Bonzini (pbonz...@redhat.com) wrote: >>> Nested VMX does not support live migration yet. Add a blocker >>> until that is worked out. >>> >>> Nested SVM only does not support it, but unfortunatel

Re: [Qemu-devel] [PATCH 1/2] pflash_cfi01: New pflash_cfi01_legacy_drive()

2019-04-12 Thread Markus Armbruster
Laszlo Ersek writes: > On 04/11/19 21:50, Laszlo Ersek wrote: >> On 04/11/19 21:35, Laszlo Ersek wrote: >>> On 04/11/19 15:56, Markus Armbruster wrote: Factored out of pc_system_firmware_init() so the next commit can reuse it in hw/arm/virt.c. Signed-off-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v2] target/i386: sev: add 'sev-max-guests' field to 'query-sev-capabilities'

2019-04-12 Thread Laszlo Ersek
On 04/12/19 01:55, Singh, Brijesh wrote: > There are limited numbers of the SEV guests that can be run concurrently. > A management applications may need to know this limit so that it can place > SEV VMs on hosts which have suitable resources available. > > Currently, this limit is not exposed to

Re: [Qemu-devel] [PATCH for-4.1] roms: assert if max rom size is less than the used size

2019-04-12 Thread Stefano Garzarella
On Thu, Apr 11, 2019 at 01:28:18PM +0200, Igor Mammedov wrote: > It would ensure that we would notice attempt to write beyond > the allocated buffer. In case of MemoryRegion backed ROM it's > the host buffer and the guest RAM otherwise. > > assert can be triggered with: > dd if=/dev/zero of=/tmp

Re: [Qemu-devel] [PATCH RFC 2/3] pxtool: Add new qemu-img command info generation tool

2019-04-12 Thread Markus Armbruster
John Snow writes: > On 4/11/19 2:22 AM, Markus Armbruster wrote: >> John Snow writes: [...] >>> I suspect that work *IS* something that might brush up against / should >>> use (or extend) QAPI code. >> >> Seems likely. >> >>> Then, I'd like to find a way to split qemu-img.texi into sub-command

Re: [Qemu-devel] [PATCH for-4.1] roms: assert if max rom size is less than the used size

2019-04-12 Thread Paolo Bonzini
On 12/04/19 10:02, Stefano Garzarella wrote: > On Thu, Apr 11, 2019 at 01:28:18PM +0200, Igor Mammedov wrote: >> It would ensure that we would notice attempt to write beyond >> the allocated buffer. In case of MemoryRegion backed ROM it's >> the host buffer and the guest RAM otherwise. >> >> assert

Re: [Qemu-devel] [PATCH v2] target/i386: sev: add 'sev-max-guests' field to 'query-sev-capabilities'

2019-04-12 Thread Paolo Bonzini
On 12/04/19 09:58, Laszlo Ersek wrote: > On 04/12/19 01:55, Singh, Brijesh wrote: >> There are limited numbers of the SEV guests that can be run concurrently. >> A management applications may need to know this limit so that it can place >> SEV VMs on hosts which have suitable resources available. >

Re: [Qemu-devel] [RFC PATCH 3/3] hw/acpi: Extract build_mcfg

2019-04-12 Thread Igor Mammedov
On Fri, 12 Apr 2019 13:44:07 +0800 Wei Yang wrote: > On Tue, Apr 09, 2019 at 04:54:15PM +0200, Igor Mammedov wrote: > >> > >> Let's see a normal hotplug case first. > >> > >> I did one test to see the how a guest with hot-plug cpu migrate to > >> destination. It looks the migration fa

Re: [Qemu-devel] [PATCH v4 1/6] vfio-ccw: make it safe to access channel programs

2019-04-12 Thread Cornelia Huck
On Thu, 11 Apr 2019 17:27:42 -0400 Eric Farman wrote: > On 4/10/19 10:59 PM, Eric Farman wrote: > > > > > > On 4/9/19 7:34 PM, Halil Pasic wrote: > >> On Mon, 8 Apr 2019 19:07:47 +0200 > > ...snip... > > >> I'm just running fio on a pass-through DASD and on some virto-blk disks > >> in pa

Re: [Qemu-devel] [PATCH] target/i386: sev: add 'sev-max-guests' field to 'query-sev-capabilities'

2019-04-12 Thread Erik Skultety
On Fri, Apr 12, 2019 at 09:45:02AM +0200, Paolo Bonzini wrote: > On 11/04/19 21:02, Singh, Brijesh wrote: > > > > > > On 4/11/19 1:10 PM, Laszlo Ersek wrote: > >> On 04/11/19 19:59, Singh, Brijesh wrote: > >>> There are limited numbers of the SEV guests that can be run concurrently. > >>> A managem

Re: [Qemu-devel] [PATCH v2] target/i386: sev: add 'sev-max-guests' field to 'query-sev-capabilities'

2019-04-12 Thread Daniel P . Berrangé
On Fri, Apr 12, 2019 at 10:05:23AM +0200, Paolo Bonzini wrote: > On 12/04/19 09:58, Laszlo Ersek wrote: > > On 04/12/19 01:55, Singh, Brijesh wrote: > >> There are limited numbers of the SEV guests that can be run concurrently. > >> A management applications may need to know this limit so that it c

Re: [Qemu-devel] [PATCH v2] target/i386: sev: add 'sev-max-guests' field to 'query-sev-capabilities'

2019-04-12 Thread Daniel P . Berrangé
On Thu, Apr 11, 2019 at 11:55:15PM +, Singh, Brijesh wrote: > There are limited numbers of the SEV guests that can be run concurrently. > A management applications may need to know this limit so that it can place > SEV VMs on hosts which have suitable resources available. > > Currently, this l

Re: [Qemu-devel] [PATCH v2] target/i386: sev: add 'sev-max-guests' field to 'query-sev-capabilities'

2019-04-12 Thread Erik Skultety
On Thu, Apr 11, 2019 at 11:55:15PM +, Singh, Brijesh wrote: > There are limited numbers of the SEV guests that can be run concurrently. > A management applications may need to know this limit so that it can place > SEV VMs on hosts which have suitable resources available. > > Currently, this li

Re: [Qemu-devel] [PATCH] target/i386: sev: add 'sev-max-guests' field to 'query-sev-capabilities'

2019-04-12 Thread Paolo Bonzini
On 12/04/19 10:19, Erik Skultety wrote: >> Since this field is not specific to guest configuration, I don't think >> it belongs in query-sev-capabilities; QEMU does not care about >1 guest. > Neither pdh nor cert-chain are specific to the guest config. Sort of, they are required to start a guest,

Re: [Qemu-devel] [PATCH v5 1/6] libnvdimm: nd_region flush callback support

2019-04-12 Thread Jan Kara
On Thu 11-04-19 07:51:48, Dan Williams wrote: > On Tue, Apr 9, 2019 at 9:09 PM Pankaj Gupta wrote: > > + } else { > > + if (nd_region->flush(nd_region)) > > + rc = -EIO; > > Given the common case wants to be fast and synchronous I think we > should try to

Re: [Qemu-devel] [PATCH for 4.1 v3 2/6] target/riscv: Fall back to generating a RISC-V CPU

2019-04-12 Thread Igor Mammedov
On Thu, 11 Apr 2019 13:42:20 -0700 Alistair Francis wrote: > On Thu, Apr 11, 2019 at 5:18 AM Igor Mammedov wrote: > > > > On Wed, 10 Apr 2019 23:10:25 + > > Alistair Francis wrote: > > > > > If a user specifies a CPU that we don't understand then we want to fall > > > back to a CPU genera

Re: [Qemu-devel] [PATCH for 4.1 v3 6/6] riscv: Add a generic spike machine

2019-04-12 Thread Igor Mammedov
On Thu, 11 Apr 2019 13:34:16 -0700 Alistair Francis wrote: > On Thu, Apr 11, 2019 at 5:06 AM Igor Mammedov wrote: > > > > On Wed, 10 Apr 2019 23:11:00 + > > Alistair Francis wrote: > > > > > Add a generic spike machine (not tied to a version) and deprecate the > > > spike mahines that are

Re: [Qemu-devel] [PATCH] target/i386: sev: add 'sev-max-guests' field to 'query-sev-capabilities'

2019-04-12 Thread Erik Skultety
On Fri, Apr 12, 2019 at 10:26:45AM +0200, Paolo Bonzini wrote: > On 12/04/19 10:19, Erik Skultety wrote: > >> Since this field is not specific to guest configuration, I don't think > >> it belongs in query-sev-capabilities; QEMU does not care about >1 guest. > > Neither pdh nor cert-chain are speci

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: use variable size of flash device to save memory

2019-04-12 Thread Xiang Zheng
On 2019/4/11 15:15, Markus Armbruster wrote: >> For some historical reasons such as compatibility and extensibility[2], we >> restrict both their size to 64MB -- both UEFI and qemu have cold hard >> constants. > These reasons aren't historical. But they're valid, and that's all that > matters :

[Qemu-devel] [PATCH v2] spapr: add splpar hcalls H_JOIN, H_PROD, H_CONFER

2019-04-12 Thread Nicholas Piggin
These implementations have a few deficiencies that are noted, but are good enough for Linux to use. Signed-off-by: Nicholas Piggin --- Cleaned up checkpatch warnings, sorry I didn't realise that exists. hw/ppc/spapr_hcall.c | 88 1 file changed, 88

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: use variable size of flash device to save memory

2019-04-12 Thread Xiang Zheng
On 2019/4/12 9:52, Xiang Zheng wrote: > On 2019/4/11 20:22, Kevin Wolf wrote: >> Okay, so your problem is that blk_pread() writes to the whole buffer, >> writing explicit zeroes for unallocated parts of the image, while you >> would like to leave those parts of the buffer untouched so that we don

[Qemu-devel] [RFC v3 00/27] vSMMUv3/pSMMUv3 2 stage VFIO integration

2019-04-12 Thread Eric Auger
Up to now vSMMUv3 has not been integrated with VFIO. VFIO integration requires to program the physical IOMMU consistently with the guest mappings. However, as opposed to VTD, SMMUv3 has no "Caching Mode" which allows easy trapping of guest mappings. This means the vSMMUV3 cannot use the same VFIO i

[Qemu-devel] [RFC v3 01/27] hw/arm/smmuv3: Remove SMMUNotifierNode

2019-04-12 Thread Eric Auger
The SMMUNotifierNode struct is not necessary and brings extra complexity so let's remove it. We now directly track the SMMUDevices which have registered IOMMU MR notifiers. This is inspired from the same transformation on intel-iommu done in commit b4a4ba0d68f50f218ee3957b6638dbee32a5eeef ("intel-

[Qemu-devel] [RFC v3 07/27] hw/arm/smmuv3: Advertise VFIO_NESTED and MSI_TRANSLATE attributes

2019-04-12 Thread Eric Auger
Virtual SMMUv3 requires physical nested stages for VFIO integration and translates MSIs. So let's advertise those attributes. Signed-off-by: Eric Auger --- v2 -> v3: - also advertise MSI_TRANSLATE --- hw/arm/smmuv3.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/hw/arm/s

[Qemu-devel] [RFC v3 03/27] update-linux-headers: Import iommu.h

2019-04-12 Thread Eric Auger
Update the script to import the new iommu.h uapi header. Signed-off-by: Eric Auger --- .../infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h | 15 +- include/standard-headers/drm/drm_fourcc.h | 63 +++ include/standard-headers/linux/ethtool.h | 33 +++- .../linux/input-event-codes.h

[Qemu-devel] [RFC v3 04/27] header update against 5.1-rc3 and IOMMU/VFIO nested stage APIs

2019-04-12 Thread Eric Auger
This is an update against the following development branch: https://github.com/eauger/linux/tree/v5.1-rc3-2stage-v7. Signed-off-by: Eric Auger --- linux-headers/linux/iommu.h | 240 1 file changed, 240 insertions(+) create mode 100644 linux-headers/linux/iom

[Qemu-devel] [RFC v3 02/27] vfio/common: Introduce vfio_set_irq_signaling helper

2019-04-12 Thread Eric Auger
The code used to assign an interrupt index/subindex to an eventfd is duplicated many times. Let's introduce an helper that allows to set/unset the signaling for an ACTION_TRIGGER or ACTION_UNMASK action. Signed-off-by: Eric Auger --- This is a follow-up to [PATCH v2 0/2] vfio-pci: Introduce vfi

[Qemu-devel] [RFC v3 17/27] hw/vfio/common: Introduce vfio_alloc_guest_iommu helper

2019-04-12 Thread Eric Auger
Soon this code will be called several times. So let's introduce an helper. Signed-off-by: Eric Auger --- hw/vfio/common.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 0853c8c376..cf876d5264 100644 --- a/h

[Qemu-devel] [RFC v3 06/27] memory: add IOMMU_ATTR_MSI_TRANSLATE IOMMU memory region attribute

2019-04-12 Thread Eric Auger
We introduce a new IOMMU Memory Region attribute, IOMMU_ATTR_MSI_TRANSLATE which tells whether the virtual IOMMU translates MSIs. ARM SMMU will expose this attribute since, as opposed to Intel DMAR, MSIs are translated as any other DMA requests. Signed-off-by: Eric Auger --- include/exec/memory.

[Qemu-devel] [RFC v3 05/27] memory: add IOMMU_ATTR_VFIO_NESTED IOMMU memory region attribute

2019-04-12 Thread Eric Auger
We introduce a new IOMMU Memory Region attribute, IOMMU_ATTR_VFIO_NESTED which tells whether the virtual IOMMU requires physical nested stages for VFIO integration. Intel virtual IOMMU supports Caching Mode and does not require 2 stages at physical level. However virtual ARM SMMU does not implement

[Qemu-devel] [RFC v3 13/27] hw/arm/smmuv3: Implement dummy replay

2019-04-12 Thread Eric Auger
The default implementation of memory_region_iommu_replay() shall not be used as it forces the translation of the whole RAM range. The purpose of this function is to update the shadow page tables. However in case of nested stage, there is no shadow page table so we can simply return. Signed-off-by:

[Qemu-devel] [RFC v3 09/27] memory: Prepare for different kinds of IOMMU MR notifiers

2019-04-12 Thread Eric Auger
Current IOMMUNotifiers dedicate to IOTLB related notifications, ie. MAP/UNMAP. We plan to introduce new types of notifiers, for instance to notify vIOMMU configuration changes. Those new notifiers may not be characterized by any associated address space range. So let's create a specialized IOMMUIO

[Qemu-devel] [RFC v3 18/27] hw/vfio/common: Introduce hostwin_from_range helper

2019-04-12 Thread Eric Auger
Let's introduce a hostwin_from_range() helper that returns the hostwin encapsulating an IOVA range or NULL if non is found. This improves the readibility of callers and removes the usage of hostwin_found. Signed-off-by: Eric Auger --- hw/vfio/common.c | 37 ++---

[Qemu-devel] [RFC v3 08/27] hw/vfio/common: Force nested if iommu requires it

2019-04-12 Thread Eric Auger
In case we detect the address space is translated by a virtual IOMMU which requires nested stages, let's set up the container with the VFIO_TYPE1_NESTING_IOMMU iommu_type. Signed-off-by: Eric Auger --- v2 -> v3: - add "nested only is selected if requested by @force_nested" comment in this pat

[Qemu-devel] [RFC v3 26/27] vfio-pci: Set up fault regions

2019-04-12 Thread Eric Auger
We setup two fault regions: the producer fault is read-only from the user space perspective. It is composed of the fault queue (mmappable) and a header written by the kernel, located in a separate page. The consumer fault is write-only from the user-space perspective. Signed-off-by: Eric Auger

[Qemu-devel] [RFC v3 14/27] hw/arm/smmuv3: Fill the IOTLBEntry arch_id on NH_VA invalidation

2019-04-12 Thread Eric Auger
When the guest invalidates one S1 entry, it passes the asid. When propagating this invalidation downto the host, the asid information also must be passed. So let's fill the arch_id field introduced for that purpose. Signed-off-by: Eric Auger --- hw/arm/smmuv3.c | 1 + 1 file changed, 1 insertion

[Qemu-devel] [RFC v3 19/27] hw/vfio/common: Introduce helpers to DMA map/unap a RAM section

2019-04-12 Thread Eric Auger
Let's introduce two helpers that allow to DMA map/unmap a RAM section. Those helpers will be called for nested stage setup in another call site. Also the vfio_listener_region_add/del() structure may be clearer. Signed-off-by: Eric Auger --- hw/vfio/common.c | 178 ++--

[Qemu-devel] [RFC v3 10/27] memory: Add IOMMUConfigNotifier

2019-04-12 Thread Eric Auger
With this patch, an IOMMUNotifier can now be either an IOTLB notifier or a config notifier. A config notifier is supposed to be called on guest translation config change. This gives host a chance to update the physical IOMMU configuration so that is consistent with the guest view. The notifier is

[Qemu-devel] [RFC v3 16/27] hw/arm/smmuv3: Notify on config changes

2019-04-12 Thread Eric Auger
In case IOMMU config notifiers are attached to the IOMMU memory region, we execute them, passing as argument the iommu_pasid_table_config struct updated with the new viommu translation config. Config notifiers are called on STE changes. At physical level, they translate into CMD_CFGI_STE_* commands

[Qemu-devel] [RFC v3 24/27] hw/arm/smmuv3: Implement fault injection

2019-04-12 Thread Eric Auger
We convert iommu_fault structs received from the kernel into the data struct used by the emulation code and record the evnts into the virtual event queue. Signed-off-by: Eric Auger --- Exhaustive mapping remains to be done --- hw/arm/smmuv3.c | 65 ++

[Qemu-devel] [RFC v3 12/27] hw/arm/smmuv3: Store the PASID table GPA in the translation config

2019-04-12 Thread Eric Auger
For VFIO integration we will need to pass the Context Descriptor (CD) table GPA to the host. The CD table is also referred to as the PASID table. Its GPA corresponds to the s1ctrptr field of the Stream Table Entry. So let's decode and store it in the configuration structure. Signed-off-by: Eric Au

[Qemu-devel] [RFC v3 20/27] hw/vfio/common: Setup nested stage mappings

2019-04-12 Thread Eric Auger
In nested mode, legacy vfio_iommu_map_notify cannot be used as there is no "caching" mode and we do not trap on map. On Intel, vfio_iommu_map_notify was used to DMA map the RAM through the host single stage. With nested mode, we need to setup the stage 2 and the stage 1 separately. This patch int

[Qemu-devel] [RFC v3 11/27] memory: Add arch_id and leaf fields in IOTLBEntry

2019-04-12 Thread Eric Auger
TLB entries are usually tagged with some ids such as the asid or pasid. When propagating an invalidation command from the guest to the host, we need to pass this id. Also we add a leaf field which indicates, in case of invalidation notification whether only cache entries for the last level of tran

[Qemu-devel] [RFC v3 21/27] hw/vfio/common: Register a MAP notifier for MSI binding

2019-04-12 Thread Eric Auger
Instantiate a MAP notifier to register the MSI stage 1 binding (gIOVA -> gDB) to the host. This allows the host to build a nested mapping towards the physical doorbell: guest IOVA -> guest Doorbell -> physical doorbell. Stage1 Stage 2 The unregistration is done on VFIO container

[Qemu-devel] [RFC v3 15/27] hw/arm/smmuv3: Fill the IOTLBEntry leaf field on NH_VA invalidation

2019-04-12 Thread Eric Auger
Let's propagate the leaf attribute throughout the invalidation path. This hint is used to reduce the scope of the invalidations to the last level of translation. Not enforcing it induces large performance penalties in nested mode. Signed-off-by: Eric Auger --- hw/arm/smmuv3.c | 16 +-

[Qemu-devel] [RFC v3 23/27] memory: Introduce IOMMU Memory Region inject_faults API

2019-04-12 Thread Eric Auger
This new API allows to inject @count iommu_faults into the IOMMU memory region. Signed-off-by: Eric Auger --- include/exec/memory.h | 26 ++ memory.c | 12 2 files changed, 38 insertions(+) diff --git a/include/exec/memory.h b/include/exec/memor

[Qemu-devel] [RFC v3 22/27] vfio-pci: Expose MSI stage 1 bindings to the host

2019-04-12 Thread Eric Auger
When the guest is exposed with a virtual IOMMU that translates MSIs, the guest allocates an IOVA (gIOVA) that maps the virtual doorbell (gDB). In nested mode, when the MSI is setup, we pass this stage1 mapping to the host so that it can use this stage1 binding to create a nested stage translating i

[Qemu-devel] [RFC v3 25/27] vfio-pci: register handler for iommu fault

2019-04-12 Thread Eric Auger
We use the VFIO_PCI_DMA_FAULT_IRQ_INDEX "irq" index to set/unset a notifier for physical DMA faults. The associated eventfd is triggered, in nested mode, whenever a fault is detected at IOMMU physical level. The actual handler will be implemented in subsequent patches. Signed-off-by: Eric Auger

[Qemu-devel] [RFC v3 27/27] vfio-pci: Implement the DMA fault handler

2019-04-12 Thread Eric Auger
Whenever the eventfd is triggered, we retrieve the DMA faults from the mmapped fault region and inject them in the iommu memory region. Signed-off-by: Eric Auger --- hw/vfio/pci.c | 53 +++ hw/vfio/pci.h | 1 + 2 files changed, 54 insertions(+) d

Re: [Qemu-devel] [PATCH v6 01/16] s390 vfio-ccw: Add bootindex property and IPLB data

2019-04-12 Thread Thomas Huth
On 04/04/2019 16.34, Jason J. Herne wrote: > Add bootindex property and iplb data for vfio-ccw devices. This allows us to > forward boot information into the bios for vfio-ccw devices. > > Refactor s390_get_ccw_device() to return device type. This prevents us from > having to use messy casting log

Re: [Qemu-devel] [RFC v3 00/27] vSMMUv3/pSMMUv3 2 stage VFIO integration

2019-04-12 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190412100354.6409-1-eric.au...@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 ==

Re: [Qemu-devel] [RFC PATCH] hw/arm/virt: use variable size of flash device to save memory

2019-04-12 Thread Kevin Wolf
Am 12.04.2019 um 11:50 hat Xiang Zheng geschrieben: > > On 2019/4/12 9:52, Xiang Zheng wrote: > > On 2019/4/11 20:22, Kevin Wolf wrote: > >> Okay, so your problem is that blk_pread() writes to the whole buffer, > >> writing explicit zeroes for unallocated parts of the image, while you > >> would l

Re: [Qemu-devel] [PATCH 2/2] hw/arm/virt: Support firmware configuration with -blockdev

2019-04-12 Thread Laszlo Ersek
On 04/11/19 15:56, Markus Armbruster wrote: > The ARM virt machines put firmware in flash memory. To configure it, > you use -drive if=pflash,unit=0,... and optionally -drive > if=pflash,unit=1,... > > Why two -drive? This permits setting up one part of the flash memory > read-only, and the othe

Re: [Qemu-devel] [PULL 16/71] nbd: Increase bs->in_flight during AioContext switch

2019-04-12 Thread Kevin Wolf
Am 11.04.2019 um 19:20 hat Vladimir Sementsov-Ogievskiy geschrieben: > 11.04.2019 20:13, Vladimir Sementsov-Ogievskiy wrote: > > 11.04.2019 19:48, Kevin Wolf wrote: > >> Am 11.04.2019 um 16:48 hat Vladimir Sementsov-Ogievskiy geschrieben: > >>> 11.04.2019 17:15, Kevin Wolf wrote: > Am 11.04.20

Re: [Qemu-devel] Maintainers, please tell us how to boot your machines!

2019-04-12 Thread Thomas Huth
On 13/03/2019 02.06, Philippe Mathieu-Daudé wrote: > ' > On Tue, Mar 12, 2019 at 6:44 PM Markus Armbruster wrote: [...] >> = hw/arm/nseries.c = >> Andrzej Zaborowski (odd fixer:nSeries) >> Peter Maydell (odd fixer:nSeries) >> qemu-...@nongnu.org (open list:nSeries) > > images: >

Re: [Qemu-devel] [PATCH 1/2] pflash_cfi01: New pflash_cfi01_legacy_drive()

2019-04-12 Thread Philippe Mathieu-Daudé
On 4/12/19 9:52 AM, Markus Armbruster wrote: > I append a patch I can describe. Would it work for you? > > > > pc: Split pc_system_firmware_init()'s legacy -drive loop > > The loop does two things: map legacy -drive to properties, and collect > all the backends for use after the loop. The nex

[Qemu-devel] [PULL 1/1] spapr_pci: Fix broken naming of PCI bus

2019-04-12 Thread David Gibson
From: Greg Kurz Recent commit 5cf0d326a0fe fixed a regression which was preventing the guest to access the extended config space of a PCIe device. This was done by introducing a new PCI bus subtype for PAPR. The original fix was causing PCI busses to be named "spapr-pci-host-bridge-root-bus.N" in

[Qemu-devel] [PULL 0/1] ppc-for-4.0 queue 20190412

2019-04-12 Thread David Gibson
The following changes since commit 532cc6da74ec25b5ba6893b5757c977d54582949: Update version for v4.0.0-rc3 release (2019-04-10 15:38:59 +0100) are available in the Git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-4.0-20190412 for you to fetch changes up to

Re: [Qemu-devel] Maintainers, please tell us how to boot your machines!

2019-04-12 Thread Philippe Mathieu-Daudé
On 4/12/19 1:11 PM, Thomas Huth wrote: > On 13/03/2019 02.06, Philippe Mathieu-Daudé wrote: >> ' >> On Tue, Mar 12, 2019 at 6:44 PM Markus Armbruster wrote: > [...] >>> = hw/arm/nseries.c = >>> Andrzej Zaborowski (odd fixer:nSeries) >>> Peter Maydell (odd fixer:nSeries) >>> qemu-

Re: [Qemu-devel] [PATCH for-4.1] vfio/common: Introduce vfio_set_irq_signaling helper

2019-04-12 Thread Cornelia Huck
On Tue, 9 Apr 2019 17:58:31 +0200 Eric Auger wrote: > The code used to assign an interrupt index/subindex to an > eventfd is duplicated many times. Let's introduce an helper that > allows to set/unset the signaling for an ACTION_TRIGGER or > ACTION_UNMASK action. I like that, and it looks like

[Qemu-devel] [PULL 1/1] configure: Relax check for libseccomp

2019-04-12 Thread Eduardo Otubo
From: Helge Deller All major distributions do support libseccomp version >= 2.3.0, so there is no need to special-case on various architectures any longer. Signed-off-by: Helge Deller Reviewed-by: Daniel P. Berrangé Reviewed-by: Philippe Mathieu-Daudé Acked-by: Eduardo Otubo --- configure |

[Qemu-devel] [PULL 0/1] seccomp branch queue

2019-04-12 Thread Eduardo Otubo
The following changes since commit 532cc6da74ec25b5ba6893b5757c977d54582949: Update version for v4.0.0-rc3 release (2019-04-10 15:38:59 +0100) are available in the Git repository at: https://github.com/otubo/qemu.git tags/pull-seccomp-20190412 for you to fetch changes up to

Re: [Qemu-devel] [PULL 1/1] configure: Relax check for libseccomp

2019-04-12 Thread Daniel P . Berrangé
On Fri, Apr 12, 2019 at 01:37:30PM +0200, Eduardo Otubo wrote: > From: Helge Deller > > All major distributions do support libseccomp version >= 2.3.0, so there > is no need to special-case on various architectures any longer. > > Signed-off-by: Helge Deller > Reviewed-by: Daniel P. Berrangé >

Re: [Qemu-devel] [PULL 0/1] seccomp branch queue

2019-04-12 Thread Peter Maydell
otubo/qemu.git tags/pull-seccomp-20190412 > > for you to fetch changes up to ee352b53b3e49ba9621149f9de7279a5cadd606c: > > configure: Relax check for libseccomp (2019-04-12 13:30:40 +0200) > > --

Re: [Qemu-devel] [PULL 0/1] ppc-for-4.0 queue 20190412

2019-04-12 Thread Peter Maydell
gibson/qemu.git tags/ppc-for-4.0-20190412 > > for you to fetch changes up to 4560116e42a21989a4b6cf9551ce2f90b16c7238: > > spapr_pci: Fix broken naming of PCI bus (2019-04-12 12:23:02 +1000) > > > ppc patch queue

Re: [Qemu-devel] [PATCH 1/2] hw: timer: Add ASPEED RTC device

2019-04-12 Thread Peter Maydell
On Fri, 12 Apr 2019 at 04:17, Joel Stanley wrote: > vmstate and migration is a foreign concept for the small ARM machines. > As well as being a developer, I am an end user of Qemu for them (the > aspeeds, microbit), and the use case is to boot up a firmware and > check that it does correct thing.

[Qemu-devel] CentOS | OpenvSwitch problem with local bridge

2019-04-12 Thread Sven Vogel
Hi Devs, We use RHEL/CentOS and since QEMU Version 2.12.0 we have problems with OpenvSwitch and a local bridge. New Version: - OS version: 7.6.1810 kernel version: 3.10.0-957.5.1.el7.x86_64 qemu version: 2.12.0 libvirtd version: 5.0.0 openvswit

Re: [Qemu-devel] Maintainers, please tell us how to boot your machines!

2019-04-12 Thread Thomas Huth
On 12/04/2019 13.28, Philippe Mathieu-Daudé wrote: > On 4/12/19 1:11 PM, Thomas Huth wrote: >> On 13/03/2019 02.06, Philippe Mathieu-Daudé wrote: >>> ' >>> On Tue, Mar 12, 2019 at 6:44 PM Markus Armbruster wrote: >> [...] = hw/arm/nseries.c = Andrzej Zaborowski (odd fixer:nSerie

[Qemu-devel] [PATCH v2 2/5] linux-user: avoid string truncation warnings in elf field copying

2019-04-12 Thread Daniel P . Berrangé
In file included from /usr/include/string.h:494, from include/qemu/osdep.h:101, from linux-user/elfload.c:2: In function ‘strncpy’, inlined from ‘fill_psinfo’ at linux-user/elfload.c:3208:12, inlined from ‘fill_note_info’ at linux-user/elfload.c:3390:5,

[Qemu-devel] [PATCH v2 0/5] misc set of fixes for warnings under GCC 9

2019-04-12 Thread Daniel P . Berrangé
This series addresses all the warnings I see when building on Fedora 30 x86_64 with GCC 9 (gcc-9.0.1-0.10.fc30.x86_64). Changed in v2: - Dropped patches mistakenly included due to not correctly rebasing - Dropped s390x patches already merged - Dropped usb-mtp patches which need much more work

[Qemu-devel] [PATCH v2 4/5] hw/usb: avoid format truncation warning when formatting port name

2019-04-12 Thread Daniel P . Berrangé
hw/usb/hcd-xhci.c: In function ‘usb_xhci_realize’: hw/usb/hcd-xhci.c:3339:66: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 5 [-Wformat-trunca\ tion=] 3339 | snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1); |

Re: [Qemu-devel] [PATCH v2] target/i386: sev: add 'sev-max-guests' field to 'query-sev-capabilities'

2019-04-12 Thread Laszlo Ersek
On 04/12/19 10:05, Paolo Bonzini wrote: > On 12/04/19 09:58, Laszlo Ersek wrote: >> On 04/12/19 01:55, Singh, Brijesh wrote: >>> There are limited numbers of the SEV guests that can be run concurrently. >>> A management applications may need to know this limit so that it can place >>> SEV VMs on ho

[Qemu-devel] [PATCH v2 1/5] linux-user: avoid string truncation warnings in uname field copying

2019-04-12 Thread Daniel P . Berrangé
In file included from /usr/include/string.h:494, from include/qemu/osdep.h:101, from linux-user/uname.c:20: In function ‘strncpy’, inlined from ‘sys_uname’ at linux-user/uname.c:94:3: /usr/include/bits/string_fortified.h:106:10: warning: ‘__builtin_strncpy’ ou

[Qemu-devel] [PATCH v2 3/5] sockets: avoid string truncation warnings when copying UNIX path

2019-04-12 Thread Daniel P . Berrangé
In file included from /usr/include/string.h:494, from include/qemu/osdep.h:101, from util/qemu-sockets.c:18: In function ‘strncpy’, inlined from ‘unix_connect_saddr.isra.0’ at util/qemu-sockets.c:925:5: /usr/include/bits/string_fortified.h:106:10: warning: ‘__b

[Qemu-devel] [PATCH 3/3] migration-test: Add a test for inline_fd protocol

2019-04-12 Thread Yury Kotov
Signed-off-by: Yury Kotov --- tests/libqtest.c | 83 +++-- tests/libqtest.h | 51 +- tests/migration-test.c | 117 + 3 files changed, 236 insertions(+), 15 deletions(-) diff --git a/tests/libqtest.c b/t

[Qemu-devel] [PATCH 1/3] monitor: Add monitor_recv_fd function to work with sent fds

2019-04-12 Thread Yury Kotov
Signed-off-by: Yury Kotov --- include/monitor/monitor.h | 1 + monitor.c | 15 +++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index c1b40a9cac..9b9e593fb3 100644 --- a/include/monitor/monitor.h

[Qemu-devel] [PATCH v2 5/5] qxl: avoid unaligned pointer reads/writes

2019-04-12 Thread Daniel P . Berrangé
The SPICE_RING_PROD_ITEM() macro is initializing a local 'uint64_t *' variable to point to the 'el' field inside the QXLReleaseRing struct. This uint64_t field is not guaranteed aligned as the struct is packed. Code should not take the address of fields within a packed struct. Changing the SPICE_R

Re: [Qemu-devel] [PATCH for-4.0?] iotest: Fix 241 to run in generic directory

2019-04-12 Thread Kevin Wolf
Am 10.04.2019 um 22:42 hat Eric Blake geschrieben: > Filter the qemu-nbd server output to get rid of a direct reference > to my build directory. > > Fixes: e9dce9cb > Reported-by: Max Reitz > Signed-off-by: Eric Blake Thanks, applied to the block branch. Kevin

[Qemu-devel] [PATCH 0/3] Add 'inline-fd:' protocol for migration

2019-04-12 Thread Yury Kotov
Hi, I've added 'inline-fd:' proto to simplify migration to/from fd. I thought about modifying the existing 'fd:' proto but I'm not sure it's a good idea to change it's contract. Existing 'fd:' proto works with previously added fd by getfd or add-fd commands. If client doesn't want to work with th

[Qemu-devel] [PULL SUBSYSTEM s390-ccw-bios 02/17] s390-bios: decouple cio setup from virtio

2019-04-12 Thread Thomas Huth
From: "Jason J. Herne" Move channel i/o setup code out to a separate function. This decouples cio setup from the virtio code path and allows us to make use of it for booting dasd devices. Signed-off-by: Jason J. Herne Acked-by: Halil Pasic Reviewed-by: Collin Walling Reviewed-by: Farhan Ali

[Qemu-devel] [PATCH 2/3] migration: Add inline-fd protocol

2019-04-12 Thread Yury Kotov
Existing 'fd:' proto works with previously added fd by getfd or add-fd commands. If client doesn't want to work with this fd before or after migration then it's easier to send an fd with the migrate-* command. Also, client shouldn't maintain this fd. So, add 'inline-fd:' proto to work with sent fd.

[Qemu-devel] [PULL SUBSYSTEM s390-ccw-bios 01/17] s390 vfio-ccw: Add bootindex property and IPLB data

2019-04-12 Thread Thomas Huth
From: "Jason J. Herne" Add bootindex property and iplb data for vfio-ccw devices. This allows us to forward boot information into the bios for vfio-ccw devices. Refactor s390_get_ccw_device() to return device type. This prevents us from having to use messy casting logic in several places. Signe

Re: [Qemu-devel] [PATCH for-4.0?] hmp: delvm: use hmp_handle_error

2019-04-12 Thread Kevin Wolf
Am 10.04.2019 um 20:27 hat Eric Blake geschrieben: > On 4/10/19 1:03 PM, Cole Robinson wrote: > > This gives us the consistent 'Error:' prefix added in 66363e9a43f, > > which helps users like libvirt who still need to scrape hmp error > > messages to detect failure. > > > > Signed-off-by: Cole Rob

[Qemu-devel] [PULL SUBSYSTEM s390-ccw-bios 03/17] s390-bios: decouple common boot logic from virtio

2019-04-12 Thread Thomas Huth
From: "Jason J. Herne" Create a boot_setup function to handle getting boot information from the machine/hypervisor. This decouples common boot logic from the virtio code path and allows us to make use of it for the real dasd boot scenario. Signed-off-by: Jason J. Herne Acked-by: Halil Pasic Re

[Qemu-devel] [PULL SUBSYSTEM s390-ccw-bios 08/17] s390-bios: Support for running format-0/1 channel programs

2019-04-12 Thread Thomas Huth
From: "Jason J. Herne" Introduce a library function for executing format-0 and format-1 channel programs and waiting for their completion before continuing execution. Add cu_type() to channel io library. This will be used to query control unit type which is used to determine if we are booting a

[Qemu-devel] [PULL SUBSYSTEM s390-ccw-bios 00/17] vfio-ccw dasd ipl support

2019-04-12 Thread Thomas Huth
This pull request is not for master. Hi Cornelia, the following changes since commit 532cc6da74ec25b5ba6893b5757c977d54582949: Update version for v4.0.0-rc3 release (2019-04-10 15:38:59 +0100) are available in the Git repository at: https://gitlab.com/huth/qemu.git tags/s390-ccw-bios-2019

Re: [Qemu-devel] [PATCH 08/14] qxl: avoid unaligned pointer reads/writes

2019-04-12 Thread Marc-André Lureau
Hi On Fri, Mar 29, 2019 at 12:20 PM Daniel P. Berrangé wrote: > > The SPICE_RING_PROD_ITEM() macro is initializing a local > 'uint64_t *' variable to point to the 'el' field inside > the QXLReleaseRing struct. This uint64_t field is not > guaranteed aligned as the struct is packed. > > Code shoul

[Qemu-devel] [PULL SUBSYSTEM s390-ccw-bios 11/17] s390-bios: Factor finding boot device out of virtio code path

2019-04-12 Thread Thomas Huth
From: "Jason J. Herne" Make a new routine find_boot_device to locate the boot device for all cases, not just virtio. The error message for the case where no boot device has been specified and a suitable boot device cannot be auto detected was specific to virtio devices. We update this message to

[Qemu-devel] [PULL SUBSYSTEM s390-ccw-bios 12/17] s390-bios: Refactor virtio to run channel programs via cio

2019-04-12 Thread Thomas Huth
From: "Jason J. Herne" Now that we have a Channel I/O library let's modify virtio boot code to make use of it for running channel programs. Signed-off-by: Jason J. Herne Reviewed-by: Cornelia Huck Acked-by: Thomas Huth Message-Id: <1554388475-18329-13-git-send-email-jjhe...@linux.ibm.com> Sig

[Qemu-devel] [PULL SUBSYSTEM s390-ccw-bios 05/17] s390-bios: Decouple channel i/o logic from virtio

2019-04-12 Thread Thomas Huth
From: "Jason J. Herne" Create a separate library for channel i/o related code. This decouples channel i/o operations from virtio and allows us to make use of them for the real dasd boot path. Signed-off-by: Jason J. Herne Reviewed-by: Cornelia Huck Reviewed-by: Thomas Huth Message-Id: <155438

[Qemu-devel] [PULL SUBSYSTEM s390-ccw-bios 04/17] s390-bios: Clean up cio.h

2019-04-12 Thread Thomas Huth
From: "Jason J. Herne" Add proper typedefs to all structs and modify all bit fields to use consistent formatting. Signed-off-by: Jason J. Herne Reviewed-by: Collin Walling Reviewed-by: Farhan Ali Acked-by: Cornelia Huck Reviewed-by: Thomas Huth Message-Id: <1554388475-18329-5-git-send-email

[Qemu-devel] [PULL SUBSYSTEM s390-ccw-bios 15/17] s390-bios: Support booting from real dasd device

2019-04-12 Thread Thomas Huth
From: "Jason J. Herne" Allows guest to boot from a vfio configured real dasd device. Signed-off-by: Jason J. Herne Reviewed-by: Cornelia Huck Message-Id: <1554388475-18329-16-git-send-email-jjhe...@linux.ibm.com> Signed-off-by: Thomas Huth --- MAINTAINERS | 1 + docs/devel

[Qemu-devel] [PULL SUBSYSTEM s390-ccw-bios 10/17] s390-bios: Extend find_dev() for non-virtio devices

2019-04-12 Thread Thomas Huth
From: "Jason J. Herne" We need a method for finding the subchannel of a dasd device. Let's modify find_dev to handle this since it mostly does what we need. Up to this point find_dev has been specific to only virtio devices. Signed-off-by: Jason J. Herne Acked-by: Halil Pasic Reviewed-by: Corn

  1   2   3   >