This patch introduces a new macro/function that informs a paravirt guest when its page table is not more in use, and can be released. In case we're not paravirt, just do nothing. Signed-off-by: Glauber de Oliveira Costa <[email protected]> Signed-off-by: Steven Rostedt <[email protected]> --- include/asm-x86_64/pgalloc.h | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/include/asm-x86_64/pgalloc.h b/include/asm-x86_64/pgalloc.h index b467be6..dbe1267 100644 --- a/include/asm-x86_64/pgalloc.h +++ b/include/asm-x86_64/pgalloc.h @@ -9,6 +9,12 @@ #define QUICK_PGD 0 /* We preserve special mappings over free */ #define QUICK_PT 1 /* Other page table pages that are zero on free */ +#ifdef CONFIG_PARAVIRT +#include <asm/paravirt.h> +#else +#define paravirt_release_pgd(pgd) do { } while (0) +#endif + #define pmd_populate_kernel(mm, pmd, pte) \ set_pmd(pmd, __pmd(_PAGE_TABLE | __pa(pte))) #define pud_populate(mm, pud, pmd) \ @@ -100,6 +106,7 @@ static inline pgd_t *pgd_alloc(struct mm_struct *mm) static inline void pgd_free(pgd_t *pgd) { BUG_ON((unsigned long)pgd & (PAGE_SIZE-1)); + paravirt_release_pgd(pgd); quicklist_free(QUICK_PGD, pgd_dtor, pgd); } -- 1.4.4.2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- [PATCH 18/25 -v2] turn priviled operations into macros in entry.S
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 18/25 -v2] turn priviled operations into macros in entry.S
- References:
- [PATCH 0/25 -v2] paravirt_ops for x86_64, second round
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 1/25 -v2] header file move
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 2/25 -v2] tlb flushing routines
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 3/25 -v2] irq_flags / halt routines
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 4/25 -v2] Add debugreg/load_rsp native hooks
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 5/25 -v2] native versions for system.h functions
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 6/25 -v2] add native_apic read and write functions, as well as boot clocks ones
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 7/25 -v2] interrupt related native paravirt functions.
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 8/25 -v2] use macro for sti/cli in spinlock definitions
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 9/25 -v2] report ring kernel is running without paravirt
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 10/25 -v2] export math_state_restore
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 11/25 -v2] native versions for set pagetables
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 12/25 -v2] turn msr.h functions into native versions
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 13/25 -v2] add native functions for descriptors handling
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 14/25 -v2] get rid of inline asm for load_cr3
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 15/25 -v2] introducing paravirt_activate_mm
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 16/25 -v2] turn page operations into native versions
- From: Glauber de Oliveira Costa <[email protected]>
- [PATCH 0/25 -v2] paravirt_ops for x86_64, second round
- Prev by Date: [PATCH 22/25 -v2] turn priviled operation into a macro
- Next by Date: [PATCH 15/25 -v2] introducing paravirt_activate_mm
- Previous by thread: [PATCH 16/25 -v2] turn page operations into native versions
- Next by thread: [PATCH 18/25 -v2] turn priviled operations into macros in entry.S
- Index(es):