Re: [PATCH v7 3/4] KVM: arm64: Share the parts of get/set events useful to 32bit

2018-07-11 Thread gengdongjiu
Hi James, On 2018/7/11 0:49, James Morse wrote: > The get/set events helpers to do some work to check reserved > and padding fields are zero. This is useful on 32bit too. > > Move this code into virt/kvm/arm/arm.c, and give the arch > code some underscores. > > This is temporarily hidden behind

Re: [PATCH v7 1/4] arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS

2018-07-11 Thread Marc Zyngier
On 11/07/18 07:48, gengdongjiu wrote: > Hi, James, > > [...] >> diff --git a/Documentation/virtual/kvm/api.txt >> b/Documentation/virtual/kvm/api.txt >> index d10944e619d3..e3940f8715a5 100644 >> --- a/Documentation/virtual/kvm/api.txt >> +++ b/Documentation/virtual/kvm/api.txt >> @@ -835,11 +835

Re: [PATCH v3 15/20] kvm: arm/arm64: Allow tuning the physical address size for VM

2018-07-11 Thread Suzuki K Poulose
On 10/07/18 18:03, Dave Martin wrote: On Tue, Jul 10, 2018 at 05:38:39PM +0100, Suzuki K Poulose wrote: On 09/07/18 14:37, Dave Martin wrote: On Mon, Jul 09, 2018 at 01:29:42PM +0100, Marc Zyngier wrote: On 09/07/18 12:23, Dave Martin wrote: [...] Wedging arguments into a few bits in the t

Re: [PATCH v3 15/20] kvm: arm/arm64: Allow tuning the physical address size for VM

2018-07-11 Thread Dave Martin
On Wed, Jul 11, 2018 at 10:05:50AM +0100, Suzuki K Poulose wrote: > On 10/07/18 18:03, Dave Martin wrote: > >On Tue, Jul 10, 2018 at 05:38:39PM +0100, Suzuki K Poulose wrote: > >>On 09/07/18 14:37, Dave Martin wrote: > >>>On Mon, Jul 09, 2018 at 01:29:42PM +0100, Marc Zyngier wrote: > On 09/07/

Re: [PATCH v7 1/4] arm/arm64: KVM: Add KVM_GET/SET_VCPU_EVENTS

2018-07-11 Thread gengdongjiu
> >> diff --git a/Documentation/virtual/kvm/api.txt > >> b/Documentation/virtual/kvm/api.txt > >> index d10944e619d3..e3940f8715a5 100644 > >> --- a/Documentation/virtual/kvm/api.txt > >> +++ b/Documentation/virtual/kvm/api.txt > >> @@ -835,11 +835,13 @@ struct kvm_clock_data e > >> > >> Capabilit

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

2018-07-11 Thread Suzuki K Poulose
On 09/07/18 15:41, 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 introduce PUD hugepages,

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

2018-07-11 Thread Suzuki K Poulose
On 09/07/18 15:41, Punit Agrawal wrote: 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

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

2018-07-11 Thread Suzuki K Poulose
On 09/07/18 15:41, Punit Agrawal wrote: 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

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

2018-07-11 Thread Suzuki K Poulose
On 09/07/18 15:41, Punit Agrawal wrote: 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

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

2018-07-11 Thread Suzuki K Poulose
On 09/07/18 15:41, Punit Agrawal wrote: 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 Zy

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

2018-07-11 Thread Suzuki K Poulose
On 09/07/18 15:41, 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 granule) which

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

2018-07-11 Thread Suzuki K Poulose
On 09/07/18 15:41, 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 execute. Provide

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

2018-07-11 Thread Punit Agrawal
Suzuki K Poulose writes: > On 09/07/18 15:41, 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

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

2018-07-11 Thread Punit Agrawal
Suzuki K Poulose writes: > On 09/07/18 15:41, 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 pag

Re: [PATCH 0/2] arm64: spectre-v1 write fixes (CVE-2018-3693)

2018-07-11 Thread Alan J. Wylie
Mark Rutland writes: > These patches inhibit spectre-v1-write gadgets found in arch/arm64, using the > same mitigation applied to existing spectre-v1-read gadgets. > > This issue is also known as CVE-2018-3693, or "bounds check bypass store". > More details can be found in the Arm Cache Speculati

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

2018-07-11 Thread Punit Agrawal
Suzuki K Poulose writes: > On 09/07/18 15:41, Punit Agrawal wrote: >> 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 h

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

2018-07-11 Thread Suzuki K Poulose
On 11/07/18 17:05, Punit Agrawal wrote: Suzuki K Poulose writes: On 09/07/18 15:41, 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 su

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

2018-07-11 Thread Punit Agrawal
Suzuki K Poulose writes: > On 11/07/18 17:05, Punit Agrawal wrote: >> Suzuki K Poulose writes: >> >>> On 09/07/18 15:41, 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 m