Re: [PATCH v6 kvmtool 00/13] Add vfio-pci support

2018-06-19 Thread Will Deacon
On Mon, Jun 18, 2018 at 07:41:58PM +0100, Jean-Philippe Brucker wrote: > This is version six of the VFIO support in kvmtool. It addresses > Will's comments for v5. > > Implement vfio-pci support in kvmtool. Devices are assigned to the guest > by passing "--vfio-pci [domain:]bus:dev.fn" to lkvm

Re: [PATCH 1/2] KVM: Enforce error in ioctl for compat tasks when !KVM_COMPAT

2018-06-19 Thread Christian Borntraeger
On 06/19/2018 12:10 PM, Marc Zyngier wrote: > On 19/06/18 11:01, Mark Rutland wrote: >> On Tue, Jun 19, 2018 at 10:42:50AM +0100, Marc Zyngier wrote: >>> The current behaviour of the compat ioctls is a bit odd. >>> We provide a compat_ioctl method when KVM_COMPAT is set, and NULL >>> otherwise.

Re: [PATCH 1/2] KVM: Enforce error in ioctl for compat tasks when !KVM_COMPAT

2018-06-19 Thread Marc Zyngier
On 19/06/18 11:01, Mark Rutland wrote: > On Tue, Jun 19, 2018 at 10:42:50AM +0100, Marc Zyngier wrote: >> The current behaviour of the compat ioctls is a bit odd. >> We provide a compat_ioctl method when KVM_COMPAT is set, and NULL >> otherwise. But NULL means that the normal, non-compat ioctl

Re: [PATCH 1/2] KVM: Enforce error in ioctl for compat tasks when !KVM_COMPAT

2018-06-19 Thread Mark Rutland
On Tue, Jun 19, 2018 at 10:42:50AM +0100, Marc Zyngier wrote: > The current behaviour of the compat ioctls is a bit odd. > We provide a compat_ioctl method when KVM_COMPAT is set, and NULL > otherwise. But NULL means that the normal, non-compat ioctl should > be used directly for compat tasks, and

[PATCH 2/2] KVM: arm64: Prevent KVM_COMPAT from being selected

2018-06-19 Thread Marc Zyngier
There is very little point in trying to support the 32bit KVM/arm API on arm64, and this was never an anticipated use case. Let's make it clear by not selecting KVM_COMPAT. Signed-off-by: Marc Zyngier --- virt/kvm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/2] KVM: Enforce error in ioctl for compat tasks when !KVM_COMPAT

2018-06-19 Thread Marc Zyngier
The current behaviour of the compat ioctls is a bit odd. We provide a compat_ioctl method when KVM_COMPAT is set, and NULL otherwise. But NULL means that the normal, non-compat ioctl should be used directly for compat tasks, and there is no way to actually prevent a compat task from issueing KVM

[PATCH 0/2] KVM: Fix !KVM_COMPAT ioctl behaviour

2018-06-19 Thread Marc Zyngier
Mark Rutland recently pointed out that a couple of issues with the way we deal with compat tasks: 1) arm64 unexpectedly selects KVM_COMPAT, while offering no way for a 32bit userspace to change any register 2) Even deselecting KVM_COMPAT, we end-up with compat_ioctl being NULL, and the VFS