Skip to content

Commit 09230b7

Browse files
kirylIngo Molnar
authored andcommitted
x86/paravirt: Restrict PARAVIRT_XXL to 64-bit only
PARAVIRT_XXL is exclusively utilized by XEN_PV, which is only compatible with 64-bit machines. Clearly designate PARAVIRT_XXL as 64-bit only and remove ifdefs to support CONFIG_PGTABLE_LEVELS < 5. Signed-off-by: Kirill A. Shutemov <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Cc: Dave Hansen <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Linus Torvalds <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 7212b58 commit 09230b7

File tree

4 files changed

+1
-8
lines changed

4 files changed

+1
-8
lines changed

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,7 @@ config PARAVIRT
799799

800800
config PARAVIRT_XXL
801801
bool
802+
depends on X86_64
802803

803804
config PARAVIRT_DEBUG
804805
bool "paravirt-ops debugging"

arch/x86/include/asm/paravirt.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,6 @@ static inline void set_p4d(p4d_t *p4dp, p4d_t p4d)
463463
PVOP_VCALL2(mmu.set_p4d, p4dp, val);
464464
}
465465

466-
#if CONFIG_PGTABLE_LEVELS >= 5
467-
468466
static inline p4d_t __p4d(p4dval_t val)
469467
{
470468
p4dval_t ret = PVOP_ALT_CALLEE1(p4dval_t, mmu.make_p4d, val,
@@ -496,8 +494,6 @@ static inline void __set_pgd(pgd_t *pgdp, pgd_t pgd)
496494
set_pgd(pgdp, native_make_pgd(0)); \
497495
} while (0)
498496

499-
#endif /* CONFIG_PGTABLE_LEVELS == 5 */
500-
501497
static inline void p4d_clear(p4d_t *p4dp)
502498
{
503499
set_p4d(p4dp, native_make_p4d(0));

arch/x86/include/asm/paravirt_types.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,12 +189,10 @@ struct pv_mmu_ops {
189189

190190
void (*set_p4d)(p4d_t *p4dp, p4d_t p4dval);
191191

192-
#if CONFIG_PGTABLE_LEVELS >= 5
193192
struct paravirt_callee_save p4d_val;
194193
struct paravirt_callee_save make_p4d;
195194

196195
void (*set_pgd)(pgd_t *pgdp, pgd_t pgdval);
197-
#endif /* CONFIG_PGTABLE_LEVELS >= 5 */
198196

199197
struct pv_lazy_ops lazy_mode;
200198

arch/x86/kernel/paravirt.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,10 @@ struct paravirt_patch_template pv_ops = {
211211

212212
.mmu.set_p4d = native_set_p4d,
213213

214-
#if CONFIG_PGTABLE_LEVELS >= 5
215214
.mmu.p4d_val = PTE_IDENT,
216215
.mmu.make_p4d = PTE_IDENT,
217216

218217
.mmu.set_pgd = native_set_pgd,
219-
#endif /* CONFIG_PGTABLE_LEVELS >= 5 */
220218

221219
.mmu.pte_val = PTE_IDENT,
222220
.mmu.pgd_val = PTE_IDENT,

0 commit comments

Comments
 (0)