lkml.org 
[lkml]   [2022]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 15/21] KVM: s390: pci: add routines to start/stop interpretive execution
On Tue, Apr 12, 2022 at 09:14:36AM -0400, Matthew Rosato wrote:
> On 4/8/22 8:47 AM, Jason Gunthorpe wrote:
> > On Mon, Apr 04, 2022 at 01:43:43PM -0400, Matthew Rosato wrote:
> > > +int kvm_s390_pci_register_kvm(struct device *dev, void *data)
> > > +{
> > > + struct zpci_dev *zdev = NULL;
> > > + struct kvm *kvm = data;
> > > +
> > > + /* Only proceed for zPCI devices, quietly ignore others */
> > > + if (dev_is_pci(dev))
> > > + zdev = to_zpci_dev(dev);
> > > + if (!zdev)
> > > + return 0;
> >
> > Especially since this only works if we have zpci device
> >
> > So having the zpci code hook the kvm notifier and then call the arch
> > code from the zpci area seems pretty OK
> >
> > Also why is a struct kvm * being passed as a void *?
>
> Only because the function is intended to be called via
> iommu_group_for_each_dev (next patch) which requires int (*fn)(struct device
> *, void *)

I think this further says this should be called from vfio on the
actual struct device that is assigned to the KVM, not try to deduce it
from the gorup..

Jason

\
 
 \ /
  Last update: 2022-04-12 15:31    [W:0.096 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site