Received: by 2002:ab2:2994:0:b0:1ef:ca3e:3cd5 with SMTP id n20csp490849lqb; Thu, 14 Mar 2024 18:35:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV3oSk3jEJQXDPZh248x4R53YkY+RDA4VluLBKPvrPslBXlk3SdFGHnAN9pd/IXi0+Pf4OZJLWq25jnEHKbuJtRwbT7HSbPmEuX4uGCdQ== X-Google-Smtp-Source: AGHT+IGJb5U48gGn2YrAc7eikS+RCKrjT1XbbEI73zJr/DC9kyWolFe5e0a+hdeiTCASwvD1lkhp X-Received: by 2002:a37:e317:0:b0:788:3907:d4eb with SMTP id y23-20020a37e317000000b007883907d4ebmr3814370qki.22.1710466524924; Thu, 14 Mar 2024 18:35:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710466524; cv=pass; d=google.com; s=arc-20160816; b=v6E9WGynM0bF3nl2qSZCgoO6hSwgwq0S88mHbjTPk3KSW3MBPAV0HiKr5Y+oKLh5Ov KS4pnMySOTmX1LmSXUqZgoEVYgDYeJEKUMIRGLA2BOy+2jeQC8PmZGlP97sn1fzwVb5N p9gk+4BPTF89qpnOTPniM0CKsbTj2/XVMZT+726ULTHAS1GgdPc0JJOkiBTePy5v5QCE 4QiU7+l9vIyDu9RNS8GM+5V2c9mU32kooAMGL0HoatK7TKm262X8A6yf2wj/L9N4sOMz 9Jv6EuaC6c/0oWqkjMKQiPFLFRkzBOYdV2O8PS+1x2egjVKy7tR/GB/0Hx7Q3g9gJIVA Gu+g== 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=W+QdNvOVKiAV4y1+ooccNs+qoYaS7L6JyrIfXylOXSk=; fh=Vj5trRVmnU8XdLFcSV47Z6Q81f2aWcrI0gBACy/KTKk=; b=kOL4f/1gGeHEUchJt/67zIVRZv5duEFpX9Ha6ZDeaNt7u1woaJ8Ygr2a9psxgLC9fj Smt2J/SWTttRy5im/dVgS1RmnP0cUQn2gVbWee1MSfukdUcxL3txLU11uW008UNIu2Eh BfWnITqAMCW3SF8ILDYimIHC0mcdcJV7KlKQIw5uKmKkQQCzWRotaZNoAofvNHj0X+zA cnEGJ+vSYpXicvdb+/JvA61Bdi1k/IgK9KbJvOen6Ebx/i4fAsyQkb6BKlBTwofQxTeU hT3w4quqz2SF8BjH6ug1jYy+CgQrtQsmGcU/4kRm3PAnsRX5e/Jsbv6kXssMca0GPrIT JX7Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BdbsAzMd; 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-103968-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103968-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p22-20020a05620a113600b00789e28bd8b7si874066qkk.728.2024.03.14.18.35.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Mar 2024 18:35:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-103968-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=BdbsAzMd; 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-103968-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-103968-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 94F0F1C219FD for ; Fri, 15 Mar 2024 01:35:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 90A1D612E; Fri, 15 Mar 2024 01:35:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="BdbsAzMd" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 BBE4C17E9; Fri, 15 Mar 2024 01:35:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710466515; cv=none; b=toJtBmFnzMF9A911yHIih5VbsIORHJul6w51W4830VLjV7iDdMme/3faNPPSUjGYj4pDOTccNAc1uUvD9Gqa2mdu0Ly6skqfVWkZ8bWdoj40UBKq8/udHZFbZdrLTJKOsbprWlfGQ0vfYp4lzoqbDkrTyqSAiwU5iGaV0pMICk0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710466515; c=relaxed/simple; bh=Th7S+DhYrtzjGeSKsD9TjobPaMkl17CMIDV/Ixl5vvw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=s237Ang+9s+Na+MdwrA83otVRXz9VGTixenN+q8HWfN1tv5k2JrealChSDgTOCy5qd8kDVemeXGRBSouwhHTrp8B65oD7Ealo1YmTC9TavgGwqSSGwddyUpQRM7PL+ucHFjWVq8McgdFnsjzcuqJDhwN1XPGFPitCjjbUKEgHRQ= 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=BdbsAzMd; arc=none smtp.client-ip=192.198.163.11 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=1710466514; x=1742002514; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=Th7S+DhYrtzjGeSKsD9TjobPaMkl17CMIDV/Ixl5vvw=; b=BdbsAzMdlaYXXpYJJK9JzDsACVYIJgTFsOYqYdHcsCNsiFCvCYMDF2yr TqjTJBqz/rvp7RqCUzuUeTi4dGArnCyVo9UktpkGHNTwgNm9X4i7TPeqD c7BqDm/pAGzWIG7f2TY/QK90YhkbPbyvQUP1/K7OeNWkrP4SWUVTQeLg9 vg9XtV1Can6PO/JfyEMhOlD+TtxEYoBWNscCR7sMMIf7E0h19djiQBwnJ Yi5p8gnIyJSolQPsHfGHExDvgBUxKcRwMfrlo2IbYsdeUUTEly1eJvupm Xc7oy+jyTRN6SB2zWah29axIYV9EeLdsDaTNkr3aSk2ntEonB5gZR5EiF g==; X-IronPort-AV: E=McAfee;i="6600,9927,11013"; a="15963108" X-IronPort-AV: E=Sophos;i="6.07,127,1708416000"; d="scan'208";a="15963108" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2024 18:35:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,127,1708416000"; d="scan'208";a="43397230" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Mar 2024 18:35:12 -0700 Date: Thu, 14 Mar 2024 18:35:11 -0700 From: Isaku Yamahata To: "Edgecombe, Rick P" Cc: "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Yamahata, Isaku" , "Zhang, Tina" , "seanjc@google.com" , "Yuan, Hang" , "Huang, Kai" , "Chen, Bo2" , "sagis@google.com" , "isaku.yamahata@gmail.com" , "Aktas, Erdem" , "pbonzini@redhat.com" , isaku.yamahata@linux.intel.com Subject: Re: [PATCH v19 120/130] KVM: TDX: Add a method to ignore dirty logging Message-ID: <20240315013511.GF1258280@ls.amr.corp.intel.com> References: <1491dd247829bf1a29df1904aeed5ed6b464d29c.1708933498.git.isaku.yamahata@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: On Fri, Mar 15, 2024 at 12:06:31AM +0000, "Edgecombe, Rick P" wrote: > On Mon, 2024-02-26 at 00:27 -0800, isaku.yamahata@intel.com wrote: > >   > > +static void vt_update_cpu_dirty_logging(struct kvm_vcpu *vcpu) > > +{ > > +       if (KVM_BUG_ON(is_td_vcpu(vcpu), vcpu->kvm)) > > +               return; > > + > > +       vmx_update_cpu_dirty_logging(vcpu); > > +} > > Discussed this first part offline, but logging it here. Since > guest_memfd cannot have dirty logging, this is essentially bugging the > VM if somehow they manage anyway. But it should be blocked via the code > in check_memory_region_flags(). Will drop this patch. > On the subject of warnings and KVM_BUG_ON(), my feeling so far is that > this series is quite aggressive about these. Is it due the complexity > of the series? I think maybe we can remove some of the simple ones, but > not sure if there was already some discussion on what level is > appropriate. KVM_BUG_ON() was helpful at the early stage. Because we don't hit them recently, it's okay to remove them. Will remove them. -- Isaku Yamahata