[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging] x86/HVM: get_pat_flags() is needed only by shadow code
commit 157c693e9a488fe125ffe7adfb807b783a7d1757 Author: Jan Beulich <jbeulich@xxxxxxxx> AuthorDate: Wed Jul 31 12:40:19 2024 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Wed Jul 31 12:40:19 2024 +0200 x86/HVM: get_pat_flags() is needed only by shadow code Therefore with SHADOW_PAGING=n this is better compiled out, to avoid leaving around unreachable/dead code. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx> Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- xen/arch/x86/hvm/mtrr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/arch/x86/hvm/mtrr.c b/xen/arch/x86/hvm/mtrr.c index 4620ed427c..797f2ae7fd 100644 --- a/xen/arch/x86/hvm/mtrr.c +++ b/xen/arch/x86/hvm/mtrr.c @@ -271,6 +271,8 @@ int mtrr_get_type(const struct mtrr_state *m, paddr_t pa, unsigned int order) return overlap_mtrr_pos; } +#ifdef CONFIG_SHADOW_PAGING + /* * return the memory type from PAT. * NOTE: valid only when paging is enabled. @@ -359,6 +361,8 @@ uint32_t get_pat_flags(struct vcpu *v, return pat_type_2_pte_flags(pat_entry_value); } +#endif /* CONFIG_SHADOW_PAGING */ + static inline bool valid_mtrr_type(uint8_t type) { switch ( type ) -- generated by git-patchbot for /home/xen/git/xen.git#staging
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |