[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/6] iommu: remove the share_p2m operation


  • To: Paul Durrant <paul@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Fri, 24 Jul 2020 20:00:48 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Kevin Tian <kevin.tian@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Paul Durrant <pdurrant@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 24 Jul 2020 19:01:08 +0000
  • Ironport-sdr: 1OYxkBD80Rr28m8mNtIUCswqXFa3S86bTbd6VugChtaqn/c52UmfSarczN4KqV/O86qGd9aEJ1 tbghh/tQvRA2OIw8F0TCCSNXzHNg0BvYZFmJ/0Vbia/djOi5e0bj4vdtnalajBUKVGzPAPNzYl Om3UO2DjzK/+DD6uBqsqYlaO/8X2TdcgqY6lkXihKBYTd6xJHCBgCpfWkDMnWTMK9mcZENAgBH uwPkeMn6Fdp95AZgvnGKSd/1dnjT6ONtAP2rzDj6m+OLDiud3ufeY3XPDMkFHYeO5LQolUw5ve OJQ=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 24/07/2020 17:46, Paul Durrant wrote:
> From: Paul Durrant <pdurrant@xxxxxxxxxx>
>
> Sharing of HAP tables is VT-d specific so the operation is never defined for
> AMD IOMMU.

It's not VT-d specific, and Xen really did used to share on AMD.

In fact, a remnant of this logic is still present in the form of the
comment for p2m_type_t explaining why p2m_ram_rw needs to be 0.

That said, I agree it shouldn't be a hook, because it is statically
known at domain create time based on flags and hardware properties.

>  There's also no need to pro-actively set vtd.pgd_maddr when using
> shared EPT as it is straightforward to simply define a helper function to
> return the appropriate value in the shared and non-shared cases.

It occurs to me that vtd.pgd_maddr and amd.root_table really are the
same thing, and furthermore are common to all IOMMU implementations on
any architecture.  Is it worth trying to make them common, rather than
continuing to let each implementation handle them differently?

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.