From: "Trolle Selander" Subject: [PATCH] x86emulate - fix unintended writeback on cmp/test instructions Date: Fri, 25 Jul 2008 12:00:45 +0100 Message-ID: <515922b50807250400t63e0bc3ak769f2f885d812361@mail.gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_141398_4088556.1216983645277" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel , Keir Fraser List-Id: xen-devel@lists.xenproject.org ------=_Part_141398_4088556.1216983645277 Content-Type: multipart/alternative; boundary="----=_Part_141399_23112204.1216983645277" ------=_Part_141399_23112204.1216983645277 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline This patch fixes an issue when x86_emulate is called with force_writeback=1 set. It resulted in cmp and test instructions with memory operands to have the mem value written back after instruction emulation finished. This caused false alarms on writes to RO mem, and might have caused other issues if unintended writes occured to device registers in mmio space. Signed-off-by: Trolle Selander ------=_Part_141399_23112204.1216983645277 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
This patch fixes an issue when x86_emulate is called with force_writeback=1 set. It resulted in cmp and test instructions with memory operands to have the mem value written back after instruction emulation finished. This caused false alarms on writes to RO mem, and might have caused other issues if unintended writes occured to device registers in mmio space.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com <mailto:trolle.selander@eu.citrix.com>
------=_Part_141399_23112204.1216983645277-- ------=_Part_141398_4088556.1216983645277 Content-Type: text/x-patch; name=xen_x86_emulate_prevent_cmp_writeback.patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_fj2okm4t0 Content-Disposition: attachment; filename=xen_x86_emulate_prevent_cmp_writeback.patch ZGlmZiAtdU5yIHhlbi11bnN0YWJsZS5oZy1vcmlnL3hlbi9hcmNoL3g4Ni94ODZfZW11bGF0ZS94 ODZfZW11bGF0ZS5jIHhlbi11bnN0YWJsZS5oZy1maXhjbXAveGVuL2FyY2gveDg2L3g4Nl9lbXVs YXRlL3g4Nl9lbXVsYXRlLmMKLS0tIHhlbi11bnN0YWJsZS5oZy1vcmlnL3hlbi9hcmNoL3g4Ni94 ODZfZW11bGF0ZS94ODZfZW11bGF0ZS5jCTIwMDgtMDctMDQgMTE6MTg6MTkuMDAwMDAwMDAwICsw MTAwCisrKyB4ZW4tdW5zdGFibGUuaGctZml4Y21wL3hlbi9hcmNoL3g4Ni94ODZfZW11bGF0ZS94 ODZfZW11bGF0ZS5jCTIwMDgtMDctMjUgMTE6NTc6MzguODUzMzY1MjAwICswMTAwCkBAIC0xNjA2 LDYgKzE2MDYsNyBAQAogICAgICAgICBkc3QudmFsID0gX3JlZ3MuZWF4OwogICAgIGNhc2UgMHgz OCAuLi4gMHgzYjogY21wOiAvKiBjbXAgKi8KICAgICAgICAgZW11bGF0ZV8yb3BfU3JjVigiY21w Iiwgc3JjLCBkc3QsIF9yZWdzLmVmbGFncyk7CisgICAgICAgIGRzdC50eXBlID0gT1BfTk9ORTsK ICAgICAgICAgYnJlYWs7CiAKICAgICBjYXNlIDB4NjI6IC8qIGJvdW5kICovIHsKQEAgLTE3MDcs NiArMTcwOCw3IEBACiAgICAgICAgIGRzdC52YWwgPSBfcmVncy5lYXg7CiAgICAgY2FzZSAweDg0 IC4uLiAweDg1OiB0ZXN0OiAvKiB0ZXN0ICovCiAgICAgICAgIGVtdWxhdGVfMm9wX1NyY1YoInRl c3QiLCBzcmMsIGRzdCwgX3JlZ3MuZWZsYWdzKTsKKyAgICAgICAgZHN0LnR5cGUgPSBPUF9OT05F OwogICAgICAgICBicmVhazsKIAogICAgIGNhc2UgMHg4NiAuLi4gMHg4NzogeGNoZzogLyogeGNo ZyAqLwo= ------=_Part_141398_4088556.1216983645277 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel ------=_Part_141398_4088556.1216983645277--