RE: [PATCH] vfio/pci: Propagate ACPI notifications to the user-space
From: Tian, Kevin
Date: Wed Mar 08 2023 - 03:11:29 EST
> From: Alex Williamson <alex.williamson@xxxxxxxxxx>
> Sent: Wednesday, March 8, 2023 7:42 AM
>
> On Tue, 7 Mar 2023 22:05:53 +0000
> Grzegorz Jaszczyk <jaz@xxxxxxxxxxxx> wrote:
>
> > From: Dominik Behr <dbehr@xxxxxxxxxxxx>
> >
> > Hitherto there was no support for propagating ACPI notifications to the
> > guest drivers. In order to provide such support, install a handler for
> > notifications on an ACPI device during vfio-pci device registration. The
> > handler role is to propagate such ACPI notifications to the user-space
> > via acpi netlink events, which allows VMM to receive and propagate them
> > further to the VMs.
> >
> > Thanks to the above, the actual driver for the pass-through device,
> > which belongs to the guest, can receive and react to device specific
> > notifications.
>
> What consumes these events? Has this been proposed to any VM
> management tools like libvirt? What sort of ACPI events are we
> expecting to see here and what does userspace do with them?
>
and the VM sees a virtual platform and virtual ACPI. Usually an ACPI
event triggers parsing-executing certain ACPI function which needs to
further access platform resource. Presumably someone should copy
the related ACPI function into virtual ACPI table and then in concept
we should allow an ACPI event routed to userspace only if the related
platform resource has been assigned to the user.
What would the mechanism to audit it? and if we have a way to do it
probably the ACPI event would be translated into a more generic
event mechanism in the vfio-platform driver covering related resource.