mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 23:57:10 +00:00
HV:treewide:rename vcpu data structure
For data structure types "struct vcpu", its name is identical with variable name in the same scope. This is a MISRA C violation. Naming convention rule:If the data structure type is used by multi modules, its corresponding logic resource is exposed to external components (such as SOS, UOS), and its name meaning is simplistic (such as vcpu, vm), its name needs prefix "acrn_". The following udpates are made: struct vcpu *vcpu-->struct acrn_vcpu *vcpu Tracked-On: #861 Signed-off-by: Xiangyang Wu <xiangyang.wu@linux.intel.com>
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
*/
|
||||
#define NR_VMX_EXIT_REASONS 65U
|
||||
|
||||
static int unhandled_vmexit_handler(struct vcpu *vcpu);
|
||||
static int xsetbv_vmexit_handler(struct vcpu *vcpu);
|
||||
static int unhandled_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
static int xsetbv_vmexit_handler(struct acrn_vcpu *vcpu);
|
||||
|
||||
/* VM Dispatch table for Exit condition handling */
|
||||
static const struct vm_exit_dispatch dispatch_table[NR_VMX_EXIT_REASONS] = {
|
||||
@@ -151,7 +151,7 @@ static const struct vm_exit_dispatch dispatch_table[NR_VMX_EXIT_REASONS] = {
|
||||
.handler = unhandled_vmexit_handler}
|
||||
};
|
||||
|
||||
int vmexit_handler(struct vcpu *vcpu)
|
||||
int vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
struct vm_exit_dispatch *dispatch = NULL;
|
||||
uint16_t basic_exit_reason;
|
||||
@@ -227,7 +227,7 @@ int vmexit_handler(struct vcpu *vcpu)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int unhandled_vmexit_handler(struct vcpu *vcpu)
|
||||
static int unhandled_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
pr_fatal("Error: Unhandled VM exit condition from guest at 0x%016llx ",
|
||||
exec_vmread(VMX_GUEST_RIP));
|
||||
@@ -242,7 +242,7 @@ static int unhandled_vmexit_handler(struct vcpu *vcpu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cpuid_vmexit_handler(struct vcpu *vcpu)
|
||||
int cpuid_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
uint64_t rax, rbx, rcx, rdx;
|
||||
|
||||
@@ -262,7 +262,7 @@ int cpuid_vmexit_handler(struct vcpu *vcpu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int cr_access_vmexit_handler(struct vcpu *vcpu)
|
||||
int cr_access_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
uint64_t reg;
|
||||
uint32_t idx;
|
||||
@@ -317,7 +317,7 @@ int cr_access_vmexit_handler(struct vcpu *vcpu)
|
||||
* XSETBV instruction set's the XCR0 that is used to tell for which
|
||||
* components states can be saved on a context switch using xsave.
|
||||
*/
|
||||
static int xsetbv_vmexit_handler(struct vcpu *vcpu)
|
||||
static int xsetbv_vmexit_handler(struct acrn_vcpu *vcpu)
|
||||
{
|
||||
int idx;
|
||||
uint64_t val64;
|
||||
|
||||
Reference in New Issue
Block a user