Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp375327lqt; Mon, 18 Mar 2024 10:12:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV4LZd4De5mUNxd0IFA04P6BrmtPoVjlPgdB8Y1eIqt3TVqod2kx239Wxa1dNjYQv88A1Ts4jdC0ZUSAlDiOz7B/O+7c5/11vUFXXG1HQ== X-Google-Smtp-Source: AGHT+IE8Tv5GPheMsSW0XTrR3c0vOBbxLQS2vcS7yaIeOfy8YCGB7/ec+lYerkHR8C6ZRD3d6Hc8 X-Received: by 2002:a05:620a:4c9:b0:78a:4d:b612 with SMTP id 9-20020a05620a04c900b0078a004db612mr4140650qks.24.1710781953872; Mon, 18 Mar 2024 10:12:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710781953; cv=pass; d=google.com; s=arc-20160816; b=dsSa6BcfKVGW+Q9v05X7hlRTGWXiDKPr+7bv4hX4fv2krrpnIIfkWIYooURQRrXmZD EkEpSNqRCjMeq3rEnsskpV1ohV/BMqDi1zz+ib4lm6jP7SgZ1eZ2Allq0DsxijPmCI/8 Z3dzuxa+Sbrf5jWkmYzQK9QDD5QG3LvSiNVISCEhMt26LezdXYsc02jP1mia/KzkoY3Z Df1d0+gGFjgfwEzpl4CaW2BkiYng1twF1ECRc4n5ojzl7UBt/jjyYE77kG9d7UVSXa2t gEJwnNf4QOA5NNYtaq9r54tPOdV413MeZwziFZBcOEaOxRgy89b6DCgS9/4evJ+eN+lS 66Zw== 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=b10eM9OPKw2iR5aDyQeJZEOKutjkeCBgKMNt5x/Pr4o=; fh=omXwQZyuReqTclBXnJduO1u8JToxuYUX5blGl2UY4Rs=; b=axC6JZOdgALvq4v1U0m/dHhtKOu/PsWOfmEyUDH8bnMLwA//xi2+4jUk8zs3HGBwiW DmLu0vRPabh4Ini2JMgw87sbqve/70PuPGpoqcApIHqpL2ThrhOcL0Ov5HkJbM3flhMF G7HYvNjBY8zUE5frZ4WbReFnYoLdmJVD1iwk5ZLq2amEZ0AMTXJZz1FcoXu2QAbKq1sB 6pskUcLr7avwWflQcF4KGqHuE+M7HS/raDrz61HiIfHh/pM41t2uu7C4if5pqB8wqH6o yh2mESYROppmmjRM2tA9+FwPNev7qY9LDpZHdfHOHTgINQCJzc7JNY6ITKDV12L8frcW 0phw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hUpnbys9; 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-106427-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106427-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 dt34-20020a05620a47a200b00789c48d2effsi9400409qkb.260.2024.03.18.10.12.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 10:12:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106427-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=hUpnbys9; 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-106427-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106427-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 915F31C2103C for ; Mon, 18 Mar 2024 17:12:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 670165576B; Mon, 18 Mar 2024 17:12:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="hUpnbys9" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (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 2F22954BDD; Mon, 18 Mar 2024 17:12:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710781942; cv=none; b=kDaR7Q/cPRNkodKSDythZ8vJaaYFeSz1xAR8Not/Lec0TGreqCwEHAX62ceml+dMsgj3j5WjLYanv9iPMxIAQKjJFXZGk65vvEbwUg19NlyTuPXehOLNqgkadPfkLD+sH82CN6Nd0WjIQbznJztmPY4kdECZ3DlRb9CmiOjzdKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710781942; c=relaxed/simple; bh=v+TlVPrVdlVGwoJdEhxp1LrYuRsBEUrWr7CIMuNk5RY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=JbyzgvmLZi4u3YLddMcq9XFx0E6p5ajVVlmCnW124I/EkPK9Vn3rUmSvYQKnfiZMKXsQiMgCVDlDAwbmZywgsJb26x8jieoexWE6RUpJn/OTzF0pl+Gc3rQvZ7ULF0NSw/Jn/vx3MKpr9VBe9/JLbYue2JsBNIqCF1QuQ5pAr2w= 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=hUpnbys9; arc=none smtp.client-ip=192.198.163.9 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=1710781941; x=1742317941; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=v+TlVPrVdlVGwoJdEhxp1LrYuRsBEUrWr7CIMuNk5RY=; b=hUpnbys9iy89tuNREgUTV2C/VEHRsPafeB5p/dvfICx6Y2Z18XN+nQ2t SzZfXYhzDI1GVmxh2UNXwsiqcusYifRiAFGCgRqxN+rcxr60cwSBCcJQ3 CsWJZwxQ7twlcwnv698NCwWJ4HpS6PgHwv9IRS2jQmuvyHh9ymjvX6Zyu 5QZ6BFL9uZmtQkUL99qhN1N2hdgdd+oHUbFlbbY9TPcNLVDvHmbjd188J 1imW/klVmzFMnt5vRJWAvp9x1GZgMGcgTPnWtxJyYUUx0YfIwDOseFIxJ g1sxjwLkzoKxTODtxhfTyt082uW5BHz2xQZgd7nix7o3Tb5F5KDrcq44u w==; X-IronPort-AV: E=McAfee;i="6600,9927,11017"; a="16335335" X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="16335335" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 10:12:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,134,1708416000"; d="scan'208";a="13568609" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2024 10:12:18 -0700 Date: Mon, 18 Mar 2024 10:12:18 -0700 From: Isaku Yamahata To: "Edgecombe, Rick P" Cc: "Yamahata, Isaku" , "Zhang, Tina" , "isaku.yamahata@linux.intel.com" , "seanjc@google.com" , "Huang, Kai" , "Chen, Bo2" , "sagis@google.com" , "linux-kernel@vger.kernel.org" , "Yuan, Hang" , "Aktas, Erdem" , "kvm@vger.kernel.org" , "pbonzini@redhat.com" , "isaku.yamahata@gmail.com" Subject: Re: [PATCH v19 120/130] KVM: TDX: Add a method to ignore dirty logging Message-ID: <20240318171218.GA1645738@ls.amr.corp.intel.com> References: <1491dd247829bf1a29df1904aeed5ed6b464d29c.1708933498.git.isaku.yamahata@intel.com> <20240315013511.GF1258280@ls.amr.corp.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 02:01:43PM +0000, "Edgecombe, Rick P" wrote: > On Thu, 2024-03-14 at 18:35 -0700, Isaku Yamahata wrote: > > > 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. > > Hmm. We probably need to do it case by case. I categorize as follows. Unless otherwise, I'll update this series. - dirty log check As we will drop this ptach, we'll have no call site. - KVM_BUG_ON() in main.c We should drop them because their logic isn't complex. - KVM_BUG_ON() in tdx.c - The error check of the return value from SEAMCALL We should keep it as it's unexpected error from TDX module. When we hit this, we should mark the guest bugged and prevent further operation. It's hard to deduce the reason. TDX mdoule might be broken. - Other check We should drop them. -- Isaku Yamahata