Re: [PATCH v3 1/2] kvm: x86: make kvm_emulate_* consistant

From: Radim KrÄmÃÅ
Date: Tue Mar 03 2015 - 11:52:16 EST


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@xxxxxxx>
> ---

Reviewed-by: Radim KrÄmÃÅ <rkrcmar@xxxxxxxxxx>

> 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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/