Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Jag Raman
> On Feb 10, 2022, at 7:26 PM, Michael S. Tsirkin wrote: > > On Thu, Feb 10, 2022 at 04:49:33PM -0700, Alex Williamson wrote: >> On Thu, 10 Feb 2022 18:28:56 -0500 >> "Michael S. Tsirkin" wrote: >> >>> On Thu, Feb 10, 2022 at 04:17:34PM -0700, Alex Williamson wrote: On Thu, 10 Feb 2022 2

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Michael S. Tsirkin
On Thu, Feb 10, 2022 at 04:49:33PM -0700, Alex Williamson wrote: > On Thu, 10 Feb 2022 18:28:56 -0500 > "Michael S. Tsirkin" wrote: > > > On Thu, Feb 10, 2022 at 04:17:34PM -0700, Alex Williamson wrote: > > > On Thu, 10 Feb 2022 22:23:01 + > > > Jag Raman wrote: > > > > > > > > On Feb 10,

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Jag Raman
> On Feb 10, 2022, at 6:17 PM, Alex Williamson > wrote: > > On Thu, 10 Feb 2022 22:23:01 + > Jag Raman wrote: > >>> On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: >>> >>> On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: Thanks for the explanation, Alex. T

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Alex Williamson
On Thu, 10 Feb 2022 18:28:56 -0500 "Michael S. Tsirkin" wrote: > On Thu, Feb 10, 2022 at 04:17:34PM -0700, Alex Williamson wrote: > > On Thu, 10 Feb 2022 22:23:01 + > > Jag Raman wrote: > > > > > > On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: > > > > > > > > On Thu, Feb 10, 20

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Jag Raman
> On Feb 10, 2022, at 5:53 PM, Michael S. Tsirkin wrote: > > On Thu, Feb 10, 2022 at 10:23:01PM +, Jag Raman wrote: >> >> >>> On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: >>> >>> On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: > On Feb 2, 2022, at 12

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Michael S. Tsirkin
On Thu, Feb 10, 2022 at 04:17:34PM -0700, Alex Williamson wrote: > On Thu, 10 Feb 2022 22:23:01 + > Jag Raman wrote: > > > > On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: > > > > > > On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: > > >> > > >> Thanks for the explanat

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Alex Williamson
On Thu, 10 Feb 2022 22:23:01 + Jag Raman wrote: > > On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: > > > > On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: > >> > >> Thanks for the explanation, Alex. Thanks to everyone else in the thread who > >> helped to clarify this

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Michael S. Tsirkin
On Thu, Feb 10, 2022 at 10:23:01PM +, Jag Raman wrote: > > > > On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: > > > > On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: > >> > >> > >>> On Feb 2, 2022, at 12:34 AM, Alex Williamson > >>> wrote: > >>> > >>> On Wed, 2 Feb 2

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Jag Raman
> On Feb 10, 2022, at 3:02 AM, Michael S. Tsirkin wrote: > > On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: >> >> >>> On Feb 2, 2022, at 12:34 AM, Alex Williamson >>> wrote: >>> >>> On Wed, 2 Feb 2022 01:13:22 + >>> Jag Raman wrote: >>> > On Feb 1, 2022, at 5:47 PM, A

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-10 Thread Michael S. Tsirkin
On Thu, Feb 10, 2022 at 12:08:27AM +, Jag Raman wrote: > > > > On Feb 2, 2022, at 12:34 AM, Alex Williamson > > wrote: > > > > On Wed, 2 Feb 2022 01:13:22 + > > Jag Raman wrote: > > > >>> On Feb 1, 2022, at 5:47 PM, Alex Williamson > >>> wrote: > >>> > >>> On Tue, 1 Feb 2022 21:24

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-09 Thread Jag Raman
> On Feb 2, 2022, at 12:34 AM, Alex Williamson > wrote: > > On Wed, 2 Feb 2022 01:13:22 + > Jag Raman wrote: > >>> On Feb 1, 2022, at 5:47 PM, Alex Williamson >>> wrote: >>> >>> On Tue, 1 Feb 2022 21:24:08 + >>> Jag Raman wrote: >>> > On Feb 1, 2022, at 10:24 AM, Alex Willia

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-02 Thread Alex Williamson
On Wed, 2 Feb 2022 09:30:42 + Peter Maydell wrote: > On Tue, 1 Feb 2022 at 23:51, Alex Williamson > wrote: > > > > On Tue, 1 Feb 2022 21:24:08 + > > Jag Raman wrote: > > > The PCIBus data structure already has address_space_mem and > > > address_space_io to contain the BAR regions of

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-02 Thread Michael S. Tsirkin
On Wed, Feb 02, 2022 at 08:49:33AM -0700, Alex Williamson wrote: > > Alex, what did you refer to? > > My evidence is largely by omission, but that might be that in practice > it's not used rather than explicitly forbidden. I note that the bus > master enable bit specifies: > > Bus Master E

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-02 Thread Alex Williamson
On Wed, 2 Feb 2022 05:06:49 -0500 "Michael S. Tsirkin" wrote: > On Wed, Feb 02, 2022 at 09:30:42AM +, Peter Maydell wrote: > > > I/O port space is always the identity mapped CPU address space unless > > > sparse translations are used to create multiple I/O port spaces (not > > > implemented).

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-02 Thread Michael S. Tsirkin
On Wed, Feb 02, 2022 at 09:30:42AM +, Peter Maydell wrote: > > I/O port space is always the identity mapped CPU address space unless > > sparse translations are used to create multiple I/O port spaces (not > > implemented). I/O port space is only accessed by the CPU, there are no > > device in

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-02 Thread Peter Maydell
On Tue, 1 Feb 2022 at 23:51, Alex Williamson wrote: > > On Tue, 1 Feb 2022 21:24:08 + > Jag Raman wrote: > > The PCIBus data structure already has address_space_mem and > > address_space_io to contain the BAR regions of devices attached > > to it. I understand that these two PCIBus members fo

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-02 Thread Stefan Hajnoczi
On Tue, Feb 01, 2022 at 10:34:32PM -0700, Alex Williamson wrote: > On Wed, 2 Feb 2022 01:13:22 + > Jag Raman wrote: > > > > On Feb 1, 2022, at 5:47 PM, Alex Williamson > > > wrote: > > > > > > On Tue, 1 Feb 2022 21:24:08 + > > > Jag Raman wrote: > > > > > >>> On Feb 1, 2022, at 10:

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Alex Williamson
On Wed, 2 Feb 2022 01:13:22 + Jag Raman wrote: > > On Feb 1, 2022, at 5:47 PM, Alex Williamson > > wrote: > > > > On Tue, 1 Feb 2022 21:24:08 + > > Jag Raman wrote: > > > >>> On Feb 1, 2022, at 10:24 AM, Alex Williamson > >>> wrote: > >>> > >>> On Tue, 1 Feb 2022 09:30:35 +

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Jag Raman
> On Feb 1, 2022, at 5:47 PM, Alex Williamson > wrote: > > On Tue, 1 Feb 2022 21:24:08 + > Jag Raman wrote: > >>> On Feb 1, 2022, at 10:24 AM, Alex Williamson >>> wrote: >>> >>> On Tue, 1 Feb 2022 09:30:35 + >>> Stefan Hajnoczi wrote: >>> On Mon, Jan 31, 2022 at 09:16:23AM

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Jag Raman
> On Feb 1, 2022, at 10:24 AM, Alex Williamson > wrote: > > On Tue, 1 Feb 2022 09:30:35 + > Stefan Hajnoczi wrote: > >> On Mon, Jan 31, 2022 at 09:16:23AM -0700, Alex Williamson wrote: >>> On Fri, 28 Jan 2022 09:18:08 + >>> Stefan Hajnoczi wrote: >>> On Thu, Jan 27, 2022 at 02

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Alex Williamson
On Tue, 1 Feb 2022 21:24:08 + Jag Raman wrote: > > On Feb 1, 2022, at 10:24 AM, Alex Williamson > > wrote: > > > > On Tue, 1 Feb 2022 09:30:35 + > > Stefan Hajnoczi wrote: > > > >> On Mon, Jan 31, 2022 at 09:16:23AM -0700, Alex Williamson wrote: > >>> On Fri, 28 Jan 2022 09:18:08

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Alex Williamson
On Tue, 1 Feb 2022 09:30:35 + Stefan Hajnoczi wrote: > On Mon, Jan 31, 2022 at 09:16:23AM -0700, Alex Williamson wrote: > > On Fri, 28 Jan 2022 09:18:08 + > > Stefan Hajnoczi wrote: > > > > > On Thu, Jan 27, 2022 at 02:22:53PM -0700, Alex Williamson wrote: > > > > If the goal here i

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Dr. David Alan Gilbert
* Alex Williamson (alex.william...@redhat.com) wrote: > On Thu, 27 Jan 2022 08:30:13 + > Stefan Hajnoczi wrote: > > > On Wed, Jan 26, 2022 at 04:13:33PM -0500, Michael S. Tsirkin wrote: > > > On Wed, Jan 26, 2022 at 08:07:36PM +, Dr. David Alan Gilbert wrote: > > > > * Stefan Hajnoczi (

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-02-01 Thread Stefan Hajnoczi
On Mon, Jan 31, 2022 at 09:16:23AM -0700, Alex Williamson wrote: > On Fri, 28 Jan 2022 09:18:08 + > Stefan Hajnoczi wrote: > > > On Thu, Jan 27, 2022 at 02:22:53PM -0700, Alex Williamson wrote: > > > If the goal here is to restrict DMA between devices, ie. peer-to-peer > > > (p2p), why are we

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-31 Thread Alex Williamson
On Fri, 28 Jan 2022 09:18:08 + Stefan Hajnoczi wrote: > On Thu, Jan 27, 2022 at 02:22:53PM -0700, Alex Williamson wrote: > > If the goal here is to restrict DMA between devices, ie. peer-to-peer > > (p2p), why are we trying to re-invent what an IOMMU already does? > > The issue Dave raised

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-28 Thread Stefan Hajnoczi
On Thu, Jan 27, 2022 at 02:22:53PM -0700, Alex Williamson wrote: > If the goal here is to restrict DMA between devices, ie. peer-to-peer > (p2p), why are we trying to re-invent what an IOMMU already does? The issue Dave raised is that vfio-user servers run in separate processses from QEMU with sha

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-28 Thread Stefan Hajnoczi
On Thu, Jan 27, 2022 at 02:22:53PM -0700, Alex Williamson wrote: > On Thu, 27 Jan 2022 08:30:13 + > Stefan Hajnoczi wrote: > > > On Wed, Jan 26, 2022 at 04:13:33PM -0500, Michael S. Tsirkin wrote: > > > On Wed, Jan 26, 2022 at 08:07:36PM +, Dr. David Alan Gilbert wrote: > > > > * Stefan

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-27 Thread Alex Williamson
On Thu, 27 Jan 2022 08:30:13 + Stefan Hajnoczi wrote: > On Wed, Jan 26, 2022 at 04:13:33PM -0500, Michael S. Tsirkin wrote: > > On Wed, Jan 26, 2022 at 08:07:36PM +, Dr. David Alan Gilbert wrote: > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > > On Wed, Jan 26, 2022 at 05:2

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-27 Thread Jag Raman
> On Jan 26, 2022, at 1:13 PM, Dr. David Alan Gilbert > wrote: > > * Jag Raman (jag.ra...@oracle.com) wrote: >> >> >>> On Jan 25, 2022, at 1:38 PM, Dr. David Alan Gilbert >>> wrote: >>> >>> * Jag Raman (jag.ra...@oracle.com) wrote: > On Jan 19, 2022, at 7:12 PM, Michael S.

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-27 Thread Michael S. Tsirkin
On Thu, Jan 27, 2022 at 08:30:13AM +, Stefan Hajnoczi wrote: > On Wed, Jan 26, 2022 at 04:13:33PM -0500, Michael S. Tsirkin wrote: > > On Wed, Jan 26, 2022 at 08:07:36PM +, Dr. David Alan Gilbert wrote: > > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > > On Wed, Jan 26, 2022 at 05:

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-27 Thread Stefan Hajnoczi
On Wed, Jan 26, 2022 at 04:13:33PM -0500, Michael S. Tsirkin wrote: > On Wed, Jan 26, 2022 at 08:07:36PM +, Dr. David Alan Gilbert wrote: > > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > > On Wed, Jan 26, 2022 at 05:27:32AM +, Jag Raman wrote: > > > > > > > > > > > > > On Jan 25, 20

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-26 Thread Michael S. Tsirkin
On Wed, Jan 26, 2022 at 08:07:36PM +, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@redhat.com) wrote: > > On Wed, Jan 26, 2022 at 05:27:32AM +, Jag Raman wrote: > > > > > > > > > > On Jan 25, 2022, at 1:38 PM, Dr. David Alan Gilbert > > > > wrote: > > > > > > > > * Jag R

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-26 Thread Dr. David Alan Gilbert
* Stefan Hajnoczi (stefa...@redhat.com) wrote: > On Wed, Jan 26, 2022 at 05:27:32AM +, Jag Raman wrote: > > > > > > > On Jan 25, 2022, at 1:38 PM, Dr. David Alan Gilbert > > > wrote: > > > > > > * Jag Raman (jag.ra...@oracle.com) wrote: > > >> > > >> > > >>> On Jan 19, 2022, at 7:12 PM,

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-26 Thread Dr. David Alan Gilbert
* Jag Raman (jag.ra...@oracle.com) wrote: > > > > On Jan 25, 2022, at 1:38 PM, Dr. David Alan Gilbert > > wrote: > > > > * Jag Raman (jag.ra...@oracle.com) wrote: > >> > >> > >>> On Jan 19, 2022, at 7:12 PM, Michael S. Tsirkin wrote: > >>> > >>> On Wed, Jan 19, 2022 at 04:41:52PM -0500, Ja

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-26 Thread Stefan Hajnoczi
On Wed, Jan 26, 2022 at 05:27:32AM +, Jag Raman wrote: > > > > On Jan 25, 2022, at 1:38 PM, Dr. David Alan Gilbert > > wrote: > > > > * Jag Raman (jag.ra...@oracle.com) wrote: > >> > >> > >>> On Jan 19, 2022, at 7:12 PM, Michael S. Tsirkin wrote: > >>> > >>> On Wed, Jan 19, 2022 at 04:

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-25 Thread Jag Raman
> On Jan 25, 2022, at 1:38 PM, Dr. David Alan Gilbert > wrote: > > * Jag Raman (jag.ra...@oracle.com) wrote: >> >> >>> On Jan 19, 2022, at 7:12 PM, Michael S. Tsirkin wrote: >>> >>> On Wed, Jan 19, 2022 at 04:41:52PM -0500, Jagannathan Raman wrote: Allow PCI buses to be part of isolat

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-25 Thread Dr. David Alan Gilbert
* Jag Raman (jag.ra...@oracle.com) wrote: > > > > On Jan 19, 2022, at 7:12 PM, Michael S. Tsirkin wrote: > > > > On Wed, Jan 19, 2022 at 04:41:52PM -0500, Jagannathan Raman wrote: > >> Allow PCI buses to be part of isolated CPU address spaces. This has a > >> niche usage. > >> > >> TYPE_REMOTE

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-25 Thread Stefan Hajnoczi
On Tue, Jan 25, 2022 at 01:49:23PM +, Jag Raman wrote: > > > > On Jan 25, 2022, at 4:56 AM, Stefan Hajnoczi wrote: > > > > On Wed, Jan 19, 2022 at 04:41:52PM -0500, Jagannathan Raman wrote: > >> Allow PCI buses to be part of isolated CPU address spaces. This has a > >> niche usage. > >> >

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-25 Thread Jag Raman
> On Jan 25, 2022, at 4:56 AM, Stefan Hajnoczi wrote: > > On Wed, Jan 19, 2022 at 04:41:52PM -0500, Jagannathan Raman wrote: >> Allow PCI buses to be part of isolated CPU address spaces. This has a >> niche usage. >> >> TYPE_REMOTE_MACHINE allows multiple VMs to house their PCI devices in >> t

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-25 Thread Stefan Hajnoczi
On Wed, Jan 19, 2022 at 04:41:52PM -0500, Jagannathan Raman wrote: > Allow PCI buses to be part of isolated CPU address spaces. This has a > niche usage. > > TYPE_REMOTE_MACHINE allows multiple VMs to house their PCI devices in > the same machine/server. This would cause address space collision as

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-20 Thread Jag Raman
> On Jan 19, 2022, at 7:12 PM, Michael S. Tsirkin wrote: > > On Wed, Jan 19, 2022 at 04:41:52PM -0500, Jagannathan Raman wrote: >> Allow PCI buses to be part of isolated CPU address spaces. This has a >> niche usage. >> >> TYPE_REMOTE_MACHINE allows multiple VMs to house their PCI devices in >

Re: [PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-19 Thread Michael S. Tsirkin
On Wed, Jan 19, 2022 at 04:41:52PM -0500, Jagannathan Raman wrote: > Allow PCI buses to be part of isolated CPU address spaces. This has a > niche usage. > > TYPE_REMOTE_MACHINE allows multiple VMs to house their PCI devices in > the same machine/server. This would cause address space collision as

[PATCH v5 03/18] pci: isolated address space for PCI bus

2022-01-19 Thread Jagannathan Raman
Allow PCI buses to be part of isolated CPU address spaces. This has a niche usage. TYPE_REMOTE_MACHINE allows multiple VMs to house their PCI devices in the same machine/server. This would cause address space collision as well as be a security vulnerability. Having separate address spaces for each