lkml.org 
[lkml]   [2022]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 16/21] vfio-pci/zdev: add open/close device hooks
On Tue, Apr 26, 2022 at 04:08:37PM -0400, Matthew Rosato wrote:

> +static int vfio_pci_zdev_group_notifier(struct notifier_block *nb,
> + unsigned long action, void *data)
> +{
> + struct zpci_dev *zdev = container_of(nb, struct zpci_dev, nb);
> + int (*fn)(struct zpci_dev *zdev, struct kvm *kvm);
> + int rc = NOTIFY_OK;
> +
> + if (action == VFIO_GROUP_NOTIFY_SET_KVM) {
> + if (!zdev)
> + return NOTIFY_DONE;
> +
> + fn = symbol_get(kvm_s390_pci_register_kvm);
> + if (!fn)
> + return NOTIFY_DONE;
> +
> + if (fn(zdev, (struct kvm *)data))
> + rc = NOTIFY_BAD;
> +
> + symbol_put(kvm_s390_pci_register_kvm);

Is it possible this function can be in statically linked arch code?

Or, actually, is zPCI useful anyhow without kvm ie can you just have a
direct dependency here?

Jason

\
 
 \ /
  Last update: 2022-04-27 16:07    [W:0.178 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site