From: Sean Christopherson <seanjc@google.com>
To: Michal Luczaj <mhal@rbox.co>
Cc: kvm@vger.kernel.org, pbonzini@redhat.com, shuah@kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [kvm-unit-tests PATCH v2 4/5] x86: Dedup 32-bit vs. 64-bit ASM_TRY() by stealing kernel's __ASM_SEL()
Date: Mon, 8 Aug 2022 16:32:05 +0000 [thread overview]
Message-ID: <YvE6hZfwPWmgBkBs@google.com> (raw)
In-Reply-To: <20220807142832.1576-5-mhal@rbox.co>
On Sun, Aug 07, 2022, Michal Luczaj wrote:
> diff --git a/lib/x86/processor.h b/lib/x86/processor.h
> index 0324220..30e2de8 100644
> --- a/lib/x86/processor.h
> +++ b/lib/x86/processor.h
> @@ -19,6 +19,18 @@
> # define S "4"
> #endif
>
> +#ifdef __ASSEMBLY__
> +#define __ASM_FORM(x, ...) x,## __VA_ARGS__
> +#else
> +#define __ASM_FORM(x, ...) " " xstr(x,##__VA_ARGS__) " "
> +#endif
> +
> +#ifndef __x86_64__
> +#define __ASM_SEL(a,b) __ASM_FORM(a)
> +#else
> +#define __ASM_SEL(a,b) __ASM_FORM(b)
> +#endif
Argh, this can't go in processor.h, because processor.h includes desc.h (to use
ASM_TRY). This patch "works" because emulator.c includes both process.or and
desc.h, but things go sideways if ASM_TRY_FEP() is moved into desc.h.
I'll post a new version of the entire series, the KVM_FEP macro and a helper to
check for FEP availability should really go in a common location, e.g. the PMU
test can use the common helper instead of requiring a separate unittest.cfg entry.
next prev parent reply other threads:[~2022-08-08 16:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-07 14:28 [kvm-unit-tests PATCH v2 0/5] Test for illegal LEA & related fixes Michal Luczaj
2022-08-07 14:28 ` [kvm-unit-tests PATCH v2 1/5] x86: emulator.c cleanup: Save and restore exception handlers Michal Luczaj
2022-08-08 15:27 ` Sean Christopherson
2022-08-07 14:28 ` [kvm-unit-tests PATCH v2 2/5] x86: emulator.c cleanup: Use ASM_TRY() for the UD_VECTOR cases Michal Luczaj
2022-08-07 14:28 ` [kvm-unit-tests PATCH v2 3/5] x86: Introduce ASM_TRY_FEP() to handle exceptions thrown by FEP-triggered emulator Michal Luczaj
2022-08-07 14:28 ` [kvm-unit-tests PATCH v2 4/5] x86: Dedup 32-bit vs. 64-bit ASM_TRY() by stealing kernel's __ASM_SEL() Michal Luczaj
2022-08-08 16:32 ` Sean Christopherson [this message]
2022-08-07 14:28 ` [kvm-unit-tests PATCH v2 5/5] x86: Test emulator's handling of LEA with /reg Michal Luczaj
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=YvE6hZfwPWmgBkBs@google.com \
--to=seanjc@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mhal@rbox.co \
--cc=pbonzini@redhat.com \
--cc=shuah@kernel.org \
/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.