From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 19A2B13DB9F; Wed, 14 Feb 2024 20:16:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707941787; cv=none; b=HL8t4CqWyN34YgYn/73PT/bchuZTriGw9KxNnuQSA+t+/blLMTVQ8PXIr4WJSrVffWmy+MSlV/HYkc4k/I7jTgMjSQsdz1EUY87HifpSOYyqEmMn43n2MNIcn+flHVhfdp8SGd187hShrSFfAThzfxlMZaoSTKURkiG8iY60Z+g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707941787; c=relaxed/simple; bh=m48ScHz01LrC5ODGklW8vI2Tg3kZV3wo3kXFm58JWJw=; h=Date:Message-ID:From:To:Cc:Subject:In-Reply-To:References: MIME-Version:Content-Type; b=c+3aZPRYCxFy3qNTk8vF7dSz1wYJ4CXWYE9QLZJ0MBX7Ne3v/aDbvV/zQYGubedkgdqDq2TlUD4y1bn960MtEMBZkl+ZBVi8HObI+J2mP3/Fyspd0qqOj8fgDJhr4EoDhNHZihw2hvbLFWELpUB+G/sW725TX7FaZwpGrNoYnrM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VYFjoJX5; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VYFjoJX5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78F37C433F1; Wed, 14 Feb 2024 20:16:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707941786; bh=m48ScHz01LrC5ODGklW8vI2Tg3kZV3wo3kXFm58JWJw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VYFjoJX5/XIUVyjrzowPYK1H26pv6+cowKdJ5tPwIUAGpLwwlVKx8ikQnnol+Obvv hyylNjPsdOwfj8b+3r+odjV42Roke+V9O9zp6LN5fIl/IE90hG8GjKFT4kJAiFzTVd dGYW0OXvg2jQPhjgF5XyuNYl1a69JIseb1oABrBk30DBI8usfowLVejTXdtoyX2kgC fbVBGDDb+4LQK/jA8gcPua0+ddVzOEb0xTWeg03XjwMjTw9Qr+8cHSbMkV4RuyWYwE MyHyGCeu212J6CDVcaRkPp6Fw4Ks8fk8Q8xuGY0K/WGB6RUEHxLJODD+edN0yusl75 umt5Rao0p+9rg== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1raLg8-003GNh-33; Wed, 14 Feb 2024 20:16:24 +0000 Date: Wed, 14 Feb 2024 20:16:23 +0000 Message-ID: <86ttma4x9k.wl-maz@kernel.org> From: Marc Zyngier To: Eric Auger Cc: Jing Zhang , KVM , KVMARM , ARMLinux , Oliver Upton , Will Deacon , Paolo Bonzini , James Morse , Alexandru Elisei , Suzuki K Poulose , Fuad Tabba , Suraj Jitindar Singh , Cornelia Huck , Shaoqin Huang , Sebastian Ott Subject: Re: [PATCH v1 2/4] KVM: arm64: Document KVM_ARM_GET_REG_WRITABLE_MASKS In-Reply-To: <25434f0e-d9c9-45dc-82a1-7466bc59a6e2@redhat.com> References: <20230919175017.538312-1-jingzhangos@google.com> <20230919175017.538312-3-jingzhangos@google.com> <82b72bd2-c079-40c3-90b8-30174f2a8fe0@redhat.com> <86a5o45sb8.wl-maz@kernel.org> <25434f0e-d9c9-45dc-82a1-7466bc59a6e2@redhat.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: eauger@redhat.com, jingzhangos@google.com, kvm@vger.kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, oliver.upton@linux.dev, will@kernel.org, pbonzini@redhat.com, james.morse@arm.com, alexandru.elisei@arm.com, suzuki.poulose@arm.com, tabba@google.com, surajjs@amazon.com, cohuck@redhat.com, shahuang@redhat.com, sebott@redhat.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false Hi Eric, On Wed, 14 Feb 2024 18:07:58 +0000, Eric Auger wrote: > > > I'm not sure SEIS is such an easy one: if you promised the guest that > > it would never get an SError doing the most stupid things (SEIS=0), it > > really shouldn't get one after migration. If you advertised it on the > > source HW (Altra), a migration to TX2 would be fine. > I see. Indeed for sure we must make sure KVM cannot inject SEIs in the > guest if SEIS is not advertised on guest side. The problem isn't KVM injecting an SError, but the HW doing it (that's what SEIS indicates). On some HW, it only takes an old enough EFI build to trigger those. > In this case SEIS is 0 on src Altra. On dst TX2 ich_vtr_el2 advertises > it and host seis =1 causing set_gic_ctlr to fail (vgic-sys-reg-v3.c). > > > > > The other bits are possible to change depending on the requirements of > > the VM (aff3, IDBits), and ExtRange should always be set to 0 (because > > our GIC implementation doesn't support EPPI/ESPI). > > > > The really ugly part here is that if you want to affect these bits, > > you will need to trap and emulate the access. Not a big deal, but in > > the absence of FGT, you will need to handle the full Common trap > > group, which is going to slow things down (you will have to trap > > ICV_PMR_EL1, for example). > Would it be sensible to simplify things and only support the new range > if FGT is supported? I'm not sure that helps. The only FGT that covers the GIC is for ICC_IGRPENn_EL1, and we don't care much about that guy. So ICH_VMCR_EL2.TC it is, and that sucks a bit. But if that's what you want to show, you don't have a choice. Thanks, M. -- Without deviation from the norm, progress is not possible.