From patchwork Fri Jul 28 19:43:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 13332608 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 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 73EE0C001E0 for ; Fri, 28 Jul 2023 19:43:57 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.571548.895681 (Exim 4.92) (envelope-from ) id 1qPTNK-0007GI-4l; Fri, 28 Jul 2023 19:43:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 571548.895681; Fri, 28 Jul 2023 19:43:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1qPTNK-0007G9-1e; Fri, 28 Jul 2023 19:43:46 +0000 Received: by outflank-mailman (input) for mailman id 571548; Fri, 28 Jul 2023 19:43: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 1qPTNI-0006TZ-Cl for xen-devel@lists.xenproject.org; Fri, 28 Jul 2023 19:43:44 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 0dc94b98-2d7f-11ee-8613-37d641c3527e; Fri, 28 Jul 2023 21:43:42 +0200 (CEST) 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: 0dc94b98-2d7f-11ee-8613-37d641c3527e DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1690573422; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0+2lTwwT3HcKALQtma3kCln3dcC2BQCBedr5bOWhoy0=; b=Qp85OzMB8/PzKT5ZnBaOmH352n6MF8EKSpjJNxYMQRokFUnymhHwk0J2 umvRiPAeekGrEfV1DZ/k+8eqZUG2o+QV35fkKGQvf12l2yfVFFFF/X6WB Mb0g0iNW90ZYnMZ9UNWX8kbYzSRPDFQzeMyTPIpp08p+Jl+5r6YAc2VM+ g=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 4.0 X-MesageID: 120449230 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.123 X-Policy: $RELAYED IronPort-Data: A9a23:s5516agEfkzsM1wTmoZzsMNaX161WxAKZh0ujC45NGQN5FlHY01je htvCD+OOPrcMWqmf4txbYW2p00EvZWBz9AyHVA5+H1nECsb9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrWCYmYpHlUMpB4J0XpLg/Q+jpNjne+3CgaMv cKai8DEMRqu1iUc3lg8sspvkzsx+qyr0N8klgZmP6sT4wWOzyN94K83fsldEVOpGuG4IcbiL wrz5OnR1n/U+R4rFuSknt7TGqHdauePVeQmoiM+t5mK2nCulARrukoIHKN0hXNsoyeIh7hMJ OBl7vRcf+uL0prkw4zxWzEAe8130DYvFLXveRBTuuTLp6HKnueFL1yDwyjaMKVBktubD12i+ tQ0bw5cUg7cwNiN0eu2Q/hKovsYBtD0adZ3VnFIlVk1DN4jSJHHBa7L+cVZzHE7gcUm8fT2P pRDL2A1NVKZPkMJYw1MYH49tL7Aan3XWjtUsl+K44Ew5HDe1ldZ27nxKtvFPNeNQK25m27B/ Dqa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6AA03ENBAg4UxSGqi13Yd X-Talos-CUID: 9a23:FcDg9mFYGACROWeBqmJLs3BFJt56NUfm3S7dKl6eLVlSYqSKHAo= X-Talos-MUID: 9a23:aKC4AQiKat/hYVMdvL+E38MpH99yuaCEEWY2kZgWgMWjaRB+MjTDtWHi X-IronPort-AV: E=Sophos;i="6.01,238,1684814400"; d="scan'208";a="120449230" From: Andrew Cooper To: Xen-devel CC: Andrew Cooper , Jan Beulich , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Wei Liu , Roberto Bagnara , Nicola Vetrini Subject: [PATCH 3/3] x86: Delete str() Date: Fri, 28 Jul 2023 20:43:20 +0100 Message-ID: <20230728194320.3082120-4-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230728194320.3082120-1-andrew.cooper3@citrix.com> References: <20230728194320.3082120-1-andrew.cooper3@citrix.com> MIME-Version: 1.0 This is used in an assertion only, which is somewhat dubious to begin with and won't surivive the x86-S work (where TR will become be a NUL selector). Delete it now. This avoids many cases where as a global symbol, it shadows local string variables. Signed-off-by: Andrew Cooper Tested-by: Nicola Vetrini --- CC: Jan Beulich CC: Roger Pau Monné CC: Wei Liu CC: Roberto Bagnara CC: Nicola Vetrini --- xen/arch/x86/hvm/svm/svm.c | 2 -- xen/arch/x86/include/asm/desc.h | 9 --------- 2 files changed, 11 deletions(-) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 56cb2f61bb75..4d29ad3bc36a 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1614,8 +1614,6 @@ static int _svm_cpu_up(bool bsp) /* Initialize OSVW bits to be used by guests */ svm_host_osvw_init(); - /* Minimal checking that enough CPU setup was done by now. */ - ASSERT(str() == TSS_SELECTOR); svm_vmsave_pa(per_cpu(host_vmcb, cpu)); return 0; diff --git a/xen/arch/x86/include/asm/desc.h b/xen/arch/x86/include/asm/desc.h index 225a864c483e..a1e0807d97ed 100644 --- a/xen/arch/x86/include/asm/desc.h +++ b/xen/arch/x86/include/asm/desc.h @@ -238,15 +238,6 @@ static inline void ltr(unsigned int sel) __asm__ __volatile__ ( "ltr %w0" :: "rm" (sel) : "memory" ); } -static inline unsigned int str(void) -{ - unsigned int sel; - - __asm__ ( "str %0" : "=r" (sel) ); - - return sel; -} - #endif /* !__ASSEMBLY__ */ #endif /* __ARCH_DESC_H */