From patchwork Fri May 14 15:13:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 438943 Delivered-To: patch@linaro.org Received: by 2002:a02:b78d:0:0:0:0:0 with SMTP id f13csp450826jam; Fri, 14 May 2021 08:40:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxi01wxKes3Euqjlzs55SQu6BwFcSyq0ck2oH7k8lA1hiCvhrdEYPISQwgbvm0STnhLfxU2 X-Received: by 2002:a92:d1ce:: with SMTP id u14mr30068594ilg.61.1621006828089; Fri, 14 May 2021 08:40:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621006828; cv=none; d=google.com; s=arc-20160816; b=RV9uZX/i/UtvfnY8yIHtPVlcQmQF6+98bZStP9U2iNFlNdvxn2DPW9XokGSyi1P0Uv efHIQr0HglnP0J/nbo7RIQdtka3nNmluOl0DETfuolB94DK2wOLiOWcDBQWiV1vtCScW tqC+bQUwswKTvvrH3+5iU9BSRFr4tKdGlFk1Pj75KgiFgJwsZwdzfQa/lNp1Ps5SvsV4 c1++xltrAkaVcv0Kdi9hhdECcXy1vo/OGwICKdPjwpKBitckTWQl3OwrSzFCrgm0L5w2 JM5NqV3aozCBr80uD8zU8CNQcVpXYtcy5B+qjRle6FKL93Hg1XmVq+510ByUmdmZpbN8 xcRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=UUFFT+y5F2S8cXEuCQEETTjZwWb0VciY8UlipYxFAPY=; b=bbp5vVzRDELddUKsyjApFGc6RWdDm4pIWVCutxoifhTXWiR4WHPckORHTrwZBMZRun J3ByolMJc5wAcMKiZRCdkv4SJa8Xy6bYIv8p7hBusuGnzj7kSmjkGP8cn1jh4gspqr/u +r1Lr6TaFjqJyEFfmhZvnIvIN1vDOAFZy7fUu0FfJiH9II0dN0KlcB6nj88hevagHFBC qQ7dz/4e5IOgjPy1h+k4SBnye0a5OVTgSIi31XknNIgfalt2CkSgZVV9tCh2xSjByTK3 +Z/nfS9+vIOuVGsJoDu1WcbJnGMgwLqHzhC5FwfxI5gVJSMajnHzn8s/LlUDxxxJ/enX Zp2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IbhNQcxd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id v14si7663586ilu.122.2021.05.14.08.40.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 14 May 2021 08:40:28 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=IbhNQcxd; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lhZvP-000513-Ge for patch@linaro.org; Fri, 14 May 2021 11:40:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lhZZA-0003Xe-Es for qemu-devel@nongnu.org; Fri, 14 May 2021 11:17:28 -0400 Received: from mail-qt1-x833.google.com ([2607:f8b0:4864:20::833]:42609) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lhZZ8-0000Ed-FR for qemu-devel@nongnu.org; Fri, 14 May 2021 11:17:28 -0400 Received: by mail-qt1-x833.google.com with SMTP id k10so8889715qtp.9 for ; Fri, 14 May 2021 08:17:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UUFFT+y5F2S8cXEuCQEETTjZwWb0VciY8UlipYxFAPY=; b=IbhNQcxdvrhMMVBeHCM0XTQp2gBmUM4Oa6a+UXLBObFKwv048DMo/DU88FM28Ew4kC psZ7if1XyhGglY/5+ZmPPc8US6vas6SQ4dyM7AQFt82Z/TNW8fvXZQ7GCl/Vyyv4CTKt RBC6GaE2beXlCQ3l3biXafg5yDKE9FijQPg9vOaXx78jo4Y+vNrO6wWzpiGxuwgSra0t 6r+yeTmoeVI4U03LU1LOaqVOpQ0INVXHDEU8Spfiv1LlbxwaaO5Yq/faRnxfFoX1qoAc RoWXgDWmZY2BCh3Wwml0yXOlXeMC88nXuMiAe+VOmCtZgTO6jSI5yaLVhme2IIx72v4P BP3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UUFFT+y5F2S8cXEuCQEETTjZwWb0VciY8UlipYxFAPY=; b=ECTVU4x3PMhYs+xynIMpo2+CD/ckNVXLSltRYLiioc8/1xSVJ2h8WUvyDozdRmij36 pz5hMB7cywHUwXx/YNvTZvEAPy04pdn8IrIx1NDW+aIfYPXMnGyK9cQC4cWRDTXoOMLA evmEDkKhII1Phm15Hs3xqIfgCE73EZiult4t0IdpFhYWoQ4cWuPv6jgxaQdS9s39AMZE e6H5iojZYFPn6IIQ/bmkoMknAUydT2i7YoYvBA+Z86L6r13NzP/pfgoMY5pVyG0VyYnm BLbaDkXZ1yEKVJyiQNrnkTzYftCRshX2XfZhe8XKuYbt/aj+kmrhEsnuJkOVghbICx9z vGdA== X-Gm-Message-State: AOAM530DDj+l+2l+ESCjj909MRetS4gWGl0OCW4NinHmAVpMMmXYphAt mI4GcPA4/9s8nPwYaroHPQbyRh14IyX+dpGlISs= X-Received: by 2002:ac8:4e21:: with SMTP id d1mr42986590qtw.290.1621005445648; Fri, 14 May 2021 08:17:25 -0700 (PDT) Received: from localhost.localdomain (163.189-204-200.bestelclientes.com.mx. [189.204.200.163]) by smtp.gmail.com with ESMTPSA id p190sm5181972qke.13.2021.05.14.08.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 May 2021 08:17:25 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 44/50] target/i386: Eliminate user stubs for read/write_crN, rd/wrmsr Date: Fri, 14 May 2021 10:13:36 -0500 Message-Id: <20210514151342.384376-45-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210514151342.384376-1-richard.henderson@linaro.org> References: <20210514151342.384376-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::833; envelope-from=richard.henderson@linaro.org; helo=mail-qt1-x833.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, f4bug@amsat.org, ehabkost@redhat.com, cfontana@suse.de Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Richard Henderson --- target/i386/helper.h | 8 ++++---- target/i386/tcg/translate.c | 4 ++++ target/i386/tcg/user/misc_stubs.c | 20 -------------------- 3 files changed, 8 insertions(+), 24 deletions(-) -- 2.25.1 Reviewed-by: Paolo Bonzini diff --git a/target/i386/helper.h b/target/i386/helper.h index 0264fba335..1d85f033df 100644 --- a/target/i386/helper.h +++ b/target/i386/helper.h @@ -42,8 +42,6 @@ DEF_HELPER_5(lcall_protected, void, env, int, tl, int, tl) DEF_HELPER_2(iret_real, void, env, int) DEF_HELPER_3(iret_protected, void, env, int, int) DEF_HELPER_3(lret_protected, void, env, int, int) -DEF_HELPER_FLAGS_2(read_crN, TCG_CALL_NO_RWG, tl, env, int) -DEF_HELPER_FLAGS_3(write_crN, TCG_CALL_NO_RWG, void, env, int, tl) DEF_HELPER_1(clts, void, env) #ifndef CONFIG_USER_ONLY @@ -87,8 +85,6 @@ DEF_HELPER_1(cpuid, void, env) DEF_HELPER_1(rdtsc, void, env) DEF_HELPER_1(rdtscp, void, env) DEF_HELPER_FLAGS_1(rdpmc, TCG_CALL_NO_WG, noreturn, env) -DEF_HELPER_1(rdmsr, void, env) -DEF_HELPER_1(wrmsr, void, env) DEF_HELPER_2(check_iob, void, env, i32) DEF_HELPER_2(check_iow, void, env, i32) @@ -114,6 +110,10 @@ DEF_HELPER_FLAGS_2(flush_page, TCG_CALL_NO_RWG, void, env, tl) DEF_HELPER_FLAGS_2(hlt, TCG_CALL_NO_WG, noreturn, env, int) DEF_HELPER_FLAGS_2(monitor, TCG_CALL_NO_WG, void, env, tl) DEF_HELPER_FLAGS_2(mwait, TCG_CALL_NO_WG, noreturn, env, int) +DEF_HELPER_1(rdmsr, void, env) +DEF_HELPER_1(wrmsr, void, env) +DEF_HELPER_FLAGS_2(read_crN, TCG_CALL_NO_RWG, tl, env, int) +DEF_HELPER_FLAGS_3(write_crN, TCG_CALL_NO_RWG, void, env, int, tl) #endif /* !CONFIG_USER_ONLY */ /* x86 FPU */ diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index 104101c8a8..2aa2410336 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -198,6 +198,8 @@ STUB_HELPER(flush_page, TCGv_env env, TCGv addr) STUB_HELPER(hlt, TCGv_env env, TCGv_i32 pc_ofs) STUB_HELPER(monitor, TCGv_env env, TCGv addr) STUB_HELPER(mwait, TCGv_env env, TCGv_i32 pc_ofs) +STUB_HELPER(rdmsr, TCGv_env env) +STUB_HELPER(read_crN, TCGv ret, TCGv_env env, TCGv_i32 reg) STUB_HELPER(set_dr, TCGv_env env, TCGv_i32 reg, TCGv val) STUB_HELPER(stgi, TCGv_env env) STUB_HELPER(svm_check_intercept, TCGv_env env, TCGv_i32 type) @@ -206,6 +208,8 @@ STUB_HELPER(vmload, TCGv_env env, TCGv_i32 aflag) STUB_HELPER(vmmcall, TCGv_env env) STUB_HELPER(vmrun, TCGv_env env, TCGv_i32 aflag, TCGv_i32 pc_ofs) STUB_HELPER(vmsave, TCGv_env env, TCGv_i32 aflag) +STUB_HELPER(write_crN, TCGv_env env, TCGv_i32 reg, TCGv val) +STUB_HELPER(wrmsr, TCGv_env env) #endif static void gen_eob(DisasContext *s); diff --git a/target/i386/tcg/user/misc_stubs.c b/target/i386/tcg/user/misc_stubs.c index 84df4e65ff..df38b44d6e 100644 --- a/target/i386/tcg/user/misc_stubs.c +++ b/target/i386/tcg/user/misc_stubs.c @@ -53,23 +53,3 @@ target_ulong helper_inl(CPUX86State *env, uint32_t port) g_assert_not_reached(); return 0; } - -target_ulong helper_read_crN(CPUX86State *env, int reg) -{ - g_assert_not_reached(); -} - -void helper_write_crN(CPUX86State *env, int reg, target_ulong t0) -{ - g_assert_not_reached(); -} - -void helper_wrmsr(CPUX86State *env) -{ - g_assert_not_reached(); -} - -void helper_rdmsr(CPUX86State *env) -{ - g_assert_not_reached(); -}