From: Paolo Bonzini <pbonzini@redhat.com>
To: Fabian Frederick <fabf@skynet.be>, linux-kernel@vger.kernel.org
Cc: Gleb Natapov <gleb@kernel.org>
Subject: Re: [PATCH 1/1] arch/x86/kvm/vmx.c: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE
Date: Mon, 16 Jun 2014 12:12:56 +0200 [thread overview]
Message-ID: <539EC328.7090804@redhat.com> (raw)
In-Reply-To: <1402782269-10495-1-git-send-email-fabf@skynet.be>
Il 14/06/2014 23:44, Fabian Frederick ha scritto:
> use mm.h definition
>
> Cc: Gleb Natapov <gleb@kernel.org>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
> ---
> arch/x86/kvm/vmx.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> index 801332e..4f84be0 100644
> --- a/arch/x86/kvm/vmx.c
> +++ b/arch/x86/kvm/vmx.c
> @@ -5918,7 +5918,7 @@ static int nested_vmx_check_vmptr(struct kvm_vcpu *vcpu, int exit_reason,
> * which replaces physical address width with 32
> *
> */
> - if (!IS_ALIGNED(vmptr, PAGE_SIZE) || (vmptr >> maxphyaddr)) {
> + if (!PAGE_ALIGNED(vmptr) || (vmptr >> maxphyaddr)) {
> nested_vmx_failInvalid(vcpu);
> skip_emulated_instruction(vcpu);
> return 1;
> @@ -5936,7 +5936,7 @@ static int nested_vmx_check_vmptr(struct kvm_vcpu *vcpu, int exit_reason,
> vmx->nested.vmxon_ptr = vmptr;
> break;
> case EXIT_REASON_VMCLEAR:
> - if (!IS_ALIGNED(vmptr, PAGE_SIZE) || (vmptr >> maxphyaddr)) {
> + if (!PAGE_ALIGNED(vmptr) || (vmptr >> maxphyaddr)) {
> nested_vmx_failValid(vcpu,
> VMXERR_VMCLEAR_INVALID_ADDRESS);
> skip_emulated_instruction(vcpu);
> @@ -5951,7 +5951,7 @@ static int nested_vmx_check_vmptr(struct kvm_vcpu *vcpu, int exit_reason,
> }
> break;
> case EXIT_REASON_VMPTRLD:
> - if (!IS_ALIGNED(vmptr, PAGE_SIZE) || (vmptr >> maxphyaddr)) {
> + if (!PAGE_ALIGNED(vmptr) || (vmptr >> maxphyaddr)) {
> nested_vmx_failValid(vcpu,
> VMXERR_VMPTRLD_INVALID_ADDRESS);
> skip_emulated_instruction(vcpu);
> @@ -8113,14 +8113,14 @@ static int nested_vmx_run(struct kvm_vcpu *vcpu, bool launch)
> }
>
> if ((vmcs12->cpu_based_vm_exec_control & CPU_BASED_USE_MSR_BITMAPS) &&
> - !IS_ALIGNED(vmcs12->msr_bitmap, PAGE_SIZE)) {
> + !PAGE_ALIGNED(vmcs12->msr_bitmap)) {
> /*TODO: Also verify bits beyond physical address width are 0*/
> nested_vmx_failValid(vcpu, VMXERR_ENTRY_INVALID_CONTROL_FIELD);
> return 1;
> }
>
> if (nested_cpu_has2(vmcs12, SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES) &&
> - !IS_ALIGNED(vmcs12->apic_access_addr, PAGE_SIZE)) {
> + !PAGE_ALIGNED(vmcs12->apic_access_addr)) {
> /*TODO: Also verify bits beyond physical address width are 0*/
> nested_vmx_failValid(vcpu, VMXERR_ENTRY_INVALID_CONTROL_FIELD);
> return 1;
>
Applied, thanks.
Paolo
prev parent reply other threads:[~2014-06-16 10:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-14 21:44 [PATCH 1/1] arch/x86/kvm/vmx.c: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE Fabian Frederick
2014-06-16 10:12 ` Paolo Bonzini [this message]
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=539EC328.7090804@redhat.com \
--to=pbonzini@redhat.com \
--cc=fabf@skynet.be \
--cc=gleb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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.