From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 2/2] KVM: x86 emulator: add XADD instruction emulation Date: Thu, 12 Aug 2010 11:34:37 -0400 Message-ID: <4C64148D.4080103@redhat.com> References: <4C63F947.7020808@cn.fujitsu.com> <4C63FA04.3030403@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , kvm@vger.kernel.org To: Wei Yongjun Return-path: Received: from mail-qw0-f46.google.com ([209.85.216.46]:55840 "EHLO mail-qw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760241Ab0HLPek (ORCPT ); Thu, 12 Aug 2010 11:34:40 -0400 Received: by qwh6 with SMTP id 6so1635991qwh.19 for ; Thu, 12 Aug 2010 08:34:40 -0700 (PDT) In-Reply-To: <4C63FA04.3030403@cn.fujitsu.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/12/2010 09:41 AM, Wei Yongjun wrote: > + case 0xc0 ... 0xc1: /* xadd */ > + /* Write back the register source. */ > + write_register_operand(&c->src, c->dst.val, c->dst.bytes); > + /* Write back the memory destination with implicit LOCK prefix. */ > + c->lock_prefix = 1; It's not a major performance problem, but xadd does _not_ have an implicit LOCK prefix. Paolo