On Mon, Oct 27, 2025 at 03:26:15PM +0100, Eric Auger wrote: > On 10/17/25 1:19 AM, Nicolin Chen wrote: > > On Mon, Sep 29, 2025 at 02:36:35PM +0100, Shameer Kolothum wrote: > >> When the guest reboots with devices in nested mode (S1 + S2), any QEMU/UEFI > >> access to those devices can fail because S1 translation is not valid during > >> the reboot. For example, a passthrough NVMe device may hold GRUB boot info > >> that UEFI tries to read during the reboot. > >> > >> Set S1 to bypass mode during reset to avoid such failures. > > GBPA is set to bypass on reset so I think it's fine. Yet, maybe the > > code should check that. > shouldn't we check its actual value before setting bypass?
Yes, you are right. GBPA can be changed by the guest. So: "maybe" -> "should" > By the way the spec says is ABORT is set to 0x0: > "Do not abort incoming transactions. Transactions bypass the SMMU with > attributes given by other fields in this register." > > Wondering about those attributes and they can apply on the host? Not at this moment. vSTE only carries: * @ste: The first two double words of the user space Stream Table Entry for * the translation. Must be little-endian. * Allowed fields: (Refer to "5.2 Stream Table Entry" in SMMUv3 HW Spec) * - word-0: V, Cfg, S1Fmt, S1ContextPtr, S1CDMax * - word-1: EATS, S1DSS, S1CIR, S1COR, S1CSH, S1STALLD So, kernel needs to expand the word-1 to support those GBPA fields. I will send a kernel patch this week. Thanks Nicolin
