From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: ray.huang@amd.com, "Stefano Stabellini" <sstabellini@kernel.org>,
"Julien Grall" <julien@xen.org>,
"Bertrand Marquis" <bertrand.marquis@arm.com>,
"Michal Orzel" <michal.orzel@amd.com>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Bob Eshleman" <bobbyeshleman@gmail.com>,
"Connor Davis" <connojdavis@gmail.com>,
"Penny Zheng" <Penny.Zheng@amd.com>,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 15/19] xen/sysctl: wrap around XEN_SYSCTL_physinfo
Date: Thu, 27 Mar 2025 11:25:19 +0100 [thread overview]
Message-ID: <0ffb0c7d-4ecf-4172-82dc-0f5368808591@gmail.com> (raw)
In-Reply-To: <45e7368b-9aef-4e72-934c-3fa8846a8d5f@suse.com>
[-- Attachment #1: Type: text/plain, Size: 2582 bytes --]
On 3/27/25 10:58 AM, Jan Beulich wrote:
> On 27.03.2025 10:35, Oleksii Kurochko wrote:
>> On 3/26/25 6:50 AM, Penny Zheng wrote:
>>> The following functions are only used to deal with XEN_SYSCTL_physinfo,
>>> then they shall be wrapped:
>>> - arch_do_physinfo
>>> - get_outstanding_claims
>>>
>>> Signed-off-by: Penny Zheng<Penny.Zheng@amd.com>
>>> ---
>>> v1 -> v2:
>>> - no need to wrap declaration
>>> - add transient #ifdef in sysctl.c for correct compilation
>>> ---
>>> xen/arch/arm/sysctl.c | 2 ++
>>> xen/arch/riscv/stubs.c | 2 ++
>>> xen/arch/x86/sysctl.c | 2 ++
>>> xen/common/page_alloc.c | 2 ++
>>> xen/common/sysctl.c | 2 +-
>>> 5 files changed, 9 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/xen/arch/arm/sysctl.c b/xen/arch/arm/sysctl.c
>>> index 32cab4feff..2d350b700a 100644
>>> --- a/xen/arch/arm/sysctl.c
>>> +++ b/xen/arch/arm/sysctl.c
>>> @@ -15,6 +15,7 @@
>>> #include <asm/arm64/sve.h>
>>> #include <public/sysctl.h>
>>>
>>> +#ifdef CONFIG_SYSCTL
>>> void arch_do_physinfo(struct xen_sysctl_physinfo *pi)
>>> {
>>> pi->capabilities |= XEN_SYSCTL_PHYSCAP_hvm | XEN_SYSCTL_PHYSCAP_hap;
>>> @@ -22,6 +23,7 @@ void arch_do_physinfo(struct xen_sysctl_physinfo *pi)
>>> pi->arch_capabilities |= MASK_INSR(sve_encode_vl(get_sys_vl_len()),
>>> XEN_SYSCTL_PHYSCAP_ARM_SVE_MASK);
>>> }
>>> +#endif
>>>
>>> long arch_do_sysctl(struct xen_sysctl *sysctl,
>>> XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl)
>>> diff --git a/xen/arch/riscv/stubs.c b/xen/arch/riscv/stubs.c
>>> index 5951b0ce91..7b3f748886 100644
>>> --- a/xen/arch/riscv/stubs.c
>>> +++ b/xen/arch/riscv/stubs.c
>>> @@ -328,10 +328,12 @@ long arch_do_sysctl(struct xen_sysctl *sysctl,
>>> BUG_ON("unimplemented");
>>> }
>>>
>>> +#ifdef CONFIG_SYSCTL
>>> void arch_do_physinfo(struct xen_sysctl_physinfo *pi)
>>> {
>>> BUG_ON("unimplemented");
>>> }
>>> +#endif /* CONFIG_SYSCTL */
>> Considering that now we will have CONFIG_SYSCTL, I think it would be better just to drop
>> definition of arch_do_physinfo() from riscv/stubs.c as it was added to make common code build
>> for RISC-V happy.
> Wouldn't that require SYSCTL=n then for RISC-V, which better wouldn't be done
> (as it would need undoing later on)?
I missed that SYSCTL=y by default.
Then it will be really better to have #ifdef CONFIG_SYSCTL instead of removing
arch_do_physinfo() from riscv/stub.c. (the same is true then for arch_do_sysctl()
in the next patch)
~ Oleksii
[-- Attachment #2: Type: text/html, Size: 3121 bytes --]
next prev parent reply other threads:[~2025-03-27 10:25 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 5:50 [PATCH v2 00/19] xen: introduce CONFIG_SYSCTL Penny Zheng
2025-03-26 5:50 ` [PATCH v2 01/19] xen/x86: remove "depends on !PV_SHIM_EXCLUSIVE" Penny Zheng
2025-03-28 23:56 ` Stefano Stabellini
2025-03-31 6:29 ` Jan Beulich
2025-04-01 8:41 ` Penny, Zheng
2025-04-01 9:01 ` Jan Beulich
2025-04-01 9:57 ` Penny, Zheng
2025-03-26 5:50 ` [PATCH v2 02/19] xen: introduce CONFIG_SYSCTL Penny Zheng
2025-03-27 9:57 ` Jan Beulich
2025-03-26 5:50 ` [PATCH v2 03/19] xen/xsm: wrap around xsm_sysctl with CONFIG_SYSCTL Penny Zheng
2025-03-29 0:06 ` Stefano Stabellini
2025-03-26 5:50 ` [PATCH v2 04/19] xen/sysctl: wrap around XEN_SYSCTL_readconsole Penny Zheng
2025-03-29 0:07 ` Stefano Stabellini
2025-04-01 12:24 ` Jan Beulich
2025-03-26 5:50 ` [PATCH v2 05/19] xen/sysctl: make CONFIG_TRACEBUFFER depend on CONFIG_SYSCTL Penny Zheng
2025-03-26 5:50 ` [PATCH v2 06/19] xen/sysctl: wrap around XEN_SYSCTL_sched_id Penny Zheng
2025-04-01 12:27 ` Jan Beulich
2025-03-26 5:50 ` [PATCH v2 07/19] xen/sysctl: wrap around XEN_SYSCTL_perfc_op Penny Zheng
2025-03-29 0:07 ` Stefano Stabellini
2025-03-26 5:50 ` [PATCH v2 08/19] xen/sysctl: wrap around XEN_SYSCTL_lockprof_op Penny Zheng
2025-03-29 0:07 ` Stefano Stabellini
2025-04-01 12:36 ` Jan Beulich
2025-03-26 5:50 ` [PATCH v2 09/19] xen/pmstat: clean up pmstat.c Penny Zheng
2025-03-29 0:41 ` Stefano Stabellini
2025-04-01 12:55 ` Jan Beulich
2025-03-26 5:50 ` [PATCH v2 10/19] xen/sysctl: introduce CONFIG_PM_STATS Penny Zheng
2025-03-29 0:35 ` Stefano Stabellini
2025-04-01 13:09 ` Jan Beulich
2025-04-16 3:54 ` Penny, Zheng
2025-04-16 6:37 ` Jan Beulich
2025-04-16 8:38 ` Penny, Zheng
2025-04-16 8:45 ` Jan Beulich
2025-03-26 5:50 ` [PATCH v2 11/19] xen/sysctl: wrap around XEN_SYSCTL_page_offline_op Penny Zheng
2025-03-26 5:50 ` [PATCH v2 12/19] xen/sysctl: wrap around XEN_SYSCTL_cpupool_op Penny Zheng
2025-03-26 5:50 ` [PATCH v2 13/19] xen/sysctl: wrap around XEN_SYSCTL_scheduler_op Penny Zheng
2025-03-26 15:22 ` Stewart Hildebrand
2025-03-26 5:50 ` [PATCH v2 14/19] xen: make avail_domheap_pages() static Penny Zheng
2025-03-29 0:11 ` Stefano Stabellini
2025-03-31 6:33 ` Jan Beulich
2025-03-26 5:50 ` [PATCH v2 15/19] xen/sysctl: wrap around XEN_SYSCTL_physinfo Penny Zheng
2025-03-27 9:35 ` Oleksii Kurochko
2025-03-27 9:58 ` Jan Beulich
2025-03-27 10:25 ` Oleksii Kurochko [this message]
2025-03-29 0:13 ` Stefano Stabellini
2025-04-01 14:29 ` Jan Beulich
2025-03-26 5:50 ` [PATCH v2 16/19] xen/sysctl: make CONFIG_COVERAGE depend on CONFIG_SYSCTL Penny Zheng
2025-03-26 5:50 ` [PATCH v2 17/19] xen/sysctl: make CONFIG_LIVEPATCH " Penny Zheng
2025-03-26 5:50 ` [PATCH v2 18/19] xen/sysctl: wrap around arch-specific arch_do_sysctl Penny Zheng
2025-03-27 9:39 ` Oleksii Kurochko
2025-03-29 0:21 ` Stefano Stabellini
2025-04-01 14:46 ` Jan Beulich
2025-04-18 9:46 ` Penny, Zheng
2025-04-22 6:50 ` Jan Beulich
2025-03-26 5:50 ` [PATCH v2 19/19] xen/sysctl: wrap around sysctl hypercall Penny Zheng
2025-04-01 14:49 ` Jan Beulich
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=0ffb0c7d-4ecf-4172-82dc-0f5368808591@gmail.com \
--to=oleksii.kurochko@gmail.com \
--cc=Penny.Zheng@amd.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=alistair.francis@wdc.com \
--cc=andrew.cooper3@citrix.com \
--cc=anthony.perard@vates.tech \
--cc=bertrand.marquis@arm.com \
--cc=bobbyeshleman@gmail.com \
--cc=connojdavis@gmail.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=michal.orzel@amd.com \
--cc=ray.huang@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.