All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Alex Williamson <alex.williamson@redhat.com>,
	robin@streamhpc.com, mst@redhat.com, marcel.apfelbaum@gmail.com
Cc: qemu-devel@nongnu.org, clg@redhat.com
Subject: Re: [RFC PATCH v2 0/4] vfio/pci: Atomic Ops completer support
Date: Thu, 1 Jun 2023 00:31:38 +0200	[thread overview]
Message-ID: <f3fff871-3e7b-6ace-887d-a9b8adedc1c8@linaro.org> (raw)
In-Reply-To: <20230526231558.1660396-1-alex.williamson@redhat.com>

On 27/5/23 01:15, Alex Williamson wrote:
> This RFC proposes to allow a vfio-pci device to manipulate the PCI
> Express capability of an associated root port to enable Atomic Op
> completer support as equivalent to host capabilities.  This would
[...]

> While it's not exactly standard practice to modify root port device
> capabilities runtime, it also does not seem to be precluded by the PCIe
> Spec (6.0.1).  The Atomic Op completion bits of the DEVCAP2 register
> are defined as Read-only:
> 
> 7.4 Configuration Register Types
>   Read-only - Register bits are read-only and cannot be altered by software.
>               Where explicitly defined, these bits are used to reflect changing
>               hardware state, and as a result bit values can be observed to
>               change at run time. Register bit default values and bits that
>               cannot change value at run time, are permitted to be hard-coded,
>               initialized by system/device firmware, or initialized by hardware
>               mechanisms such as pin strapping or nonvolatile storage.
>               Initialization by system firmware is permitted only for system-
>               integrated devices. If the optional feature that would Set the
>               bits is not implemented, the bits must be hardwired to Zero.
> 
> Here "altered by software" is relative to guest writes to the config
> space register, whereas in this implementation we're acting as hardware
> and the bits are changing to reflect a change in runtime capabilities.
> The spec does include a HwInit register type which would restrict the
> value from changing at runtime outside of resets.  Therefore while it
> would not be advised to update these bits arbitrarily, it does seem safe
> and compatible with guest software to update the value on device attach
> and detach.

 From my previous (short) PCIe experience, this is also my understanding.


      parent reply	other threads:[~2023-05-31 22:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26 23:15 [RFC PATCH v2 0/4] vfio/pci: Atomic Ops completer support Alex Williamson
2023-05-26 23:15 ` [RFC PATCH v2 1/4] linux-headers: Update for vfio capability reporting AtomicOps Alex Williamson
2023-05-30 13:19   ` Cédric Le Goater
2023-05-26 23:15 ` [RFC PATCH v2 2/4] vfio: Implement a common device info helper Alex Williamson
2023-05-31 10:18   ` Robin Voetter
2023-05-26 23:15 ` [RFC PATCH v2 3/4] pcie: Add a PCIe capability version helper Alex Williamson
2023-05-30 12:30   ` Cédric Le Goater
2023-05-31 22:02   ` Robin Voetter
2023-05-31 22:19     ` Philippe Mathieu-Daudé
2023-05-26 23:15 ` [RFC PATCH v2 4/4] vfio/pci: Enable AtomicOps completers on root ports Alex Williamson
2023-05-30 13:36   ` Cédric Le Goater
2023-05-31 22:03   ` Robin Voetter
2023-05-31 22:28   ` Philippe Mathieu-Daudé
2023-05-31 21:55 ` [RFC PATCH v2 0/4] vfio/pci: Atomic Ops completer support Robin Voetter
2023-05-31 22:24   ` Alex Williamson
2023-05-31 22:29     ` Philippe Mathieu-Daudé
2023-06-02 14:02       ` Philippe Mathieu-Daudé
2023-06-01  8:15     ` Robin Voetter
2023-05-31 22:31 ` Philippe Mathieu-Daudé [this message]

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=f3fff871-3e7b-6ace-887d-a9b8adedc1c8@linaro.org \
    --to=philmd@linaro.org \
    --cc=alex.williamson@redhat.com \
    --cc=clg@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=robin@streamhpc.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.