Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3530699ybl; Sun, 12 Jan 2020 20:41:05 -0800 (PST) X-Google-Smtp-Source: APXvYqyc/nIGRuoNvPQubo/9efp9Ph0pVfbtOZ/OmsaMwjcLGY6NLNfdRVTTpot/kd7pQbng/D68 X-Received: by 2002:aca:f1c2:: with SMTP id p185mr11609590oih.87.1578890465207; Sun, 12 Jan 2020 20:41:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578890465; cv=none; d=google.com; s=arc-20160816; b=bQJNwxhg46CKjb/4IWzlytMDXFqtckpddsBugn6gYulWXD9U5CuWTJuHzcwHGCsJDt 3RQZPLprLaOnwTweWUYgKZM2vswq6OwdnNTmLKE3v64eqTisWkOKzzGnziXLuuOmvRFx i3mb8NFN6nkeUgMElb1rg7wCV9yBOV0mqIaua57JwAOGpdrXyava3qwUCykKEosKFB9W IHZOpWvGVp1jfPBCkq1Dme7oqnVPNWdawCR0xFmsz6GohIr++qMOZC15gowPXDiH0jjR tDRS9V81h29ngHSG607k3TmUt90HX79yhHB55tcTHJ9er5C8dIwJY1Ju3TCZjKC8030W 78jA== 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=a0GNt/jPb0HZ+xiVJg7+ya3mGQbyCTJPCWFF3ZRp+mM=; b=peGb62y6bIGZfhmQ8EdyJb9pOEofBWomGYpZ7EW22vn2TGhOMKtLStAqtHX9hqRWGZ xVJBmGxkNscxcxzUvExeUP166HbFBTsQ0E9OxI4kAOWC8hibkUaR18/lz5eM/Oi/eeBM Jxgqzwxndt2FfCSlpq1SrECDcB+hdYW8K476RvZTBP9NMCdC9dMVG1mxdob9CTdwnfQw rRzaM2nKU73rrIt4ajoU4ru8KZtyE3Vt0i5pAege6mcZabDhprL+6ooFyP1v/neEA3YJ bw3rOOBbhu7m5durOD0TLgvXKgXttlV6IjV5Rkv/lH9f1yYiHii7/DPOEBkdvUkq2n4M cXNQ== 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 q131si4956494oig.203.2020.01.12.20.40.53; Sun, 12 Jan 2020 20:41:05 -0800 (PST) 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 S2387585AbgAMEjY (ORCPT + 99 others); Sun, 12 Jan 2020 23:39:24 -0500 Received: from mail.loongson.cn ([114.242.206.163]:54800 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1733091AbgAMEjX (ORCPT ); Sun, 12 Jan 2020 23:39:23 -0500 Received: from localhost.localdomain.localdomain (unknown [222.209.11.32]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9DxD91s9BteOV0EAA--.4S2; Mon, 13 Jan 2020 12:39:09 +0800 (CST) From: Xing Li To: Ralf Baechle , Paul Burton , James Hogan Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/3] KVM: MIPS: Change KVM_ENTRYHI_ASID to cpu_asid_mask(¤t_cpu_data) Date: Mon, 13 Jan 2020 12:39:06 +0800 Message-Id: <1578890348-2734-1-git-send-email-lixing@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf9DxD91s9BteOV0EAA--.4S2 X-Coremail-Antispam: 1UD129KBjvdXoWrtFWktw1rWw47uFW3tFWDJwb_yoWkWrc_Z3 W7Zws7ur4fCrZFy39Iywn3WFWFgw1UWF929r9IgFyq9asFyry5Wa9xJr9rAwsxur4qyF4r W34DJ34rZrnrCjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb2kYjsxI4VW3JwAYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I 6I8E6xAIw20EY4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l8cAvFVAK0II2c7xJM2 8CjxkF64kEwVA0rcxSw2x7M28EF7xvwVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0 cI8IcVCY1x0267AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I 8E87Iv6xkF7I0E14v26r4UJVWxJr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xv F2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r4j6F 4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCY02Avz4vE14v_Gryl42xK 82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1lx2IqxVAqx4xG67AKxVWUJVWUGw C20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r126r1DMIIYrxkI7VAKI48J MIIF0xvE2Ix0cI8IcVAFwI0_Jr0_JF4lIxAIcVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMI IF0xvE42xK8VAvwI8IcIk0rVW3JVWrJr1lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2 z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa7IU04UDJUUUUU== X-CM-SenderInfo: pol0x03j6o00pqjv00gofq/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-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) for support 10bits ASID_MASK 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