On Tue, Nov 17, 2026 at 11:40:27AM +0000, Peter Maydell wrote: > On Thu, 5 Nov 2026 at 10:58, Peter Maydell <[email protected]> wrote: > > > > The amd_iommu handling of the "large PTE page size" (where Next Level > > bits are 0b111) case is not correct. We calculate the page size > > using the address in the descriptor (as per table 14 of the spec), > > but we don't explicitly pick out the Page Address field, instead > > passing the whole PTE word to cto64(). This means that a PTE which > > incorrectly sets all the reserved high bits can cause cto64() to > > return 63 or 64, and we will try to shift by an out of range amount, > > which is undefined behaviour. > > > > Mask the PTE with AMDVI_DEV_PT_ROOT_MASK to get the page address > > (matching how we do it to get the address for the next page table > > level in NEXT_PTE_ADDR). > > > > Cc: [email protected] > > Resolves: https://gitlab.com/qemu-project/qemu/-/work_items/3618 > > Reported-by: huntr bubble <https://gitlab.com/bubblehuntr> > > Signed-off-by: Peter Maydell <[email protected]> > > --- > > As this is a small fix that's been reviewed and not yet picked > up, I'll take it through target-arm.next. I have a small set > of "oops I forgot about that" patches that I'm planning to > send today. > > thanks > -- PMM
yea have a small set too. Sure, take this. Acked-by: Michael S. Tsirkin <[email protected]>
