* [PATCH] KVM: x86/mmu: Include mmu.h in spte.h
@ 2023-08-08 22:40 Sean Christopherson
2023-08-25 19:01 ` Sean Christopherson
0 siblings, 1 reply; 2+ messages in thread
From: Sean Christopherson @ 2023-08-08 22:40 UTC (permalink / raw)
To: Sean Christopherson, Paolo Bonzini; +Cc: kvm, linux-kernel
Explicitly include mmu.h in spte.h instead of relying on the "parent" to
include mmu.h. spte.h references a variety of macros and variables that
are defined/declared in mmu.h, and so including spte.h before (or instead
of) mmu.h will result in build errors, e.g.
arch/x86/kvm/mmu/spte.h: In function ‘is_mmio_spte’:
arch/x86/kvm/mmu/spte.h:242:23: error: ‘enable_mmio_caching’ undeclared
242 | likely(enable_mmio_caching);
| ^~~~~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/spte.h: In function ‘is_large_pte’:
arch/x86/kvm/mmu/spte.h:302:22: error: ‘PT_PAGE_SIZE_MASK’ undeclared
302 | return pte & PT_PAGE_SIZE_MASK;
| ^~~~~~~~~~~~~~~~~
arch/x86/kvm/mmu/spte.h: In function ‘is_dirty_spte’:
arch/x86/kvm/mmu/spte.h:332:56: error: ‘PT_WRITABLE_MASK’ undeclared
332 | return dirty_mask ? spte & dirty_mask : spte & PT_WRITABLE_MASK;
| ^~~~~~~~~~~~~~~~
Fixes: 5a9624affe7c ("KVM: mmu: extract spte.h and spte.c")
Signed-off-by: Sean Christopherson <seanjc@google.com>
---
arch/x86/kvm/mmu/spte.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kvm/mmu/spte.h b/arch/x86/kvm/mmu/spte.h
index 83e6614f3720..6215f4c60ed5 100644
--- a/arch/x86/kvm/mmu/spte.h
+++ b/arch/x86/kvm/mmu/spte.h
@@ -3,6 +3,7 @@
#ifndef KVM_X86_MMU_SPTE_H
#define KVM_X86_MMU_SPTE_H
+#include "mmu.h"
#include "mmu_internal.h"
/*
base-commit: 240f736891887939571854bd6d734b6c9291f22e
--
2.41.0.640.ga95def55d0-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: x86/mmu: Include mmu.h in spte.h
2023-08-08 22:40 [PATCH] KVM: x86/mmu: Include mmu.h in spte.h Sean Christopherson
@ 2023-08-25 19:01 ` Sean Christopherson
0 siblings, 0 replies; 2+ messages in thread
From: Sean Christopherson @ 2023-08-25 19:01 UTC (permalink / raw)
To: Sean Christopherson, Paolo Bonzini; +Cc: kvm, linux-kernel
On Tue, 08 Aug 2023 15:40:59 -0700, Sean Christopherson wrote:
> Explicitly include mmu.h in spte.h instead of relying on the "parent" to
> include mmu.h. spte.h references a variety of macros and variables that
> are defined/declared in mmu.h, and so including spte.h before (or instead
> of) mmu.h will result in build errors, e.g.
>
> arch/x86/kvm/mmu/spte.h: In function ‘is_mmio_spte’:
> arch/x86/kvm/mmu/spte.h:242:23: error: ‘enable_mmio_caching’ undeclared
> 242 | likely(enable_mmio_caching);
> | ^~~~~~~~~~~~~~~~~~~
>
> [...]
Applied to kvm-x86 mmu, thanks!
[1/1] KVM: x86/mmu: Include mmu.h in spte.h
https://github.com/kvm-x86/linux/commit/bfd926291c58
--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-25 19:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-08 22:40 [PATCH] KVM: x86/mmu: Include mmu.h in spte.h Sean Christopherson
2023-08-25 19:01 ` Sean Christopherson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).