Skip to content

Commit

Permalink
indent
Browse files Browse the repository at this point in the history
  • Loading branch information
lxylxy123456 committed Oct 20, 2022
1 parent a8ce638 commit 3194343
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -795,11 +795,10 @@ void xmhf_nested_arch_x86vmx_handle_vmclear(VCPU * vcpu, struct regs *r)
#ifdef VMX_NESTED_USE_SHADOW_VMCS
/* Read VMCS12 values from the shadow VMCS */
if (_vmx_hasctl_vmcs_shadowing(&vcpu->vmx_caps)) {
struct nested_vmcs12 *vmcs12 = &vmcs12_info->vmcs12_value;
HALT_ON_ERRORCOND(__vmx_vmptrld
(vmcs12_info->vmcs12_shadow_ptr));
xmhf_nested_arch_x86vmx_vmcs_read_all(vcpu,
&vmcs12_info->
vmcs12_value);
xmhf_nested_arch_x86vmx_vmcs_read_all(vcpu, vmcs12);
HALT_ON_ERRORCOND(__vmx_vmptrld
(hva2spa((void *)vcpu->vmx_vmcs_vaddr)));
}
Expand Down Expand Up @@ -929,11 +928,11 @@ void xmhf_nested_arch_x86vmx_handle_vmptrld(VCPU * vcpu, struct regs *r)
#ifdef VMX_NESTED_USE_SHADOW_VMCS
/* Write VMCS12 values to the shadow VMCS */
if (_vmx_hasctl_vmcs_shadowing(&vcpu->vmx_caps)) {
struct nested_vmcs12 *vmcs12 =
&vmcs12_info->vmcs12_value;
HALT_ON_ERRORCOND(__vmx_vmptrld
(vmcs12_info->vmcs12_shadow_ptr));
xmhf_nested_arch_x86vmx_vmcs_write_all(vcpu,
&vmcs12_info->
vmcs12_value);
xmhf_nested_arch_x86vmx_vmcs_write_all(vcpu, vmcs12);
HALT_ON_ERRORCOND(__vmx_vmptrld
(hva2spa
((void *)vcpu->vmx_vmcs_vaddr)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,11 @@ static bool _check_ia32_pat(u64 ia32_pat)
for (offset = 0; offset < 64; offset += 8) {
u8 pa = (u8) (ia32_pat >> offset);
switch (pa) {
case 0: /* fallthrough */
case 1: /* fallthrough */
case 4: /* fallthrough */
case 5: /* fallthrough */
case 6: /* fallthrough */
case 0: /* fallthrough */
case 1: /* fallthrough */
case 4: /* fallthrough */
case 5: /* fallthrough */
case 6: /* fallthrough */
case 7:
break;
default:
Expand Down Expand Up @@ -477,8 +477,7 @@ u32 xmhf_nested_arch_x86vmx_vmcs12_to_vmcs02(VCPU * vcpu,
return status;
}
guestmem_init(vcpu, &ctx_pair);
if (!xmhf_partition_arch_x86vmx_get_xmhf_msr(MSR_IA32_PAT,
&ia32_pat_index)) {
if (!xmhf_partition_arch_x86vmx_get_xmhf_msr(MSR_IA32_PAT, &ia32_pat_index)) {
HALT_ON_ERRORCOND(0 && "MSR_IA32_PAT not found");
}
if (!xmhf_partition_arch_x86vmx_get_xmhf_msr(MSR_EFER, &ia32_efer_index)) {
Expand Down Expand Up @@ -664,9 +663,10 @@ u32 xmhf_nested_arch_x86vmx_vmcs12_to_vmcs02(VCPU * vcpu,
/* XMHF never uses this feature. Instead, uses MSR load / save area */
guest_ia32_efer = vmcs12->guest_IA32_EFER;
/* Note: ideally should return VMENTRY error */
HALT_ON_ERRORCOND(_check_ia32_efer(
guest_ia32_efer, _vmx_hasctl_vmentry_ia_32e_mode_guest(&ctls),
vmcs12->guest_CR0 & CR0_PG));
HALT_ON_ERRORCOND(_check_ia32_efer
(guest_ia32_efer,
_vmx_hasctl_vmentry_ia_32e_mode_guest(&ctls),
vmcs12->guest_CR0 & CR0_PG));
} else {
/*
* When not loading IA32_EFER, IA32_EFER is changed as following:
Expand Down Expand Up @@ -718,9 +718,9 @@ u32 xmhf_nested_arch_x86vmx_vmcs12_to_vmcs02(VCPU * vcpu,
if (_vmx_hasctl_vmexit_load_ia32_efer(&ctls)) {
/* XMHF never uses this feature. Instead, uses MSR load / save area */
/* Note: ideally should return VMENTRY error */
HALT_ON_ERRORCOND(_check_ia32_efer(
vmcs12->host_IA32_EFER,
_vmx_hasctl_vmexit_host_address_space_size(&ctls), true));
HALT_ON_ERRORCOND(_check_ia32_efer(vmcs12->host_IA32_EFER,
_vmx_hasctl_vmexit_host_address_space_size
(&ctls), true));
}
if (_vmx_hasctl_vmexit_load_ia32_perf_global_ctrl(&ctls)) {
u32 eax, ebx, ecx, edx;
Expand Down Expand Up @@ -946,8 +946,7 @@ void xmhf_nested_arch_x86vmx_vmcs02_to_vmcs12(VCPU * vcpu,

HALT_ON_ERRORCOND(_vmcs12_get_ctls(vcpu, vmcs12, &ctls) == 0);
guestmem_init(vcpu, &ctx_pair);
if (!xmhf_partition_arch_x86vmx_get_xmhf_msr(MSR_IA32_PAT,
&ia32_pat_index)) {
if (!xmhf_partition_arch_x86vmx_get_xmhf_msr(MSR_IA32_PAT, &ia32_pat_index)) {
HALT_ON_ERRORCOND(0 && "MSR_IA32_PAT not found");
}
if (!xmhf_partition_arch_x86vmx_get_xmhf_msr(MSR_EFER, &ia32_efer_index)) {
Expand Down

0 comments on commit 3194343

Please sign in to comment.