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

Re: [PATCH] x86: Fix build with the get/set_reg() infrastructure


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Fri, 21 Jan 2022 12:03:08 +0100
  • 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=fADn9GlWOerDlTAiYeA8/pCPTqEWlEGsluBmxSqEpH8=; b=RkyugARhyB3VVnG+xYS/U1Izz7hj3DdjVLBCUlpbdjTkYEHByZNXS/T9VFTfjOWKRtTVRlyfe54UTd+VDIMDVcv5xFRDrOLffqtTMPOrTeFEDJ18nqrb8tpg7DdUCqinkz3mQW+NsfHKQgJGAIky7KR+tfTqJA4uWfzWceYCzxF0+Xv/6yDb/o5rsOa3gsbh3kNePg+pbuWlIKiPBH79mvLVllA4wFKDhVBUhYJHAnGS47r63J2Q+FUWLLVN+caDkZW3Db9c55OFZ5XiUzDSfJQZ1JGtorem1fBMuehWJcKIPcaoDZFvnbXpK+2GDfJ2aOfxELLkAPo3foky/HpyRg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WP9ohjwgjirhCQD4+/QX6jBkvIBz8KYc7xz+jTKfB8SEyuyOI2lKzqINyNItQ5Vk3Y/7yad3vVkIrupIKMWxLRkxKps9/eCmYRhIx+GBwOcS/G144fBQsF7qnnaI+Uo8eLt6FGtJtZcmCPBzi68YSsJ4Q+l33uwW2k933xOEQfeGA8uZ4/XREUy1p9RaksW5SAejGOF080BovbNNz6Sa4pka4PMzvFWLIG9kEXGRm96hxqDmdKvKpa3tK+ZNmfi2F9GYwXUnV87hsDTROYEq7ZdGPncrO8PAiDzl8h4eqSD5vz56eBY8OhwGBzJmYEb9YRg0Ah1fmRy9qw9oOiaCkQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 21 Jan 2022 11:03:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 21.01.2022 11:49, Andrew Cooper wrote:
> I clearly messed up concluding that the stubs were safe to drop.
> 
> The is_{pv,hvm}_domain() predicates are not symmetrical with both CONFIG_PV
> and CONFIG_HVM.  As a result logic of the form `if ( pv/hvm ) ... else ...`
> will always have one side which can't be DCE'd.
> 
> While technically only the hvm stubs are needed, due to the use of the
> is_pv_domain() predicate in guest_{rd,wr}msr(), sort out the pv stubs too to
> avoid leaving a bear trap for future users.

Well, as said on irc - only the PV stubs ought to be needed if the
conditionals always used "if ( is_hvm_...() )" / "if ( !is_hvm_...() )".
Despite us making use of this property elsewhere, you appear to dislike
that though ...

Hence / nevertheless:

> Fixes: 88d3ff7ab15d ("x86/guest: Introduce {get,set}_reg() infrastructure")
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan




 


Rackspace

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