[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/shadow: Fix build with no PG_log_dirty
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Fri, 24 Mar 2023 09:18:11 +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=iTVNNMycHqTIn2v/5I7BzpKHYH+ogCbNoOIpQtsiZpI=; b=ejZzn9vVtWjoQJSCXYTEaBnlLTpA3mSIUdIKaUn7r1ROWvUwmIKq1SfdVZUZHkz7LMXFTH0TpgMjUTZ1Ytm2fbgWwLMMjkyMMQIFG7L7e44CouQ+1p8dq7nL0U8VYe9AtxSxpUaDMaRtddZvfK6oPsnOrDhW/YEY0ffAIEHKHBDNA2Idl58IEPVrltXGf1ekceZyqHDHqjL4lI/Dx/5qcmhcpFoVORKLmWLscK4otUmlmYjI4HMeYrllHQzvwW58iAKDzRCjiqNgn5KWvlJMFsPMboDPJyDRnFLY4tQ0XVhn5OtJjEW3ZiWtpiHhNBXXwgryd17FG/UGC5XTq4LHaQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KOaWiPHE4WWXQI8t0mdPNIUFE+ntXFTHwZzMlT5kSTwNAU9+711tYD1K4gciImiMxhyOdOXXfv+AxpYomHqC4UXb12FmtfdgYIL+sbVaz+vz2DTC6J7fAl8L5yUAs6eN/OVxQgFEM26mMLhJotaEEoQ7ptgFzpz26Xe0Wg6VtzXMykcE7ZyS41qpTXeNEFIqs3l4XRuWbJUtuuDreTymfb/+qgMcAHK0qCYjSKb9t6D6NTlU8zA1P2YLTOWBsYt8iGtluXPHAFI0qCh5vKakIBm3hQgOl3342dveS6n9nG8QTnCXY953bGUkStQiu+kEuv3UA8iLO2DqL7EnuPgRBQ==
- 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, 24 Mar 2023 08:18:21 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 24.03.2023 00:46, Andrew Cooper wrote:
> Gitlab Randconfig found:
>
> arch/x86/mm/shadow/common.c: In function 'shadow_prealloc':
> arch/x86/mm/shadow/common.c:1023:18: error: implicit declaration of function
> 'paging_logdirty_levels'; did you mean 'paging_log_dirty_init'?
> [-Werror=implicit-function-declaration]
> 1023 | count += paging_logdirty_levels();
> | ^~~~~~~~~~~~~~~~~~~~~~
> | paging_log_dirty_init
> arch/x86/mm/shadow/common.c:1023:18: error: nested extern declaration of
> 'paging_logdirty_levels' [-Werror=nested-externs]
Okay, that's SHADOW_PAGING && !HVM && PV_SHIM_EXCLUSIVE - I can see
how I missed to test that case.
> Move the declaration outside of #if PG_log_dirty.
>
> Fixes: 33fb3a661223 ("x86/shadow: account for log-dirty mode when
> pre-allocating")
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> An alternative would be to double paging_logdirty_levels() up in the else
> case, returning 0. The underlying logc in shadow_prealloc() succumbs to DCE
> either way.
I think I prefer the way you have it.
Jan
|