From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Gortmaker Subject: [stable-3.4] possibly revert "KVM: X86 emulator: fix source operand decoding..." Date: Wed, 4 Sep 2013 12:44:15 -0400 Message-ID: <20130904164415.GA23288@windriver.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: , , To: Return-path: Received: from mail.windriver.com ([147.11.1.11]:52227 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763066Ab3IDQoA (ORCPT ); Wed, 4 Sep 2013 12:44:00 -0400 Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: Hi Greg, The 3.4.44+ cherry pick: ---------------- commit 5b5b30580218eae22609989546bac6e44d0eda6e Author: Gleb Natapov Date: Wed Apr 24 13:38:36 2013 +0300 KVM: X86 emulator: fix source operand decoding for 8bit mov[zs]x in= structions =20 commit 660696d1d16a71e15549ce1bf74953be1592bcd3 upstream. =20 Source operand for one byte mov[zs]x is decoded incorrectly if it i= s in high byte register. Fix that. =20 Signed-off-by: Gleb Natapov Signed-off-by: Greg Kroah-Hartman ---------------- introduces the following: arch/x86/kvm/emulate.c: In function =E2=80=98decode_operand=E2=80=99: arch/x86/kvm/emulate.c:3974:4: warning: passing argument 1 of =E2=80=98= decode_register=E2=80=99 makes integer from pointer without a cast [ena= bled by default] arch/x86/kvm/emulate.c:789:14: note: expected =E2=80=98u8=E2=80=99 but = argument is of type =E2=80=98struct x86_emulate_ctxt *=E2=80=99 arch/x86/kvm/emulate.c:3974:4: warning: passing argument 2 of =E2=80=98= decode_register=E2=80=99 makes pointer from integer without a cast [ena= bled by default] arch/x86/kvm/emulate.c:789:14: note: expected =E2=80=98long unsigned in= t *=E2=80=99 but argument is of type =E2=80=98u8=E2=80=99 Based on the severity of the warnings above, I'm reasonably sure there = will be some kind of runtime regressions due to this, but I stopped to inves= tigate the warnings as soon as I saw them, before any run time testing. It happens because mainline v3.7-rc1~113^2~40 (dd856efafe60) does this: -static void *decode_register(u8 modrm_reg, unsigned long *regs, +static void *decode_register(struct x86_emulate_ctxt *ctxt, u8 modrm_r= eg, Since 660696d1d16a71e1 was only applied to stable 3.4, 3.8, and 3.9 -- = and the prerequisite above is in 3.7+, the issue should be limited to 3.4.4= 4+ Thanks, Paul.