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

Re: [PATCH v3 1/2] IOMMU/x86: disallow device assignment to PoD guests


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Fri, 28 Jan 2022 16:07:33 +0000
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Paul Durrant <paul@xxxxxxx>, Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>, Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 28 Jan 2022 16:07:47 +0000
  • Ironport-data: A9a23:SHuNgqx/dzBAA8wR0h56t+ebwSrEfRIJ4+MujC+fZmUNrF6WrkUCz TBKDzzVOf/eYzfyL9x2YN/i/B9T6MLSx9VnHgY+rCAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnvopW1TYhSEUOZugH9IQM8aZfHAhLeNYYH1500g7wrRp2tIAbeWRWGthh /uj+6UzB3f9s9JEGjp8B3Wr8U4HUFza4Vv0j3RmDRx5lAa2e0o9VfrzEZqZPXrgKrS4K8bhL wr1IBNVyUuCl/slIovNfr8W6STmSJaKVeSFoiI+t6RPHnGuD8H9u0o2HKN0VKtZt9mGt9VI7 dthmp6ccj44I5KdisAtfhsBTj4raMWq+JefSZS+mcmazkmAeHrw2fR+SkoxOOX0+M4uXzsIr 6ZBbmlQMFbT3Ipaw5riIgVors0lMMnsOpJZonx6xCvVJf0nXYrCU+PB4towMDIY2J0XQquFO 5JxhTxHUjPuUgFNF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Z4bNElz OMmtJJE4gCzkEN3YNOPjyQS/GWQNH0QFa4gs8hCUoPsjwMqzHBEYIDdVXCqsM3eNY0UPxl4O CKQiYrDm69YlxjLfHcEHHTQ2fZQ2MYVsxdQwV5ef1mEl7IpXBPsMMG9Jdjvcjlo8w==
  • Ironport-hdrordr: A9a23:EvbWzKEVPbKB5RBqpLqE6seALOsnbusQ8zAXP0AYc31om+ij5q eTdZUgpHvJYVkqNE3I9eruBEDEewK7yXcX2/h1AV7BZniEhILAFugLhuGO/9SjIVydygc079 YYT0EUMr3N5DZB4/rH3A==
  • Ironport-sdr: o8VY+dRwdqg3H2T9qp94o1LwbDKI7gP3W+HobQv3CXR+ak+42Ukb0drpy3hRYraG7HEx1tQteC VMpI2Y25QEoHgQymhQQOT4a0nTkWb4N4iyBPrp4r2VBTlEm8psRG9/KC0E1y2uY+PG8Lt8kBAd LhLMhoIyjWW7+5MIYDq643YkTW9KfLO3TUTTrXs+ZSzW7zbSdQUi8f/pWAf2AnvHX+KgqqJQIq 3WSP3q1YzYS2TXAa/qaiqG4Su7XlLDwmV3nSP7Ivx9pYF1uBRv+BIOQNZuCTYWHbzmFOSGf9qg tjYJkhALTLOXhbUH6RWjhrxF
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, Jan 04, 2022 at 10:41:32AM +0100, Jan Beulich wrote:
> While it is okay for IOMMU page tables to get set up for guests starting
> in PoD mode, actual device assignment may only occur once all PoD
> entries have been removed from the P2M. So far this was enforced only
> for boot-time assignment, and only in the tool stack.
> 
> Also use the new function to replace p2m_pod_entry_count(): Its unlocked
> access to p2m->pod.entry_count wasn't really okay (irrespective of the
> result being stale by the time the caller gets to see it).
> 
> To allow the tool stack to see a consistent snapshot of PoD state, move
> the tail of XENMEM_{get,set}_pod_target handling into a function, adding
> proper locking there.
> 
> In libxl take the liberty to use the new local variable r also for a
> pre-existing call into libxc.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Thanks,

-- 
Anthony PERARD



 


Rackspace

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