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

Re: [PATCH 2/3] x86/pv-shim: don't even allow enabling GRANT_TABLE


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 7 Dec 2022 08:21:41 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Aae2oNc6SwZ7Ne852HQ9+2mfyLhFNsg/ooqdacaySck=; b=j1su1yBNRXFLVNQqxTgTeWSJScyt4rRmtfCFkjrUg/gfmaoUVPh1OXo26HWRcIcnliPbHApRB+HOjkz91qmwPwLfpYFnSsuIuFkCboaAlGWjTFTn+KLejQUOYVv+ThbkFHXVCKRFSTwVHYISuePszQ/Z6PkjOl6ArPM28n6AflWBbjbW0zsttj+LW6rj3sGx8VIEMWAoLF/x6O4VNxFdPEz2GZXT/rNT8ki8xYL8xHhEY5J9uDbmevVtsuQKPA9V3iQArJ0Sa9NRRcuupikxTMwA9g7uHNJ1qvTSeWkWjYAqmv8lf6E3DOdjhSJgRVCdylRdtKXrgQoqHSjN4L6Xjg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lmvdRQZ/k4wXVOSEt/Lx6dQkcx9MfOylWz+SJL6ZFcTrZmGeOfe9IXus3EIGfDqj7MxADdAxvmI++ywzTra2F/TmjaBgnEla0M/5xgHkJCXq1LPTedqZN8rnSKOJ/cmVV/79ascVXWgWsP/O7cF8geAlzkuL/yiCzbRX1s5JA9fgzbZweeBKg1BNbHwposDjkSZAf87a8oICLFv3uomxsdTOoklFfKf1YMSoBh7vg480E11z46OTwQB+3zYjpLqV3nBRnZSqmdn5BkUl7Wok7VvGSuoMLk2Q83fLGo11ZU+gY/qZ51EH5p5c35ji7+d04YKDu170rQms0sgnhxBcTA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: George Dunlap <George.Dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 07 Dec 2022 07:21:48 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 06.12.2022 21:26, Andrew Cooper wrote:
> On 06/12/2022 14:30, Jan Beulich wrote:
>> Grant table code is unused in shim mode, so there's no point in
>> building it in the first place for shim-exclusive mode.
>>
>> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> nack.
> 
> This is bogus, as is every other "depends on !PV_SHIM_EXCLUSIVE".

But why? Doing things like this in Kconfig is exactly ...

> The only reason I haven't reverting the others so `make allyesconfig`
> doesn't disable CONFIG_HVM, is because I haven't had time.  This change
> further breaks allyesconfig by disabling GRANT_TABLE too.
> 
> PV_SHIM_EXCLUSIVE is a simple option for a bit of dead code
> elimination.  It is not valid to be used like this.

... for the purpose of dead code elimination. By nack-ing a change like
this (and by having voiced opposition to earlier ones) you simply call
for yet more entirely unhelpful #ifdef-ary. See the last paragraph of
the description of patch 1, half of which this change rectifies. The
solution on the evtchn side, unfortunately, looks to be #ifdef-ary,
short of there being a suitable Kconfig option.

Furthermore Kconfig, in my view, is specifically intended to allow to
prevent the user from selecting entirely bogus option combinations
(and even more so suggest entirely bogus configurations by bogus
default settings). If you disagree, then I'm afraid we have a 2nd
Kconfig usage topic which we need to settle on in a project-wide
manner. If only we ever made any progress on such ...

As to allyesconfig - I can see your point there, but then arrangements
need to be invented to avoid this kind of unhelpful behavior.

Which raises two questions then: Would you view

 config GRANT_TABLE
        bool "Grant table support" if EXPERT
        default y if !PV_SHIM_EXCLUSIVE

as acceptable? I could accept this as a (perhaps) temporary compromise,
until the general aspect was settled. And what about the different kind
of change in patch 3, where allyesconfig isn't affected (afaict)?

Also, as a wider scope remark: In general - and this particularly
applies to cases where you feel like nack-ing things - comments on
patches want to be constructive (and thus actionable, pointing out
possible ways for the author to re-work things such they would become
acceptable while achieving the same goal; see the first of the two
questions above for a possible example). There's nothing constructive
in your response here, nor was there ever (afair) in earlier nacks that
I received from you.

Jan



 


Rackspace

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