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

2020-05-28 Thread Gavin Shan
Hi Marc, On 5/27/20 5:37 PM, Marc Zyngier wrote: On 2020-05-27 05:05, Gavin Shan wrote: [...] +struct kvm_vcpu_pv_apf_data { +    __u32    reason; +    __u8    pad[60]; +    __u32    enabled; +}; What's all the padding for? The padding is ensure the @reason and @enabled in different

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

2020-05-27 Thread Marc Zyngier
On 2020-05-27 05:05, Gavin Shan wrote: Hi Mark, [...] +struct kvm_vcpu_pv_apf_data { + __u32 reason; + __u8pad[60]; + __u32 enabled; +}; What's all the padding for? The padding is ensure the @reason and @enabled in different cache line. @reason is shared by

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

2020-05-27 Thread Gavin Shan
Hi Mark, On 5/26/20 10:34 PM, Mark Rutland wrote: On Fri, May 08, 2020 at 01:29:17PM +1000, Gavin Shan wrote: 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

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

2020-05-26 Thread Mark Rutland
On Fri, May 08, 2020 at 01:29:17PM +1000, Gavin Shan wrote: > 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

[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