From nobody Fri Nov 29 14:51:41 2024 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; arc=pass (i=1 dmarc=pass fromdomain=citrix.com); dmarc=pass(p=reject dis=none) header.from=citrix.com ARC-Seal: i=2; a=rsa-sha256; t=1638200172; cv=pass; d=zohomail.com; s=zohoarc; b=bJ/tY689jJv3Zf0t1xilPZ1kCE2+E/9BQ3hrr4+ai7f6Akn4tQQ5fshAyXgrzqYSitnfDlOSyjfOapA3d+8peiybeUvvBED7wpFTgz53ZFowBgYxod1NZSuSwD4Y23U9t51PfE15Foc0xGhcpzhey2wvhN7Er2hkpx5SwULhymg= ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1638200172; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pYxN81WyLozHtjD5+pJmUF7N4C4RnSrAAPdZ1oW1kQ4=; b=YvhpA2JdrcMZ52MIDQpeT4N8mq5xgmOfTx9lkkrbFnkkO16tVWC1tCu0RnBG2Bqj7bI9LPd5lsFSuEci4bpVhv3g3YwQRfxUom3TK8QHlYI1p0v7Yo1ZuTytA2kMZGJxZcxhv+0xfS3vlILvypkdpl/mIUJ+srjyteyICdTbeT0= ARC-Authentication-Results: i=2; 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; arc=pass (i=1 dmarc=pass fromdomain=citrix.com); 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 1638200172237624.0950743602245; Mon, 29 Nov 2021 07:36:12 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.234639.407231 (Exim 4.92) (envelope-from ) id 1mrigy-00062w-Ru; Mon, 29 Nov 2021 15:35:44 +0000 Received: by outflank-mailman (output) from mailman id 234639.407231; Mon, 29 Nov 2021 15:35:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1mrigy-00061l-Lb; Mon, 29 Nov 2021 15:35:44 +0000 Received: by outflank-mailman (input) for mailman id 234639; Mon, 29 Nov 2021 15:35:44 +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 1mrigx-0003uH-Oa for xen-devel@lists.xenproject.org; Mon, 29 Nov 2021 15:35:43 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 027fe5e0-512a-11ec-b941-1df2895da90e; Mon, 29 Nov 2021 16:35:42 +0100 (CET) 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: 027fe5e0-512a-11ec-b941-1df2895da90e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1638200142; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=vJgygXMLh29agTSCf9vMlpEoMHoCQz1edDiz8YwvCI0=; b=hm8LnQ4qQvzx8HtAATk5V4LOkJ+mHDZIqHv8XbCL/ZZkX+A2gyak1ZvO aQ9SJ22fWj36MW3BTCO1tSr8CL+TjEnkSTLbpuaQavgelsgOgxD8PCki/ 2L2ucIX9fDyFz5XvuI/cCyYY+yguVTKB7eIVrmYHfljLtMa8FPBSwgAWG o=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com IronPort-SDR: 1ZSfBFPqGxDybh1oAi0KUXINMp+fbwVLGU4D1XqzRuVx2PL+ap3hw63KAt6l3n0ETM4OxNrEVm 9hDGUMit99a18B1rM3DD19Gb/TldzS7g5M+k0jGH2mBo/Rfsb4MfyfIFn+UhiXD66+SGZROrq3 TY9oRrZgJSFcAvG1DXi0xmAQiiLNQ0GlA6efazHSZSU2qdV6bWpwyRUMGHP20rle6VXVOMTkKZ ybE9n5Mu885U+V7bEKeTHjzty+tg/aEyrG5epL1b2ymrcpCmJdcAFyr0yO24bpBKT0Ozd1zxtn FKWcGYNsgPgxE4CnzuR7Vb2T X-SBRS: 5.1 X-MesageID: 59208295 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:ypcf+6gRs5L8MrZwcwkRyDMEX161gxcKZh0ujC45NGQN5FlHY01je htvD2GEOamJajD3fIojOYu09RhVu5OEy9I2HAM+qng2Hy0b9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oAMKRCQ7InQLlbGILes1htZGEk0F0/NtTo5w7Rg29cy0IDga++wk YiaT/P3aQfNNwFcagr424rbwP+4lK2v0N+wlgVWicFj5DcypVFMZH4sDfjZw0/DaptVBoaHq 9Prl9lVyI97EyAFUbtJmp6jGqEDryW70QKm0hK6UID66vROS7BbPg/W+5PwZG8O4whlkeydx /1ivLXscDp5YJbykc4sTxBoHAZdOoBZreqvzXiX6aR/zmXDenrohf5vEFs3LcsT/eMf7WNmr KJCbmpXN1ba2rzwkOnTpupE36zPKOHxO4wSoDd4xCzxBvc6W5HT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cl8BYgEia73bh/0TnzDT69UzIVn7u3ArrObWDx0KMknekjFZIZt0LJghk LUot8Mh4gCijgYnb4SdhSdO+mXQdnENXs3LbH3B7FMHXubz9mx/XA== IronPort-HdrOrdr: A9a23:VFyOmqEj0pagC30FpLqFcpHXdLJyesId70hD6qkvc3Nom52j+/ xGws536faVslcssHFJo6HlBEDmewKhyXcV2/htAV7GZmfbUQSTXedfBOfZsl/d8mjFh5VgPM RbAtlD4b/LfCFHZK/BiWHSebZQo6j2zEnrv5al854Ed3AVV0gK1XYfNu/0KDwSeOEQbqBJa6 Z0q/A37QaISDAyVICWF3MFV+/Mq5nik4/nWwcPA1oC5BOVhT2lxbbmG1zAty1uHw9n8PMHyy zoggb57qKsv7WSzQLd7Xba69BzlMH6wtVOKcSQgow+KynqiCyveIN9Mofy8QwdkaWK0hIHgd PMqxAvM4Ba7G7QRHi8pV/X1wzpwF8Vmjbf4G7dpUGmjd3yRTo8BcYEr5leaAHl500pu8w5+L 5X3kqC3qAnTC/orWDY3ZzlRhtqnk27rT4JiugIlUFSVoMYdft4sZEfxkVIC50NdRiKprzPKN MeT/002cwmM29zNxvizyxSKZ2XLzsO9y69Mwg/Upf/6UkToJh7p3FosvD30E1ws67VcKM0ld gsBJ4Y442mfvVmHp6VO91xNPdfcla9OS4kEFjiaWgPR5t3cE4klfbMkcEIDaeRCdo18Kc= X-IronPort-AV: E=Sophos;i="5.87,273,1631592000"; d="scan'208";a="59208295" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WVtAsq/W7tt+DTWedUQg2OAB8Uy8YUxc/eV3bH+UfBXVFp23/2OZFj98Kj3u8DDh6CwvLYv2tbr8jHBnBxa574MKbllRhgNfJNwi2k8p4JSof4QFYkk6yfu2V3HsArqWQF5QOE0y6ZngJsGZPbIdyH/VHkDQf/40DQUoFrQk5wAD7BLiiv/LrsZ6YVv2Q3cB8ubZS1Ji1F1mY7l9LHQyT1I6NWy4CXAe4b+/B9BJRo4VB2v5ibIigdIhs0npLG06KZEwohIOsqL8FJlEXmt4T7hmdXIBFAGn3avRubyzKcICj1fkXKlKaq7BCegTP17pEBc6Jv/qGpdGWaOqhVh7vw== 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=pYxN81WyLozHtjD5+pJmUF7N4C4RnSrAAPdZ1oW1kQ4=; b=L53FYGTcnOkK1/baj7Wi4cWdM5SOBQDibhULClfwQAPivcSa5Y/PZUIQm6a2Wf79blBssPLD8iZ1qI0bvkcjWnmLpULN4TLuZaNzH9hfbUQZGIniYum4FPMnStfbh4jRmnMDtAZq92pUEbWfQzA/vXcC9BfJ0pUKx0J6j8XgOwK6+5qfjDXH5rJor/TCJ5sc7cE1D6ysN6Dz0fF11/H8KNnj4XnunzxY1Ec76vpdEJf6ytJxHU4W0A4e5uGzvQGNza8nw8TwNx4I8KRhtyofP2cp2qcc2AyTBUVCPl9U7xUIWRqvf62AzsXTr6UScabDdv0ayDaNFcmpYatb7g9NmA== 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=pYxN81WyLozHtjD5+pJmUF7N4C4RnSrAAPdZ1oW1kQ4=; b=QiLnY9101q/y+qyl/gfbEcJSpXtDKcVqdVP/i3CPp1ZzOKzRRLy+djTMSwVIGB/A32pZUc/FMmp3lg7VoKCQkbqZOYSTua1DsIg29mlk9dgTQyHg11rSEGwCx71I+0Zm05eKy0//86WBPxldaPL0oJR7Ene+AU5i9ySKitYowX0= From: Roger Pau Monne To: CC: Roger Pau Monne , Ian Jackson , Wei Liu , Juergen Gross Subject: [PATCH v5 05/12] libs/guest: allow fetching a specific MSR entry from a cpu policy Date: Mon, 29 Nov 2021 16:33:48 +0100 Message-ID: <20211129153355.60338-6-roger.pau@citrix.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211129153355.60338-1-roger.pau@citrix.com> References: <20211129153355.60338-1-roger.pau@citrix.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: MR2P264CA0089.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:32::29) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4e36462f-76bd-4459-68af-08d9b34de16b X-MS-TrafficTypeDiagnostic: DM6PR03MB4764: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vkLkgc1wTv0JeR+zUAk6pPFXRKu4Rgv5ZTA+mQDlkBnLtztFQapr1Lovu+MQOi1QX3sanzfk738gR1BABOT8USjJxM2aNh1tIj5PyCNk3wNejAMh37i5up9o8d85L93gvYy29tFLqu2IWAPF1XYsmoos7XCYL7gZDReuhbKbX36joqh9IPaZlK/XXlWPv0XKExz+v3SytPayBZmtHkP+A74ky9rUbiY9SXsEgRe5jVIa2RO7o2EZu5Q0bAon+BLcUGIgt4pyUxRvn5CGWIsh+bZ+TWHoCRWhUqorLTnw8A09ahOaD6s4lZCrZ2b2J2v4+19b+y1cgdGuMsckvWt3CBcNZ/3zkTX1nm8dg8VgQOmt2uOLMT0JvhSbLSlsrilL/34HAaP0fyybJPub9YGa3LlbpB3snyrJuh6+LL6NHw3PcJfpICtN5A6ypqOp3/U4frfEivnyg2ovFpFX3Uv0D884W1rroK/ZCoqyIfJYje4l3fBrfFqUNgEdS/K4wC//95cNWjQhvtLUewo7xdFot+z61XKKehzlM2bI3OfFTsXCf3RA5PwcfVdRnPOKVTSWOxsn6LaV96vItc8laD3CLKfjKs9B/JL9fLitkjdapGT8wscLZQHXPPnD/065CnxRktdSMpDVaviz1M1yUJql5w== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(5660300002)(4326008)(2906002)(1076003)(66476007)(6486002)(82960400001)(38100700002)(186003)(83380400001)(956004)(2616005)(316002)(6496006)(6916009)(26005)(54906003)(6666004)(36756003)(66946007)(86362001)(508600001)(8676002)(8936002)(66556008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TEdHbFdQWWlYeWhiTlVNdlZ4b3dGMU9URmNkdDluVGZEbk5zS1BoUEJkTmhw?= =?utf-8?B?OWc2TzM4blVQZ1owTGRRczJvQzFOeWVQYmxxLyt3LzNaTlRQbkZ3TmgwV3NN?= =?utf-8?B?emQvWnluU2RraG1PekpiRVpXVm43RWNaTzR0MzNKMnVhYXN3ZHcwS3FkdTF5?= =?utf-8?B?aHJaQ2QyenNSRytJSlVDRk9TQTJCQ0dTNG1pN05PZ1dCaVFGbW42OU1CVm93?= =?utf-8?B?N0RGM3BiQlUwL3BDeDdBWWRycnk3QWhoSFFkTW1UT0tieWJqS2NsNnBoNFIw?= =?utf-8?B?TXpWK1lHM1p4UUVQcjgyUDdxak1XeGw3QXRkSHZpZ29hRXVHdzVJaU9JNXNB?= =?utf-8?B?cGh6Ykd0TE5jd0ZKdXZ1TWpKUzQ3d3RyNUYvQXdtUUhnSW9LaEZEcWYzRDZG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X-MS-Exchange-CrossTenant-Network-Message-Id: 4e36462f-76bd-4459-68af-08d9b34de16b X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2021 15:35:32.7413 (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: autdN44XvNROCNLm1uPB7WxNXoLnhA98fmL/2vtKtD+FelWAxogVUSbV25vnpEQDYvOT9rBj+6fVOGcJYeO47A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR03MB4764 X-OriginatorOrg: citrix.com X-ZohoMail-DKIM: pass (identity @citrix.com) X-ZM-MESSAGEID: 1638200173499100001 Introduce an interface that returns a specific MSR entry from a cpu policy in xen_msr_entry_t format. This is useful to callers can peek data from the opaque xc_cpu_policy_t type. No caller of the interface introduced on this patch. Signed-off-by: Roger Pau Monn=C3=A9 --- Changes since v3: - Use x86_msr_get_entry. Changes since v1: - Introduce a helper to perform a binary search of the MSR entries array. --- tools/include/xenguest.h | 2 ++ tools/libs/guest/xg_cpuid_x86.c | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/tools/include/xenguest.h b/tools/include/xenguest.h index 0a6fd99306..2672fd043c 100644 --- a/tools/include/xenguest.h +++ b/tools/include/xenguest.h @@ -810,6 +810,8 @@ int xc_cpu_policy_update_msrs(xc_interface *xch, xc_cpu= _policy_t *policy, int xc_cpu_policy_get_cpuid(xc_interface *xch, const xc_cpu_policy_t *poli= cy, uint32_t leaf, uint32_t subleaf, xen_cpuid_leaf_t *out); +int xc_cpu_policy_get_msr(xc_interface *xch, const xc_cpu_policy_t *policy, + uint32_t msr, xen_msr_entry_t *out); =20 /* Compatibility calculations. */ bool xc_cpu_policy_is_compatible(xc_interface *xch, xc_cpu_policy_t *host, diff --git a/tools/libs/guest/xg_cpuid_x86.c b/tools/libs/guest/xg_cpuid_x8= 6.c index 7779a3e1dd..859c885c15 100644 --- a/tools/libs/guest/xg_cpuid_x86.c +++ b/tools/libs/guest/xg_cpuid_x86.c @@ -878,6 +878,26 @@ int xc_cpu_policy_get_cpuid(xc_interface *xch, const x= c_cpu_policy_t *policy, return 0; } =20 +int xc_cpu_policy_get_msr(xc_interface *xch, const xc_cpu_policy_t *policy, + uint32_t msr, xen_msr_entry_t *out) +{ + const uint64_t *val; + + *out =3D (xen_msr_entry_t){}; + + val =3D x86_msr_get_entry(&policy->msr, msr); + if ( !val ) + { + errno =3D ENOENT; + return -1; + } + + out->idx =3D msr; + out->val =3D *val; + + return 0; +} + bool xc_cpu_policy_is_compatible(xc_interface *xch, xc_cpu_policy_t *host, xc_cpu_policy_t *guest) { --=20 2.33.0