From patchwork Mon Nov 21 10:21:11 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: 627289 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 22F34C4332F for ; Mon, 21 Nov 2022 10:34:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230000AbiKUKer (ORCPT ); Mon, 21 Nov 2022 05:34:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbiKUKec (ORCPT ); Mon, 21 Nov 2022 05:34:32 -0500 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0019627CC3; Mon, 21 Nov 2022 02:34:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1669026871; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=OhG1pbo0HKf03bdp7i14jI3MJOhmG5fyzzDFeRToEuM=; b=WqHmp1ZPjB+WmNOtLHwMbkQ+zQjoTQ1xKO0BYEFi+MICbycvh14jroCZ XeZzf6Ll4Efv1WAY/JPLPWNXltnsHLkZrndYx//Kc8hYb8jc2bUFqCXE3 ahbU4Vq6tYTB2LMPX0e5jQkaIQ/Bpep+jkkXmaofcnWPf0Srh4TNc3lgt w=; X-IronPort-RemoteIP: 104.47.66.41 X-IronPort-MID: 85257545 X-IronPort-Reputation: None X-IronPort-Listener: OutboundMail X-IronPort-SenderGroup: RELAY_O365 X-IronPort-M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7QIKl2DaqY+9qzsnenO2 9NWNs/PzgoFVuT7O3PT6dRLcQlMKmUnD5frrcARbvSEPgdtBGAmDbnW3K8lfItm2a9Sk48k4 02AZ6OR83Kn7VWvFOlAQioLhG/HNXqnkU8GAA== IronPort-HdrOrdr: A9a23:W3xG5a74aS/2UGjmfwPXwaiCI+orL9Y04lQ7vn2ZFiY5TiXIra qTdaogviMc6Ax/ZJjvo6HjBEDmewKnyXcV2/hrAV7GZmXbUQSTXeVfBOfZowEIXheOj9K1tp 0QDJSWdueAamSS5PySiGfYLz9j+qj+zEnBv5aj854Hd3AOV0gP1XYbNu7NeXcGOTWuSKBJYq a0145inX6NaH4XZsO0Cj0sWPXCncTCkNbLcAMLHBku7SiJlHeN5KThGxaV8x8CW3cXqI1Su1 Ttokjc3OGOovu7whjT2yv66IlXosLozp9uFdGBkc8cLxTrk0KNaJ56U7OPkTgpqKWE6Uoskv PLvxA8Vv4DoE/5TyWQm1/AygPg2DEh5zvLzkKZu2LqpYjcSCghA8RMqIpFel+BgnBQ9O1U4e Zu5Sa0ppBXBRTPkGDU4MXJbQhjkg6RrWA5meAeonRDWc81aaNXr6YY4ERJea1wVR7S2cQCKq 1DHcvc7PFZfRezaG3YhHBmxJiWUnE6Dn69Mz0/k/3Q9wITsGFyzkMeysBatGwH7ogBR55N4P mBGrh0lZlVJ/VmI55VNaMke4+aG2bNSRXDPCa5OlL8DpwKPHrLttre/Kg13ue3Y5YFpaFC16 gpaGko9VLaRnieSvFnhPZwg1LwqSSGLHjQI/hlltlEUuaWfsuvDcWBIGpe4fdI7c9vRvEzYM zDSK6+M8WTU1cGJrw5rjEWI6MiT0X2cPdlzurTCGj+1f7jG8nNitHxVsr1Cf7ELQsEM1mPcU frGgKDafl90g== X-IronPort-AV: E=Sophos;i="5.96,181,1665460800"; d="scan'208";a="85257545" Received: from mail-mw2nam12lp2041.outbound.protection.outlook.com (HELO NAM12-MW2-obe.outbound.protection.outlook.com) ([104.47.66.41]) by ob1.hc3370-68.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 21 Nov 2022 05:33:28 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AvScgZsGqDa0NR2KIR7n5fVNr0diVh/savKaYpSfFFxvqyuJM6azyU+/FRCEzzJO8a+hm8DmeGQusqvj++TYP3vwpreShwlPGrYiJpsh2HN2EQNrNSdrNbW/oQKttzeusjbD7slYu+dRlU4bZoDuxZ/V09uRdE27d35zjgeWl9hwY8mCqRgylctDeCSbm/AgViwmq1M091Vx4blPlG3dQB5JvC0YELHPdLqDp3ekEftmEtJwGcbyse42d5dVRTGxtIfkKl+BSEeXbPKJTyCSgAAr01cgTwOKKKZ96CzUsVgP3vZpMjjQT0TiXDarx9phC6WOEFEH12vkuUZGquXMSg== 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=Vg+rjiccX1faa/xjxY+0Qw0fO6LNKDvwiUc3ugbC6P0=; b=Py3N2rqEMs/y1gkTEcMh/PjCOddExM1RzWa67Z7mN80rLzUhIFE5qExWUwMD+yXd7IZ8I/OI53QFkQw6SL7Lr3gP8fwz2ooHKf9lhLSy3gg3r2DDeRJfZLJAU1gnywePhVHGg+91ru65G4RGSFAvPeBEivCtztzQNg2+HZaBvqNGbMBWNvLjeFDeFqI85SUkm8QR7xQy4zNSYcAkBG6DMeSPx7Va0NEVFi9l8tH+6fIaf/qlK502RIIRe3Dj9aWJ9PyyevadtNt3dDjxPoMphuzbopdQPlCqQOVIiJClWNJEvAPinqPDcNExFNYFEC7e4fWuHJPFYAHhpkeoCWgyFg== 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=Vg+rjiccX1faa/xjxY+0Qw0fO6LNKDvwiUc3ugbC6P0=; b=bROBq+vzMaJTAxcK/2L/Upt6iBUzd4VaYgeEazMlekeqA9ESeQAflW+CyimXXv793g+E4NW/rwqqgSHpSx8Tv/BwkprMRmz0pprW+E7HDcdUcSAUFkSKfiNjW8KFgZPcqAoC6D0M4TFPFQPzF+KZADKhkfeS4iUMeI8fUcSeeQw= 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:27 +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:27 +0000 From: Roger Pau Monne To: linux-kernel@vger.kernel.org Cc: xen-devel@lists.xenproject.org, jgross@suse.com, Roger Pau Monne , stable@vger.kernel.org, Boris Ostrovsky , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , "Rafael J. Wysocki" , Len Brown , linux-acpi@vger.kernel.org Subject: [PATCH 2/3] acpi/processor: sanitize _PDC buffer bits when running as Xen dom0 Date: Mon, 21 Nov 2022 11:21:11 +0100 Message-Id: <20221121102113.41893-3-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: LO4P123CA0273.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:195::8) 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: dccdf515-9599-4924-fbb9-08dacbabd331 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Lea1d1MD2u4Fp0UglumcYiXvBnRvEZ5AAHOuqAVmAQSC0xxngLaohYJcCpofPr1Ktxqx6Iz24PpBB1dH+wEPvPoqEiqSChtGDpGMVevhDsTVUufyoZUV5w/ELvvKC89yE1prq2Uk6tqBPr+HwuJ2+2EvIORL6sHOqzXnAF7Sd1qZewPHSyc8MGyPt4fL4rDhzDXmeqKO9Vie7xFLHIAdSvZgqm1uc4PJIa/9I9q0K6AvKpXqGYzBYeEHmyFOcYvN1OXL7KDHk8kPzSPeyPWWgpYoPGfCKQ1YA9GqYaupkkHaVJr2H/vApoMroBF3RRi7chNaFgTOOEjfhDLdaNCzorUL32Z/ygf1jfgJkN2xSxq/C/UeMAQXPHXI7dTZL5A0ZHBbmPL9X+0A/u0/ENcrc2H5mWE48QTNkpzrZyVGcw9a5ake6tYALhZE8ZwvwCff6NUJcMpNWnlRGxm5E/bfjH1w9kgjA53IaddG4mj6Yc0DmYo6J0jKdk/56x4QZ/O9y7hUmekiToAGnOcc/8VATzHl4/BGRw16l+7m7X+fyCVgi9lOhtMEpnDW0OU9gAcWBx0FmH6k8i+f66g/xOo5rEKDreaIrOaPh2+d1iyyGvve5IMI35xCk7+Z68L3AZQcAM4SqqPTPD2QtmGfIU/pMw== 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?Sfl39oyQjCPHnqiRdOW0o0loDiiN?= =?utf-8?q?VVHbcWT57dvoNLzgpulmM391UY3FBTXxL4i1pXR/8qul1Tg4ebyEs1PcA60bZWD4J?= =?utf-8?q?RJkKt+jC9WX/4oAb/TLO9qt38lKdNtmCjUFgjtS5haFlmss8i7Jpv2pWMtmDcMobq?= =?utf-8?q?2rKEdBPbGm4GrvvPUpYw3TE+BcaPafh3oRhSJfiTK9d39Yn/Swo0X4NtAzFd0BpU+?= =?utf-8?q?83rya8NMeaHB9o8YdKN3ixRE4JTb4Np8D5X+ir8Krz8Kgnqz5dg1nJmQ7E9MsGdbn?= =?utf-8?q?g5JV+QqAKyzQ/iY5ryoY1Zogm9bNffGgArwUJE8LiUxzoKSMc0jf5xsfCAfDl6m+P?= =?utf-8?q?/4xl+gU2cUGSB6gclfaU7WBccNGKQV1CJVgapIIGvPN9Y6J6048PARX+KU77c0NDo?= =?utf-8?q?TYJFU0WRraHN3ztQ+hRxkEY0/v+GuFuxmPfxTNf0/u6ZHyVNsklTipcI5L8e3YKmY?= =?utf-8?q?pmB1oAapF4WpDIvqezAaqetNAnuTQZRE+TMPuY6X5drJRK+7otBLGEjQuk9lxzxxG?= =?utf-8?q?FyOLNkZkxKHS96NK5wnhdxw1BiqPJP37+U318ik0hFC22CaYwypHVqQ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HmyxupZ?= =?utf-8?q?+E4pe2TbKQ5u4A9NJ6xVOysUZceI5/Wirnf1YctdbRSxLbLONKKgC3HmYVmPnXyqk?= =?utf-8?q?GobWoj01hTtV?= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: =?utf-8?q?Z6jxbOZbnXUCM+HB?= =?utf-8?q?HBMxbdTQHKZgMZMivB2pcgZufrDuKLrKKmZt9N7D12S3e1e40ZNMGpT3yR5Ix2oXW?= =?utf-8?q?8xB+ErwVWsK0Mcp1dAthQ+uFjFIDOPC7ssV3wev/dKlvRewooNfUiiEMwKMWfhpBS?= =?utf-8?q?y5usrRd75J/R8t1ZLY1j2ksuhc4jQZcNniUQMkcSlolSovleOjru0jpSy943/vkS3?= =?utf-8?q?e7roMwRmtMTVltr9uASqzlNa4RsvweDbHQKTVMwBH0DcAqLwWYIHHNKj5rfRQLIS2?= =?utf-8?q?noOibDMNEzFQYFCvgplFBofLq3rFeVRnJUXTv6xSITwkNOpoEpFVh11sodDG4Q7iK?= =?utf-8?q?eGSd7cnaTx4gO+0ATVWxAGaOOxaJNrqEZs56SWO73jK/UJzD4mOPZ4/tOWkv9CutV?= =?utf-8?q?57SpUIY+XPpSvHbgnXuatTOwfop/edwsieK2l54rQ47HRBkcnYomqSEGug+6YC6e/?= =?utf-8?q?pJmJhnFvpYjbueGyHAFLMF9T2JtaqwhqThIAs6QaBNJhya4lcmMcjbJO/Gya1sXWd?= =?utf-8?q?3/SXQ6XQ3Trn3OgpPoQXRrcH5JcwYmRjM4vZFTAjdi4oo/lfsievphYFE3MMeZm08?= =?utf-8?q?a87wKEhwhO+ZpHCml5oq5bCUXzLpTefdQOSe09ajckc4tx9Dx2VowwR9CVj1PSPrl?= =?utf-8?q?TihUY2LpFVLTAEOKb12OgMLx4lHVcJPeqIR43f4+lOg9czqiJA+NvQRW/7zvydvCL?= =?utf-8?q?mdmb5mQ2HfQxve7mzAPArbjBPvyAbLH4sKtDzsGAsjG4wV5vTDy+YJr3KGmVuJmRG?= =?utf-8?q?RA5yZ2/Nj35G2yIWjAAa6wl8Lm1mlIy94hosC0RgP6Zz8slwszO7vEvWgFLJgWGKD?= =?utf-8?q?pYxdpZ7LKS5iDiUFN64erZ4rfiGMlkSb4ujdcJp0EwOt46WkImpLApvl7Z+8CyVBZ?= =?utf-8?q?yz5i030woqTFzFY2c1bW0DpZuu+xnFWUnnX32qgjjrr7culuVlR5C32lfZ4bGtN0y?= =?utf-8?q?6Ma5r/VGC0+mEu8RejSOWTG80heFDiUvQooz9mzA6wlXarksFqwVCEzHNRth9RjcO?= =?utf-8?q?IHn6X6Mznbhp1/cv/JYuvh4wLdETUk5lcwVXx77UUlzmT1XvgWphgWbJ0yMiZO3Ru?= =?utf-8?q?Iz8uNMz4fCJbUwP6/lLVYZ/BtM84nwZGLt7Bt4mI0+1fyNewLYFN2a/2n5waYyZ2w?= =?utf-8?q?OJ/9Sf/pV8MQJg5teft1PXWZ/Y/514hQcJMYwR+dSaXASgbrkNXA=3D=3D?= X-OriginatorOrg: citrix.com X-MS-Exchange-CrossTenant-Network-Message-Id: dccdf515-9599-4924-fbb9-08dacbabd331 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:27.1804 (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: j9QCyLUjfjXEGBx7UlRAyBtNMf5Q6/y0WQFVbwDgLK1TWirOJP5fSUmLL397XKna5j2ailLu9tQha84uY7bT+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR03MB6102 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org The Processor _PDC buffer bits notify ACPI of the OS capabilities, and so ACPI can adjust the return of other Processor methods taking the OS capabilities into account. When Linux is running as a Xen dom0, it's the hypervisor the entity in charge of processor power management, and hence Xen needs to make sure the capabilities reported in the _PDC buffer match the capabilities of the driver in Xen. Introduce a small helper to sanitize the buffer when running as Xen dom0. Signed-off-by: Roger Pau Monné Cc: stable@vger.kernel.org --- arch/x86/include/asm/xen/hypervisor.h | 2 ++ arch/x86/xen/enlighten.c | 17 +++++++++++++++++ drivers/acpi/processor_pdc.c | 8 ++++++++ 3 files changed, 27 insertions(+) diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h index b9f512138043..b4ed90ef5e68 100644 --- a/arch/x86/include/asm/xen/hypervisor.h +++ b/arch/x86/include/asm/xen/hypervisor.h @@ -63,12 +63,14 @@ void __init mem_map_via_hcall(struct boot_params *boot_params_p); #ifdef CONFIG_XEN_DOM0 bool __init xen_processor_present(uint32_t acpi_id); +void xen_sanitize_pdc(uint32_t *buf); #else static inline bool xen_processor_present(uint32_t acpi_id) { BUG(); return false; } +static inline void xen_sanitize_pdc(uint32_t *buf) { BUG(); } #endif #endif /* _ASM_X86_XEN_HYPERVISOR_H */ diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index d4c44361a26c..394dd6675113 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -372,4 +372,21 @@ bool __init xen_processor_present(uint32_t acpi_id) return false; } + +void xen_sanitize_pdc(uint32_t *buf) +{ + struct xen_platform_op op = { + .cmd = XENPF_set_processor_pminfo, + .interface_version = XENPF_INTERFACE_VERSION, + .u.set_pminfo.id = -1, + .u.set_pminfo.type = XEN_PM_PDC, + }; + int ret; + + set_xen_guest_handle(op.u.set_pminfo.pdc, buf); + ret = HYPERVISOR_platform_op(&op); + if (ret) + pr_info("sanitize of _PDC buffer bits from Xen failed: %d\n", + ret); +} #endif diff --git a/drivers/acpi/processor_pdc.c b/drivers/acpi/processor_pdc.c index 18fb04523f93..58f4c208517a 100644 --- a/drivers/acpi/processor_pdc.c +++ b/drivers/acpi/processor_pdc.c @@ -137,6 +137,14 @@ acpi_processor_eval_pdc(acpi_handle handle, struct acpi_object_list *pdc_in) buffer[2] &= ~(ACPI_PDC_C_C2C3_FFH | ACPI_PDC_C_C1_FFH); } + if (xen_initial_domain()) + /* + * When Linux is running as Xen dom0 it's the hypervisor the + * entity in charge of the processor power management, and so + * Xen needs to check the OS capabilities reported in the _PDC + * buffer matches what the hypervisor driver supports. + */ + xen_sanitize_pdc((uint32_t *)pdc_in->pointer->buffer.pointer); status = acpi_evaluate_object(handle, "_PDC", pdc_in, NULL); if (ACPI_FAILURE(status))