From patchwork Wed Nov 16 16:42:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 13045510 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5DCEAC433FE for ; Wed, 16 Nov 2022 16:42:47 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.444349.699455 (Exim 4.92) (envelope-from ) id 1ovLUf-00008n-D9; Wed, 16 Nov 2022 16:42:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 444349.699455; Wed, 16 Nov 2022 16:42:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ovLUf-00008g-9p; Wed, 16 Nov 2022 16:42:33 +0000 Received: by outflank-mailman (input) for mailman id 444349; Wed, 16 Nov 2022 16:42:32 +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 1ovLUe-00008a-4I for xen-devel@lists.xenproject.org; Wed, 16 Nov 2022 16:42:32 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id a8454c21-65cd-11ed-91b6-6bf2151ebd3b; Wed, 16 Nov 2022 17:42:30 +0100 (CET) Received: from mail-mw2nam12lp2044.outbound.protection.outlook.com (HELO NAM12-MW2-obe.outbound.protection.outlook.com) ([104.47.66.44]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 16 Nov 2022 11:42:27 -0500 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) by MW4PR03MB6459.namprd03.prod.outlook.com (2603:10b6:303:122::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.19; Wed, 16 Nov 2022 16:42:23 +0000 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::2393:22c1:7766:5caa]) by SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::2393:22c1:7766:5caa%5]) with mapi id 15.20.5813.016; Wed, 16 Nov 2022 16:42:23 +0000 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: a8454c21-65cd-11ed-91b6-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1668616949; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=OA2UOlmEK0jhWbsT7GVJWWYil+xhxHaqWbkLy+dxszc=; b=gXsE5MG70VsLELGHgdIjkOaU8dt08T/KOoxr5FopZZXBKhOEqYA6p4w+ zspSnaCrrX5BZD68Q+oJLa9nKVDrP/TD5O2BDMby3glCoYSu84iguAiub /MsQ7+scbClaFkJFG1F5U1K72ndDRWRLgs6H024d6AxMaXjbuVBXwSl09 o=; X-IronPort-RemoteIP: 104.47.66.44 X-IronPort-MID: 87497199 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:X4kcq60PncS+gHjB0/bD5fdwkn2cJEfYwER7XKvMYLTBsI5bpzcOy mAcXm2Ea/fbazfxfop2YI+29R4H68WHzoBjQ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/3ggilSYx9U/mpvSwzosuo9FE2+e O86isIDoBW0Tf8b2u1qRzi103J1ysv0WbrzRu9jWH4qcL0aTomA44Z7LgpBCfx2g4FhpVRwa hL12WWu95+Cg7Bpj3045ztWwtxnkS5jHI+mao4jmBZU6EZdLhNxLZvi399IdMlJmbX+YonGO 5hAIX14+tXS0qTazTjsmxm0LWXLwcONybDZnJHlt2e0jBQknw85VAf3tYjknAJ8494Y4VY5s zfW54Y2I1mf4szV+ZQFe0BScy4BijmWhTXKl+fJlzhCeUuJ2/NkZjq+784jdvaNaDg9KFC1q gpbWko9FLbIynVeI2zNdxwg1rwqVyGLHvQIpo03ek7hlX+LICbQRFrBmpe0fdImM9vfPEza8 zDRK6+PMWTUlcGYbw5uTEWe6MiW0X2A/dlz+oTahapnv/hDLHMm6jyTMvzTYCdYArMHFmPSU c+YA== X-IronPort-AV: E=Sophos;i="5.96,169,1665460800"; d="scan'208";a="87497199" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FXZpNs3dEAqCL4OVsYaTDmbg9RqX2OX3kEB3FIiDHpELblIyeBd55rm/oU2G6wsM1rzBWs8kpspAUL+e94V4Rv+XiMGv1sz9aXEPWis2Pbu+KM9ZTubJkXgjk6hfqtVM9xnUn/DUx16l9AG+PX1VyQ/CWQEH18IeN1cF/4dVamsua+KSl5stBYeMMI1yZxvWQPysk4ncIwpkRsukiqEVulYg3Fgq2+TlSx/YzXezwZcLcDsHD1dKkq0vw7N5/xYdvvZIaEDqMemfWkQPVhUV7VWPR8G7X1YNUAMqzTXCXTCsXUBW5DtUIvodbsZNNkXP+KZgqctQX5NfAH7YsNm86Q== 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=UFM5IxYv79F1URZqdOEl6KHRKVswx03RtDforc8iMsw=; b=SnzpgapDV34Qrdq04llGxCjAb4thEal0l3q9ji1ohBDUiF03l4aAr5813X6OASdM9YlVsIfhOQnNaHr3QTv1rfE4W3k9NzXzDAhv3dGUD7S7vIqNNkCmED2hfPDql5ZvsSBoi4aTRJ52LM5tcUsIx5ID3HYnOSmLVX80Obuhz/O/0bNQPhwFKupz4wblz+gAmZyfgzQ3VOsIdvXPK5YeAR9x7g3a+jQOnkUbnMYnpEi66JorKVFWTNu3w3dUaWEQaqeUdebhCfSwvxW7PcfCeJdczkej/1bAK2zu5xzSTkMyBTCWaM19klDMUOK20D+rzlwate1b68bHSZ1hY6TN4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UFM5IxYv79F1URZqdOEl6KHRKVswx03RtDforc8iMsw=; b=OMIHJL2YP0LdqShSRXMAbpoJhkYgnYhjzDfe6I/p+rMr+rXi+2TdgkyCn70x28EliY23dVgrAdU6lEQYgcyzriHCN4BR+V7D3Ylbo2JrhDiHpjkrIkVQ2P1qIe6m1fINUxq+FtA7tdnoh8ZQAUAKyGBkblb+c8L9f5/bD4kvqOk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; From: Roger Pau Monne To: xen-devel@lists.xenproject.org Cc: Roger Pau Monne , Jan Beulich , Andrew Cooper , Wei Liu Subject: [PATCH] x86/pvh: do not forward MADT Local APIC NMI structures to dom0 Date: Wed, 16 Nov 2022 17:42:16 +0100 Message-Id: <20221116164216.7220-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.37.3 X-ClientProxiedBy: LO4P123CA0364.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18e::9) To SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB6360:EE_|MW4PR03MB6459:EE_ X-MS-Office365-Filtering-Correlation-Id: ed775fcd-fe09-4301-f07e-08dac7f18933 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X7tJmPJ8QTMiVdpgdBB+2K1wc8fwHZFdjl37V5D9h1M65TWyrHwwVU13zdaC/8C28gBJxIcTZEtOV2oTkdQXRlV/E//VJSK/JU7gZmZ1mLg+Vz0p9779qCdPg57ibj4STgFLr3rN6CRAjRl3AWUp+ihdZGVEgwk0ZaloNVO5uksVOYuKXEc0L47b/lbEOZGjMJurKdXhdOCtap+0YaIPPUSNQdNlab3p/BLdYdF32Tgn8HiMrOxqVs3pIbF9/Q+11XDqdl+SeqGsh5zoRagoD1ApE6C39Crg0VbVaKi9/oiV3graAtUX3NanHrAM5JCWKimBoRzdG7K4rdxHLnzwakKUX0K+mnUy83hO6U9x39hTy9OKRQgSjsdIArGuCHf7FDCtCaKLJIYk7GhWhx3nfmD++DWZMjVTX7HII6QMo/rn9lrFXgp03G6aLcRXfjAAXo9Z03yl5kuhCNSjm5r75GXCXIT0FBmzofgH7KVzrrJJRcoAvvs5mX4WCj+96SYiwMaZOxNL5aUi70y/8X9fezOdPTwJKKzD+e1IzpgGniGzgEhRcZ2SQt0ukfGLzzGVlVvGeT+GXg+mOsUlJ6aH+t6v1K7SuO7E1FQ4ZjpFmrDqvVluvBrUxCbw9TNUqcFb7Q5fbr+aeAv6Y4FUVEQrXPZ898l23ztfAhKW7QBnduUc+MhJHkk1BvCfN2/XBlo30+6lBhhCttyKyLUzyui8Wg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR03MB6360.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(396003)(366004)(346002)(39860400002)(136003)(451199015)(83380400001)(2906002)(8936002)(82960400001)(478600001)(38100700002)(186003)(5660300002)(6486002)(1076003)(2616005)(6916009)(54906003)(316002)(8676002)(66556008)(86362001)(66946007)(4326008)(6512007)(26005)(6506007)(66476007)(6666004)(41300700001)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?MeovDRaZxM2Xney3vEz2xLMc/ZjN?= =?utf-8?q?tc9eZJ4hPGZo1T14Or325rIt1c7ILQzYck7EkPpfQEqjcHA2L8RGlwPV3dA/7JyfV?= =?utf-8?q?ybpY7sLld7bcBX8hJzqpa9IC6qUaOUTbYedrdftcpRPbzZlTgkpH+gtyR5BP0FGVU?= =?utf-8?q?FdgYNeRi9T4UTg6+XI97Ui7bGFszCxDewKxeCarm59oymLGRDhPGPtf6JhqN+hBx9?= =?utf-8?q?Gy9Nwztr55RLi2MSMpyJnhBMZ9j1+GlYtumBMitL/RS6h2teSSP+p2EANM6up2ZL9?= =?utf-8?q?N4zGoHj3ImPqQwdFcx2pqULGM/Cfp+F6D3g8pvWnex82dKUzi3Zn36VJ0Ez+/f8r9?= =?utf-8?q?I6Hw749AletnRm57FotvAk1OFGS3wNbittRJLD1kQ3/deoY3x2NEaNcuBWEXI7Rmt?= =?utf-8?q?JglRPTnb3ethiaik1yh9LGbus7EbJxh1xJMSddYVzPzH4yIuZEfOJayYwfoSAKpLa?= =?utf-8?q?DMjQXbs/KSpI08POgGZERYAYAyNq4OgpntRBhDPVBz0tHhlKljrDMqZwrQkardMs+?= =?utf-8?q?xDGsgbbQ2zgjTzlurwdqFYw+QFef5NPQbx6zTxOBGIsYCR8VwH3HPpq0+IKiybbgG?= =?utf-8?q?yt8pvsAI9KYZN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Fu7OWqyk+YGlrD9y1bJGATDmqBk8PhDd67ViO11Cay7?= =?utf-8?q?zW6p3NkYw4s5?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: 9J/g1hLBJJspCvMwQXAXsWy5Ze9PCLbZ2Fcv1qlquS1GcOHd5a5CYOIrC2GNlQqYvYcKwOIlslf5iqWpLfIwgduzZTMH1rSwxyAtpdgUHoI2lFp3MfpfOJ2WRZW4yPcujwj8H5rgveMcSY2iSOM+xqL3pWI+Rsni70C1eA1nogTgVZst4dlFjrPzz0rOLhszEwLwBewD/NPhjrOc2CoFTRUprFxOkxsl4EtLLXHXX6KX5XphYaGsRyUe0l9SB5jiHe6tlDwPaOAyHZoGNCkNISPC7h05cpIcZy2ocuZ5TeuJgnXvNJyu/fGGNsFlZpQ2B7OY2hNhfvi1M9vFetfcCx+ypxG4xydygjzQE1iaRpdCmN03wzMp+2jsuS2b4ULdpbjpbCr+3RA5LGEkEw6ITwsYI9HsB+GjTmW8SwioH4RAFW3II7tl1jGs8r+SWsCCtIPnR7FOoU//V/7iLZ+Z7DD9R7F+V13i6ueXOrag9T5+vKIQcEFYbb7/4s3JTWyA16CojOUELts/R1sRs8amafkRR6xZskd3qcDjnY76Lez+1dPOyLZWsS9CNuCpCliyFEk+nNghg8AAbuBgarHtcHVIM8TF5JEkPYw3Nm4dW34F3R3xC9eU5+YDRi3KugqTYL+gVi26ZjpCDH/vdoji/T2H/J0VKfAeXM7bHpl/0mkv1onPfESKCAtqqfzahLfu1yXQYu2/69KwmuZR+QpVGvIVWVp7H6Ig/0a31f4gOCn7HxVzvGmxciABIJfAz9gss4uEyR/2MoLR5ZDyiDSUHmFsXuvrCRxGiALIKoCu0Zxi/HBEZXIVy4ipK+6f7ebiT5tZFM/hCGnwoMu0xpvnZw== X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed775fcd-fe09-4301-f07e-08dac7f18933 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB6360.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Nov 2022 16:42:23.3180 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: PPk6UnnvlZAoLNGsZ40K621HH3WsnOVPvKS29xyXwM/KeLqPs8gFC2SJ/ojpSivOQlxSBzgjNOWGzSmZ/T5C/A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR03MB6459 Currently Xen will passthrough any Local APIC NMI Structure found in the native ACPI MADT table to a PVH dom0. This is wrong because PVH doesn't have access to the physical local APIC, and instead gets an emulated local APIC by Xen, that doesn't have the LINT0 or LINT1 pins wired to anything. Furthermore the ACPI Processor UIDs used in the APIC NMI Structures are likely to not match the ones generated by Xen for the Local x2APIC Structures, creating confusion to dom0. Fix this by removing the logic to passthrough the Local APIC NMI Structure for PVH dom0. Fixes: 1d74282c45 ('x86: setup PVHv2 Dom0 ACPI tables') Signed-off-by: Roger Pau Monné Reviewed-by: Jan Beulich --- xen/arch/x86/hvm/dom0_build.c | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c index 307edc6a8c..d44de7f2b2 100644 --- a/xen/arch/x86/hvm/dom0_build.c +++ b/xen/arch/x86/hvm/dom0_build.c @@ -58,9 +58,6 @@ static unsigned int __initdata acpi_intr_overrides; static struct acpi_madt_interrupt_override __initdata *intsrcovr; -static unsigned int __initdata acpi_nmi_sources; -static struct acpi_madt_nmi_source __initdata *nmisrc; - static unsigned int __initdata order_stats[MAX_ORDER + 1]; static void __init print_order_stats(const struct domain *d) @@ -763,25 +760,6 @@ static int __init cf_check acpi_set_intr_ovr( return 0; } -static int __init cf_check acpi_count_nmi_src( - struct acpi_subtable_header *header, const unsigned long end) -{ - acpi_nmi_sources++; - return 0; -} - -static int __init cf_check acpi_set_nmi_src( - struct acpi_subtable_header *header, const unsigned long end) -{ - const struct acpi_madt_nmi_source *src = - container_of(header, struct acpi_madt_nmi_source, header); - - *nmisrc = *src; - nmisrc++; - - return 0; -} - static int __init pvh_setup_acpi_madt(struct domain *d, paddr_t *addr) { struct acpi_table_madt *madt; @@ -797,16 +775,11 @@ static int __init pvh_setup_acpi_madt(struct domain *d, paddr_t *addr) acpi_table_parse_madt(ACPI_MADT_TYPE_INTERRUPT_OVERRIDE, acpi_count_intr_ovr, UINT_MAX); - /* Count number of NMI sources in the MADT. */ - acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE, acpi_count_nmi_src, - UINT_MAX); - max_vcpus = dom0_max_vcpus(); /* Calculate the size of the crafted MADT. */ size = sizeof(*madt); size += sizeof(*io_apic) * nr_ioapics; size += sizeof(*intsrcovr) * acpi_intr_overrides; - size += sizeof(*nmisrc) * acpi_nmi_sources; size += sizeof(*x2apic) * max_vcpus; madt = xzalloc_bytes(size); @@ -862,12 +835,7 @@ static int __init pvh_setup_acpi_madt(struct domain *d, paddr_t *addr) acpi_table_parse_madt(ACPI_MADT_TYPE_INTERRUPT_OVERRIDE, acpi_set_intr_ovr, acpi_intr_overrides); - /* Setup NMI sources. */ - nmisrc = (void *)intsrcovr; - acpi_table_parse_madt(ACPI_MADT_TYPE_NMI_SOURCE, acpi_set_nmi_src, - acpi_nmi_sources); - - ASSERT(((void *)nmisrc - (void *)madt) == size); + ASSERT(((void *)intsrcovr - (void *)madt) == size); madt->header.length = size; /* * Calling acpi_tb_checksum here is a layering violation, but