Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp711772lqh; Thu, 28 Mar 2024 14:04:21 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWm94jLMBBCea4irXOBEBerPDSwRCaZ2yc3RADyyBrH8ja7Mz7tPY55amBhUVE9DuDkPTimYYXlA05qt7XAM168LH7UA5ONcatkPYNbNw== X-Google-Smtp-Source: AGHT+IEH2j4xaZLCct/DNQ3+nlayudhZvAw5Yx4g2VpcAQZPffR56nU8TIpwOO7krYc0+hj3VXF9 X-Received: by 2002:a17:902:fc8f:b0:1e0:a7ed:750c with SMTP id mf15-20020a170902fc8f00b001e0a7ed750cmr806279plb.1.1711659861053; Thu, 28 Mar 2024 14:04:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711659861; cv=pass; d=google.com; s=arc-20160816; b=QpdeKkcaXNqTzMH6XQaLO32BIc5+tmvHTEe7eXK54FGZ5Blq3Bxx/6AWoOlY6rmwJf 7phxrrEZd+MisnOetIBhvAdN4bMvq/JeEpNe6yKytiaexsAYCAMNUt5DVi0FzT0icR64 ckxfmlCIHf2Mi6TXMbSFh/K2CuIR60CBQ+yMxBOmuik4QjddwosJStzBBq1nJJPhkNtG EwvABIb6XtkRg24uDw79c+ub3dPcMIZlQwvqJiccNH7bc78fenpQJbtBmPjokUW8QD3A 6pwIwUl1BiHG/mCVt3QGUez0psZQGt0kYoK0TTXZ8gQZz5rmYyfnC4KN9eCXodtSGmn0 NyPA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jmPo2TBQRF6MjKm3PPv/nosl1D92N9INT2b3eWp4t9o=; fh=P/quV/w7uXmndbL78FtEpLTNkJRPx4LJS51PzREvtL8=; b=AlMenGnR8UXXyndZQJ2ai2fW6+q8fuMV92YDIOzDOW05gw62nqxw8mVigLZqTUhtVN 7bX0e7jsIGwzRQCfILD1+d9XYoHtmvgviVG81jWzNnmXC/rNmY82jtTxsDqqDifeuFLs hKeiNQJ8tlgG5GU1Yx1B6NrreGzCX8LV/9QY/maLYNrxbKM7lAC0hjiM2uRl+TV7GlsD OZqdO6LRhOgiXvTnvAV7qXrb7+UmyquPpV4wJwn24GuHtOsc1VJt/IbsGPvj2kRhcYai OfE1ZbiZmJ/3nZ91XjUdbXRMiFjo+OUWZY/GIutsZxfl3CmNxLIkS7EIQvX/rGrI1WQi MqjQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=myihduew; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-123639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123639-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id s10-20020a17090302ca00b001e10a526a94si2171312plk.129.2024.03.28.14.04.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 14:04:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-123639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=myihduew; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-123639-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-123639-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BB973B255FF for ; Thu, 28 Mar 2024 20:55:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01CED13A884; Thu, 28 Mar 2024 20:55:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="myihduew" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C18C4594C; Thu, 28 Mar 2024 20:55:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.15 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711659321; cv=none; b=uM2bP9lJk1I5PG29XP/h0cFbIJROAjsNw28W+oZoEP5nHV8urzR/dK5ikcahnfvmUBiLZF/52g6hrmS3GSghGMVGMkVNzjo1r/QgI0q/I8xYbMjpjkj7Ru/vCdyUKAynA/2UmKNevDibPHJ9+mPaAuUWbn+6m1RMpMTuKnuwYL4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711659321; c=relaxed/simple; bh=NlPf3KGnVETWty2mAwv7g0uKCHiSOl4SH1FWESdoYrc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FCY2KMC0Rpg4GVZIah8JnDhXFMR8kj2WrO++MYWvZIZ6TtESs2OprhvnaQc3WXC1YucyJCcP658uQWmkKBY0UNsHZa18YwkMeAmMNxX71akKxaID38pPcN/SVurF4AbmcuwUuhV5XznVb2I7Si2ocB6Hl2QEoJdIFEkJkAxn/hc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=myihduew; arc=none smtp.client-ip=198.175.65.15 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711659320; x=1743195320; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=NlPf3KGnVETWty2mAwv7g0uKCHiSOl4SH1FWESdoYrc=; b=myihduewvEXAcX8PwFO4zNnu8OkGdhIIDzfQQzKaXWvYT969xpz/KkG2 TFCExXj/YLq/EYs2NQzhwwo4AYTggA08bxkIFDWLa60vQpxtdFkTyuc29 jYuK9t4Rqtg1nCp7U5eKDkTDH6JuMaX5eMD2vrT5wWz1V333D3QGf+8S+ lYOnZmviPIwvp+FHO/1O2ehusrTU2Oiqh9lY7lJ05muWd/Iq7Hja1Cmu/ TXua6DBQgtqPJbK1nI7WM7EKcYexG2NglRCxNToi5U/H/VV9an85IWp9K z78J50ra+ug8x7j4aNDHhaZWtiJTpFM5eKDWc1AKUc23KB0LQik2hcnuG Q==; X-CSE-ConnectionGUID: rj9XjWBdTMal1W0jh5KYag== X-CSE-MsgGUID: tusWMITURbOSzByzs43GwA== X-IronPort-AV: E=McAfee;i="6600,9927,11027"; a="10655603" X-IronPort-AV: E=Sophos;i="6.07,162,1708416000"; d="scan'208";a="10655603" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa107.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 13:55:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,162,1708416000"; d="scan'208";a="17408469" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2024 13:55:19 -0700 Date: Thu, 28 Mar 2024 13:55:17 -0700 From: Isaku Yamahata To: Binbin Wu Cc: isaku.yamahata@intel.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, Paolo Bonzini , erdemaktas@google.com, Sean Christopherson , Sagi Shahar , Kai Huang , chen.bo@intel.com, hang.yuan@intel.com, tina.zhang@intel.com, isaku.yamahata@linux.intel.com Subject: Re: [PATCH v19 060/130] KVM: x86/tdp_mmu: Apply mmu notifier callback to only shared GPA Message-ID: <20240328205517.GQ2444378@ls.amr.corp.intel.com> References: <2f2b4b37-2b99-4373-8d0d-cc6bc5eed33f@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2f2b4b37-2b99-4373-8d0d-cc6bc5eed33f@linux.intel.com> On Thu, Mar 28, 2024 at 04:29:50PM +0800, Binbin Wu wrote: > > > On 2/26/2024 4:26 PM, isaku.yamahata@intel.com wrote: > > From: Isaku Yamahata > > > > The private GPAs that typically guest memfd backs aren't subject to MMU > > notifier because it isn't mapped into virtual address of user process. > > kvm_tdp_mmu_handle_gfn() handles the callback of the MMU notifier, > > clear_flush_young(), clear_young(), test_young()() and change_pte(). Make >                                                    ^ >                                                    an extra "()" Will fix it. Thanks. > > kvm_tdp_mmu_handle_gfn() aware of private mapping and skip private mapping. > > > > Even with AS_UNMOVABLE set, those mmu notifier are called. For example, > > ksmd triggers change_pte(). > > The description about the "AS_UNMOVABLE", you are refering to shared memory, > right? > Then, it seems not related to the change of this patch. Ok, will remove this sentence. -- Isaku Yamahata