From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Vivier Subject: Re: [kvm-devel] [PATCH 00/11] KVM updates for Linux 2.6.24-rc review Date: Sun, 21 Oct 2007 14:38:21 +0200 Message-ID: <471B483D.90305@bull.net> References: <1192964892617-git-send-email-avi@qumranet.com> <471B340C.5010800@qumranet.com> <471B3DD3.3080107@bull.net> <471B40E4.4060204@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org To: Avi Kivity Return-path: In-Reply-To: <471B40E4.4060204@qumranet.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Avi Kivity a =E9crit : > Laurent Vivier wrote: >> Avi Kivity a =E9crit : >>> Avi Kivity wrote: >>>> The following patches fix fallout from the main 2.6.24 KVM merge. = An >>>> exception is the movnti emulation patch, which adds support for Li= nux >>>> 2.6.16 guests. >>>> >>>> The patches can be found in kvm.git in the branch kvm-updates-2.6.= 24. >>>> There is also a branch kvm-updates-2.6.25 which will form the basi= s of >>>> the next merge window submission. >>>> >>>> Please review the patches and let me know if something is wrong or= if >>>> a patch is missing. >>>> >>>> =20 >>> >>> Laurent, I believe the following patch (in kvm-updates-2.6.25) need= s=20 >>> to go into 2.6.24 as well. Can you comment on this? >> What kind of comment do you want ? >=20 > Well, whether it needs to go into .24. >=20 >> What are the requirements to go in 2.6.24 instead of 2.6.25 ? >> >> Is a bug correction enough ? :-P >> >=20 > It has to fix something real-life, in a real guest. >=20 >> This patch correct a bad behavior of x86_emulate_insn() in case of=20 >> error with a REP prefix. >> >> This patch is needed because, without it, when REP prefix is used wi= th=20 >> an instruction failing for some reasons (like IO or page fault) we=20 >> don't restore all modified registers (like RSI and RDI), but only EC= X=20 >> and EIP, so when we re-enter in x86_emulate_insn() we modify again a= n=20 >> already modified value. Moreover, this patch manages correctly the=20 >> case where the instruction fails in writeback(). >> >=20 > Okay, I guess it is needed. Can you backport it to the branch? It's= =20 > very different from kvm-updates-2.6.24... >=20 Well, in fact it is not needed in 2.6.24, because this patch correct a = bad=20 behavior introduced by commit 57f4e446ebca4aad5c11364baf8477c8cfcb16a4 = (which is=20 not in kvm-update-2.6.24): KVM: Call x86_decode_insn() only when needed Move emulate_ctxt to kvm_vcpu to keep emulate context when we exit from= kvm module. Call x86_decode_insn() only when needed. Modify x86_emulate_ins= n() to not modify the context if it must be re-entered. So, in fact, the answer is (after correctly understanding the question)= : no,=20 this patch is not needed in kvm-update-2.6.24. Regards, Laurent --=20 ---------------- Laurent.Vivier@bull.net ----------------- "Given enough eyeballs, all bugs are shallow" E. S. Raymond