aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/uapi/asm/bootparam.h
diff options
context:
space:
mode:
authorRalf Ramsauer <ralf.ramsauer@oth-regensburg.de>2019-10-10 12:21:02 +0200
committerBorislav Petkov <bp@suse.de>2019-10-10 15:43:59 +0200
commit7a56b81c474619fa84c60d07eaa287c8fc33ac3c (patch)
treedf7e748700dc915ea388d6d9063366c6794ba123 /arch/x86/include/uapi/asm/bootparam.h
parentx86/jailhouse: Improve setup data version comparison (diff)
downloadlinux-dev-7a56b81c474619fa84c60d07eaa287c8fc33ac3c.tar.xz
linux-dev-7a56b81c474619fa84c60d07eaa287c8fc33ac3c.zip
x86/jailhouse: Only enable platform UARTs if available
ACPI tables aren't available if Linux runs as guest of the hypervisor Jailhouse. This makes the 8250 driver probe for all platform UARTs as it assumes that all UARTs are present in case of !ACPI. Jailhouse will stop execution of Linux guest due to port access violation. So far, these access violations were solved by tuning the 8250.nr_uarts cmdline parameter, but this has limitations: Only consecutive platform UARTs can be mapped to Linux, and only in the sequence 0x3f8, 0x2f8, 0x3e8, 0x2e8. Beginning from setup_data version 2, Jailhouse will place information of available platform UARTs in setup_data. This allows for selective activation of platform UARTs. Query setup_data version and only activate available UARTS. This patch comes with backward compatibility, and will still support older setup_data versions. In case of older setup_data versions, Linux falls back to the old behaviour. Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Baoquan He <bhe@redhat.com> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: jailhouse-dev@googlegroups.com Cc: Juergen Gross <jgross@suse.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: x86-ml <x86@kernel.org> Link: https://lkml.kernel.org/r/20191010102102.421035-3-ralf.ramsauer@oth-regensburg.de
Diffstat (limited to 'arch/x86/include/uapi/asm/bootparam.h')
-rw-r--r--arch/x86/include/uapi/asm/bootparam.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/include/uapi/asm/bootparam.h b/arch/x86/include/uapi/asm/bootparam.h
index 43be437c9c71..db1e24e56e94 100644
--- a/arch/x86/include/uapi/asm/bootparam.h
+++ b/arch/x86/include/uapi/asm/bootparam.h
@@ -152,6 +152,9 @@ struct jailhouse_setup_data {
__u8 standard_ioapic;
__u8 cpu_ids[255];
} __attribute__((packed)) v1;
+ struct {
+ __u32 flags;
+ } __attribute__((packed)) v2;
} __attribute__((packed));
/* The so-called "zeropage" */