Re: [PATCH v9 17/18] virt: acrn: Introduce an interface for Service VM to control vCPU

From: Shuo A Liu
Date: Wed Mar 03 2021 - 20:38:23 EST


On Wed 3.Mar'21 at 18:37:19 +0100, Borislav Petkov wrote:
On Sun, Feb 07, 2021 at 11:10:39AM +0800, shuo.a.liu@xxxxxxxxx wrote:
From: Shuo Liu <shuo.a.liu@xxxxxxxxx>

ACRN supports partition mode to achieve real-time requirements. In
partition mode, a CPU core can be dedicated to a vCPU of User VM. The
local APIC of the dedicated CPU core can be passthrough to the User VM.
The Service VM controls the assignment of the CPU cores.

Introduce an interface for the Service VM to remove the control of CPU
core from hypervisor perspective so that the CPU core can be a dedicated
CPU core of User VM.

Signed-off-by: Shuo Liu <shuo.a.liu@xxxxxxxxx>
Reviewed-by: Zhi Wang <zhi.a.wang@xxxxxxxxx>
Reviewed-by: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Cc: Zhi Wang <zhi.a.wang@xxxxxxxxx>
Cc: Zhenyu Wang <zhenyuw@xxxxxxxxxxxxxxx>
Cc: Yu Wang <yu1.wang@xxxxxxxxx>
Cc: Reinette Chatre <reinette.chatre@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
drivers/virt/acrn/hsm.c | 48 +++++++++++++++++++++++++++++++++++
drivers/virt/acrn/hypercall.h | 14 ++++++++++
2 files changed, 62 insertions(+)

This one causes:

drivers/virt/acrn/hsm.c: In function ‘remove_cpu_store’:
drivers/virt/acrn/hsm.c:389:3: error: implicit declaration of function ‘remove_cpu’; did you mean ‘register_cpu’? [-Werror=implicit-function-declaration]
remove_cpu(cpu);
^~~~~~~~~~
register_cpu
drivers/virt/acrn/hsm.c:402:2: error: implicit declaration of function ‘add_cpu’; did you mean ‘task_cpu’? [-Werror=implicit-function-declaration]
add_cpu(cpu);
^~~~~~~
task_cpu
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:271: drivers/virt/acrn/hsm.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[2]: *** [scripts/Makefile.build:514: drivers/virt/acrn] Error 2
make[1]: *** [scripts/Makefile.build:514: drivers/virt] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1849: drivers] Error 2

This patchset could fix it.
https://lore.kernel.org/lkml/20210221134339.57851-1-shuo.a.liu@xxxxxxxxx/.

Thanks
shuo