From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 61BDBD1CDD5 for ; Tue, 22 Oct 2024 11:00:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Fp83jOWTpK+zBC4vYT+NPQKNf3GM0RoJxilfK5NsfGA=; b=bgCJlnTJNnQgIqfXBkK/bFkx4i w1dcA0f8ULBdGuAMRjcSPC+vhynVrQgB+AlhtsbKlOuNRmBjQIsuq20RwtAdCPT/fHi8K66LQtn5u jOd83mJhYRTyvtwcDcPLi3Jzol2TZ3XW0bIjeD6oQqLLM+61D7ee8n/FyB15EgqvW2HYNf+F7sq4E wChT3TfL9CJ9ERN1fkiqaaWsS9BSAVG9CnsXgH2SoLIqY7H+I491w5DIyNJYRcjkwcSUottwj6RCz 4l/DIvUYIiR6YJMJipZojGpgCsu9L2vFvAre/CUHO/b/OnH3AvY+DoFfjv6/hqAfRrrJEvn6ejEM2 DTTuChxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3CcC-0000000Acvp-2A0f; Tue, 22 Oct 2024 10:59:52 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3Cag-0000000AccG-0M3W for linux-arm-kernel@lists.infradead.org; Tue, 22 Oct 2024 10:58:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729594694; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Fp83jOWTpK+zBC4vYT+NPQKNf3GM0RoJxilfK5NsfGA=; b=f2p5UWZ9W4alUGD2mcnmCVAZevhOr9myIAo+lpA78gtPnttuGFpcjQnVzkXahHtDFBfDJk x1hgwhHZXKngYR4jEz70A38jVxUuaJuNyitK9i1iyPt94kTOzIkxFNDyStmiyvykm4LPTu 2KvTiLvWvkFRmCl8/Byo2U4evH2P8aY= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-180-QflyPgM8PTmRVh4Zp_ZqlQ-1; Tue, 22 Oct 2024 06:58:11 -0400 X-MC-Unique: QflyPgM8PTmRVh4Zp_ZqlQ-1 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 525F71955F2B; Tue, 22 Oct 2024 10:58:08 +0000 (UTC) Received: from localhost (unknown [10.39.194.115]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8CE8B300018D; Tue, 22 Oct 2024 10:58:05 +0000 (UTC) From: Cornelia Huck To: Oliver Upton , Marc Zyngier Cc: eric.auger@redhat.com, Shameerali Kolothum Thodi , "kvmarm@lists.linux.dev" , "catalin.marinas@arm.com" , "will@kernel.org" , "mark.rutland@arm.com" , yuzenghui , "Wangzhou (B)" , jiangkunkun , Jonathan Cameron , Anthony Jebson , "linux-arm-kernel@lists.infradead.org" , Linuxarm Subject: Re: [RFC PATCH 0/6] KVM: arm64: Errata management for VM Live migration In-Reply-To: Organization: "Red Hat GmbH, Sitz: Werner-von-Siemens-Ring 12, D-85630 Grasbrunn, Handelsregister: Amtsgericht =?utf-8?Q?M=C3=BCnchen=2C?= HRB 153243, =?utf-8?Q?Gesch=C3=A4ftsf=C3=BChrer=3A?= Ryan Barnhart, Charles Cachera, Michael O'Neill, Amy Ross" References: <20241011075053.80540-1-shameerali.kolothum.thodi@huawei.com> <86jzef53iz.wl-maz@kernel.org> <3f4469c49625413f9ab2c224d0d3fbea@huawei.com> <86ikty6f1b.wl-maz@kernel.org> <08261a41b9644f5ab49063824e4060c3@huawei.com> <87bjziraou.fsf@redhat.com> <7df21c56-0b07-4112-839e-ef90c5999fcd@redhat.com> <86frot4kki.wl-maz@kernel.org> User-Agent: Notmuch/0.38.3 (https://notmuchmail.org) Date: Tue, 22 Oct 2024 12:58:02 +0200 Message-ID: <87o73cpfph.fsf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241022_035818_217757_EC55B8E1 X-CRM114-Status: GOOD ( 27.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Oct 18 2024, Oliver Upton wrote: > On Fri, Oct 18, 2024 at 02:17:17PM +0100, Marc Zyngier wrote: >> On Thu, 17 Oct 2024 18:16:04 +0100, >> Eric Auger wrote: >> > >> > Hi Shameer, >> > >> > On 10/17/24 17:49, Cornelia Huck wrote: >> >> > > Speaking of QEMU: Do you maybe already have some prototype code that >> > > tries to do something with the setup here? (I don't think QEMU currently >> > > mucks around with MIDR and friends when running with KVM; I wonder what >> > > it should provide to the guest and if it should care to set something as >> > > a base level that gives guests not using the hypercall a chance to work >> > > properly.) >> > > >> > As discussed during the KVM forum we are working on a qemu integration >> > for writable ID regs. The first goal is to be able to specialize the >> > host passthrough model (custom host model). Maybe this will trigger more >> > discussions on named models too. This is complementary to the >> > MIDR/REVIDR problematic and I hope we will be able to consolidate our >> > works at some point. >> >> Complementary to the MIDR/REVIDR work, I would also like to make >> MIDR/REVIDR writable when this scheme is available. Ideally reporting >> a synthetic CPU description (with MIDR_EL1.Implementer returning 0, >> and the rest being VMM-specific, but with a clear definition for the >> IMPDEF fields so that we can version the ABI). > > When the VMM is using the hypercall mechanism to describe > implementations, 100% agree. > >> Thoughts? > > I think we should go a step further and allow userspace full control of > known fields in these registers, even for a nonzero Implementer code. > > We're already affording userspace full control of what implementation(s) > the guest sees anyway via hypercalls, so there isn't much left for KVM > to enforce. > > Ignoring errata, it'd let folks spoof an old implementation on newer > hardware for testing, especially when dealing w/ older software. So basically, the VMM would have to make a choice which guests it wants to support? Modern guests, which are aware through the hypercall interface what is going on and are able to parse any information in our synthetic MIDR correctly, or older guests, which should be presented with a MIDR that makes them hopefully act in the way we want it to act? I guess that would mean that for full migration support between different hosts, we'd want enlightned guests, and for (some) other cases, we could generate a configuration that will hopefully work? (Spoofing for testing things sounds useful regardless.)