x86/svm: Drop wrappers of SVM instructions

The new toolchain baseline knows the SVM instructions.

Resolves: xen-project/xen#204

Signed-off-by: "Alexander M. Merritt" <alexander@edera.dev>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
This commit is contained in:
Alexander M. Merritt authored and Andrew Cooper committed 2025-04-02 16:06:53 +01:00
1 parent a48be48f0c
commit ae5fd39be9
2 files changed
+3 -23

No files matched your search

+3 -11
View File
@@ -23,25 +23,17 @@ void __update_guest_eip(struct cpu_user_regs *regs, unsigned int inst_len);
static inline void svm_vmload_pa(paddr_t vmcb)
{
asm volatile (
".byte 0x0f,0x01,0xda" /* vmload */
: : "a" (vmcb) : "memory" );
asm volatile ( "vmload" :: "a" (vmcb) : "memory" );
}
static inline void svm_vmsave_pa(paddr_t vmcb)
{
asm volatile (
".byte 0x0f,0x01,0xdb" /* vmsave */
: : "a" (vmcb) : "memory" );
asm volatile ( "vmsave" :: "a" (vmcb) : "memory" );
}
static inline void svm_invlpga(unsigned long linear, uint32_t asid)
{
asm volatile (
".byte 0x0f,0x01,0xdf"
: /* output */
: /* input */
"a" (linear), "c" (asid) );
asm volatile ( "invlpga" :: "a" (linear), "c" (asid) );
}
/*
-12
View File
@@ -1,17 +1,5 @@
#include <asm/page-bits.h>
.macro vmrun
.byte 0x0f, 0x01, 0xd8
.endm
.macro stgi
.byte 0x0f, 0x01, 0xdc
.endm
.macro clgi
.byte 0x0f, 0x01, 0xdd
.endm
/*
* Call a noreturn function. This could be JMP, but CALL results in a more
* helpful backtrace. BUG is to catch functions which do decide to return...
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.