Skip to contentSkip to conversation

OPCODE Emulation

DISCUSSION Matteo Signorini 2 participants 2 messages May 6, 2010 KVM

lore
Share & tools
lore
#0 lore raw

Dear Yaniv, Dear Avi,

I would like to add the "sidt emulation" feature in kvm, but in order to
implement it I need to know the details on how the OPCODE works and how exactly opcodes are emulated within kvm. For example let's take the SIDT instruction.
I know the LIDT opcode is "0F 01 /1" but what does 0F, 01 and /1 mean?
I also know that this instruction has only the operand "ModRM:r/m (w)"
but where is this operand stored and how can I access it in emulation?
Could you please suggest to me where can I found some detailed docs on
the subject?
(I have already read the Intel Volume 2B Instruction Set Reference N-Z pag. 4-440 but I have not found enough detailed information)

Thank you

Matteo Signorini

#1 lore raw
Quoted 12 lines · Matteo Signorini

Dear Yaniv, Dear Avi,

I would like to add the "sidt emulation" feature in kvm, but in order to
implement it I need to know the details on how the OPCODE works and how exactly opcodes are emulated within kvm. For example let's take the SIDT instruction.
I know the LIDT opcode is "0F 01 /1" but what does 0F, 01 and /1 mean?
I also know that this instruction has only the operand "ModRM:r/m (w)"
but where is this operand stored and how can I access it in emulation?
 Could you please suggest to me where can I found some detailed docs on the subject?
(I have already read the Intel Volume 2B Instruction Set Reference N-Z pag. 4-440 but I have not found enough detailed information)

Quoted 3 lines

Thank you

Matteo Signorini

Hi Matteo,
arch/x86/kvm/emulate.c is the best place to start. All you need to look at is there.

Regards,
Mohammed

Quoted 4 lines

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html