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

Re: [PATCH 08/16] x86/P2M: PoD, altp2m, and nested-p2m are HVM-only


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: George Dunlap <George.Dunlap@xxxxxxxxxx>
  • Date: Mon, 7 Feb 2022 14:45:27 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=/pugh4+jctYEopv1WC2RGw/SQ6WGIWa3Xn5kDAHyWjc=; b=faQ9/4DEXMKQgSrTPAs8dVzZ8DfxtO5nPSomlBHzgXO2G/nZ40wFXjNefTfQ3+y0/tDJovb/zJ9hsL9wJzh7s6d12iStFwFBIL5K7K6VhR6axDcw8y281q7eGuoPx5uKel2Uq3azqEo1w9h2M9EQAAAN0WfZZoYgwnjc/QNgE8DYDtCSE4NZ6iFuo2yl6P2r9Etxa8k7cmhbfC7/+QOUaJRckIFT9BYoJZ8opNMAiUBLyc1vR4+V8+7zcSaYDl4gVz2vGl0lKNOYBOWbFT+M+H86JPU5I9rs5Pg0cyUPzs9xFkyOj1OvOA2TByGAOW33JS9Dz8eR2YlxV2YIfnbsmg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kFRjAIN4x2ovsvrwkmnVIs0DmFRQtB3Fj0wNb2JsmpceC4R0rin2InsCP+OPRWuRkcKlcjhXsw3ZvgD8h0xlsgUne/Z/cGgftKlUzmKVFCbMlJbwpWadYFSvOyWjpwdNrS/C06CEvtEQgCgJs6cfZyOjNRyPSqNyP8eKniSuVqF5wGEQfGlK0wWe5hsVXes2SVTWexS6PEhHjUK3nIwu0VdhGKxU/7zfnUS9xETrsTvWcV8hJ1qX/TGQq6almuU5gF+ndHO2cYyyxMqMrw55PxvSQFQto6a3HsIuaxoz6KyfZC0uhiL66PpBvupPtxEA3hOJszQk0GBIpN3RUByNlg==
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "Andrew Cooper" <Andrew.Cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 07 Feb 2022 14:45:43 +0000
  • Ironport-data: A9a23:d/vyD6mTTnH9RlklpfZ6hsvo5gxfIURdPkR7XQ2eYbSJt1+Wr1Gzt xIXXD+EOqneYTDzcot0aoTlph4E6MfUz9FhSQc/+CBjRCMWpZLJC+rCIxarNUt+DCFioGGLT Sk6QoOdRCzhZiaE/n9BClVlxJVF/fngqoDUUYYoAQgsA180IMsdoUg7wbRh2NY32YLR7z6l4 rseneWOYDdJ5BYsWo4kw/rrRMRH5amaVJsw5zTSVNgT1LPsvyB94KE3fMldG0DQUIhMdtNWc s6YpF2PEsE1yD92Yj+tuu6TnkTn2dc+NyDW4pZdc/DKbhSvOkXee0v0XRYRQR4/ttmHozx+4 I9c66PtaBk1B6fnm886dQZoLRsuO6ITrdcrIVDn2SCS50jPcn+qyPRyFkAme4Yf/46bA0kXq 6ZecmpUKEne2aTmm9pXScE17ignBObmO5kQtzdM0DfdBO4OSpHfWaTao9Rf2V/cg+gQRqiDP pNDNFKDajzfUyVPY2cbA64Oo8eDhlnHMANfskiK8P9fD2/7k1UqjemF3MDuUsOObdVYmACfv G2u13T0BFQWOcKSzRKB82mwnanfkCXjQoUQGbaksPlwjzW7xGYeFRkXXluTuuSihwi1XNc3F qAP0nNw9+5orhXtF4SjGU3jyJKZgvICc4BBTdJnyR+R86D/4C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t5 uIHZIeNDXxZ2IK8PoT4mODYqodKA/sytHWuQ/cpU0dMz2Dc8tbnmBE4p7wKDwMeOFBb6BJcq a01458iBeLX28YVci/DmltZZm4mzWa/KiWGCLvHnQcmXGzsQ8=
  • Ironport-sdr: ha34woI5ICOzLwqm43c++QiipTZ20Mn/Ka2t9Slbr7ZGkQndwe+c9S5R0NEeqcq7pZog1jGl9C JwRt0aJ48I9lBefUKu0mkUQ6MLJwKZiwySn+qxpVydEL2lqmC01c0cyrooZhBGKpopKizJaTD+ RRFaIEufeA5V1/OP7zUdppbp2F1SKGPQcp+FfWa6YUKq1BtseJVr6D8e1Gyi2hxLyeTXCKKCH+ USFcrX6LX105mM6FSqUQ8tbUyUy/TaRHqZnkLyv63Sjl+jBKJ1aE7B3nttT+RaAr9PPCHe72Aa mXCBF+6LAQmj3IMmMw2OHtgI
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHXcbg9+9E9Zp3QUEWtGX2TK6aCNayGy30AgAJnLwCAAEyRgA==
  • Thread-topic: [PATCH 08/16] x86/P2M: PoD, altp2m, and nested-p2m are HVM-only


> On Feb 7, 2022, at 10:11 AM, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 05.02.2022 22:29, George Dunlap wrote:
>>> On Jul 5, 2021, at 5:09 PM, Jan Beulich <JBeulich@xxxxxxxx> wrote:
>>> --- a/xen/arch/x86/mm/p2m-pod.c
>>> +++ b/xen/arch/x86/mm/p2m-pod.c
>>> @@ -1135,6 +1135,12 @@ p2m_pod_demand_populate(struct p2m_domai
>>>    mfn_t mfn;
>>>    unsigned long i;
>>> 
>>> +    if ( !p2m_is_hostp2m(p2m) )
>>> +    {
>>> +        ASSERT_UNREACHABLE();
>>> +        return false;
>>> +    }
>>> +
>>>    ASSERT(gfn_locked_by_me(p2m, gfn));
>>>    pod_lock(p2m);
>> 
>> Why this check rather than something which explicitly says HVM?
> 
> Checking for just HVM is too lax here imo. PoD operations should
> never be invoked for alternative or nested p2ms; see the various
> uses of p2m_get_hostp2m() in p2m-pod.c.

The fact remains that it doesn’t match what the patch descriptions says, and 
you’re making me, the reviewer, guess why you changed it — along with anyone 
else coming back to try to figure out why the code was this way.

If you want me to approve of the decision to make the check more strict than 
simply HVM, then you need to make it clear why you’re doing it.  Adding a 
sentence in the commit message should be fine.

 -George

 


Rackspace

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