[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] VMX: use a single, global APIC access page
On 11/02/2021 10:36, Jan Beulich wrote: > On 11.02.2021 09:45, Roger Pau Monné wrote: >> On Wed, Feb 10, 2021 at 05:48:26PM +0100, Jan Beulich wrote: >>> I did further consider not allocating any real page at all, but just >>> using the address of some unpopulated space (which would require >>> announcing this page as reserved to Dom0, so it wouldn't put any PCI >>> MMIO BARs there). But I thought this would be too controversial, because >>> of the possible risks associated with this. >> No, Xen is not capable of allocating a suitable unpopulated page IMO, >> so let's not go down that route. Wasting one RAM page seems perfectly >> fine to me. > Why would Xen not be able to, in principle? It may be difficult, > but there may also be pages we could declare we know we can use > for this purpose. There are frames we could use for this purpose, but their locations are platform specific (holes around TSEG). I'm also not sure about the implications of their use as a DMA target. > >>> static void vmx_install_vlapic_mapping(struct vcpu *v) >>> { >>> paddr_t virt_page_ma, apic_page_ma; >>> >>> - if ( mfn_eq(v->domain->arch.hvm.vmx.apic_access_mfn, _mfn(0)) ) >>> + if ( mfn_eq(apic_access_mfn, _mfn(0)) ) >> You should check if the domain has a vlapic I think, since now >> apic_access_mfn is global and will be set regardless of whether the >> domain has vlapic enabled or not. >> >> Previously apic_access_mfn was only allocated if the domain had vlapic >> enabled. > Oh, indeed - thanks for spotting. And also in domain_creation_finished(). Honestly - PVH without LAPIC was a short sighted move. Its a prohibited combination at the moment from XSA-256 and I don't see any value in lifting the restriction, considering that TPR acceleration has been around since practically the first generation of HVM support. ~Andrew
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |