On 11/25/2012 11:22 PM, Paolo Bonzini wrote:
> Il 21/11/2012 23:41, H. Peter Anvin ha scritto:
>> From: "H. Peter Anvin" <[email protected]>
>>
>> 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-and-tested-by: Melanie Blower <[email protected]>
>> Signed-off-by: H. Peter Anvin <[email protected]>
>> Link:
>> http://lkml.kernel.org/r/b3584e72cfebed439a3eca9bce67a4ef1b17a...@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) */
>>
>
> Reviewed-by: Paolo Bonzini <[email protected]>
>
Gleb, Marcelo: are you going to apply this or would you prefer I took it
in x86/urgent?
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/