Skip to content

Commit

Permalink
KABI: Init reservation for x86 arch
Browse files Browse the repository at this point in the history
Init reservation for x86 arch

Link: #59
Signed-off-by: Lugang He <helugang@uniontech.com>
Signed-off-by: WangYuli <wangyuli@uniontech.com>
  • Loading branch information
Avenger-285714 committed Aug 28, 2024
1 parent 7a11a39 commit 4c848c3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions arch/x86/include/asm/paravirt_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ struct paravirt_patch_site {
#include <asm/pgtable_types.h>
#include <asm/nospec-branch.h>

#include <linux/deepin_kabi.h>

struct page;
struct thread_struct;
struct desc_ptr;
Expand Down Expand Up @@ -133,6 +135,9 @@ struct pv_irq_ops {

void (*safe_halt)(void);
void (*halt)(void);

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
#endif
} __no_randomize_layout;

Expand Down Expand Up @@ -217,6 +222,11 @@ struct pv_mmu_ops {
an mfn. We can tell which is which from the index. */
void (*set_fixmap)(unsigned /* enum fixed_addresses */ idx,
phys_addr_t phys, pgprot_t flags);

DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
DEEPIN_KABI_RESERVE(3)
DEEPIN_KABI_RESERVE(4)
#endif
} __no_randomize_layout;

Expand All @@ -235,6 +245,8 @@ struct pv_lock_ops {
void (*kick)(int cpu);

struct paravirt_callee_save vcpu_is_preempted;

DEEPIN_KABI_RESERVE(1)
} __no_randomize_layout;

/* This contains all the paravirt structures: we get a convenient
Expand Down
3 changes: 3 additions & 0 deletions arch/x86/include/asm/thread_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define _ASM_X86_THREAD_INFO_H

#include <linux/compiler.h>
#include <linux/deepin_kabi.h>
#include <asm/page.h>
#include <asm/percpu.h>
#include <asm/types.h>
Expand Down Expand Up @@ -60,6 +61,8 @@ struct thread_info {
#ifdef CONFIG_SMP
u32 cpu; /* current CPU */
#endif
DEEPIN_KABI_RESERVE(1)
DEEPIN_KABI_RESERVE(2)
};

#define INIT_THREAD_INFO(tsk) \
Expand Down

0 comments on commit 4c848c3

Please sign in to comment.