On 02/05/2019 14:16, Jan Beulich wrote:
>>>> On 02.05.19 at 14:59, <andrew.coop...@citrix.com> wrote:
>> On 02/05/2019 13:29, Jan Beulich wrote:
>>> --- a/xen/drivers/passthrough/pci.c
>>> +++ b/xen/drivers/passthrough/pci.c
>>> @@ -1450,17 +1450,36 @@ static int assign_device(struct domain *
>>>      if ( !iommu_enabled || !hd->platform_ops )
>>>          return 0;
>>>  
>>> -    /* Prevent device assign if mem paging or mem sharing have been 
>>> -     * enabled for this domain */
>>> -    if ( unlikely(d->arch.hvm.mem_sharing_enabled ||
>>> -                  vm_event_check_ring(d->vm_event_paging) ||
>>> +    domain_lock(d);
>>> +
>>> +    /*
>>> +     * Prevent device assignment if any of
>>> +     * - mem paging
>>> +     * - mem sharing
>>> +     * - the p2m_ram_ro type
>>> +     * - global log-dirty mode
>> XenServer has working live migration with GPUs, which this change would
>> regress.
>>
>> Behind the scenes, we combine Xen's logdirty bitmap with one provided by
>> the GPU, to ensure that all dirty updates are tracked.
> But this says nothing for the patch here.

Yes it does.

There is nothing inherent about global log-dirty mode which is
incompatible with passthrough when the IOMMU pagetables are not shared
with EPT.

> As long as it doesn't work in the staging tree, it should be prevented.

... but it does work.

> In XenServer
> you could then patch out that check and comment line together
> with whatever other changes you have to make for thins to
> work.

Everything is upstream in the various projects, other than the vendor's
closed source library and kernel driver.

~Andrew

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

Reply via email to