Skip to content
Commit 2d3ecdfe authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Paolo Bonzini
Browse files

Revert "SVM: move guest past HLT"



'nmi_hlt' test returns somewhat weird result:

...
PASS: direct NMI + hlt
PASS: NMI intercept while running guest
PASS: intercepted NMI + hlt
PASS: nmi_hlt
SUMMARY: 4 tests, 1 unexpected failures

Trying to investigate where the failure is coming from I was tweaking
the code around and with tiny meaningless changes I was able to observe
 #PF, #GP, #UD and other 'interesting' results. Compiler optimization
flags also change the outcome so there's obviously a corruption somewhere.
Adding a meaningless 'nop' to the second 'asm volatile ("hlt");' in
nmi_hlt_test() saves the day so it seems we erroneously advance RIP
twice, the advancement in nmi_hlt_finished() is not needed.

The outcome, however, contradicts with the commit message in 7e7aa86f
("SVM: move guest past HLT"). With that commit reverted, all tests seem
to pass but I'm not sure what issue the commit was trying to fix, thus
RFC.

This reverts commit 7e7aa86f.

Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20200623082711.803916-1-vkuznets@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent d68a795a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment