Skip to contentSkip to conversation

monitoring guest sidt execution

DISCUSSION matteo 2 participants 2 messages Nov 15, 2009 – Nov 16, 2009 KVM

lore
Share & tools
lore

matteo

author
#0 lore raw

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

#1 lore raw
Quoted 20 lines · matteo

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

Quoted 6 lines

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.

Signature · 1 line
error compiling committee.c: too many arguments to function