KVM: selftests: Add and use a helper function for x86's LIDT

Implement a function for setting the IDT descriptor from the guest
code. Replace the existing lidt occurrences with calls to this function
as `lidt` is used in multiple places.

Signed-off-by: Ivan Orlov <iorlov@amazon.com>
Link: https://lore.kernel.org/r/20241217181458.68690-7-iorlov@amazon.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
Ivan Orlov 2024-12-17 18:14:57 +00:00 • committed by Sean Christopherson
commit 4e9427aeb9
3 changed files with 7 additions and 2 deletions