Prevent the usage of global logdirty if the domain is using the IOMMU,
and also prevent passthrough of devices if logdirty is enabled.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Tim Deegan <tim@xen.org>
{
int ret;
+ if ( need_iommu(d) && log_global )
+ {
+ /*
+ * Refuse to turn on global log-dirty mode
+ * if the domain is using the IOMMU.
+ */
+ return -EINVAL;
+ }
+
if ( paging_mode_log_dirty(d) )
return -EINVAL;
* enabled for this domain */
if ( unlikely(!need_iommu(d) &&
(d->arch.hvm_domain.mem_sharing_enabled ||
- d->mem_event->paging.ring_page)) )
+ d->mem_event->paging.ring_page ||
+ p2m_get_hostp2m(d)->global_logdirty)) )
return -EXDEV;
if ( !spin_trylock(&pcidevs_lock) )