From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 15/24] KVM: x86 emulator: Provide more callbacks for x86 emulator. Date: Wed, 10 Mar 2010 11:11:37 +0200 Message-ID: <4B976249.2000404@redhat.com> References: <1268143762-4000-1-git-send-email-gleb@redhat.com> <1268143762-4000-16-git-send-email-gleb@redhat.com> <4B965EAF.10505@redhat.com> <20100309162515.GC9066@redhat.com> <4B9683EB.8010806@redhat.com> <20100309175714.GD9066@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Gleb Natapov Return-path: Received: from mx1.redhat.com ([209.132.183.28]:32866 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751142Ab0CJJLk (ORCPT ); Wed, 10 Mar 2010 04:11:40 -0500 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2A9BdDB026933 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 10 Mar 2010 04:11:39 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o2A9Bcl1005904 for ; Wed, 10 Mar 2010 04:11:39 -0500 In-Reply-To: <20100309175714.GD9066@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/09/2010 07:57 PM, Gleb Natapov wrote: >>>> >>>> Descriptor writes need an atomic kvm_set_guest_bit(), no? >>>> >>>> >>> It is? atomic against what? Current code just write whole descriptor >>> using write_std(). >>> >> These are accessed bit changes, and are done atomically in the same >> way as a page table walk sets the accessed and dirty bit. >> Presumably the atomic operation is to allow the kernel to scan >> segments and swap them out if they are not used. >> >> > We can use cmpxchg callback for that, no? > > Yes. -- error compiling committee.c: too many arguments to function