Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2956634lqp; Mon, 25 Mar 2024 14:30:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVDRrS9Nik55sQrgv7MJ/BVhrB4Q0POfYscI59m/5UZqvvO3r/beZoP7WgFhRHOPzRKOnXBIlxfb9I4Z5Dii1coGBoiy8rSZkI64dE1yg== X-Google-Smtp-Source: AGHT+IFUZt+WzKs6DOToW0h6IpXGzbyBdtazaIeirrsI7Y6zj2adaRnu3rs5KA20AeC0u7RaDhUz X-Received: by 2002:a0c:c343:0:b0:696:96da:c7d1 with SMTP id j3-20020a0cc343000000b0069696dac7d1mr1375171qvi.58.1711402203954; Mon, 25 Mar 2024 14:30:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711402203; cv=pass; d=google.com; s=arc-20160816; b=KhAOTgwd4zf79yuJs3uSBsGnDai6MCz+QS3uDgOo7KhE60R43cOFG7LnwWUNUcL8lH YvRwnHMXBvm/xgVWd6icI4jQh5UnnBgwiMsKYt3D0Hin/IKMyhqWxI4BtVhH6C9eVGj+ SaRKjwvzwebLTr2YZoceiPGVhSTB33HjjKCw3ewyfALlKFmvXi1Bk8zDyUacU9Yg2eXw PwT50AUQSVEil7e14VdGJ9zSD1peY1LQOd96hkc9ZjVk+ZkmPOF5FTB5jTs1oYQAuQ/5 4lFE4/Us2JNNrGWRF/fC2fyRyoqywZuwkrUKDLlPlxAA2xMyHmDQWlDSpwDvpHj9+hBl I8YA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=rom:in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:date:from:dkim-signature; bh=wFQ7jdz7EYhQEmVygF8ppl80xmMI4cI6tbwpdpJcCU0=; fh=61aF6c9D/Yn1drKsPCpNobtC9rOGKlOdbINvMmTt+jY=; b=BNtM8rUloc/WL/7CDeQRtv7a6A3r8Mr4xbNe2GmbPZ8w2cup6YCx+gZlXcZbfATD2o b+6PHEDuSCT7yZnZfwPrK2LcHHGBZyOwvnWdpdCdQahqkt8TQHDfkMl1szq0x7gGISPz EHLhxtYdGt9XN3nqBG0hDXUopscBZ3HAJmXL5i738wgqO6rJqYhKY3Wnsx6EObacUah7 ThmDV/JOdOBPDabGJV6N0cb82+qGbx71s7BMMxMPh13FzRmXaK4yqyWXgzF0I0jLSrGT YV//TFI+8GwGcjF4BSimwM9EBvQHTHIsA2ds3ge7IhwDwh/hqOpUNhRHjRvGR1hyOvX4 n6hw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GaHsfH4d; 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-118040-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118040-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 gg3-20020a056214252300b0068efe8cf6dasi8745375qvb.12.2024.03.25.14.30.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 14:30:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-118040-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=GaHsfH4d; 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-118040-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-118040-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 AA7DC1C3FDA3 for ; Mon, 25 Mar 2024 21:30:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 49A1A6EB56; Mon, 25 Mar 2024 21:29:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GaHsfH4d" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (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 803BF17579; Mon, 25 Mar 2024 21:29:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711402192; cv=none; b=VxLDKC5qlVAfQ0QbxIb/WyjmLuzSbrno7+zzE7h9KzjKFBrZ7j/6lSdMS8WYxRhRn89m3dhyGqHbpOpEXsfrvGjTyNqwmFSUbnBhD4atlm003TqPh1ISJxr4KqidnGGUkjnqDIaDEBXeGdQxQXvHZX8iDtYMkRhEoQX9VsAfQR4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711402192; c=relaxed/simple; bh=nCPzrrqVkGAk193TG/GOsmAWn7X4cHwfNIfJbvfkbpI=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YDirP086plW3QcvmnXh0AePgfcn/EU0oypBvJsUXzUCdYfS1OUu7sNjlINmIvd6EhLNCrjVT2uC75GAcT3z3YnwX68a1Uncc7JRYx5kaxuyK8TzGheojsjTbq+I1Thl4Du4lXvq1gLFlcLR3PD9UQmOeUFSdrXE/lRyPIbU6GYQ= 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=GaHsfH4d; arc=none smtp.client-ip=198.175.65.12 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=1711402191; x=1742938191; h=from:date:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=nCPzrrqVkGAk193TG/GOsmAWn7X4cHwfNIfJbvfkbpI=; b=GaHsfH4d2NARuwTOLUxNWc8ZoBd8kMRpobAYufkXqsA47q+RqGgRfxAt krxm5XjrnFFzSAhT2pWti5jZNKB9ZCW0v9JlxqwdOzgiILQLu/soifqhU tKt34bWbY8SeDdOsndx3stNd7XBWROoLPRQfy/m6rDkcbwr6/XWfhMan+ cpQSsfJw7HvvUy6wYYqoBOwBcUm9ugH0Bf4ao7LNvcoPa5BrheoAwxxbe LuvFbcL7fwWm2Y09Z/50jHD7s7NhAMxobCPC32E5ZUbSDGiTHWC/2UwEs bKZDQEUGPtFbG714LMRjFxOXh/XkkZG9jnRVMvLqHNhj+6NR7Y0otjv9b A==; X-IronPort-AV: E=McAfee;i="6600,9927,11024"; a="17862724" X-IronPort-AV: E=Sophos;i="6.07,154,1708416000"; d="scan'208";a="17862724" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2024 14:29:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,154,1708416000"; d="scan'208";a="53209913" Received: from ls.sc.intel.com (HELO localhost) ([172.25.112.31]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2024 14:29:50 -0700 From: isaku.yamahata@intel.com Date: Mon, 25 Mar 2024 14:29:49 -0700 To: "Huang, Kai" Cc: "Yamahata, Isaku" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "isaku.yamahata@gmail.com" , Paolo Bonzini , "Aktas, Erdem" , Sean Christopherson , Sagi Shahar , "Chen, Bo2" , "Yuan, Hang" , "Zhang, Tina" , "isaku.yamahata@linux.intel.com" Subject: Re: [PATCH v19 037/130] KVM: TDX: Make KVM_CAP_MAX_VCPUS backend specific Message-ID: <20240325212949.GK2357401@ls.amr.corp.intel.com> References: <9bd868a287599eb2a854f6983f13b4500f47d2ae.1708933498.git.isaku.yamahata@intel.com> <20240323011335.GC2357401@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 In-Reply-To: rom: Isaku Yamahata On Mon, Mar 25, 2024 at 09:43:31PM +1300, "Huang, Kai" wrote: > > > > Currently, the KVM x86 always reports KVM_MAX_VCPUS for all VMs but doesn't > > > allow to enable KVM_CAP_MAX_VCPUS to configure the number of maximum vcpus > > maximum number of vcpus > > > on VM-basis. > > > > > > Add "per-VM maximum vcpus" to KVM x86/TDX to accommodate TDX's needs. > > > > > > The userspace-configured value then can be verified when KVM is actually > > used > > > creating the TDX guest. > > > " > > I think we still have two options regarding to how 'max_vcpus' is handled in > ioctl() to do TDH.MNG.INIT: > > 1) Just use the 'max_vcpus' done in KVM_ENABLE_CAP(KVM_CAP_MAX_VCPUS), > 2) Still pass the 'max_vcpus' as input, but KVM verifies it against the > value that is saved in KVM_ENABLE_CAP(KVM_CAP_MAX_VCPUS). > > 2) seems unnecessary, so I don't have objection to use 1). But it seems we > could still mention it in the changelog in that patch? Sure, let me update the commit log. -- Isaku Yamahata