From: Grygorii Strashko <grygorii_strashko@epam.com>
To: Jason Andryuk <jason.andryuk@amd.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Jan Beulich" <jbeulich@suse.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Julien Grall" <julien@xen.org>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Alejandro Vallejo" <alejandro.garciavallejo@amd.com>,
"Jürgen Groß" <jgross@suse.com>
Subject: Re: [XEN][PATCH v2 3/4] x86: hvm: factor out COMPAT code under ifdefs
Date: Thu, 4 Dec 2025 20:39:48 +0200 [thread overview]
Message-ID: <878080cf-933f-4e33-b059-ca6088fc3110@epam.com> (raw)
In-Reply-To: <88f06355-b49d-4ac1-a7e2-5665d4901618@amd.com>
On 02.12.25 21:26, Jason Andryuk wrote:
> On 2025-11-19 14:30, Grygorii Strashko wrote:
>> From: Grygorii Strashko <grygorii_strashko@epam.com>
>>
>> Factor out COMPAT HVM code under ifdefs in preparation for making HVM
>> COMPAT code optional.
>>
>> - hypercall-defs.c updated to always provide compat declaration for:
>> physdev_op, grant_table_op, grant_table_op. This reduces number of COMPAT
>> ifdefs in HVM code and lets compiler DCE do the job.
>>
>> - Only 64-bit shinfo is supported with COMPAT=n, so struct
>> arch_domain->has_32bit_shinfo field is moved under COMPAT ifdef and
>> has_32bit_shinfo() is updated to account for COMPAT=n.
>>
>> Signed-off-by: Grygorii Strashko <grygorii_strashko@epam.com>
>
>> diff --git a/xen/arch/x86/include/asm/domain.h b/xen/arch/x86/include/asm/domain.h
>> index 5df8c7825333..0005f4450931 100644
>> --- a/xen/arch/x86/include/asm/domain.h
>> +++ b/xen/arch/x86/include/asm/domain.h
>> @@ -12,8 +12,11 @@
>> #include <public/vcpu.h>
>> #include <public/hvm/hvm_info_table.h>
>> -#define has_32bit_shinfo(d) ((d)->arch.has_32bit_shinfo)
>> -
>> +#ifdef CONFIG_COMPAT
>> +#define has_32bit_shinfo(d) ((d)->arch.has_32bit_shinfo)
>> +#else
>> +#define has_32bit_shinfo(d) ((void)(d), false)
>
> (void)(d) is to avoid an any potential unreferenced 'd' messages?
It's a generic request to have macro arguments evaluated consistently.
>
> Just using false builds for me, but your way is a little more robust.
>
>> +#endif
>> /*
>> * Set to true if either the global vector-type callback or per-vCPU
>> * LAPIC vectors are used. Assume all vCPUs will use
> Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
>
> Regards,
> Jason
--
Best regards,
-grygorii
next prev parent reply other threads:[~2025-12-04 18:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-19 19:30 [XEN][PATCH v2 0/4] x86: pvh: allow to disable 32-bit (COMPAT) interface support Grygorii Strashko
2025-11-19 19:30 ` [XEN][PATCH v2 1/4] x86: hvm: dm: factor out compat code under ifdefs Grygorii Strashko
2025-11-19 19:30 ` [XEN][PATCH v2 3/4] x86: hvm: factor out COMPAT " Grygorii Strashko
2025-12-02 19:26 ` Jason Andryuk
2025-12-04 18:39 ` Grygorii Strashko [this message]
2025-12-04 18:47 ` Grygorii Strashko
2025-12-18 16:47 ` Jürgen Groß
2025-11-19 19:30 ` [XEN][PATCH v2 2/4] x86: hvm: compat: introduce is_hcall_compat() helper Grygorii Strashko
2025-12-02 18:41 ` Jason Andryuk
2025-11-19 19:30 ` [XEN][PATCH v2 4/4] x86: pvh: allow to disable 32-bit interface support Grygorii Strashko
2025-12-02 19:56 ` Jason Andryuk
2025-12-18 16:20 ` [XEN][PATCH v2 0/4] x86: pvh: allow to disable 32-bit (COMPAT) " Grygorii Strashko
2025-12-18 16:33 ` Jan Beulich
2025-12-19 0:33 ` Stefano Stabellini
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=878080cf-933f-4e33-b059-ca6088fc3110@epam.com \
--to=grygorii_strashko@epam.com \
--cc=alejandro.garciavallejo@amd.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=jason.andryuk@amd.com \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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.