From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4467A3A4F50 for ; Mon, 1 Jun 2026 14:24:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780323873; cv=none; b=tHJpabeDvqrkpkE9jYkMHegFe+t5cRIolgU4JN0C6dqcMjG4RFVYmqGC3CiUJWwpD1yMDSP4BgvXHoEO/kWBhCEmQDWgCKK5D0g+RE0xC4zIefz7O/APTbslCEvh8CkDs9OTphM02I3E9o9ixnuLMQ6AQoab+4Yty1D+Lgqbw2w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780323873; c=relaxed/simple; bh=LV92VYjV6Qz4zqtIQI89lNEtCBsYv2pr5TpzqZga1Kw=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=DjWOHy9wKILyYtZSLDxeJ2QSAK8HhqN7CL/IEdHo9z8fJduLWxrxul3rOLArqpsBKd2xcO0tm7jQNOoaNqqK+PLfnqmSw3ZnDJCeNPbf1DidRVlncT92kKizWU/MEqRT5oJ39iHe8gOP6Nu2NT2WhaBpY2jPpEywGGVk3LAJan8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=DTWQbIq0; arc=none smtp.client-ip=209.85.214.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="DTWQbIq0" Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-2c0a81c1738so11777945ad.2 for ; Mon, 01 Jun 2026 07:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1780323871; x=1780928671; darn=vger.kernel.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=VmhRpZ8fkE8fPmVKF1pA/Lfu19TASa6X3/30/SzP5vA=; b=DTWQbIq0HX1SkehwykrCBC2k46YfLZYydQes4QG7/SYKtIFTaFshhvY2s6HqysmJsm giAPrpi4kch8WKJDgK3g6Fdt3Eu3LCptjIJQBWDLVoyMZjrmRwRyQkeEpXrifX4tdXNW NhQRcIIBPODTVzL4sF6BgNTL0WaKhP6+Mihf0FiTCX24v0QRBMvzM7At/4OsGEs8Bv2f CmTPvnDltgGlvHrLo6hjncfsWnCcTKWJoiPojKhR+T1W1JoW3Gj16seHUaGbwHG1GNKe SvCWVzK61DbRGRPgtulVHHgawPBo/Qd2vNtr1BkSEWXXLcTQvl8Wj60kG+EpCzBTNp96 30BQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780323871; x=1780928671; 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=VmhRpZ8fkE8fPmVKF1pA/Lfu19TASa6X3/30/SzP5vA=; b=WD1KL+TqHmfBZkasBasowQXdohWffiCF80sX83kdwIpGid5oUWXQtK+IZtq7B4ZMbn 5o5bFmI4LukPHBhwWJ9PrMQAoUNKjdKA7qqI51xKZPbDOOBucKlJMLwpHO1+gkWaT5eU CP2m8KM0kOpVN14Fg4gSlZLGzWKMsI5yUjeAsZShMdlTPeDNYFmF2KiNKV/bAtrkVSFE bQVVpjfEDgCC0T8mdrGg2/CF+hmCuL+7lMzy7niLovkomi+U9ZJd8qMielLCnC7EHyat pyXhuRtsqu4hZjorCidvc3G+EiOhgKtIqwJIrzg4chG7EQuD/bhVQPe+q82NDMiqpCrs z0PQ== X-Forwarded-Encrypted: i=1; AFNElJ8WBRbnCO/blGSc26MTvZ1PPXBhaO1yKji9RgnVcO1NWRzbbwqEeBYAI/jxm6lAGBU/iAeGHLD7rYFUXxE=@vger.kernel.org X-Gm-Message-State: AOJu0Yw8m7ypqqoe2dfpVGH+HvkZekr4WprBwNU9l/bhG3SRiAgC+V6e w16sK7tGh3nyWLHj4UJ2vTRIrzptDQW4B1FBSW+gyxczcY0SHVlcQY7sRk8kvvEnv3n8Q+BVUEF PMtxc5w== X-Received: from pgju13.prod.google.com ([2002:a63:f64d:0:b0:c76:6cef:34e7]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a21:7a4a:b0:398:78c0:6dca with SMTP id adf61e73a8af0-3b427eb09eemr11835863637.15.1780323871207; Mon, 01 Jun 2026 07:24:31 -0700 (PDT) Date: Mon, 1 Jun 2026 07:24:30 -0700 In-Reply-To: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260529222223.870923-1-seanjc@google.com> <20260529222223.870923-28-seanjc@google.com> Message-ID: Subject: Re: [PATCH v3 27/40] KVM: x86: Move register helper declarations from kvm_host.h => regs.h From: Sean Christopherson To: Yosry Ahmed Cc: Paolo Bonzini , Vitaly Kuznetsov , David Woodhouse , Paul Durrant , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Binbin Wu , David Woodhouse , Kai Huang Content-Type: text/plain; charset="us-ascii" On Sat, May 30, 2026, Yosry Ahmed wrote: > On Fri, May 29, 2026 at 03:22:10PM -0700, Sean Christopherson wrote: > > Relocate declarations of Control/Debug Register, EFLAGS and RIP helpers > > from x86's kvm_host.h to regs.h, to continue trimming down kvm_host.h. > > > > No functional change intended. > > > > Signed-off-by: Sean Christopherson > > --- > > arch/x86/include/asm/kvm_host.h | 17 ----------------- > > arch/x86/kvm/regs.h | 17 +++++++++++++++++ > > 2 files changed, 17 insertions(+), 17 deletions(-) > > > > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h > > index 19091d89d3cc..0f4b16b26a27 100644 > > --- a/arch/x86/include/asm/kvm_host.h > > +++ b/arch/x86/include/asm/kvm_host.h > > @@ -2186,8 +2186,6 @@ void kvm_mmu_invalidate_mmio_sptes(struct kvm *kvm, u64 gen); > > void kvm_mmu_change_mmu_pages(struct kvm *kvm, unsigned long kvm_nr_mmu_pages); > > void kvm_zap_gfn_range(struct kvm *kvm, gfn_t gfn_start, gfn_t gfn_end); > > > > -int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3); > > Why are pdptrs helpers bundled with register helpers? Page Directory Pointer Table Registers ^^^^^^^^^ Or as the SDM initially describes them, "5.4.1 PDPTE Registers". When using PAE paging (not 64-bit paging), they really are CPU registers, and their lifecycle is tied to CR{0,3,4}. I.e. I was thinking of them as an extension of Control Registers. I can explicitly call that out in the changelog?