From: Alex Williamson <alex.williamson@redhat.com>
To: Grzegorz Jaszczyk <jaz@semihalf.com>
Cc: linux-kernel@vger.kernel.org, dmy@semihalf.com, tn@semihalf.com,
dbehr@google.com, dbehr@chromium.org, upstream@semihalf.com,
dtor@google.com, jgg@ziepe.ca, kevin.tian@intel.com,
cohuck@redhat.com, abhsahu@nvidia.com, yishaih@nvidia.com,
yi.l.liu@intel.com, kvm@vger.kernel.org, libvir-list@redhat.com,
pmorel@linux.ibm.com, borntraeger@linux.ibm.com,
mjrosato@linux.ibm.com
Subject: Re: [PATCH v4] vfio/pci: Propagate ACPI notifications to user-space via eventfd
Date: Wed, 7 Jun 2023 16:26:55 -0600 [thread overview]
Message-ID: <20230607162655.103e067d.alex.williamson@redhat.com> (raw)
In-Reply-To: <CAH76GKNtCSdBOgTY2GLg2k2EOJCLYu8FUE66YNUbJMDAkze8-w@mail.gmail.com>
On Wed, 7 Jun 2023 22:22:12 +0200
Grzegorz Jaszczyk <jaz@semihalf.com> wrote:
> > >
> > > Can we drop the NTFY and just use VFIO_PCI_ACPI_IRQ_INDEX?
> >
> > ACPI_IRQ at first glance could be confused with SCI, which is e.g.
> > registered as "acpi" irq seen in /proc/interrupts, maybe it is worth
> > keeping NTFY here to emphasise the "Notify" part?
>
> Please let me know if you prefer VFIO_PCI_ACPI_IRQ_INDEX or
> VFIO_PCI_ACPI_NTFY_IRQ_INDEX taking into account the above.
This is a device level ACPI interrupt, so it doesn't seem like it would
be confused with SCI. What other ACPI related interrupts would a
device have? I'm still partial to dropping the NTFY but if you're
attached to it, let's not abbreviate it, make it NOTIFY and do the same
for function names.
...
> > > > + } else if (flags & VFIO_IRQ_SET_DATA_BOOL) {
> > > > + u32 notification_val;
> > > > +
> > > > + if (!count)
> > > > + return -EINVAL;
> > > > +
> > > > + notification_val = *(u32 *)data;
> > >
> > > DATA_BOOL is defined as a u8, and of course also as a bool, so we
> > > expect only zero/non-zero. I think a valid interpretation would be any
> > > non-zero value generates a device check notification value.
> >
> > Maybe it would be helpful and ease testing if we could use u8 as a
> > notification value placeholder so it would be more flexible?
> > Notification values from 0x80 to 0xBF are device-specific, 0xC0 and
> > above are reserved for definition by hardware vendors for hardware
> > specific notifications and BTW in practice I didn't see notification
> > values that do not fit in u8 but even if exist we can limit to u8 and
> > gain some flexibility anyway. Please let me know what you think.
>
> Does the above seem ok for you?
The data type is only a u8 for practicality, it's still labeled as a
bool which suggests it's interpreted as either zero or non-zero. We
also need to reconcile DATA_NONE, which should trigger the interrupt,
but with an implicit notification value. I see the utility in what
you're proposing, but it logically implies an extension of the SET_IRQS
ioctl for a new data type which has hardly any practical value. Thanks,
Alex
next prev parent reply other threads:[~2023-06-07 22:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-22 16:58 Grzegorz Jaszczyk
2023-05-25 20:40 ` Alex Williamson
2023-05-31 15:34 ` Grzegorz Jaszczyk
2023-06-07 20:22 ` Grzegorz Jaszczyk
2023-06-07 22:26 ` Alex Williamson [this message]
2023-06-09 12:32 ` Grzegorz Jaszczyk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230607162655.103e067d.alex.williamson@redhat.com \
--to=alex.williamson@redhat.com \
--cc=abhsahu@nvidia.com \
--cc=borntraeger@linux.ibm.com \
--cc=cohuck@redhat.com \
--cc=dbehr@chromium.org \
--cc=dbehr@google.com \
--cc=dmy@semihalf.com \
--cc=dtor@google.com \
--cc=jaz@semihalf.com \
--cc=jgg@ziepe.ca \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=libvir-list@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjrosato@linux.ibm.com \
--cc=pmorel@linux.ibm.com \
--cc=tn@semihalf.com \
--cc=upstream@semihalf.com \
--cc=yi.l.liu@intel.com \
--cc=yishaih@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®