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=-8.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 CCC7CC433E7 for ; Mon, 19 Oct 2020 14:11:27 +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 3ED9322263 for ; Mon, 19 Oct 2020 14:11:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="b6AQtf3v" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3ED9322263 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.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.8721.23376 (Exim 4.92) (envelope-from ) id 1kUVsZ-0001As-CH; Mon, 19 Oct 2020 14:11:15 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 8721.23376; Mon, 19 Oct 2020 14:11:15 +0000 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" Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kUVsZ-0001Al-8m; Mon, 19 Oct 2020 14:11:15 +0000 Received: by outflank-mailman (input) for mailman id 8721; Mon, 19 Oct 2020 14:11:13 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kUVsX-0001Ae-En for xen-devel@lists.xenproject.org; Mon, 19 Oct 2020 14:11:13 +0000 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id c5d267e0-b21b-492b-bc33-e0b8ff10cbb5; Mon, 19 Oct 2020 14:11:11 +0000 (UTC) Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kUVsX-0001Ae-En for xen-devel@lists.xenproject.org; Mon, 19 Oct 2020 14:11:13 +0000 X-Inumbo-ID: c5d267e0-b21b-492b-bc33-e0b8ff10cbb5 Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id c5d267e0-b21b-492b-bc33-e0b8ff10cbb5; Mon, 19 Oct 2020 14:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1603116672; h=subject:to:references:from:message-id:date:mime-version: in-reply-to:content-transfer-encoding; bh=5f7+/MNH6SaV19O3fTW/yecNFlNGLoKclSOSAsEY1Zo=; b=b6AQtf3vhINp/lKZNuMogwSB107/kbZx4IEyjkKs6kcz5BUnZuSwxqRs p8i66nsjGS6cmjYiA6I4arByEEg3Fb/GAI5+0lg+0Ie3hVKuFpL8VrO1D UNbkBagMcKPTR6XBnkiGEDReoJe9K2P6Sl7XOYt5657g+znYy9TSb+4yE 8=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none IronPort-SDR: vLVREriFjx0v8ejZNAN8fPnm3PHtWYqAF3XvpoLdTRi5TGNpr+ziIhwt6+vG/2vUT6njaNnT1u PhGLPX2r0Fv1yAYQgS+jEzOQilZlHLok2setgqlN5xFsrk/x+V3DQtV3K+IKoHKH9GpXboLLHe T+L16yN4gbG8ZeONtd4tAdbDPdc45WF5/YPwDuXK9V927gNJJ0UjZDuGxhwIJEzC3G9NEGZzPA NQBZ3HMjmDJQqOhWtR8dvGyGU5YgCGOqgWbwBi2xKtq0dZttWH2zb8ftC/GnqYX1gT9pHxFI3O iyk= X-SBRS: None X-MesageID: 29304147 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.77,394,1596513600"; d="scan'208";a="29304147" Subject: Re: [PATCH] SVM: avoid VMSAVE in ctxt-switch-to To: Jan Beulich , "xen-devel@lists.xenproject.org" References: From: Andrew Cooper Message-ID: <9d0cae4e-f849-f2a3-4261-d3efb977deeb@citrix.com> Date: Mon, 19 Oct 2020 15:10:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Language: en-GB X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) To FTLPEX02CL05.citrite.net (10.13.108.178) On 19/10/2020 14:40, Jan Beulich wrote: > Of the state saved by the insn and reloaded by the corresponding VMLOAD > - TR, syscall, and sysenter state are invariant while having Xen's state > loaded, > - FS, GS, and LDTR are not used by Xen and get suitably set in PV > context switch code. I think it would be helpful to state that Xen's state is suitably cached in _svm_cpu_up(), as this does now introduce an ordering dependency during boot. Is it possibly worth putting an assert checking the TR selector?  That ought to be good enough to catch stray init reordering problems. > Suggested-by: Andrew Cooper > Signed-off-by: Jan Beulich Either way, Acked-by: Andrew Cooper