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

[PATCH] xen/x86: fix build with CONFIG_HVM=n and -Og


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Thu, 13 Feb 2025 13:50:54 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=b/uhVK9NgT8GwhuKpNpJ8pSi1VhbJT7goWnfz7eyFlY=; b=o5Tz+7eUJSLIkHtwdlRClT8dIPiLgQ6i+wh2q1vv9xQQeDNEluyNdWEWQhhOSKB0fGlDtim/q1MrzgpO/fftmzxWa7F6fsjTSlvjJap4go2mtLn2A5BX+SN7heQK5vLqWurgA0dxTyz8eT3OVZi4J8RRcL32XiciaEH+29PFKhLcPIfFgpbcrcVDIh244CUYdeB50ikJ9KZkKsEY7eyuPKJrweJLRvwODRB0+4M9ly9037uhP71f0WMDTh/4khS7+TVO9uWcasSDBXEApJA8mjd3OCfOGMZc1tvUGr2BZuCG/flqPnexctGQapbtugdBSW1b4lG03qRzX2WEbW9/Xw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=egboLFpNsPK6IbL8mbtc/9JAhJsOmik7wQCLGLQWkw4k79A2gf+dk5Z3GGUUD+a8cVnkY0ccRv1ZOTDpm7D9xTu+3hsqggHfy65V3WtNbyM/c+AF5KVBTrXV1RcyPt+xjwFilFqv/Jhi4/ZD4vV59Oo0O7Q8lycPX8qho45v9JkOQlTbebpvaALAqDXXRVY2A7dvsOiwklE22k9ufp1VL5G3qsWOQNY0bwM2iwyOuvbwJkHe7aAImXOuuU4SBZ8Sa4CdA7sRGqkKWVOyI7nxVeLAP3U0zF4e+EPm0YFbYVvsvL5etzB2RDi3N1hxW+BXjbGznzQAqjsz7KFc5E4y9g==
  • Cc: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • Delivery-date: Thu, 13 Feb 2025 18:51:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

When building with CONFIG_HVM=n and -Og, we encounter:

prelink.o: in function `pit_set_gate':
xen/xen/arch/x86/emul-i8254.c:195: undefined reference to 
`destroy_periodic_time'

Add an IS_ENABLED(CONFIG_HVM) check to assist with dead code
elimination.

Fixes: 14f42af3f52d ("x86/vPIT: account for "counter stopped" time")
Signed-off-by: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
---
 xen/arch/x86/emul-i8254.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xen/arch/x86/emul-i8254.c b/xen/arch/x86/emul-i8254.c
index 144aa168a3f0..7bc4b31b2894 100644
--- a/xen/arch/x86/emul-i8254.c
+++ b/xen/arch/x86/emul-i8254.c
@@ -191,7 +191,7 @@ static void pit_set_gate(PITState *pit, int channel, int 
val)
         case 3:
         case 4:
             /* Disable counting. */
-            if ( !channel )
+            if ( IS_ENABLED(CONFIG_HVM) && !channel )
                 destroy_periodic_time(&pit->pt0);
             pit->count_stop_time[channel] = get_guest_time(v);
             break;

base-commit: b5b2f9877a8777af6b78944407527e0a450389a2
-- 
2.48.1




 


Rackspace

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