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

Re: [Xen-devel] [PATCH] nested VMX: don't ignore mapping errors



>>> On 11.11.13 at 11:37, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> On 11/11/13 08:27, Jan Beulich wrote:
>> @@ -1678,9 +1688,8 @@ int nvmx_handle_vmclear(struct cpu_user_
>>      {
>>          /* Even if this VMCS isn't the current one, we must clear it. */
>>          vvmcs = hvm_map_guest_frame_rw(gpa >> PAGE_SHIFT, 0);
>> -        if ( vvmcs ) 
>> -            clear_vvmcs_launched(&nvmx->launched_list,
>> -                domain_page_map_to_mfn(vvmcs));
>> +        clear_vvmcs_launched(&nvmx->launched_list,
>> +                             domain_page_map_to_mfn(vvmcs));
> 
> hvm_map_guest_frame_rw() is able to return NULL in quite a few cases.
> 
> Are you sure it is safe to remove the NULL check?

Indeed, now that I look at it - I recalled (and didn't further
check) that it would return NULL only as the result of
__map_domain_page_global() doing so (and
__map_domain_page() can't). I'll drop the change above
(and the similar case in the corresponding nested SVM
patch), but still that won't yield correct code...

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®.