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 X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB561C433E0 for ; Fri, 12 Mar 2021 09:04:43 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4671264FD5 for ; Fri, 12 Mar 2021 09:04:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4671264FD5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Subject:Cc:To: From:Message-ID:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=D7Ix2iT5fCG6V8Qt/ozw2tFShSanm1E5U7MsG7Rtjf0=; b=PgwGwPn9lO2Ak/I8ZUY36pDAE RjbsH8mcWLzlCLN7JBlrsxr8T7DKqIOcPL1y2sl916mU5y+PWyxRS5tHI47C/Ru6CjmuZEk60/sTz RyAIwcQh+9pCqmqDjt8+tseuY3WC+Kcx/fctcuLnKF+29IS6LwIPqP4ttWzdSaJSXi8q7njTkQlmg Eqc3GCT3KZ/hUS0ogXGz7Ks2uoQtGzjxcuIqj6Jcoh9PgXvMW6ood5BzRuMg2d2aQhqHxVXIEb0tL 8F/WGUi3D0Qy3lLwqA2MHgOZnKYTt2XX5MwW+zD5LsDHAk+FSOxM6VnNgvYYGhwGZByzqZ4AcvNSz i5bp3N7JA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lKdhM-00Ax2f-PD; Fri, 12 Mar 2021 09:03:08 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lKdhG-00Ax1a-VD for linux-arm-kernel@lists.infradead.org; Fri, 12 Mar 2021 09:03:04 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 89D0064FE0; Fri, 12 Mar 2021 09:03:01 +0000 (UTC) Received: from 78.163-31-62.static.virginmediabusiness.co.uk ([62.31.163.78] helo=why.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1lKdhD-001Ac7-Km; Fri, 12 Mar 2021 09:02:59 +0000 Date: Fri, 12 Mar 2021 09:02:58 +0000 Message-ID: <87lfasg2wt.wl-maz@kernel.org> From: Marc Zyngier To: Shenming Lu Cc: Eric Auger , Will Deacon , , , , , Alex Williamson , Cornelia Huck , "Lorenzo\ Pieralisi" , , Subject: Re: [PATCH v3 2/4] KVM: arm64: GICv4.1: Try to save hw pending state in save_pending_tables In-Reply-To: <3b47598f-0795-a165-1a64-abe02258b306@huawei.com> References: <20210127121337.1092-1-lushenming@huawei.com> <20210127121337.1092-3-lushenming@huawei.com> <87v99yf450.wl-maz@kernel.org> <3b47598f-0795-a165-1a64-abe02258b306@huawei.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/27.1 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") X-SA-Exim-Connect-IP: 62.31.163.78 X-SA-Exim-Rcpt-To: lushenming@huawei.com, eric.auger@redhat.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, alex.williamson@redhat.com, cohuck@redhat.com, lorenzo.pieralisi@arm.com, wanghaibin.wang@huawei.com, yuzenghui@huawei.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210312_090303_221288_9FA3CFB7 X-CRM114-Status: GOOD ( 24.12 ) 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 Thu, 11 Mar 2021 12:31:48 +0000, Shenming Lu wrote: > > On 2021/3/11 17:09, Marc Zyngier wrote: > > I have asked that question in the past: is it actually safe to remap > > the vPEs and expect them to be runnable > > In my opinion, logically it can work, but there might be problems like the > one below that I didn't notice... One thing is that you will have lost interrupts in the meantime (assuming your devices are still alive). How will you make up for that? > > > > > Also, the current code assumes that VMAPP.PTZ can be advertised if a > > VPT is mapped for the first time. Clearly, it is unlikely that the VPT > > will be only populated with 0s, so you'll end up with state corruption > > on the first remap. > > Oh, thanks for pointing it out. > And if we always signal PTZ when alloc = 1, does it mean that we > can't remap the vPE when the VPT is not empty, thus there is no > chance to get the VLPI state? Could we just assume that the VPT is > not empty when first mapping the vPE? I think we should drop the setting of PTZ altogether. It is a silly micro-optimisation, and if the HW can't parse the VPT efficiently when it is empty, then the HW is pretty bad, PTZ or not. Thanks, M. -- Without deviation from the norm, progress is not possible. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel