All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	 Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
	 Binbin Wu <binbin.wu@linux.intel.com>,
	Kai Huang <kai.huang@intel.com>
Subject: [PATCH 1/9] KVM: x86: Move the "APIC attention" macros from kvm_host.h => lapic.c
Date: Thu, 25 Jun 2026 15:04:42 -0700	[thread overview]
Message-ID: <20260625220450.3354415-2-seanjc@google.com> (raw)
In-Reply-To: <20260625220450.3354415-1-seanjc@google.com>

Move the macros that define the mostly-obsolete apic_attention bits into
lapic.c, as the gory details of PV EOIs and the pre-APICv TPR acceleration
are 100% internal to KVM's local APIC emulation.

No functional change intended.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 arch/x86/include/asm/kvm_host.h | 10 ----------
 arch/x86/kvm/lapic.c            | 10 ++++++++++
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index b517257a6315..9ba8aa739f93 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -290,16 +290,6 @@ enum x86_intercept_stage;
 #define PFERR_PRIVATE_ACCESS   BIT_ULL(49)
 #define PFERR_SYNTHETIC_MASK   (PFERR_IMPLICIT_ACCESS | PFERR_PRIVATE_ACCESS)
 
-/* apic attention bits */
-#define KVM_APIC_CHECK_VAPIC	0
-/*
- * The following bit is set with PV-EOI, unset on EOI.
- * We detect PV-EOI changes by guest by comparing
- * this bit with PV-EOI in guest memory.
- * See the implementation in apic_update_pv_eoi.
- */
-#define KVM_APIC_PV_EOI_PENDING	1
-
 struct kvm_kernel_irqfd;
 struct kvm_kernel_irq_routing_entry;
 
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 6f30bbdddb5a..0354db0f2c0f 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -75,6 +75,16 @@ module_param(lapic_timer_advance, bool, 0444);
 /* step-by-step approximation to mitigate fluctuation */
 #define LAPIC_TIMER_ADVANCE_ADJUST_STEP 8
 
+/* apic attention bits */
+#define KVM_APIC_CHECK_VAPIC	0
+/*
+ * The following bit is set with PV-EOI, unset on EOI.
+ * We detect PV-EOI changes by guest by comparing
+ * this bit with PV-EOI in guest memory.
+ * See the implementation in apic_update_pv_eoi.
+ */
+#define KVM_APIC_PV_EOI_PENDING	1
+
 static bool __read_mostly vector_hashing_enabled = true;
 module_param_named(vector_hashing, vector_hashing_enabled, bool, 0444);
 
-- 
2.55.0.rc0.799.gd6f94ed593-goog


  reply	other threads:[~2026-06-25 22:04 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25 22:04 [PATCH 0/9] KVM: x86: Spring cleaning, part 2 Sean Christopherson
2026-06-25 22:04 ` Sean Christopherson [this message]
2026-06-26  0:10   ` [PATCH 1/9] KVM: x86: Move the "APIC attention" macros from kvm_host.h => lapic.c Huang, Kai
2026-06-26 14:36     ` Sean Christopherson
2026-06-25 22:04 ` [PATCH 2/9] KVM: x86/mmu: Annotate tdp_enabled as being read-mostly Sean Christopherson
2026-06-26  0:14   ` Huang, Kai
2026-06-25 22:04 ` [PATCH 3/9] KVM: x86: Pluralize the macro guard name for msrs.h Sean Christopherson
2026-06-26  0:14   ` Huang, Kai
2026-06-25 22:04 ` [PATCH 4/9] KVM: x86: Move CR and DR macro definitions from kvm_host.h => regs.h Sean Christopherson
2026-06-26  0:37   ` Huang, Kai
2026-06-25 22:04 ` [PATCH 5/9] KVM: x86: Move KVM_GUESTDBG_VALID_MASK from kvm_host.h => x86.c Sean Christopherson
2026-06-26  0:38   ` Huang, Kai
2026-06-25 22:04 ` [PATCH 6/9] KVM: x86: Add static asserts to document connection b/w TSS structs and macros Sean Christopherson
2026-06-26  0:43   ` Huang, Kai
2026-06-25 22:04 ` [PATCH 7/9] KVM: x86: Move KVM's arbitrary task switch reason enums to x86.h Sean Christopherson
2026-06-26  0:46   ` Huang, Kai
2026-06-25 22:04 ` [PATCH 8/9] KVM: x86: Move "struct kvm_apic_map" definition from kvm_host.h => lapic.h Sean Christopherson
2026-06-26  0:50   ` Huang, Kai
2026-06-25 22:04 ` [PATCH 9/9] KVM: x86: Move "struct kvm_vcpu_hv" and all children from kvm_host.h => hyperv.h Sean Christopherson
2026-06-26  0:57   ` Huang, Kai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260625220450.3354415-2-seanjc@google.com \
    --to=seanjc@google.com \
    --cc=binbin.wu@linux.intel.com \
    --cc=kai.huang@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.