From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailapp01.imgtec.com ([195.59.15.196]:45277 "EHLO imgpgp01.kl.imgtec.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752057AbbERKPv (ORCPT ); Mon, 18 May 2015 06:15:51 -0400 Message-ID: <5559BBD4.7010402@imgtec.com> Date: Mon, 18 May 2015 11:15:48 +0100 From: James Hogan MIME-Version: 1.0 To: Paolo Bonzini , , CC: Subject: Re: [PATCH] KVM: mips: use id_to_memslot correctly References: <1431936859-19955-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1431936859-19955-1-git-send-email-pbonzini@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="m9XnuAUS08Q5oIURAOArjfT61p2X1HAnT" Sender: stable-owner@vger.kernel.org List-ID: --m9XnuAUS08Q5oIURAOArjfT61p2X1HAnT Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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. >=20 > Cc: stable@vger.kernel.org > Cc: James Hogan > Signed-off-by: Paolo Bonzini Reviewed-by: James Hogan (I have the same patch in my pile). Thanks James > --- > arch/mips/kvm/mips.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > 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, str= uct kvm_dirty_log *log) > =20 > /* If nothing is dirty, don't bother messing with page tables. */ > if (is_dirty) { > - memslot =3D &kvm->memslots->memslots[log->slot]; > + memslot =3D id_to_memslot(kvm->memslots, log->slot); > =20 > ga =3D memslot->base_gfn << PAGE_SHIFT; > ga_end =3D ga + (memslot->npages << PAGE_SHIFT); >=20 --m9XnuAUS08Q5oIURAOArjfT61p2X1HAnT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJVWbvUAAoJEGwLaZPeOHZ6hXIP/0dB5wjKwvzTNSPs40WBmPJe HlnD8ObJR4UOc5jwxbskIUeacOLLKlBpnPh/eu7etXBkmppuObiIk76N1ptVqJ3x h+LiP8DHt/NJ/H+0Ct0VFUil6Dqg01SDIoCiMMERk308wke3XV1ciY6ATsk7y8RL +2Kjwl0SCmEvAgHOg3+Qb0L6a3H/UctiRVBxSgASHxlw0L5HZwd+2/m8UFWsTIf/ 0q4/eRjpapWHJGvOZ7pPJuPmYPQBWzGNZCI+sP+cP50MH7e1uEL7h3FwjK0auBzr 2asOyRZwd2+13Nbl/tQTQsVxh19BNpfuE3mFMs87rvnr4Z8WS5qGrU4r6Y9sbHsb 7w/G67yFehs0krkNYiU+F/npf/RNqJLG8tz4W4qXq+DyPP6JFaO9reVugtdcLreu aNXfCqR5OcVpUkHC7v+Z5UFOMiUW/UU14Gxb1bH87NOEJ7nHGCpJUsv79Rg+6S/5 vNvk2Vi38HIaCwZ63fOVtYiSjsJDUObSUG3Tf0Tbo0ZNJGBAW7rrvovePGkEDrQn vO0FbCXUVh6IqlM+2xpbGkKBYy2RWVDDZozlwEkjpIzXgtmnTllJ37tJI+VTACEm EA4d+SMRjsREgzATkffj7Qtr07l7XlBTi1hfVeEn9lqPS8RvXdcIOfkHhsb30rCF d0dIyo6IdXt4LwJchzH5 =aZoE -----END PGP SIGNATURE----- --m9XnuAUS08Q5oIURAOArjfT61p2X1HAnT--