Re: [PATCH] KVM: x86/emulator: emulate movbe with operand-size prefix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 12, 2023 at 10:59:37AM +0100, Julian Stecklina wrote:
> From: Thomas Prescher <thomas.prescher@xxxxxxxxxxxxxxxxxxxxx>
> 
> The MOVBE instruction can come with an operand-size prefix (66h). In
> this, case the x86 emulation code returns EMULATION_FAILED.
> 
> It turns out that em_movbe can already handle this case and all that
> is missing is an entry in respective opcode tables to populate
> gprefix->pfx_66.
> 
> Signed-off-by: Thomas Prescher <thomas.prescher@xxxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Julian Stecklina <julian.stecklina@xxxxxxxxxxxxxxxxxxxxx>
> ---
>  arch/x86/kvm/emulate.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index 2673cd5c46cb..08013e158b2d 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -4502,11 +4502,11 @@ static const struct instr_dual instr_dual_0f_38_f1 = {
>  };
>  
>  static const struct gprefix three_byte_0f_38_f0 = {
> -	ID(0, &instr_dual_0f_38_f0), N, N, N
> +	ID(0, &instr_dual_0f_38_f0), ID(0, &instr_dual_0f_38_f0), N, N
>  };
>  
>  static const struct gprefix three_byte_0f_38_f1 = {
> -	ID(0, &instr_dual_0f_38_f1), N, N, N
> +	ID(0, &instr_dual_0f_38_f1), ID(0, &instr_dual_0f_38_f1), N, N
>  };
>  
>  /*
> -- 

Acked-by: Borislav Petkov (AMD) <bp@xxxxxxxxx>

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux