Re: [RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-20 Thread Jason Gunthorpe
On Tue, Apr 20, 2021 at 04:04:57PM -0600, Alex Williamson wrote: > > The migration control registers must be on a different VF from the VF > > being plugged into a guest and the two VFs have to be in different > > IOMMU groups to ensure they are isolated from each other. > > I think that's a

Re: [RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-20 Thread Alex Williamson
On Tue, 20 Apr 2021 09:59:57 -0300 Jason Gunthorpe wrote: > On Tue, Apr 20, 2021 at 08:50:12PM +0800, liulongfang wrote: > > On 2021/4/19 20:33, Jason Gunthorpe wrote: > > > On Mon, Apr 19, 2021 at 08:24:40PM +0800, liulongfang wrote: > > > > > >>> I'm also confused how this works securely

Re: [RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-20 Thread Jason Gunthorpe
On Tue, Apr 20, 2021 at 09:28:46PM +0800, liulongfang wrote: > >> So, I still don't understand what the security risk you are talking about > >> is, > >> and what do you think the security design should look like? > >> Can you elaborate on it? > > > > Each security domain must have its own PCI

Re: [RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-20 Thread liulongfang
On 2021/4/20 20:59, Jason Gunthorpe wrote: > On Tue, Apr 20, 2021 at 08:50:12PM +0800, liulongfang wrote: >> On 2021/4/19 20:33, Jason Gunthorpe wrote: >>> On Mon, Apr 19, 2021 at 08:24:40PM +0800, liulongfang wrote: >>> > I'm also confused how this works securely at all, as a general rule a

Re: [RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-20 Thread Jason Gunthorpe
On Tue, Apr 20, 2021 at 08:50:12PM +0800, liulongfang wrote: > On 2021/4/19 20:33, Jason Gunthorpe wrote: > > On Mon, Apr 19, 2021 at 08:24:40PM +0800, liulongfang wrote: > > > >>> I'm also confused how this works securely at all, as a general rule a > >>> VFIO PCI driver cannot access the MMIO

Re: [RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-20 Thread liulongfang
On 2021/4/19 20:33, Jason Gunthorpe wrote: > On Mon, Apr 19, 2021 at 08:24:40PM +0800, liulongfang wrote: > >>> I'm also confused how this works securely at all, as a general rule a >>> VFIO PCI driver cannot access the MMIO memory of the function it is >>> planning to assign to the guest. There

Re: [RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-19 Thread Jason Gunthorpe
On Mon, Apr 19, 2021 at 08:24:40PM +0800, liulongfang wrote: > > I'm also confused how this works securely at all, as a general rule a > > VFIO PCI driver cannot access the MMIO memory of the function it is > > planning to assign to the guest. There is a lot of danger that the > > guest could

Re: [RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-19 Thread liulongfang
On 2021/4/16 6:01, Jason Gunthorpe wrote: > On Tue, Apr 13, 2021 at 11:36:22AM +0800, Longfang Liu wrote: >> Register the live migration driver of the accelerator module to vfio >> >> Signed-off-by: Longfang Liu >> drivers/vfio/pci/vfio_pci.c | 11 +++ >>

Re: [RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-15 Thread Jason Gunthorpe
On Tue, Apr 13, 2021 at 11:36:22AM +0800, Longfang Liu wrote: > Register the live migration driver of the accelerator module to vfio > > Signed-off-by: Longfang Liu > drivers/vfio/pci/vfio_pci.c | 11 +++ > drivers/vfio/pci/vfio_pci_private.h | 9 + > 2 files changed,

[RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-12 Thread Longfang Liu
Register the live migration driver of the accelerator module to vfio Signed-off-by: Longfang Liu --- drivers/vfio/pci/vfio_pci.c | 11 +++ drivers/vfio/pci/vfio_pci_private.h | 9 + 2 files changed, 20 insertions(+) diff --git a/drivers/vfio/pci/vfio_pci.c

[RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-12 Thread Longfang Liu
Register the live migration driver of the accelerator module to vfio Signed-off-by: Longfang Liu --- drivers/vfio/pci/vfio_pci.c | 11 +++ drivers/vfio/pci/vfio_pci_private.h | 10 ++ 2 files changed, 21 insertions(+) diff --git a/drivers/vfio/pci/vfio_pci.c

[RFC PATCH 2/3] vfio/hisilicon: register the driver to vfio

2021-04-12 Thread Longfang Liu
Register the live migration driver of the accelerator module to vfio Signed-off-by: Longfang Liu Reviewed-by: Zengtao --- drivers/vfio/pci/vfio_pci.c | 11 +++ drivers/vfio/pci/vfio_pci_private.h | 10 ++ 2 files changed, 21 insertions(+) diff --git