From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Vivier Subject: Re: [PATCH 00/11] KVM updates for Linux 2.6.24-rc review Date: Sun, 21 Oct 2007 13:53:55 +0200 Message-ID: <471B3DD3.3080107@bull.net> References: <1192964892617-git-send-email-avi@qumranet.com> <471B340C.5010800@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: <471B340C.5010800@qumranet.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org Avi Kivity a =E9crit : > Avi Kivity wrote: >> The following patches fix fallout from the main 2.6.24 KVM merge. A= n >> exception is the movnti emulation patch, which adds support for Linu= x >> 2.6.16 guests. >> >> The patches can be found in kvm.git in the branch kvm-updates-2.6.24= =2E >> There is also a branch kvm-updates-2.6.25 which will form the basis = of >> the next merge window submission. >> >> Please review the patches and let me know if something is wrong or i= f >> a patch is missing. >> >> =20 >=20 >=20 > Laurent, I believe the following patch (in kvm-updates-2.6.25) needs = to=20 > go into 2.6.24 as well. Can you comment on this? What kind of comment do you want ? What are the requirements to go in 2.6.24 instead of 2.6.25 ? Is a bug correction enough ? :-P This patch correct a bad behavior of x86_emulate_insn() in case of erro= r with a=20 REP prefix. This patch is needed because, without it, when REP prefix is used with = an=20 instruction failing for some reasons (like IO or page fault) we don't r= estore=20 all modified registers (like RSI and RDI), but only ECX and EIP, so whe= n we=20 re-enter in x86_emulate_insn() we modify again an already modified valu= e.=20 Moreover, this patch manages correctly the case where the instruction f= ails in=20 writeback(). >> commit 6de232e39be372f85bea96eb741962acc7fcb1f7 >> Author: Laurent Vivier >> Date: Mon Oct 1 11:01:06 2007 +0200 >> >> KVM: x86 emulator: Correct management of REP prefix >> >> This patch corrects some errors appearing when we have an=20 >> emulation failure >> on an operation using REP prefix. >> >> When x86_emulate_insn() fails, saving EIP and ECX is not enough = as=20 >> emulation >> should have modified other registers like RSI or RDI. Moreover,=20 >> the emulation >> can fail on the writeback, and in this case we are not able to=20 >> restore >> registers. >> >> At beginning of x86_emulate_insn(), we restore registers from vc= pu=20 >> as they were >> not modified by x86d_decode_insn() and we save EIP to be able to= =20 >> restore it >> in case of failure. >> >=20 --=20 ---------------- Laurent.Vivier@bull.net ----------------- "Given enough eyeballs, all bugs are shallow" E. S. Raymond