Re: [PATCH v4 02/14] arm: add support for folded p4d page tables

2020-05-08 Thread Mike Rapoport
On Fri, May 08, 2020 at 08:53:27AM +0200, Marek Szyprowski wrote: > Hi Mike, > > On 07.05.2020 18:11, Mike Rapoport wrote: > > On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: > >> On 14.04.2020 17:34, Mike Rapoport wrote: > >>> From: Mike Rapoport > >>> > >>> Implement

Re: [PATCH 09/26] KVM: arm64: vgic-v3: Take cpu_if pointer directly instead of vcpu

2020-05-08 Thread Marc Zyngier
On Thu, 7 May 2020 17:26:06 +0100 James Morse wrote: Hi James, > Hi Marc, Christoffer, > > On 22/04/2020 13:00, Marc Zyngier wrote: > > From: Christoffer Dall > > > > If we move the used_lrs field to the version-specific cpu interface > > structure, the following functions only operate on

[PATCH RFCv2 8/9] kernel/sched: Add cpu_rq_is_locked()

2020-05-08 Thread Gavin Shan
This adds API cpu_rq_is_locked() to check if the CPU's runqueue has been locked or not. It's used in the subsequent patch to determine the task wakeup should be executed immediately or delayed. Signed-off-by: Gavin Shan --- include/linux/sched.h | 1 + kernel/sched/core.c | 8 2

[PATCH RFCv2 2/9] arm/arm64: KVM: Advertise KVM UID to guests via SMCCC

2020-05-08 Thread Gavin Shan
From: Will Deacon We can advertise ourselves to guests as KVM and provide a basic features bitmap for discoverability of future hypervisor services. Cc: Marc Zyngier Signed-off-by: Will Deacon Signed-off-by: Gavin Shan --- virt/kvm/arm/hypercalls.c | 29 +++-- 1 file

[PATCH RFCv2 7/9] kvm/arm64: Support async page fault

2020-05-08 Thread Gavin Shan
There are two stages of fault pages and the stage one page fault is handled by guest itself. The guest is trapped to host when the page fault is caused by stage 2 page table, for example missing. The guest is suspended until the requested page is populated. To populate the requested page can be

[PATCH RFCv2 0/9] kvm/arm64: Support Async Page Fault

2020-05-08 Thread Gavin Shan
There are two stages of page faults and the stage one page fault is handled by guest itself. The guest is trapped to host when the page fault is caused by stage 2 page table, for example missing. The guest is suspended until the requested page is populated. There might be IO activities involved

[PATCH RFCv2 6/9] kvm/arm64: Export kvm_handle_user_mem_abort() with prefault mode

2020-05-08 Thread Gavin Shan
This renames user_mem_abort() to kvm_handle_user_mem_abort(), and then export it. The function will be used in asynchronous page fault to populate a page table entry once the corresponding page is populated from the backup device (e.g. swap partition): * Parameter @fault_status is replace by

[PATCH RFCv2 4/9] kvm/arm64: Detach ESR operator from vCPU struct

2020-05-08 Thread Gavin Shan
There are a set of inline functions defined in kvm_emulate.h. Those functions reads ESR from vCPU fault information struct and then operate on it. So it's tied with vCPU fault information and vCPU struct. It limits their usage scope. This detaches these functions from the vCPU struct. With this,

[PATCH RFCv2 9/9] arm64: Support async page fault

2020-05-08 Thread Gavin Shan
This supports asynchronous page fault for the guest. The design is similar to what x86 has: on receiving a PAGE_NOT_PRESENT signal from the host, the current task is either rescheduled or put into power saving mode. The task will be waken up when PAGE_READY signal is received. The PAGE_READY

[PATCH RFCv2 3/9] kvm/arm64: Rename kvm_vcpu_get_hsr() to kvm_vcpu_get_esr()

2020-05-08 Thread Gavin Shan
Since kvm/arm32 was removed, this renames kvm_vcpu_get_hsr() to kvm_vcpu_get_esr() to it a bit more self-explaining because the functions returns ESR instead of HSR on aarch64. This shouldn't cause any functional changes. Signed-off-by: Gavin Shan --- arch/arm64/include/asm/kvm_emulate.h | 36

[PATCH RFCv2 1/9] arm64: Probe for the presence of KVM hypervisor services during boot

2020-05-08 Thread Gavin Shan
From: Will Deacon Although the SMCCC specification provides some limited functionality for describing the presence of hypervisor and firmware services, this is generally applicable only to functions designated as "Arm Architecture Service Functions" and no portable discovery mechanism is

[PATCH RFCv2 5/9] kvm/arm64: Replace hsr with esr

2020-05-08 Thread Gavin Shan
This replace the variable names to make them self-explaining. The tracepoint isn't changed accordingly because they're part of ABI: * @hsr to @esr * @hsr_ec to @ec * Use kvm_vcpu_trap_get_class() helper if possible Signed-off-by: Gavin Shan --- arch/arm64/kvm/handle_exit.c | 28

Re: [PATCH V3 04/16] arm64/cpufeature: Introduce ID_PFR2 CPU register

2020-05-08 Thread Anshuman Khandual
On 05/05/2020 04:42 PM, Will Deacon wrote: > On Sat, May 02, 2020 at 07:03:53PM +0530, Anshuman Khandual wrote: >> This adds basic building blocks required for ID_PFR2 CPU register which >> provides information about the AArch32 programmers model which must be >> interpreted along with ID_PFR0

Re: [PATCH v4 02/14] arm: add support for folded p4d page tables

2020-05-08 Thread Marek Szyprowski
Hi Mike, On 07.05.2020 18:11, Mike Rapoport wrote: > On Thu, May 07, 2020 at 02:16:56PM +0200, Marek Szyprowski wrote: >> On 14.04.2020 17:34, Mike Rapoport wrote: >>> From: Mike Rapoport >>> >>> Implement primitives necessary for the 4th level folding, add walks of p4d >>> level where