From: Bill Wendling <morbo@xxxxxxxxxx> Some test_* functions use inline asm that define globally visible labels. Clang decides that it can inline these functions, which causes the assembler to complain about duplicate symbols. Mark the functions as "noinline" to prevent this. Signed-off-by: Bill Wendling <morbo@xxxxxxxxxx> [sean: call out the globally visible aspect] Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx> --- x86/vmx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x86/vmx.c b/x86/vmx.c index f0b853a..2a32aa2 100644 --- a/x86/vmx.c +++ b/x86/vmx.c @@ -426,7 +426,7 @@ static void prep_flags_test_env(void **vpage, struct vmcs **vmcs, handler *old) *old = handle_exception(PF_VECTOR, &pf_handler); } -static void test_read_sentinel(void) +static noinline void test_read_sentinel(void) { void *vpage; struct vmcs *vmcs; @@ -474,7 +474,7 @@ static void test_vmread_flags_touch(void) test_read_sentinel(); } -static void test_write_sentinel(void) +static noinline void test_write_sentinel(void) { void *vpage; struct vmcs *vmcs; @@ -1786,7 +1786,7 @@ static int exit_handler(union exit_reason exit_reason) * Tries to enter the guest, populates @result with VM-Fail, VM-Exit, entered, * etc... */ -static void vmx_enter_guest(struct vmentry_result *result) +static noinline void vmx_enter_guest(struct vmentry_result *result) { memset(result, 0, sizeof(*result)); -- 2.33.0.309.g3052b89438-goog