Re: Question regarding ASM_VMX_VMXON_RAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27.03.2018 02:40, Jidong Xiao wrote:
> Hi,
> 
> The SDM defines the opcode of the VMXON instruction as F3 0F C7 /6,
> yet in the kernel source code (arch/x86/include/asm/vmx.h) I saw:
> 
> #define ASM_VMX_VMXON_RAX         ".byte 0xf3, 0x0f, 0xc7, 0x30"
> 
> So what is 0x30 used for? And why there is no "/6"?

The /6 actually refers to the ModR/M byte if I'm not mistaking.

It is used to define how the address is passed to the VMXON instruction.
0x30 refers to RAX here. So if you would want to pass the address e.g.
via RBX, you would need 0x33 if I'm not wrong.

> 
> I saw this 0x30 in several other macros as well, such as
> ASM_VMX_VMCLEAR_RAX and ASM_VMX_VMPTRLD_RAX.
> 
> Where in the SDM, can I find some explanation to this 0x30? Thanks.

Look out for the ModR/M tables.

> 
> -Jidong
> 


-- 

Thanks,

David / dhildenb



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux