[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200413131008.2ae53cc3@w520.home>
Date: Mon, 13 Apr 2020 13:10:08 -0600
From: Alex Williamson <alex.williamson@...hat.com>
To: "Raj, Ashok" <ashok.raj@...el.com>
Cc: "Raj, Ashok" <ashok.raj@...ux.intel.com>,
"jean-philippe@...aro.org" <jean-philippe@...aro.org>,
"Tian, Kevin" <kevin.tian@...el.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"Tian, Jun J" <jun.j.tian@...el.com>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Sun, Yi Y" <yi.y.sun@...el.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"Wu, Hao" <hao.wu@...el.com>
Subject: Re: [PATCH v1 2/2] vfio/pci: Emulate PASID/PRI capability for VFs
On Sun, 12 Apr 2020 20:29:31 -0700
"Raj, Ashok" <ashok.raj@...el.com> wrote:
> Hi Alex
>
> Going through the PCIe Spec, there seems a lot of such capabilities
> that are different between PF and VF. Some that make sense
> and some don't.
>
>
> On Sun, Apr 12, 2020 at 08:10:43PM -0700, Raj, Ashok wrote:
> >
> > >
> > > I agree though, I don't know why the SIG would preclude implementing
> > > per VF control of these features. Thanks,
> > >
>
> For e.g.
>
> VF doesn't have I/O and Mem space enables, but has BME
VFs don't have I/O, so I/O enable is irrelevant. The memory enable bit
is emulated, so it doesn't really do anything from the VM perspective.
The hypervisor could provide more emulation around this, but it hasn't
proven necessary.
> Interrupt Status
VFs don't have INTx, so this is irrelevant.
> Correctable Error Reporting
> Almost all of Device Control Register.
Are we doing anything to virtualize these for VFs? I think we've
addressed access control to these for PFs, but I don't see that we try
to virtualize them for the VF.
> So it seems like there is a ton of them we have to deal with today for
> VF's. How do we manage to emulate them without any support for them
> in VF's?
The memory enable bit is just access to the MMIO space of the device,
the hypervisor could choose to do more, but currently emulating the bit
itself is sufficient. This doesn't really affect the device, just
access to the device. The device control registers, I don't think
we've had a need to virtualize them yet and I think we'd run into many
of the same questions. If your point is that there exists gaps in the
spec that make things difficult to virtualize, I won't argue with you
there. MPS is a nearby one that's difficult to virtualize on the PF
since its setting needs to take entire communication channels into
account.
So far though we aren't inventing new capabilities to add to VF config
space and pretending they work, we're just stumbling on what the VF
exposes whether on bare metal or in a VM. Thanks,
Alex
Powered by blists - more mailing lists