All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] nVMX: Fix testing failure for canonical checks when forced emulation is not available
@ 2025-05-23  9:08 Chenyi Qiang
  2025-06-03 23:20 ` Sean Christopherson
  0 siblings, 1 reply; 5+ messages in thread
From: Chenyi Qiang @ 2025-05-23  9:08 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini, Maxim Levitsky; +Cc: Chenyi Qiang, kvm

Use the _safe() variant instead of _fep_safe() to avoid failure if the
forced emulated is not available.

Fixes: 05fbb364b5b2 ("nVMX: add a test for canonical checks of various host state vmcs12 fields")
Signed-off-by: Chenyi Qiang <chenyi.qiang@intel.com>
---
 x86/vmx_tests.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c
index 2f178227..01a15b7c 100644
--- a/x86/vmx_tests.c
+++ b/x86/vmx_tests.c
@@ -10881,12 +10881,11 @@ static int set_host_value(u64 vmcs_field, u64 value)
 	case HOST_BASE_GDTR:
 		sgdt(&dt_ptr);
 		dt_ptr.base = value;
-		lgdt(&dt_ptr);
-		return lgdt_fep_safe(&dt_ptr);
+		return lgdt_safe(&dt_ptr);
 	case HOST_BASE_IDTR:
 		sidt(&dt_ptr);
 		dt_ptr.base = value;
-		return lidt_fep_safe(&dt_ptr);
+		return lidt_safe(&dt_ptr);
 	case HOST_BASE_TR:
 		/* Set the base and clear the busy bit */
 		set_gdt_entry(FIRST_SPARE_SEL, value, 0x200, 0x89, 0);
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-06-05  1:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23  9:08 [kvm-unit-tests PATCH] nVMX: Fix testing failure for canonical checks when forced emulation is not available Chenyi Qiang
2025-06-03 23:20 ` Sean Christopherson
2025-06-04  2:15   ` Chenyi Qiang
2025-06-04 19:41     ` Sean Christopherson
2025-06-05  1:16       ` Chenyi Qiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.