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 BCC77C433F5 for ; Wed, 4 May 2022 03:34:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mMTp9Oaj2Jk3whxb4LvaoaAz/u2K/iCVztiI60Fw77k=; b=JuMfXIJ9y9N+GK qbiDFGp6Y/gfcLyw0YFk16RkbF+j0ybr2u+HGWbaivHb82qduvIy8FJNSFwS7EGIEviCIq7eUEU00 riI8pgQUwcHeOCpX3IBFaPTnnLgBMMyQSj387zddhiQ+OEbR9b38Qc3VjRKmWtkd106LZbFjJKgLb WyNnd0NmBmX/dDkGz8PlncG3rHeCPV9EqlH8O3W6nIFjd3AspidQlo5PzhZpukwOGSY22IhiQvxGM j2qy/lC3KmJkApohNgABGXiC891OELQNQw3/Ej6xdZqbi4nCyQ+e/Uhagmhmo8Wd/K5nhFZNGjEMS wuEyKoutxYl40ykAU/NQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nm5lM-008djb-MC; Wed, 04 May 2022 03:33:17 +0000 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nm5lD-008ddw-Oa for linux-arm-kernel@lists.infradead.org; Wed, 04 May 2022 03:33:10 +0000 Received: by mail-io1-xd2b.google.com with SMTP id z26so305475iot.8 for ; Tue, 03 May 2022 20:33:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=MD7nPH76Zo4gzIjG6XroEYb+307Sv2T97DW30QPZNvQ=; b=GCl3tUY0CxUSs2045e7bW3K3OMlsoVKLkDorqwMDkmosI+DarqkAsVZ4JutaruMtaq VqOHlcJ06uzrO/wmARYsqy4RSsfaqwdhzD3Op9C9DJ5u3WeNoYMrxGWQJqnxWPKqFL+m QRzSecp35sYjpDFlnSHnjh/mzL55frzR8ayJsgdjMS8lI8QEEt6j4UwSDAa+YE+WH32M rV3TlIsrbFgDRyNTLm2bHTDSK86J1SDHWbQss+MyAldJlcz7OomuzVdYQ23f3ar+122V j7OlhJvOkCtMEdVkoOKHFBAlv4QIa6gkZRCnrkWY8IjFhbXMImgVlCcrzHCLhXwUXHth NoIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=MD7nPH76Zo4gzIjG6XroEYb+307Sv2T97DW30QPZNvQ=; b=1FLIaW0kdKY+vZ63JvQbzE0fhj2ebL/zCMVWm+OXiZU0+hgIzlYxrapMUkHNHnx989 HpuASfK6P+r2HjrXQqpQWeaRGBWCnjM7xNSF4gjdYUgOvg5H4o11LqjHdaAoReGBLBrZ x/Rlz+zlbZl2DYgKqhqmLxIe02KRGmBV+SW/PLoeIBWqAB26sf7bVMonT9VPjpNi92vj Or036+iEQVCuhjaLG97FjVHBe09OHXDbwb47EOXrCG+6rTOrM0Ne86Hrb9cB/oyALh+i CXBIW2nt0gZL/ZnK/sEbLf7YujLIrwIkA+Iw7AdYV20qiNshg2sjlx5xklZ370HbjsER o9PQ== X-Gm-Message-State: AOAM533NDlWNqcbHIEpI3iW7g9rXzCX9wFlxb3iDSgxqDHA3HL9ukRNI CPK73Z4v/0tlyaf/QIh0F0hewA== X-Google-Smtp-Source: ABdhPJy7vKJ/E6XbgDQRiEIsUnMlj/99SQ3gJhSHQZ0B1pirVzABIhS85iAuFB/rJZ2xJyY7/WLvCg== X-Received: by 2002:a6b:2b0b:0:b0:65a:4c08:7063 with SMTP id r11-20020a6b2b0b000000b0065a4c087063mr6885026ior.92.1651635180562; Tue, 03 May 2022 20:33:00 -0700 (PDT) Received: from google.com (194.225.68.34.bc.googleusercontent.com. [34.68.225.194]) by smtp.gmail.com with ESMTPSA id v18-20020a056e0213d200b002cbed258dcfsm3913760ilj.0.2022.05.03.20.32.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 May 2022 20:32:59 -0700 (PDT) Date: Wed, 4 May 2022 03:32:56 +0000 From: Oliver Upton To: Marc Zyngier Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, kernel@android.com, stable@vger.kernel.org Subject: Re: [PATCH] KVM: arm64: vgic-v3: Consistently populate ID_AA64PFR0_EL1.GIC Message-ID: References: <20220503211424.3375263-1-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220503211424.3375263-1-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220503_203307_840218_4E129A3E X-CRM114-Status: GOOD ( 15.87 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, May 03, 2022 at 10:14:24PM +0100, Marc Zyngier wrote: > When adding support for the slightly wonky Apple M1, we had to > populate ID_AA64PFR0_EL1.GIC==1 to present something to the guest, > as the HW itself doesn't advertise the feature. > > However, we gated this on the in-kernel irqchip being created. > This causes some trouble for QEMU, which snapshots the state of > the registers before creating a virtual GIC, and then tries to > restore these registers once the GIC has been created. Obviously, > between the two stages, ID_AA64PFR0_EL1.GIC has changed value, > and the write fails. > > The fix is to actually emulate the HW, and always populate the > field if the HW is capable of it. > > Fixes: 562e530fd770 ("KVM: arm64: Force ID_AA64PFR0_EL1.GIC=1 when exposing a virtual GICv3") > Cc: stable@vger.kernel.org > Signed-off-by: Marc Zyngier > Reported-by: Peter Maydell Reviewed-by: Oliver Upton _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel