Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-20 Thread Gavin Shan
On Wed, Mar 20, 2013 at 01:46:22PM -0600, Alex Williamson wrote: >On Wed, 2013-03-20 at 20:31 +0100, Benjamin Herrenschmidt wrote: >> On Wed, 2013-03-20 at 12:48 -0600, Alex Williamson wrote: .../... >> As for EEH, I will let Gavin describe in more details what he is doing, >> though I wouldn't b

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-20 Thread Alex Williamson
On Wed, 2013-03-20 at 20:31 +0100, Benjamin Herrenschmidt wrote: > On Wed, 2013-03-20 at 12:48 -0600, Alex Williamson wrote: > > Perhaps my problem is that I don't have a clear picture of where > > you're > > going with this like I do for AER. For AER we're starting with > > notification of an err

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-20 Thread Benjamin Herrenschmidt
On Wed, 2013-03-20 at 12:48 -0600, Alex Williamson wrote: > Perhaps my problem is that I don't have a clear picture of where > you're > going with this like I do for AER. For AER we're starting with > notification of an error, from that we build into how to retrieve the > error information, and fi

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-20 Thread Alex Williamson
On Tue, 2013-03-19 at 05:45 +0100, Benjamin Herrenschmidt wrote: > On Mon, 2013-03-18 at 22:18 -0600, Alex Williamson wrote: > > > Yes, EEH firmware call needn't going through VFIO. However, EEH has > > > very close relationship with PCI and so VFIO-PCI does. Eventually, EEH > > > has close relatio

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-18 Thread Benjamin Herrenschmidt
On Mon, 2013-03-18 at 22:18 -0600, Alex Williamson wrote: > > Yes, EEH firmware call needn't going through VFIO. However, EEH has > > very close relationship with PCI and so VFIO-PCI does. Eventually, EEH > > has close relationship with VFIO-PCI :-) > > Is there some plan to do more with EEH throu

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-18 Thread Alex Williamson
On Tue, 2013-03-19 at 11:24 +0800, Gavin Shan wrote: > On Mon, Mar 18, 2013 at 03:01:14PM -0600, Alex Williamson wrote: > >On Sat, 2013-03-16 at 06:37 +0100, Benjamin Herrenschmidt wrote: > >> On Sat, 2013-03-16 at 09:34 +0800, Gavin Shan wrote: > >> > >Could you explain further how this will be us

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-18 Thread Gavin Shan
On Mon, Mar 18, 2013 at 03:01:14PM -0600, Alex Williamson wrote: >On Sat, 2013-03-16 at 06:37 +0100, Benjamin Herrenschmidt wrote: >> On Sat, 2013-03-16 at 09:34 +0800, Gavin Shan wrote: >> > >Could you explain further how this will be used? How the device is >> > >exposed to a guest is entirely a

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-18 Thread Alex Williamson
On Sat, 2013-03-16 at 06:37 +0100, Benjamin Herrenschmidt wrote: > On Sat, 2013-03-16 at 09:34 +0800, Gavin Shan wrote: > > >Could you explain further how this will be used? How the device is > > >exposed to a guest is entirely a userspace construct, so why does vfio > > >need to know or care abou

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-15 Thread Benjamin Herrenschmidt
On Sat, 2013-03-16 at 09:34 +0800, Gavin Shan wrote: > >Could you explain further how this will be used? How the device is > >exposed to a guest is entirely a userspace construct, so why does vfio > >need to know or care about this? I had assumed for AER that QEMU would > >do the translation from

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-15 Thread Gavin Shan
On Fri, Mar 15, 2013 at 01:29:00PM -0600, Alex Williamson wrote: >On Fri, 2013-03-15 at 15:26 +0800, Gavin Shan wrote: >> The address (domain/bus/slot/function) of the passed PCI device >> looks quite different from perspective of host and guest. Some >> architectures like PPC need to setup the map

Re: [PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-15 Thread Alex Williamson
On Fri, 2013-03-15 at 15:26 +0800, Gavin Shan wrote: > The address (domain/bus/slot/function) of the passed PCI device > looks quite different from perspective of host and guest. Some > architectures like PPC need to setup the mapping in host. The patch > introduces additional VFIO device IOCTL com

[PATCH 2/3] VFIO: VFIO_DEVICE_SET_ADDR_MAPPING command

2013-03-15 Thread Gavin Shan
The address (domain/bus/slot/function) of the passed PCI device looks quite different from perspective of host and guest. Some architectures like PPC need to setup the mapping in host. The patch introduces additional VFIO device IOCTL command to address that. Signed-off-by: Gavin Shan --- includ