From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FE003E120B for ; Wed, 5 Aug 2026 21:39:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785966000; cv=none; b=I/WSuKxx+DcIIGhnPZZqdJ/bMwC7izlfiy4Du21mfs41gH5DoUO2JkMk3geZGtxENs/mTJwvRjbRlvHqvTZdMqKI5xsyTDJdSEACaATUI9nu4KG3FO94gYExohNMypN3ivhxeDXbdwEpTWt8ioVLHxhGcm6Pq9h0Gex2Y9RVTNU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785966000; c=relaxed/simple; bh=QQbWVF9MkffKPNOm3Xp+x/HSUJzikj0qawl/MCEpm2A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=T6YLx5nFQiisJFhMUIQfDE/xYioEnCRo5x6ifR/EiGa5Hx9H6GOH79JFJMgXZpdro4ihOBJsc6EnRWh3bxbEiV6lBEfVe1FWu7JDSmoBrgFTrHz1WJ63xiIJloNoAmGq5G+ms69hI5yk1GSGsB53eNmTPhtWEPkGgh3sWHTKCBE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Au2bMN2u; arc=none smtp.client-ip=209.85.221.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Au2bMN2u" Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-47fd4531020so961831f8f.3 for ; Wed, 05 Aug 2026 14:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785965997; x=1786570797; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=yOlBr2Z6ScmE+dhp5/f+kPQyir1jOxNY4C+TyOhoSGw=; b=Au2bMN2uoUkHYwmq/WxeRaJhqK4q8xu4PbrbhAE60y479awZ62HlRWD+3F+hGYl/1W PQ93cJ7i51EQXmWG6d/L7nJQjKqAEwyW5HAxvO20W+tZdgEL3q+OrLmM6HNtxn5a+xAm aa9IZCo23ajyFf2c3S/gz6VysyQME3PZ/0trIZvKA9cwOfCBSFyfGjV+pEEzGD5at99p DdA1DAjS9jYDtjk0wJb7/pfsI5p9akyrVP0fKypReX5Ba8nulMzx0PwAob0B2rneqTlM H3AeuIahxxxpcsRuvap2Swoxcp9H2sMQGGCrjyHY+lzfi796KjbtJOEpQA95XXNeFv3e CPcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785965997; x=1786570797; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=yOlBr2Z6ScmE+dhp5/f+kPQyir1jOxNY4C+TyOhoSGw=; b=AWJm5EHcb/2bB5jPjtpA7AI4ZBWN14NQk6Xd4Gq6OcYs73689Fb5SmHlSDh6F71Lde hAQTMkP41mgxOXIZNDzrXrx1hyD91jrpKAry4CUhxghSHKOV3ZAhu3NkrKB5XvRe7Iuh 3EDDak+i4dUsEI1tNX60lguyh0vR2TSMLv3cc1x6gHFKirrtoL33ymulBkI3rv3D14nk auIK0ZNqVMxdvsIMc2fQ+uHc6izPZCplZzhznyhTH6IAQe6dLptJxxqPhYMXX3gRoYYG jOt44Pg6aWhQ2SEsWh995sAjBO4XOOlzGcpqAOUrFZXvY++PaMc5HUWqoBZeX5hZvQ7k CMPA== X-Forwarded-Encrypted: i=1; AHgh+RpWsDuQ5AEzp+xDDHnaxEVa2L+zaud3kkXsmyH14GBrrU0J0gbq7WWAVh20aVtSLrcX87aZwOwQeJw2fuQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzhovgMCqu/wBfUA2Uofm5jw4bW21h2lza7zUYY6udTgoN2ZOtL K3UspQgR40xzncv5c0yKxwE20/W3I0Lsu0rGNOBGYCoI5yYAIrzIODWR X-Gm-Gg: AR+sD11hi03Bjfurthb2vHl9momZht7mrntqlQJKKOzamtQmVlzXHzUQOuUtJtxb226 Xe1xIhca66aTN8qcoBZbjqP0C8mMJp52Kw/XSQfBoXGbxWKls68lXImvKpBtit0JmSSuT7xvxux XjswinX+RTlzvy11sb2yem5yqjyR7Ieq0e/GdGuglHOpU/L7sogfQlA5xgpIEVKWUbeU/u0hqU7 1/h9HrCvtt33pcKqlx5bSfjRRgNzzqzZVfTn/Yb0anDXHQeDOhClW/o0bspYNWJ0CqHUmNWH7u8 B15hTJ5bYjMpuPD3droYncENJthVSa2iNWPXV8OUgzD2ZngFVlZzpBi/6mYJfkXhqF83oo/SNip kkFpdAXqlVXDx92YH+lZ7G88Xi17fMgxTcuUAAHo26vmmestKyGwp6Jnirkf953n/2TuJCW4rlR fTt1mt61BJ9d/qNxqcCb8JQ8Y89GF/tMk796H8Z1AqK3dWBVC/V96zRREbhFot0TWjP0FC0ZeTl KdhkA36v6ZIRAb5HsYQEbyB2agLz/PR30rOx+lrfjMAAqgmrMhlF3z6l8A5ay7c3dboZvu1EHAJ CecHKXBpeFSggH3Gl0r0f77ZNkFv3faosaNUxIOg X-Received: by 2002:a05:6000:1863:b0:47f:5371:1b15 with SMTP id ffacd0b85a97d-47fec63491cmr14018614f8f.26.1785965997040; Wed, 05 Aug 2026 14:39:57 -0700 (PDT) Received: from unknown748F3CBA5068 (dynamic-095-114-073-248.95.114.pool.telefonica.de. [95.114.73.248]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-47ff79b32cbsm568073f8f.10.2026.08.05.14.39.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 14:39:56 -0700 (PDT) Date: Wed, 5 Aug 2026 23:39:54 +0200 From: Karl Mehltretter To: Marc Zyngier Cc: Oliver Upton , Fuad Tabba , Joey Gouly , Steffen Eiden , Suzuki K Poulose , Zenghui Yu , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org, grayhat@foxmail.com Subject: Re: [PATCH 1/2] KVM: arm64: nv: Allocate the shadow S2 MMUs individually Message-ID: References: <20260803224405.41468-1-kmehltretter@gmail.com> <86mrv2arf2.wl-maz@kernel.org> <86jyq6aq8g.wl-maz@kernel.org> <86ecgdaupe.wl-maz@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86ecgdaupe.wl-maz@kernel.org> On Wed, Aug 05, 2026 at 08:32:29AM +0100, Marc Zyngier wrote: > I'd rather keep it on the VM creation path. This is VM-wide data, by > definition, and given that its size doesn't depend on the number of > vcpus anymore (we allocate the maximum once and for all), it is right > where it belongs. See the untested hack below for the freeing on error. I'll send a v2 with this soon. > > > There's another issue in the current code: the ptdump debugfs file > > keeps the raw mmu pointer as its private data. I would add that to the > > commit message. > > Why is that a problem? With this approach, the mmu pointers are always > expected to be valid, irrespective of the allocation pattern, and we > only publish pointers to the dumper when the S2_mmu is actively being > used. > Sorry I was talking about the old implementation. Array reallocation leaves ptdump i_private pointers dangling. I'm dropping the selftest for v2. It was a useful KASAN trigger, but is not a good fit for the current suite. Thanks, Karl