Re: [PATCH 2/2] KVM: VMX: Add Force Emulation Prefix for "emulate the next instruction"
From: Paolo Bonzini
Date: Tue Mar 27 2018 - 05:16:02 EST
On 27/03/2018 11:05, Nikita Leshenko wrote:
> What you are essentially trying to do is create a PV interface to access
> the x86 emulator.
> Why not use a simple hypercall (VMCALL) to accomplish this instead of
> inventing yet another PV method?
Because hypercalls force you to use %rax for the hypercall number.
Paolo
> Something like âKVM_HC_EMULATE_NEXT_INSTRUCTIONâ in kvm_emulate_hypercall
> should do the trick (however it needs to be placed before the check for
> CPL>0 so that user mode code can test the emulator too).
>
> Nikita