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

Re: [Xen-devel] [PATCH v6 07/10] use is_iommu_enabled() where appropriate...


  • To: Paul Durrant <paul.durrant@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
  • Date: Mon, 19 Aug 2019 16:55:27 -0400
  • Cc: Kevin Tian <kevin.tian@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, Wei Liu <wl@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Brian Woods <brian.woods@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Suravee Suthikulpanit <suravee.suthikulpanit@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 19 Aug 2019 21:16:45 +0000
  • Ironport-phdr: 9a23:opBcMx8gbzxpLP9uRHKM819IXTAuvvDOBiVQ1KB+1e8WIJqq85mqBkHD//Il1AaPAdyBrasf2qGP7vyocFdDyK7JiGoFfp1IWk1NouQttCtkPvS4D1bmJuXhdS0wEZcKflZk+3amLRodQ56mNBXdrXKo8DEdBAj0OxZrKeTpAI7SiNm82/yv95HJbAhEmSSxbalvIBi4qQjdudQajIttJ60s1hbHv3xEdvhMy2h1P1yThRH85smx/J5n7Stdvu8q+tBDX6vnYak2VKRUAzs6PW874s3rrgTDQhCU5nQASGUWkwFHDBbD4RrnQ5r+qCr6tu562CmHIc37SK0/VDq+46t3ThLjlTwKPCAl/m7JlsNwjbpboBO/qBx5347Ue5yeOP5ncq/AYd8WWW9NU8BfWCxbBoO3cpUBAewPM+1Fq4XxvlUDoB+7CQSqGej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CAzxpEFLle1ns/vVmqHOnUk80yBmHbkNl17eu9R8am/qcR+kU3rIetycrsy90E0ql39LKF9qAoBJsfL9bYdMy/lhHz3jVtxRnMZy9NK1tml8ecxhtv0Pv2BR7EJlPkc8vrHky1gp9NbqY0E9ddzOfxZ3wOKDXKm/o8BCpcaHW2UvR0NSX+qcK8vs1sFTjvAe1FkU893VrycVa03yZ5p/SFgodTYrxUlor9xh9v7zaYTcy553V1X1qK6W0rj7C1MgvBOY+yxagectfP72AFAPoD8IaAM2uIvQwm1e1dhIEIPxS9KksMsOpafSG37SrPOl+kz68kGtH/YZ90kaW+CpkUePHwYsFz+uE0QuGSzf8llahs8/tlY9YYjESG3K1yTL4C45Jeq1yYYELBH+1I82q3NVxnYDtVGBG+1K5HFMGxdOpeRqTb1z+wA1Q0VwXrmahmSu50zx5iCsmrq+C0yDU3+vicx8HMHZRRGZ+lVfsPZS0j9cCUUezdQgplQGq5UDgy6lVo6R/KHTcQVxTcifsKmFtT7G8uaaFY85Ku9sUtnBvWfm4KXyHUKT0pQdShzvqAm8YyC0hbTispr3yngBgiXLbJ3F2+j6Racx2gBvS+tHYbfpQxSYdAjl1jyHNAVqxNMXv+s+bxLnZteXre2unV5BXOQXmhayavSK1rTlmDhGykOq6ssH2Ggg9lyng3p9lUjue/0W0WZXiy6nvabEvRUJvHlKprpMhS4w=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 8/16/19 1:19 PM, Paul Durrant wrote:
...rather than testing the global iommu_enabled flag and ops pointer.

Now that there is a per-domain flag indicating whether the domain is
permitted to use the IOMMU (which determines whether the ops pointer will
be set), many tests of the global iommu_enabled flag and ops pointer can
be translated into tests of the per-domain flag. Some of the other tests of
purely the global iommu_enabled flag can also be translated into tests of
the per-domain flag.

NOTE: The comment in iommu_share_p2m_table() is also fixed; need_iommu()
       disappeared some time ago. Also, whilst the style of the 'if' in
       flask_iommu_resource_use_perm() is fixed, I have not translated any
       instances of u32 into uint32_t to keep consistency. IMO such a
       translation would be better done globally for the source module in
       a separate patch.
       The change in the initialization of the 'hd' variable in iommu_map()
       and iommu_unmap() is done to keep the PV shim build happy. Without
       this change it will fail to compile with errors of the form:

iommu.c:361:32: error: unused variable ‘hd’ [-Werror=unused-variable]
      const struct domain_iommu *hd = dom_iommu(d);
                                      ^~

Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

Acked-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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