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: Tue, 09 Mar 2010 16:43:59 +0200 Message-ID: <4B965EAF.10505@redhat.com> References: <1268143762-4000-1-git-send-email-gleb@redhat.com> <1268143762-4000-16-git-send-email-gleb@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]:2889 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754404Ab0CIOoC (ORCPT ); Tue, 9 Mar 2010 09:44:02 -0500 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o29Ei0WX024852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 9 Mar 2010 09:44:01 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o29Ei0G2022982 for ; Tue, 9 Mar 2010 09:44:00 -0500 In-Reply-To: <1268143762-4000-16-git-send-email-gleb@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03/09/2010 04:09 PM, Gleb Natapov wrote: > Provide get_cached_descriptor(), set_cached_descriptor(), > get_segment_selector(), set_segment_selector(), get_gdt(), > write_std() callbacks. > > Signed-off-by: Gleb Natapov > --- > arch/x86/include/asm/kvm_emulate.h | 16 +++++ > arch/x86/kvm/x86.c | 130 +++++++++++++++++++++++++++++++---- > 2 files changed, 131 insertions(+), 15 deletions(-) > > diff --git a/arch/x86/include/asm/kvm_emulate.h b/arch/x86/include/asm/kvm_emulate.h > index 032d02f..e881618 100644 > --- a/arch/x86/include/asm/kvm_emulate.h > +++ b/arch/x86/include/asm/kvm_emulate.h > @@ -63,6 +63,15 @@ struct x86_emulate_ops { > unsigned int bytes, struct kvm_vcpu *vcpu, u32 *error); > > /* > + * write_std: Write bytes of standard (non-emulated/special) memory. > + * Used for descriptor writing. > + * @addr: [IN ] Linear address to which to write. > + * @val: [OUT] Value write to memory, zero-extended to 'u_long'. > + * @bytes: [IN ] Number of bytes to write to memory. > + */ > + int (*write_std)(unsigned long addr, void *val, > + unsigned int bytes, struct kvm_vcpu *vcpu, u32 *error); > Descriptor writes need an atomic kvm_set_guest_bit(), no? -- error compiling committee.c: too many arguments to function