Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp35121rwo; Fri, 21 Jul 2023 08:10:56 -0700 (PDT) X-Google-Smtp-Source: APBJJlHxWQjM5pjdyo4o3gPw6xa1HGW4Zjh1OfXPa+meQkN9g4xFq1O/zMYG9pc6X+wC4IDPezf0 X-Received: by 2002:a05:6871:b24:b0:1b7:8c99:ea30 with SMTP id fq36-20020a0568710b2400b001b78c99ea30mr2418451oab.56.1689952255551; Fri, 21 Jul 2023 08:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689952255; cv=none; d=google.com; s=arc-20160816; b=KohvES6kqVdb7zh3rXu8MBRsb2lMONZocxH+2kCiJ2wQhKPf1HgcCpHiMHs8enmpFk OxymDprfynIdq/hHL956PcF8vcG8EcKXSxIRvfyEbOfmkT0cH07mWfOFWmQso7cihTCe HlOaoQQOynODMqLKsBDDzWVy0u0TunOSsjdGX7FpGBzATl+Is3HOaKbPhhUlzXOitdvN 8Edmh8UFuCbvlsp5dshBuIBNy0QbRjvkurJjJ52Yc7SRZxU93nlP7+xMmeI+VldUFoWw dgm0NOQfN4qqTgFnjYHoXDgelvjYJPhLRGbOwMKlRkF+s6To1Ky+C5/6YtK5Rer1Ppo9 gEbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=azCktJIks3muoJmKD2uOLSP3Fm1rD7o3e6mB0OGqMCc=; fh=DMhChBLtZGLVu8ofPru04YrCq9B96cGIpqNZD/m8c74=; b=p21XNGGIUiQLaFUELVjTCHQAFuXzjjOJfQC8f4oCrtqioJAq2qMWkIGgaeUA7JZWYd MwmHI43gOFjSv1LcPcaF1PaSbN/o7QDrsxh69osTadvXrzpBduVDOlcvM73uepqHw44c +Ls5CtfYLeUlWPOoOpXaLp+oKCHHqeW2eG8Xq85MeV0Jly+KKk/09pv1QENL5QivsV6T QWVByVtJ/2DFmSSWkGDdm8I6Tsk5BhUwMO362RVCHncxxUoY0D7+xM+l0Xf83kUUNndF GvRQ1R5kOjVGR2Q5VvB/cEFIvqsuItmJDMYapZdY1jfTmrPq0jjlLw7IBC162+jRlAEz RkWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HV1hDVUX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l64-20020a639143000000b0055acc7f8085si3150343pge.367.2023.07.21.08.10.39; Fri, 21 Jul 2023 08:10:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HV1hDVUX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231715AbjGUPGZ (ORCPT + 99 others); Fri, 21 Jul 2023 11:06:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231608AbjGUPGO (ORCPT ); Fri, 21 Jul 2023 11:06:14 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0CC0B272D; Fri, 21 Jul 2023 08:06:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689951969; x=1721487969; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=m75I2ERfRQTCcOTwNioBlzNNFor8J6AUk5uhhkX1LBE=; b=HV1hDVUXXxHNKGHSLiWMASWpKJTbWXXhsIgybOlfnfS7NGRwiAantlbp HGAwvEtCKk6nYHjCmjD1aa9K19ev5YmtZGVHAGEIXhH1ZqzJ9FuqVfZw7 D+ZiEciWJFCgHtTunz+5T1Lio/SHBmLhx9UUimj72t5nLpulGuJ8PHpIk ty3QgV93fCeZHKspp2TuX2grSiV52ixrwsT/krgDdjo1ianUxCXMYT/C3 ZD4NLybRXJEUJxiYFtfGuF33s3Lk7O9saW94rSIdT9TuABI3Ei33GKrCJ kFd1GmZtn1FKq/e3zlyaIwRiMC5z83oRT1gTnNW2hToAFo2SX3R6/f5KG Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10778"; a="430835138" X-IronPort-AV: E=Sophos;i="6.01,220,1684825200"; d="scan'208";a="430835138" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2023 08:06:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10778"; a="790229682" X-IronPort-AV: E=Sophos;i="6.01,222,1684825200"; d="scan'208";a="790229682" Received: from xiaoyaol-hp-g830.ccr.corp.intel.com (HELO [10.93.6.77]) ([10.93.6.77]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2023 08:05:57 -0700 Message-ID: Date: Fri, 21 Jul 2023 23:05:53 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.13.0 Subject: Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory Content-Language: en-US To: Sean Christopherson , Paolo Bonzini , Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , "Matthew Wilcox (Oracle)" , Andrew Morton , Paul Moore , James Morris , "Serge E. Hallyn" Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Chao Peng , Fuad Tabba , Jarkko Sakkinen , Yu Zhang , Vishal Annapurve , Ackerley Tng , Maciej Szmigiero , Vlastimil Babka , David Hildenbrand , Quentin Perret , Michael Roth , Wang , Liam Merwick , Isaku Yamahata , "Kirill A . Shutemov" References: <20230718234512.1690985-1-seanjc@google.com> <20230718234512.1690985-13-seanjc@google.com> From: Xiaoyao Li In-Reply-To: <20230718234512.1690985-13-seanjc@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,HK_RANDOM_ENVFROM, HK_RANDOM_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/19/2023 7:44 AM, Sean Christopherson wrote: > @@ -6255,12 +6298,17 @@ int kvm_init(unsigned vcpu_size, unsigned vcpu_align, struct module *module) > if (r) > goto err_async_pf; > > + r = kvm_gmem_init(); > + if (r) > + goto err_gmem; > + > kvm_chardev_ops.owner = module; > > kvm_preempt_ops.sched_in = kvm_sched_in; > kvm_preempt_ops.sched_out = kvm_sched_out; > > kvm_init_debug(); > + kvm_gmem_init(); why kvm_gmem_init() needs to be called again? by mistake?