Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3243522ybt; Mon, 29 Jun 2020 20:11:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZ6wnzh204vu8nf7FfOm0YE949iFHRo/lCDBVBPn6uQM/OlPqzNO2k8HgYzTFNid+JDuP6 X-Received: by 2002:a50:a687:: with SMTP id e7mr13026919edc.62.1593486686889; Mon, 29 Jun 2020 20:11:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593486686; cv=none; d=google.com; s=arc-20160816; b=AMN9jEHsTSNclN1tgYaSjlIbldj2CY6QhLjh5UZfJXi591FJyDibPyheZGqqKxifU2 Wg9RVnD1gvfwCdSweWn/rMC0o17E/rP+E3ie9PD21n6asJ3jK0QAL2R5Cr30Tnw0eZur T6A9L0xttSuKoOHE1nd9U+LQr5vMlR2gmurt2sHmEgo1IhoxrPncfosOJmhyyzoqeMYL uCPo7isM1Y6+MYVcjRvPZbzxLqogBRPNY9xKoGOQqAlbxATQfurnOv4gTuirZKLfQuyP OpxJVTMTIeKRyFDZZUyUb/nbefDKylMKV7shyR2GvMsEOjZRagQ1tUEBuL/v/86Dy4Tc AMOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=TNPJf3HsBwEnQUF6wdtHb8Wkjntp5E/Y8QIFRdOi/cE=; b=TLp+zW2a0FUkpl5uBY56ntfC59ItDxx0A+xbh5SZxkcc8BZrfgQa/IukAtVhKQhLiN LFYvzlKCFpgCwcIKcz+fapcHM59VXjb/BM0h8SFILZ4EzRET2zrEjLGOyiY02ebX6vMI GMfBgXGhwLgS0IDVyYL4RFsxmtN4vvJvJ3ea315kPUPJmo/GgxuJKYRD6gIOsKu0ccDJ 3Fo9cIeaS+7C8zJH0xn8LcM277X1RuUm7UtvVGjFt8lyFLoupyJ1LZLGemosprf8iOjK YoY0Ql/kFtZByU9zrTsUh6MfwAWg0in8Ac/HMtb+eDUSxemLIHIPfLAxmg761HUESzdg 5fQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=GJfQz8fM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p25si835167edy.109.2020.06.29.20.11.03; Mon, 29 Jun 2020 20:11:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=GJfQz8fM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728997AbgF3DKo (ORCPT + 99 others); Mon, 29 Jun 2020 23:10:44 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:18267 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727826AbgF3DKn (ORCPT ); Mon, 29 Jun 2020 23:10:43 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Mon, 29 Jun 2020 20:09:54 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Mon, 29 Jun 2020 20:10:43 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Mon, 29 Jun 2020 20:10:43 -0700 Received: from [10.2.91.207] (10.124.1.5) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Tue, 30 Jun 2020 03:10:42 +0000 Subject: Re: [PATCH 1/2] KVM: SVM: fix svn_pin_memory()'s use of get_user_pages_fast() To: Vitaly Kuznetsov , LKML CC: Souptick Joarder , Ingo Molnar , Borislav Petkov , Thomas Gleixner , "Paolo Bonzini" , Sean Christopherson , Wanpeng Li , "Jim Mattson" , Joerg Roedel , "H . Peter Anvin" , , References: <20200526062207.1360225-1-jhubbard@nvidia.com> <20200526062207.1360225-2-jhubbard@nvidia.com> <87imgj6th4.fsf@vitty.brq.redhat.com> From: John Hubbard Message-ID: Date: Mon, 29 Jun 2020 20:10:41 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 MIME-Version: 1.0 In-Reply-To: <87imgj6th4.fsf@vitty.brq.redhat.com> X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL105.nvidia.com (172.20.187.12) To HQMAIL107.nvidia.com (172.20.187.13) Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1593486594; bh=TNPJf3HsBwEnQUF6wdtHb8Wkjntp5E/Y8QIFRdOi/cE=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=GJfQz8fM6prclbfKWGDx93swr/zvjCbIRJ70f0jyWsMwbYmuXhhGztZnI3dm9JMER UGqiHGS49qqXGEZNKEq8cqlok0NeLIrTBjgh9PGZ82/a1AjE05r+vAyQfXM1VtXqkQ XZXca4tqzSskv9ao1DnxFvD4hSybO2fixNXPFRaVXAmIeLf6oO+l6eXpd/imcTa++3 5dMCASVZ7Vi5B3hModoO0QCHQHFHxRRdTw/bRQcQgYE/X566aDEcVxgLrySTa1U5hr 5GJGk+0pxQSBUIcp4GYHX13dTCkayRsJR1UW/MGCHFXfJk8zbNFBh/HPNL8dBHG9eS DS6gGYtniQKeg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-05-26 00:33, Vitaly Kuznetsov wrote: ... > I bit unrelated to this patch, but callers of sev_pin_memory() treat > NULL differently: > > sev_launch_secret()/svm_register_enc_region() return -ENOMEM > sev_dbg_crypt() returns -EFAULT > > Should we switch to ERR_PTR() to preserve the error? > >> /* Avoid using vmalloc for smaller buffers. */ >> size = npages * sizeof(struct page *); >> if (size > PAGE_SIZE) > > Reviewed-by: Vitaly Kuznetsov > Thanks for the review, Vitaly. If anyone is able to do any run-time testing of this patch and also patch 2/2, then I think a maintainer would be more willing to pick them up. Any testing help there is greatly appreciated! thanks, -- John Hubbard NVIDIA