[edk2] [PATCH 0/3] UefiCpuPkg/PiSmmCpuDxeSmm: fix IA32 SmmStartup() regression on KVM

Laszlo Ersek posted 3 patches 6 years, 10 months ago
Failed in applying to current master (apply log)
UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm | 28 +++++++++-----------
1 file changed, 13 insertions(+), 15 deletions(-)
[edk2] [PATCH 0/3] UefiCpuPkg/PiSmmCpuDxeSmm: fix IA32 SmmStartup() regression on KVM
Posted by Laszlo Ersek 6 years, 10 months ago
Repo:   https://github.com/lersek/edk2.git
Branch: smm_startup_ia32_nocond

This small series fixes the IA32 SMM regression on KVM that I reported
recently. The first two patches are cleanups (no functional changes),
the third patch is the fix.

Cc: Eric Dong <eric.dong@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>

Thanks
Laszlo

Laszlo Ersek (3):
  UefiCpuPkg/PiSmmCpuDxeSmm: update comments in IA32 SmmStartup()
  UefiCpuPkg/PiSmmCpuDxeSmm: remove unneeded DBs from IA32 SmmStartup()
  UefiCpuPkg/PiSmmCpuDxeSmm: eliminate conditional jump in IA32
    SmmStartup()

 UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm | 28 +++++++++-----------
 1 file changed, 13 insertions(+), 15 deletions(-)

-- 
2.14.1.3.gb7cf6e02401b

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 0/3] UefiCpuPkg/PiSmmCpuDxeSmm: fix IA32 SmmStartup() regression on KVM
Posted by Paolo Bonzini 6 years, 10 months ago
On 30/01/2018 10:33, Laszlo Ersek wrote:
> Repo:   https://github.com/lersek/edk2.git
> Branch: smm_startup_ia32_nocond
> 
> This small series fixes the IA32 SMM regression on KVM that I reported
> recently. The first two patches are cleanups (no functional changes),
> the third patch is the fix.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo

> Thanks
> Laszlo
> 
> Laszlo Ersek (3):
>   UefiCpuPkg/PiSmmCpuDxeSmm: update comments in IA32 SmmStartup()
>   UefiCpuPkg/PiSmmCpuDxeSmm: remove unneeded DBs from IA32 SmmStartup()
>   UefiCpuPkg/PiSmmCpuDxeSmm: eliminate conditional jump in IA32
>     SmmStartup()
> 
>  UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm | 28 +++++++++-----------
>  1 file changed, 13 insertions(+), 15 deletions(-)
> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 0/3] UefiCpuPkg/PiSmmCpuDxeSmm: fix IA32 SmmStartup() regression on KVM
Posted by Laszlo Ersek 6 years, 10 months ago
On 01/30/18 16:33, Laszlo Ersek wrote:
> Repo:   https://github.com/lersek/edk2.git
> Branch: smm_startup_ia32_nocond
>
> This small series fixes the IA32 SMM regression on KVM that I reported
> recently. The first two patches are cleanups (no functional changes),
> the third patch is the fix.
>
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
>
> Thanks
> Laszlo
>
> Laszlo Ersek (3):
>   UefiCpuPkg/PiSmmCpuDxeSmm: update comments in IA32 SmmStartup()
>   UefiCpuPkg/PiSmmCpuDxeSmm: remove unneeded DBs from IA32 SmmStartup()
>   UefiCpuPkg/PiSmmCpuDxeSmm: eliminate conditional jump in IA32
>     SmmStartup()
>
>  UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm | 28 +++++++++-----------
>  1 file changed, 13 insertions(+), 15 deletions(-)
>

Code differences between the posted version and the pushed version,
according to Ray's comments for patch #3, displayed with "git diff
--word-diff" (look for [-...-] and {+...+} markers):

> diff --git a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm
> index 102e0bdbabc8..d64fcd48d03e 100644
> --- a/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm
> +++ b/UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm
> @@ -47,8 +47,8 @@ ASM_PFX(SmmStartup):
>     mov     eax, 0x80000001             ; read capability
>     cpuid
>     mov     ebx, edx                    ; rdmsr will change edx. keep it in ebx.
>     and     ebx, BIT20                  ; extract [-XD-]{+NX+} capability bit
>     shr     ebx, 9                      ; shift bit to [-IA32_EFER NXE-]{+IA32_EFER.NXE[BIT11]+} position
>     DB      0x66, 0xb8                  ; mov eax, imm32
> ASM_PFX(gSmmCr3): DD 0
>     mov     cr3, eax
> @@ -58,7 +58,7 @@ ASM_PFX(gSmmCr4): DD 0
>     mov     cr4, eax
>     mov     ecx, 0xc0000080             ; IA32_EFER MSR
>     rdmsr
>     or      eax, ebx                    ; set NXE bit if [-XD-]{+NX+} is available
>     wrmsr
>     DB      0x66, 0xb8                  ; mov eax, imm32
> ASM_PFX(gSmmCr0): DD 0

Series pushed as d5988a8ac971..8d4d55b15b58.

Let's continue the PatchAssembly() discussion; once we reach an
agreement on that, I'll post patches for that too.

Thanks!
Laszlo
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 0/3] UefiCpuPkg/PiSmmCpuDxeSmm: fix IA32 SmmStartup() regression on KVM
Posted by Wang, Jian J 6 years, 10 months ago
Hi Laszlo,

Thank you very much for fixing this issue.

Regards,
Jian


> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Tuesday, January 30, 2018 11:34 PM
> To: edk2-devel-01 <edk2-devel@lists.01.org>
> Cc: Dong, Eric <eric.dong@intel.com>; Wang, Jian J <jian.j.wang@intel.com>;
> Yao, Jiewen <jiewen.yao@intel.com>; Paolo Bonzini <pbonzini@redhat.com>;
> Ni, Ruiyu <ruiyu.ni@intel.com>
> Subject: [PATCH 0/3] UefiCpuPkg/PiSmmCpuDxeSmm: fix IA32 SmmStartup()
> regression on KVM
> 
> Repo:   https://github.com/lersek/edk2.git
> Branch: smm_startup_ia32_nocond
> 
> This small series fixes the IA32 SMM regression on KVM that I reported
> recently. The first two patches are cleanups (no functional changes),
> the third patch is the fix.
> 
> Cc: Eric Dong <eric.dong@intel.com>
> Cc: Jian J Wang <jian.j.wang@intel.com>
> Cc: Jiewen Yao <jiewen.yao@intel.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Ruiyu Ni <ruiyu.ni@intel.com>
> 
> Thanks
> Laszlo
> 
> Laszlo Ersek (3):
>   UefiCpuPkg/PiSmmCpuDxeSmm: update comments in IA32 SmmStartup()
>   UefiCpuPkg/PiSmmCpuDxeSmm: remove unneeded DBs from IA32
> SmmStartup()
>   UefiCpuPkg/PiSmmCpuDxeSmm: eliminate conditional jump in IA32
>     SmmStartup()
> 
>  UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmInit.nasm | 28 +++++++++-----------
>  1 file changed, 13 insertions(+), 15 deletions(-)
> 
> --
> 2.14.1.3.gb7cf6e02401b

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel