Re: [PATCHv6 28/30] x86/tdx: ioapic: Add shared bit for IOAPIC base address

From: Thomas Gleixner
Date: Thu Mar 17 2022 - 11:00:13 EST


On Wed, Mar 16 2022 at 05:08, Kirill A. Shutemov wrote:
> Introduce a special fixmap helper just for the IOAPIC code. Ensure
> that it marks IOAPIC pages as "shared". This replaces
> set_fixmap_nocache() with __set_fixmap() since __set_fixmap()
> allows custom 'prot' values.
>
> AMD SEV gets IOAPIC pages shared because FIXMAP_PAGE_NOCACHE has _ENC
> bit clear. TDX has to set bit to share the page with the host.
>
> Signed-off-by: Isaku Yamahata <isaku.yamahata@xxxxxxxxx>
> Reviewed-by: Andi Kleen <ak@xxxxxxxxxxxxxxx>
> Reviewed-by: Tony Luck <tony.luck@xxxxxxxxx>
> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

Reviewed-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>