mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
arm/x86/common: Add HAS_[ALTERNATIVE|EX_TABLE]
x86 implements all of them by default - and we just add two extra HAS_ variables to be declared in autoconf.h. ARM 64 only has alternative while ARM 32 has none of them. And while at it change the livepatch common code that would benefit from this. Reviewed-by: Julien Grall <julien.grall@arm.com> Reviewed-by: Ross Lagerwall <ross.lagerwall@citrix.com> Acked-by: Jan Beulich <jbeulich@suse.com> [relevant parts] Suggested-by: Julien Grall <julien.grall@arm.com> Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
This commit is contained in:
1 parent
4ca0122c53
commit
44db782fd2
4 files changed
+11
-4
No files matched your search
@@ -45,9 +45,6 @@ config ACPI
|
||||
config HAS_GICV3
|
||||
bool
|
||||
|
||||
config HAS_ALTERNATIVE
|
||||
bool
|
||||
|
||||
endmenu
|
||||
|
||||
menu "ARM errata workaround via the alternative framework"
|
||||
|
||||
@@ -7,8 +7,10 @@ config X86
|
||||
select ACPI_LEGACY_TABLES_LOOKUP
|
||||
select COMPAT
|
||||
select CORE_PARKING
|
||||
select HAS_ALTERNATIVE
|
||||
select HAS_CPUFREQ
|
||||
select HAS_EHCI
|
||||
select HAS_EX_TABLE
|
||||
select HAS_GDBSX
|
||||
select HAS_IOPORTS
|
||||
select HAS_KEXEC
|
||||
|
||||
@@ -11,9 +11,15 @@ config COMPAT
|
||||
config CORE_PARKING
|
||||
bool
|
||||
|
||||
config HAS_ALTERNATIVE
|
||||
bool
|
||||
|
||||
config HAS_DEVICE_TREE
|
||||
bool
|
||||
|
||||
config HAS_EX_TABLE
|
||||
bool
|
||||
|
||||
config HAS_MEM_ACCESS
|
||||
bool
|
||||
|
||||
|
||||
@@ -641,7 +641,7 @@ static int prepare_payload(struct payload *payload,
|
||||
sizeof(*region->frame[i].bugs);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_ARM
|
||||
#ifdef CONFIG_HAS_ALTERNATIVE
|
||||
sec = livepatch_elf_sec_by_name(elf, ".altinstructions");
|
||||
if ( sec )
|
||||
{
|
||||
@@ -672,7 +672,9 @@ static int prepare_payload(struct payload *payload,
|
||||
}
|
||||
apply_alternatives(start, end);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_HAS_EX_TABLE
|
||||
sec = livepatch_elf_sec_by_name(elf, ".ex_table");
|
||||
if ( sec )
|
||||
{
|
||||
|
||||