Re: [PATCH 9/24] Implement VMCLEAR

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

 



On Tue, Jul 06, 2010, Dong, Eddie wrote about "RE: [PATCH 9/24] Implement VMCLEAR":
> Nadav Har'El wrote:
> > This patch implements the VMCLEAR instruction.
>...
> SDM implements alignment check, range check and reserve bit check and may generate VMfail(VMCLEAR with invalid physical address).
> As well as "addr != VMXON pointer" check
> Missed?

Right. I will add some of the missing checks - e.g., currently if the given
address is not page-aligned, I chop off the last bits and pretend that it
is, which can cause problems (although not for correctly-written hypervisors).

About the missing addr != VMXON pointer, as I explained in a comment in the
code (handle_vmon()), this was a deliberate ommission: the current
implementation doesn't store anything in the VMXON page (and I see no reason
why this will change in the future), so the VMXON emulation (handle_vmon())
doesn't even bother to save the pointer it is given, and VMCLEAR and VMPTRLD
don't check that the address they are given are different from this pointer,
since there is no real cause for concern even if it is.

I can quite easily add the missing code to save the vmxon pointer and check
it on vmclear/vmptrld, but frankly, wouldn't it be rather pointless?

> SDM has formal definition of VMSucceed. Cleating CF/ZF only is not sufficient as SDM 2B 5.2 mentioned.
> Any special concern here?
> 
> BTW, should we define formal VMfail() & VMsucceed() API for easy understand and map to SDM?

This is a good idea, and I'll do that.

-- 
Nadav Har'El                        |         Tuesday, Aug  3 2010, 23 Av 5770
nyh@xxxxxxxxxxxxxxxxxxx             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |Sign in zoo: Do not feed the animals. If
http://nadav.harel.org.il           |you have food give it to the guard on duty
--
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