From patchwork Tue Jan 5 21:58:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamas K Lengyel X-Patchwork-Id: 12000361 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16975C433E0 for ; Tue, 5 Jan 2021 21:59:03 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id BC12322D74 for ; Tue, 5 Jan 2021 21:59:02 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC12322D74 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.62200.109988 (Exim 4.92) (envelope-from ) id 1kwuLk-0005RP-Go; Tue, 05 Jan 2021 21:58:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 62200.109988; Tue, 05 Jan 2021 21:58: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 1kwuLk-0005RI-Db; Tue, 05 Jan 2021 21:58:44 +0000 Received: by outflank-mailman (input) for mailman id 62200; Tue, 05 Jan 2021 21:58:43 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kwuLj-0005RD-ED for xen-devel@lists.xenproject.org; Tue, 05 Jan 2021 21:58:43 +0000 Received: from mga17.intel.com (unknown [192.55.52.151]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 7a87c966-cade-45a5-aac9-5b2b749e8781; Tue, 05 Jan 2021 21:58:40 +0000 (UTC) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2021 13:58:39 -0800 Received: from rcsacra-mobl2.amr.corp.intel.com (HELO ubuntu.localdomain) ([10.212.99.154]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2021 13:58:38 -0800 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: 7a87c966-cade-45a5-aac9-5b2b749e8781 IronPort-SDR: 88jrulC637oeIS4Q2FX1tZScfvhKRA9SWpFdJ9Izi7mr6NzKctxlvFMta4QCfXj2KtdLBLZ102 LbUoxT4eiMrg== X-IronPort-AV: E=McAfee;i="6000,8403,9855"; a="156969088" X-IronPort-AV: E=Sophos;i="5.78,478,1599548400"; d="scan'208";a="156969088" IronPort-SDR: PrttMIuNSGm+P72OiBWro9um9lhK4mp2TRApsI+PVSrNxEePg+3P4pRr54ZAVPBBY42KgMNg+q sotnKY+EKArw== X-IronPort-AV: E=Sophos;i="5.78,478,1599548400"; d="scan'208";a="462456825" From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Cc: Tamas K Lengyel , Tamas K Lengyel , Jan Beulich , Andrew Cooper , George Dunlap , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu Subject: [PATCH v2] x86/mem_sharing: copy cpuid and msrs during vm forking Date: Tue, 5 Jan 2021 13:58:23 -0800 Message-Id: <5ceda1696c935730c2b2925e2454a7502c6560f0.1609883742.git.tamas.lengyel@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Signed-off-by: Tamas K Lengyel --- xen/arch/x86/mm/mem_sharing.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/mm/mem_sharing.c b/xen/arch/x86/mm/mem_sharing.c index c428fd16ce..fc7b2a4102 100644 --- a/xen/arch/x86/mm/mem_sharing.c +++ b/xen/arch/x86/mm/mem_sharing.c @@ -1764,6 +1764,8 @@ static int fork(struct domain *cd, struct domain *d) domain_pause(d); cd->max_pages = d->max_pages; + *cd->arch.cpuid = *d->arch.cpuid; + *cd->arch.msrs = *d->arch.msrs; cd->parent = d; }