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

Re: [Xen-devel] [PATCH v3 2/8] x86/HVM: ignore guest INVD uses



> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: 03 September 2019 10:38
> To: xen-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; Paul Durrant 
> <Paul.Durrant@xxxxxxxxxx>; Roger Pau Monne
> <roger.pau@xxxxxxxxxx>; Wei Liu <wl@xxxxxxx>
> Subject: [PATCH v3 2/8] x86/HVM: ignore guest INVD uses
> 
> The only place we'd expect the insn to be sensibly used is in
> (virtualization unaware) firmware.
> 
> Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Seems like a reasonable optimization.

Reviewed-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
> v3: New.
> 
> --- a/xen/arch/x86/hvm/emulate.c
> +++ b/xen/arch/x86/hvm/emulate.c
> @@ -2210,11 +2210,18 @@ static int hvmemul_cache_op(
> 
>          hvmemul_unmap_linear_addr(mapping, addr, 0, hvmemul_ctxt);
>          /* fall through */
> -    case x86emul_invd:
>      case x86emul_wbinvd:
>      case x86emul_wbnoinvd:
>          alternative_vcall(hvm_funcs.wbinvd_intercept);
>          break;
> +
> +    case x86emul_invd:
> +        /*
> +         * Deliberately ignored: We don't want to issue INVD, and issuing 
> WBINVD
> +         * wouldn't match the request. And the only place we'd expect the 
> insn
> +         * to be sensibly used is in (virtualization unaware) firmware.
> +         */
> +        break;
>      }
> 
>      return X86EMUL_OKAY;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.