RE: [PATCH 20/31] nVMX: Exiting from L2 to L1

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

 



> From: Nadav Har'El
> Sent: Wednesday, May 25, 2011 9:21 PM
> 
> On Wed, May 25, 2011, Tian, Kevin wrote about "RE: [PATCH 20/31] nVMX:
> Exiting from L2 to L1":
> > How about SYSENTER and PERF_GLOBAL_CTRL MSRs? At least a TODO
> comment
> > here make the whole load process complete. :-)
> >
> > Also isn't it more sane to update vmcs01's guest segment info based on
> vmcs12's
> > host segment info? Though you can assume the environment in L1 doesn't
> change
> > from VMLAUNCH/VMRESUME to VMEXIT handler, it's more architectural
> clear
> > to load those segments fields according to L1's desire.
> 
> Right... One of these days, I (or some other volunteer ;-)) would need to
> print out the relevant sections of the SDM, sit down with a marker, a read
> it line by line marking lines, fields, capabilities, and so on, which we
> forgot to implement...

You've done a great job.

> 
> How about these additions:
> 
> 	vmcs_write32(GUEST_SYSENTER_CS, vmcs12->host_ia32_sysenter_cs);
> 	vmcs_writel(GUEST_SYSENTER_ESP, vmcs12->host_ia32_sysenter_esp);
> 	vmcs_writel(GUEST_SYSENTER_EIP, vmcs12->host_ia32_sysenter_eip);
> 	vmcs_writel(GUEST_IDTR_BASE, vmcs12->host_idtr_base);
> 	vmcs_writel(GUEST_GDTR_BASE, vmcs12->host_gdtr_base);
> 	vmcs_writel(GUEST_TR_BASE, vmcs12->host_tr_base);
> 	vmcs_writel(GUEST_GS_BASE, vmcs12->host_gs_base);
> 	vmcs_writel(GUEST_FS_BASE, vmcs12->host_fs_base);
> 	vmcs_write16(GUEST_ES_SELECTOR, vmcs12->host_es_selector);
> 	vmcs_write16(GUEST_CS_SELECTOR, vmcs12->host_cs_selector);
> 	vmcs_write16(GUEST_SS_SELECTOR, vmcs12->host_ss_selector);
> 	vmcs_write16(GUEST_DS_SELECTOR, vmcs12->host_ds_selector);
> 	vmcs_write16(GUEST_FS_SELECTOR, vmcs12->host_fs_selector);
> 	vmcs_write16(GUEST_GS_SELECTOR, vmcs12->host_gs_selector);
> 	vmcs_write16(GUEST_TR_SELECTOR, vmcs12->host_tr_selector);
> 
> 	if (vmcs12->vm_exit_controls & VM_EXIT_LOAD_IA32_PAT)
> 		vmcs_write64(GUEST_IA32_PAT, vmcs12->host_ia32_pat);
> 	if (vmcs12->vm_exit_controls &
> VM_EXIT_LOAD_IA32_PERF_GLOBAL_CTRL)
> 		vmcs_write64(GUEST_IA32_PERF_GLOBAL_CTRL,
> 			vmcs12->host_ia32_perf_global_ctrl);
> 

looks good.

Thanks
Kevin
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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