Message ID | 50AD4907.5040102@zytor.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
VGhhbmsgeW91IHNvIG11Y2gsIHRoaXMgcGF0Y2ggc29sdmVzIHRoZSBjb21waWxhdGlvbiBlcnJv cnMgdGhhdCBJIHdhcyBzZWVpbmcgaW4gdGhlIEludGVsIGNvbXBpbGVyLCBhbmQgd2l0aCBnY2Mg LU8wDQpCVFcsIG15IGNoYXJ0ZXIgaXMgdG8gY29tcGlsZSB0aGUga2VybmVsIHdpdGggdGhlIElu dGVsIGNvbXBpbGVyLCBhbmQgbXkgdGVzdGluZyBzdG9wcyBzaG9ydCBvZiB2ZXJpZnlpbmcgdGhh dCB0aGUga2VybmVsIGJ1aWxkIGFjdHVhbGx5IHdvcmtzLg0KQmVzdCByZWdhcmRzLCBNZWxhbmll IEJsb3dlcg0KDQotLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KRnJvbTogSC4gUGV0ZXIgQW52 aW4gW21haWx0bzpocGFAenl0b3IuY29tXSANClNlbnQ6IFdlZG5lc2RheSwgTm92ZW1iZXIgMjEs IDIwMTIgNDozNSBQTQ0KVG86IEJsb3dlciwgTWVsYW5pZQ0KQ2M6IHRnbHhAbGludXRyb25peC5k ZTsgbWluZ29AcmVkaGF0LmNvbTsgYXZpQHJlZGhhdC5jb207IHg4NkBrZXJuZWwub3JnOyBrdm1A dmdlci5rZXJuZWwub3JnOyBsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnDQpTdWJqZWN0OiBS ZTogUFJPQkxFTTogY29tcGlsYXRpb24gaXNzdWUsIGlubGluZSBhc3NlbWJseSBhcmNoL3g4Ni9r dm0vZW11bGF0ZS5jIGZhaWxzIGF0IC1PMA0KDQpPbiAxMS8xNC8yMDEyIDExOjQ1IEFNLCBCbG93 ZXIsIE1lbGFuaWUgd3JvdGU6DQo+IFsxLl0gZ2NjIC1PMCBhc3NlbWJseSBhcmNoL3g4Ni9rdm0v ZW11bGF0ZS5jIGdld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Rt cCksICIrYSIgKCpyYXgpLCAiK2QiICgqcmR4KSwgIitxbSIoZXgpIDoNCj4gICJpIiAoMTEpLCAi bSIgKChjdHh0KS0+c3JjIC4gdmFsKSwgImEiICgqcmF4KSwgImQiICgqcmR4KSk7DQo+IA0KPiBO b3RlIHRoYXQgIithIiBpbiBpbnB1dHMgYWxyZWFkeSBtZWFucyB0aGF0IGVheCBpcyB0aGUgcmV0 dXJuIHZhbHVlLiBBbiB0aGVuICJhIiBpcyB1c2VkIGFzIGFuIG91dHB1dCBjb25zdHJhaW50IHRv by4NCj4gDQoNCkhpIE1lbGFuaWUsDQoNCkNhbiB5b3UgdGVzdCB0aGUgYXR0YWNoZWQgcGF0Y2g/ DQoNCgktaHBhDQoNCg0K -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From f8d8e2842ca05fd89788e35c087f02c6159b023a Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" <hpa@linux.intel.com> Date: Wed, 21 Nov 2012 13:29:20 -0800 Subject: [PATCH] x86, kvm: Remove incorrect redundant assembly constraint In __emulate_1op_rax_rdx, we use "+a" and "+d" which are input/output constraints, and *then* use "a" and "d" as input constraints. This is incorrect, but happens to work on some versions of gcc. However, it breaks gcc with -O0 and icc, and may break on future versions of gcc. Reported-by: Melanie Blower <melanie.blower@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Link: http://lkml.kernel.org/r/B3584E72CFEBED439A3ECA9BCE67A4EF1B17AF90@FMSMSX107.amr.corp.intel.com --- arch/x86/kvm/emulate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 39171cb..bba39bf 100644 --- a/arch/x86/kvm/emulate.c +++ b/arch/x86/kvm/emulate.c @@ -426,8 +426,7 @@ static void invalidate_registers(struct x86_emulate_ctxt *ctxt) _ASM_EXTABLE(1b, 3b) \ : "=m" ((ctxt)->eflags), "=&r" (_tmp), \ "+a" (*rax), "+d" (*rdx), "+qm"(_ex) \ - : "i" (EFLAGS_MASK), "m" ((ctxt)->src.val), \ - "a" (*rax), "d" (*rdx)); \ + : "i" (EFLAGS_MASK), "m" ((ctxt)->src.val)); \ } while (0) /* instruction has only one source operand, destination is implicit (e.g. mul, div, imul, idiv) */ -- 1.7.11.7