Re: [PATCH 18/24] Exiting from L2 to L1

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

 



On Mon, Sep 13, 2010, Avi Kivity wrote about "Re: [PATCH 18/24] Exiting from L2 to L1":
> So the following options should work:
> 
> 1.  vmcs12->vm_entry_intr_info_field = 
> vmcs_read32(VM_ENTRY_INTR_INFO_FIELD);

Right, this was the original code in the patch.

> 2.  if (!(exit_reason & FAILED_ENTRY)) vmcs12->vm_exit_intry_info_field 
> &= ~VALID;

I now prefer this code. It doesn't do vmread (but replaces it with a bunch of
extra instructions - which might be even slower overall...).

But the more interesting thing is that it doesn't copy irrelevant bits from
vmcs02 to vmcs12, bits that might not have been set by L1 but rather by L0
which previously injected an interrupt into the same L2. These bits shouldn't
matter (when !valid), but a nosy L1 might notice them...

> 3.  if (exit_reason & FAILED_ENTRY) vmcs12->vm_entry_intr_info_field = 
> vmcs_read32(VM_ENTRY_INTR_INFO_FIELD);

I think you meant the opposite condition?

	if (!(exit_reason & FAILED_ENTRY)) vmcs12->vm_entry_intr_info_field = 
	vmcs_read32(VM_ENTRY_INTR_INFO_FIELD);

-- 
Nadav Har'El                        |       Monday, Sep 13 2010, 5 Tishri 5771
nyh@xxxxxxxxxxxxxxxxxxx             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |Always borrow money from pessimists. They
http://nadav.harel.org.il           |don't expect to be paid back.
--
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