[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v5 9/9] xen/x86: setup PVHv2 Dom0 ACPI tables
>>> On 08.02.17 at 16:10, <roger.pau@xxxxxxxxxx> wrote: > On Thu, Jan 26, 2017 at 07:16:32AM -0700, Jan Beulich wrote: >> >>> On 19.01.17 at 18:29, <roger.pau@xxxxxxxxxx> wrote: >> > + /* >> > + * The APIC ID field of the local APIC struct is only 1byte, so we >> > need >> > + * to limit the number of local APIC entries to 128 because we only >> > use >> > + * even numbers as APIC IDs. >> > + */ >> > + size += sizeof(*local_apic) * >> > + min(max_vcpus, 1U << (sizeof(local_apic->id) * 8)); >> >> This caps at 256 now. Perhaps it would anyway be better to use >> HVM_MAX_VCPUS here, or maybe the minimum of both? > > max_vcpus is already capped to HVM_MAX_VCPUS. Is it? I see a use of that symbol only in mk_dsdt.c. > IMHO it's not right to use > HVM_MAX_VCPUS because we will increase it at some point, and then we would add > more local APIC entries that possible thus overflowing the id field. Hence the "or maybe the minimum of both". >> Plus, when you cap LAPIC entries, you should also provide x2APIC >> ones (to be able to represent all vCPU-s). > > Would it make sense to then provide x2APIC entries regardless of whether they > are present on the native tables or not? > > The emulated APIC provided by Xen supports x2APIC mode anyway. Yes, I think so. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |