public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [V1 PATCH 1/1] OvmfPkg: Add INVD case in #VE handler
@ 2022-12-08  0:51 Ryan Afranji
  2022-12-09  6:49 ` Yao, Jiewen
       [not found] ` <172F0D44D4F3B834.22457@groups.io>
  0 siblings, 2 replies; 3+ messages in thread
From: Ryan Afranji @ 2022-12-08  0:51 UTC (permalink / raw)
  To: devel
  Cc: jun.nakajima, min.m.xu, jiewen.yao, erdemaktas, vannapurve,
	Ryan Afranji

According to the Intel GHCI specification document section 2.4.1, the
goal for instructions that do not have a corresponding TDCALL is for the
handler to treat the instruction as a NOP.

INVD does not have a corresponding TDCALL. This patch makes the #VE
handler treat INVD as a NOP.

Signed-off-by: Ryan Afranji <afranji@google.com>
---
 OvmfPkg/Library/CcExitLib/CcExitVeHandler.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
index c35f65a649..3798c2bb13 100644
--- a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
+++ b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
@@ -541,6 +541,7 @@ CcExitHandleVe (
     case EXIT_REASON_MONITOR_INSTRUCTION:
     case EXIT_REASON_WBINVD:
     case EXIT_REASON_RDPMC:
+    case EXIT_REASON_INVD:
       /* Handle as nops. */
       break;
 
-- 
2.39.0.rc1.256.g54fd8350bd-goog


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [V1 PATCH 1/1] OvmfPkg: Add INVD case in #VE handler
  2022-12-08  0:51 [V1 PATCH 1/1] OvmfPkg: Add INVD case in #VE handler Ryan Afranji
@ 2022-12-09  6:49 ` Yao, Jiewen
       [not found] ` <172F0D44D4F3B834.22457@groups.io>
  1 sibling, 0 replies; 3+ messages in thread
From: Yao, Jiewen @ 2022-12-09  6:49 UTC (permalink / raw)
  To: Ryan Afranji, devel@edk2.groups.io
  Cc: Nakajima, Jun, Xu, Min M, Aktas, Erdem, vannapurve@google.com

Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>

> -----Original Message-----
> From: Ryan Afranji <afranji@google.com>
> Sent: Thursday, December 8, 2022 8:51 AM
> To: devel@edk2.groups.io
> Cc: Nakajima, Jun <jun.nakajima@intel.com>; Xu, Min M
> <min.m.xu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Aktas, Erdem
> <erdemaktas@google.com>; vannapurve@google.com; Ryan Afranji
> <afranji@google.com>
> Subject: [V1 PATCH 1/1] OvmfPkg: Add INVD case in #VE handler
> 
> According to the Intel GHCI specification document section 2.4.1, the
> goal for instructions that do not have a corresponding TDCALL is for the
> handler to treat the instruction as a NOP.
> 
> INVD does not have a corresponding TDCALL. This patch makes the #VE
> handler treat INVD as a NOP.
> 
> Signed-off-by: Ryan Afranji <afranji@google.com>
> ---
>  OvmfPkg/Library/CcExitLib/CcExitVeHandler.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
> b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
> index c35f65a649..3798c2bb13 100644
> --- a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
> +++ b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
> @@ -541,6 +541,7 @@ CcExitHandleVe (
>      case EXIT_REASON_MONITOR_INSTRUCTION:
>      case EXIT_REASON_WBINVD:
>      case EXIT_REASON_RDPMC:
> +    case EXIT_REASON_INVD:
>        /* Handle as nops. */
>        break;
> 
> --
> 2.39.0.rc1.256.g54fd8350bd-goog


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] [V1 PATCH 1/1] OvmfPkg: Add INVD case in #VE handler
       [not found] ` <172F0D44D4F3B834.22457@groups.io>
@ 2022-12-09  7:11   ` Yao, Jiewen
  0 siblings, 0 replies; 3+ messages in thread
From: Yao, Jiewen @ 2022-12-09  7:11 UTC (permalink / raw)
  To: devel@edk2.groups.io, Yao, Jiewen, Ryan Afranji
  Cc: Nakajima, Jun, Xu, Min M, Aktas, Erdem, vannapurve@google.com

Merged https://github.com/tianocore/edk2/pull/3741

> -----Original Message-----
> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Yao,
> Jiewen
> Sent: Friday, December 9, 2022 2:50 PM
> To: Ryan Afranji <afranji@google.com>; devel@edk2.groups.io
> Cc: Nakajima, Jun <jun.nakajima@intel.com>; Xu, Min M
> <min.m.xu@intel.com>; Aktas, Erdem <erdemaktas@google.com>;
> vannapurve@google.com
> Subject: Re: [edk2-devel] [V1 PATCH 1/1] OvmfPkg: Add INVD case in #VE
> handler
> 
> Reviewed-by: Jiewen Yao <Jiewen.yao@intel.com>
> 
> > -----Original Message-----
> > From: Ryan Afranji <afranji@google.com>
> > Sent: Thursday, December 8, 2022 8:51 AM
> > To: devel@edk2.groups.io
> > Cc: Nakajima, Jun <jun.nakajima@intel.com>; Xu, Min M
> > <min.m.xu@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Aktas,
> Erdem
> > <erdemaktas@google.com>; vannapurve@google.com; Ryan Afranji
> > <afranji@google.com>
> > Subject: [V1 PATCH 1/1] OvmfPkg: Add INVD case in #VE handler
> >
> > According to the Intel GHCI specification document section 2.4.1, the
> > goal for instructions that do not have a corresponding TDCALL is for the
> > handler to treat the instruction as a NOP.
> >
> > INVD does not have a corresponding TDCALL. This patch makes the #VE
> > handler treat INVD as a NOP.
> >
> > Signed-off-by: Ryan Afranji <afranji@google.com>
> > ---
> >  OvmfPkg/Library/CcExitLib/CcExitVeHandler.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
> > b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
> > index c35f65a649..3798c2bb13 100644
> > --- a/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
> > +++ b/OvmfPkg/Library/CcExitLib/CcExitVeHandler.c
> > @@ -541,6 +541,7 @@ CcExitHandleVe (
> >      case EXIT_REASON_MONITOR_INSTRUCTION:
> >      case EXIT_REASON_WBINVD:
> >      case EXIT_REASON_RDPMC:
> > +    case EXIT_REASON_INVD:
> >        /* Handle as nops. */
> >        break;
> >
> > --
> > 2.39.0.rc1.256.g54fd8350bd-goog
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-12-09  7:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-08  0:51 [V1 PATCH 1/1] OvmfPkg: Add INVD case in #VE handler Ryan Afranji
2022-12-09  6:49 ` Yao, Jiewen
     [not found] ` <172F0D44D4F3B834.22457@groups.io>
2022-12-09  7:11   ` [edk2-devel] " Yao, Jiewen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox