Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp815768lqt; Fri, 19 Apr 2024 11:10:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCViNWiEgMq6YM7UKVOXgSQwJFsbXa//eA3w56GN1YRHlbcqernUAkcrovrsPpU3wsOTyMg3AA2mddjFT8wYVrwAZbwnOk6p0p6JJKS3KA== X-Google-Smtp-Source: AGHT+IGx7TR2IeTNjA3wD82S0UcZU5hTpgnYanQI8eJND8m5saLWDAy3MGan3J4yUx8reJP9te5t X-Received: by 2002:a17:902:c381:b0:1e2:1db3:ebeb with SMTP id g1-20020a170902c38100b001e21db3ebebmr2997859plg.57.1713550206702; Fri, 19 Apr 2024 11:10:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713550206; cv=pass; d=google.com; s=arc-20160816; b=PR400tDKdy0I8houEIljf0MqdT22hEfb3HmDGtgm8vnPX6IaHka+qth+36SOAZl9JI dRsyvJZQi5LjNPhRJipRq3jJQgF42bKuE2t9b7I7GMfpGmTrCcZJ0oLFDOxBrPm30TzT MR1xHCm5pI9/WB1B2oQ7PZC+Q6kEYwjRbWK0Rr1lP9HtSyyYwTNQREFC80Ctj+LNca8X tt9f90OvotvIH7EgViEL0jjy5n6F9z1A2nlhQIdeJspzPF+h6EaR9WdESlZUfU/aXsPJ mFrxa3ba/Z4OOMF566m94fMaY8l7quxwPFbhwS5coigiH6sKmw05mnEKOVqT500VfFmv hiVA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=/pJfXTTCA5kHYQqVXyVpc2jfTGmCroqvnZXCtRJegIs=; fh=P/quV/w7uXmndbL78FtEpLTNkJRPx4LJS51PzREvtL8=; b=yWkMhspUl/n8Sg10MO+fYzYIpdyMiTRJRevGeZF7hb5AuQm1eyxLKXKH+5o516jahr 8S1zNSd0tAY9Ozgomyf90IU42stjN3/TgGs8zGI3G8CvKcQlYke1FL+v+RlfWPbhSbg1 uJWxRFwfXDXMebZN/FRgm3hsez/DSU9hBs4MTCtSFKkQll8VD45t1oaXOv7+tePzMwGE 9XtQnS6lPbPw+aGHCaeIzYBrbNJ04jTSf3dpRgj0xgILB7JmcS/huxyqGHqWcrR9EdIw m+iw+zQW6gNeqhji/xrfIaxkMSZ5v6kWPFEFROQbHbes8ewwK8KXBAYp0UbUUKpIz5p4 x2zA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="So5/mnn/"; 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-151853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151853-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 lk12-20020a17090308cc00b001e85dc6b4ddsi3685300plb.636.2024.04.19.11.10.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Apr 2024 11:10:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-151853-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="So5/mnn/"; 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-151853-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-151853-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 E6F4DB234ED for ; Fri, 19 Apr 2024 18:07:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 62DB013C902; Fri, 19 Apr 2024 18:06:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="So5/mnn/" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) (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 6DEAA130AC4; Fri, 19 Apr 2024 18:06:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713550017; cv=none; b=jkGLdJuYpSMQ1iP+qmiYMmixscb8bzg4oteK7HTKqVj+tP4uG+Wqkcv3ITbxhqpHTLGjqK646iIEiCAkGynQEXCgN6xlrbDdVWVTByaQPrvVNPHKzClPS3qL/dCUXpYrZrOReDKcUj8TSnJpUO8Ya0w+Nb5uLmhqANfwCkXmTbc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713550017; c=relaxed/simple; bh=KBWynCOp+Lgo8lSzeWtOi/RDySkBp8Ds0Fms1GnjVzo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ViuwLa0fgC+wdV7D/5rYLKQtexkuysj9NnTUMtHwu03zvPjDB2TfWqLkWrCZwSqCLzkzne/LAaXbww2MgGJu/vDYMWBZbUHG1nLLK+yN+J85r+2qObl6pw/efZdeduCSimHKSblT7TP+Z4MG1hUXqZ0agoki+r27jW/mDRJXHZw= 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=So5/mnn/; arc=none smtp.client-ip=198.175.65.10 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=1713550016; x=1745086016; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=KBWynCOp+Lgo8lSzeWtOi/RDySkBp8Ds0Fms1GnjVzo=; b=So5/mnn/bfQVRa2gPuo535Li7ae7ZTjLcCT6l4uVGTE2JaIUvtGuolFN oKWAcTL8xr17JW+xafppCEp/Jn5+FeiFhlo6l106zkRnnqRGTHv/ogk5X LL9b9PHTgTMzUJbAlmTHFxaCJp36absq3Z5dWgGEAqPRheHw/Fu49k+zO YVV/8oXU1X8aOpRH6y4EBaRotA40p/m8/r3rhi0E5v1M6tQ2rwB24AZ0Y m5c1y2yab8Wotr4UkiUKANbiQ7JUSTLU3Wf9ON5h4dJfV60sitRSOQ5J9 as/OQhLoBrzVyyD2mmmxGM91dISIendTXEyZG22JNWzfNsEqTQsycPURX A==; X-CSE-ConnectionGUID: 87KgzCmEShSQhmKCU2p4LA== X-CSE-MsgGUID: VaDLHjNBRzC16MbcNLK5Lw== X-IronPort-AV: E=McAfee;i="6600,9927,11049"; a="26616070" X-IronPort-AV: E=Sophos;i="6.07,214,1708416000"; d="scan'208";a="26616070" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Apr 2024 11:06:55 -0700 X-CSE-ConnectionGUID: vxB+HwJ9Txy7kiYpLjlR2g== X-CSE-MsgGUID: I9BjS0j3RxaFTrpB7D34Sw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,214,1708416000"; d="scan'208";a="23388464" 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; 19 Apr 2024 11:06:54 -0700 Date: Fri, 19 Apr 2024 11:06:53 -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 117/130] KVM: TDX: Silently ignore INIT/SIPI Message-ID: <20240419180653.GE3596705@ls.amr.corp.intel.com> References: <4a4225de42be0f7568c5ecb5c22f2029f8e91d62.1708933498.git.isaku.yamahata@intel.com> <7c71c294-8ce4-4f13-b827-d16a8811739a@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 In-Reply-To: <7c71c294-8ce4-4f13-b827-d16a8811739a@linux.intel.com> On Fri, Apr 19, 2024 at 04:31:54PM +0800, Binbin Wu wrote: > > > On 2/26/2024 4:26 PM, isaku.yamahata@intel.com wrote: > > From: Isaku Yamahata > > > > The TDX module API doesn't provide API for VMM to inject INIT IPI and SIPI. > > Instead it defines the different protocols to boot application processors. > > Ignore INIT and SIPI events for the TDX guest. > > > > There are two options. 1) (silently) ignore INIT/SIPI request or 2) return > > error to guest TDs somehow. Given that TDX guest is paravirtualized to > > boot AP, the option 1 is chosen for simplicity. > > > > Signed-off-by: Isaku Yamahata > > --- > [...] > > + > > +static void vt_vcpu_deliver_init(struct kvm_vcpu *vcpu) > > +{ > > + if (is_td_vcpu(vcpu)) { > > + /* TDX doesn't support INIT. Ignore INIT event */ > > + vcpu->arch.mp_state = KVM_MP_STATE_RUNNABLE; > Why change the mp_state to KVM_MP_STATE_RUNNABLE here? > > And I am not sure whether we can say the INIT event is ignored since > mp_state could be modified. We should drop the line. Now it's not necessary and KVM_TDX_INIT_VCPU change it. -- Isaku Yamahata