stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Hogan <james.hogan@imgtec.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	<linux-kernel@vger.kernel.org>, <kvm@vger.kernel.org>
Cc: <stable@vger.kernel.org>
Subject: Re: [PATCH] KVM: mips: use id_to_memslot correctly
Date: Mon, 18 May 2015 11:15:48 +0100	[thread overview]
Message-ID: <5559BBD4.7010402@imgtec.com> (raw)
In-Reply-To: <1431936859-19955-1-git-send-email-pbonzini@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1103 bytes --]

Hi Paolo,

On 18/05/15 09:14, Paolo Bonzini wrote:
> The argument to KVM_GET_DIRTY_LOG is a memslot id; it may not
> match the position in the memslots array, which is sorted by
> gfn.
> 
> Cc: stable@vger.kernel.org
> Cc: James Hogan <james.hogan@imgtec.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Reviewed-by: James Hogan <james.hogan@imgtec.com>

(I have the same patch in my pile).

Thanks
James

> ---
>  arch/mips/kvm/mips.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/kvm/mips.c b/arch/mips/kvm/mips.c
> index bb68e8d520e8..52f205ae1281 100644
> --- a/arch/mips/kvm/mips.c
> +++ b/arch/mips/kvm/mips.c
> @@ -982,7 +982,7 @@ int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log)
>  
>  	/* If nothing is dirty, don't bother messing with page tables. */
>  	if (is_dirty) {
> -		memslot = &kvm->memslots->memslots[log->slot];
> +		memslot = id_to_memslot(kvm->memslots, log->slot);
>  
>  		ga = memslot->base_gfn << PAGE_SHIFT;
>  		ga_end = ga + (memslot->npages << PAGE_SHIFT);
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2015-05-18 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-18  8:14 [PATCH] KVM: mips: use id_to_memslot correctly Paolo Bonzini
2015-05-18 10:15 ` James Hogan [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=5559BBD4.7010402@imgtec.com \
    --to=james.hogan@imgtec.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).