[edk2-devel] [PATCH V3 04/29] OvmfPkg: Extend VmgExitLib to handle #VE exception

Gerd Hoffmann kraxel at redhat.com
Tue Nov 2 14:23:48 UTC 2021


  Hi,

> +MmioExit (
> +  IN OUT EFI_SYSTEM_CONTEXT_X64     *Regs,
> +  IN TDCALL_VEINFO_RETURN_DATA      *Veinfo
> +  )
> +{

> +  do {
> +    OpCode = *Rip++;
> +    if (OpCode == 0x66) {
> +      OpSize = 2;

Oh, wow.  So the VE exit data doesn't provide the information which
io/mmio access actually triggered the exception, so you have to go
decode the instruction which trapped?

> +  switch (ReturnData.VeInfo.ExitReason) {
> +    case EXIT_REASON_CPUID:
> +    Status = CpuIdExit (Regs, &ReturnData.VeInfo);

Indention is strange (switch + case should be the same).
Otherwise looks sane to me.

take care,
  Gerd



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#83138): https://edk2.groups.io/g/devel/message/83138
Mute This Topic: https://groups.io/mt/86739958/1813853
Mute #ve:https://edk2.groups.io/g/devel/mutehashtag/ve
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list