All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleksii Kurochko <oleksii.kurochko@gmail.com>
To: Jan Beulich <jbeulich@suse.com>, "Penny, Zheng" <penny.zheng@amd.com>
Cc: "Huang, Ray" <Ray.Huang@amd.com>,
	"Daniel P. Smith" <dpsmith@apertussolutions.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"Andryuk, Jason" <Jason.Andryuk@amd.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Julien Grall" <julien@xen.org>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Michal Orzel" <michal.orzel@amd.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH v2 18/26] xen/domctl: wrap xsm_getdomaininfo() with CONFIG_MGMT_HYPERCALLS
Date: Mon, 29 Sep 2025 17:41:36 +0200	[thread overview]
Message-ID: <d0d36b5d-5e4e-437d-a4ae-e5796599a471@gmail.com> (raw)
In-Reply-To: <a5224376-f89d-4a2f-8a74-e5256352f754@suse.com>

[-- Attachment #1: Type: text/plain, Size: 4748 bytes --]


On 9/26/25 9:14 AM, Jan Beulich wrote:
> On 26.09.2025 08:57, Penny, Zheng wrote:
>>> -----Original Message-----
>>> From: Jan Beulich<jbeulich@suse.com>
>>> Sent: Friday, September 26, 2025 2:53 PM
>>>
>>> On 26.09.2025 06:41, Penny, Zheng wrote:
>>>>> -----Original Message-----
>>>>> From: Jan Beulich<jbeulich@suse.com>
>>>>> Sent: Thursday, September 25, 2025 10:29 PM
>>>>>
>>>>> On 25.09.2025 11:41, Penny, Zheng wrote:
>>>>>>> -----Original Message-----
>>>>>>> From: Jan Beulich<jbeulich@suse.com>
>>>>>>> Sent: Thursday, September 11, 2025 9:30 PM
>>>>>>>
>>>>>>> On 10.09.2025 09:38, Penny Zheng wrote:
>>>>>>>> --- a/xen/include/xsm/xsm.h
>>>>>>>> +++ b/xen/include/xsm/xsm.h
>>>>>>>> @@ -55,8 +55,8 @@ struct xsm_ops {
>>>>>>>>       void (*security_domaininfo)(struct domain *d,
>>>>>>>>                                   struct xen_domctl_getdomaininfo *info);
>>>>>>>>       int (*domain_create)(struct domain *d, uint32_t ssidref);
>>>>>>>> -    int (*getdomaininfo)(struct domain *d);
>>>>>>>>   #ifdef CONFIG_MGMT_HYPERCALLS
>>>>>>>> +    int (*getdomaininfo)(struct domain *d);
>>>>>>>>       int (*domctl_scheduler_op)(struct domain *d, int op);
>>>>>>>>       int (*sysctl_scheduler_op)(int op);
>>>>>>>>       int (*set_target)(struct domain *d, struct domain *e); @@
>>>>>>>> -234,7
>>>>>>>> +234,11 @@ static inline int xsm_domain_create(
>>>>>>>>
>>>>>>>>   static inline int xsm_getdomaininfo(xsm_default_t def, struct
>>>>>>>> domain
>>>>>>>> *d)  {
>>>>>>>> +#ifdef CONFIG_MGMT_HYPERCALLS
>>>>>>>>       return alternative_call(xsm_ops.getdomaininfo, d);
>>>>>>>> +#else
>>>>>>>> +    return -EOPNOTSUPP;
>>>>>>>> +#endif
>>>>>>>>   }
>>>>>>> This is in use by a Xenstore sysctl and a Xenstore domctl. The
>>>>>>> sysctl is hence already broken with the earlier series. Now the
>>>>>>> domctl is also being screwed up. I don't think MGMT_HYPERCALLS
>>>>>>> really ought to extend to any operations available to other than the core
>>> toolstack.
>>>>>>> That's the Xenstore ones here, but also the ones used by qemu
>>>>>>> (whether run in
>>>>> Dom0 or a stubdom).
>>>>>> Maybe not only limited to the core toolstack. In
>>>>>> dom0less/hyperlaunched
>>>>> scenarios, hypercalls are strictly limited. QEMU is also limited to
>>>>> pvh machine type and with very restricted functionality(, only acting
>>>>> as a few virtio-pci devices backend). @Andryuk, Jason @Stabellini,
>>>>> Stefano Am I understanding correctly and thoroughly about our scenario here for
>>> upstream?
>>>>>> Tracking the codes, if Xenstore is created as a stub domain, it
>>>>>> requires
>>>>> getdomaininfo-domctl to acquire related info.  Sorry, I haven't found
>>>>> how it was called in QEMU...
>>>>>
>>>>> It's not "it"; it's different ones. First and foremost I was thinking
>>>>> of
>>>>>   * XEN_DOMCTL_ioport_mapping
>>>>>   * XEN_DOMCTL_memory_mapping
>>>>>   * XEN_DOMCTL_bind_pt_irq
>>>>>   * XEN_DOMCTL_unbind_pt_irq
>>>>> but there may be others (albeit per the dummy xsm_domctl() this is
>>>>> the full set). As a general criteria, anything using XSM_DM_PRIV
>>>>> checking can in principle be called by qemu.
>>>>>
>>>> Understood.
>>>> I assume that they are all for device passthrough. We are not accepting device
>>> passthrough via core toolstack in dom0less/hyperlaunch-ed scenarios. Jason has
>>> developed device passthrough through device tree to only accept "static
>>> configured" passthrough in dom0less/hyperlaunch-ed scenario, while it is still
>>> internal , it may be the only accept way to do device passthrough in
>>> dom0less/hyperlaunch-ed scenario.
>>>
>>> Right, but no matter what your goals, the upstream contributions need to be self-
>>> consistent. I.e. not (risk to) break other functionality. (Really the four domctl-s
>>> mentioned above might better have been put elsewhere, e.g. as dm-ops. Moving
>>> them may be an option here.)
>> Understood.
>> I'll move them all to the dm-ops
> Before you do so, please consider the consequences, though (I said "may" for a
> reason). Also please allow others to chime in. (In this context I notice that
> several REST maintainers weren't even Cc-ed here, and hence may not have seen
> the earlier discussion.)
>
> One thing seems pretty clear to me: This work likely isn't going to be suitable
> for 4.21 anymore. Hence we're back to considering alternatives to address the
> still pending build issue. (My take on it remains: Revert the tail of the
> sysctl work.) Adding Oleksii to Cc as well.

I agree, the patch series is still quite far from being ready to merge.
So let’s consider it for the next release.

As mentioned in the earlier (related) patch series, reverting the tail of the
sysctl work is still, in my opinion, the best option.

~ Oleksii

[-- Attachment #2: Type: text/html, Size: 6680 bytes --]

  parent reply	other threads:[~2025-09-29 15:42 UTC|newest]

Thread overview: 102+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-10  7:38 [PATCH v2 00/26] Disable domctl-op via CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-09-10  7:38 ` [PATCH v2 01/26] xen/x86: move domctl.o out of PV_SHIM_EXCLUSIVE Penny Zheng
2025-09-10 13:47   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 02/26] xen/sysctl: replace CONFIG_SYSCTL with CONFIG_MGMT_DOMCTL Penny Zheng
2025-09-11  1:34   ` Stefano Stabellini
2025-09-11  2:18     ` Stefano Stabellini
2025-09-10  7:38 ` [PATCH v2 03/26] xen/x86: consolidate vram tracking support Penny Zheng
2025-09-10 14:08   ` Jan Beulich
2025-09-11  7:15     ` Penny, Zheng
2025-09-11  7:54       ` Penny, Zheng
2025-09-11  8:10         ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 04/26] xen: consolidate CONFIG_VM_EVENT Penny Zheng
2025-09-10 14:56   ` Jan Beulich
2025-09-11  9:20     ` Penny, Zheng
2025-09-11  9:52       ` Jan Beulich
2025-09-13 23:31     ` Tamas K Lengyel
2025-09-14 14:04       ` Jan Beulich
2025-09-24  6:39         ` Penny, Zheng
2025-09-25  5:45           ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 05/26] xen/x86: make VM_EVENT depend on CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-09-10 15:06   ` Jan Beulich
2025-09-13 23:21     ` Tamas K Lengyel
2025-09-10  7:38 ` [PATCH v2 06/26] xen/xsm: wrap xsm_vm_event_control() with CONFIG_VM_EVENT Penny Zheng
2025-09-10 13:51   ` Jan Beulich
2025-09-11  1:37     ` Stefano Stabellini
2025-09-11  2:08   ` Stefano Stabellini
2025-09-11 11:03   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 07/26] xen/domctl: wrap domain_pause_by_systemcontroller() with MGMT_HYPERCALLS Penny Zheng
2025-09-10 15:08   ` Jan Beulich
2025-09-24  7:11     ` Penny, Zheng
2025-09-25  5:47       ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 08/26] xen/domctl: wrap domain_soft_reset() with CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-09-10 15:13   ` Jan Beulich
2025-09-12  7:18     ` Penny, Zheng
2025-09-12  7:34       ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 09/26] xen/domctl: wrap domain_resume() " Penny Zheng
2025-09-11  2:27   ` Stefano Stabellini
2025-09-10  7:38 ` [PATCH v2 10/26] xen/domctl: wrap domain_kill() " Penny Zheng
2025-09-11  2:29   ` Stefano Stabellini
2025-09-10  7:38 ` [PATCH v2 11/26] xen/domctl: wrap domain_set_node_affinity() " Penny Zheng
2025-09-11  2:29   ` Stefano Stabellini
2025-09-10  7:38 ` [PATCH v2 12/26] xen/domctl: wrap vcpu_affinity_domctl() " Penny Zheng
2025-09-10 15:52   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 13/26] xen/domctl: wrap sched_adjust() " Penny Zheng
2025-09-11  2:30   ` Stefano Stabellini
2025-09-11 10:42   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 14/26] xen/domctl: wrap arch-specific arch_get_info_guest() " Penny Zheng
2025-09-11  2:31   ` Stefano Stabellini
2025-09-11 10:45     ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 15/26] xen/domctl: wrap xsm_{irq_permission,iomem_permission} " Penny Zheng
2025-09-11  2:34   ` Stefano Stabellini
2025-09-11 11:02   ` Jan Beulich
2025-09-25  7:43     ` Penny, Zheng
2025-09-10  7:38 ` [PATCH v2 16/26] xen/domctl: wrap arch-specific domain_set_time_offset() " Penny Zheng
2025-09-11  2:36   ` Stefano Stabellini
2025-09-11 11:27   ` Jan Beulich
2025-09-25  8:01     ` Penny, Zheng
2025-09-10  7:38 ` [PATCH v2 17/26] xen/domctl: wrap xsm_set_target() " Penny Zheng
2025-09-11  2:37   ` Stefano Stabellini
2025-09-11 11:33     ` Jan Beulich
2025-09-25  8:10       ` Penny, Zheng
2025-09-10  7:38 ` [PATCH v2 18/26] xen/domctl: wrap xsm_getdomaininfo() " Penny Zheng
2025-09-11 13:30   ` Jan Beulich
2025-09-25  9:41     ` Penny, Zheng
2025-09-25 14:28       ` Jan Beulich
2025-09-26  4:41         ` Penny, Zheng
2025-09-26  6:53           ` Jan Beulich
2025-09-26  6:57             ` Penny, Zheng
2025-09-26  7:14               ` Jan Beulich
2025-09-26  8:22                 ` Penny, Zheng
2025-09-26  8:30                   ` Jan Beulich
2025-09-29 15:41                 ` Oleksii Kurochko [this message]
2025-09-26 19:24               ` Stefano Stabellini
2025-09-28 14:38                 ` Jan Beulich
2025-09-29 16:59                   ` Stefano Stabellini
2025-09-29 17:04                     ` Stefano Stabellini
2025-09-10  7:38 ` [PATCH v2 19/26] xen/domctl: wrap set_global_virq_handler() " Penny Zheng
2025-09-11  2:40   ` Stefano Stabellini
2025-09-10  7:38 ` [PATCH v2 20/26] xen/domctl: wrap iommu-related domctl op " Penny Zheng
2025-09-11  3:12   ` Stefano Stabellini
2025-09-11 11:58   ` Jan Beulich
2025-09-26  9:45     ` Penny, Zheng
2025-09-10  7:38 ` [PATCH v2 21/26] xen/xsm: wrap xsm-iommu-related functions " Penny Zheng
2025-09-11 12:05   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 22/26] xen/domctl: wrap arch_{get,set}_paging_mempool_size() " Penny Zheng
2025-09-11  3:18   ` Stefano Stabellini
2025-09-11 12:12   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 23/26] xen/x86: make CONFIG_X86_PSR depend on CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-09-11  3:22   ` Stefano Stabellini
2025-09-11 12:19     ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 24/26] xen/domctl: wrap arch-specific domctl-op with CONFIG_MGMT_HYPERCALLS Penny Zheng
2025-09-11 13:02   ` Jan Beulich
2025-10-11  6:44     ` Penny, Zheng
2025-10-13  6:41       ` Jan Beulich
2025-10-13  7:18         ` Penny, Zheng
2025-10-13  8:30           ` Jan Beulich
2025-10-13  9:25             ` Penny, Zheng
2025-09-10  7:38 ` [PATCH v2 25/26] xen/xsm: wrap xsm functions " Penny Zheng
2025-09-11 13:13   ` Jan Beulich
2025-09-10  7:38 ` [PATCH v2 26/26] xen/domctl: wrap common/domctl.c " Penny Zheng
2025-09-10 13:43   ` Jan Beulich
2025-09-11 13:26   ` 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=d0d36b5d-5e4e-437d-a4ae-e5796599a471@gmail.com \
    --to=oleksii.kurochko@gmail.com \
    --cc=Jason.Andryuk@amd.com \
    --cc=Ray.Huang@amd.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=dpsmith@apertussolutions.com \
    --cc=jbeulich@suse.com \
    --cc=julien@xen.org \
    --cc=michal.orzel@amd.com \
    --cc=penny.zheng@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.