[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 07 of 16] amd iommu: Add 2 hypercalls for libxc
On Wednesday 14 December 2011 17:44:18 Jan Beulich wrote: > >>> On 14.12.11 at 16:29, Wei Wang <wei.wang2@xxxxxxx> wrote: > > > > # HG changeset patch > > # User Wei Wang <wei.wang2@xxxxxxx> > > # Date 1323875772 -3600 > > # Node ID ef5698887d044ad58293bee3549eaa20310c2b17 > > # Parent fbed4e6011fce13d3a521bbc339f4959bf32a06c > > amd iommu: Add 2 hypercalls for libxc > > > > iommu_set_msi: used by qemu to inform hypervisor iommu vector number in > > guest > > space. Hypervisor needs this vector to inject msi into guest when PPR > > logging > > happens. > > And this cannot be done with the existing MSI emulation? It looks like MSI emulation are used for passthru devices. I only add virtual amd iommu device and do not passthru amd iommu device. So no physcal msi are required and therefore complicate msi emulation might not be very necessary? > > iommu_bind_bdf: used by xl to bind guest bdf number to machine bdf > > number. IOMMU emulations codes receives commands from guest iommu driver > > and forwards > > them to host iommu. But virtual device id from guest should be converted > > into > > physical before sending to real hardware. > > The whole logic here needs to take the segment into account. No new > code should again ignore the segment numbers. Sure, I will fix that. > > --- a/xen/include/public/domctl.h Wed Dec 14 16:16:11 2011 +0100 > > +++ b/xen/include/public/domctl.h Wed Dec 14 16:16:12 2011 +0100 > > @@ -848,6 +848,31 @@ struct xen_domctl_set_access_required { > > typedef struct xen_domctl_set_access_required > > xen_domctl_set_access_required_t; > > DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_access_required_t); > > > > +#if defined(__i386__) || defined(__x86_64__) > > What is x86-specific about these? These hypercalls are only used by AMD. so ia64 should be avoided Thanks, Wei > Jan > > > +/* Support for guest iommu emulation */ > > +struct xen_domctl_guest_iommu_op { > > + /* XEN_DOMCTL_GUEST_IOMMU_OP_* */ > > +#define XEN_DOMCTL_GUEST_IOMMU_OP_SET_MSI 0 > > +#define XEN_DOMCTL_GUEST_IOMMU_OP_BIND_BDF 1 > > + uint8_t op; > > + union { > > + struct iommu_msi { > > + uint8_t vector; > > + uint8_t dest; > > + uint8_t dest_mode; > > + uint8_t delivery_mode; > > + uint8_t trig_mode; > > + } msi; > > + struct bdf_bind { > > + uint32_t g_bdf; > > + uint32_t m_bdf; > > + } bdf_bind; > > + } u; > > +}; > > +typedef struct xen_domctl_guest_iommu_op xen_domctl_guest_iommu_op_t; > > +DEFINE_XEN_GUEST_HANDLE(xen_domctl_guest_iommu_op_t); > > +#endif > > + > > struct xen_domctl { > > uint32_t cmd; > > #define XEN_DOMCTL_createdomain 1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |