From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Xu Date: Wed, 05 Feb 2020 22:28:29 +0000 Subject: Re: [PATCH v5 03/19] KVM: Don't free new memslot if allocation of said memslot fails Message-Id: <20200205222829.GF387680@xz-x1> List-Id: References: <20200121223157.15263-1-sean.j.christopherson@intel.com> <20200121223157.15263-4-sean.j.christopherson@intel.com> In-Reply-To: <20200121223157.15263-4-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Sean Christopherson Cc: Paolo Bonzini , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, Christoffer Dall , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= On Tue, Jan 21, 2020 at 02:31:41PM -0800, Sean Christopherson wrote: > The two implementations of kvm_arch_create_memslot() in x86 and PPC are > both good citizens and free up all local resources if creation fails. > Return immediately (via a superfluous goto) instead of calling > kvm_free_memslot(). > > Note, the call to kvm_free_memslot() is effectively an expensive nop in > this case as there are no resources to be freed. (I failed to understand why that is expensive.. but the change looks OK) > > No functional change intended. > > Acked-by: Christoffer Dall > Signed-off-by: Sean Christopherson Reviewed-by: Peter Xu -- Peter Xu 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=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,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 31889C35247 for ; Wed, 5 Feb 2020 22:28:42 +0000 (UTC) Received: from mm01.cs.columbia.edu (mm01.cs.columbia.edu [128.59.11.253]) by mail.kernel.org (Postfix) with ESMTP id A94D6214AF for ; Wed, 5 Feb 2020 22:28:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EYXduHnO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A94D6214AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvmarm-bounces@lists.cs.columbia.edu Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 1AF344A4A0; Wed, 5 Feb 2020 17:28:41 -0500 (EST) 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=@redhat.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 C8SOdZBPT9k1; Wed, 5 Feb 2020 17:28:40 -0500 (EST) Received: from mm01.cs.columbia.edu (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id 209214A4A9; Wed, 5 Feb 2020 17:28:40 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mm01.cs.columbia.edu (Postfix) with ESMTP id C00B64A4A0 for ; Wed, 5 Feb 2020 17:28:38 -0500 (EST) 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 wfQFdKBBRDFS for ; Wed, 5 Feb 2020 17:28:36 -0500 (EST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mm01.cs.columbia.edu (Postfix) with ESMTP id DC9EF4A418 for ; Wed, 5 Feb 2020 17:28:36 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580941716; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TlZ291EmGopDCG5ErV/B6q6MCWpQFGiaDWjGBWMPhvg=; b=EYXduHnOunpeSVhd2v6DQ3Dh9Ih8wY2nGejwTkqwacbE2rcTsSvBkEajhHI9nXgd+VsEHm 7AFThfOyjrBRzb6rjKi/VVWqYTU3MiReYZSqry6LAwd7NTlu9sAbwpsvk3PkkXYtsTX3ae d+pQRAzY3YsYV6r/QsNiWWo2qRUllJs= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-112-WHeRNyf9PZiW5dB5cDEbeg-1; Wed, 05 Feb 2020 17:28:34 -0500 Received: by mail-qv1-f69.google.com with SMTP id c1so2437920qvw.17 for ; Wed, 05 Feb 2020 14:28:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xN2n9jkJvkSR0RH/zWMkRvEj2quGdHH6HsawLgUOQOY=; b=d960bg7GNRPsaPS0vH1Xb8OiOdbJb/rcTn4z53rM/XKUphLcucr/UIlak0mT7Ir8MS ZArqWhsrtmcUubP6DXAra2LgHdAPXx7NCKhU3AbcLLR0yuc8d0c5/5RMLVsN1zHVxuIT xf1Lc9XsePbCmq6wOh2qZ1Quj82fkitJ1UzAju+H0NZPXkNgIlTRCCBfHf1yCQQvGeoY L3Qb1JZHPdsH/49TPaHeDleXPAEmHYisiBVo+XIKCKPh+vXfreQbDwkx25m1rb1zFafJ I6h7UYIDifyCnR+MYfhqtwK/gJhrZjjnmYIfNCE7EKS2ey16zUxwgA9JhVW9hVys7yEZ JiCA== X-Gm-Message-State: APjAAAWakRwFbhCGhgIGx7l+Ec18iBbTdpxPOxytZgfFLnMcf3kznzRp jZdevKkfd7mK44hMyPpZQXrcPXA6BAnxUpZGXAK9Be0Rc0ZU0UrQhZVwncj7utSSWJmzljq7IrO jiFwdYZC2TDr7er8qm6gsZVfp X-Received: by 2002:a05:620a:a46:: with SMTP id j6mr13676qka.164.1580941714103; Wed, 05 Feb 2020 14:28:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzgDC/fBZ4GnRbk3BQEXE+eWIhbbieAb4nE+MGEKdPSLikBImrRnbk5qAuaCcwE1K66PslinA== X-Received: by 2002:a05:620a:a46:: with SMTP id j6mr13650qka.164.1580941713724; Wed, 05 Feb 2020 14:28:33 -0800 (PST) Received: from xz-x1 ([2607:9880:19c8:32::2]) by smtp.gmail.com with ESMTPSA id c184sm503353qke.118.2020.02.05.14.28.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 14:28:33 -0800 (PST) Date: Wed, 5 Feb 2020 17:28:29 -0500 From: Peter Xu To: Sean Christopherson Subject: Re: [PATCH v5 03/19] KVM: Don't free new memslot if allocation of said memslot fails Message-ID: <20200205222829.GF387680@xz-x1> References: <20200121223157.15263-1-sean.j.christopherson@intel.com> <20200121223157.15263-4-sean.j.christopherson@intel.com> MIME-Version: 1.0 In-Reply-To: <20200121223157.15263-4-sean.j.christopherson@intel.com> X-MC-Unique: WHeRNyf9PZiW5dB5cDEbeg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline Cc: Wanpeng Li , kvm@vger.kernel.org, David Hildenbrand , linux-mips@vger.kernel.org, Paul Mackerras , kvmarm@lists.cs.columbia.edu, Janosch Frank , Marc Zyngier , Joerg Roedel , Christian Borntraeger , kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jim Mattson , Cornelia Huck , linux-kernel@vger.kernel.org, Paolo Bonzini , Vitaly Kuznetsov , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= 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 Tue, Jan 21, 2020 at 02:31:41PM -0800, Sean Christopherson wrote: > The two implementations of kvm_arch_create_memslot() in x86 and PPC are > both good citizens and free up all local resources if creation fails. > Return immediately (via a superfluous goto) instead of calling > kvm_free_memslot(). > > Note, the call to kvm_free_memslot() is effectively an expensive nop in > this case as there are no resources to be freed. (I failed to understand why that is expensive.. but the change looks OK) > > No functional change intended. > > Acked-by: Christoffer Dall > Signed-off-by: Sean Christopherson Reviewed-by: Peter Xu -- Peter Xu _______________________________________________ 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 X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,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 F23B0C352A1 for ; Wed, 5 Feb 2020 22:28:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C8324214AF for ; Wed, 5 Feb 2020 22:28:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="iApYAl9y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727109AbgBEW2i (ORCPT ); Wed, 5 Feb 2020 17:28:38 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:32480 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727443AbgBEW2h (ORCPT ); Wed, 5 Feb 2020 17:28:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580941716; 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=xN2n9jkJvkSR0RH/zWMkRvEj2quGdHH6HsawLgUOQOY=; b=iApYAl9yv6I1Bh97IB2lo6sf8+RYIKr6mH/HP0P4pzfLX6KSdCc8PFmzIGAGDzcArmo8Xd /1FT0cx4FBvoNU89Fb9cYotDIApzO5vHrzfI/84L2xEbrtPPouyn9IE8FS5CenbD6PnzXu 0MeOvtZOe5Z63znWPoCl1MoIaDZ4xe4= Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-106-OxYMlR6qO6GKtiYnoFEz8w-1; Wed, 05 Feb 2020 17:28:34 -0500 X-MC-Unique: OxYMlR6qO6GKtiYnoFEz8w-1 Received: by mail-qk1-f200.google.com with SMTP id t195so2282938qke.23 for ; Wed, 05 Feb 2020 14:28:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xN2n9jkJvkSR0RH/zWMkRvEj2quGdHH6HsawLgUOQOY=; b=HukmBQCi06XptN+yk09VUZRetrJ9cqY7PKeYKGKWfffT2jp37zqhJn1lRp8uKu7M/V IDSEHQopd7+QX3NGfoY4QNQz44RKazKV0wxAoQS2NiyQXii15BJ949m8prdsZaA/GPo+ R9ik4HCQhmXm/eP4nctF7qiGt/KSqckBJElMcPphvGRKhgyhF464RGntRoMUSxvXNT/t 4BdEKdIlfJKOy3++kSegst/5ed821NUYMjOm+sWT64xOu+nFbocofXc+ykhXFpX6ccb8 sv1qjUhAAybPsM3lgW6Z9+HsPEO9+QqpxLrl30/QejvLiieM0eu8SklnZa8l3bXnJr4z vvXQ== X-Gm-Message-State: APjAAAXm4IdGxF3j6gM58i8PWdTka3LQ6p1u1lhp0TrFMRei1aRLH+dJ CJvzqSNoM0cAfE3yhn65w9y0mjQlhBrbBQASAzLiyKmarqS65Agq7Yh5QGj+yKuTt7PDD0OBlIQ nn1Cj3r/7jCL1M2/rkNeycA== X-Received: by 2002:a05:620a:a46:: with SMTP id j6mr13686qka.164.1580941714103; Wed, 05 Feb 2020 14:28:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzgDC/fBZ4GnRbk3BQEXE+eWIhbbieAb4nE+MGEKdPSLikBImrRnbk5qAuaCcwE1K66PslinA== X-Received: by 2002:a05:620a:a46:: with SMTP id j6mr13650qka.164.1580941713724; Wed, 05 Feb 2020 14:28:33 -0800 (PST) Received: from xz-x1 ([2607:9880:19c8:32::2]) by smtp.gmail.com with ESMTPSA id c184sm503353qke.118.2020.02.05.14.28.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 14:28:33 -0800 (PST) Date: Wed, 5 Feb 2020 17:28:29 -0500 From: Peter Xu To: Sean Christopherson Cc: Paolo Bonzini , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, Christoffer Dall , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Subject: Re: [PATCH v5 03/19] KVM: Don't free new memslot if allocation of said memslot fails Message-ID: <20200205222829.GF387680@xz-x1> References: <20200121223157.15263-1-sean.j.christopherson@intel.com> <20200121223157.15263-4-sean.j.christopherson@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200121223157.15263-4-sean.j.christopherson@intel.com> Sender: linux-mips-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Tue, Jan 21, 2020 at 02:31:41PM -0800, Sean Christopherson wrote: > The two implementations of kvm_arch_create_memslot() in x86 and PPC are > both good citizens and free up all local resources if creation fails. > Return immediately (via a superfluous goto) instead of calling > kvm_free_memslot(). > > Note, the call to kvm_free_memslot() is effectively an expensive nop in > this case as there are no resources to be freed. (I failed to understand why that is expensive.. but the change looks OK) > > No functional change intended. > > Acked-by: Christoffer Dall > Signed-off-by: Sean Christopherson Reviewed-by: Peter Xu -- Peter Xu 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=-1.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_DBL_ABUSE_MALW 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 867C6C35247 for ; Wed, 5 Feb 2020 22:28:50 +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 55309217F4 for ; Wed, 5 Feb 2020 22:28:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mc6BSJaX"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="EYXduHnO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 55309217F4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=NNzMm7jBqrl1n69n2x3XbtBXp7b3EE7IE+saHz8SYLA=; b=mc6BSJaXBRHCRb LEtf/wE734iIrxjSVZHT/Qr3LuW4744eZ9WGhMIfaqV9z3Ggs1HHHADyz0ttxT3ZZJ3g/BymCtMEJ iCit/23E3NzKXIjBsEla2rdfHTT/L0AT15RVPQsvaT1m7sDeVrbhnaSuf3DRbvs7UIpKem8s9O/Mc vaJzHA1KPySKGzCTxiMDkWPPYOFVtS9EpoC3K4rttoZc+eOCyWNvwo3p9wY1X34upnyUEKjSOmKFU w0xmQ798muXos845TvM/GAkiAZWs4w+W0UcQiCj3+kBZ3+CNJPOaXWgDppR7XPHNlglXOrRxKFcDf A1fBLLdEEGJ1CT/P2Fsw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1izTA2-0005ra-RQ; Wed, 05 Feb 2020 22:28:42 +0000 Received: from us-smtp-2.mimecast.com ([207.211.31.81] helo=us-smtp-delivery-1.mimecast.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1izT9y-0005rG-V9 for linux-arm-kernel@lists.infradead.org; Wed, 05 Feb 2020 22:28:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580941716; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TlZ291EmGopDCG5ErV/B6q6MCWpQFGiaDWjGBWMPhvg=; b=EYXduHnOunpeSVhd2v6DQ3Dh9Ih8wY2nGejwTkqwacbE2rcTsSvBkEajhHI9nXgd+VsEHm 7AFThfOyjrBRzb6rjKi/VVWqYTU3MiReYZSqry6LAwd7NTlu9sAbwpsvk3PkkXYtsTX3ae d+pQRAzY3YsYV6r/QsNiWWo2qRUllJs= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-185-aKyGuqkPMVWjbHe6zM-KQQ-1; Wed, 05 Feb 2020 17:28:34 -0500 Received: by mail-qv1-f71.google.com with SMTP id l1so2450243qvu.13 for ; Wed, 05 Feb 2020 14:28:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xN2n9jkJvkSR0RH/zWMkRvEj2quGdHH6HsawLgUOQOY=; b=sOFyAO3vaT+KQ1K/V9jFt8IXkZIhwhtC7C4hbskUopr8xiS5I7D9TTuva66c0rc6Wp reK1cSI63KUHcwkJyK0IGBQif5Nspj0uqg82vO/RV+/zuWt+xXb2WApRbp762J1y+5lt sFqH5w7AHswMyvaI/u4f07DiHoH8u+DfJlib4UnBZaugDYXYdansSish7Kj/XL/fp5zk cFk4v5kJJS6eEz2HAj5if5vbvneal/rxsr9SsFMI9BIM1bn4kSh8a/HKdqT88P++kVVe qj+PEZSlWguvBysAPODmyh0xDqzbKeMggICcs1BIJwo8uPTcZ+gTS4QnZ3DHiJP8YyRa M4oA== X-Gm-Message-State: APjAAAVmUFwwkFrIFORJOmThc954YuZamYJQruRnvipX5RWd7u8sqYOz yVkaNE9hAR/e0lt2hdfcBlKD13TsrtPXiQJDF8MB/G+96cL/eTdepQRKfhSmrFFFaxnI81L/PFB 6wIWeW+wqaHVO2EmqbpnfDKb8sQ/la7GagxM= X-Received: by 2002:a05:620a:a46:: with SMTP id j6mr13690qka.164.1580941714104; Wed, 05 Feb 2020 14:28:34 -0800 (PST) X-Google-Smtp-Source: APXvYqzgDC/fBZ4GnRbk3BQEXE+eWIhbbieAb4nE+MGEKdPSLikBImrRnbk5qAuaCcwE1K66PslinA== X-Received: by 2002:a05:620a:a46:: with SMTP id j6mr13650qka.164.1580941713724; Wed, 05 Feb 2020 14:28:33 -0800 (PST) Received: from xz-x1 ([2607:9880:19c8:32::2]) by smtp.gmail.com with ESMTPSA id c184sm503353qke.118.2020.02.05.14.28.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Feb 2020 14:28:33 -0800 (PST) Date: Wed, 5 Feb 2020 17:28:29 -0500 From: Peter Xu To: Sean Christopherson Subject: Re: [PATCH v5 03/19] KVM: Don't free new memslot if allocation of said memslot fails Message-ID: <20200205222829.GF387680@xz-x1> References: <20200121223157.15263-1-sean.j.christopherson@intel.com> <20200121223157.15263-4-sean.j.christopherson@intel.com> MIME-Version: 1.0 In-Reply-To: <20200121223157.15263-4-sean.j.christopherson@intel.com> X-MC-Unique: aKyGuqkPMVWjbHe6zM-KQQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200205_142839_080626_879E47FD X-CRM114-Status: UNSURE ( 9.67 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Wanpeng Li , kvm@vger.kernel.org, David Hildenbrand , linux-mips@vger.kernel.org, Paul Mackerras , kvmarm@lists.cs.columbia.edu, Janosch Frank , Marc Zyngier , Joerg Roedel , Christian Borntraeger , Julien Thierry , Suzuki K Poulose , kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jim Mattson , Cornelia Huck , Christoffer Dall , linux-kernel@vger.kernel.org, James Morse , Paolo Bonzini , Vitaly Kuznetsov , Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jan 21, 2020 at 02:31:41PM -0800, Sean Christopherson wrote: > The two implementations of kvm_arch_create_memslot() in x86 and PPC are > both good citizens and free up all local resources if creation fails. > Return immediately (via a superfluous goto) instead of calling > kvm_free_memslot(). > > Note, the call to kvm_free_memslot() is effectively an expensive nop in > this case as there are no resources to be freed. (I failed to understand why that is expensive.. but the change looks OK) > > No functional change intended. > > Acked-by: Christoffer Dall > Signed-off-by: Sean Christopherson Reviewed-by: Peter Xu -- Peter Xu _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel