Re: [PATCH] KVM: arm64: Check GICV address is placed at a 4Kb boundary

2016-06-29 Thread Itaru Kitayama
Christoffer, On 6/29/16 9:43 PM, Christoffer Dall wrote: Doesn't this change carry the risk of KVM mapping a page (larger than 4K) containing other things than the GICV interface into the guest, potentially breaking isolation of the VM from host hardware resources? I still suspect the 64Kb

Re: [PATCH v7 17/17] KVM: arm64: enable ITS emulation as a virtual MSI controller

2016-06-29 Thread Auger Eric
Hi Andre, On 28/06/2016 14:32, Andre Przywara wrote: > Now that all ITS emulation functionality is in place, we advertise > MSI functionality to userland and also the ITS device to the guest - if > userland has configured that. > > Signed-off-by: Andre Przywara > --- >

Re: [PATCH v7 08/17] KVM: arm64: handle ITS related GICv3 redistributor registers

2016-06-29 Thread Auger Eric
Hi Andre, On 28/06/2016 14:32, Andre Przywara wrote: > In the GICv3 redistributor there are the PENDBASER and PROPBASER > registers which we did not emulate so far, as they only make sense > when having an ITS. In preparation for that emulate those MMIO > accesses by storing the 64-bit data

Re: [PATCH v7 05/17] KVM: kvm_io_bus: add kvm_io_bus_get_dev() call

2016-06-29 Thread Auger Eric
On 28/06/2016 14:32, Andre Przywara wrote: > The kvm_io_bus framework is a nice place of holding information about > various MMIO regions for kernel emulated devices. > Add a call to retrieve the kvm_io_device structure which is associated > with a certain MMIO address. This avoids to duplicate

Re: [PATCH v7 06/17] KVM: arm/arm64: VGIC: add refcounting for IRQs

2016-06-29 Thread Auger Eric
Hi Andre, On 28/06/2016 14:32, Andre Przywara wrote: > In the moment our struct vgic_irq's are statically allocated at guest > creation time. So getting a pointer to an IRQ structure is trivial and > safe. LPIs are more dynamic, they can be mapped and unmapped at any time > during the guest's

Re: [PATCH v7 02/17] KVM: arm/arm64: check return value for kvm_register_vgic_device

2016-06-29 Thread Auger Eric
On 28/06/2016 14:32, Andre Przywara wrote: > kvm_register_device_ops() can return an error, so lets check its return returned > value and propagate this up the call chain. > > Signed-off-by: Andre Przywara > --- > virt/kvm/arm/vgic/vgic-kvm-device.c | 15

Re: [PATCH v7 01/17] KVM: arm/arm64: move redistributor kvm_io_devices

2016-06-29 Thread Auger Eric
Hi Andre, On 28/06/2016 14:32, Andre Przywara wrote: > Logically a GICv3 redistributor is assigned to a (v)CPU, so we should > aim to keep redistributor related variables out of our struct vgic_dist. > > Let's start by replacing the redistributor related kvm_io_device array > with two members in

Re: [PATCH] KVM: arm64: Check GICV address is placed at a 4Kb boundary

2016-06-29 Thread Christoffer Dall
Hi Itaru, On Wed, Jun 29, 2016 at 03:22:45PM +0900, Itaru Kitayama wrote: > Make sure GICV physical address is placed at a 4Kb boundary as spec > says, not host kernel's page boundary. This prevents !4Kb kernels > from returning an ENXIO prematurely during the KVM init phase at > boot. > Tested

Re: [PATCH 0/5] arm/arm64: KVM: Tighten memory protection flags

2016-06-29 Thread Christoffer Dall
Hi Marc, On Mon, Jun 13, 2016 at 03:00:44PM +0100, Marc Zyngier wrote: > So far, the HYP mappings have been fairly relaxed: everything is > RWX. Oddly enough, not everybody is fond of this kind of permissions > at the highest exception level. > > This small series tightens it a bit by making: >

Re: [PATCH 01/15] arm64: KVM: Merged page tables documentation

2016-06-29 Thread Marc Zyngier
On Tue, 28 Jun 2016 13:46:08 +0200 Christoffer Dall wrote: > On Mon, Jun 27, 2016 at 03:06:11PM +0100, Marc Zyngier wrote: > > On 27/06/16 14:28, Christoffer Dall wrote: > > > On Tue, Jun 07, 2016 at 11:58:21AM +0100, Marc Zyngier wrote: > > >> Since dealing with VA

Re: issues with emulated PCI MMIO backed by host memory under KVM

2016-06-29 Thread Gerd Hoffmann
On Di, 2016-06-28 at 15:32 +0200, Laszlo Ersek wrote: > (adding Gerd) > > On 06/28/16 15:14, Ard Biesheuvel wrote: > > > In any case, reconciling software that requires a framebuffer with a > > GPU emulation that does not expose one by design is going to be > > problematic even without this

[PATCH] KVM: arm64: Check GICV address is placed at a 4Kb boundary

2016-06-29 Thread Itaru Kitayama
Make sure GICV physical address is placed at a 4Kb boundary as spec says, not host kernel's page boundary. This prevents !4Kb kernels from returning an ENXIO prematurely during the KVM init phase at boot. Tested on Overdrive 3000 with 64Kb page-size kernel with ACPI. Signed-off-by: Itaru