[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [RFC PATCH v3 1/7] xen/arm: add generic SCI subsystem
On 11.03.2025 12:16, Grygorii Strashko wrote: > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -526,6 +526,12 @@ S: Supported > F: xen/arch/arm/include/asm/tee/ > F: xen/arch/arm/tee/ > > +SCI MEDIATORS > +M: Oleksii Moisieiev <oleksii_moisieiev@xxxxxxxx> > +S: Supported > +F: xen/arch/arm/sci > +F: xen/include/asm-arm/sci > + > TOOLSTACK > M: Anthony PERARD <anthony.perard@xxxxxxxxxx> > S: Supported Please can you respect alphabetical sorting in this file? > @@ -851,6 +852,18 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) > u_domctl) > case XEN_DOMCTL_deassign_device: > case XEN_DOMCTL_get_device_group: > ret = iommu_do_domctl(op, d, u_domctl); > + > + if ( ret >= 0 || (ret == -EOPNOTSUPP) || (ret == -ENODEV) ) > + { > + /* > + * TODO: RFC > + * This change will allow to pass DT nodes/devices to > + * XEN_DOMCTL_assign_device OP using xl.cfg:"dtdev" property even > + * if those DT nodes/devices even are not behind IOMMU (or IOMMU > + * is disabled) without failure. > + */ > + ret = sci_do_domctl(op, d, u_domctl); > + } > break; Despite the comment I fear I don't understand what you're trying to do here. In any event you may not clobber the original "ret", if all you do is some "add-on". > --- a/xen/include/asm-generic/device.h > +++ b/xen/include/asm-generic/device.h > @@ -18,6 +18,7 @@ enum device_class > DEVICE_IOMMU, > DEVICE_INTERRUPT_CONTROLLER, > DEVICE_PCI_HOSTBRIDGE, > + DEVICE_ARM_SCI, > /* Use for error */ > DEVICE_UNKNOWN, This is a generic header - I don't see how anything arch-specific could validly end up here. > --- a/xen/include/public/arch-arm.h > +++ b/xen/include/public/arch-arm.h > @@ -327,6 +327,8 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t); > #define XEN_DOMCTL_CONFIG_TEE_OPTEE 1 > #define XEN_DOMCTL_CONFIG_TEE_FFA 2 > > +#define XEN_DOMCTL_CONFIG_ARM_SCI_NONE 0 > + > struct xen_arch_domainconfig { > /* IN/OUT */ > uint8_t gic_version; > @@ -350,6 +352,8 @@ struct xen_arch_domainconfig { > * > */ > uint32_t clock_frequency; > + /* IN */ > + uint8_t arm_sci_type; > }; You're not re-using a pre-existing padding field, so I don't see how you can get away without bumping XEN_DOMCTL_INTERFACE_VERSION. Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |