Re: [PATCH 5/6] xen/x86: Derive topologically correct x2APIC IDs from the policy

2024-05-02 Thread Alejandro Vallejo
On 02/05/2024 07:57, Jan Beulich wrote: > On 02.05.2024 08:55, Jan Beulich wrote: >> On 01.05.2024 18:35, Alejandro Vallejo wrote: >>> Hi, >>> >>> On 26/03/2024 16:41, Jan Beulich wrote: On 09.01.2024 16:38, Alejandro Vallejo wrote: > --- a/xen/lib/x86/policy.c > +++ b/xen/lib/x86/poli

Re: [PATCH 5/6] xen/x86: Derive topologically correct x2APIC IDs from the policy

2024-05-01 Thread Jan Beulich
On 02.05.2024 08:55, Jan Beulich wrote: > On 01.05.2024 18:35, Alejandro Vallejo wrote: >> Hi, >> >> On 26/03/2024 16:41, Jan Beulich wrote: >>> On 09.01.2024 16:38, Alejandro Vallejo wrote: --- a/xen/lib/x86/policy.c +++ b/xen/lib/x86/policy.c @@ -2,15 +2,78 @@ #include

Re: [PATCH 5/6] xen/x86: Derive topologically correct x2APIC IDs from the policy

2024-05-01 Thread Jan Beulich
On 01.05.2024 18:35, Alejandro Vallejo wrote: > Hi, > > On 26/03/2024 16:41, Jan Beulich wrote: >> On 09.01.2024 16:38, Alejandro Vallejo wrote: >>> --- a/xen/lib/x86/policy.c >>> +++ b/xen/lib/x86/policy.c >>> @@ -2,15 +2,78 @@ >>> >>> #include >>> >>> -uint32_t x86_x2apic_id_from_vcpu_id(c

Re: [PATCH 5/6] xen/x86: Derive topologically correct x2APIC IDs from the policy

2024-05-01 Thread Alejandro Vallejo
Hi, On 26/03/2024 16:41, Jan Beulich wrote: > On 09.01.2024 16:38, Alejandro Vallejo wrote: >> --- a/xen/lib/x86/policy.c >> +++ b/xen/lib/x86/policy.c >> @@ -2,15 +2,78 @@ >> >> #include >> >> -uint32_t x86_x2apic_id_from_vcpu_id(const struct cpu_policy *p, uint32_t >> vcpu_id) >> +static

Re: [PATCH 5/6] xen/x86: Derive topologically correct x2APIC IDs from the policy

2024-05-01 Thread Alejandro Vallejo
Hi, Ack and sure to everything on types, constness and variable names. On 20/03/2024 10:15, Roger Pau Monné wrote: >> +const char *name; >> +uint32_t vcpu_id; >> +uint32_t x2apic_id; >> +struct cpu_policy policy; >> +} tests[] = { >> +{ >> +

Re: [PATCH 5/6] xen/x86: Derive topologically correct x2APIC IDs from the policy

2024-03-26 Thread Jan Beulich
On 09.01.2024 16:38, Alejandro Vallejo wrote: > --- a/xen/lib/x86/policy.c > +++ b/xen/lib/x86/policy.c > @@ -2,15 +2,78 @@ > > #include > > -uint32_t x86_x2apic_id_from_vcpu_id(const struct cpu_policy *p, uint32_t > vcpu_id) > +static uint32_t parts_per_higher_scoped_level(const struct cpu_

Re: [PATCH 5/6] xen/x86: Derive topologically correct x2APIC IDs from the policy

2024-03-20 Thread Roger Pau Monné
On Tue, Jan 09, 2024 at 03:38:33PM +, Alejandro Vallejo wrote: > Implements the helper for mapping vcpu_id to x2apic_id given a valid > topology in a policy. The algo is written with the intention of extending > it to leaves 0x1f and e26 in the future. > > Toolstack doesn't set leaf 0xb and th

[PATCH 5/6] xen/x86: Derive topologically correct x2APIC IDs from the policy

2024-01-09 Thread Alejandro Vallejo
Implements the helper for mapping vcpu_id to x2apic_id given a valid topology in a policy. The algo is written with the intention of extending it to leaves 0x1f and e26 in the future. Toolstack doesn't set leaf 0xb and the HVM default policy has it cleared, so the leaf is not implemented. In that