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

Re: [Xen-devel] [PATCH 1/4] nested vmx: Use a list to store the launched vvmcs for L1 VMM



>>> On 17.01.13 at 13:39, "Xu, Dongxiao" <dongxiao.xu@xxxxxxxxx> wrote:
>> > -    launched = __get_vvmcs(vcpu_nestedhvm(v).nv_vvmcx,
>> > -                           NVMX_LAUNCH_STATE);
>> > +    launched = vvmcs_launched(&nvmx->launched_list,
>> > +                              virt_to_maddr(nvcpu->nv_vvmcx));
>> 
>> nv_vvmcx is obtained through hvm_map_guest_frame_rw(), so
>> you can't validly use virt_to_maddr() on it. I know there are other
>> examples of this in the code, but they're all wrong and will all get
>> fixed once I get to submit the 16Tb support patches.
> 
> What's the correct way to get such machine address?

domain_page_map_to_mfn().

> Also could you help to explain why it is wrong?

Because you're assuming that map_domain_page() reduces to
mfn_to_virt(), which only happens to be the case right now
(where 32-bit code is gone and huge memory support isn't
there yet). In order to not introduce further (latent) bugs, I'm
going to veto (as far as I'm being listened to) any change that
violates the abstract model, and I regret that I didn't notice
the other flaws before they went in.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.