Skip to content

Commit 67ef866

Browse files
dmatlackbonzini
authored andcommitted
KVM: selftests: Fix KVM_EXCEPTION_MAGIC build with Clang
Change KVM_EXCEPTION_MAGIC to use the all-caps "ULL", rather than lower case. This fixes a build failure with Clang: In file included from x86_64/hyperv_features.c:13: include/x86_64/processor.h:825:9: error: unexpected token in argument list return kvm_asm_safe("wrmsr", "a"(val & -1u), "d"(val >> 32), "c"(msr)); ^ include/x86_64/processor.h:802:15: note: expanded from macro 'kvm_asm_safe' asm volatile(KVM_ASM_SAFE(insn) \ ^ include/x86_64/processor.h:785:2: note: expanded from macro 'KVM_ASM_SAFE' "mov $" __stringify(KVM_EXCEPTION_MAGIC) ", %%r9\n\t" \ ^ <inline asm>:1:18: note: instantiated into assembly here mov $0xabacadabaull, %r9 ^ Fixes: 3b23054 ("KVM: selftests: Add x86-64 support for exception fixup") Signed-off-by: David Matlack <dmatlack@google.com> Reviewed-by: Sean Christopherson <seanjc@google.com> Message-Id: <20220722234838.2160385-2-dmatlack@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent 020dac4 commit 67ef866

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/kvm/include/x86_64/processor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@ void vm_install_exception_handler(struct kvm_vm *vm, int vector,
754754
void (*handler)(struct ex_regs *));
755755

756756
/* If a toddler were to say "abracadabra". */
757-
#define KVM_EXCEPTION_MAGIC 0xabacadabaull
757+
#define KVM_EXCEPTION_MAGIC 0xabacadabaULL
758758

759759
/*
760760
* KVM selftest exception fixup uses registers to coordinate with the exception

0 commit comments

Comments
 (0)