lkml.org 
[lkml]   [2019]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RESEND v4 7/9] KVM: VMX: Handle SPP induced vmexit and page fault
From
Date
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 & PT_SPP_MASK) {

Should this be "if (spte & PT_WRITABLE_MASK)" instead? That is, if the
page is already writable, the fault must be an SPP fault.

Paolo

> + fault_handled = true;
> + vcpu->run->exit_reason = KVM_EXIT_SPP;
> + vcpu->run->spp.addr = gva;
> + kvm_skip_emulated_instruction(vcpu);
> + break;
> + }
> +
> new_spte |= PT_WRITABLE_MASK;

\
 
 \ /
  Last update: 2019-08-19 16:44    [W:0.494 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site