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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D52AC433FE for ; Mon, 18 Oct 2021 11:02:46 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 1C4BA60F0F for ; Mon, 18 Oct 2021 11:02:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 1C4BA60F0F Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=ofEWpX4KqH7K9xQZO2l0q3rCIhfGyR3/RF7Xm2wdLKg=; b=SP+kAzTwxtv2vn +H4KZBCTrs+iVmrucmZmbnjHtr7nf3vMyu0x6KJDOY2GFn3tet7X7TwXxyBJlZNeFfFv5LOE0oFt0 w4FsxmAcog16A2jDQcVpZbpiBLm6nR+lI/3daZgo7c5Dw6soVQYJB2G4vmZeMS1d+oxVU2vF79j/V AWMuct8eRTEiV3dA39xFWvIAveOv2XCxyLp4mcgnfH3Z/lj8kTXT5Fj4HUKoOQbqGKfoRk1ueumzR GhZrvohXQjUZ1oS8IScV6/CrPlZD1D0l6FNidwoXeqlDPQfIaZ/9d9paKcfD3h6D19fxXMkbwmdgB 5U+LON/3lGaUL70TgDxg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcQNt-00FCaf-JK; Mon, 18 Oct 2021 11:00:50 +0000 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcQ0i-00F3VP-P6 for linux-arm-kernel@lists.infradead.org; Mon, 18 Oct 2021 10:36:54 +0000 Received: by mail-wr1-x436.google.com with SMTP id r7so40509027wrc.10 for ; Mon, 18 Oct 2021 03:36:52 -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=CnEGvS5JHOdGgOAvyH9jWqTEdXWkoZtVd5ySMVIlc2M=; b=nUS9Jfmev2YDtluONWMHfsBhtGgQYYBu4Q+Kf28SCNr2s4YgglFqRJbpMOyOPYX5NX hxK9nJ+XQRFqHBXeMsZLop/QPwqALP23LtbQCiDXWRQ7SvxACThuih4FVcXfPZ3+x+yF XBOd9FpimNbU1VCXYo96LQJatqe/VGCp+d0Q6so4WLmKclqpFBso6AK5FpvHGN1neGFF UrZCMHy513Ugk620ZjW8lwUg6GF1YiMUkwvGuls2BU7O/mH5Kux/gA4VpWO9oQWq3MD2 AW4sWYa6lA9qBl5b0u+FO6760LXpWUKJ2/UCVUm+ExmdfbjZkZkisT78hyTtvs2A1UFc lvZQ== 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=CnEGvS5JHOdGgOAvyH9jWqTEdXWkoZtVd5ySMVIlc2M=; b=obe4WtUhdy3OCXHn+fQqgZ7ESnFy6X1tICHVNo7DbuVhkw3M28TF/8kjkrKQqCxgav 3GDwjKGbopD/kX+ID24sTJ37JbebP2ClSZLw03SK0pa5mCxwUt1P8zZ/eQD7o0VBj8da vli4EX8oTbkIVx/+gq/SnKs+UuZVpcNDr/pxEZBMo8w9zsViJUDKWc05NuIzf+h/KsPs qA/hmH1eRqGLVCoNceQ9Xd03WRPIgDjeqXNl3OQ5Edu2JMPb9LNCXrE00k4WAMboW6t4 GVzlMXx+TcWERPs24/Se33yNaiHjNcolG1/qmRd3sLrfdWM1Hel6Unb2vo0Mys49pWrI nw2A== X-Gm-Message-State: AOAM532A+6T+y/7GrKxTf2ZIvDKaELZiFB42SYiNN47nJ8UHn0A/bjUo 5FcIOa3/mhs+P1MVCY6S4slwQg== X-Google-Smtp-Source: ABdhPJxwV62HytYs4AsqvTvUlMdNokRzwgb0hYlxd00yfiJ21uyA1k1ex6RbulURH1wBC10+z0Zn1w== X-Received: by 2002:a05:6000:184b:: with SMTP id c11mr34504451wri.29.1634553411421; Mon, 18 Oct 2021 03:36:51 -0700 (PDT) Received: from google.com ([2a00:79e0:d:210:ba81:6f1b:ab2e:f120]) by smtp.gmail.com with ESMTPSA id c7sm15162725wmq.13.2021.10.18.03.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Oct 2021 03:36:51 -0700 (PDT) Date: Mon, 18 Oct 2021 11:36:48 +0100 From: Quentin Perret To: Marc Zyngier Cc: James Morse , Alexandru Elisei , Suzuki K Poulose , Catalin Marinas , Will Deacon , Fuad Tabba , David Brazdil , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH 03/16] KVM: arm64: Avoid remapping the SVE state in the hyp stage-1 Message-ID: References: <20211013155831.943476-1-qperret@google.com> <20211013155831.943476-4-qperret@google.com> <87ilxxut74.wl-maz@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87ilxxut74.wl-maz@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211018_033652_853674_DB7EDB39 X-CRM114-Status: GOOD ( 11.94 ) 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 Saturday 16 Oct 2021 at 12:04:15 (+0100), Marc Zyngier wrote: > I actually ended-up implementing a similar patch as part of my 'first > run' series[1], though I moved the mapping to the point where we > finalise the vcpu as that's where the allocation takes place. > > Do you see any potential issue with that approach? Nope, and in fact I think your patch should allow to simplify a bit kvm_arm_vcpu_destroy() for me, as checking arch.sve_state != NULL would now be sufficient to know if the sve state has been shared -- checking arch.has_run_once is no longer needed. I'll base v2 on this. Thanks! Quentin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel