HV: CAT: support config CAT from acrn_vm_config

When CAT is supported, UOS can setup acrn_vm_config.clos, to use CAT
feature. Eg.,

struct acrn_vm_config vm_configs[CONFIG_MAX_VM_NUM] = {
    {
        .guest_flags |= CLOS_REQUIRED,
        .clos = 1,
    },
};

sanitize_vm_config() will check if CAT is supported and
vm_configs.clos is valid.

Tracked-On: #2462
Signed-off-by: Tao Yuhong <yuhong.tao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
yuhong.tao@intel.com
2019-01-30 19:08:19 +08:00
committed by Eddie Dong
parent 43ee5590a4
commit 3b2784ec1b
7 changed files with 48 additions and 0 deletions

View File

@@ -19,6 +19,7 @@ struct cat_hw_info {
};
extern struct cat_hw_info cat_cap_info;
void setup_clos(uint16_t pcpu_id);
#define CAT_RESID_L3 1U
#define CAT_RESID_L2 2U

View File

@@ -209,6 +209,7 @@ struct acrn_vm_config {
bool vm_vuart;
#endif
uint16_t clos; /* if guest_flags has CAT_ENABLED, then VM use this CLOS */
} __aligned(8);
/*