From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (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 5C88E3BCD0A for ; Thu, 30 Jul 2026 09:30:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785403814; cv=none; b=m6T9XDW+e1Y54jvVX8LbUExM6A8HG4DgeWlC9WMrCctKIFrhJdQANiScG400bi38Qbj+XUp9NunzOIT+gQ/UkQYDBhjxyH33Fiw6xeRTFl5u2bp0CZjwaqFMcLMjMF3HYJqX2AQmHTPt3TKCPWQQ1iVEf6aIRbotzO2ETRhms8U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785403814; c=relaxed/simple; bh=mcAzGTUg9o29/9QVW7bSlpv2QdSdbvGGWa3JMTgBxIU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=N0tDahxzoEwkGkKfKqaZYQgZqoUrjLovE/JSuahRSCXK/ADU9USDE+4mjYl+oSXeFBXf6apsvknscE+y6UVz0EJ374+g4BMWqnAevLGnILhEyT7BV1L3W1I2XACLGB7cdw9Z8zmwo7gkQFQvl9WrVtYvSOjBUxS6BSEnA7ZATv0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=KgtSbbdZ; arc=none smtp.client-ip=209.85.208.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="KgtSbbdZ" Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-69a19eb2e6dso7000a12.1 for ; Thu, 30 Jul 2026 02:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1785403810; x=1786008610; 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=h8Ig4gIXtYgwzGQ5I1LRNr2VPU7co1Asg23QpE3nNo4=; b=KgtSbbdZ4vTPecXJBItCbzIt+y++Gl4H+40Cw9UVCm7AQ+W9RIO7huoVcMdnHHNMhA XbybIuuR2J+VmJfVZ4Q7uYMRRwGUE5HppdjOg3Sgrh8kImQhgt87nS8QQW5pYiFxz5TJ ooHpJ0JikNkRDejwavTkcx0LKpH6EYZ7ZMU11AUAYhCTRImArX/YX2Qx6lRMr6PK+wCe YTqjtnZYmoysPeGr3vx/P8SqDTbWyIAWrjTrjmWbgJiKX8cuPzbK0kDrEiVejmLyFfY6 y9uv7/J5yH3pa54eDHuRPdQ6MUjo1PWabTnO9lXnfsqTPCO7WB+leHbl/+7KnpzVcUZd 8RHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785403810; x=1786008610; 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=h8Ig4gIXtYgwzGQ5I1LRNr2VPU7co1Asg23QpE3nNo4=; b=eqKKP9f3rbxDVhM+50xW/6TOZSgs2Ary3etWmMCrdY3xH+8C3ERgPpzDZRiTi3+ZpG WGhdFWrB7aBUqPbVqcYIFx4l7qB9FKCR60Y0Wu7vOx2DBr8eCM7r5v2dWueN3dNtzF2d nnkM7sZzKloAIlxAWzao6iBOmDNTOCrTT5NmiRdMlDKQfo0z8RyXrr2EAwKTa51uwZ+C tkAINYpXcfODTVfC0KCWtfrmQBoSul5TEjiYYePQ3T1K5wRAiFXXHl5uqA7x/icFyhM1 p5i/KFoA211H9S1N8fOSJpJdC0UoL60CkxmtM7ToaBXFwYMsnYas3VmKgwAc4Xzh7G5t WdGQ== X-Gm-Message-State: AOJu0Yw8sVciF6BQ88H5ThjV4wJLvoT89uEBEuN58tYA+2qzxeXT6O+0 YoDwi5/BIE79TWAWxQhBCnS0K7SNjQG6JFgLuunLrzBn0uNZdTyBoxTDmO0GA6dSEw== X-Gm-Gg: AR+sD11bhxeapv9mXz3GuHi63z7Fi3/V9qdrZKNp/ak06OTm4kGMF/HfYCjo17pgfm7 /0YTAFfmW8+GNa9dZSxb1U2hu6meFH/l/UzW8ITSDyqjUUkDpIhDg8EAeCGOPLvOuckti6XWxh4 eTPigqHk3S+7YYt5N3soojKofh85GVfG9TcQLiVwPgmxqHo0fA1P2WyPdg6gXnuszvg+js6DVtu JdUayqFn2AzWi/Kx61yOh3/e1DQrDXPshh4PbMAi8xt+EKqvhFfhNOxDg8bhPvQRoIpsUMXWS2q fB6RaCIGpkk7jYRIoPY0CSUt2VkjvNikEarH+hHS3SZ7SQ98PlDTgCeDyMSzBvkbwoVOsv9bl+9 k3rpUWTiC/rNY7qg2r1kYO0SjmfNC+IQmDE8p4ftzGk9s6EQD63zmSuHMheBHxazsJSCagTRsP4 /8Irf1bizsv8PSRqfyV73rwSbMOsrnCIrFwaMaHu2AaxrUBHRHtM3DhIbuBAAlQbtf6pVbfW2ZU 4kiYNCTpghEY3xfLzSrxXdu125T3w== X-Received: by 2002:a05:6402:1c06:b0:6a0:6677:37f9 with SMTP id 4fb4d7f45d1cf-6a07bcc1ec8mr29106a12.1.1785403809991; Thu, 30 Jul 2026 02:30:09 -0700 (PDT) Received: from google.com (250.192.189.35.bc.googleusercontent.com. [35.189.192.250]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6a07d38318esm414754a12.19.2026.07.30.02.30.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Jul 2026 02:30:09 -0700 (PDT) Date: Thu, 30 Jul 2026 09:30:05 +0000 From: Mostafa Saleh To: Linu Cherian Cc: linux-kernel@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, maz@kernel.org, oupton@kernel.org, seiden@linux.ibm.com, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, vdonnefort@google.com, tabba@google.com, sebastianene@google.com, keirf@google.com Subject: Re: [RFC PATCH v2 0/2] KVM: arm64: Add support for BBM level 3 Message-ID: References: <20260723182140.4025575-1-smostafa@google.com> 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: Hi Linu, On Thu, Jul 30, 2026 at 08:52:37AM +0530, Linu Cherian wrote: > Hi, > > On Thu, Jul 23, 2026 at 06:21:38PM +0000, Mostafa Saleh wrote: > > This patch series adds support for BBM level 3 to KVM pgtable, it > > depends on [1] > > > > Changes from v1: > > https://lore.kernel.org/all/20260717130901.2239134-1-smostafa@google.com/ > > - Limit BBML3 to systems with FWB and DIC and remove race check. > > > > Motivation > > ========== > > I have been looking into this for the context of: > > - Page table sharing between the host CPU stage-2 and the SMMUv3 for > > protected KVM. > > - Use the pagtable code to populate SMMUv3 stage-2 shadowed > > page table [2] > > > > However, BBM level 3 is still useful for CPU only operations as it > > avoids intermediately breaking translation. > > > > Design > > ====== > > Some of the conditions that BBM level 3 will be useful in (RWHZWS): > > 1) A change to a PTE memory type, shareability, cacheability or OA > > Could you please clarify how BBM level 3 is helping this particular scenario ? > This is supposed to be a case where break before make is required. Right, I initially misinterpreted the rule. However, AFAIK, KVM does not rely on those, I added a comment based on Oliver feedback in the last version. I will update the cover letter. But looking again, may be we also need an extra check to enforce that in the run time and fallback to SW BBM as I'd be concerned about some of the KVM call chains as user_mem_abort(). Thanks, Mostafa > > Thanks, > Linu Cherian. >