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

Re: [Xen-devel] [PATCH v3] common/vm_event: Initialize vm_event lists on domain creation



>>> On 25.08.17 at 11:57, <aisaila@xxxxxxxxxxxxxxx> wrote:
> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -1358,14 +1358,14 @@ static int assign_device(struct domain *d, u16 seg, 
> u8 bus, u8 devfn, u32 flag)
>      struct pci_dev *pdev;
>      int rc = 0;
>  
> -    if ( !iommu_enabled || !hd->platform_ops )
> +    if ( !iommu_enabled || !hd->platform_ops || !d->vm_event_paging )
>          return 0;

So without paging enabled assigning a device does nothing and
succeeds? I think you want to add the extra condition ...

>      /* Prevent device assign if mem paging or mem sharing have been 
>       * enabled for this domain */
>      if ( unlikely(!need_iommu(d) &&
>              (d->arch.hvm_domain.mem_sharing_enabled ||
> -             d->vm_event->paging.ring_page ||
> +             d->vm_event_paging->ring_page ||

... here. And please make sure you test your change (or indicate
you can't below the commit message, so appropriate care can be
taken by consumers of your patch).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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