From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v3 16/30] KVM: x86 emulator: If LOCK prefix is used dest arg should be memory. Date: Mon, 15 Mar 2010 17:50:50 +0200 Message-ID: <4B9E575A.7040007@redhat.com> References: <1268663937-27784-1-git-send-email-gleb@redhat.com> <1268663937-27784-17-git-send-email-gleb@redhat.com> <4B9E564C.4060306@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , mtosatti@redhat.com, kvm@vger.kernel.org To: Andre Przywara Return-path: Received: from mx1.redhat.com ([209.132.183.28]:61223 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936228Ab0COPux (ORCPT ); Mon, 15 Mar 2010 11:50:53 -0400 In-Reply-To: <4B9E564C.4060306@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/15/2010 05:46 PM, Andre Przywara wrote: > Gleb Natapov wrote: >> If LOCK prefix is used dest arg should be memory, otherwise instruction >> should generate #UD. > Well, there is one exception: > There is an AMD specific "lock mov cr0 = mov cr8" equivalence, where > there is no memory involved (and we intercept this). I am not sure if > anyone actually uses this code sequence, but it is definitely legal. It's better to trap on this instead of emulating it incorrectly as mov cr8. If/when someone adds 32-bit mov cr8 handling, this will need to be addressed. -- error compiling committee.c: too many arguments to function