Re: [PATCH 0/8] arm64: KVM: Fix PMU exception generation

2017-03-07 Thread Marc Zyngier
On Sun, Mar 05 2017 at 3:01:09 pm GMT, Christoffer Dall wrote: > Hi Marc, > > On Wed, Feb 22, 2017 at 11:47:20AM +, Marc Zyngier wrote: >> Running the following code: >> >> root@zomby-woof:~# cat test-pmu.c >> int main(int argc, char *argv[]) >> { >> unsigned int val; >> asm ("mrc

Re: [PATCH 0/8] arm64: KVM: Fix PMU exception generation

2017-03-07 Thread Christoffer Dall
On Tue, Mar 07, 2017 at 09:33:37AM +, Marc Zyngier wrote: > On Sun, Mar 05 2017 at 3:01:09 pm GMT, Christoffer Dall > wrote: > > Hi Marc, > > > > On Wed, Feb 22, 2017 at 11:47:20AM +, Marc Zyngier wrote: > >> Running the following code: > >> > >> root@zomby-woof:~# cat test-pmu.c > >> i

Re: KVM on ARM Cortex A53 in 32-bit Mode

2017-03-07 Thread Christoffer Dall
Hi Yasutaka, On Thu, Mar 02, 2017 at 09:57:50AM -0500, Yasutaka Tanaka wrote: > Hello KVM/ARM community, > > I am now trying to execute KVM on Raspberry Pi 3 Model B (RPI3). > Does anyone know whether KVM/ARM can run with 32-bit mode on ARM Cortex A53? Theoretically, it should. > > The CPU of

Re: [PATCH v2] KVM: arm/arm64: Let vcpu thread modify its own active state

2017-03-07 Thread Christoffer Dall
On Mon, Mar 06, 2017 at 02:20:44PM -0500, Jintack Lim wrote: > Hi Christoffer, > > thanks for submitting this patch. > > On Mon, Mar 6, 2017 at 8:42 AM, Christoffer Dall > wrote: > > From: Jintack Lim > > > > Currently, if a vcpu thread tries to change the active state of an > > interrupt which

Re: [PATCH V12 00/10] Add UEFI 2.6 and ACPI 6.1 updates for RAS on ARM64

2017-03-07 Thread James Morse
Hi Tyler, On 06/03/17 20:44, Tyler Baicar wrote: > When a memory error, CPU error, PCIe error, or other type of hardware error > that's covered by RAS occurs, firmware should populate the shared GHES memory > location with the proper GHES structures to notify the OS of the error. > For example, pl

Re: [PATCH V12 05/10] acpi: apei: handle SEA notification type for ARMv8

2017-03-07 Thread James Morse
Hi Tyler, On 06/03/17 20:44, Tyler Baicar wrote: > ARM APEI extension proposal added SEA (Synchronous External Abort) > notification type for ARMv8. > Add a new GHES error source handling function for SEA. If an error > source's notification type is SEA, then this function can be registered > into

Re: [PATCH V12 10/10] arm/arm64: KVM: add guest SEA support

2017-03-07 Thread James Morse
Hi Tyler, On 06/03/17 20:45, Tyler Baicar wrote: > Currently external aborts are unsupported by the guest abort > handling. Add handling for SEAs so that the host kernel reports > SEAs which occur in the guest kernel. > diff --git a/arch/arm/include/asm/kvm_arm.h b/arch/arm/include/asm/kvm_arm.h

Re: [PATCH v4 4/6] arm64: mmu: map .text as read-only from the outset

2017-03-07 Thread Mark Rutland
On Sat, Mar 04, 2017 at 02:30:46PM +, Ard Biesheuvel wrote: > Now that alternatives patching code no longer relies on the primary > mapping of .text being writable, we can remove the code that removes > the writable permissions post-init time, and map it read-only from > the outset. > > To pre

Re: [PATCH v4 5/6] arm64: mmu: apply strict permissions to .init.text and .init.data

2017-03-07 Thread Mark Rutland
On Sat, Mar 04, 2017 at 02:30:47PM +, Ard Biesheuvel wrote: > diff --git a/arch/arm64/include/asm/sections.h > b/arch/arm64/include/asm/sections.h > index 4e7e7067afdb..22582819b2e5 100644 > --- a/arch/arm64/include/asm/sections.h > +++ b/arch/arm64/include/asm/sections.h > @@ -24,7 +24,8 @@ e

Re: [PATCH] KVM: arm64: VGIC: fix command handling while ITS being disabled

2017-03-07 Thread Christoffer Dall
On Thu, Feb 16, 2017 at 10:41:20AM +, Andre Przywara wrote: > The ITS spec says that ITS commands are only processed when the ITS > is enabled (section 8.19.4, Enabled, bit[0]). Our emulation was not taking > this into account. > Fix this by checking the enabled state before handling CWRITER wr

Re: [PATCH V3 1/4] KVM: Add documentation for KVM_CAP_NR_MEMSLOTS

2017-03-07 Thread Christoffer Dall
On Tue, Mar 07, 2017 at 11:22:41AM +0530, linucher...@gmail.com wrote: > From: Linu Cherian Please add a patch description, even if it just repeats the subject line as in this case. Otherwise: Acked-by: Christoffer Dall > > Signed-off-by: Linu Cherian > --- > Documentation/virtual/kvm/api.

Re: [PATCH V3 3/4] KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are unused

2017-03-07 Thread Marc Zyngier
On Tue, Mar 07 2017 at 5:52:43 am GMT, linucher...@gmail.com wrote: > From: Linu Cherian > > Signed-off-by: Linu Cherian Please add a decent commit message. Even if this is an obvious patch, explain the rational behind it. Patch 1 has the same problem. Thanks, M. -- Jazz is not dead,

Re: [PATCH V12 00/10] Add UEFI 2.6 and ACPI 6.1 updates for RAS on ARM64

2017-03-07 Thread Baicar, Tyler
On 3/7/2017 4:37 AM, James Morse wrote: Hi Tyler, On 06/03/17 20:44, Tyler Baicar wrote: When a memory error, CPU error, PCIe error, or other type of hardware error that's covered by RAS occurs, firmware should populate the shared GHES memory location with the proper GHES structures to notify t

Re: [PATCH V12 07/10] efi: print unrecognized CPER section

2017-03-07 Thread Baicar, Tyler
On 3/6/2017 2:05 PM, Joe Perches wrote: On Mon, 2017-03-06 at 13:45 -0700, Tyler Baicar wrote: UEFI spec allows for non-standard section in Common Platform Error Record. This is defined in section N.2.3 of UEFI version 2.5. Currently if the CPER section's type (UUID) does not match with one of

Re: [PATCH V12 05/10] acpi: apei: handle SEA notification type for ARMv8

2017-03-07 Thread Baicar, Tyler
Hello James, On 3/7/2017 4:37 AM, James Morse wrote: On 06/03/17 20:44, Tyler Baicar wrote: ARM APEI extension proposal added SEA (Synchronous External Abort) notification type for ARMv8. Add a new GHES error source handling function for SEA. If an error source's notification type is SEA, then

Re: [PATCH v4 6/6] arm64: mm: set the contiguous bit for kernel mappings where appropriate

2017-03-07 Thread Mark Rutland
Hi, On Sat, Mar 04, 2017 at 02:30:48PM +, Ard Biesheuvel wrote: > This is the third attempt at enabling the use of contiguous hints for > kernel mappings. The most recent attempt 0bfc445dec9d was reverted after > it turned out that updating permission attributes on live contiguous ranges > may

Re: [kvm-unit-tests PATCH] arm/arm64: gic: Test changing active state of interrupts

2017-03-07 Thread Andrew Jones
On Mon, Mar 06, 2017 at 07:16:09AM -0800, Christoffer Dall wrote: > From: Christoffer Dall > > We found a deadlock when changing the active state of an interrupt while > the interrupt is queued on the LR of the running VCPU. > > Defend KVM against this bug in the future now when we've introduced

Re: [PATCH V12 10/10] arm/arm64: KVM: add guest SEA support

2017-03-07 Thread Baicar, Tyler
Hello James, On 3/7/2017 4:48 AM, James Morse wrote: On 06/03/17 20:45, Tyler Baicar wrote: Currently external aborts are unsupported by the guest abort handling. Add handling for SEAs so that the host kernel reports SEAs which occur in the guest kernel. diff --git a/arch/arm/include/asm/kvm_a

Re: [kvm-unit-tests PATCH] arm/arm64: gic: Test changing active state of interrupts

2017-03-07 Thread Radim Krčmář
2017-03-07 17:58+0100, Andrew Jones: > On Mon, Mar 06, 2017 at 07:16:09AM -0800, Christoffer Dall wrote: > > From: Christoffer Dall > > > > We found a deadlock when changing the active state of an interrupt while > > the interrupt is queued on the LR of the running VCPU. > > > > Defend KVM again

[PATCH v4 4/4] KVM: arm64: Increase number of user memslots to 512

2017-03-07 Thread linucherian
From: Linu Cherian Having only 32 memslots is a real constraint for the maximum number of PCI devices that can be assigned to a single guest. Assuming each PCI device/virtual function having two memory BAR regions, we could assign only 15 devices/virtual functions to a guest. Hence increase KVM_

[PATCH v4 2/4] KVM: arm/arm64: Enable KVM_CAP_NR_MEMSLOTS on arm/arm64

2017-03-07 Thread linucherian
From: Linu Cherian Return KVM_USER_MEM_SLOTS for userspace capability query on NR_MEMSLOTS. Signed-off-by: Linu Cherian --- arch/arm/kvm/arm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/kvm/arm.c b/arch/arm/kvm/arm.c index 9d74464..b64b47f 100644 --- a/arch/arm/kvm/arm.c +

[PATCH v4 1/4] KVM: Add documentation for KVM_CAP_NR_MEMSLOTS

2017-03-07 Thread linucherian
From: Linu Cherian Add documentation for KVM_CAP_NR_MEMSLOTS capability. Signed-off-by: Linu Cherian --- Documentation/virtual/kvm/api.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/virtual/kvm/api.txt b/Documentation/virtual/kvm/api.txt index 03145b7..7b82f1c 10064

[PATCH v4 0/4] KVM: arm64: Increase number of user memslots

2017-03-07 Thread linucherian
From: Linu Cherian v3 -> v4: - Add missing commit messages in patches 1 and 3 v2 -> v3: - Added documentation for KVM_CAP_NR_MEMSLOTS - Removed KVM_PRIVATE_MEM_SLOTS which is unused - KVM_USER_MEM_SLOTS changed to 512 from 508 v1 -> v2: - Enabling KVM_CAP_NR_MEMSLOTS for arm/arm64 moved to sep

[PATCH v4 3/4] KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are unused

2017-03-07 Thread linucherian
From: Linu Cherian arm/arm64 architecture doesnt use private memslots, hence removing KVM_PRIVATE_MEM_SLOTS macro definition. Signed-off-by: Linu Cherian --- arch/arm/include/asm/kvm_host.h | 1 - arch/arm64/include/asm/kvm_host.h | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/arm