From: David Matlack <dmatlack@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Tom Rix <trix@redhat.com>,
Sean Christopherson <seanjc@google.com>,
Peter Xu <peterx@redhat.com>,
David Matlack <dmatlack@google.com>,
Jim Mattson <jmattson@google.com>,
Oliver Upton <oupton@google.com>,
"open list:CLANG/LLVM BUILD SUPPORT" <llvm@lists.linux.dev>,
kvm@vger.kernel.org
Subject: [PATCH 1/2] KVM: selftests: Fix KVM_EXCEPTION_MAGIC build with Clang
Date: Fri, 22 Jul 2022 23:48:37 +0000 [thread overview]
Message-ID: <20220722234838.2160385-2-dmatlack@google.com> (raw)
In-Reply-To: <20220722234838.2160385-1-dmatlack@google.com>
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: 3b23054cd3f5 ("KVM: selftests: Add x86-64 support for exception fixup")
Signed-off-by: David Matlack <dmatlack@google.com>
---
tools/testing/selftests/kvm/include/x86_64/processor.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h
index 45edf45821d0..51c6661aca77 100644
--- a/tools/testing/selftests/kvm/include/x86_64/processor.h
+++ b/tools/testing/selftests/kvm/include/x86_64/processor.h
@@ -754,7 +754,7 @@ void vm_install_exception_handler(struct kvm_vm *vm, int vector,
void (*handler)(struct ex_regs *));
/* If a toddler were to say "abracadabra". */
-#define KVM_EXCEPTION_MAGIC 0xabacadabaull
+#define KVM_EXCEPTION_MAGIC 0xabacadabaULL
/*
* KVM selftest exception fixup uses registers to coordinate with the exception
--
2.37.1.359.gd136c6c3e2-goog
next prev parent reply other threads:[~2022-07-22 23:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 23:48 [PATCH 0/2] KVM: selftests: Fix Clang build issues in KVM_ASM_SAFE() David Matlack
2022-07-22 23:48 ` David Matlack [this message]
2022-07-23 0:01 ` [PATCH 1/2] KVM: selftests: Fix KVM_EXCEPTION_MAGIC build with Clang Sean Christopherson
2022-07-23 0:07 ` David Matlack
2022-07-22 23:48 ` [PATCH 2/2] KVM: selftests: Fix ambiguous mov in KVM_ASM_SAFE() David Matlack
2022-07-23 0:14 ` Sean Christopherson
2022-08-10 22:53 ` [PATCH 0/2] KVM: selftests: Fix Clang build issues " David Matlack
2022-08-12 7:49 ` Paolo Bonzini
2022-08-12 7:57 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220722234838.2160385-2-dmatlack@google.com \
--to=dmatlack@google.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=oupton@google.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=seanjc@google.com \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.