Il 14/04/2013 12:44, Jan Kiszka ha scritto:
> + if (vmcs12->vm_entry_controls & VM_ENTRY_LOAD_IA32_EFER &&
> + (!kvm_valid_efer(vcpu, vmcs12->guest_ia32_efer) ||
> + !!(vmcs12->vm_entry_controls & VM_ENTRY_IA32E_MODE) !=
> + !!(vmcs12->guest_ia32_efer & EFER_LMA) ||
> + (vmcs12->guest_cr0 & X86_CR0_PG &&
> + !!(vmcs12->vm_entry_controls & VM_ENTRY_IA32E_MODE) !=
> + !!(vmcs12->guest_ia32_efer & EFER_LME)))) {
> + nested_vmx_entry_failure(vcpu, vmcs12,
> + EXIT_REASON_INVALID_STATE, ENTRY_FAIL_DEFAULT);
> + return 1;
> + }
if (vmcs12->vm_entry_controls & VM_ENTRY_LOAD_IA32_EFER) {
bool ia32e = (vmcs12->vm_entry_controls & VM_ENTRY_IA32E_MODE) != 0;
if (...) {
}
}
Also please put parentheses around the & operator.
The exit tests can similarly extract the host address space size bit to a bool.
Paolo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html