Re: [PATCH RESEND v4 7/9] KVM: VMX: Handle SPP induced vmexit and page fault

2019-08-22 Thread Yang Weijiang
On Thu, Aug 22, 2019 at 06:38:41PM +0200, Paolo Bonzini wrote: > On 22/08/19 15:17, Yang Weijiang wrote: > > On Tue, Aug 20, 2019 at 09:44:35PM +0800, Yang Weijiang wrote: > >> On Mon, Aug 19, 2019 at 05:04:23PM +0200, Paolo Bonzini wrote: > >>> fast_page_fault should never trigger an SPP

Re: [PATCH RESEND v4 7/9] KVM: VMX: Handle SPP induced vmexit and page fault

2019-08-22 Thread Paolo Bonzini
On 22/08/19 15:17, Yang Weijiang wrote: > On Tue, Aug 20, 2019 at 09:44:35PM +0800, Yang Weijiang wrote: >> On Mon, Aug 19, 2019 at 05:04:23PM +0200, Paolo Bonzini wrote: >>> fast_page_fault should never trigger an SPP userspace exit on its own, >>> all the SPP handling should go through

Re: [PATCH RESEND v4 7/9] KVM: VMX: Handle SPP induced vmexit and page fault

2019-08-22 Thread Yang Weijiang
On Tue, Aug 20, 2019 at 09:44:35PM +0800, Yang Weijiang wrote: > On Mon, Aug 19, 2019 at 05:04:23PM +0200, Paolo Bonzini wrote: > > On 19/08/19 16:43, Paolo Bonzini wrote: > > >> +/* > > >> + * Record write protect fault caused by > > >> +

Re: [PATCH RESEND v4 7/9] KVM: VMX: Handle SPP induced vmexit and page fault

2019-08-20 Thread Yang Weijiang
On Mon, Aug 19, 2019 at 05:04:23PM +0200, Paolo Bonzini wrote: > On 19/08/19 16:43, Paolo Bonzini wrote: > >> + /* > >> + * Record write protect fault caused by > >> + * Sub-page Protection, let VMI decide > >> + * the next

Re: [PATCH RESEND v4 7/9] KVM: VMX: Handle SPP induced vmexit and page fault

2019-08-19 Thread Paolo Bonzini
On 19/08/19 16:43, Paolo Bonzini wrote: >> +/* >> + * Record write protect fault caused by >> + * Sub-page Protection, let VMI decide >> + * the next step. >> + */ >> +if (spte &

Re: [PATCH RESEND v4 7/9] KVM: VMX: Handle SPP induced vmexit and page fault

2019-08-19 Thread Paolo Bonzini
On 14/08/19 09:04, Yang Weijiang wrote: > + /* > + * Record write protect fault caused by > + * Sub-page Protection, let VMI decide > + * the next step. > + */ > + if (spte &

[PATCH RESEND v4 7/9] KVM: VMX: Handle SPP induced vmexit and page fault

2019-08-14 Thread Yang Weijiang
If write to subpage is not allowed, EPT violation is generated, it's propagated to QEMU or VMI to handle. If the target page is SPP protected, however SPPT missing is encoutered while traversing with gfn, vmexit is generated so that KVM can handle the issue. Any SPPT misconfig will be propagated