Re: [PATCH v4 7/7] KVM: arm64: Add support for creating PUD hugepages at stage 2

2018-07-05 Thread Suzuki K Poulose
Hi Punit, On 05/07/18 15:08, Punit Agrawal wrote: KVM only supports PMD hugepages at stage 2. Now that the various page handling routines are updated, extend the stage 2 fault handling to map in PUD hugepages. Addition of PUD hugepage support enables additional page sizes (e.g., 1G with 4K gran

Re: [PATCH v4 1/7] KVM: arm/arm64: Share common code in user_mem_abort()

2018-07-05 Thread Punit Agrawal
Marc Zyngier writes: > Hi Punit, > > On 05/07/18 15:08, Punit Agrawal wrote: >> The code for operations such as marking the pfn as dirty, and >> dcache/icache maintenance during stage 2 fault handling is duplicated >> between normal pages and PMD hugepages. >> >> Instead of creating another copy

Re: [PATCH v4 4/7] KVM: arm64: Support PUD hugepage in stage2_is_exec()

2018-07-05 Thread Suzuki K Poulose
Hi Punit, On 05/07/18 15:08, Punit Agrawal wrote: In preparation for creating PUD hugepages at stage 2, add support for detecting execute permissions on PUD page table entries. Faults due to lack of execute permissions on page table entries is used to perform i-cache invalidation on first execut

Re: [PATCH v4 1/7] KVM: arm/arm64: Share common code in user_mem_abort()

2018-07-05 Thread Marc Zyngier
Hi Punit, On 05/07/18 15:08, Punit Agrawal wrote: > The code for operations such as marking the pfn as dirty, and > dcache/icache maintenance during stage 2 fault handling is duplicated > between normal pages and PMD hugepages. > > Instead of creating another copy of the operations when we introd

Re: [PATCH v5 00/20] APEI in_nmi() rework and arm64 SDEI wire-up

2018-07-05 Thread James Morse
Hi guys, On 05/07/18 10:50, Rafael J. Wysocki wrote: > On Tuesday, June 26, 2018 7:00:56 PM CEST James Morse wrote: >> The aim of this series is to wire arm64's SDEI into APEI. >> >> On arm64 we have three APEI notifications that are NMI-like, and >> in the unlikely event that all three are suppor

Re: [kvmtool test PATCH 22/24] kvmtool: arm64: Add support for guest physical address size

2018-07-05 Thread Auger Eric
Hi Suzuki, Marc, On 07/05/2018 04:15 PM, Marc Zyngier wrote: > Hi Eric, > > On 05/07/18 14:46, Auger Eric wrote: >> Hi Marc, >> >> On 07/05/2018 03:20 PM, Marc Zyngier wrote: >>> On 05/07/18 13:47, Julien Grall wrote: Hi Will, On 04/07/18 16:52, Will Deacon wrote: > On Wed, Jul

Re: [kvmtool test PATCH 22/24] kvmtool: arm64: Add support for guest physical address size

2018-07-05 Thread Marc Zyngier
Hi Eric, On 05/07/18 14:46, Auger Eric wrote: > Hi Marc, > > On 07/05/2018 03:20 PM, Marc Zyngier wrote: >> On 05/07/18 13:47, Julien Grall wrote: >>> Hi Will, >>> >>> On 04/07/18 16:52, Will Deacon wrote: On Wed, Jul 04, 2018 at 04:00:11PM +0100, Julien Grall wrote: > On 04/07/18 15:09,

Re: [kvmtool test PATCH 22/24] kvmtool: arm64: Add support for guest physical address size

2018-07-05 Thread Suzuki K Poulose
On 05/07/18 14:46, Auger Eric wrote: Hi Marc, On 07/05/2018 03:20 PM, Marc Zyngier wrote: On 05/07/18 13:47, Julien Grall wrote: Hi Will, On 04/07/18 16:52, Will Deacon wrote: On Wed, Jul 04, 2018 at 04:00:11PM +0100, Julien Grall wrote: On 04/07/18 15:09, Will Deacon wrote: On Fri, Jun 29

[PATCH v4 6/7] KVM: arm64: Update age handlers to support PUD hugepages

2018-07-05 Thread Punit Agrawal
In preparation for creating larger hugepages at Stage 2, add support to the age handling notifiers for PUD hugepages when encountered. Provide trivial helpers for arm32 to allow sharing code. Signed-off-by: Punit Agrawal Cc: Christoffer Dall Cc: Marc Zyngier Cc: Russell King Cc: Catalin Marin

[PATCH v4 5/7] KVM: arm64: Support handling access faults for PUD hugepages

2018-07-05 Thread Punit Agrawal
In preparation for creating larger hugepages at Stage 2, extend the access fault handling at Stage 2 to support PUD hugepages when encountered. Provide trivial helpers for arm32 to allow sharing of code. Signed-off-by: Punit Agrawal Cc: Christoffer Dall Cc: Marc Zyngier Cc: Russell King Cc: C

[PATCH v4 7/7] KVM: arm64: Add support for creating PUD hugepages at stage 2

2018-07-05 Thread Punit Agrawal
KVM only supports PMD hugepages at stage 2. Now that the various page handling routines are updated, extend the stage 2 fault handling to map in PUD hugepages. Addition of PUD hugepage support enables additional page sizes (e.g., 1G with 4K granule) which can be useful on cores that support mappin

[PATCH v4 4/7] KVM: arm64: Support PUD hugepage in stage2_is_exec()

2018-07-05 Thread Punit Agrawal
In preparation for creating PUD hugepages at stage 2, add support for detecting execute permissions on PUD page table entries. Faults due to lack of execute permissions on page table entries is used to perform i-cache invalidation on first execute. Provide trivial implementations of arm32 helpers

[PATCH v4 2/7] KVM: arm/arm64: Introduce helpers to manupulate page table entries

2018-07-05 Thread Punit Agrawal
Introduce helpers to abstract architectural handling of the conversion of pfn to page table entries and marking a PMD page table entry as a block entry. The helpers are introduced in preparation for supporting PUD hugepages at stage 2 - which are supported on arm64 but do not exist on arm. Signed

[PATCH v4 3/7] KVM: arm64: Support dirty page tracking for PUD hugepages

2018-07-05 Thread Punit Agrawal
In preparation for creating PUD hugepages at stage 2, add support for write protecting PUD hugepages when they are encountered. Write protecting guest tables is used to track dirty pages when migrating VMs. Also, provide trivial implementations of required kvm_s2pud_* helpers to allow sharing of c

[PATCH v4 1/7] KVM: arm/arm64: Share common code in user_mem_abort()

2018-07-05 Thread Punit Agrawal
The code for operations such as marking the pfn as dirty, and dcache/icache maintenance during stage 2 fault handling is duplicated between normal pages and PMD hugepages. Instead of creating another copy of the operations when we introduce PUD hugepages, let's share them across the different page

[PATCH v4 0/7] KVM: Support PUD hugepages at stage 2

2018-07-05 Thread Punit Agrawal
This series is an update to the PUD hugepage support previously posted at [0][1][2][3]. This patchset adds support for PUD hugepages at stage 2. This feature is useful on cores that have support for large sized TLB mappings (e.g., 1GB for 4K granule). There are a three new patches to support PUD h

Re: [kvmtool test PATCH 22/24] kvmtool: arm64: Add support for guest physical address size

2018-07-05 Thread Auger Eric
Hi Marc, On 07/05/2018 03:20 PM, Marc Zyngier wrote: > On 05/07/18 13:47, Julien Grall wrote: >> Hi Will, >> >> On 04/07/18 16:52, Will Deacon wrote: >>> On Wed, Jul 04, 2018 at 04:00:11PM +0100, Julien Grall wrote: On 04/07/18 15:09, Will Deacon wrote: > On Fri, Jun 29, 2018 at 12:15:42P

Re: [kvmtool test PATCH 22/24] kvmtool: arm64: Add support for guest physical address size

2018-07-05 Thread Marc Zyngier
On 05/07/18 13:47, Julien Grall wrote: > Hi Will, > > On 04/07/18 16:52, Will Deacon wrote: >> On Wed, Jul 04, 2018 at 04:00:11PM +0100, Julien Grall wrote: >>> On 04/07/18 15:09, Will Deacon wrote: On Fri, Jun 29, 2018 at 12:15:42PM +0100, Suzuki K Poulose wrote: > Add an option to speci

Re: [kvmtool test PATCH 22/24] kvmtool: arm64: Add support for guest physical address size

2018-07-05 Thread Julien Grall
Hi Will, On 04/07/18 16:52, Will Deacon wrote: On Wed, Jul 04, 2018 at 04:00:11PM +0100, Julien Grall wrote: On 04/07/18 15:09, Will Deacon wrote: On Fri, Jun 29, 2018 at 12:15:42PM +0100, Suzuki K Poulose wrote: Add an option to specify the physical address size used by this VM. Signed-off-

Re: [PATCH v5 00/20] APEI in_nmi() rework and arm64 SDEI wire-up

2018-07-05 Thread Rafael J. Wysocki
On Tuesday, June 26, 2018 7:00:56 PM CEST James Morse wrote: > The aim of this series is to wire arm64's SDEI into APEI. > > On arm64 we have three APEI notifications that are NMI-like, and > in the unlikely event that all three are supported by a platform, > they can interrupt each other. > The G

Re: [kvmtool test PATCH 24/24] kvmtool: arm: Add support for creating VM with PA size

2018-07-05 Thread Auger Eric
Hi, On 07/05/2018 09:51 AM, Peter Maydell wrote: > On 4 July 2018 at 16:51, Will Deacon wrote: >> On Wed, Jul 04, 2018 at 03:41:18PM +0100, Marc Zyngier wrote: >>> Not really. Let's say I want my IPA space split in two: memory covers >>> the low 47 bit, and I want MMIO spanning the top 47 bit. Wi

Re: [kvmtool test PATCH 24/24] kvmtool: arm: Add support for creating VM with PA size

2018-07-05 Thread Peter Maydell
On 4 July 2018 at 16:51, Will Deacon wrote: > On Wed, Jul 04, 2018 at 03:41:18PM +0100, Marc Zyngier wrote: >> Not really. Let's say I want my IPA space split in two: memory covers >> the low 47 bit, and I want MMIO spanning the top 47 bit. With your >> scheme, you'd end-up with a 47bit IPA space,