From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7B303CCFA02 for ; Fri, 31 Oct 2025 08:19:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bvN1CfpOc6aT6M4fNSyY501ml6QhWwdx/u3vQ3zxryk=; b=BfWbuDqpGIJSyO R/r4ZUsgXl1ZoQW4xsWi5zoVGlNi/SqnZz5ZRj5HBvNDCdTYCcmVTZ8q2s0xEoewjRAe2cGzNbZx1 y3rV92VnykrPAYGx7GHSNmpDtlVEAK2UBr44fQQedw9n6ss2JAAh8F464DiPOQpRduaxBD27UXjeE /c4cC7VNe49FYJeB0vM8U/tyWQlTu2a1wQY95Qz9pRcoZDifbnGUX2FORHmL3BojVj/AXvL1y+kBL YuWU3nCUTSrihXb0rOEN700xGeSbn0OQq1bOu9ZfMZRPN+pkpl1czQW2AspxpakMaexpadxnDT6iZ esVnr5qlWgNPuIs+26Gg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vEkMC-00000005d5u-0OCN; Fri, 31 Oct 2025 08:19:38 +0000 Received: from mgamail.intel.com ([192.198.163.13]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vEkM9-00000005d3h-0ETg; Fri, 31 Oct 2025 08:19:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1761898773; x=1793434773; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=EzjqWFPbYzjEfpDteBcncRVxcsQvYXXWJGNfJY3z6Qw=; b=Uu01M07n5zKOlRjF7OzTzFGT5Rk4rSA/1L3VOjsCFftzEMEl+9nqIM2c m8V0YCCHUdhcYM+2dpKb/yJiVPS5okYFPQdWeX4lRnE25AJl4lT1Aj9Jz KcwLCtk8kCL2Qm5xd9YohjYMouNTX9zQ4S2WKjRfLAuF5hRVDJmz1W75p I/OTmTY371A0utoNQnA0c8LyLwqXKWwoOwK4gH/GAbceBAsm3anc2oV// Trm914ZmWlN+l3n0HJSeY7cV6iwOB9ejt9W5Qh578N9lXljPWT7fweVaE YF6wGX5TO/IUdfxKp6ebzHUyyDLWW1lMb24RL5n4wCWrkSZSRN5dCsOKI A==; X-CSE-ConnectionGUID: 8ZlWVh3VST2hI0G+0lWdgQ== X-CSE-MsgGUID: fpu2L7NTRxaeLwZkm/sQPA== X-IronPort-AV: E=McAfee;i="6800,10657,11598"; a="66666550" X-IronPort-AV: E=Sophos;i="6.19,268,1754982000"; d="scan'208";a="66666550" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2025 01:19:29 -0700 X-CSE-ConnectionGUID: ln37oo4sSVGgtPADrikf7g== X-CSE-MsgGUID: Cf3BSL1nT0KAv+tRtGKg6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,268,1754982000"; d="scan'208";a="186112068" Received: from binbinwu-mobl.ccr.corp.intel.com (HELO [10.124.240.28]) ([10.124.240.28]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2025 01:19:22 -0700 Message-ID: Date: Fri, 31 Oct 2025 16:19:18 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 12/28] KVM: TDX: WARN if mirror SPTE doesn't have full RWX when creating S-EPT mapping To: Sean Christopherson Cc: Marc Zyngier , Oliver Upton , Tianrui Zhao , Bibo Mao , Huacai Chen , Madhavan Srinivasan , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Paolo Bonzini , "Kirill A. Shutemov" , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, Ira Weiny , Kai Huang , Michael Roth , Yan Zhao , Vishal Annapurve , Rick Edgecombe , Ackerley Tng References: <20251030200951.3402865-1-seanjc@google.com> <20251030200951.3402865-13-seanjc@google.com> Content-Language: en-US From: Binbin Wu In-Reply-To: <20251030200951.3402865-13-seanjc@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251031_011933_146172_09E6D88B X-CRM114-Status: UNSURE ( 5.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: kvm-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "kvm-riscv" Errors-To: kvm-riscv-bounces+kvm-riscv=archiver.kernel.org@lists.infradead.org On 10/31/2025 4:09 AM, Sean Christopherson wrote: > Pass in the mirror_spte to kvm_x86_ops.set_external_spte() to provide > symmetry with .remove_external_spte(), and assert in TDX that the mirror > SPTE is shadow-present with full RWX permissions (the TDX-Module doesn't > allow the hypervisor to control protections). > > Signed-off-by: Sean Christopherson Reviewed-by: Binbin Wu -- kvm-riscv mailing list kvm-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kvm-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.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 5066C2BE7DF; Fri, 31 Oct 2025 08:19:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761898772; cv=none; b=a7gnlu3z4Wi/Bib/UUx6G+MEW8qHQUWz7c0pBYn3Sr5s3erb7Z2cb6Q7x3+m1Dckq9/5B1HxOmrJJjyiNW+1sRkHGMAJq0lTYpaKKJ+RbdLWJ+UBKPtYav21hjBeJAleAP2DhYpkrKw5Aoe7YaRP6KYy02QiKyFStZv36b+xDrg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761898772; c=relaxed/simple; bh=EzjqWFPbYzjEfpDteBcncRVxcsQvYXXWJGNfJY3z6Qw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iq7DMAHP3PaGAM84gslYris5UUNFNIoKihBWCAcmTX4Ov3OFNez7RoNqZjUnFXJl7HQXZjVmAC5CmOlcm//woxANhBBPHKE7B0TP0dz+sHjTNgBSg1OllX0O9aYQ6t/X8Vmra2RbScmFX4C9zbxXOijfudSubc/QIPFDFKEt728= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=LFOptmJA; arc=none smtp.client-ip=198.175.65.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="LFOptmJA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1761898770; x=1793434770; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=EzjqWFPbYzjEfpDteBcncRVxcsQvYXXWJGNfJY3z6Qw=; b=LFOptmJANNqkz6pzHsk9AEPaajUEL+rEbqEb72Kkk9cdPxdh7/wfFBJX Ynh+XWPHbUZLfpD0SKSqcgA6CiTN8ae1jYZu6iY7cHLTMGs6EvDZdkL7r mUqh/twj4GZBLhPcQj8oKkGnsck3v+Zt4DqWV8J70+WCygQVgxUMyNuVF jfbgYvVoALuIX5B+95mAFnCKNN7HcouTwf2NvAfJ1H2SyvX3JJsWoYMOs lWzSCaYowjiHfFN3/RjEf5pUkLgcEtLx8G9pDYrUqz0kxV6oBXtQnBIVI QCnsiimj6MFItpa4CDQ7TQgTcZAsorYAlOFTv0eOlCyQ9l9dV6GFOCKm2 w==; X-CSE-ConnectionGUID: ArpzwkzBQVyEvIxVgSoIfQ== X-CSE-MsgGUID: gLKkGtRaTtK2tBoQwUM3hg== X-IronPort-AV: E=McAfee;i="6800,10657,11598"; a="63939831" X-IronPort-AV: E=Sophos;i="6.19,268,1754982000"; d="scan'208";a="63939831" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2025 01:19:29 -0700 X-CSE-ConnectionGUID: ln37oo4sSVGgtPADrikf7g== X-CSE-MsgGUID: Cf3BSL1nT0KAv+tRtGKg6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,268,1754982000"; d="scan'208";a="186112068" Received: from binbinwu-mobl.ccr.corp.intel.com (HELO [10.124.240.28]) ([10.124.240.28]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2025 01:19:22 -0700 Message-ID: Date: Fri, 31 Oct 2025 16:19:18 +0800 Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 12/28] KVM: TDX: WARN if mirror SPTE doesn't have full RWX when creating S-EPT mapping To: Sean Christopherson Cc: Marc Zyngier , Oliver Upton , Tianrui Zhao , Bibo Mao , Huacai Chen , Madhavan Srinivasan , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Paolo Bonzini , "Kirill A. Shutemov" , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, Ira Weiny , Kai Huang , Michael Roth , Yan Zhao , Vishal Annapurve , Rick Edgecombe , Ackerley Tng References: <20251030200951.3402865-1-seanjc@google.com> <20251030200951.3402865-13-seanjc@google.com> Content-Language: en-US From: Binbin Wu In-Reply-To: <20251030200951.3402865-13-seanjc@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 10/31/2025 4:09 AM, Sean Christopherson wrote: > Pass in the mirror_spte to kvm_x86_ops.set_external_spte() to provide > symmetry with .remove_external_spte(), and assert in TDX that the mirror > SPTE is shadow-present with full RWX permissions (the TDX-Module doesn't > allow the hypervisor to control protections). > > Signed-off-by: Sean Christopherson Reviewed-by: Binbin Wu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6C5CCCFA00 for ; Fri, 31 Oct 2025 08:20:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=krLhFh6zhKlVSicH5fJMHzoJ4ORGBmBI5RG/A2pqD7o=; b=Xf2fjA0gR+pYhF NIgCC7mTAw4Ur3AGZElL6o9LnM1bfm4tj/2aU6k50LQ/3vwbA4ieBJk6lQpFhIIXzKGaD0aoH4IL5 ZAzAOOLqLS2mMoHc+p+vKIlWuI9dVdoqFNIn41OOjF38tq9QdGJVxSqHf34NzznYT2tHCZJZ62pmB skXEDC3dkjAm+oFODKI1FghRJaZgSTqIPu8iDP639CfG7ZKVz5IDEbmh2mmESSUqcVDjUmc4WicOI dPaO3LCepkRiTqkaqp8NmZYadEheQTmFviOCEiXkxKGhIG2ydhGAVwBhvtgtm8lrD1cPaZq19mxp2 xHwiuOQY/sRkCcAZB17Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vEkMI-00000005d7X-0Uj2; Fri, 31 Oct 2025 08:19:42 +0000 Received: from mgamail.intel.com ([192.198.163.13]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vEkM9-00000005d3h-0ETg; Fri, 31 Oct 2025 08:19:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1761898773; x=1793434773; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=EzjqWFPbYzjEfpDteBcncRVxcsQvYXXWJGNfJY3z6Qw=; b=Uu01M07n5zKOlRjF7OzTzFGT5Rk4rSA/1L3VOjsCFftzEMEl+9nqIM2c m8V0YCCHUdhcYM+2dpKb/yJiVPS5okYFPQdWeX4lRnE25AJl4lT1Aj9Jz KcwLCtk8kCL2Qm5xd9YohjYMouNTX9zQ4S2WKjRfLAuF5hRVDJmz1W75p I/OTmTY371A0utoNQnA0c8LyLwqXKWwoOwK4gH/GAbceBAsm3anc2oV// Trm914ZmWlN+l3n0HJSeY7cV6iwOB9ejt9W5Qh578N9lXljPWT7fweVaE YF6wGX5TO/IUdfxKp6ebzHUyyDLWW1lMb24RL5n4wCWrkSZSRN5dCsOKI A==; X-CSE-ConnectionGUID: 8ZlWVh3VST2hI0G+0lWdgQ== X-CSE-MsgGUID: fpu2L7NTRxaeLwZkm/sQPA== X-IronPort-AV: E=McAfee;i="6800,10657,11598"; a="66666550" X-IronPort-AV: E=Sophos;i="6.19,268,1754982000"; d="scan'208";a="66666550" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2025 01:19:29 -0700 X-CSE-ConnectionGUID: ln37oo4sSVGgtPADrikf7g== X-CSE-MsgGUID: Cf3BSL1nT0KAv+tRtGKg6g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,268,1754982000"; d="scan'208";a="186112068" Received: from binbinwu-mobl.ccr.corp.intel.com (HELO [10.124.240.28]) ([10.124.240.28]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2025 01:19:22 -0700 Message-ID: Date: Fri, 31 Oct 2025 16:19:18 +0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 12/28] KVM: TDX: WARN if mirror SPTE doesn't have full RWX when creating S-EPT mapping To: Sean Christopherson Cc: Marc Zyngier , Oliver Upton , Tianrui Zhao , Bibo Mao , Huacai Chen , Madhavan Srinivasan , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Paolo Bonzini , "Kirill A. Shutemov" , linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvm@vger.kernel.org, loongarch@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, x86@kernel.org, linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, Ira Weiny , Kai Huang , Michael Roth , Yan Zhao , Vishal Annapurve , Rick Edgecombe , Ackerley Tng References: <20251030200951.3402865-1-seanjc@google.com> <20251030200951.3402865-13-seanjc@google.com> Content-Language: en-US From: Binbin Wu In-Reply-To: <20251030200951.3402865-13-seanjc@google.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251031_011933_146172_09E6D88B X-CRM114-Status: UNSURE ( 5.64 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On 10/31/2025 4:09 AM, Sean Christopherson wrote: > Pass in the mirror_spte to kvm_x86_ops.set_external_spte() to provide > symmetry with .remove_external_spte(), and assert in TDX that the mirror > SPTE is shadow-present with full RWX permissions (the TDX-Module doesn't > allow the hypervisor to control protections). > > Signed-off-by: Sean Christopherson Reviewed-by: Binbin Wu _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv