Messages in this thread | | | Date | Tue, 3 Mar 2015 17:51:42 +0100 | From | Radim Krčmář <> | Subject | Re: [PATCH v3 1/2] kvm: x86: make kvm_emulate_* consistant |
| |
2015-03-02 13:43-0600, Joel Schopp: > Currently kvm_emulate() skips the instruction but kvm_emulate_* sometimes > don't. The end reult is the caller ends up doing the skip themselves. > Let's make them consistant. > > Signed-off-by: Joel Schopp <joel.schopp@amd.com> > ---
Reviewed-by: Radim Krčmář <rkrcmar@redhat.com>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > @@ -4723,11 +4723,19 @@ int kvm_emulate_wbinvd(struct kvm_vcpu *vcpu) > wbinvd(); > return X86EMUL_CONTINUE; > } > + > +int kvm_emulate_wbinvd(struct kvm_vcpu *vcpu) > +{ > + kvm_x86_ops->skip_emulated_instruction(vcpu); > + return kvm_emulate_wbinvd_noskip(vcpu); > +} > EXPORT_SYMBOL_GPL(kvm_emulate_wbinvd); > > + > +
(sneaky newlines)
> static void emulator_wbinvd(struct x86_emulate_ctxt *ctxt) > { > - kvm_emulate_wbinvd(emul_to_vcpu(ctxt)); > + kvm_emulate_wbinvd_noskip(emul_to_vcpu(ctxt)); > } > > int emulator_get_dr(struct x86_emulate_ctxt *ctxt, int dr, unsigned long *dest)
| |