lkml.org 
[lkml]   [2019]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 6/9] vmx: spp: Set up SPP paging table at vmentry/vmexit
On Thu, Nov 21, 2019 at 05:08:07PM +0100, Paolo Bonzini wrote:
> On 21/11/19 16:22, Yang Weijiang wrote:
> > On Thu, Nov 21, 2019 at 11:18:48AM +0100, Paolo Bonzini wrote:
> >> On 19/11/19 09:49, Yang Weijiang wrote:
> >>> + if (spte & PT_SPP_MASK) {
> >>> + fault_handled = true;
> >>> + vcpu->run->exit_reason = KVM_EXIT_SPP;
> >>> + vcpu->run->spp.addr = gva;
> >>> + kvm_skip_emulated_instruction(vcpu);
> >>
> >> Do you really want to skip the current instruction? Who will do the write?
> >>
> > If the destination memory is SPP protected, the target memory is
> > expected unchanged on a "write op" in guest, so would like to skip current
> > instruction.
>
> This is how you are expecting SPP to be used, but another possibility is
> to unprotect and reenter the guest. In this case
> kvm_skip_emulated_instruction would be wrong (and once this decision is
> made, it would be very, very hard to change it).
>
> However, you clearly need a way to skip the instruction, and for that
> you could store the current instruction length in vcpu->run->spp. Then
> userspace can adjust RIP manually if desired.
>
Looks good to me, will add the length, thanks!
> Thanks,
>
> Paolo

\
 
 \ /
  Last update: 2019-11-22 16:24    [W:0.072 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site