mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
HV: setup px info when create vm
The vm px info would be used for guest Pstate control. Currently it is copied from host boot cpu. Signed-off-by: Victor Sun <victor.sun@intel.com> Acked-by: Kevin Tian <kevin.tian@intel.com>
This commit is contained in:
@@ -38,5 +38,6 @@ struct cpu_state_table {
|
||||
};
|
||||
|
||||
void load_cpu_state_data(void);
|
||||
void vm_setup_cpu_state(struct vm *vm);
|
||||
|
||||
#endif /* CPU_STATE_TBL_H */
|
||||
|
@@ -80,6 +80,11 @@ struct vm_sw_info {
|
||||
uint64_t req_buf;
|
||||
};
|
||||
|
||||
struct vm_pm_info {
|
||||
uint8_t px_cnt;
|
||||
struct cpu_px_data px_data[MAX_PSTATE];
|
||||
};
|
||||
|
||||
/* VM guest types */
|
||||
#define VM_LINUX_GUEST 0x02
|
||||
#define VM_MONO_GUEST 0x01
|
||||
@@ -152,6 +157,7 @@ struct vm {
|
||||
struct vm_attr attr; /* Reference to this VM's attributes */
|
||||
struct vm_hw_info hw; /* Reference to this VM's HW information */
|
||||
struct vm_sw_info sw; /* Reference to SW associated with this VM */
|
||||
struct vm_pm_info pm; /* Reference to this VM's arch information */
|
||||
struct vm_arch arch_vm; /* Reference to this VM's arch information */
|
||||
struct vm_state_info state_info;/* State info of this VM */
|
||||
enum vm_state state; /* VM state */
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#include <io.h>
|
||||
#include <vcpu.h>
|
||||
#include <trusty.h>
|
||||
#include <cpu_state_tbl.h>
|
||||
#include <vm.h>
|
||||
#include <cpuid.h>
|
||||
#include <mmu.h>
|
||||
|
Reference in New Issue
Block a user