Re: [PATCHv5 28/30] x86/tdx: ioapic: Add shared bit for IOAPIC base address
From: Dave Hansen
Date: Wed Mar 09 2022 - 15:39:42 EST
On 3/2/22 06:28, Kirill A. Shutemov wrote:
> +static void io_apic_set_fixmap_nocache(enum fixed_addresses idx,
> + phys_addr_t phys)
> +{
> + pgprot_t flags = FIXMAP_PAGE_NOCACHE;
> +
> + flags = pgprot_decrypted(flags);
> + __set_fixmap(idx, phys, flags);
> +}
This is only used by the "io_apic". No need to add the "_nocache". Maybe:
static void io_apic_set_fixmap(enum fixed_addresses idx, ...
{
pgprot_t flags = FIXMAP_PAGE_NOCACHE;
/*
* Ensure fixmaps for IOAPIC MMIO respect memory
* encryption pgprot bits, just like normal ioremap():
*/
flags = pgprot_decrypted(flags);
__set_fixmap(idx, phys, flags);
}