On 31/07/2023 2:47 pm, Arjan van de Ven wrote: > On 7/30/2023 9:05 PM, Michael Kelley (LINUX) wrote: >> Does anyone have suggestions on a different way to handle >> this that's better than the above diff? Other thoughts? > > how badly do you need xapic ? Meaning, can x2apic just be used instead > always x2APIC under virt is a problem if you don't want to fully emulate an IOMMU just for int-remapping purposes. You don't know a-priori whether a particular guest kernel knows about e.g. the rsvd bit trick in IO-APIC RTEs to allow a 32k destination id. The only generally compatible way is to start in xAPIC mode, leave all the enumeration hints around which say "really really please switch into x2APIC mode", and hope the kernel does. ~Andrew