[PATCH] KVM: arm64: Drop 'const' from argument of vq_present()

2019-06-03 Thread Viresh Kumar
We currently get following compilation warning: arch/arm64/kvm/guest.c: In function 'set_sve_vls': arch/arm64/kvm/guest.c:262:18: warning: passing argument 1 of 'vq_present' from incompatible pointer type arch/arm64/kvm/guest.c:212:13: note: expected 'const u64 (* const)[8]' but argument is of t

Re: [PATCH v8 05/29] iommu: Add a timeout parameter for PRQ response

2019-06-03 Thread Alex Williamson
On Sun, 26 May 2019 18:09:40 +0200 Eric Auger wrote: > From: Jacob Pan > > When an IO page request is processed outside IOMMU subsystem, response > can be delayed or lost. Add a tunable setup parameter such that user can > choose the timeout for IOMMU to track pending page requests. > > This t

Re: [PATCH v8 22/29] vfio: VFIO_IOMMU_ATTACH/DETACH_PASID_TABLE

2019-06-03 Thread Alex Williamson
On Sun, 26 May 2019 18:09:57 +0200 Eric Auger wrote: > From: "Liu, Yi L" > > This patch adds VFIO_IOMMU_ATTACH/DETACH_PASID_TABLE ioctl > which aims to pass/withdraw the virtual iommu guest configuration > to/from the VFIO driver downto to the iommu subsystem. > > Signed-off-by: Jacob Pan > S

Re: [PATCH v8 25/29] vfio-pci: Add a new VFIO_REGION_TYPE_NESTED region type

2019-06-03 Thread Alex Williamson
On Sun, 26 May 2019 18:10:00 +0200 Eric Auger wrote: > This patch adds two new regions aiming to handle nested mode > translation faults. > > The first region (two host kernel pages) is read-only from the > user-space perspective. The first page contains an header > that provides information abo

Re: [PATCH v8 24/29] vfio: VFIO_IOMMU_BIND/UNBIND_MSI

2019-06-03 Thread Alex Williamson
On Sun, 26 May 2019 18:09:59 +0200 Eric Auger wrote: > This patch adds the VFIO_IOMMU_BIND/UNBIND_MSI ioctl which aim > to pass/withdraw the guest MSI binding to/from the host. > > Signed-off-by: Eric Auger > > --- > v6 -> v7: > - removed the dev arg > > v3 -> v4: > - add UNBIND > - unwind on

Re: [PATCH v8 26/29] vfio-pci: Register an iommu fault handler

2019-06-03 Thread Alex Williamson
On Sun, 26 May 2019 18:10:01 +0200 Eric Auger wrote: > This patch registers a fault handler which records faults in > a circular buffer and then signals an eventfd. This buffer is > exposed within the fault region. > > Signed-off-by: Eric Auger > > --- > > v3 -> v4: > - move iommu_unregister_

Re: [PATCH v8 04/29] iommu: Add recoverable fault reporting

2019-06-03 Thread Alex Williamson
On Sun, 26 May 2019 18:09:39 +0200 Eric Auger wrote: > From: Jean-Philippe Brucker > > Some IOMMU hardware features, for example PCI's PRI and Arm SMMU's Stall, > enable recoverable I/O page faults. Allow IOMMU drivers to report PRI Page > Requests and Stall events through the new fault reporti

Re: [PATCH v8 28/29] vfio-pci: Add VFIO_PCI_DMA_FAULT_IRQ_INDEX

2019-06-03 Thread Alex Williamson
On Sun, 26 May 2019 18:10:03 +0200 Eric Auger wrote: > Add a new VFIO_PCI_DMA_FAULT_IRQ_INDEX index. This allows to > set/unset an eventfd that will be triggered when DMA translation > faults are detected at physical level when the nested mode is used. > > Signed-off-by: Eric Auger > --- > dri

Re: [PATCH v5 3/3] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state

2019-06-03 Thread Catalin Marinas
On Mon, Jun 03, 2019 at 05:25:34PM +0100, Catalin Marinas wrote: > On Tue, May 21, 2019 at 06:21:39PM +0100, Julien Grall wrote: > > Since a softirq is supposed to check may_use_simd() anyway before > > attempting to use FPSIMD/SVE, there is limited reason to keep softirq > > disabled when touching

[PATCH] KVM: arm64: Filter out invalid core register IDs in KVM_GET_REG_LIST

2019-06-03 Thread Dave Martin
Since commit d26c25a9d19b ("arm64: KVM: Tighten guest core register access from userspace"), KVM_{GET,SET}_ONE_REG rejects register IDs that do not correspond to a single underlying architectural register. KVM_GET_REG_LIST was not changed to match however: instead, it simply yields a list of 32-bi

Re: [PATCH v5 3/3] arm64/fpsimd: Don't disable softirq when touching FPSIMD/SVE state

2019-06-03 Thread Catalin Marinas
On Tue, May 21, 2019 at 06:21:39PM +0100, Julien Grall wrote: > Since a softirq is supposed to check may_use_simd() anyway before > attempting to use FPSIMD/SVE, there is limited reason to keep softirq > disabled when touching the FPSIMD/SVE context. Instead, we can simply > disable preemption and

Re: [PATCH kvmtool v3 5/9] KVM: arm/arm64: Add a vcpu feature for pointer authentication

2019-06-03 Thread Dave Martin
On Mon, Jun 03, 2019 at 03:03:48PM +0100, Andre Przywara wrote: > On Mon, 3 Jun 2019 12:23:03 +0100 > Dave Martin wrote: > > Hi Dave, > > > On Fri, May 31, 2019 at 06:04:16PM +0100, Andre Przywara wrote: > > > On Thu, 30 May 2019 16:13:10 +0100 > > > Dave Martin wrote: > > > > > > > From: Am

Re: [PATCH kvmtool v3 5/9] KVM: arm/arm64: Add a vcpu feature for pointer authentication

2019-06-03 Thread Dave Martin
On Mon, Jun 03, 2019 at 03:07:06PM +0100, Will Deacon wrote: > On Mon, Jun 03, 2019 at 12:23:03PM +0100, Dave Martin wrote: > > On Fri, May 31, 2019 at 06:04:16PM +0100, Andre Przywara wrote: > > > On Thu, 30 May 2019 16:13:10 +0100 > > > Dave Martin wrote: > > > > > > > From: Amit Daniel Kachhap

Re: [PATCH kvmtool v3 5/9] KVM: arm/arm64: Add a vcpu feature for pointer authentication

2019-06-03 Thread Will Deacon
On Mon, Jun 03, 2019 at 12:23:03PM +0100, Dave Martin wrote: > On Fri, May 31, 2019 at 06:04:16PM +0100, Andre Przywara wrote: > > On Thu, 30 May 2019 16:13:10 +0100 > > Dave Martin wrote: > > > > > From: Amit Daniel Kachhap > > > > > > This patch adds a runtime capabality for KVM tool to enabl

Re: [PATCH kvmtool v3 5/9] KVM: arm/arm64: Add a vcpu feature for pointer authentication

2019-06-03 Thread Andre Przywara
On Mon, 3 Jun 2019 12:23:03 +0100 Dave Martin wrote: Hi Dave, > On Fri, May 31, 2019 at 06:04:16PM +0100, Andre Przywara wrote: > > On Thu, 30 May 2019 16:13:10 +0100 > > Dave Martin wrote: > > > > > From: Amit Daniel Kachhap > > > > > > This patch adds a runtime capabality for KVM tool to

Re: [PATCH kvmtool v3 5/9] KVM: arm/arm64: Add a vcpu feature for pointer authentication

2019-06-03 Thread Dave Martin
@Peter, do you have an opinion on this (below) ? On Thu, May 30, 2019 at 04:13:10PM +0100, Dave Martin wrote: > From: Amit Daniel Kachhap > > This patch adds a runtime capabality for KVM tool to enable Arm64 8.3 > Pointer Authentication in guest kernel. Two vcpu features > KVM_ARM_VCPU_PTRAUTH_[

Re: [PATCH] KVM: arm/arm64: fix emulated ptimer irq injection

2019-06-03 Thread Andrew Jones
On Wed, May 29, 2019 at 12:03:11PM +0200, Christoffer Dall wrote: > On Wed, May 29, 2019 at 10:13:21AM +0100, Marc Zyngier wrote: > > On 29/05/2019 10:08, Christoffer Dall wrote: > > > On Tue, May 28, 2019 at 05:08:53PM +0100, Marc Zyngier wrote: > > >> On 28/05/2019 14:40, Andrew Jones wrote: > >

Re: [PATCH kvmtool v3 5/9] KVM: arm/arm64: Add a vcpu feature for pointer authentication

2019-06-03 Thread Dave Martin
On Fri, May 31, 2019 at 06:04:16PM +0100, Andre Przywara wrote: > On Thu, 30 May 2019 16:13:10 +0100 > Dave Martin wrote: > > > From: Amit Daniel Kachhap > > > > This patch adds a runtime capabality for KVM tool to enable Arm64 8.3 > > Pointer Authentication in guest kernel. Two vcpu features >

Re: [PATCH kvmtool v3 8/9] arm64: Add SVE support

2019-06-03 Thread Dave Martin
On Fri, May 31, 2019 at 06:13:31PM +0100, Andre Przywara wrote: > On Thu, 30 May 2019 16:13:13 +0100 > Dave Martin wrote: > > > This patch adds --enable-sve/--disable-sve command line options to > > allow the user to control whether the Scalable Vector Extension is > > made available to the guest

Re: [PATCH kvmtool v3 7/9] arm64: Make ptrauth enable/disable diagnostics more user-friendly

2019-06-03 Thread Dave Martin
On Fri, May 31, 2019 at 06:05:01PM +0100, Andre Przywara wrote: > On Thu, 30 May 2019 16:13:12 +0100 > Dave Martin wrote: > > > To help the user understand what is going on, amend ptrauth > > configuration diagnostic messages to refer to command line options > > by the exact name used on the comm

Re: [PATCH kvmtool v3 4/9] update_headers: Sync kvm UAPI headers with linux v5.1-rc1

2019-06-03 Thread Dave Martin
On Fri, May 31, 2019 at 06:03:19PM +0100, Andre Przywara wrote: > On Thu, 30 May 2019 16:13:09 +0100 > Dave Martin wrote: > > > Subject: [PATCH kvmtool v3 4/9] update_headers: Sync kvm UAPI headers with > > linux v5.1-rc1 > > This is actually v5.2-rc1, isn't it? Doh. Yes. Amended. > Apart f

Re: [PATCH kvmtool v3 6/9] arm/arm64: Factor out ptrauth vcpu feature setup

2019-06-03 Thread Dave Martin
On Fri, May 31, 2019 at 06:04:36PM +0100, Andre Przywara wrote: > On Thu, 30 May 2019 16:13:11 +0100 > Dave Martin wrote: > > > In the interest of readability, factor out the vcpu feature setup > > for ptrauth into a separate function. > > > > Also, because aarch32 doesn't have this feature or t

Re: [PATCH kvmtool v3 3/9] update_headers.sh: arm64: Copy sve_context.h if available

2019-06-03 Thread Dave Martin
On Fri, May 31, 2019 at 06:03:40PM +0100, Andre Przywara wrote: > On Thu, 30 May 2019 16:13:08 +0100 > Dave Martin wrote: > > > The SVE KVM support for arm64 includes the additional backend > > header from . > > > > So update this header if it is available. > > > > To avoid creating a sudden d

Re: [PATCH kvmtool v3 2/9] update_headers.sh: Cleanly report failure on error

2019-06-03 Thread Dave Martin
On Fri, May 31, 2019 at 06:03:10PM +0100, Andre Przywara wrote: > On Thu, 30 May 2019 16:13:07 +0100 > Dave Martin wrote: > > > If in intermediate step fails, update_headers.sh blindly continues > > and may return success status. > > > > To avoid errors going unnoticed when driving this script,

Re: [PATCH kvmtool v3 1/9] update_headers.sh: Add missing shell quoting

2019-06-03 Thread Dave Martin
On Fri, May 31, 2019 at 06:02:53PM +0100, Andre Przywara wrote: > On Thu, 30 May 2019 16:13:06 +0100 > Dave Martin wrote: > > > update_headers.sh can break if the current working directory has a > > funny name or if something odd is passed for LINUX_ROOT. > > Do you actually have spaces in your