[PATCH v7.1 9/9] KVM: arm64: Add support for creating PUD hugepages at stage 2

2018-09-25 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

Re: [PATCH v6 00/18] APEI in_nmi() rework

2018-09-25 Thread Borislav Petkov
On Fri, Sep 21, 2018 at 11:16:47PM +0100, James Morse wrote: > Hello, > > The GHES driver has collected quite a few bugs: > > ghes_proc() at ghes_probe() time can be interrupted by an NMI that > will clobber the ghes->estatus fields, flags, and the buffer_paddr. > > ghes_copy_tofrom_phys() uses

Re: [PATCH v5 11/18] kvm: arm64: Dynamic configuration of VTTBR mask

2018-09-25 Thread Auger Eric
Hi Suzuki, On 9/20/18 5:22 PM, Suzuki K Poulose wrote: > > > On 20/09/18 15:07, Auger Eric wrote: >> Hi Suzuki, >> On 9/17/18 12:41 PM, Suzuki K Poulose wrote: >>> On arm64 VTTBR_EL2:BADDR holds the base address for the stage2 >>> translation table. The Arm ARM mandates that the bits

Re: [PATCH v5 16/18] kvm: arm64: Set a limit on the IPA size

2018-09-25 Thread Suzuki K Poulose
On 09/25/2018 10:59 AM, Auger Eric wrote: Hi Suzuki, On 9/17/18 12:41 PM, Suzuki K Poulose wrote: So far we have restricted the IPA size of the VM to the default value (40bits). Now that we can manage the IPA size per VM and support dynamic stage2 page tables, we can allow VMs to have larger

Re: [PATCH v5 14/18] vgic: Add support for 52bit guest physical address

2018-09-25 Thread Suzuki K Poulose
Hi Eric On 09/21/2018 03:57 PM, Auger Eric wrote: Hi Suzuki, On 9/17/18 12:41 PM, Suzuki K Poulose wrote: From: Kristina Martsenko Add support for handling 52bit guest physical address to the VGIC layer. So far we have limited the guest physical address to 48bits, by explicitly masking the

Re: [PATCH v5 17/18] kvm: arm64: Limit the minimum number of page table levels

2018-09-25 Thread Suzuki K Poulose
On 09/25/2018 11:00 AM, Auger Eric wrote: Hi Suzuki, On 9/17/18 12:41 PM, Suzuki K Poulose wrote: Since we are about to remove the lower limit on the IPA size, make sure that we do not go to 1 level page table (e.g, with 32bit IPA on 64K host with concatenation) to avoid splitting the host PMD

Re: [PATCH v5 18/18] kvm: arm64: Allow tuning the physical address size for VM

2018-09-25 Thread Suzuki K Poulose
On 09/25/2018 11:00 AM, Auger Eric wrote: Hi Suzuki, On 9/17/18 12:41 PM, Suzuki K Poulose wrote: Allow specifying the physical address size limit for a new VM via the kvm_type argument for the KVM_CREATE_VM ioctl. This allows us to finalise the stage2 page table as early as possible and hence

Re: [PATCH v5 17/18] kvm: arm64: Limit the minimum number of page table levels

2018-09-25 Thread Auger Eric
Hi Suzuki, On 9/17/18 12:41 PM, Suzuki K Poulose wrote: > Since we are about to remove the lower limit on the IPA size, > make sure that we do not go to 1 level page table (e.g, with > 32bit IPA on 64K host with concatenation) to avoid splitting > the host PMD huge pages at stage2. > > Cc: Marc

Re: [PATCH v5 18/18] kvm: arm64: Allow tuning the physical address size for VM

2018-09-25 Thread Auger Eric
Hi Suzuki, On 9/17/18 12:41 PM, Suzuki K Poulose wrote: > Allow specifying the physical address size limit for a new > VM via the kvm_type argument for the KVM_CREATE_VM ioctl. This > allows us to finalise the stage2 page table as early as possible > and hence perform the right checks on the

Re: [PATCH v5 16/18] kvm: arm64: Set a limit on the IPA size

2018-09-25 Thread Auger Eric
Hi Suzuki, On 9/17/18 12:41 PM, Suzuki K Poulose wrote: > So far we have restricted the IPA size of the VM to the default > value (40bits). Now that we can manage the IPA size per VM and > support dynamic stage2 page tables, we can allow VMs to have > larger IPA. This patch introduces a the

Re: [PATCH v5 15/18] kvm: arm64: Add 52bit support for PAR to HPFAR conversoin

2018-09-25 Thread Auger Eric
Hi Suzuki, On 9/17/18 12:41 PM, Suzuki K Poulose wrote: > Add support for handling 52bit addresses in PAR to HPFAR > conversion. Instead of hardcoding the address limits, we > now use PHYS_MASK_SHIFT. > > Cc: Marc Zyngier > Cc: Christoffer Dall > Signed-off-by: Suzuki K Poulose Reviewed-by:

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

2018-09-25 Thread Punit Agrawal
Suzuki K Poulose writes: > Hi Punit, > > > On 09/24/2018 06:45 PM, 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