From patchwork Mon Nov 21 10:21:10 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: 627557 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41F41C433FE for ; Mon, 21 Nov 2022 10:34:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229885AbiKUKeb (ORCPT ); Mon, 21 Nov 2022 05:34:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229842AbiKUKe2 (ORCPT ); Mon, 21 Nov 2022 05:34:28 -0500 X-Greylist: delayed 60 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 21 Nov 2022 02:34:27 PST Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 32B7927CCF for ; Mon, 21 Nov 2022 02:34:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1669026866; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=YHPGugGitXvHZlE1d9kV/h0t+sD3euQGc1fPgzWqA5o=; b=hKVC0gleG91fnL1E3QL5j6a4pCL3ZTC/12bAnmcHZJSx94lai8egFamR hWHLIemGSi27JG76sSaYArhiuyv/noL8a8glW1OGc0GOql8ml1Mff1JBN 1X1jp9pUPR/kIW5ouERqI4kiEpF6py/vojHl9u4XPMYJnMR0N0al/LZL6 I=; X-IronPort-RemoteIP: 104.47.66.49 X-IronPort-MID: 85257541 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-MailFlowPolicy: $RELAYED IronPort-Data: A9a23:46A+dq0vDFv1o4vKu/bD5fpxkn2cJEfYwER7XKvMYLTBsI5bp2RUy DEbUG2OOvbYa2H3fNp0bo3l80kOv8eGx9ZiG1dopC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefTAOK5ULSfUsxIbVcMYD87jh5+kPIOjIdtgNyoayuAo tq3qMDEULOf82cc3lk8tuTS9nuDgNyo4GlC5wVkPKgS1LPjvyJ94Kw3dPnZw0TQGuG4LsbiL 87fwbew+H/u/htFIrtJRZ6iLyXm6paLVeS/oiI+t5qK23CulQRrukoPD9IOaF8/ttm8t4sZJ OOhF3CHYVxB0qXkwIzxWvTDes10FfUuFLTveRBTvSEPpqFvnrSFL/hGVSkL0YMkFulfGU9q8 +5DChExPh2oh9Dx+q6ge+g1iZF2RCXrFNt3VnBI6xj8VKxjZK+ZBqLA6JlfwSs6gd1IEbDGf c0FZDFzbRPGJRpSJlMQD5F4l+Ct7pX9W2QA9BTJ+uxpvS6PnWSd05C0WDbRUsaNSshP2F6Ru 0rN/njjAwFcP9uaodaA2iLx3LKQwH+iMG4UPK2H0fds3Qa5/GMoVDgXdnCmpty7uFHrDrqzL GRRoELCt5Ma8E2tU8m4XBCipnOAlgATVsAWEOAg7gyJjK3O7G6xFmUCCzJMdtEinMs3XiAxk E+EmcvzAj5iu6HTTmiSnp+Woim1IjM9NnIZaGkPSg5ty9PkuoAoyBXUUsxkDrW2n/XyAzj7x z3Mpy87750Pgsob/6G6+03bmTWqp4iPQgNdzgDWWG2ixhl0aI6se8qj7l2zxfxYBI+dT1SH7 D4IlqC24OkQANeNnSqWTeMlGLCv+ubDMTvAjFopFJ4knxy9qyCLfo1K5jx6YkBzPa4seSfgS F3CpQRLopRUOROCd6Z5ao+1I8cn167tEZLiTP+8Rt5DZJJZdwKd+ixqI0mK0AjFmUMskKg5N r+baYCnCnNyIbpqyjm/W+oG0fkzzyQ6xHvaSZHTzhK73L7Yb3mQIZ8BMV2TfqUw57uFiBva/ swZNMaQzRhbFurkbUHqHZU7KFkLKT0+GsrwoskOLOqbeFI6SScmFuPbxq4nd8p9haNJm+zU/ 3a7HEhF1F74gn6BIgKPApx+VI7SsV9EhSpTFUQR0ZyAghDPva7HAH8jSqYK IronPort-HdrOrdr: A9a23:lLr1CqHA5d/qxkw5pLqFiJLXdLJyesId70hD6qkvc3Fom52j/f xGws5x6faVslkssb8b6LK90c67MAnhHP9OkPIs1NKZMDUO11HYSL2KgbGD/9SkIVyGygc/79 YeT0EBMqyWMbESt6+TjmiF+pQbsaG6GciT9JvjJhxWPGRXgs9bnmRE4lHxKDwKeOAKP+tOKL Osou584xawc3Ueacq2QlEDQuj4vtXO0L72fBIcABYjyQ+WyRel8qTzHRS01goXF2on+8ZpzU H11yjCoomzufCyzRHRk0fV8pRtgdPkjvdTGcCWjcARCzP0ziKlfp5oVbGutC085Muv9FEput /RpApIBbU511rhOkWO5Tf90Qjp1zgjr1fk1F+jmHPm5ej0XigzBcZtjZ9QNkKx0TtpgPhMlI Zwm06JvZteCh3N2Az7+tjzThlv0m65u2Arn+I/h2FWFaEedLhSh4oC+149KuZIIAvKrKQcVM V+BsDV4/hbNXuccnDip2FqhOehW3widy32N3Qqi4iw6Xx7jXp5x0wXyIg0hXEb7q8wTJFC+q DtLrlovKsmdL5ZUYtNQMM6BeenAG3ERhzBdEiIJ078Ka0BM3XR77bq/bQO4v2wcpBg9up8pH 34aiIZiYcOQTOsNSXXt6c7sCwlAV/NEQgF8/supqSQ4dbHNf/W2S7qciFdryLvmYRaPiThYY fCBHtnOY6cEYLQI/c54+SHYeg1FZA/arxghj9pYSP4nuv7bqvXi8f8TNH/YJLQLBdMYBKNPp JEZkm/GPl9 X-IronPort-AV: E=Sophos;i="5.96,181,1665460800"; d="scan'208";a="85257541" Received: from mail-mw2nam12lp2049.outbound.protection.outlook.com (HELO NAM12-MW2-obe.outbound.protection.outlook.com) ([104.47.66.49]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 21 Nov 2022 05:33:22 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hIpmqLgd1AzlqK8pqGDec0OLCrIb8xv/yosS8KXL/bN28ieay/LlbgbozxatE+yaEpSP/5jEHN9pLhtBVJUMMR6l4aFVRwFzy8RLH2dm6R7X50SDJ1AdymDDVEikFEql5Wz4UvTq12t2jjyiVgGllJFXnyoKmD3FzC/b4J02dRCwosWGXM9lDovQ55YPl3YAtMnOZv1oRA33Y0ZEhk8jSWyAL0rFMTWBFLm07aN77FpROiurpmNQDgahonxNPdRcMr2rOvMZ+29EG0N1DCTwKHOiUWxXmO5c8m7PFBmfO1P1hkChGxUwzEAXzMnNvl9bRik8/oq5ksYSHYHYe8CWsQ== 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=V+3B4L6OirXeCSTJWk4PnCTnlFvaE8OXfvZ/IgYSk6A=; b=hyS4BGKh9pbxAsdhDiynwJfs//zih3895saqEs31lA8EjCdrifxFamaePSaUV1TQ+fOseJISzrQXxTA9mDKlYNG+nBEQn7ovwKa6Ov+PXQSFADOKpN6PQLegN8x0OMZ58BVD4uiekB9R3voNssMF+UoFhKZxKaxF0CdPWHuw1+5o+c51NZZNZvM52ts5lxu+nzXe3Mk0JgjLzTJ1kJuu2yfn32H6lW07hzt1OFAGdx8/3Z+954mGlP7sOu/5Rm+8s4ygcnCp1gv/7DUwEOWsXrl+PZCjNFKkwwj+VRE1mpBmogkLszhgwEHomKk15P5ioKFYQeJWJznorpXCXgVTGg== 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=V+3B4L6OirXeCSTJWk4PnCTnlFvaE8OXfvZ/IgYSk6A=; b=wqJSgE7utIsmTSsPzikIXUv6qWUXOLiRiXZxWZtmP41BM1KbEuml7ofsPfHvq6XbAVtkWZNut1r5RbeOI9Bk6Wd/fup4aPcMaCNWTAs1A4TJdrfi7bLFDiJVrQiI0WEaH7SZ9KgBAM6Olq9CHQlNZt9G1P+0aFAJ7x6LG6XGvZU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com; Received: from SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) by BL1PR03MB6102.namprd03.prod.outlook.com (2603:10b6:208:31c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5834.9; Mon, 21 Nov 2022 10:33:20 +0000 Received: from SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::740b:4e0a:7de4:5ab1]) by SJ0PR03MB6360.namprd03.prod.outlook.com ([fe80::740b:4e0a:7de4:5ab1%7]) with mapi id 15.20.5834.015; Mon, 21 Nov 2022 10:33:20 +0000 From: Roger Pau Monne To: linux-kernel@vger.kernel.org Cc: xen-devel@lists.xenproject.org, jgross@suse.com, Roger Pau Monne , Boris Ostrovsky , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , "Rafael J. Wysocki" , Len Brown , Alex Chiang , Venkatesh Pallipadi , linux-acpi@vger.kernel.org Subject: [PATCH 1/3] acpi/processor: fix evaluating _PDC method when running as Xen dom0 Date: Mon, 21 Nov 2022 11:21:10 +0100 Message-Id: <20221121102113.41893-2-roger.pau@citrix.com> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221121102113.41893-1-roger.pau@citrix.com> References: <20221121102113.41893-1-roger.pau@citrix.com> X-ClientProxiedBy: LO6P123CA0041.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:2fe::12) To SJ0PR03MB6360.namprd03.prod.outlook.com (2603:10b6:a03:395::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB6360:EE_|BL1PR03MB6102:EE_ X-MS-Office365-Filtering-Correlation-Id: fe416c5d-484e-4b08-2ed8-08dacbabcef7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rnbkGf486ctDaemLQOehJivg6yriyrtrll6TV8wRURi3pxnCLqz4yDd+uARn4d65Rkcm/so0lxHNrLybHIeaAvO0jJjwMm1ym5KgNxVOrdlTUZOwbV3LWQIZEiNOLf3pSlwJF0GLydgNx9IOH1BnCnbjtY2FVfWHOm6+3w1MFiL6ljwsSQcQLVsU06uRW8BLc9ixfKUz28MvWxxCyBFnQlIFi+y+5TQVc0mFuPwwarhhtQj38+l9JscUTZDcOLPv8sJ4/oayunvazhPhVkS0tlmazQs3gHWqk4opUg6UCc9Ap9DkDO1ofIa4TGqyOryf34Tke5XzvyPxdAJtgga93nt0clHpyULbX81Pkp2FHIawWNkAniwqO3+TSdLCk6u4eLKepm79kdJc6LITvuMMOCvwGwWT+zUXPj82pEU/Ae8eDv0UjZEzOK/GU8e+i+kMi/nqDdkutkqWfg5y5gAirrQVb+JRVcPagtrA2G9Kn59IS5l1W2qpRIWykW0T09wvzmqQ883PvBMMOIBscphoh/3m2k/tsiU95LMiLyLyA9pI59MtdRjosN0pKfS1Pppaeo0cd/8SxBafCJF5duJm8q44YqF/kOdRhbnFr9RYbFbRXfj3tnfe+Lh9zRSjCdDYpWtBTo74J9DooVYWIEn5Sg== 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)(39860400002)(346002)(136003)(366004)(451199015)(478600001)(6666004)(6506007)(6486002)(54906003)(38100700002)(66946007)(66476007)(26005)(316002)(8676002)(86362001)(6512007)(83380400001)(6916009)(66556008)(4326008)(82960400001)(7416002)(5660300002)(186003)(41300700001)(8936002)(2906002)(1076003)(36756003)(2616005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?jyAvvgZLrjRLlkLlAUHBQGylZ4mF?= =?utf-8?q?lVuV9MNEEcKurgziqsL+AfXDU9SDyKETGpS9RCY3TLUgwpVbwkPSVqANNsKr8ix1H?= =?utf-8?q?Bc5RamTZOT/qkBpeWHhWZauWgG1eaUb48AGvb66631dIOQFZf4gOWJ/CJ363DN6Oa?= =?utf-8?q?8eL7sjS1w3S+rGQUDgCLRQcKnoAdqZeQHw2ijljQdsRSMdUQ9ikQNT7lKeEyRbcCg?= =?utf-8?q?+KoJ6aeOkjuuHutWs7FVO6i58nhVQi2TVWDsBVxhWDiy/1ZFhPl+1ay/FnhiUzo1e?= =?utf-8?q?QitQ4rFlyfAVlxQ6vhOHNPNV7JN3hJOypODtQIgsJ2uu/lMAxBvutin/FhBQX+pWa?= =?utf-8?q?LtTa4uJtwxa5W/wu+YucwpOV+EIDZjnV+srhoaosZKAnvQ3Pp7b3xpPmO2q20o9gs?= =?utf-8?q?pja9Z8QyTlKXbbpoUOxTvtZGLxu1K6q8KCVkocxFsDJo5DRsCX/REIPT7Tcn/RlZi?= =?utf-8?q?GhzJoajFE0L9IGzuWpNevkoclPWkF5lrwj90GO/a0lmFVcIG8iKzZ12mc3guGbBam?= =?utf-8?q?CncnxYDK5NpyEeHMfLFoB0ok0qkpBAazmBp8wbEjps01Af5UvkIss3Gf0+JfYz2WD?= =?utf-8?q?Ssx+Y5taogsllvhv9pTxyUZXQMq+t18G93DHBN3AaQRda7r2jSSmXKtJ3ucO2kLwN?= =?utf-8?q?qiieLC61GKNxWTrDAbnYBppEdaM1KKDwLNLjI8xmHH37OQXCwZ/vL10Sh0Bya8xGV?= =?utf-8?q?GFa3QTcujPROnukiLWrP+ljQMxBGtePTDkaEilF7zYWwDSkfrvXanReLrDRL9oJtz?= =?utf-8?q?R9dz+p5stM9PE6VUOrr1Ir6zCowDtQAYmkMkNgh2V1dB6aZEI+mp0HlWnIXjloE3v?= =?utf-8?q?Z9AcxdfLWzdArn9FGfP8Nt6COh+lHv0sPZoHRuQ7mrxTve1RvATRBpP4gZAdFWgq9?= =?utf-8?q?/h+QRJvUaj4cFDKOJPfvKt8DYIXKkdqW36hJfjGSt44Kk2FHFjanboEIshOkYlTDG?= =?utf-8?q?w8t53h217o0bnAnT/pil1e1BMrLRkQphG7Vg+0KINyUUARgs7a80CEIwczYhVUgrz?= =?utf-8?q?/l9hIouKta4nLSWdMJvb7r2w8loqQLRhkWK/nxk0oRrknKoPF9V98CCf0+4Iud63r?= =?utf-8?q?IoWqd3vjsCVWl9hjuzPF9hKyHe640+LPltPxZVgVf+ZhK6D9b/8TxTHHT6tAjaicb?= =?utf-8?q?H3LQKnVkohaZXm7epJl4PsXtRsjGy6ha/k4psHZyd5udKPOpZTHBAn+2oan7jo1Ol?= =?utf-8?q?hnCFFOKwBRK1SvGLwZfoHooE3MU+DWcC56aOPcmEtMi4eBoG1Vgt2itPzr3Fiyo28?= =?utf-8?q?E40Xj7/8GasITilVXQ1axQwFN7SsoWVZEnD1yiC2OZz8DQ9QwDdA3L3aneoK3nCnz?= =?utf-8?q?wamdHjfxC/H75S3/eLtBKxE+KkbsQ2NTWuBF5k0VxtaIfWAmhJ0Y3E6gOumO+DyE0?= =?utf-8?q?BaGZIXKNUEoUM01jWGfPIug6J5aLIWIuNRtM/Wm7YGRxorR/1c2mFLwimdR4B4Z4y?= =?utf-8?q?MBTl/JNoHdEasJP7WTeHuvxdWL3NdwIBMMcGwf9UmHJdUUaZ6YuWOOoDgcQ3kVdj+?= =?utf-8?q?b2f1SiaWy0Ej?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?8+wShEG+/RzUP6jf?= =?utf-8?q?5q/FRgnZvTsJD/ZRI/Rh/k48EvEd8abfxntEUhrRw2CpuwUhjv3t+vN9AfA/Ml3E7?= =?utf-8?q?twYDBthLLQijPXmhBu4UaFtORgUMwq1u3+sZMw7zhBYnAfXJHVAaxolCr/wWxpX5r?= =?utf-8?q?CQah33SllFG9IJj0s0jg6Bc5CmRG7bKM+UOh43DT9yv+Leju2qplY8WrEOtjkYqBU?= =?utf-8?q?7tegL5FqSMQ2Q2dLkYzG5lNZSzdTfFbQK0Rkm4e0E7bw8hnoPA2a25VXTBeXsXvXn?= =?utf-8?q?14yyHt25heYf/nllx+W2OBrP+RFd5zR007+m+NQkEdUCHQyROPWp+/6MReHMXhWMF?= =?utf-8?q?df7m7bxz7WPmWwQ49MMYgt1Xid2ybPgvVdOGf6hYW29wpivG9dM43I7ZNrTrQdCc3?= =?utf-8?q?LZTB9z074lqTXIhKUDL/oeFjADSrOrgBVQSU7KICbeF2oRlz2hOHv58LpGrOl3RW9?= =?utf-8?q?duT9J0vH5OIOOxer+uoLPMdQ48+IB/XoZZTxoccpyQTNzOxkBfHwKAmeSd48nqE15?= =?utf-8?q?gl6j0PNeJeH4ikk3/usti5P37Aq3lFZl34JuP7QwYQgUaa8dQDZBa6Ui+AQpn+eZp?= =?utf-8?q?TqNQo5FQD11n3k14ZytiwT3qkVrK8VyjU7PlauHZXUgH9YXy9Ysj+0gJGoiANxD3b?= =?utf-8?q?BwsX6hZV/o/T9jWn9OmMbDJ0W71ZzyZZcIw/Xxjc+A3FxtBDiDWZU597yt/x0n1iB?= =?utf-8?q?4wk3YfZnleGQvg43t7krPR1fn/cICCzoFAxCokEqTX7ZwrtiX+N1t6iETY+nbZJP0?= =?utf-8?q?ojl3UBsW8YkI0PNlRKavmUVdreCMfMKFtP1RtuHXqhIjT3Y+46nDKreSD3qaq5l8l?= =?utf-8?q?4fr3q3yPjDKbPVpiT1echq3Hx47wyKSG1x+45yc7xwe2SLdzGELRIh4lvUqUYlPj/?= =?utf-8?q?tVLKBDuUb5hJlI7KKs1Q1VAU9ODOHeOPmUMQCzHm0c1CpI/gelKPbS1YISZ+kCUWt?= =?utf-8?q?tqYHVEglWREpVOUKhlTQmKlzYtWvk4hs0CZBnInGXg6NkH/N6FDjOUgt+lSEH3h4H?= =?utf-8?q?2gdqcoKHevTt4CKzEQRjZygeUJXbjW7ElOpQsejiO/7Zvxk5NsgmEfmnRFUcyYEaO?= =?utf-8?q?UGRj+fhlJfjlH4zkB1mzFmi9K3YLXHKbF0gUdNObz0LilbPWIY0ZaEFX52bFShOUn?= =?utf-8?q?XWR/vPrV7MizKXd2rNXQgbnd00HXNAXx+wULtlZhwJIjS+V8nFUQ=3D=3D?= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe416c5d-484e-4b08-2ed8-08dacbabcef7 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB6360.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2022 10:33:20.7252 (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: pZiemV/SDoG9Ln0GCEvmTh/MKvi7TdyjpgEzrjy7YSpSf4s5gYtxgOLxo2nztL/rkYGuKuVGXmY4oSrqIuXXNw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR03MB6102 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org When running as a Xen dom0 the number of CPUs available to Linux can be different from the number of CPUs present on the system, but in order to properly fetch processor performance related data _PDC must be executed on all the physical CPUs online on the system. The current checks in processor_physically_present() result in some processor objects not getting their _PDC methods evaluated when Linux is running as Xen dom0. Fix this by introducing a custom function to use when running as Xen dom0 in order to check whether a processor object matches a CPU that's online. Fixes: 5d554a7bb064 ('ACPI: processor: add internal processor_physically_present()') Signed-off-by: Roger Pau Monné --- arch/x86/include/asm/xen/hypervisor.h | 10 ++++++++++ arch/x86/xen/enlighten.c | 27 +++++++++++++++++++++++++++ drivers/acpi/processor_pdc.c | 11 +++++++++++ 3 files changed, 48 insertions(+) diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h index 16f548a661cf..b9f512138043 100644 --- a/arch/x86/include/asm/xen/hypervisor.h +++ b/arch/x86/include/asm/xen/hypervisor.h @@ -61,4 +61,14 @@ void __init xen_pvh_init(struct boot_params *boot_params); void __init mem_map_via_hcall(struct boot_params *boot_params_p); #endif +#ifdef CONFIG_XEN_DOM0 +bool __init xen_processor_present(uint32_t acpi_id); +#else +static inline bool xen_processor_present(uint32_t acpi_id) +{ + BUG(); + return false; +} +#endif + #endif /* _ASM_X86_XEN_HYPERVISOR_H */ diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index b8db2148c07d..d4c44361a26c 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -346,3 +346,30 @@ void xen_arch_unregister_cpu(int num) } EXPORT_SYMBOL(xen_arch_unregister_cpu); #endif + +#ifdef CONFIG_XEN_DOM0 +bool __init xen_processor_present(uint32_t acpi_id) +{ + unsigned int i, maxid; + struct xen_platform_op op = { + .cmd = XENPF_get_cpuinfo, + .interface_version = XENPF_INTERFACE_VERSION, + }; + int ret = HYPERVISOR_platform_op(&op); + + if (ret) + return false; + + maxid = op.u.pcpu_info.max_present; + for (i = 0; i <= maxid; i++) { + op.u.pcpu_info.xen_cpuid = i; + ret = HYPERVISOR_platform_op(&op); + if (ret) + continue; + if (op.u.pcpu_info.acpi_id == acpi_id) + return op.u.pcpu_info.flags & XEN_PCPU_FLAGS_ONLINE; + } + + return false; +} +#endif diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c index 8c3f82c9fff3..18fb04523f93 100644 --- a/drivers/acpi/processor_pdc.c +++ b/drivers/acpi/processor_pdc.c @@ -14,6 +14,8 @@ #include #include +#include + #include "internal.h" static bool __init processor_physically_present(acpi_handle handle) @@ -47,6 +49,15 @@ static bool __init processor_physically_present(acpi_handle handle) return false; } + if (xen_initial_domain()) + /* + * When running as a Xen dom0 the number of processors Linux + * sees can be different from the real number of processors on + * the system, and we still need to execute _PDC for all of + * them. + */ + return xen_processor_present(acpi_id); + type = (acpi_type == ACPI_TYPE_DEVICE) ? 1 : 0; cpuid = acpi_get_cpuid(handle, type, acpi_id);