Message ID | 91db0bae-5485-680c-ef95-7316328583a2@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <xen-devel-bounces@lists.xenproject.org> 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 32822CE7B07 for <xen-devel@archiver.kernel.org>; Thu, 28 Sep 2023 07:02:15 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.609295.948292 (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1qll2A-0003qx-U4; Thu, 28 Sep 2023 07:02:02 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 609295.948292; Thu, 28 Sep 2023 07:02:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from <xen-devel-bounces@lists.xenproject.org>) id 1qll2A-0003qq-RZ; Thu, 28 Sep 2023 07:02:02 +0000 Received: by outflank-mailman (input) for mailman id 609295; Thu, 28 Sep 2023 07:02:01 +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 <SRS0=Ur7q=FM=suse.com=JBeulich@srs-se1.protection.inumbo.net>) id 1qll29-0003qa-C3 for xen-devel@lists.xenproject.org; Thu, 28 Sep 2023 07:02:01 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on060f.outbound.protection.outlook.com [2a01:111:f400:fe02::60f]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id eb772a1b-5dcc-11ee-878a-cb3800f73035; Thu, 28 Sep 2023 09:02:00 +0200 (CEST) Received: from DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) by AS8PR04MB8055.eurprd04.prod.outlook.com (2603:10a6:20b:2a4::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27; Thu, 28 Sep 2023 07:01:56 +0000 Received: from DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::9f5d:8bed:7a5b:e75a]) by DU2PR04MB8790.eurprd04.prod.outlook.com ([fe80::9f5d:8bed:7a5b:e75a%6]) with mapi id 15.20.6838.016; Thu, 28 Sep 2023 07:01:56 +0000 X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion <xen-devel.lists.xenproject.org> List-Unsubscribe: <https://lists.xenproject.org/mailman/options/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=unsubscribe> List-Post: <mailto:xen-devel@lists.xenproject.org> List-Help: <mailto:xen-devel-request@lists.xenproject.org?subject=help> List-Subscribe: <https://lists.xenproject.org/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xenproject.org?subject=subscribe> Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" <xen-devel-bounces@lists.xenproject.org> X-Inumbo-ID: eb772a1b-5dcc-11ee-878a-cb3800f73035 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=F8OP2uujbZjt2hEsXLa1W7apm8GJO4oJtqTVfK+aZycEEMZ8CkGKN8lYfbds6ONfng1eyRbsNPt+bCEU3M5Bf5k5eb8B5MqEbx+ifr9JGuRKiXupWZiY+dO157MkRYMsNws9jzIpspO+Sz99mVPoKyBkUgn+L6cB0uO4HSVZgsrl5NMDV6rJJY5rHBRbb1xJ1Dk/A8kU5QsHCF2OHY597PuIAmnReNfir7qeLBllbtSvMcDWz7RTzrQP1GT9qpKySqzjXcR0cTxgrdJH+0YwI+Wmu0Vsr8B5U4IMQT0j2JcT5CGanumJ/8p/HgpiBvt0AjZJiQL6yarUTWITTMdyoQ== 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=oufazdANeZ9w0vDBuU2Z3ztqUcCD/UC60JbgAsH595s=; b=fnQEwAcdIkG/EshODfg5GrHITaUesvJiyX7YeVFq2mRziu/3KfZ3d4TCMbydFqbiYN9m8DSfHqFwqtnIjYH+wH6PAUyuBHCWY7eKXi0aMiKHxDMPRoylW5CLOzs0/mZFXQAhiFvVkTMYz5PesJhPJKOgu2vZUVKK1JqNjJfmhJnvG2WNpi72vbaRvzm4RgwnaZs+OZObQfV18icoXo5AgQur2GgVAO7wZ8DA0S1IU1eY2+RxwGiF8rMpRpAQb0Ljg9FBEmqNTaJaQ+x92tLCozPOpggr4YSh+Z6zU/icFUk2ES3CwmZRTrml0xLA9ADUf/XvD8f4g3s41VBxfR6A7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oufazdANeZ9w0vDBuU2Z3ztqUcCD/UC60JbgAsH595s=; b=IpV/id5KLZYwoYKkNSQ4Ip9Y2u6eRuDZ8xZGSKz0dZxv2nD31t26Y5rUdvyMtStTAGJZ6/W2Y4xHBQbNdbe5IKvuZXj+aOo8o5Oe1s+FdKSathp5O3C6s7JJdQRGzfOlBg/Gzb71ZfqRhV+kDGr6ycjBI5QNRzwuw5o2Ak7JhMKrTtbmPOLK+u/7M48SPfIgAPYBK48FVlfeF6g+JIVUxqr71lmNSdMfiBZRKW/X21PsiDehyDA49/3Gqq4GZF4bH7RdwaL1AwuaPZ6LZLq0BQfKK7CpkpFXku8RMRephKC+TiBI/JbYdVxA82tI9aJ5Dy5aXqNDKOU/92vs/URdKA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com; Message-ID: <91db0bae-5485-680c-ef95-7316328583a2@suse.com> Date: Thu, 28 Sep 2023 09:01:53 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: [PATCH v4 1/9] x86/shim: zap runstate and time area handles during shutdown Content-Language: en-US From: Jan Beulich <jbeulich@suse.com> To: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org> Cc: Andrew Cooper <andrew.cooper3@citrix.com>, George Dunlap <george.dunlap@citrix.com>, Julien Grall <julien@xen.org>, Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>, =?utf-8?q?Roger_Pau_Monn=C3=A9?= <roger.pau@citrix.com>, Henry Wang <Henry.Wang@arm.com> References: <3ba59868-101d-b68a-d8b7-767ee94910ec@suse.com> In-Reply-To: <3ba59868-101d-b68a-d8b7-767ee94910ec@suse.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0002.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1d::12) To DU2PR04MB8790.eurprd04.prod.outlook.com (2603:10a6:10:2e1::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8790:EE_|AS8PR04MB8055:EE_ X-MS-Office365-Filtering-Correlation-Id: f4e029f9-ed97-408c-69a5-08dbbff0cd32 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RYqK8H6rY6EzbPVxVvqpyqnyHuSytJvO4Mir0baMGr6All2k0KTFc5nxAzDcqEcxK75vCcqa+bGWbDuttcibrwL39+ZUr8FEhZuNl5/FQ7GT+15gAhGwyWLziZDCZPwwBA0Q75vWUH6zI43orgYdzfIVFtA2Ty0zmblee7IWbV22RhCzPE+/bI1slTqFlMug554Qh2Besn4mdFmPQnTtSAlF7qZWBUWPz6CsEquHFPCvX8TsmqbnedhSdbIES2s/Damk7/icFCLFCmcIMOenf8nvJdjyUjg4NDoL70p2r70fUhGYaRxVc3iQB9KZxl5rU6+JbSdJ1GvN1WCtwN5+K6df7Nnv/VGzkJnpTO8TJ4RDcE4kXvIt9ux4Ahhm7sdssOTLv/IH8p+im1y8iC/O9cY911kJIHO5a/MXw9y3eLUiKGyM0z8Jk+zge7+Ozezm93VUoJsiakeNkSGTQ1hlGr5s9U2VdNmTxY6+GTTvG4mbYrdL9iY51eKAIwehK1j1lTxUUFaRlTu+c5lGFXMvsfToJpLi151A+R2pt9i4l1X07eUVfXg3v72cM1/UNd27T+KnBoSj4X3DW7umPCneX/8Uz2zS+jDLcqXlW/97ZyjVi9SUoxeTivPneLRA0THj0lk7z0Njb+c4qzKSlfhDVg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8790.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(366004)(396003)(39860400002)(136003)(230922051799003)(1800799009)(186009)(64100799003)(451199024)(6512007)(8676002)(5660300002)(4744005)(83380400001)(36756003)(6666004)(38100700002)(8936002)(66946007)(66556008)(41300700001)(6916009)(54906003)(316002)(86362001)(31696002)(6506007)(6486002)(478600001)(66476007)(4326008)(31686004)(2906002)(26005)(2616005)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?SvISO51YHKntbLpf2KSPJYAAJKjW?= =?utf-8?q?tSyza3sCwRXrZG9O273qIw219gKSF44+NemL881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XGIUVnCBxpiuBhE1ArYrPvlctC?= =?utf-8?q?zXILZk2YGVTkUkd373Yq2MwuDbbHIBZzqJT2uxICL4/hXVIQieK3EqBMmVX6xsJZw?= =?utf-8?q?DCmbBj37Q9Nbz8tYn7cK9l5CZYgZeBwRe/Ato9G4d3nj2Jgzkhhu1mtTeycMNiT2y?= =?utf-8?q?LYykodAEhZpbQDhSI2TuC4IC9v0tnhQZsTpsLEArsKLvAtKFkIZnmG5aIWUbkwqIA?= =?utf-8?q?RhZwZi4YCriwOuiAsyVA8atHmXbqvAoTEyTaGK83yLP72ygkDnEpZ/c8LRtI3WXg7?= =?utf-8?q?wUSBK/s1Yv6qlH27+zLlKp3CgqLOwzcFw+zABNF6jTJ2OzX122QEDC9WyeWsQpk53?= =?utf-8?q?W3ruJg7UieDjmjCELsttYf+snvj5fNucsVPlbWaolvhbPvYW9CPa5+yJvJL6YtR8h?= =?utf-8?q?pXTWSbqMoN+IdzIqozhMrRj4UvI6Hln8QO8/mow3LsbKOt0ZzQ58Gec91CNRWrVtQ?= =?utf-8?q?pVC4wAv71c9444eBfTg5Ki/qK7vELq0RJ8UpN/bYnNzMjQSz8QD6ttjcUSy+l5qvN?= =?utf-8?q?bEwRhnjjDg1ki+9BJHMAxgF+fWdKKaXdEOowzJzel968wF7ML8bhpTwGS3wyNmuAt?= =?utf-8?q?q4dguDp5b18z?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: f4e029f9-ed97-408c-69a5-08dbbff0cd32 X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8790.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2023 07:01:55.9954 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Vla3gW6qXsUybVXOSVathxtW092U7TdCTTC0XvghvES5JMaRzMSMGj0wyqlad+J71Dx0DMnGdVqRRoslHg+tnA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8055 |
Series |
runstate/time area registration by (guest) physical address
|
expand
|
On Thu, Sep 28, 2023 at 09:01:53AM +0200, Jan Beulich wrote: > While likely the guest would just re-register the same areas after > a possible resume, let's not take this for granted and avoid the risk of > otherwise corrupting guest memory. > > Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Roger Pau Monné <roger.pau@citrix.com> Thanks, Roger.
--- a/xen/arch/x86/pv/shim.c +++ b/xen/arch/x86/pv/shim.c @@ -385,6 +385,10 @@ int pv_shim_shutdown(uint8_t reason) /* Unmap guest vcpu_info pages. */ unmap_vcpu_info(v); + /* Zap runstate and time area handles. */ + set_xen_guest_handle(runstate_guest(v), NULL); + set_xen_guest_handle(v->arch.time_info_guest, NULL); + /* Reset the periodic timer to the default value. */ vcpu_set_periodic_timer(v, MILLISECS(10)); /* Stop the singleshot timer. */
While likely the guest would just re-register the same areas after a possible resume, let's not take this for granted and avoid the risk of otherwise corrupting guest memory. Signed-off-by: Jan Beulich <jbeulich@suse.com> --- v4: New.