From mboxrd@z Thu Jan 1 00:00:00 1970 From: matteo Subject: monitoring guest sidt execution Date: Sun, 15 Nov 2009 16:37:50 +0100 Message-ID: <4B00204E.20706@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: kvm@vger.kernel.org Return-path: Received: from mail-fx0-f221.google.com ([209.85.220.221]:40304 "EHLO mail-fx0-f221.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751754AbZKOPh7 (ORCPT ); Sun, 15 Nov 2009 10:37:59 -0500 Received: by fxm21 with SMTP id 21so1925220fxm.21 for ; Sun, 15 Nov 2009 07:38:03 -0800 (PST) Sender: kvm-owner@vger.kernel.org List-ID: 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? thanks in advance, Matteo