On 26/09/2018 13:45, Joerg Roedel wrote: > On Wed, Sep 26, 2018 at 11:20:34AM +0100, Jean-Philippe Brucker wrote: >> Yes, at the moment it's difficult to guess what device drivers will >> want, but I can imagine some driver offering SVA to userspace, while >> keeping a few PASIDs for themselves to map kernel memory. Or create mdev >> devices for virtualization while also allowing bare-metal SVA. So I >> think we should aim at enabling these use-cases in parallel, even if it >> doesn't necessarily need to be possible right now. > > Yeah okay, but allowing these use-cases in parallel basically disallows > giving any guest control over a device's pasid-table, no? All of these use-cases require the host to manage the PASID tables, so while any one of them is enabled, we can't give a guest control over the PASID tables. But allowing these use-cases in parallel doesn't change that. There is an ambiguity: I understand "(3) SVA in VM guest" as SVA for a device-assignable interface assigned to a guest, using vfio-mdev and the new Intel vt-d architecture (right?). That case does require the host to allocate and manage PASIDs (because the PCI device is shared between multiple VMs). For the "classic" vfio-pci case, "SVA in guest" still means giving the guest control over the whole PASID table. Thanks, Jean