[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/2] x86: Don't use BAD_APICID for non-APICID fields



On 03/24/2015 04:07 AM, Jan Beulich wrote:
On 23.03.15 at 20:54, <boris.ostrovsky@xxxxxxxxxx> wrote:
BAD_APICID is used by cpuinfo_x86's phys_proc_id, cpu_core_id
and compute_unit_id even though these fields don't hold an APIC ID
itself but rather its derivative.

Provide appropriate macros for each of those three (and make them
unsigned).

This also fixes regression introduced by commit 2090f14c5cbd ("sysctl:
make XEN_SYSCTL_topologyinfo sysctl a little more efficient") which
leaked BAD_APICID into common code, breaking ARM.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>
Reported-by: Julien Grall <julien.grall@xxxxxxxxxx>
---

I left sysctl with

     cputopo.core = cpu_to_core(i);
     if ( cputopo.core == INVALID_COREID )
         cputopo.core = XEN_INVALID_CORE_ID;
     cputopo.socket = cpu_to_socket(i);
     if ( cputopo.socket == INVALID_SOCKETID )
         cputopo.socket = XEN_INVALID_SOCKET_ID;

since this is the only place that would use suggested inlines for external
(public) calls.
But again - why did you not avoid the new #defines and use the
XEN_-prefixed ones right away?

I did want to use XEN_* macros but then I realized that I need a new #define for cpuinfo_x86.compute_unit_id as well. This #define does not need to be public so for consistency I thought that having hypervisor-internal INVALID_* macros would be better.


-boris


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.