Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp526534ybg; Sat, 26 Oct 2019 02:41:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3AB/7rZiX0Xo35RVoD/VQYxVeRmPNRiMgef+mbwofgNcauO65sEqZg2cW8NVyuaIO9DPa X-Received: by 2002:a50:fb87:: with SMTP id e7mr232048edq.268.1572082866504; Sat, 26 Oct 2019 02:41:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572082866; cv=none; d=google.com; s=arc-20160816; b=cOAg45zSdeL9t7mNlRsKjNxUhdPv1jfpaqvFU5KhsZsisv9YNqX7GLuU5YvJxgMhgb PABiG5YhXgX9XZb0zjLXMDtaUh9SztADANNNR1PZ+HELaghbPc5I8DiJyBg0CRfJ22bu /Che8Sefe/n+MimH8b0ONdmxUiQ6bQdcR+3OY5+LykE62BZNK1+o8+ieekk20d5ZOaM3 zAzkO/ALLz3g2tnWfgUP/spJ6Q1tkfa2ujFb0Lw75075Y3LS83BvbHRsHnxZuTi7FnHZ gEMgvl4vqmEiRgGsGGDpsD64JOi2BlHKQL5rJIOyWw+N9WUImCcAk5CAmeFWwZhWAEoJ aA/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=a0M44UljfbT2SdPpX9Ecr9I+APV48yttymLhZw4Mw2Q=; b=rypYjgO/1jYZ4vMk27FNL3dtf7q20181cn1hUr37zgjxCQk76qs8x/QiQTeLOziFTe k3sgzI1LO1TarHsZIX8PW1cEYOQMrQpNMdFweae4KE67XTiTgSXnSHLkAvYD9xUjPK+m DlAjADyAelNV6NiZGCTTyB/iY6czNNoxgp33xoXCUoH8EcOg74C2272b9bHtey0EmWek hC1ujAa0BrOYHyoa7C+7X2iAiGd0xAYTNNYhhNOBKV3ZT1mlqRmYP8Le4ryuGRCdPGQ3 p80yPpa6/NcdX7zGwr6SUVCHWGC3CFKm9giYXE/+sQkfqsh3HsaUCyElpX9CFb7vUbP3 W/Vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k63si3335688edc.347.2019.10.26.02.40.12; Sat, 26 Oct 2019 02:41:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726168AbfJZJjO (ORCPT + 99 others); Sat, 26 Oct 2019 05:39:14 -0400 Received: from mail.loongson.cn ([114.242.206.163]:37506 "EHLO mail.loongson.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbfJZJjN (ORCPT ); Sat, 26 Oct 2019 05:39:13 -0400 Received: from localhost.cn (unknown [10.20.42.25]) by mail (Coremail) with SMTP id QMiowPDxv186FLRdB3wYAA--.19S2; Sat, 26 Oct 2019 17:39:06 +0800 (CST) From: Xing Li To: jhogan@kernel.org, paul.burton@mips.com, ralf@linux-mips.org Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] MIPS: Change KVM_ENTRYHI_ASID to cpu_asid_mask(¤t_cpu_data) Date: Sat, 26 Oct 2019 17:39:04 +0800 Message-Id: <1572082744-15586-1-git-send-email-lixing@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: QMiowPDxv186FLRdB3wYAA--.19S2 X-Coremail-Antispam: 1UD129KBjvdXoWrtFWktw1rWw47uFW3ZF4xWFg_yoWkJFX_Z3 W7Zw4kur4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-List: linux-kernel@vger.kernel.org The code in decode_config4 of arch/mips/kernel/cpu-probe.c asid_mask = MIPS_ENTRYHI_ASID; if (config4 & MIPS_CONF4_AE) asid_mask |= MIPS_ENTRYHI_ASIDX; set_cpu_asid_mask(c, asid_mask); set asid_mask to cpuinfo->asid_mask So KVM_ENTRYHI_ASID should change to cpu_asid_mask(¤t_cpu_data). Signed-off-by: Xing Li --- arch/mips/include/asm/kvm_host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/include/asm/kvm_host.h b/arch/mips/include/asm/kvm_host.h index 41204a4..6be70d5 100644 --- a/arch/mips/include/asm/kvm_host.h +++ b/arch/mips/include/asm/kvm_host.h @@ -275,7 +275,7 @@ enum emulation_result { #define MIPS3_PG_FRAME 0x3fffffc0 #define VPN2_MASK 0xffffe000 -#define KVM_ENTRYHI_ASID MIPS_ENTRYHI_ASID +#define KVM_ENTRYHI_ASID cpu_asid_mask(¤t_cpu_data) #define TLB_IS_GLOBAL(x) ((x).tlb_lo[0] & (x).tlb_lo[1] & ENTRYLO_G) #define TLB_VPN2(x) ((x).tlb_hi & VPN2_MASK) #define TLB_ASID(x) ((x).tlb_hi & KVM_ENTRYHI_ASID) -- 2.1.0