examples/power: fix core id with JSON commands
authorDavid Hunt <david.hunt@intel.com>
Mon, 7 Jan 2019 11:39:20 +0000 (11:39 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 15 Jan 2019 01:40:41 +0000 (02:40 +0100)
commitd38e6a6a454d177852bc16b4cb0622fd32852f48
treeb2b22cb2b1d52534dd8dd14c919f1be9dbfc26b7
parent6ff7b996a8a4cf12e0d54110bb2db4c87f72e9f4
examples/power: fix core id with JSON commands

This patch fixes a bug introduced in the 64-core limitation
enhancement where the core_id is inadvertently converted from
virtual to physical even though it may already be a physical
core_id.

We should be using the core_type field, and only converting via
hypervisor when core_type is set to CORE_TYPE_VIRTUAL

Fixes: 5776b7a371d1 ("examples/power: allow VM to use lcores over 63")

Signed-off-by: David Hunt <david.hunt@intel.com>
Reviewed-by: Lei Yao <lei.a.yao@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
examples/vm_power_manager/channel_monitor.c