[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 2/2] xen/dm: arm: Introduce inject_msi2 DM op
On 20.03.25 15:07, Oleksandr Tyshchenko wrote: >>> If I got correctly what is wrote in current thread (and in RFC version >>> where it was an attempt to create just Arm64's counterpart of >>> XEN_DMOP_inject_msi), my understanding (maybe not precise/correct, since >>> I am not quite familiar with x86 details) that we would need something >>> like that: >>> >>> >>> /* >>> * XEN_DMOP_inject_msi2: An enhanced version of the sub-ob to >>> inject an MSI >>> * for an emulated device, which allows >>> specifying >>> * the ID of the device triggering the MSI >>> (source ID). >>> * >>> * The source ID is specified by a pair of <segment> and <source_id>. >>> * If <flags> does not contain XEN_DMOP_MSI_SOURCE_ID_VALID then >>> source ID >>> * is invalid and should be ignored. >>> */ >>> #define XEN_DMOP_inject_msi 21 >>> >>> struct xen_dm_op_inject_msi2 { >>> /* IN - MSI data */ >>> uint32_t data; >>> /* IN - next two fields form an ID of the device triggering >>> the MSI */ >>> uint16_t segment; /* The segment number */ >>> uint16_t source_id; /* The source ID that is local to segment >>> (PCI >>> BDF) */ >>> /* IN - types of source ID */ >>> uint32_t flags; >>> #define XEN_DMOP_MSI_SOURCE_ID_VALID (1u << 0) >>> uint32_t pad; >>> /* IN - MSI address */ >>> uint64_aligned_t addr; >>> }; >>> >>> >>> This is arch agnostic sub-op without the (obvious) specifics of the >>> underlying MSI controller. The sub-ob, I hope, will be suitable on both >>> Arm64 soon (segment + source_id provide vSBDF, then it will possible to >>> locate vITS and devid) and on x86 in future (for the vIOMMU needs). >>> >>> Would you be ok with that in general? Please share you opinion. >> >> Yes, this looks plausible. > > Jan, thanks > > > In the context of things like VMD (using >> software established segment numbers wider than 16 bits) I wonder >> though whether we wouldn't better make segment and source ID 32-bit >> fields from the beginning. > > Keeping in mind that dm_op hypercall is stable and segment can be >= > 0x10000, probably yes, makes sense to use 32-bit from the very beginning. > > > Out-of-range values would of course need >> rejecting then. > > yes, sure > > *** > > Mykyta, are you ok with the proposed adjustments to the sub-op structure? > >> >> Jan Yes, seems fine for me. I will use it in the next version. -- Mykyta
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |