Re: [kvm-unit-tests PATCH 2/2] x86: realmode: use inline asm to get stack pointer

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

 



On 16/10/19 23:52, Jim Mattson wrote:
> Never mind. After taking a closer look, esp[] is meant to provide
> stack space for the code under test, but inregs.esp should point to
> the top of this stack rather than the bottom. This is apparently a
> long-standing bug, similar to the one Avi fixed for  test_long_jmp()
> in commit 4aa22949 ("realmode: fix esp in long jump test").
> 
> For consistency with test_long_jmp, I'd suggest changing the
> inregs.esp assignment to:
>        inregs.esp = (u32)(esp+16);
> 
> Note that you absolutely must preserve the esp[] array!
> 

Agreed, thanks Jim for the review.

Paolo





[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