Re: [PATCH v2] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-22 Thread Roger Pau Monné
On Wed, Nov 22, 2023 at 03:11:52PM +, Alejandro Vallejo wrote: > On Wed, Nov 22, 2023 at 02:40:02PM +0100, Roger Pau Monné wrote: > > On Tue, Nov 21, 2023 at 04:26:04PM +, Alejandro Vallejo wrote: > > > diff --git a/xen/arch/x86/hvm/vlapic.c b/xen/arch/x86/hvm/vlapic.c > > > index a8e87c444

Re: [PATCH v2] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-22 Thread Alejandro Vallejo
On Wed, Nov 22, 2023 at 02:40:02PM +0100, Roger Pau Monné wrote: > On Tue, Nov 21, 2023 at 04:26:04PM +, Alejandro Vallejo wrote: > > Both Intel and AMD manuals agree that on x2APIC mode, the APIC LDR and ID > > registers are derivable from each other through a fixed formula. > > > > Xen uses

Re: [PATCH v2] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-22 Thread Roger Pau Monné
On Tue, Nov 21, 2023 at 04:26:04PM +, Alejandro Vallejo wrote: > Both Intel and AMD manuals agree that on x2APIC mode, the APIC LDR and ID > registers are derivable from each other through a fixed formula. > > Xen uses that formula, but applies it to vCPU IDs (which are sequential) > rather th

Re: [PATCH v2] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-21 Thread Alejandro Vallejo
On Tue, Nov 21, 2023 at 04:26:04PM +, Alejandro Vallejo wrote: > Both Intel and AMD manuals agree that on x2APIC mode, the APIC LDR and ID > registers are derivable from each other through a fixed formula. > > Xen uses that formula, but applies it to vCPU IDs (which are sequential) > rather th

[PATCH v2] xen/x86: On x2APIC mode, derive LDR from APIC_ID

2023-11-21 Thread Alejandro Vallejo
Both Intel and AMD manuals agree that on x2APIC mode, the APIC LDR and ID registers are derivable from each other through a fixed formula. Xen uses that formula, but applies it to vCPU IDs (which are sequential) rather than x2APIC_IDs (which are not, at the moment). As I understand it, this is an