Re: vmcs_config.size is 1024 but field offsets are larger

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

 



On Jun 17, 2021, at 4:14 PM, Kallol Biswas <kallolkernel@xxxxxxxxx> wrote:

> Hi,
>    I am trying to understand the vmcs manipulation code.
> 
> It seems that we allocate 4096 bytes for vmcs, but the field offsets
> are much larger.
> 
> crash> p vmcs_config.size
> $15 = 1024
> 
> vmx.h:
> HOST_RIP                        = 0x00006c16
> GUEST_RFLAGS                    = 0x00006820

Those are “Encoding”, not index.  

> 
> vmx.c:
> flags = vmcs_readl(GUEST_RFLAGS);
> 
> I must have a gap in understanding. Maybe I should read the intel
> manual carefully.
> 

It’s required to use the VMREAD/VMWRITE instruction to access the VMCS fields.
You should look at Appendix B of the SDM for details.

--- 
Jun
Intel Open Source Technology Center





[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