mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/x86: account for assigned PCI devices in cache_flush_permitted()
While unlikely, it's possible for PCI devices to not have any IO resources assigned, yet in such case the owner domain might still need to issue cache control operations in case the device performs DMA requests. Adjust cache_flush_permitted() to account for has_arch_pdevs(). While there also switch l1_disallow_mask() to use cache_flush_permitted(). This should be a non-functional change after the adjustment done to cache_flush_permitted(). Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
1 parent
58c227fcb2
commit
8333e358e4
2 files changed
+3
-4
No files matched your search
@@ -19,7 +19,8 @@
|
||||
(!rangeset_is_empty((d)->iomem_caps) || \
|
||||
!rangeset_is_empty((d)->arch.ioport_caps))
|
||||
|
||||
#define cache_flush_permitted has_arch_io_resources
|
||||
#define cache_flush_permitted(d) \
|
||||
(has_arch_io_resources(d) || has_arch_pdevs(d))
|
||||
|
||||
static inline int ioports_permit_access(struct domain *d, unsigned long s,
|
||||
unsigned long e)
|
||||
|
||||
+1
-3
@@ -172,9 +172,7 @@ static DEFINE_SPINLOCK(subpage_ro_lock);
|
||||
|
||||
#define l1_disallow_mask(d) \
|
||||
(((d) != dom_io) && \
|
||||
(rangeset_is_empty((d)->iomem_caps) && \
|
||||
rangeset_is_empty((d)->arch.ioport_caps) && \
|
||||
!has_arch_pdevs(d) && \
|
||||
(!cache_flush_permitted(d) && \
|
||||
is_pv_domain(d)) ? \
|
||||
L1_DISALLOW_MASK : (L1_DISALLOW_MASK & ~PAGE_CACHE_ATTRS))
|
||||
|
||||
|
||||