I debug the rocky 8.7 kernel. (4.18.0-425.3.1.el8.x86_64 and 4.18.0-425.13.1.el8.x86_64)
And I have a question .
I think pv_mmu_ops structure reserved filed may exist for compatibility.
crash> struct pv_mmu_ops
struct pv_mmu_ops {
unsigned long (*read_cr2)(void);
void (*notify_page_enc_status_changed)(unsigned long, int, bool);
void (*write_cr2)(unsigned long);
unsigned long (*read_cr3)(void);
void (*write_cr3)(unsigned long);
void (*activate_mm)(struct mm_struct *, struct mm_struct *);
void (*dup_mmap)(struct mm_struct *, struct mm_struct *);
void (*exit_mmap)(struct mm_struct *);
void (*flush_tlb_user)(void);
void (*flush_tlb_kernel)(void);
void (*flush_tlb_one_user)(unsigned long);
void (*flush_tlb_others)(const struct cpumask *, const struct flush_tlb_info *);
void (*tlb_remove_table)(struct mmu_gather *, void *);
int (*pgd_alloc)(struct mm_struct *);
void (*pgd_free)(struct mm_struct *, pgd_t *);
void (*alloc_pte)(struct mm_struct *, unsigned long);
void (*alloc_pmd)(struct mm_struct *, unsigned long);
void (*alloc_pud)(struct mm_struct *, unsigned long);
void (*alloc_p4d)(struct mm_struct *, unsigned long);
void (*release_pte)(unsigned long);
void (*release_pmd)(unsigned long);
void (*release_pud)(unsigned long);
void (*release_p4d)(unsigned long);
void (*set_pte)(pte_t *, pte_t);
void (*set_pte_at)(struct mm_struct *, unsigned long, pte_t *, pte_t);
void (*set_pmd)(pmd_t *, pmd_t);
pte_t (*ptep_modify_prot_start)(struct vm_area_struct *, unsigned long, pte_t *);
void (*ptep_modify_prot_commit)(struct vm_area_struct *, unsigned long, pte_t *, pte_t);
struct paravirt_callee_save pte_val;
struct paravirt_callee_save make_pte;
struct paravirt_callee_save pgd_val;
struct paravirt_callee_save make_pgd;
void (*set_pud)(pud_t *, pud_t);
struct paravirt_callee_save pmd_val;
struct paravirt_callee_save make_pmd;
struct paravirt_callee_save pud_val;
struct paravirt_callee_save make_pud;
void (*set_p4d)(p4d_t *, p4d_t);
struct paravirt_callee_save p4d_val;
struct paravirt_callee_save make_p4d;
void (*set_pgd)(pgd_t *, pgd_t);
struct pv_lazy_ops lazy_mode;
void (*set_fixmap)(unsigned int, phys_addr_t, pgprot_t);
unsigned long rh_reserved1;
unsigned long rh_reserved2;
unsigned long rh_reserved3;
unsigned long rh_reserved4;
}
SIZE: 392
4.18.0-425.13.1.el8.x86_64
crash> struct pv_mmu_ops
struct pv_mmu_ops {
unsigned long (*read_cr2)(void);
void (*write_cr2)(unsigned long);
unsigned long (*read_cr3)(void);
void (*write_cr3)(unsigned long);
void (*activate_mm)(struct mm_struct *, struct mm_struct *);
void (*dup_mmap)(struct mm_struct *, struct mm_struct *);
void (*exit_mmap)(struct mm_struct *);
void (*flush_tlb_user)(void);
void (*flush_tlb_kernel)(void);
void (*flush_tlb_one_user)(unsigned long);
void (*flush_tlb_others)(const struct cpumask *, const struct flush_tlb_info *);
void (*tlb_remove_table)(struct mmu_gather *, void *);
int (*pgd_alloc)(struct mm_struct *);
void (*pgd_free)(struct mm_struct *, pgd_t *);
void (*alloc_pte)(struct mm_struct *, unsigned long);
void (*alloc_pmd)(struct mm_struct *, unsigned long);
void (*alloc_pud)(struct mm_struct *, unsigned long);
void (*alloc_p4d)(struct mm_struct *, unsigned long);
void (*release_pte)(unsigned long);
void (*release_pmd)(unsigned long);
void (*release_pud)(unsigned long);
void (*release_p4d)(unsigned long);
void (*set_pte)(pte_t *, pte_t);
void (*set_pte_at)(struct mm_struct *, unsigned long, pte_t *, pte_t);
void (*set_pmd)(pmd_t *, pmd_t);
pte_t (*ptep_modify_prot_start)(struct vm_area_struct *, unsigned long, pte_t *);
void (*ptep_modify_prot_commit)(struct vm_area_struct *, unsigned long, pte_t *, pte_t);
struct paravirt_callee_save pte_val;
struct paravirt_callee_save make_pte;
struct paravirt_callee_save pgd_val;
struct paravirt_callee_save make_pgd;
void (*set_pud)(pud_t *, pud_t);
struct paravirt_callee_save pmd_val;
struct paravirt_callee_save make_pmd;
struct paravirt_callee_save pud_val;
struct paravirt_callee_save make_pud;
void (*set_p4d)(p4d_t *, p4d_t);
struct paravirt_callee_save p4d_val;
struct paravirt_callee_save make_p4d;
void (*set_pgd)(pgd_t *, pgd_t);
struct pv_lazy_ops lazy_mode;
void (*set_fixmap)(unsigned int, phys_addr_t, pgprot_t);
union {
void (*notify_page_enc_status_changed)(unsigned long, int, bool);
struct {
unsigned long rh_reserved1;
} rh_kabi_hidden_308;
union {
<no data fields>
};
};
unsigned long rh_reserved2;
unsigned long rh_reserved3;
unsigned long rh_reserved4;
}
SIZE: 384
4.18.0-425.13.1.el8.x86_64