Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1232490ybh; Thu, 12 Mar 2020 20:15:55 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtAWU+gvYerVB8t4yiHW8xgEPWKkva4lL7Ja4fdPtFWSIdXHEt5IKkHNHA+32H6GvdaQ1dh X-Received: by 2002:aca:3008:: with SMTP id w8mr5069807oiw.96.1584069355186; Thu, 12 Mar 2020 20:15:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584069355; cv=none; d=google.com; s=arc-20160816; b=gDSjn1ReB2LoPvsNhLNHVtoEPWiM0zZ0NLwKqWy6IK4hWzKNlVT4nLFIaX6vlcZZ+h f+rDIU+ruwdT1XbsurBlrJxADb8x5jSngUO2Obj2q2LMf+DLKdI5v8aQWMtTtQKK8eZx Pz6az5eYomk3mj2bH7tPg8OcG5x2CflBkeTKdwAGtSP8MZhdO5G5mBh+IchBKQIhWJ2n s9z2Rr6KX5/fyNBvDJeLNn3LmN4pmJdYEfoxgfTxf/Z0PHoSxVNTs8IvwLRJYrbIp2RD 4JNYP4kGHY4Vs5KdhIC2SI8+3lzBwUqr50i6x/SA67j9wQe7Urhwe9hjg4KFXU/T7ZxX 1F9w== 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=YThdis9gHLLitccdg1GWAsYw291l0js5ChlhyaqlxoCRhuox+yJ4TWM3HwVSxP2Mtm S8/AV6UJS2Mydde3IFhAKuN1Bvswg7HGyl42meW3dEHRlpIHHUwLUEeOfifeTzqTP1A5 iIbBCwYuvLIcCSukmtXolGt3yt25EDBlFCRomQUWKA+eK+lHIsLv2MC5C2aXNcQvLBBF n7xaLd5uN1vU+yVvEZ0dubllzQ+NgOdUm7UosMjsYe984ThiDAmGYNIRKTdAejUk8QZw sx5ivxXY7nM2uXL3/NAx5EgxBLP2BC/zyz5/4Z9hllId7ZX+ztLWCA+oC43xzT9Y/H1+ 8ozw== 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 l23si3573910otj.144.2020.03.12.20.15.43; Thu, 12 Mar 2020 20:15:55 -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 S1726534AbgCMDO3 (ORCPT + 99 others); Thu, 12 Mar 2020 23:14:29 -0400 Received: from mail.loongson.cn ([114.242.206.163]:55506 "EHLO loongson.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726420AbgCMDO3 (ORCPT ); Thu, 12 Mar 2020 23:14:29 -0400 Received: from localhost.localdomain.localdomain (unknown [125.69.47.232]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9Dxn9uK+mpe1gcaAA--.45S2; Fri, 13 Mar 2020 11:14:19 +0800 (CST) From: Xing Li To: Thomas Bogendoerfer Cc: linux-mips@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, maobibo@loongson.cn, chenhc@lemote.com, jiaxun.yang@flygoat.com Subject: [PATCH v2 Resend 1/3] KVM: MIPS: Change KVM_ENTRYHI_ASID to cpu_asid_mask(¤t_cpu_data) Date: Fri, 13 Mar 2020 11:14:15 +0800 Message-Id: <1584069257-30896-1-git-send-email-lixing@loongson.cn> X-Mailer: git-send-email 2.1.0 X-CM-TRANSID: AQAAf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-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