Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1496617

Re: [Xen-devel] [PATCH] xen/x86: Update topology map for PV VCPUs

From "Jan Beulich" <JBeulich@suse.com>
Newsgroups linux.kernel
Subject Re: [Xen-devel] [PATCH] xen/x86: Update topology map for PV VCPUs
Date 2016-10-06 14:20 +0200
Message-ID <spfOx-8rx-9@gated-at.bofh.it> (permalink)
References <soY1j-43r-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


>>> On 05.10.16 at 19:09, <boris.ostrovsky@oracle.com> wrote:
> Early during boot topology_update_package_map() computes
> logical_pkg_ids for all present processors.
> 
> Later, when processors are brought up, identify_cpu() updates
> these values based on phys_pkg_id which is a function of
> initial_apicid. On PV guests the latter may point to a
> non-existing node, causing logical_pkg_ids to be set to -1.
> 
> Intel's RAPL uses logical_pkg_id (as topology_logical_package_id())
> to index its arrays and therefore in this case will point to index
> 65535 (since logical_pkg_id is a u16). This could lead to either a
> crash or may actually access random memory location.

Another clear indication that such fields should never be touched
(and hence consumers either be fixed or disabled) when running as
PV guest under Xen.

Jan

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] xen/x86: Update topology map for PV VCPUs Boris Ostrovsky <boris.ostrovsky@oracle.com> - 2016-10-05 19:20 +0200
  Re: [PATCH] xen/x86: Update topology map for PV VCPUs Andrew Cooper <andrew.cooper3@citrix.com> - 2016-10-05 19:50 +0200
  Re: [Xen-devel] [PATCH] xen/x86: Update topology map for PV  VCPUs "Jan Beulich" <JBeulich@suse.com> - 2016-10-06 14:20 +0200
  Re: [Xen-devel] [PATCH] xen/x86: Update topology map for PV VCPUs David Vrabel <david.vrabel@citrix.com> - 2016-10-06 16:20 +0200

csiph-web