From patchwork Thu Feb 13 14:41:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 183385 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp638341ile; Thu, 13 Feb 2020 07:09:21 -0800 (PST) X-Google-Smtp-Source: APXvYqxus0g76jqNzLyNF30Ee2i87Z7uJVyIrgh8JSGoGUeivlJSycM7cqcnm62u2SjJN+OPtM/W X-Received: by 2002:a05:620a:15cf:: with SMTP id o15mr16137250qkm.140.1581606561126; Thu, 13 Feb 2020 07:09:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581606561; cv=none; d=google.com; s=arc-20160816; b=NG+hadc86wFVu9qafzGNdAqdiqH1TwA6oV+XSl+zKhtH6T1EVoo7Yf9mJkmaTK/hIA K7VMPwYsKhUY1IMxwEoCbl9WN6XV8QEDllp+NsdZIob6iUK6AtbTv2K8bAer75vEsuMB Y6kFRYuahbIwONXgwmYQOEPpFMsfx4LXtV7btGQ2Z74Mn+WwehJjN5yoGaq+lf6d/TkZ zUxsete+JJAUnF9tF9hYWQRC2Vmy3e8d17O7qUNcbOoFv2akqBGMhBUREXww9ytxr+ld gAKpyPcTQQHmqGlPjgl3QGhPgoMecDgmm8ijoGrqsqEtQ3Uzmd4ZKeStWv7+YuzTePvt 3dEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to: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=iWwaon9BlRJ6IRsO5FFrvf144MipU5RYg6PS8QIH0hk=; b=ZjH9C/VddSI5wpcHM1k4r58Oowt+LgTxo+C7blWqDhGWIMwvy+ndYwsyMrHF8vD0U3 izWMgBpKYkJpyC+mVd/NqHrPrp85vdwE8xFPEYCBg1PaWgjSoIM1OtPwAuuQsWcAyzDv NaGM9spLkz2jh0jjdo4twThWBsAk+wnFZ/Jag7So5jxum3n80M0VfleIClS5tCgZSUq1 RVeOJtegHfUIpTzUQt2r+fX91Lg6x5TW7q6YCo+VzFf4rA+tezJ9jLvdiiaYU1Pcm8ff SngD3SdVlNqvV5QafICtfELNo8ZhKpHwGV7B1OUsf3qG6sxnzALGyopGbFXiyWVNoZ8k h3JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Lk71exPO; 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=pass (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 62si1282771qkl.189.2020.02.13.07.09.21 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Feb 2020 07:09:21 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b=Lk71exPO; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:54298 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2G7E-0005TW-Kj for patch@linaro.org; Thu, 13 Feb 2020 10:09:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60657) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2FhS-0004vf-2u for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2FhQ-0002WM-Ve for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:41 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]:39386) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j2FhQ-0002TE-PD for qemu-devel@nongnu.org; Thu, 13 Feb 2020 09:42:40 -0500 Received: by mail-wr1-x430.google.com with SMTP id y11so6977917wrt.6 for ; Thu, 13 Feb 2020 06:42:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=iWwaon9BlRJ6IRsO5FFrvf144MipU5RYg6PS8QIH0hk=; b=Lk71exPORdaSvPe5/fddMtjBxmxb3W+KzuUS56nBM0FXoIIlu9U1Zu+TX3RXqyj1No C0x0HFCHTmRX6Xzpm+sRSlvR2yx780RNtjTOihzW623HBa0/ZG/BDCBwv4/jxWi+DkG3 n3AyLs1/NByCGcWxooHwolAXxG4t7g9rJuQjsCb4V6sEe049SBKXYDy/jFeAr2KaJb0s a+c+38zV0HcVy3wKVovmczXnaOaY01Q1X04ArE+SYFI4YMR6M0cA8s3GaLa8od/sG9eZ iqw7MaA+YrRtKtzX6ZHilZ/B4XKfvxK3/3gEZQ5Q7z/gKtLXBju3sg0IftQj90WhorhA LbnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iWwaon9BlRJ6IRsO5FFrvf144MipU5RYg6PS8QIH0hk=; b=o0cWp21Hna16xrHsx/ViSMhBLMMrL1/GdKfvjkGNKc+Diq1+WW0dKbGxHaRea+Y3mV HAy5sK/BsobnMQ3cfQiK8qn0vfwK1xezcAxMy89vOV2wVCwTXP7zoc3xgIJat3/EVNhQ XuvsZYM/P2gpYBSYgt+GAv7dCO3mDUeMF9icD7uJnIZ3KVt2izrvoPJ1EN93bDZ/ccNx rJpVNkiMoYcJ/YKrW/gj04ND4OfutEWwO1BO1a8JiUe4UNQwb6hUeXEmgTeYtlU0GXCY N1aVrhoICp3OL/F5WCOLWUnOf8mzFOFe/d/+jXCd1HZeXVfLgUFwi4wI+vrzm05q7qB4 PmtA== X-Gm-Message-State: APjAAAUa92JVYfFY1geTIgIIvR1ONBN1GHiK6q2ORRJAROgjVh8WnxT3 pDli93bc1gOP2B6kqntcn2pJggdSuME= X-Received: by 2002:a5d:6545:: with SMTP id z5mr21701309wrv.3.1581604958432; Thu, 13 Feb 2020 06:42:38 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [81.2.115.148]) by smtp.gmail.com with ESMTPSA id e22sm3362454wme.45.2020.02.13.06.42.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Feb 2020 06:42:37 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 46/46] target/arm: Implement ARMv8.1-VMID16 extension Date: Thu, 13 Feb 2020 14:41:45 +0000 Message-Id: <20200213144145.818-47-peter.maydell@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200213144145.818-1-peter.maydell@linaro.org> References: <20200213144145.818-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::430 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: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" The ARMv8.1-VMID16 extension extends the VMID from 8 bits to 16 bits: * the ID_AA64MMFR1_EL1.VMIDBits field specifies whether the VMID is 8 or 16 bits * the VMID field in VTTBR_EL2 is extended to 16 bits * VTCR_EL2.VS lets the guest specify whether to use the full 16 bits, or use the backwards-compatible 8 bits For QEMU implementing this is trivial: * we do not track VMIDs in TLB entries, so we never use the VMID field * we treat any write to VTTBR_EL2, not just a change to the VMID field bits, as a "possible VMID change" that causes us to throw away TLB entries, so that code doesn't need changing * we allow the guest to read/write the VTCR_EL2.VS bit already So all that's missing is the ID register part: report that we support VMID16 in our 'max' CPU. Signed-off-by: Peter Maydell Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-id: 20200210120146.17631-1-peter.maydell@linaro.org --- target/arm/cpu64.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c index 1359564c554..f0d98bc79d1 100644 --- a/target/arm/cpu64.c +++ b/target/arm/cpu64.c @@ -674,6 +674,7 @@ static void aarch64_max_initfn(Object *obj) t = FIELD_DP64(t, ID_AA64MMFR1, LO, 1); t = FIELD_DP64(t, ID_AA64MMFR1, VH, 1); t = FIELD_DP64(t, ID_AA64MMFR1, PAN, 2); /* ATS1E1 */ + t = FIELD_DP64(t, ID_AA64MMFR1, VMIDBITS, 2); /* VMID16 */ cpu->isar.id_aa64mmfr1 = t; t = cpu->isar.id_aa64mmfr2;