All of lore.kernel.org
 help / color / mirror / Atom feed
* monitoring guest sidt execution
@ 2009-11-15 15:37 matteo
  2009-11-16 10:16 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: matteo @ 2009-11-15 15:37 UTC (permalink / raw)
  To: kvm

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: monitoring guest sidt execution
  2009-11-15 15:37 monitoring guest sidt execution matteo
@ 2009-11-16 10:16 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2009-11-16 10:16 UTC (permalink / raw)
  To: matteo; +Cc: kvm

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-16 10:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-15 15:37 monitoring guest sidt execution matteo
2009-11-16 10:16 ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.