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

Re: [Xen-devel] [PATCH V2] x86/altp2m: Hypercall to set altp2m view visibility


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Alexandru Stefan ISAILA <aisaila@xxxxxxxxxxxxxxx>
  • Date: Tue, 18 Feb 2020 14:42:30 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bitdefender.com; dmarc=pass action=none header.from=bitdefender.com; dkim=pass header.d=bitdefender.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hLnThX5kwchkX3wMNXchjtafTQaS5rwoeD62/wE5e84=; b=k5uTW384PUYXJ83GsJyPW3LtjOl+whHhG6+UdULuX0+yWsZ4pq0QDkhPjGYO1tcKLPBnBSDiNeIY7/Z8hmXoNQ9LPlLCWYv40JRoZrLvLfuqrw9MbN9vqB42T2QRIL8s36nlZdNmmn0JuqiqxLYVj+HYehpq0/ZZHFVMOFgzfJ7IJa8+TxUZqb9eCDjWm5cZ5SeiiPGegpv6ot8wHW90CAO8ou+272K8TJ68K9C5jbaqgIAkPNoTqPmTKSWpOCu96fs54yO29Xs4utnoHGDviOdJUk7RAEUiLkecJtsPho4H21SdClY8Rv+K89m1M/LA3J1IvgIlGj85uqb/2rrOwA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kOz2KcCk/1GXz5e5/f74D/cYTmwJXRqvcv//yacV4qkTuIjfqYo8QjT5+4aHsVsVmsGM0bAY8q146ibMnmOpDrsTlmFDhCC1YkjKlnuXP0Hwz+IvxSqN1AuONUp4sY8+VFQ7ktvEXPzU2rpaYkT90Z7+Q1Jj27CjaX1ZoNBVPkFoFItjixA0Su/6L9G3NZreZjuG4juigVDZHKEieA59Q8En8lmH1BSWuqqGS5BZ0POyE85NQTdV3zsy8VFnQe+i6VHZGqhFMoIbpjUpK9QkWZBkiXwZj+JHus3piJk0e3hXLy+UtBt4n5lldjosDPm9QuTKQ8qJIy+LBnr7UN42Ww==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisaila@xxxxxxxxxxxxxxx;
  • Cc: Kevin Tian <kevin.tian@xxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Wei Liu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <ian.jackson@xxxxxxxxxxxxx>, Jun Nakajima <jun.nakajima@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 18 Feb 2020 14:42:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHV124xlaiLFBXa8kCbjgVBTXJ5w6gfiiMAgAFPFACAAEs0gA==
  • Thread-topic: [Xen-devel] [PATCH V2] x86/altp2m: Hypercall to set altp2m view visibility

>>> --- a/xen/arch/x86/mm/hap/hap.c
>>> +++ b/xen/arch/x86/mm/hap/hap.c
>>> @@ -488,8 +488,17 @@ int hap_enable(struct domain *d, u32 mode)
>>>                goto out;
>>>            }
>>>    
>>> +        if ( (d->arch.altp2m_working_eptp = alloc_xenheap_page()) == NULL )
>>> +        {
>>> +            rv = -ENOMEM;
>>> +            goto out;
>>> +        }
>>
>> Isn't there a pre-existing error handling issue here which you
>> widen, in that later encountered errors don't cause clean up
>> of what had already succeeded before?
> 
> It seems non of the errors perform a cleanup. It might be better to have
> a general cleanup done at "out:" if ( !rv ) and then check what should
> be "p2m_teardown()" or "free_xenheap_page()".
> 

I've looked around for this and it is handled in arch_domain_create().
If hvm_domain_initialise() fails then paging_final_teardown() is called 
and in the end hap_final_teardown() takes care of cleaning up.

Alex
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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