|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/25] Xen/doc: Add Xen virtual IOMMU doc
On 05/07/17 04:15, Lan Tianyu wrote: Hi Julien: Hi Tianyu Lan,
My point was that if a developer read domctl.h first, he cannot guess that the value to be used in "capabilities" and "type" are defined in a separate header (viommu.h). You should at least write down a comment in the code explaining that. + } query_caps; + } u; +}; + +- XEN_DOMCTL_query_viommu_caps + Query capabilities of vIOMMU device model. vIOMMU_type specifies +which vendor vIOMMU device model(E,G Intel VTD) is targeted and hypervisor"E,G" did you mean "e.g"?Yes. Will update.+returns capability bits(E,G interrupt remapping bit).Ditto. A given platform may have multiple IOMMUs with different features. Are we expectingSo far, our patchset just supports VM with one vIOMMU as starter. Do you mean emulation of some vIOMMU capabilities rely on physical IOMMU and there are multiple IOMMUs with different feature? If yes, we need to emulate mult-vIOMMU for different assigned devices under different pIOMMU. Vendor vIOMMU device model needs to check whether the assigned device and support given capabilities passed by tool stack. Hmmm, I think I was a bit confused with the domctl. You are querying the vIOMMU capabilities and they may be different from the physical IOMMU right? + +- XEN_DOMCTL_create_viommu + Create vIOMMU device with vIOMMU_type, capabilities, MMIO +base address and length. Hypervisor returns viommu_id. Capabilities should +be in range of value returned by query_viommu_caps hypercall.Can you explain what mmio and length are here for? Do you expect to trap and emulate the MMIO region in Xen?Yes, we need to emulate VTD MMIO register in the Xen hypervisor and this is agreement under design stage. The MMIO base address is passed to guest via ACPI table which is built by tool stack and so tool stack manages vIOMMU MMIO region. When create vIOMMU, base address and length needs to be passed. I am not yet sure we want to emulate an IOMMU for ARM. They are a bit complex to emulate and we have multiple one (SMMUv2, SMMUv3, IPMMU-VMSA,...). So PV might be the solution here. Though, it is too early to decide. If we wanted to use emulation, an IOMMU may have multiple MMIO ranges and multiple interrupts (either legacy or MSI). Here you are assuming only one MMIO and no interrupt. This new interface is a DOMCTL so it might be ok to extend it in the future? Furthermore, on ARM we would be able to create the vIOMMU but it would be unusable. Indeed, IOMMU are only used to protect devices. But you don't see any way to say "This device is protected by the IOMMU". Did I miss anything? For arm, the base address maybe passed by device tree? Either Device Tree or ACPI. I don't think it matters here. From just looking at the document. I am struggling to understand how this is going to be useful.+ +- XEN_DOMCTL_destroy_viommu + Destroy vIOMMU in Xen hypervisor with viommu_id as parameters. + +xl vIOMMU configuration +======================= +viommu="type=vtd,intremap=1,x2apic=1" + +"type" - Specify vIOMMU device model type. Currently only supports Intel vtd +device model. +"intremap" - Enable vIOMMU interrupt remapping function. +"x2apic" - Support x2apic mode with interrupt remapping function. Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |