From patchwork Mon Jul 13 21:33:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 235500 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp3192383ilg; Mon, 13 Jul 2020 14:36:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfukY/JNz9ud4km+nU7IUQ0mJ+eI2iv2OpX5awFT7aNB+YIr9NVn7NPc8r+H+YwMrdJQgt X-Received: by 2002:a25:880e:: with SMTP id c14mr3474244ybl.376.1594676197817; Mon, 13 Jul 2020 14:36:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594676197; cv=none; d=google.com; s=arc-20160816; b=xXJ5XoXokRNI6LjkzbxWivjfthhs65dcw/Wmkk2LXxtM18O0LEiDKCBqpBytjPOu+Y kStBR6WdFzNmxRlyNkQQ130xNezkWDbXP2oBSsW6P+ZQTYq1EjbRQCzHlIAwcupX8Lga BVD+4a2W6bPoTLedWbb8f97mpBjQz7t2w8/9cf0y0+PUiFZGgVSzr59eaQsKsHWC1igy O8JKxj1M5N18SRAwL3r7gdXspPLA3t0e4JsYv9rNjDgoeQKGM32h80grO4VKk9XWd4Br V+DjDCDI8OLU/5uhTxfhR48rVKPwUpdYCX8VfmngsH+h9DdD3lTF2Fd+jq5+v7Sm75xs pzvw== 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=DIdbI/TyoASf3/tuMyHXAq5AcBUAtBDJaojE6aqGDY8=; b=sGf5DSKRRCRZwq1qsSo9BXCeVs4HYlq3YDZvHjr0FEb7aRZoHOn5rI6aBPZRfWX08I XI119zinnXCc5+Xce/ji+CfCHS5VPjaPEh8C4omgMOCvv67M9sq6Ntv2lk0O3KLw87os 83VQUT0/k65cd8WIz3a8dKfN42Fq6xYk+LlE3oXkRvU5NxA8Es7SQscP7COee8IpbMYY fUfqOg6EqFmMo8+ggIPF6xgRibiiNfZsUOtju5EmzNoU1++6MSNWzJ1NMxsiVunpd78H Ijzq76OiTEGuQkmol28zpmde1oEIoIKb6NeAm+d1MheS3WrPs2SclRfHPHYvA/BbngXc a5Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jlx3UgxF; 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 l18si6833840ybq.437.2020.07.13.14.36.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 13 Jul 2020 14:36:37 -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=pass header.i=@linaro.org header.s=google header.b=jlx3UgxF; 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]:54524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jv67p-0002az-BS for patch@linaro.org; Mon, 13 Jul 2020 17:36:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39404) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jv659-00081T-Q4 for qemu-devel@nongnu.org; Mon, 13 Jul 2020 17:33:51 -0400 Received: from mail-pj1-x1044.google.com ([2607:f8b0:4864:20::1044]:36181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jv658-0004X3-89 for qemu-devel@nongnu.org; Mon, 13 Jul 2020 17:33:51 -0400 Received: by mail-pj1-x1044.google.com with SMTP id md7so519340pjb.1 for ; Mon, 13 Jul 2020 14:33:49 -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=DIdbI/TyoASf3/tuMyHXAq5AcBUAtBDJaojE6aqGDY8=; b=jlx3UgxF36aRyoGqa0A5weot5N48d4/gDVwwqcd/PmWFXXcN9qwrU6sQl7sGbzLOwb 5FY2tt+bisnoVfmprVOfR6bS1kDFbazygT8ZIs2NH4oefSBeJWUsEcpnUkHrQNIyzAuw sEM3RKpsy0WqxQ/BRULMIarC9HXlQtrP70fHYFgMAz4jDrAWAk/aVw0XF/hXSfTkwSKz 3T+t6GKtncVcD9O0Ks4KoPkC28N0OB5YtHIZZZBxsU0ndtFM85IPGUn9luYrnPPvICnX u0CkWFzDlFv4v665h5Ey/J1EoFSUHKzRL0XE9T7/N7v3sXa4ckDeX/2AZON9A/CtK3T5 ys8Q== 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=DIdbI/TyoASf3/tuMyHXAq5AcBUAtBDJaojE6aqGDY8=; b=uiK/LpcIL2YDYbHt8+y1iWHIAe+Pm5Irk5XIQIny0HSWPxiwNJ+NzX+IW0ZmKqffbt bTY4EtXGKe8lE+WBskYnlQRjwKORtVWoZEGf0s3Xuq5WxoTL0eLfDWEjkZVpClENFY5A 4417ixv90bfa4YYKaQ8Dlp63/9DqgYvHj6R+2DWvKPHh7rOWWoeIXGmO10/1WoKbWY+P 76YJCttgHCk/8Gs82+jwtJ+14M8uFxNvVUMi5dKbZ+u3plt7GH3XIpQloAL6TR2lWCXb 0ScCMiNrZh63TNAZtkcbNBdVW3K5OwfTHRxxbiDIzxZ/DZYOu/hXUraxFN46Mkxk9BV1 GGMQ== X-Gm-Message-State: AOAM530Wfzsh4Wy0evdK8UCiA25cybmxR/EBGjaMmzHpO13RvUOjriLX SzdETmio2zCJSbPkA+FtrFTVhwHsE2w= X-Received: by 2002:a17:90a:1901:: with SMTP id 1mr1393604pjg.199.1594676028548; Mon, 13 Jul 2020 14:33:48 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id l207sm3591565pfd.79.2020.07.13.14.33.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 14:33:47 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 3/3] hw/arm/virt: Disable memory hotplug when MTE is enabled Date: Mon, 13 Jul 2020 14:33:41 -0700 Message-Id: <20200713213341.590275-4-richard.henderson@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200713213341.590275-1-richard.henderson@linaro.org> References: <20200713213341.590275-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1044; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1044.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" When MTE is enabled, tag memory must exist for all RAM. It might be possible to simultaneously hot plug tag memory alongside the corresponding normal memory, but for now just disable hotplug. Signed-off-by: Richard Henderson --- hw/arm/virt.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.25.1 diff --git a/hw/arm/virt.c b/hw/arm/virt.c index a7f3d442db..ecfee362a1 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2194,6 +2194,11 @@ static void virt_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, return; } + if (vms->mte) { + error_setg(errp, "memory hotplug is not enabled: MTE is enabled"); + return; + } + if (is_nvdimm && !ms->nvdimms_state->is_enabled) { error_setg(errp, "nvdimm is not enabled: add 'nvdimm=on' to '-M'"); return;