Re: [PATCH RFCv1 0/7] Support Async Page Fault

2020-04-10 Thread Marc Zyngier
Hi Gavin, On 2020-04-10 09:58, Gavin Shan wrote: > 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 pa

Re: Contribution to KVM.

2020-04-10 Thread Liran Alon
On 10/04/2020 6:52, Nadav Amit wrote: 2. Try to run the tests with more than 4GB of memory. The last time I tried (actually by running the test on bare metal), the INIT test that Liran wrote failed. Wasn't this test failure fixed with kvm-unit-test commit fc47ccc19612 ("x86: vmx: Veri

Re: I{S,C}ACTIVER implemention question

2020-04-10 Thread Julien Grall
On 06/04/2020 16:14, Marc Zyngier wrote: Hi Julien, Hi Marc, Thanks for the heads up. On 2020-04-06 14:16, Julien Grall wrote: Hi, Xen community is currently reviewing a new implementation for reading I{S,C}ACTIVER registers (see [1]). The implementation is based on vgic_mmio_read_act

Re: [PATCH v7 7/7] ARM: Enable KASan for ARM

2020-04-10 Thread Ard Biesheuvel
(+ Linus) On Fri, 10 Apr 2020 at 12:45, Ard Biesheuvel wrote: > > On Fri, 17 Jan 2020 at 23:52, Florian Fainelli wrote: > > > > From: Andrey Ryabinin > > > > This patch enables the kernel address sanitizer for ARM. XIP_KERNEL has > > not been tested and is therefore not allowed. > > > > Acked-b

Re: [PATCH v7 7/7] ARM: Enable KASan for ARM

2020-04-10 Thread Ard Biesheuvel
On Fri, 17 Jan 2020 at 23:52, Florian Fainelli wrote: > > From: Andrey Ryabinin > > This patch enables the kernel address sanitizer for ARM. XIP_KERNEL has > not been tested and is therefore not allowed. > > Acked-by: Dmitry Vyukov > Tested-by: Linus Walleij > Signed-off-by: Abbott Liu > Signe

[PATCH RFCv1 7/7] arm64: Support async page fault

2020-04-10 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 hypervisor, 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 signals ar

[PATCH RFCv1 5/7] kvm/arm64: Allow inject data abort with specified DFSC

2020-04-10 Thread Gavin Shan
The data abort will be used as signal by the asynchronous page fault. However, the specific IMPDEF Data Fault Status Code (DFSC) is used. Currently, there is no API to inject data abort with specific DSC. This fixes the gap by introducing kvm_inject_dabt_with_dfsc(). Signed-off-by: Gavin Shan ---

[PATCH RFCv1 3/7] kvm/arm64: Replace hsr with esr

2020-04-10 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 +++

[PATCH RFCv1 1/7] kvm/arm64: Rename kvm_vcpu_get_hsr() to kvm_vcpu_get_esr()

2020-04-10 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 RFCv1 6/7] kvm/arm64: Support async page fault

2020-04-10 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. To populate the requested page can be rel

[PATCH RFCv1 0/7] Support Async Page Fault

2020-04-10 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. To populate the requested page can be cos

[PATCH RFCv1 2/7] kvm/arm64: Detach ESR operator from vCPU struct

2020-04-10 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, t

[PATCH RFCv1 4/7] kvm/arm64: Export kvm_handle_user_mem_abort() with prefault mode

2020-04-10 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 @e

Re: Contribution to KVM.

2020-04-10 Thread Marc Zyngier
Hi Javier, On 2020-04-09 22:29, Javier Romero wrote: Hello, My name is Javier, live in Argentina and work as a cloud engineer. Have been working with Linux servers for the ast 10 years in an Internet Service Provider and I'm interested in contributing to KVM maybe with testing as a start poin

Re: Contribution to KVM.

2020-04-10 Thread Xu, Like
On 2020/4/10 5:29, Javier Romero wrote: Hello, My name is Javier, live in Argentina and work as a cloud engineer. Have been working with Linux servers for the last 10 years in an Internet Service Provider and I'm interested in contributing to KVM Welcome, I'm a newbie as well. maybe with te

Re: Contribution to KVM.

2020-04-10 Thread Javier Romero
Hi Like Xu, Thank you for your time to answer. Yes, I can also test KVM in an Intel platform, have a Pixelbook with a Core i7 processor and 16 GB of RAM at disposal to start working. Thanks for your attention. Regards, El vie., 10 abr. 2020 00:34, Xu, Like escribió: > On 2020/4/10 5:29, Javi

Contribution to KVM.

2020-04-10 Thread Javier Romero
Hello, My name is Javier, live in Argentina and work as a cloud engineer. Have been working with Linux servers for the ast 10 years in an Internet Service Provider and I'm interested in contributing to KVM maybe with testing as a start point. If it can be useful to test KVM on ARM, I have a Ras

Re: Contribution to KVM.

2020-04-10 Thread Javier Romero
Hi Like Xu, Thank you for your time to answer. Yes, I can also test KVM in an Intel platform, have a Pixelbook with a Core i7 processor and 16 GB of RAM at disposal to start working. Thanks for your attention. Regards, El vie., 10 abr. 2020 00:34, Xu, Like escribió: > On 2020/4/10 5:29, Javi

Re: Contribution to KVM.

2020-04-10 Thread Nadav Amit
> On Apr 9, 2020, at 8:34 PM, Xu, Like wrote: > > On 2020/4/10 5:29, Javier Romero wrote: >> Hello, >> >> My name is Javier, live in Argentina and work as a cloud engineer. >> >> Have been working with Linux servers for the last 10 years in an >> Internet Service Provider and I'm interested in

Re: Contribution to KVM.

2020-04-10 Thread Javier Romero
Hi Like Xu, Thank you for your time to answer. Of course I can also test KVM on an Intel Platform if this can be useful, have a Pixelbook laptop with a Core i7 processor and 16 GB of RAM at disposal :D Thanks for your attention. Regards, Javier Romero El vie., 10 abr. 2020 a las 0:34, Xu, L

Re: Contribution to KVM.

2020-04-10 Thread Javier Romero
Hi Nadav, Thank you for your answer, Will also take a look at the test bug you suggested. Regards, Javier Romero El vie., 10 abr. 2020 a las 0:53, Nadav Amit () escribió: > > > On Apr 9, 2020, at 8:34 PM, Xu, Like wrote: > > > > On 2020/4/10 5:29, Javier Romero wrote: > >> Hello, > >> > >>