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 48EDBC433F5 for ; Mon, 18 Oct 2021 10:36:58 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id AD4B1610A6 for ; Mon, 18 Oct 2021 10:36:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AD4B1610A6 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 0D1C74B28B; Mon, 18 Oct 2021 06:36:57 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Authentication-Results: mm01.cs.columbia.edu (amavisd-new); dkim=softfail (fail, message has been altered) header.i=@google.com Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gPeqCcLzO4FM; Mon, 18 Oct 2021 06:36:55 -0400 (EDT) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id E9AE54B1E7; Mon, 18 Oct 2021 06:36:55 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 897004B1DC for ; Mon, 18 Oct 2021 06:36:54 -0400 (EDT) X-Virus-Scanned: at lists.cs.columbia.edu Received: from mm01.cs.columbia.edu ([127.0.0.1]) by localhost (mm01.cs.columbia.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zFO0ZwITHgJc for ; Mon, 18 Oct 2021 06:36:52 -0400 (EDT) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mm01.cs.columbia.edu (Postfix) with ESMTPS id 8B6264B1DB for ; Mon, 18 Oct 2021 06:36:52 -0400 (EDT) Received: by mail-wr1-f45.google.com with SMTP id r10so40389305wra.12 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=DVvUklmUqZuzQJyHZ43GeoTLgVJfg62gW3SgAtiZpaRDmnm+2Y8ey1Iew8Gm6jKNav lrk1zI8Ih4QxjgzO8v8/9Knan0Bim9Cf9R/kCjcUa0Ha9YqnzF3NjhGHrA6Y7FCLOphR U2zG/dhOTD7nS8yLwPAQv1Ao9mZ9cX+PjgfkgJhfhA8KJV4NfFdEGuZ6fkhYyjqvINa6 9UPJFbbQRNUeQNzx0B/BsxnwYrs0/yTVgy6/h4hM5LUKh4TRnTuumN1pPsTe4lnCAaz4 6qCvOCE8ffE2AW7BPMn1bnGrHDJAAcCJnMgrL9z0eNUha48oVEGzs5EsyqGMpC1KYrP7 3zdg== X-Gm-Message-State: AOAM533rsxnOpJZdcVvW7BBKs1Vyg5Frb8qz2BAdktjHhV+OFHBobway 3SoUcA3PW4LCUPpGT3lI6N/jEQ== 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 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> Cc: kernel-team@android.com, Will Deacon , Catalin Marinas , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu X-BeenThere: kvmarm@lists.cs.columbia.edu X-Mailman-Version: 2.1.14 Precedence: list List-Id: Where KVM/ARM decisions are made List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: kvmarm-bounces@lists.cs.columbia.edu Sender: kvmarm-bounces@lists.cs.columbia.edu 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 _______________________________________________ kvmarm mailing list kvmarm@lists.cs.columbia.edu https://lists.cs.columbia.edu/mailman/listinfo/kvmarm 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 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 80EC7C433F5 for ; Mon, 18 Oct 2021 10:36:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 64FC3610A3 for ; Mon, 18 Oct 2021 10:36:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229837AbhJRKjF (ORCPT ); Mon, 18 Oct 2021 06:39:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229494AbhJRKjE (ORCPT ); Mon, 18 Oct 2021 06:39:04 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E9C16C06161C for ; Mon, 18 Oct 2021 03:36:52 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id y3so40605544wrl.1 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=F9OrI+hNfn8E6amRAGlYkBz+swQTK2YTUuPHf8DgAnGEKVx4Gm9PHXkma6nyO3eDUL dQNLYKB61p72c3ExYAEzgG7C1Z/cYwzwN8jKkg8z35C8yp1U6Mq27A7bfoDrEOxTJyDb IzQFUPntS2HiFw6vdorEAnbVioAbHPJx3Vs3acXIn8lHFWIcZ6h3wWza2VA9JMi4Wa1h 3BKR+btvtvfrzYzrtJiYmrFZQoAgPs3vD2slXRp45RGHhpzASBECJJwABd91xP6ULLuh z4D71jS3omn4X57cNfJOzP0kcejWsY64Ev1uqzft6WHrruDuee0vpc2vXO0+blr/vNqj eDWQ== X-Gm-Message-State: AOAM530M1uDWKdQPAl56EzPgAmtvmhmNc2qalGfQxIXdJqrvpKautnC2 j2B3SzGbIkSRFd3YivUJBXaAEw== 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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ilxxut74.wl-maz@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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