From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: monitoring guest sidt execution Date: Mon, 16 Nov 2009 12:16:02 +0200 Message-ID: <4B012662.3000308@redhat.com> References: <4B00204E.20706@gmail.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: matteo Return-path: Received: from mx1.redhat.com ([209.132.183.28]:26984 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751893AbZKPKP7 (ORCPT ); Mon, 16 Nov 2009 05:15:59 -0500 In-Reply-To: <4B00204E.20706@gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: On 11/15/2009 05:37 PM, matteo wrote: > Hi to all, > > I'm trying to intercept the guest "sidt" instruction execution from the > host > > i've added the bit to the control structure: > > > control->intercept = | (1ULL << INTERCEPT_STORE_IDTR); > > then I have defined the sidt handler to manage the STORE_IDTR action: > > > [SVM_EXIT_IDTR_READ] = idtr_write_interception, > > So, in the idtr_write_interception handler there is the invocation of > the "emulate_instruction(&svm-> > vcpu, kvm_run, 0, 0, 0);" function. > Following the execution flow i found that the emulation failed in the > > x86_emulate.c source file and precisely in the "if (c->d == 0) " > conditional statement but i really don't know why it happens and how to > fix it. > > could you please give me some hints with respect to this issue? > You need to fill the appropriate table entry for sidt (most likely group_table) and implement the opcode in the emulator. -- error compiling committee.c: too many arguments to function