[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xen-devel
Subject:    Re: [Xen-devel] [PATCH v9 2/8] xen/passthrough: Reject self-(de)assignment of devices
From:       "Jan Beulich" <JBeulich () suse ! com>
Date:       2017-02-28 16:46:03
Message-ID: 58B5B75B020000780013E61E () prv-mh ! provo ! novell ! com
[Download RAW message or body]

>>> On 27.02.17 at 02:45, <chao.gao@intel.com> wrote:
> That is to say, don't support a domain assigns a device to itself or detachs
> a device from itself.
> 
> Signed-off-by: Chao Gao <chao.gao@intel.com>

Acked-by: Jan Beulich <jbeulich@suse.com>
albeit I would have wished for ...

> --- a/xen/drivers/passthrough/pci.c
> +++ b/xen/drivers/passthrough/pci.c
> @@ -1603,6 +1603,13 @@ int iommu_do_pci_domctl(
>          break;
>  
>      case XEN_DOMCTL_assign_device:
> +        /* Don't support self-(de)assignment of devices */

... this comment to only talk about assignment and ...

> +        if ( d == current->domain )
> +        {
> +            ret = -EINVAL;
> +            break;
> +        }
> +
>          ret = -ENODEV;
>          if ( domctl->u.assign_device.dev != XEN_DOMCTL_DEV_PCI )
>              break;
> @@ -1643,6 +1650,13 @@ int iommu_do_pci_domctl(
>          break;
>  
>      case XEN_DOMCTL_deassign_device:
> +        /* Don't support self-(de)assignment of devices */

... this one only about de-assignment. I may take the liberty to do
this edit if I end up committing this.

Jan


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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic