From nobody Mon Nov 3 06:32:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1731095942; cv=none; d=zohomail.com; s=zohoarc; b=KlNve4XHzeiOExINuuV4tegbmXAVwjmhPRbeSuqYLfuFaQiZqDUcD0toYmP8e+wzTpP+HX3QNfu6HYuvZ7tD+OFukk6UefdrDPnQf3Zyk1kN8DYuJ03Bk6s2ds9yP42GndVpWoQK+xIXgCMxb04rNgfDRIVb94STMpoAvw0mZw8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731095942; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=bYie9AcBWI2S7AR0N11MSukBCPDyuxvyXWxJgl6q148=; b=EjzA60fHCmgBjBks2NCZ2xRU+v9e7YWjL2qICqWNobVwgSq/8nuYza9vYj1//Nh55+M+cqhmpo68SQ9Yl+7Zhj1Mcy7YUT5qam4EvTq+zeF1LDOEaPefNMfWWy2N9RmwOWxenyXmiCrPTPOcTS5XhKjJIBj9tl520nJGckpbx/o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1731095942502342.80840192736673; Fri, 8 Nov 2024 11:59:02 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.832772.1248055 (Exim 4.92) (envelope-from ) id 1t9V7q-0008Tq-6U; Fri, 08 Nov 2024 19:58:34 +0000 Received: by outflank-mailman (output) from mailman id 832772.1248055; Fri, 08 Nov 2024 19:58:34 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7q-0008Tj-3g; Fri, 08 Nov 2024 19:58:34 +0000 Received: by outflank-mailman (input) for mailman id 832772; Fri, 08 Nov 2024 19:58:33 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7p-0008TS-1R for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:33 +0000 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [2a00:1450:4864:20::631]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d2629bec-9e0b-11ef-a0c6-8be0dac302b0; Fri, 08 Nov 2024 20:58:28 +0100 (CET) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a86e9db75b9so407484366b.1 for ; Fri, 08 Nov 2024 11:58:28 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:26 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d2629bec-9e0b-11ef-a0c6-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzEiLCJoZWxvIjoibWFpbC1lajEteDYzMS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQyNjI5YmVjLTllMGItMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxMDk1OTA4LjUwNDU4Nywic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095907; x=1731700707; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bYie9AcBWI2S7AR0N11MSukBCPDyuxvyXWxJgl6q148=; b=Ce34HUJi51sY9h8GqrU1K0EhG99I1+zcKK5euEZUzoMHv6AJH/JvE/Q/cktReb9NXr N/gJ7ZpFL+iAqBK8DglC8yhoKk5EmWL+9/UjLKWO/WWPJ8rtZ5w8TSn5pcaMjYB2+uyY +6Igp8ARu3/Tisu0lbLSwKPf8uFXoNjcvAwP8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095907; x=1731700707; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bYie9AcBWI2S7AR0N11MSukBCPDyuxvyXWxJgl6q148=; b=fK9EfM2Ue8Dtm06NW8UCezWIYknL8RBsQnu4oXWi/zhCi5X3OL1tTBBE80AEXdSK1i jd4kNGdHppqHsDdVhX24gMNVZbuwCJjS1ijxrKpgRQjjws4tLQD2k4ACCOR6QTD/Dlxk KVXXJS1zt8kTE1RNtGHXEXVBpUFW6JlhfuTmIjAkqm6qv5olb3T6gu0DkXsCl9jjZq0s C1sxZ6QyhSjq2UDVn59jWoeV9ieOGJmDqXSuQwdb5s8bJr8sWHR3oY+SDtDwKCg3qYvn qtVy5Jz21IPrdijGjwR4wDhxoIRgk7yJZgoJpVT3OpvRqoNzkbvDhUtYPHtGvYBcU4QW 5tmA== X-Gm-Message-State: AOJu0YwR3DqiC6nvrMy6hFktJnBOwbzfuLVLNIk2Dpz5rGZNSap+KzlB xDjn+oPfVcjZ/+IOvziEq5m3e52YQRBw0Af3OordR2sjfTyv1W2k/GfoyBr93JEEodLcEgnHUsm a X-Google-Smtp-Source: AGHT+IFkwDRG0JuBnQUiz375sbx3PWclHmsV85IVLpeZpU/Z9XZFyOAYTDVEGQOuTd8OzCcEOvwLMw== X-Received: by 2002:a17:906:f598:b0:a9a:20b4:4078 with SMTP id a640c23a62f3a-a9eeff0da70mr350698466b.16.1731095907494; Fri, 08 Nov 2024 11:58:27 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 01/10] VT-d: Drop includes of mach_apic.h Date: Fri, 8 Nov 2024 19:58:11 +0000 Message-Id: <20241108195820.789716-2-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1731095942846116600 Neither iommu.c nor quirks.c use any functionality. iommu.c only uses it to transitively include apic.h and io_apic.h, while quirks.c is only depending= on the ACLINUX wrapping of strtoul() which we spell simple_strtoul() everywhere else in Xen. No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/drivers/passthrough/vtd/iommu.c | 5 ++++- xen/drivers/passthrough/vtd/quirks.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/= vtd/iommu.c index e13be244c130..27a4d1640189 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -31,12 +31,15 @@ #include #include #include + +#include +#include #include #include #include #include #include -#include + #include "iommu.h" #include "dmar.h" #include "extern.h" diff --git a/xen/drivers/passthrough/vtd/quirks.c b/xen/drivers/passthrough= /vtd/quirks.c index 950dcd56ef8a..dc3dac749ce6 100644 --- a/xen/drivers/passthrough/vtd/quirks.c +++ b/xen/drivers/passthrough/vtd/quirks.c @@ -32,7 +32,7 @@ #include #include #include -#include + #include "iommu.h" #include "dmar.h" #include "extern.h" @@ -321,7 +321,7 @@ static int __init cf_check parse_snb_timeout(const char= *s) else if ( strcmp(s, "cap") =3D=3D 0 ) t =3D SNB_IGD_TIMEOUT; else - t =3D strtoul(s, &q, 0); + t =3D simple_strtoul(s, &q, 0); } else t =3D t ? SNB_IGD_TIMEOUT_LEGACY : 0; --=20 2.39.5 From nobody Mon Nov 3 06:32:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1731095935; cv=none; d=zohomail.com; s=zohoarc; b=CHBV+/VjgcPgvaK+zbP2l1yTOQL+NqOQ9uuF27wSzOLNpoV5yKG6GSgMdL7oz2M52n+IU5wyQ4GcnpNK8UlQFbJvZpzamQFLcR25VOeBrLvIm8Lzcb9g0TevIwp5GR3Jx2UwhxyWJgB4Th/8kkWggmMO6pvNnZKr+huR0GIz8CM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731095935; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=G+dFm0a0Fhh1qywKmm6kV9dHHbNP/gyGU4Edu50c+o8=; b=PEkEQqPZsSySmV4Rysw/u1Gg2EjpcR+zUFyXCeDTnyj6UHaRYZSBTLZCFKRkkj44KieJLKXYKGiNyTiAKqfwdt7t9Yn2HYtKM/LuteC6wRzoIjfUE7O4cvb2XTaiAreOkL+sZxXlsVIfj4ygg37Yt3xxrcmykT1KYOK93fcePmI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1731095935330334.58208164156963; Fri, 8 Nov 2024 11:58:55 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.832774.1248071 (Exim 4.92) (envelope-from ) id 1t9V7r-0000JY-Nk; Fri, 08 Nov 2024 19:58:35 +0000 Received: by outflank-mailman (output) from mailman id 832774.1248071; Fri, 08 Nov 2024 19:58:35 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7r-0000Id-HA; Fri, 08 Nov 2024 19:58:35 +0000 Received: by outflank-mailman (input) for mailman id 832774; Fri, 08 Nov 2024 19:58:33 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7p-0008TS-LG for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:33 +0000 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [2a00:1450:4864:20::636]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d3b31170-9e0b-11ef-a0c6-8be0dac302b0; Fri, 08 Nov 2024 20:58:30 +0100 (CET) Received: by mail-ej1-x636.google.com with SMTP id a640c23a62f3a-a9ef275b980so182263366b.0 for ; Fri, 08 Nov 2024 11:58:30 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:27 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d3b31170-9e0b-11ef-a0c6-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzYiLCJoZWxvIjoibWFpbC1lajEteDYzNi5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQzYjMxMTcwLTllMGItMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxMDk1OTEwLjY5MTQ5Nywic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095909; x=1731700709; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=G+dFm0a0Fhh1qywKmm6kV9dHHbNP/gyGU4Edu50c+o8=; b=NDQv/yfhjL/mPnYvZESzX5bwfnOylZXbtS2WXzEHoXlElei9P85ky5cqIf+H06TxQ0 lu38xFp4dZusDq3lz4bw+MDGpIg0/G345oDbMG+Bjl6E6Gb1lTUcLEnHJuZEIQZL5fZ6 8+FDVkn39nqlnRH79qPbpDeFQqBPOYBUATUYY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095909; x=1731700709; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G+dFm0a0Fhh1qywKmm6kV9dHHbNP/gyGU4Edu50c+o8=; b=MqNZmvSE1/Fg/gu3pWpQ7WjVxRU9XkNyQckRr0rM1YlLqfYeGPmC5ClhcLmivaro4D WKRBqRFwBaTZXCheHe6hYXaiPMm/yEt6SIW2F1a/sLIr7Nu5KtiazS+7pMUpg22N0VcK o8+aHEZ88y8Pok67W70RnhCOAozHs/R/gYM/pyQDVRVV5KYYeEyb1Tn/ss7n301xOXQX JTioPOXTRdqYLNbQKLUfmgXpMEdTln1G/Ccbz5Pfnc9dC7bKkF6qGWZs2yGgwUmyOrsb I2Rd2ukacpzNxRmU57sNfEPajNbUnb40vlQp8CJtubkKbrXFSZatoY6bAci+82c6AnCs WKtg== X-Gm-Message-State: AOJu0YwDlOv2oAzd0Z5k/n+k4GOJ8C7l3AKUhaZLIs1v2hr6MqxrNCg1 AxnSC6IUh+VDlGtAE8sAlSGJMYd7G709eQ3EpO8ckJr2nLi10WzN8ZqFECtZ+tJ5OXxOgOqgvRG W X-Google-Smtp-Source: AGHT+IEOhqfnb4iyEIZTlMK8aPLGxI8ZmGPT7RBh1fXdTFrp3d4nBhxCGtT3Ce/bAkTP4y3ZJ54+5g== X-Received: by 2002:a17:907:3e1d:b0:a99:f861:ebd with SMTP id a640c23a62f3a-a9eefeebe5amr408994766b.14.1731095909312; Fri, 08 Nov 2024 11:58:29 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 02/10] x86: Drop includes of mach_apic.h Date: Fri, 8 Nov 2024 19:58:12 +0000 Message-Id: <20241108195820.789716-3-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1731095936902116600 A number of files don't need mach_apic.h at all, or only need transitive dependenices. Drop the includes. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/cpu/common.c | 1 - xen/arch/x86/cpu/intel.c | 2 -- xen/arch/x86/genapic/delivery.c | 3 ++- xen/arch/x86/hpet.c | 3 ++- xen/arch/x86/smp.c | 4 +++- xen/arch/x86/x86_64/acpi_mmcfg.c | 1 - 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/cpu/common.c b/xen/arch/x86/cpu/common.c index ff4cd2289797..067d855badf0 100644 --- a/xen/arch/x86/cpu/common.c +++ b/xen/arch/x86/cpu/common.c @@ -18,7 +18,6 @@ #include #include #include -#include #include /* for XEN_INVALID_{SOCKET,CORE}_ID */ =20 #include "cpu.h" diff --git a/xen/arch/x86/cpu/intel.c b/xen/arch/x86/cpu/intel.c index 807b708217e9..6a7347968ba2 100644 --- a/xen/arch/x86/cpu/intel.c +++ b/xen/arch/x86/cpu/intel.c @@ -14,8 +14,6 @@ #include #include =20 -#include - #include "cpu.h" =20 /* diff --git a/xen/arch/x86/genapic/delivery.c b/xen/arch/x86/genapic/deliver= y.c index 3def78f380d3..7bb7bd658650 100644 --- a/xen/arch/x86/genapic/delivery.c +++ b/xen/arch/x86/genapic/delivery.c @@ -1,9 +1,10 @@ #include #include + +#include #include #include #include -#include =20 /* * LOGICAL FLAT DELIVERY MODE (multicast via bitmask to <=3D 8 logical API= C IDs). diff --git a/xen/arch/x86/hpet.c b/xen/arch/x86/hpet.c index 2f54d3188966..51ff7f12f5c0 100644 --- a/xen/arch/x86/hpet.c +++ b/xen/arch/x86/hpet.c @@ -13,11 +13,12 @@ #include #include #include + +#include #include #include #include #include -#include #include =20 #define MAX_DELTA_NS MILLISECS(10*1000) diff --git a/xen/arch/x86/smp.c b/xen/arch/x86/smp.c index 04c6a0572319..bd337e548c5a 100644 --- a/xen/arch/x86/smp.c +++ b/xen/arch/x86/smp.c @@ -14,7 +14,10 @@ #include #include #include + +#include #include +#include #include #include #include @@ -23,7 +26,6 @@ #include #include #include -#include =20 /* Helper functions to prepare APIC register values. */ static unsigned int prepare_ICR(unsigned int shortcut, int vector) diff --git a/xen/arch/x86/x86_64/acpi_mmcfg.c b/xen/arch/x86/x86_64/acpi_mm= cfg.c index 7b0904622931..7fe5663c5984 100644 --- a/xen/arch/x86/x86_64/acpi_mmcfg.c +++ b/xen/arch/x86/x86_64/acpi_mmcfg.c @@ -37,7 +37,6 @@ #include #include #include -#include =20 #include "mmconfig.h" =20 --=20 2.39.5 From nobody Mon Nov 3 06:32:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1731095941; cv=none; d=zohomail.com; s=zohoarc; b=TTr9XDG0xOx/26TA+HFooo8pmAGdN+sqcDSXfVW3BdfFVepDOVlNEsLaXJ5z9Q7ktwQHFalhtPyfbteLphobxMJcDI4IbccE3w+eQ/oteMs0kJURuMETIe/dg5LEUrjW+vEtwbW+T22qMO3eevh1+tuFWYvkmK+z6WL5WtWovu0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731095941; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8ANEYUxwjZbcuyDzK95iBxFnfD77BA80c4Ql6FKNyVY=; b=cZmjQz/iU2A7qHYClahQOb0bjHQQ2WjXSZ+NEp41XKq3zRK1yXx8kpZ7xXY7iCO3gMneXlkOQk7AMVwOg2vA9wm/fOSuT1vp+R2UFrrQyJYxA6UsKdOUJcSfTbp+UDMgDhl/aeBKUyzRlOPbIPQ0lDb3KQDyS/wiXLWumW4ubTI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1731095941002464.18517785941117; Fri, 8 Nov 2024 11:59:01 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.832775.1248078 (Exim 4.92) (envelope-from ) id 1t9V7s-0000Qt-61; Fri, 08 Nov 2024 19:58:36 +0000 Received: by outflank-mailman (output) from mailman id 832775.1248078; Fri, 08 Nov 2024 19:58:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7r-0000Ov-Rg; Fri, 08 Nov 2024 19:58:35 +0000 Received: by outflank-mailman (input) for mailman id 832775; Fri, 08 Nov 2024 19:58:34 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7q-0008TY-Kh for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:34 +0000 Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [2a00:1450:4864:20::635]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d3fe9871-9e0b-11ef-99a3-01e77a169b0f; Fri, 08 Nov 2024 20:58:31 +0100 (CET) Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a9a6acac4c3so398705466b.0 for ; Fri, 08 Nov 2024 11:58:31 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:29 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d3fe9871-9e0b-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzUiLCJoZWxvIjoibWFpbC1lajEteDYzNS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQzZmU5ODcxLTllMGItMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxMDk1OTExLjIxNjg2OCwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095910; x=1731700710; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8ANEYUxwjZbcuyDzK95iBxFnfD77BA80c4Ql6FKNyVY=; b=BzHdf4eau3mQ9MSmW+wGMIKnt/j/G8pRH8M0nzA4Ax0jiAuJH01aNrn38dElxJANyf x6d6pZKLauaBKloOatjT8Fsi7iiIrKrzYx0cpo848G8Fc6l6MWKjRlkTHjuO8PlPEBN2 BGPYueM7q7QcdpZvHw1UiFCPU1niCAmw/KGWw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095910; x=1731700710; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8ANEYUxwjZbcuyDzK95iBxFnfD77BA80c4Ql6FKNyVY=; b=cNGrbLLHq/lAwSVylnpjP3qEMmpkhW3Cy7hgfoCA0DiCcqWna8xvb7K48oTJxSrbQG ogmjPk/NWebNwQmicKdC36/0TdiOyVfKkrXjMcamCj24cg6R4pIydoNswdaaR6qx0AHx /0NTf5o5iPrj5IakPSikMt+83q/0Me05IRTuEqX6ZsJ3aJzocPNBnCVlGKFEaPrkXRpq Hh6l2QIymDro6oS5kIMvlhwLa77dsMcwWDqdYAUHg3OBvVE/WFNkBgvDaJR3WIxZEIkE ZL1+7l2bFSdN2k6jDbsb6wg1k0buAm9R4S0t1HBiFXmWjkAKx5vbEjpStmOM/Wr0PzAf Yhng== X-Gm-Message-State: AOJu0Yz1a7MaXmjRRmWpbQ6EBOKLhoTTlx845bnT+uWEq/Q38ykSE0es 86CHYSsJYiiG4KLlk1zxEsFR/sumFWhtTjrc8WtelQBxjq7pye6Rvq2FAxRGWhUY5qxZ0do8Ov4 / X-Google-Smtp-Source: AGHT+IFvX9tGeHDVwmSP4Z5fuOX3wsaPvxwmr8qKx24X2101fA9FQ0Q9PeAvSGbtqqCLnc23lSzhVw== X-Received: by 2002:a17:907:2da7:b0:a9e:edcf:b7c8 with SMTP id a640c23a62f3a-a9eeffd8f7cmr397363166b.44.1731095910024; Fri, 08 Nov 2024 11:58:30 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 03/10] x86/mach-apic: Move generic_*_probe() declarations into genapic.h Date: Fri, 8 Nov 2024 19:58:13 +0000 Message-Id: <20241108195820.789716-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1731095942865116600 ... as the implementations are in genapic/probe.c This covers the only functions that both setup.c and boot.c were including mach_apic.h for, although setup.c was depending on io_apic.h transitively t= oo. No functional change. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/acpi/boot.c | 2 +- xen/arch/x86/include/asm/genapic.h | 3 +++ xen/arch/x86/include/asm/mach-generic/mach_apic.h | 3 --- xen/arch/x86/setup.c | 3 ++- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/acpi/boot.c b/xen/arch/x86/acpi/boot.c index 170f9783c55e..3901f9d9825b 100644 --- a/xen/arch/x86/acpi/boot.c +++ b/xen/arch/x86/acpi/boot.c @@ -38,7 +38,7 @@ #include #include #include /* for hpet_address */ -#include +#include =20 #define PREFIX "ACPI: " =20 diff --git a/xen/arch/x86/include/asm/genapic.h b/xen/arch/x86/include/asm/= genapic.h index 4d39fb9a244b..6c8845d17d27 100644 --- a/xen/arch/x86/include/asm/genapic.h +++ b/xen/arch/x86/include/asm/genapic.h @@ -51,4 +51,7 @@ unsigned int cf_check cpu_mask_to_apicid_phys(const cpuma= sk_t *cpumask); void cf_check send_IPI_mask_phys(const cpumask_t *mask, int vector); const cpumask_t *cf_check vector_allocation_cpumask_phys(int cpu); =20 +void generic_apic_probe(void); +void generic_bigsmp_probe(void); + #endif diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x= 86/include/asm/mach-generic/mach_apic.h index c0d8b232c9eb..50f39b72ccfb 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -39,9 +39,6 @@ static inline int multi_timer_check(int apic, int irq) return 0; } =20 -extern void generic_apic_probe(void); -extern void generic_bigsmp_probe(void); - /* * The following functions based around phys_cpu_present_map are disabled = in * some i386 Linux subarchitectures, and in x86_64 'cluster' genapic mode.= I'm diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index eac8488c4ca5..4feef9f2e05a 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -46,7 +46,8 @@ #include #include #include /* for bzimage_headroom */ -#include /* for generic_apic_probe */ +#include +#include #include #include #include --=20 2.39.5 From nobody Mon Nov 3 06:32:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1731095936; cv=none; d=zohomail.com; s=zohoarc; b=naCh0kaGa7JpfRGazvGpzdy5A8rVlpk9+qxaQjFLOh5wDfpkX7CPyAs4KqrHYgUIaqSasm+N2hV/5BdLJxzfK1fimRkQ0d0fkPPnLOEKRws7QKxuNHGiWs8mrZuK55Jv5hux7MHKVf4OD3R5RbEudkfYXM1jhF1b9wNQDDxe7aY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731095936; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=A+Sj7fLqtLlYMTst58VusJVJ11oM18S4VDVx3DGpYgc=; b=F2Y13KsOjJFSPvRzFlPdt4N4oBiWs4HUg7aP832Bm6smxeijpTvnQrPC0HePoc+pWMrapibxlLFiyeaaVxe4i/kfGqwYaJVANExtACyRMu7C7pz4N5Bv5vqe9+vi3A0T72Z6b+P/rl4UxDbOaZa3ZB/UB/QUvMjRmCkTGH6HMdE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1731095936129238.5171515053794; Fri, 8 Nov 2024 11:58:56 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.832777.1248105 (Exim 4.92) (envelope-from ) id 1t9V7t-0001Aq-VC; Fri, 08 Nov 2024 19:58:37 +0000 Received: by outflank-mailman (output) from mailman id 832777.1248105; Fri, 08 Nov 2024 19:58:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7t-0001A2-Oo; Fri, 08 Nov 2024 19:58:37 +0000 Received: by outflank-mailman (input) for mailman id 832777; Fri, 08 Nov 2024 19:58:35 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7r-0008TY-OG for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:35 +0000 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [2a00:1450:4864:20::631]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d4f1db93-9e0b-11ef-99a3-01e77a169b0f; Fri, 08 Nov 2024 20:58:32 +0100 (CET) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a99eb8b607aso355544466b.2 for ; Fri, 08 Nov 2024 11:58:32 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:30 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d4f1db93-9e0b-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzEiLCJoZWxvIjoibWFpbC1lajEteDYzMS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ0ZjFkYjkzLTllMGItMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxMDk1OTEyLjgwNjY3NCwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095911; x=1731700711; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A+Sj7fLqtLlYMTst58VusJVJ11oM18S4VDVx3DGpYgc=; b=cnmim8IgrX77bUd4N651Ed0MK7wWhtsWdadquSMzsih38NmdHU6S3niflAwgrYSp+j nHRaIbghcFa4AmpkI1GIvNYMu4hOw90lTxJB6ejtJ9LjDgD16yw1zHsDCu88OuvvPUUr /tKpcvEGxzCxRzkFYHqmLp0iYhUQ7pr3v53TE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095911; x=1731700711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A+Sj7fLqtLlYMTst58VusJVJ11oM18S4VDVx3DGpYgc=; b=KEpbMIEa5Hsxemr6IN9uMc647la0LQ8qAMoT8q92dd6lUep0hUGbDx6qyypmomeEk8 BgJoi7eEc6tgYZrTd7bOQCWp7R6CpE43gsld23IsdNypy0EyltJq1SL8lRNJXQej7ZGA bHF9K/CN994Tp4wEh4U+rgbyddTS3S47dwxfDcmjMP6ZZwb115GiyymlabufGP3QIzUv JD5x/JWsMcQ0sEPu3pwa45fHu6Ue/0wzejLfYnCaJ68v9ovcuKMG0wczCTfwSO21qsIa q+fTvFdqFuL6DJxFa1ImT/MyKei4Ae67swbg32C6bBOT/3ur8AFOx4sew9ft6OJbKzNu uLsA== X-Gm-Message-State: AOJu0YzrsSNBKeElfNFxFOt+k/D5pkSNKcTt8EiR5MtgxnFwdfo1jfEm pSSe4ZrmYmdhqGQ0PSZAIvSlM5mDcbFViHpQggWftdl71jN/Bfef1tUVU5p29kvPcyFS9b4DbUc C X-Google-Smtp-Source: AGHT+IEN4P6UyfNPOw3vCYe1Veh/DK4NTalWMNlzUMfZW1t3VfRK37PAGzQr1hTa51LcRzqaABQFtQ== X-Received: by 2002:a17:907:7f1f:b0:a9a:9ab:6233 with SMTP id a640c23a62f3a-a9eeff44cfcmr446772166b.34.1731095911424; Fri, 08 Nov 2024 11:58:31 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 04/10] x86/mach-apic: Drop apic_id_registered() Date: Fri, 8 Nov 2024 19:58:14 +0000 Message-Id: <20241108195820.789716-5-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1731095936822116600 It's an unnecessary wrapper. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/apic.c | 3 +-- xen/arch/x86/include/asm/mach-generic/mach_apic.h | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 254ab5d388dc..9f3a374e9581 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -495,8 +495,7 @@ void setup_local_APIC(bool bsp) /* * Double-check whether this APIC is really registered. */ - if (!apic_id_registered()) - BUG(); + BUG_ON(!physid_isset(get_apic_id(), phys_cpu_present_map)); =20 /* * Intel recommends to set DFR, LDR and TPR before enabling diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x= 86/include/asm/mach-generic/mach_apic.h index 50f39b72ccfb..3cf58d5f6b90 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -45,12 +45,6 @@ static inline int multi_timer_check(int apic, int irq) * really not sure why, since all local APICs should have distinct physical * IDs, and we need to know what they are. */ -static inline int apic_id_registered(void) -{ - return physid_isset(get_apic_id(), - phys_cpu_present_map); -} - static inline void ioapic_phys_id_map(physid_mask_t *map) { *map =3D phys_cpu_present_map; --=20 2.39.5 From nobody Mon Nov 3 06:32:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1731095935; cv=none; d=zohomail.com; s=zohoarc; b=VHlP6WcRrttjKiQ8pURXX4MsYu/7f1qptSDbpZL6VaUZSVO/ZapRkUPEEfqheSec8sJBuTMvGEOfY01L4xI9+1VqKvtfpxV3klwISnqFufW8Sw8PWjalwEavR+L2KBIinuFGT82c2I6Go+NdU9hzFJjo8V69flfrnryUqrrAN90= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731095935; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=AL3v6pBQgxthivHZltyBUNUpaHsfqdVQAfCymchp+Ls=; b=LOTtjZ6GIbiF61QLPdMhtHFUfUnd6kXEAzF5/EtB0DbFfSicgFvi8Q1vjQU2rcKDLcLoIm6ohg01VkvVupMziY4OvOG6Z8/GoDe7wapGivI1XVVRjNdLIl/D2TOPVua0jqUV+8ZL30M19QD39R9KQxOkXeXkWeOteGQyKY6GN3U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1731095935073679.4889499164501; Fri, 8 Nov 2024 11:58:55 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.832776.1248084 (Exim 4.92) (envelope-from ) id 1t9V7s-0000VH-Cu; Fri, 08 Nov 2024 19:58:36 +0000 Received: by outflank-mailman (output) from mailman id 832776.1248084; Fri, 08 Nov 2024 19:58:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7s-0000UQ-5J; Fri, 08 Nov 2024 19:58:36 +0000 Received: by outflank-mailman (input) for mailman id 832776; Fri, 08 Nov 2024 19:58:35 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7r-0008TS-Bi for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:35 +0000 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [2a00:1450:4864:20::62e]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d53e1047-9e0b-11ef-a0c6-8be0dac302b0; Fri, 08 Nov 2024 20:58:33 +0100 (CET) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a9a4031f69fso417234366b.0 for ; Fri, 08 Nov 2024 11:58:33 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:31 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d53e1047-9e0b-11ef-a0c6-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MmUiLCJoZWxvIjoibWFpbC1lajEteDYyZS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ1M2UxMDQ3LTllMGItMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxMDk1OTEzLjI3OTA3MSwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095912; x=1731700712; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AL3v6pBQgxthivHZltyBUNUpaHsfqdVQAfCymchp+Ls=; b=GPeGSjLNbMmKBkXbP3vf2ejXol5CH9kq7AXzreEtaCzeRvz4QOB4X4UZmyKMuztSzv gHadao1wWAiT/gcvmOsoNnPJHbbNAzo8fwcgQZlp6E5nrVzDPuVwW4eAKAjby7eW1eoQ E1v/8hYM2XfeUFHwZ1S8TxPdbHfeDJ1XiA39E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095912; x=1731700712; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AL3v6pBQgxthivHZltyBUNUpaHsfqdVQAfCymchp+Ls=; b=dLTPYz8Geu+Rpet6y9D6djQ3qaJU9HeSuYmGMRwVFz+xHFA4KvbVdxtwkKvMuYU7zN fqQG8rrCcRl1TeY78hT0Q0m4qnGzTGunaCrc9sLH3bxFUn0t6y7ZtK7s7jRrzs1vSCSD g11GbeDYT2cZn2rbkFhEn9A8dac4Yr8yetOWPuwWn/cZd/NBP0MmM0lh++KU2QCiQQTW 4EE0ufr9TepZGev5UU1iF814h32Alvf7+8QoIJeimlKrYWeFfzK8wst+6WMm+3IBPuxn RlOwrXZtGWssU7c9useGwPk77bIjxW2CJdrdMN+JHqXPY1lao24aaCtkhwoBQ+74LDKo uprA== X-Gm-Message-State: AOJu0YxxniZZSwL+EMFG6A6sT0zcPm1HPM+uMQ6IZD2YQhSAZwCD3Oox WQ6PH9eG3zVYZlkQhUeLbuJv9T4FHKT2agZNq2R+pBCub0HpFaBhfhB04GERYd0Cb9GkiwwIzFw m X-Google-Smtp-Source: AGHT+IHbxuNfLi3G8lUvZ+uWqI+pNZ9bkTPQHxt/iYne9UQjXwO0hWdMlmtUs9MHI5xVGNOJP9kFww== X-Received: by 2002:a17:906:c112:b0:a99:f4fd:31c8 with SMTP id a640c23a62f3a-a9eeff0e9b4mr368661666b.22.1731095912116; Fri, 08 Nov 2024 11:58:32 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 05/10] x86/mach-apic: Drop ioapic_phys_id_map() Date: Fri, 8 Nov 2024 19:58:15 +0000 Message-Id: <20241108195820.789716-6-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1731095936926116600 It's an unnecessary wrapper. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/include/asm/mach-generic/mach_apic.h | 5 ----- xen/arch/x86/io_apic.c | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x= 86/include/asm/mach-generic/mach_apic.h index 3cf58d5f6b90..b3e9ea6600ef 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -45,11 +45,6 @@ static inline int multi_timer_check(int apic, int irq) * really not sure why, since all local APICs should have distinct physical * IDs, and we need to know what they are. */ -static inline void ioapic_phys_id_map(physid_mask_t *map) -{ - *map =3D phys_cpu_present_map; -} - static inline int check_apicid_used(const physid_mask_t *map, int apicid) { return physid_isset(apicid, *map); diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 11b74d3eaf8a..0123edab649b 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1491,7 +1491,7 @@ static void __init setup_ioapic_ids_from_mpc(void) * This is broken; anything with a real cpu count has to * circumvent this idiocy regardless. */ - ioapic_phys_id_map(&phys_id_present_map); + phys_id_present_map =3D phys_cpu_present_map; =20 /* * Set the IOAPIC ID to the value stored in the MPC table. @@ -2237,7 +2237,7 @@ int __init io_apic_get_unique_id (int ioapic, int api= c_id) */ =20 if (physids_empty(apic_id_map)) - ioapic_phys_id_map(&apic_id_map); + apic_id_map =3D phys_cpu_present_map; =20 spin_lock_irqsave(&ioapic_lock, flags); reg_00.raw =3D io_apic_read(ioapic, 0); --=20 2.39.5 From nobody Mon Nov 3 06:32:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1731095939; cv=none; d=zohomail.com; s=zohoarc; b=S+wMiFJ5UhwRPbKhg4o9ZSEryunFRuOtzE8Uswiu9mKwvoTmTczaXjM3MsEtN6s1D9V1nYkQxOnA91kUSOKS4TyNQuImCU7jDaAUMfYQApOqicaLzbLjqY/2Ydav4TzhMlIKUDlTtS3DBzFcrx4sFy4vpWLUj6SB+1oW9zUEw/g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731095939; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=APtwUM4/DSKoYZ87C5Z8DIqnxYFMBxhhyq2sJc0n8KM=; b=miE+7pVVpzqVBIzGafY+7N3ejXJpDcHlFhXXzmjwazMAMXovVAdgKNBok6LvN95y4thoGabDawBT1Jz7AuGMwmJ0Jy8nGA5HhOtuv12oLx5u2foTokxTI/CXmkIgv0FSZMA4/GRVTj/YK1pkAUF3jQOmOZIwVmXoAzCsbP3sJqE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1731095939595890.1583004077961; Fri, 8 Nov 2024 11:58:59 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.832778.1248110 (Exim 4.92) (envelope-from ) id 1t9V7u-0001Fo-96; Fri, 08 Nov 2024 19:58:38 +0000 Received: by outflank-mailman (output) from mailman id 832778.1248110; Fri, 08 Nov 2024 19:58:38 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7u-0001Eq-3l; Fri, 08 Nov 2024 19:58:38 +0000 Received: by outflank-mailman (input) for mailman id 832778; Fri, 08 Nov 2024 19:58:37 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7t-0008TS-8a for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:37 +0000 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [2a00:1450:4864:20::529]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d636ca00-9e0b-11ef-a0c6-8be0dac302b0; Fri, 08 Nov 2024 20:58:35 +0100 (CET) Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5c9c28c1ecbso3208806a12.0 for ; Fri, 08 Nov 2024 11:58:34 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:32 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d636ca00-9e0b-11ef-a0c6-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo1MjkiLCJoZWxvIjoibWFpbC1lZDEteDUyOS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ2MzZjYTAwLTllMGItMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxMDk1OTE1LjAwNTc5NCwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095913; x=1731700713; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=APtwUM4/DSKoYZ87C5Z8DIqnxYFMBxhhyq2sJc0n8KM=; b=d3p9iY8ymr6tzxXtKXIiy75Ez0+Qhpda3v/s2kflRh4rc9/ClPlzGXMPOvBmQxXmy3 NJ8T3nddltonGgH4lE4ritEBgVEl3GarWSdAEyx/VKVqFvsU90bglkowbk3TssYOSIaD aKk3n/N9ZnXz4DtX7PaKkEtxhF3K4VBLfaUgo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095913; x=1731700713; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=APtwUM4/DSKoYZ87C5Z8DIqnxYFMBxhhyq2sJc0n8KM=; b=QOkrhgyh1C/W3mtKdZoQwYCGT0TmgbWitVCJ89Horgb5DGvMQou9Dxrbme3kzF4tm7 3cZD4SgmCVOJAffcxOZtVOmwuRlGVOk+nVXtwKZjtE39L6Q2BcR4MrujJ5nx+iw5jBfS b6n6rJ7cEkO9aLeeW7hM5lrQlbjzjWszM7lZwnI5som0Dg9ciko4L8vKberj41/9Ix9q rnRHd9NfLj8VuiqabSLPcxDPMEkNMmQ6TOxw+53BzkNn/nO+jFMTEatapfoWqdDq/74o ok05hhtx1QjGYlGin/t1T9fYS9j837kxb6TfiSv1wWWCCttdOlzTgIz8ZlV/5fJNA3Te 7QXQ== X-Gm-Message-State: AOJu0YwsEpSb/59nJHrWzE4pkh1+Dk2OhStVkwIf4fosEL7tOnmkkLoi PZA0kNmbZuTXCkewbp1ctwkR+MIFGJwDw7DCvovoXcQOUOP9ElwgvvaBwsd6wHNN1ruHClYuYDh D X-Google-Smtp-Source: AGHT+IFKGQL0b0X7k0u5px8jrCXQAxW6XKp1V2s6lzp7Hb41YROrnFFRf3etEXpuEfdEahMpEYcdJA== X-Received: by 2002:a17:907:6d1c:b0:a99:e67a:d12d with SMTP id a640c23a62f3a-a9eeffd93aamr380686466b.48.1731095913550; Fri, 08 Nov 2024 11:58:33 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 06/10] x86/mach-apic: Drop check_apicid_used() Date: Fri, 8 Nov 2024 19:58:16 +0000 Message-Id: <20241108195820.789716-7-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1731095940827116600 It's an unnecessary wrapper, and is longer than the operation it wraps. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/include/asm/mach-generic/mach_apic.h | 5 ----- xen/arch/x86/io_apic.c | 9 +++++---- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x= 86/include/asm/mach-generic/mach_apic.h index b3e9ea6600ef..c8e0637f4424 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -45,11 +45,6 @@ static inline int multi_timer_check(int apic, int irq) * really not sure why, since all local APICs should have distinct physical * IDs, and we need to know what they are. */ -static inline int check_apicid_used(const physid_mask_t *map, int apicid) -{ - return physid_isset(apicid, *map); -} - static inline int check_apicid_present(int apicid) { return physid_isset(apicid, phys_cpu_present_map); diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 0123edab649b..5a4d8597e07a 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1520,8 +1520,8 @@ static void __init setup_ioapic_ids_from_mpc(void) * system must have a unique ID or we get lots of nice * 'stuck on smp_invalidate_needed IPI wait' messages. */ - if (check_apicid_used(&phys_id_present_map, - mp_ioapics[apic].mpc_apicid)) { + if ( physid_isset(mp_ioapics[apic].mpc_apicid, phys_id_present_map= ) ) + { printk(KERN_ERR "BIOS bug, IO-APIC#%d ID %d is already used!..= .\n", apic, mp_ioapics[apic].mpc_apicid); for (i =3D 0; i < get_physical_broadcast(); i++) @@ -2253,10 +2253,11 @@ int __init io_apic_get_unique_id (int ioapic, int a= pic_id) * Every APIC in a system must have a unique ID or we get lots of nice=20 * 'stuck on smp_invalidate_needed IPI wait' messages. */ - if (check_apicid_used(&apic_id_map, apic_id)) { + if ( physid_isset(apic_id, apic_id_map) ) + { =20 for (i =3D 0; i < get_physical_broadcast(); i++) { - if (!check_apicid_used(&apic_id_map, i)) + if ( !physid_isset(i, apic_id_map) ) break; } =20 --=20 2.39.5 From nobody Mon Nov 3 06:32:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1731095940; cv=none; d=zohomail.com; s=zohoarc; b=T/lrC+5Q+GmYupUPRRl6zbtA2VLlU0+RXR1ybP36vboSM32R/QEKLdPm5onWaC/WjdWM+sDIVnNnbzlLN6QNH4a1xWfIpsJh89nQytr0xXzd/cNfj3t/zD96CWZ+VN3EtGA/+KF0dPxudy0U29ieCcE6tGIq6D3UQeMeYDV/y4c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731095940; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pYLPSJ4LnDxE4PBKWdzigEqbbkS/YUzGMHz1cObbzSM=; b=KjAwVKGB9+hbSq+5Icsl4oDg65gDLD8qDMINrH9eorySlkjFpw08EncseADURbJbNMH4bv/dr2crY/lSLz1Jo2mgbdfRBqq50mx/khC+C5CzX6ZXhxqBX7jNCREcwBrNMYcajbGEfU4/rJuUwQd2y0fj6kSXswZDV41PdIBpFFg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1731095940931110.32208493937935; Fri, 8 Nov 2024 11:59:00 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.832779.1248126 (Exim 4.92) (envelope-from ) id 1t9V7v-0001kk-W1; Fri, 08 Nov 2024 19:58:39 +0000 Received: by outflank-mailman (output) from mailman id 832779.1248126; Fri, 08 Nov 2024 19:58:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7v-0001k0-Qi; Fri, 08 Nov 2024 19:58:39 +0000 Received: by outflank-mailman (input) for mailman id 832779; Fri, 08 Nov 2024 19:58:38 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7u-0008TY-Jq for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:38 +0000 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [2a00:1450:4864:20::52a]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d6820324-9e0b-11ef-99a3-01e77a169b0f; Fri, 08 Nov 2024 20:58:35 +0100 (CET) Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5c9c28c1ecbso3208821a12.0 for ; Fri, 08 Nov 2024 11:58:35 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:33 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d6820324-9e0b-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo1MmEiLCJoZWxvIjoibWFpbC1lZDEteDUyYS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ2ODIwMzI0LTllMGItMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxMDk1OTE1LjQ1MjczLCJzZW5kZXIiOiJhbmRyZXcuY29vcGVyQGNsb3VkLmNvbSIsInJlY2lwaWVudCI6Inhlbi1kZXZlbEBsaXN0cy54ZW5wcm9qZWN0Lm9yZyJ9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095914; x=1731700714; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pYLPSJ4LnDxE4PBKWdzigEqbbkS/YUzGMHz1cObbzSM=; b=eBifqC7RNAJMGsWO7CQudZZviiY2nS6g/+7/m7BSi3Z5kzyjYf/oJ37ACQ5n465jCS 2VUotdoAXM9/k/hVPjSN7uiKJYuN64arypaYXAkXZ/Xk8htrHU2YkX+KX4vikohYcd3D r8Ez2/D5Mz+jtIraj79Dya+qjjgjzvUjUE+4s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095914; x=1731700714; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pYLPSJ4LnDxE4PBKWdzigEqbbkS/YUzGMHz1cObbzSM=; b=mRprT2knvG6XqjHca5W6s3/oS4xGw3RNYit1HXeCJ5hvJzTB+Du3IntSarZnOELpKk ckvh9+Hx8WBqX3Tyk9STrY2BmKwKRiy//OJQHV6G+QMZUZ25BjYMa4GESQNdcNupEqsO ZghUZRfvldJDkcEeammTI2IDsIJktHLNXHMDmPG5VWQVBuxpKKdB8+FGSFoDjGYiwAy6 PxE1D4DILVYoA5oGf9jNcEp3J0lY4ybDQ/J3i6xA7CLWwTlbpLat925fgB2AOMCC7Azc zW3KxB0BjJJx880FdXwvGGuMB9OrSdFt4Q1e8LCpBBGZH1yoXLczcfdt1PyzDgemwAX9 282Q== X-Gm-Message-State: AOJu0YwJMgoTqM7B8nOYfSEFiINkpCLa7lqKqXFuU6Jw3HsualqcAMNz oAYfZu+r3Vu3QARHcqt3n8H3UnbcyYxVlAB3seXZU3LkQhKYnO60QrHzJsGO4pXKklH1YYOpejU u X-Google-Smtp-Source: AGHT+IElLsSjvElF2qNR+EDaQMrF6EoirLU7rCR/THkONc3tstOEx2T9+EaQ1ce4ezkwyEMa0wfgnA== X-Received: by 2002:a17:907:7b88:b0:a9e:441c:f74d with SMTP id a640c23a62f3a-a9eefee456bmr320848366b.16.1731095914232; Fri, 08 Nov 2024 11:58:34 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 07/10] x86/mach-apic: Drop check_apicid_present() Date: Fri, 8 Nov 2024 19:58:17 +0000 Message-Id: <20241108195820.789716-8-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1731095942853116600 It's an unnecessary wrapper. It's also the only reason that smpboot.c includes mach_apic.h, other than f= or transitive dependencies. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/include/asm/mach-generic/mach_apic.h | 5 ----- xen/arch/x86/smpboot.c | 6 ++++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x= 86/include/asm/mach-generic/mach_apic.h index c8e0637f4424..7940c0234cb9 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -45,11 +45,6 @@ static inline int multi_timer_check(int apic, int irq) * really not sure why, since all local APICs should have distinct physical * IDs, and we need to know what they are. */ -static inline int check_apicid_present(int apicid) -{ - return physid_isset(apicid, phys_cpu_present_map); -} - static inline void set_apicid(int phys_apicid, physid_mask_t *map) { physid_set(phys_apicid, *map); diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index 9e79c1a6d6e6..42272a9844fa 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -20,6 +20,9 @@ #include #include #include + +#include +#include #include #include #include @@ -37,7 +40,6 @@ #include #include #include -#include =20 unsigned long __read_mostly trampoline_phys; enum ap_boot_method __read_mostly ap_boot_method =3D AP_BOOT_NORMAL; @@ -1193,7 +1195,7 @@ void __init smp_prepare_cpus(void) * CPU too, but we do it for the sake of robustness anyway. * Makes no sense to do this check in clustered apic mode, so skip it */ - if ( !check_apicid_present(boot_cpu_physical_apicid) ) + if ( !physid_isset(boot_cpu_physical_apicid, phys_cpu_present_map) ) { printk("weird, boot CPU (#%d) not listed by the BIOS.\n", boot_cpu_physical_apicid); --=20 2.39.5 From nobody Mon Nov 3 06:32:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1731095946; cv=none; d=zohomail.com; s=zohoarc; b=T2yC2Y80GuFl6N6gU40mKeahqUr4Ha7oxItiwZlNDTR6OWBwpnCsDvNw+93F6/D4C1gxZGOaFCSJi/7uI/U5xQUgONUXIYWgpgP+WU0iUxd+mJZaOfYK+2iCByY/ZYWi8B4fm0rqxM1J6vE13awsTHEJHFbO7kaWvOJNymb3nWU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731095946; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=LUt6z7qotJTk+Jtsld6eOnMm4y4nkKlOfdMmgeqNQZs=; b=VWyaqncGn/GUhcQwIVZhiZj7XW7bCLvrZ3tzgfEvDJgBEbsthE6rbwKwYhznJ7/OWVDuNkwzJdmdCF0a2S5KmADoI+QtSB9N/f0XsvHd752yf/nsgiAiy+y+WtGVF6xhyWhWZ3+cDXJc2bQ8nHmkJRhpA4vQcyNeZQnckpw0Mn0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1731095946146687.2267006708119; Fri, 8 Nov 2024 11:59:06 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.832781.1248141 (Exim 4.92) (envelope-from ) id 1t9V7y-0002Bs-Nd; Fri, 08 Nov 2024 19:58:42 +0000 Received: by outflank-mailman (output) from mailman id 832781.1248141; Fri, 08 Nov 2024 19:58:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7y-0002AJ-Fm; Fri, 08 Nov 2024 19:58:42 +0000 Received: by outflank-mailman (input) for mailman id 832781; Fri, 08 Nov 2024 19:58:41 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7x-0008TY-Kt for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:41 +0000 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [2a00:1450:4864:20::634]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d778e7c9-9e0b-11ef-99a3-01e77a169b0f; Fri, 08 Nov 2024 20:58:37 +0100 (CET) Received: by mail-ej1-x634.google.com with SMTP id a640c23a62f3a-a9e44654ae3so347762166b.1 for ; Fri, 08 Nov 2024 11:58:37 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:34 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d778e7c9-9e0b-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzQiLCJoZWxvIjoibWFpbC1lajEteDYzNC5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ3NzhlN2M5LTllMGItMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxMDk1OTE3LjAyODE1Niwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095916; x=1731700716; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LUt6z7qotJTk+Jtsld6eOnMm4y4nkKlOfdMmgeqNQZs=; b=Xi2dX2gZJ1GAsaWPr8BLEA0xQkvRjtKRXZlhoVTTGzoiMCvfpePGJ8/WcPvAsC7dzo q0y9OEk8gasGS9a+2P+hnWJG4wrxwxNHQKr8DD61OmtsdJ2T0ZH+X/8lpy2qYWRb9P+N AYpis9D7Vr/HrpSWsdOMU0Zl5JC1zyT1FUfg8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095916; x=1731700716; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=LUt6z7qotJTk+Jtsld6eOnMm4y4nkKlOfdMmgeqNQZs=; b=D9AjKbq364Y4rKuyjLn/xbuyI+ro6pW413q4DeUm1a8B3cwtVkrp0XF2Yb4GZCS7Vs S0g9DHlMxwrDyrANuJ2GUOu1R59DI6VlnImninsqX5a9HsAiWHpPrDTwgF3A1vpV81HD 7qUG+eff982esReUcLLCASDddye7r23QxcQHMVNWWtaVX7Mje84Nv8wJmEuElHaQAqhU 5ko5PvjHRy2v+CxuXO1b+ogWS7YXLp28El3Eb8uBBKRJrlGZ50XS1QXPyarL4kp+DP6K abRGuBPPYh5CFxjrnFd/1o/VdiGsXTNXsUrcO03SFgUzfS/5TDydFBE2t1TUw5JVK35o 9bcg== X-Gm-Message-State: AOJu0Yym8ds47TbGUJT0RnhlyPGAGf7BSWZMYDgGqqmI/ibmJAAzOFFz hD1ZesImncxSxSgJHToQII+6NUf9P1pIYlgUTUN8sdF+g6ZzV7EZCoZ/pGyw0LO0BG/YSY2ixG/ 4 X-Google-Smtp-Source: AGHT+IHcM9/g6UuN1NPBnHBdf2XO8eZElhhw83hxBGhwOm+YwzANwjNhHUrnnEvFQvs3nJMuqWdMug== X-Received: by 2002:a17:907:9288:b0:a9a:10c9:f4b8 with SMTP id a640c23a62f3a-a9ef0040b8amr345801966b.61.1731095915662; Fri, 08 Nov 2024 11:58:35 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 08/10] x86/mach-apic: Drop set_apicid() Date: Fri, 8 Nov 2024 19:58:18 +0000 Message-Id: <20241108195820.789716-9-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1731095946910116601 It's an unnecessary wrapper, and longer than the operation it wraps. It's also the only reason that mpparse.c includes mach_apic.h, other than f= or transitive dependencies. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/include/asm/mach-generic/mach_apic.h | 11 ----------- xen/arch/x86/io_apic.c | 4 ++-- xen/arch/x86/mpparse.c | 7 ++++--- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x= 86/include/asm/mach-generic/mach_apic.h index 7940c0234cb9..b4a2f0a0b068 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -39,15 +39,4 @@ static inline int multi_timer_check(int apic, int irq) return 0; } =20 -/* - * The following functions based around phys_cpu_present_map are disabled = in - * some i386 Linux subarchitectures, and in x86_64 'cluster' genapic mode.= I'm - * really not sure why, since all local APICs should have distinct physical - * IDs, and we need to know what they are. - */ -static inline void set_apicid(int phys_apicid, physid_mask_t *map) -{ - physid_set(phys_apicid, *map); -} - #endif /* __ASM_MACH_APIC_H */ diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 5a4d8597e07a..2774cd45c091 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -1537,7 +1537,7 @@ static void __init setup_ioapic_ids_from_mpc(void) "phys_id_present_map\n", mp_ioapics[apic].mpc_apicid); } - set_apicid(mp_ioapics[apic].mpc_apicid, &phys_id_present_map); + physid_set(mp_ioapics[apic].mpc_apicid, phys_id_present_map); =20 /* * We need to adjust the IRQ routing table @@ -2270,7 +2270,7 @@ int __init io_apic_get_unique_id (int ioapic, int api= c_id) apic_id =3D i; }=20 =20 - set_apicid(apic_id, &apic_id_map); + physid_set(apic_id, apic_id_map); =20 if (reg_00.bits.ID !=3D apic_id) { reg_00.bits.ID =3D apic_id; diff --git a/xen/arch/x86/mpparse.c b/xen/arch/x86/mpparse.c index e13b83bbe9dd..b16c105b18bf 100644 --- a/xen/arch/x86/mpparse.c +++ b/xen/arch/x86/mpparse.c @@ -20,8 +20,10 @@ #include #include #include - #include + +#include +#include #include #include #include @@ -29,7 +31,6 @@ #include #include =20 -#include #include =20 /* Have we found an MP table */ @@ -161,7 +162,7 @@ static int MP_processor_info_x(struct mpc_config_proces= sor *m, } apic_version[apicid] =3D ver; =20 - set_apicid(apicid, &phys_cpu_present_map); + physid_set(apicid, phys_cpu_present_map); =20 if (num_processors >=3D nr_cpu_ids) { printk_once(XENLOG_WARNING --=20 2.39.5 From nobody Mon Nov 3 06:32:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1731095940; cv=none; d=zohomail.com; s=zohoarc; b=IUrfj+Xj6S+uJ7xajyWhPKiNYPZr3Ro0fTMo1QyfBRfnr00AqNQIHcaLdcYSnXrOnlvnRShSsv8GBAqltvcM7PrloJfoYZerADGdLcWBdc8flhARenpbUPzAF43hTWBnbEwBIJIlvgHZAjuh/cDCmn6LoRoaFyrxxkZ3hVhzTUM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731095940; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=y8X0HqMtDZiLrdBUx5d/OQYZukjUCR6KuzOBHabB77Y=; b=Bo76cNAPTEDzoz/F9VMV74+ywL9nTQNEe9GH8dtvOcqNEuab5mldl6OF9/YCEKfevzm/n9G8KqpW5SZN11wz+nYY5HEJHlQcznDdvmwkB25/zKfXGq4uuZZNMF362k5iwQ24SU0h7ERjqcf7w8rdRUUprl0W7UnS3IiSK1OCuCg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 173109594050971.93591629396326; Fri, 8 Nov 2024 11:59:00 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.832780.1248136 (Exim 4.92) (envelope-from ) id 1t9V7y-00027w-8N; Fri, 08 Nov 2024 19:58:42 +0000 Received: by outflank-mailman (output) from mailman id 832780.1248136; Fri, 08 Nov 2024 19:58:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7y-00027h-4N; Fri, 08 Nov 2024 19:58:42 +0000 Received: by outflank-mailman (input) for mailman id 832780; Fri, 08 Nov 2024 19:58:40 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7w-0008TS-Sr for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:40 +0000 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [2a00:1450:4864:20::629]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id d86dd1cd-9e0b-11ef-a0c6-8be0dac302b0; Fri, 08 Nov 2024 20:58:38 +0100 (CET) Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a9ed7d8c86cso445809066b.2 for ; Fri, 08 Nov 2024 11:58:38 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:35 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d86dd1cd-9e0b-11ef-a0c6-8be0dac302b0 X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MjkiLCJoZWxvIjoibWFpbC1lajEteDYyOS5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ4NmRkMWNkLTllMGItMTFlZi1hMGM2LThiZTBkYWMzMDJiMCIsInRzIjoxNzMxMDk1OTE4LjYxNzMzNywic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095916; x=1731700716; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=y8X0HqMtDZiLrdBUx5d/OQYZukjUCR6KuzOBHabB77Y=; b=Gxxqe+rPQ60TkUJkNTPX1HrJyZVk4w1gSNN6R12jipRhZwDH/w5Ijm5L/n0xlpJmxx EmVxur2p8NSN8eS8WEOIrKqwhPL8vnFrF1s6wvnDR4wKOPzhj/QmJIfVjB7qlu03JpLN 75/bot+PFuDUo+xaeKoPv3WhC8HFjH1GPosF0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095916; x=1731700716; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y8X0HqMtDZiLrdBUx5d/OQYZukjUCR6KuzOBHabB77Y=; b=HJcBAihf+poLj1CwfhSwgMmnNyOE3LiyT/twd2vWNCtPP6nCcWxb8vPeSsRhU6BoEz i92DhyUiCZiDm8yw1siqlkTGTLePAd6OOlpUeIkLXKBuL2UlmoOnJw3IreRig8VonrGM FQBNMQfSCmmP1lZRbba++Ag3Pbb5qxERSoy2Q2HeyK1mO2k7rUMFUiysDV4sYevNITW5 c89xDpxQXdptzF4BByXf2KLugN9IfWYEjhiuqht6EusdpB40FiSth772yILRH5npeeNn 7IXM+c5FnASnq/vo5zikEL4+8g33FOgYN1zffuxo9XY1T6iycyWxzULpH7hAjHXFI+aC acxA== X-Gm-Message-State: AOJu0Yy1kOALwWuXOI4NmGXCx1azN7V+dGeK+PMdY2gC3JLdb8e+aqCQ 1ERWGQ8rPPoCs8EWhaLzq1lFmhsfkjAr0MsBzLZqy5gyEg7R6/HcuHLiw/ax56WcDPrVhechFfL d X-Google-Smtp-Source: AGHT+IGIq/AzlAScjGBIlnMvhuRaeruqGMKX3YDhzKpMJQ1Cd05P4q9EtKkfOePceh4UoLnR/A0Baw== X-Received: by 2002:a17:907:3d9f:b0:a9a:6633:3a90 with SMTP id a640c23a62f3a-a9eefeb157bmr395505966b.8.1731095916338; Fri, 08 Nov 2024 11:58:36 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 09/10] x86/mach-apic: Move the genapic wrappers to genapic.h Date: Fri, 8 Nov 2024 19:58:19 +0000 Message-Id: <20241108195820.789716-10-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1731095940884116600 This a better place for them to live. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/include/asm/genapic.h | 17 +++++++++++++++++ .../x86/include/asm/mach-generic/mach_apic.h | 18 ------------------ xen/arch/x86/irq.c | 6 +++++- xen/arch/x86/msi.c | 6 +++++- 4 files changed, 27 insertions(+), 20 deletions(-) diff --git a/xen/arch/x86/include/asm/genapic.h b/xen/arch/x86/include/asm/= genapic.h index 6c8845d17d27..cf36d48f3b07 100644 --- a/xen/arch/x86/include/asm/genapic.h +++ b/xen/arch/x86/include/asm/genapic.h @@ -37,6 +37,23 @@ struct genapic { .name =3D aname, \ .probe =3D aprobe =20 +#define INT_DELIVERY_MODE (genapic.int_delivery_mode) +#define INT_DEST_MODE (genapic.int_dest_mode) +#define TARGET_CPUS ((const typeof(cpu_online_map) *)&cpu_online_map) +#define init_apic_ldr() alternative_vcall(genapic.init_apic_ldr) +#define cpu_mask_to_apicid(mask) ({ \ + /* \ + * There are a number of places where the address of a local variable \ + * gets passed here. The use of ?: in alternative_call() triggers an \ + * "address of ... is always true" warning in such a case with at least \ + * gcc 7 and 8. Hence the seemingly pointless local variable here. \ + */ \ + const cpumask_t *m_ =3D (mask); \ + alternative_call(genapic.cpu_mask_to_apicid, m_); \ +}) +#define vector_allocation_cpumask(cpu) \ + alternative_call(genapic.vector_allocation_cpumask, cpu) + extern struct genapic genapic; extern const struct genapic apic_default; extern const struct genapic apic_bigsmp; diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x= 86/include/asm/mach-generic/mach_apic.h index b4a2f0a0b068..3e17c271d9ac 100644 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ b/xen/arch/x86/include/asm/mach-generic/mach_apic.h @@ -6,24 +6,6 @@ #include #include =20 -/* The following are dependent on APIC delivery mode (logical vs. physical= ). */ -#define INT_DELIVERY_MODE (genapic.int_delivery_mode) -#define INT_DEST_MODE (genapic.int_dest_mode) -#define TARGET_CPUS ((const typeof(cpu_online_map) *)&cpu_online_map) -#define init_apic_ldr() alternative_vcall(genapic.init_apic_ldr) -#define cpu_mask_to_apicid(mask) ({ \ - /* \ - * There are a number of places where the address of a local variable \ - * gets passed here. The use of ?: in alternative_call() triggers an \ - * "address of ... is always true" warning in such a case with at least \ - * gcc 7 and 8. Hence the seemingly pointless local variable here. \ - */ \ - const cpumask_t *m_ =3D (mask); \ - alternative_call(genapic.cpu_mask_to_apicid, m_); \ -}) -#define vector_allocation_cpumask(cpu) \ - alternative_call(genapic.vector_allocation_cpumask, cpu) - static inline void enable_apic_mode(void) { /* Not needed for modern ES7000 which boot in Virtual Wire mode. */ diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c index 0001e93ba8ac..6340cd6dd73d 100644 --- a/xen/arch/x86/irq.c +++ b/xen/arch/x86/irq.c @@ -21,10 +21,14 @@ #include #include #include + +#include +#include +#include #include #include #include -#include + #include #include =20 diff --git a/xen/arch/x86/msi.c b/xen/arch/x86/msi.c index 677fd83218d4..68d6e25178a9 100644 --- a/xen/arch/x86/msi.c +++ b/xen/arch/x86/msi.c @@ -21,13 +21,17 @@ #include #include #include + +#include +#include #include +#include #include #include #include #include #include -#include + #include #include #include --=20 2.39.5 From nobody Mon Nov 3 06:32:54 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=1; a=rsa-sha256; t=1731095945; cv=none; d=zohomail.com; s=zohoarc; b=az33LtEWeR/dFudZsBW7MnhsFWB8HbpmNayO/gXjm4Yz2sySuuPiSUXcdsWtz51ayLYTyXfIfzba66BNrufRkdn5daPSOns9yebnZw97f2G6D4OcYKsvLrYnW+tIU+DM5wysdH/PW6MovoHkE/uOzzBaycSgsBEc1hIlBpO1BQc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1731095945; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=V7/2tyrjO+foQHdsyFkn3cPeL3RHFRZuXllVwsi5Vtc=; b=dy6aIgM16LjBJ70o4mlhL9CMj1gC5jb+i/UCqtpgV6+BqwR34zLPfQpX1tV++ICpLOsLvVK05lD+7U8pYq+op7L5yXXvBl7vNTzzWZWhPy5Oex2njAJzr7HaxpJwEgcQjl+BSJNyEMdWApD6yOUSyjRBJ25yNxbMFhuVcKIwEaU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 173109594592974.68749917270964; Fri, 8 Nov 2024 11:59:05 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.832783.1248156 (Exim 4.92) (envelope-from ) id 1t9V81-0002kT-5U; Fri, 08 Nov 2024 19:58:45 +0000 Received: by outflank-mailman (output) from mailman id 832783.1248156; Fri, 08 Nov 2024 19:58:45 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V80-0002kA-W5; Fri, 08 Nov 2024 19:58:44 +0000 Received: by outflank-mailman (input) for mailman id 832783; Fri, 08 Nov 2024 19:58:43 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1t9V7z-0008TY-60 for xen-devel@lists.xenproject.org; Fri, 08 Nov 2024 19:58:43 +0000 Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [2a00:1450:4864:20::633]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id d92719ef-9e0b-11ef-99a3-01e77a169b0f; Fri, 08 Nov 2024 20:58:39 +0100 (CET) Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a9e8522445dso428872266b.1 for ; Fri, 08 Nov 2024 11:58:39 -0800 (PST) Received: from andrewcoop.eng.citrite.net ([185.25.67.249]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9ee0dc5db6sm271523466b.119.2024.11.08.11.58.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Nov 2024 11:58:36 -0800 (PST) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: d92719ef-9e0b-11ef-99a3-01e77a169b0f X-Custom-Connection: eyJyZW1vdGVpcCI6IjJhMDA6MTQ1MDo0ODY0OjIwOjo2MzMiLCJoZWxvIjoibWFpbC1lajEteDYzMy5nb29nbGUuY29tIn0= X-Custom-Transaction: eyJpZCI6ImQ5MjcxOWVmLTllMGItMTFlZi05OWEzLTAxZTc3YTE2OWIwZiIsInRzIjoxNzMxMDk1OTE5Ljg3MjY1NSwic2VuZGVyIjoiYW5kcmV3LmNvb3BlckBjbG91ZC5jb20iLCJyZWNpcGllbnQiOiJ4ZW4tZGV2ZWxAbGlzdHMueGVucHJvamVjdC5vcmcifQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.com; s=google; t=1731095919; x=1731700719; darn=lists.xenproject.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=V7/2tyrjO+foQHdsyFkn3cPeL3RHFRZuXllVwsi5Vtc=; b=CkARgPquSLI8bUur+u8lLxcr6PPOnZ8vFsAupUvc40a2okHHbS84epkYTOJqC9sbwV xNV+vu/ZXQh4zWM/BF9NmB6QN5OjwZQdvCHYni7CJtLyIFTs0T9yar8nKTuvFEy5muhA HC1z3b6ptTx3POuJQiwW3W6ll4cafkJ2tHULo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731095919; x=1731700719; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=V7/2tyrjO+foQHdsyFkn3cPeL3RHFRZuXllVwsi5Vtc=; b=Zgj0arYIocY9j+P2DZ5HiCor8FCrAAGLMMcRD7wLEVM5CC/vIrf6rUudi/Sl+FtOhb tm+F2nxv1UI9CV3S6f6H5AOBEUKyyI5H4IzaO1SW/Q7sW9xOWxKCYBCHByNezCQr2wX5 BZhdkL9yK44hrwuadhZaEEJOXxQY4YUDc7QmdYRs8eS9DKObiuJw+ndhEcw/tsFQ4eJM 1chhH47jMIvCfQINhIP8ycCbSajTahHAqFQUGaNldDdocfss6asVS8FmQ12a9IX2d7m9 cY/KWbd+pD2F034EC5E7NjRst8aU/N4W1b8HcEC4MlMvBN+Ag8ZOjbPbbhNFm4rxnfGF Krsg== X-Gm-Message-State: AOJu0YxNPI6jwBf0v4AkhX8reGFkIRbZXXqM3ajYPXT8Hopa69zSAFHN 1GgCp7lC/a8WtIA/eOpamn7U0szzXWiMAK+LS/fEUWZZUTCzXUbX1ffu+8DRlZJvzMS/mJFzAUh 6 X-Google-Smtp-Source: AGHT+IH/oI66KdDWXrvpJYzMBjtAQSbLS30PUxc/CQOomyFvs4Uyw/JRJcbEoLqDDY/Ktm/JcrdwtA== X-Received: by 2002:a17:906:dc8a:b0:a9e:b090:e65d with SMTP id a640c23a62f3a-a9eeff383eemr334778266b.32.1731095918858; Fri, 08 Nov 2024 11:58:38 -0800 (PST) From: Andrew Cooper To: Xen-devel Cc: Andrew Cooper , Jan Beulich , =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Subject: [PATCH 10/10] x86: Delete mach_apic.h Date: Fri, 8 Nov 2024 19:58:20 +0000 Message-Id: <20241108195820.789716-11-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241108195820.789716-1-andrew.cooper3@citrix.com> References: <20241108195820.789716-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1731095946910116600 All useful content has been moved elsewhere. Clean up the dregs, and remove the entire mach-generic include path. Signed-off-by: Andrew Cooper Acked-by: Jan Beulich Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Roger Pau Monn=C3=A9 --- xen/arch/x86/apic.c | 4 ++-- xen/arch/x86/arch.mk | 1 - .../x86/include/asm/mach-generic/mach_apic.h | 24 ------------------- xen/arch/x86/io_apic.c | 15 +++++------- 4 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 xen/arch/x86/include/asm/mach-generic/mach_apic.h diff --git a/xen/arch/x86/apic.c b/xen/arch/x86/apic.c index 9f3a374e9581..8f192f80b852 100644 --- a/xen/arch/x86/apic.c +++ b/xen/arch/x86/apic.c @@ -35,7 +35,8 @@ #include #include #include -#include +#include + #include #include #include @@ -230,7 +231,6 @@ void __init connect_bsp_APIC(void) } =20 printk("Enabling APIC mode. Using %d I/O APICs\n", nr_ioapics); - enable_apic_mode(); } =20 void disconnect_bsp_APIC(int virt_wire_setup) diff --git a/xen/arch/x86/arch.mk b/xen/arch/x86/arch.mk index 1460ecf30b9a..8f8aeda679d8 100644 --- a/xen/arch/x86/arch.mk +++ b/xen/arch/x86/arch.mk @@ -3,7 +3,6 @@ =20 export XEN_IMG_OFFSET :=3D 0x200000 =20 -CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-generic CFLAGS +=3D -I$(srctree)/arch/x86/include/asm/mach-default CFLAGS +=3D -DXEN_IMG_OFFSET=3D$(XEN_IMG_OFFSET) =20 diff --git a/xen/arch/x86/include/asm/mach-generic/mach_apic.h b/xen/arch/x= 86/include/asm/mach-generic/mach_apic.h deleted file mode 100644 index 3e17c271d9ac..000000000000 --- a/xen/arch/x86/include/asm/mach-generic/mach_apic.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef __ASM_MACH_APIC_H -#define __ASM_MACH_APIC_H - -#include -#include -#include -#include - -static inline void enable_apic_mode(void) -{ - /* Not needed for modern ES7000 which boot in Virtual Wire mode. */ - /*es7000_sw_apic();*/ -} - -#define apicid_to_node(apicid) ((int)apicid_to_node[(u32)apicid]) - -extern u32 bios_cpu_apicid[]; - -static inline int multi_timer_check(int apic, int irq) -{ - return 0; -} - -#endif /* __ASM_MACH_APIC_H */ diff --git a/xen/arch/x86/io_apic.c b/xen/arch/x86/io_apic.c index 2774cd45c091..13daebc10a97 100644 --- a/xen/arch/x86/io_apic.c +++ b/xen/arch/x86/io_apic.c @@ -31,13 +31,16 @@ #include #include =20 +#include +#include #include +#include #include #include #include #include #include -#include + #include #include #include @@ -1104,14 +1107,8 @@ static void __init setup_IO_APIC_irqs(void) } =20 irq =3D pin_2_irq(idx, apic, pin); - /* - * skip adding the timer int on secondary nodes, which causes - * a small but painful rift in the time-space continuum - */ - if (multi_timer_check(apic, irq)) - continue; - else - add_pin_to_irq(irq, apic, pin); + + add_pin_to_irq(irq, apic, pin); =20 if (!IO_APIC_IRQ(irq)) continue; --=20 2.39.5