[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b143e333-0add-8042-12de-7e9e8b275ec0@linux.ibm.com>
Date: Tue, 12 Apr 2022 09:14:36 -0400
From: Matthew Rosato <mjrosato@...ux.ibm.com>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: linux-s390@...r.kernel.org, alex.williamson@...hat.com,
cohuck@...hat.com, schnelle@...ux.ibm.com, farman@...ux.ibm.com,
pmorel@...ux.ibm.com, borntraeger@...ux.ibm.com, hca@...ux.ibm.com,
gor@...ux.ibm.com, gerald.schaefer@...ux.ibm.com,
agordeev@...ux.ibm.com, svens@...ux.ibm.com, frankja@...ux.ibm.com,
david@...hat.com, imbrenda@...ux.ibm.com, vneethv@...ux.ibm.com,
oberpar@...ux.ibm.com, freude@...ux.ibm.com, thuth@...hat.com,
pasic@...ux.ibm.com, pbonzini@...hat.com, corbet@....net,
kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-doc@...r.kernel.org
Subject: Re: [PATCH v5 15/21] KVM: s390: pci: add routines to start/stop
interpretive execution
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 *)
Powered by blists - more mailing lists