Re: [PATCH 6/6] target-arm/cpu.h: document why env-spsr exists

2015-03-11 Thread Peter Maydell
On 25 February 2015 at 16:02, Alex Bennée alex.ben...@linaro.org wrote: I was getting very confused about the duplication of state. Perhaps we should just get rid of env-spsr and use helpers that understand the banking? I've already disagreed with this. I would suggest putting tentative

Re: [PATCH v9 5/5] KVM: arm/arm64: add irqfd support

2015-03-11 Thread Eric Auger
On 03/11/2015 03:24 PM, Christoffer Dall wrote: On Thu, Mar 05, 2015 at 12:27:42PM +0100, Paolo Bonzini wrote: On 05/03/2015 11:53, Marc Zyngier wrote: +#ifdef CONFIG_HAVE_KVM_IRQFD + case KVM_CAP_IRQFD: + r = vgic_present; + break; +#endif Nitpick: we have select

Re: [PATCH] arm64: dts: Fix GIC reg sizes for APM X-Gene

2015-03-11 Thread Feng Kan
On Wed, Mar 11, 2015 at 7:53 AM, Marc Zyngier marc.zyng...@arm.com wrote: On 27/01/15 07:03, Pranavkumar Sawargaonkar wrote: In APM X-Gene, GIC register space is 64K aligned while the sizes mentioned in the dt are 4K aligned. This breaks KVM when kernel is built with 64K page size due to size

Re: [PATCH v4 3/3] hw/intc/arm_gic: Initialize the vgic in the realize function

2015-03-11 Thread Peter Maydell
On 4 March 2015 at 14:16, Eric Auger eric.au...@linaro.org wrote: This patch forces vgic initialization in the vgic realize function. It uses a new group/attribute that allows such operation: KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_VGIC_CTRL_INIT This earlier initialization allows, for example,

Re: [PATCH v14 00/20] VFIO support for platform devices

2015-03-11 Thread Alex Williamson
On Wed, 2015-03-11 at 11:08 +0100, Baptiste Reynal wrote: Thanks Eric and Alex for your reviews. I can confirm we can drop the dependency, as I re-tested without it. Do you need a fix for the headers issue underlined by Eric ? Sure, send it as a follow-on patch though, don't respin the

Re: [PATCH v14 00/20] VFIO support for platform devices

2015-03-11 Thread Baptiste Reynal
Ok, from what I've seen : - nit: interrupt.h not needed at early stage in vfio_platform_private.h, until irq introduction This cannot be fixed by a follow-on patch as it is just the order in the patch series. - version of the driver: 0.10? Let's just keep it like that, moreover I didn't add

Re: [Qemu-devel] [PATCH v2 4/6] target-arm: kvm64 sync FP register state

2015-03-11 Thread Greg Bellows
On Wed, Mar 4, 2015 at 8:35 AM, Alex Bennée alex.ben...@linaro.org wrote: For migration to work we need to sync all of the register state. This is especially noticeable when GCC starts using FP registers as spill registers even with integer programs. Signed-off-by: Alex Bennée

[PATCH v5] hw/intc/arm_gic: Initialize the vgic in the realize function

2015-03-11 Thread Eric Auger
This patch forces vgic initialization in the vgic realize function. It uses a new group/attribute that allows such operation: KVM_DEV_ARM_VGIC_GRP_CTRL/KVM_DEV_ARM_VGIC_CTRL_INIT This earlier initialization allows, for example, to setup VFIO signaling and irqfd after vgic initialization, on a

Re: [PATCH] arm64: dts: Fix GIC reg sizes for APM X-Gene

2015-03-11 Thread Marc Zyngier
On 11/03/15 17:19, Feng Kan wrote: On Wed, Mar 11, 2015 at 7:53 AM, Marc Zyngier marc.zyng...@arm.com wrote: On 27/01/15 07:03, Pranavkumar Sawargaonkar wrote: In APM X-Gene, GIC register space is 64K aligned while the sizes mentioned in the dt are 4K aligned. This breaks KVM when kernel is

Re: [PATCH] arm64: dts: Fix GIC reg sizes for APM X-Gene

2015-03-11 Thread Marc Zyngier
On 11/03/15 17:57, Feng Kan wrote: On Wed, Mar 11, 2015 at 10:31 AM, Marc Zyngier marc.zyng...@arm.com wrote: On 11/03/15 17:19, Feng Kan wrote: On Wed, Mar 11, 2015 at 7:53 AM, Marc Zyngier marc.zyng...@arm.com wrote: On 27/01/15 07:03, Pranavkumar Sawargaonkar wrote: In APM X-Gene, GIC

Re: [PATCH v14 00/20] VFIO support for platform devices

2015-03-11 Thread Eric Auger
On 03/10/2015 07:04 PM, Alex Williamson wrote: On Tue, 2015-03-10 at 18:42 +0100, Eric Auger wrote: Hi Baptiste, Please add: Reviewed-by: Eric Auger eric.au...@linaro.org on the whole series Tested-by: Eric Auger eric.au...@linaro.org on the whole series except AMBA specific patches. I

Re: [PATCH v14 00/20] VFIO support for platform devices

2015-03-11 Thread Baptiste Reynal
Thanks Eric and Alex for your reviews. I can confirm we can drop the dependency, as I re-tested without it. Do you need a fix for the headers issue underlined by Eric ? Best regards, Baptiste On Wed, Mar 11, 2015 at 9:40 AM, Eric Auger eric.au...@linaro.org wrote: On 03/10/2015 07:04 PM, Alex

Re: [PATCH v2 1/3] arm64: KVM: Fix stage-2 PGD allocation to have per-page refcounting

2015-03-11 Thread Marc Zyngier
Hi Christoffer, On 11/03/15 12:16, Christoffer Dall wrote: Hi Marc, On Tue, Mar 10, 2015 at 07:06:59PM +, Marc Zyngier wrote: We're using __get_free_pages with to allocate the guest's stage-2 PGD. The standard behaviour of this function is to return a set of pages where only the head

Re: [PATCH v2 1/3] arm64: KVM: Fix stage-2 PGD allocation to have per-page refcounting

2015-03-11 Thread Christoffer Dall
On Wed, Mar 11, 2015 at 2:13 PM, Marc Zyngier marc.zyng...@arm.com wrote: Hi Christoffer, On 11/03/15 12:16, Christoffer Dall wrote: Hi Marc, On Tue, Mar 10, 2015 at 07:06:59PM +, Marc Zyngier wrote: We're using __get_free_pages with to allocate the guest's stage-2 PGD. The standard

Re: [PATCH v2 1/3] arm64: KVM: Fix stage-2 PGD allocation to have per-page refcounting

2015-03-11 Thread Christoffer Dall
Hi Marc, On Tue, Mar 10, 2015 at 07:06:59PM +, Marc Zyngier wrote: We're using __get_free_pages with to allocate the guest's stage-2 PGD. The standard behaviour of this function is to return a set of pages where only the head page has a valid refcount. This behaviour gets us into

Re: [PATCH] KVM: vgic: add virt-capable compatible strings

2015-03-11 Thread Christoffer Dall
On Thu, Mar 05, 2015 at 02:47:44PM +, Mark Rutland wrote: Several dts only list arm,cortex-a7-gic or arm,gic-400 in their GIC compatible list, and while this is correct (and supported by the GIC driver), KVM will fail to detect that it can support these cases. This patch adds the missing

Re: [Qemu-devel] [PATCH v2 1/6] target-arm: kvm: save/restore mp state

2015-03-11 Thread Greg Bellows
On Wed, Mar 4, 2015 at 8:35 AM, Alex Bennée alex.ben...@linaro.org wrote: This adds the saving and restore of the current Multi-Processing state of the machine. While the KVM_GET/SET_MP_STATE API exposes a number of potential states for x86 we only use two for ARM. Either the process is

Re: [Qemu-devel] [PATCH v2 2/6] hw/intc: arm_gic_kvm.c restore config first

2015-03-11 Thread Greg Bellows
On Wed, Mar 4, 2015 at 8:35 AM, Alex Bennée alex.ben...@linaro.org wrote: As there is logic to deal with the difference between edge and level triggered interrupts in the kernel we must ensure it knows the configuration of the IRQs before we restore the pending state. Signed-off-by: Alex

Re: [Qemu-devel] [PATCH v2 3/6] hw/char: pl011 don't keep setting the IRQ if nothing changed

2015-03-11 Thread Greg Bellows
On Wed, Mar 4, 2015 at 8:35 AM, Alex Bennée alex.ben...@linaro.org wrote: While observing KVM traces I can see additional IRQ calls on pretty much every MMIO access which is just plain inefficient. Only update the QEMU IRQ level if something has actually changed from last time. Otherwise we

Re: [PATCH] arm64: dts: Fix GIC reg sizes for APM X-Gene

2015-03-11 Thread Marc Zyngier
On 27/01/15 07:03, Pranavkumar Sawargaonkar wrote: In APM X-Gene, GIC register space is 64K aligned while the sizes mentioned in the dt are 4K aligned. This breaks KVM when kernel is built with 64K page size due to size alignment checking in vgic driver for VCPU Control and VCPU register.

[PATCH] arm/arm64: KVM: Kill CONFIG_KVM_ARM_{VGIC,TIMER}

2015-03-11 Thread Christoffer Dall
We can definitely decide at run-time whether to use the GIC and timers or not, and the extra code and data structures that we allocate space for is really negligable with this config option, so I don't think it's worth the extra complexity of always having to define stub static inlines. The

Re: [PATCH v2 1/3] arm64: KVM: Fix stage-2 PGD allocation to have per-page refcounting

2015-03-11 Thread Christoffer Dall
On Wed, Mar 11, 2015 at 3:03 PM, Andrew Jones drjo...@redhat.com wrote: On Wed, Mar 11, 2015 at 02:20:56PM +0100, Christoffer Dall wrote: On Wed, Mar 11, 2015 at 2:13 PM, Marc Zyngier marc.zyng...@arm.com wrote: Hi Christoffer, On 11/03/15 12:16, Christoffer Dall wrote: Hi Marc, On