Re: [PATCH kernel 8/9] RFC: PCI: Avoid needless touching of Command register

dan.j.williams
2026-02-26T00:34:18Z

Alexey Kardashevskiy wrote:
> Once locked, a TDI's MSE and BME are not allowed to be cleared.
>
> Skip INTx test as TEE-capable PCI functions are most likely IOV VFs
> anyway and those do not support INTx at all.
>
> Add a quirk preventing the probing code from disabling MSE when
> updating 64bit BAR (which cannot be done atomically).
>
> Note that normally this happens too early and likely not really
> needed for the device attestation happening long after PCI probing.
>
> Signed-off-by: Alexey Kardashevskiy <aik@amd.com>
> ---
>
> This is also handled in QEMU - it will block clearing BME and MSE
> (normally happening on modprobe/rmmod) as long as the TDI is
> CONFIG_LOCKED or RUN.
>
> This only patch is not enough but reduces the number of unwanted
> writes to MSE/BME.
>
> Also, SRIOV cannot have INTx so pci_intx_mask_broken() could skip
> VFs too, should it?

Locked command register management is handled by QEMU. This patch needs
quite a bit more explanation about what use case it is trying to solve.