From patchwork Mon Mar 28 16:32:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takuya Yoshikawa X-Patchwork-Id: 669141 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p2SGWdeE004841 for ; Mon, 28 Mar 2011 16:32:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755161Ab1C1Qci (ORCPT ); Mon, 28 Mar 2011 12:32:38 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:48746 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932115Ab1C1Qch (ORCPT ); Mon, 28 Mar 2011 12:32:37 -0400 Received: by wya21 with SMTP id 21so3002786wya.19 for ; Mon, 28 Mar 2011 09:32:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:date:from:to:cc:subject:message-id:x-mailer :mime-version:content-type:content-transfer-encoding; bh=7S7Lgi1L9hO2Ir1TSiCfAviZw9xBufAWIV31C9t/73U=; b=dRKCr1oBHEolfV+IrPRrUSqIgxOoDJIVzr3+bDPqVLs26MlmrQyrP3S0PeDcdRYKdc 5DsMMolWcDL4CQbGD42TK9PC+AJIrB4smkoOxPY/dXXvFyr4/8WsLBcVE9gqprMCwmob z2wJ6E4a3+H8g73dUomZNMCUtd2QxLwbiUwxs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:x-mailer:mime-version :content-type:content-transfer-encoding; b=Kc5qdJM275fPBGJsyVlSpbgs31k4G9JOJNRiivJM8Xba0bv7ubayOhq9bzBv85MS05 nWn9rCg2Hxcq1MFyIVjvrkD7nMtkCNJ1uOVESDanITCWYvxEXOHDPeA69VnV2+y6cnBI q7bEQ6EoS0ZhD+7RVp39KF+FPZlhdRKYPDHyA= Received: by 10.216.72.20 with SMTP id s20mr3749878wed.80.1301329955781; Mon, 28 Mar 2011 09:32:35 -0700 (PDT) Received: from amd (s198099.dynamic.ppp.asahi-net.or.jp [220.157.198.99]) by mx.google.com with ESMTPS id a50sm1567724wer.18.2011.03.28.09.32.31 (version=SSLv3 cipher=OTHER); Mon, 28 Mar 2011 09:32:33 -0700 (PDT) Date: Tue, 29 Mar 2011 01:32:29 +0900 From: Takuya Yoshikawa To: avi@redhat.com, mtosatti@redhat.com Cc: kvm@vger.kernel.org, yoshikawa.takuya@oss.ntt.co.jp, gleb@redhat.com Subject: [PATCH 1/2] KVM: x86 emulator: Disable writeback for CMP emulation Message-Id: <20110329013229.20e6168f.takuya.yoshikawa@gmail.com> X-Mailer: Sylpheed 3.1.0beta2 (GTK+ 2.22.0; x86_64-pc-linux-gnu) Mime-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 28 Mar 2011 16:32:41 +0000 (UTC) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 14c5ad5..8a73805 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -3084,6 +3084,7 @@ special_insn: emulate_2op_SrcV("xor", c->src, c->dst, ctxt->eflags); break; case 0x38 ... 0x3d: + c->dst.type = OP_NONE; /* Disable writeback. */ cmp: /* cmp */ emulate_2op_SrcV("cmp", c->src, c->dst, ctxt->eflags); break; @@ -3138,6 +3139,7 @@ special_insn: case 6: goto xor; case 7: + c->dst.type = OP_NONE; /* Disable writeback. */ goto cmp; } break;