From patchwork Wed Nov 15 07:14:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiaoyao Li X-Patchwork-Id: 13456305 Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (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 EAFDD63A5 for ; Wed, 15 Nov 2023 07:18:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="B1gdMWyN" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0FAC18E for ; Tue, 14 Nov 2023 23:18:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700032723; x=1731568723; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=O4Vrp8tmq5byA7idUQymr1wDYibEauKpMsvSt9dIjqM=; b=B1gdMWyN+MNpR1gzPHw/gTieLFTm3LwVUTXDW9/PoFtKoBRwZMScBQG9 XvIH2gOLfDMK8cYkIRXZ4jW87+Gocq+CDJGL1AHJ+dmZBxZSdyF9Nza4N LZc5g/rsAm7Hfm1uJ9rnAE+dQ6BQ/MteNj+BfV5smOrcdmG1QCD1kKEbZ Einl7ve8kc0yFkVOLUBbNSiKiTMt5IoApRZQW7LKHwK62N4qSNI+Eq4JX 2+wr+W+f94NcVq1xjVUI6fnrBAuvtusgzZIIIh22XEBrZMPBpeJYepcjt fRqX3T4XxLRKGVjlGm3dpbGKal434dmZfTcaj+nGZQPtMUVPwg2tQStIp Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10894"; a="390622791" X-IronPort-AV: E=Sophos;i="6.03,304,1694761200"; d="scan'208";a="390622791" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Nov 2023 23:18:42 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10894"; a="714798665" X-IronPort-AV: E=Sophos;i="6.03,304,1694761200"; d="scan'208";a="714798665" Received: from lxy-clx-4s.sh.intel.com ([10.239.48.52]) by orsmga003.jf.intel.com with ESMTP; 14 Nov 2023 23:18:33 -0800 From: Xiaoyao Li To: Paolo Bonzini , David Hildenbrand , Igor Mammedov , "Michael S . Tsirkin" , Marcel Apfelbaum , Richard Henderson , Peter Xu , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Cornelia Huck , =?utf-8?q?Daniel_P_=2E_Berrang=C3=A9?= , Eric Blake , Markus Armbruster , Marcelo Tosatti Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, xiaoyao.li@intel.com, Michael Roth , Sean Christopherson , Claudio Fontana , Gerd Hoffmann , Isaku Yamahata , Chenyi Qiang Subject: [PATCH v3 28/70] i386/tdx: Make sept_ve_disable set by default Date: Wed, 15 Nov 2023 02:14:37 -0500 Message-Id: <20231115071519.2864957-29-xiaoyao.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231115071519.2864957-1-xiaoyao.li@intel.com> References: <20231115071519.2864957-1-xiaoyao.li@intel.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Isaku Yamahata For TDX KVM use case, Linux guest is the most major one. It requires sept_ve_disable set. Make it default for the main use case. For other use case, it can be enabled/disabled via qemu command line. Signed-off-by: Isaku Yamahata --- target/i386/kvm/tdx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/i386/kvm/tdx.c b/target/i386/kvm/tdx.c index 6b9dca03ded5..7d2b1da85951 100644 --- a/target/i386/kvm/tdx.c +++ b/target/i386/kvm/tdx.c @@ -544,7 +544,7 @@ static void tdx_guest_init(Object *obj) qemu_mutex_init(&tdx->lock); - tdx->attributes = 0; + tdx->attributes = TDX_TD_ATTRIBUTES_SEPT_VE_DISABLE; object_property_add_bool(obj, "sept-ve-disable", tdx_guest_get_sept_ve_disable,