hv: add a flag for PMU passthrough to guest VM

Add a flag: GUEST_FLAG_PMU_PASSTHROUGH to indicate if
PMU (Performance Monitor Unit) is passthrough to guest VM.

Tracked-On: #6966
Acked-by: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
This commit is contained in:
Minggui Cao
2021-12-13 14:01:51 +08:00
committed by acrnsi-robot
parent 3b1deda0eb
commit 299c56bb68
4 changed files with 15 additions and 1 deletions

View File

@@ -61,6 +61,8 @@
#define GUEST_FLAG_STATIC_VM (1UL << 8U) /* Whether this VM uses static VM configuration */
#define GUEST_FLAG_TEE (1UL << 9U) /* Whether the VM is TEE VM */
#define GUEST_FLAG_REE (1UL << 10U) /* Whether the VM is REE VM */
#define GUEST_FLAG_PMU_PASSTHROUGH (1UL << 11U) /* Whether PMU is passed through */
/* TODO: We may need to get this addr from guest ACPI instead of hardcode here */
#define VIRTUAL_SLEEP_CTL_ADDR 0x400U /* Pre-launched VM uses ACPI reduced HW mode and sleep control register */