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 53FE4CCD1BE for ; Thu, 23 Oct 2025 15:00:21 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=XiZu50CVCGAqSa/+0IGcuRmQu/4+b7Ncxtbzhy3Iuj0=; b=WbNC6uEbOEqt8sjVNZPdxSLbN3 sa7ZNCuEY5fzqneaCEful2mQWZuj/GaPzITs21H1rgyAuMK1sXvKflPswGEAX1sH9YSM7afTUzChs M533W8Gb5qftHGS75vugmFrA4iwZunkLRdebwa5Y9U1svGwBnOhxUmQaLBXDM4WdF1hPdv8Q2tNMd pg6tVOEOaBXipb2YnBiBhJfIkdUlP27UKxQ5NoAqficZIOoKfqBbarNrQEtX4DH9NFKRBdsjeouBA rI87d4amWTWcC/BSZWvdIM6I9ypyW3MMsfxsS37bkENs3CoYoPsRExLMrQ9bcE1y5Vp9wBpf/+4Dz uKgc4iLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBwnO-00000006fwj-3Gx1; Thu, 23 Oct 2025 15:00:06 +0000 Received: from mail-pj1-x1049.google.com ([2607:f8b0:4864:20::1049]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vBwnJ-00000006frg-0sy3 for linux-riscv@lists.infradead.org; Thu, 23 Oct 2025 15:00:02 +0000 Received: by mail-pj1-x1049.google.com with SMTP id 98e67ed59e1d1-33bdd0479a9so1063396a91.2 for ; Thu, 23 Oct 2025 08:00:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1761231600; x=1761836400; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=DsY3zzD8XUrRiTLyLBawfwaQI9/sErmot+/rfYHcY0U=; b=pUu7C0wm8usAkABHUsEGECuCRq2+KlQkIzDXul1G9xEE83cE9f8Gm3pvHjxL4dDTzu jPNA7VzZvkDX/LtNDA/fupJGU08+2RRSolNnTuKwjuW1D7dLltNo2HGAyUam3U7Fa9/L DjyY6GoqDnyF1b8GzJ83aLOetFQSfmC/qjjT1pSWE7l1cpFyYM9Q3no6BVCD5EmWa2lI 2hW+5tFi/ZBHY0yr1vhYPTr7J3yS1e47Mkg0X1iMFL5DlzDCq/eohNoDNqseFKgZ+Fa1 dd84uuRNX2DRI7QbnyyhZkH/Lyi3/D4NFay2NNOcOuyPlRxobkbOAYQjMboxM0lMzxFj ZJkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761231600; x=1761836400; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=DsY3zzD8XUrRiTLyLBawfwaQI9/sErmot+/rfYHcY0U=; b=Ct1LaWx9Zo39zAhFPyA+63IBAYqlRbfLQDGxqMcoYg2xFIpu7Q+c7VJl2ilskF96EP +9bGJsZBd8utrxu31ZzyOZOVEF7F5FX6Qlh0+ExPBHJRPGOiOpmzJOfJa60ErCbzyvVx 4CpyaDyEqNj3e+va78QFMl5It3sAp8XeZ2gebxPwH3f18Vi4p0AAZpK4bexdLdvamBS6 YKmSPm4haOHvSbcgY77bsiPu7dBO8FN6DgitsKweIqIB+2/aBbYvmd9bpCQXPcG/B9NM 0DqfDW7iLVFT8A6rzJa9STzjVv6d8NSTDwDT663ONWpz4qDgibIK0E2BTZ9yEa+GFxat 6oEA== X-Forwarded-Encrypted: i=1; AJvYcCVZzPlQ8Oh99jOO3EB/BwGhRB56temQR8yWRBcE1q3M5WQKRc8pulRx7oXvw8xC813AymuWYNZZlcM0Nw==@lists.infradead.org X-Gm-Message-State: AOJu0Yy5yo6ybuo9cNp/hINBNibzwAdzMgRBjRipVR+QIPUdGCyXTJ2g 1B5ztJ2gjTKN3YBLK+nAuWi1ZF7K8+pC1g5Ie2snfFdkay+7Y4Kg9mKaLLBYytzp0LvDwCV6Irr luPOyTw== X-Google-Smtp-Source: AGHT+IGIKST/5gTXkhLeNb6+zo5OEJ6E7Tz0ILKzp1TDg+5uVro2JJ+z5T3UkH4GmCDPjUQAuY2o81CumRA= X-Received: from pjbsp15.prod.google.com ([2002:a17:90b:52cf:b0:330:a006:a384]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:5291:b0:32e:859:c79 with SMTP id 98e67ed59e1d1-33bcec1ab25mr31136898a91.0.1761231599767; Thu, 23 Oct 2025 07:59:59 -0700 (PDT) Date: Thu, 23 Oct 2025 07:59:58 -0700 In-Reply-To: <28136b62074550826efa3f57b1f7be07f571abdc.camel@intel.com> Mime-Version: 1.0 References: <20251017003244.186495-1-seanjc@google.com> <20251017003244.186495-10-seanjc@google.com> <28136b62074550826efa3f57b1f7be07f571abdc.camel@intel.com> Message-ID: Subject: Re: [PATCH v3 09/25] KVM: TDX: Fold tdx_sept_drop_private_spte() into tdx_sept_remove_private_spte() From: Sean Christopherson To: Kai Huang Cc: "chenhuacai@kernel.org" , "frankja@linux.ibm.com" , "maz@kernel.org" , "borntraeger@linux.ibm.com" , "pjw@kernel.org" , "aou@eecs.berkeley.edu" , "kas@kernel.org" , "maobibo@loongson.cn" , "pbonzini@redhat.com" , "maddy@linux.ibm.com" , "palmer@dabbelt.com" , "imbrenda@linux.ibm.com" , "zhaotianrui@loongson.cn" , "anup@brainfault.org" , "oliver.upton@linux.dev" , "kvm@vger.kernel.org" , "linux-coco@lists.linux.dev" , Yan Y Zhao , "michael.roth@amd.com" , "linux-kernel@vger.kernel.org" , Ira Weiny , "loongarch@lists.linux.dev" , "binbin.wu@linux.intel.com" , "ackerleytng@google.com" , "kvmarm@lists.linux.dev" , "kvm-riscv@lists.infradead.org" , Vishal Annapurve , "linuxppc-dev@lists.ozlabs.org" , Rick P Edgecombe , "linux-mips@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-riscv@lists.infradead.org" , "x86@kernel.org" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251023_080001_258870_36D4CF56 X-CRM114-Status: UNSURE ( 9.85 ) 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Thu, Oct 23, 2025, Kai Huang wrote: > On Thu, 2025-10-16 at 17:32 -0700, Sean Christopherson wrote: > > Fold tdx_sept_drop_private_spte() into tdx_sept_remove_private_spte() to > > avoid having to differnatiate between "zap", "drop", and "remove", and to > ^ > differentiate > > Nit: it's a wee bit confusing that you mentioned "zap", because after this > patch tdx_sept_zap_private_spte() is still there. But it may be only me > feeling that way. Hmm, yeah, I agree that's a confusing/misleading. How about this? KVM: TDX: Fold tdx_sept_drop_private_spte() into tdx_sept_remove_private_spte() Fold tdx_sept_drop_private_spte() into tdx_sept_remove_private_spte() as a step towards having "remove" be the only and only function that deals with removing/zapping/dropping a SPTE, e.g. to avoid having to differentiate between "zap", "drop", and "remove". Eliminating the "drop" helper also gets rid of what is effectively dead code due to redundant checks, e.g. on an HKID being assigned. No functional change intended. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv