From: Paolo Bonzini <pbonzini@redhat.com>
To: Jan Kiszka <jan.kiszka@web.de>
Cc: Gleb Natapov <gleb@redhat.com>,
Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
"Nadav Har'El" <nyh@math.technion.ac.il>
Subject: Re: [PATCH 1/2] KVM: nVMX: Validate EFER values for VM_ENTRY/EXIT_LOAD_IA32_EFER
Date: Mon, 15 Apr 2013 13:08:50 +0200 [thread overview]
Message-ID: <516BDFC2.3020107@redhat.com> (raw)
In-Reply-To: <516A8879.6050202@web.de>
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
next prev parent reply other threads:[~2013-04-15 11:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-14 10:44 [PATCH 1/2] KVM: nVMX: Validate EFER values for VM_ENTRY/EXIT_LOAD_IA32_EFER Jan Kiszka
2013-04-14 10:44 ` [PATCH 2/2] KVM: nVMX: VM_ENTRY/EXIT_LOAD_IA32_EFER overrides EFER.LMA settings Jan Kiszka
2013-04-15 11:09 ` Paolo Bonzini
2013-04-15 11:08 ` Paolo Bonzini [this message]
2013-04-17 22:39 ` [PATCH 1/2] KVM: nVMX: Validate EFER values for VM_ENTRY/EXIT_LOAD_IA32_EFER Marcelo Tosatti
2013-04-20 8:52 ` [PATCH v2 " Jan Kiszka
2013-04-22 8:51 ` Paolo Bonzini
2013-04-22 9:54 ` [PATCH " Gleb Natapov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=516BDFC2.3020107@redhat.com \
--to=pbonzini@redhat.com \
--cc=gleb@redhat.com \
--cc=jan.kiszka@web.de \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=nyh@math.technion.ac.il \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.