-----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRTLbB6QfY48x44uB6AXGG7T9hjvgUCXdtnVQAKCRCAXGG7T9hj
 vg1hAQDqG1DKZvR6BtlvETFMz7ZlrXVkpm6C74Wy4bLiO5KSSAEAneFbrDwFVa0c
 d05Z6wemjlyEd7u3gkVQBKfHkbWBRQQ=
 =aDIL
 -----END PGP SIGNATURE-----

Merge tag 'for-linus-5.5a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen updates from Juergen Gross:

 - a small series to remove the build constraint of Xen x86 MCE handling
   to 64-bit only

 - a bunch of minor cleanups

* tag 'for-linus-5.5a-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen: Fix Kconfig indentation
  xen/mcelog: also allow building for 32-bit kernels
  xen/mcelog: add PPIN to record when available
  xen/mcelog: drop __MC_MSR_MCGCAP
  xen/gntdev: Use select for DMA_SHARED_BUFFER
  xen: mm: make xen_mm_init static
  xen: mm: include <xen/xen-ops.h> for missing declarations
This commit is contained in:
Linus Torvalds 2019-11-25 17:45:31 -08:00
Родитель 2981dcf333 23c1cce9f3
Коммит 3f3c8be973
5 изменённых файлов: 56 добавлений и 36 удалений

Просмотреть файл

@ -15,6 +15,7 @@
#include <xen/interface/grant_table.h> #include <xen/interface/grant_table.h>
#include <xen/interface/memory.h> #include <xen/interface/memory.h>
#include <xen/page.h> #include <xen/page.h>
#include <xen/xen-ops.h>
#include <xen/swiotlb-xen.h> #include <xen/swiotlb-xen.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
@ -133,7 +134,7 @@ void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order)
return; return;
} }
int __init xen_mm_init(void) static int __init xen_mm_init(void)
{ {
struct gnttab_cache_flush cflush; struct gnttab_cache_flush cflush;
if (!xen_initial_domain()) if (!xen_initial_domain())

Просмотреть файл

@ -409,6 +409,8 @@
#define MSR_AMD_PSTATE_DEF_BASE 0xc0010064 #define MSR_AMD_PSTATE_DEF_BASE 0xc0010064
#define MSR_AMD64_OSVW_ID_LENGTH 0xc0010140 #define MSR_AMD64_OSVW_ID_LENGTH 0xc0010140
#define MSR_AMD64_OSVW_STATUS 0xc0010141 #define MSR_AMD64_OSVW_STATUS 0xc0010141
#define MSR_AMD_PPIN_CTL 0xc00102f0
#define MSR_AMD_PPIN 0xc00102f1
#define MSR_AMD64_LS_CFG 0xc0011020 #define MSR_AMD64_LS_CFG 0xc0011020
#define MSR_AMD64_DC_CFG 0xc0011022 #define MSR_AMD64_DC_CFG 0xc0011022
#define MSR_AMD64_BU_CFG2 0xc001102a #define MSR_AMD64_BU_CFG2 0xc001102a

Просмотреть файл

@ -106,27 +106,27 @@ config XENFS
If in doubt, say yes. If in doubt, say yes.
config XEN_COMPAT_XENFS config XEN_COMPAT_XENFS
bool "Create compatibility mount point /proc/xen" bool "Create compatibility mount point /proc/xen"
depends on XENFS depends on XENFS
default y default y
help help
The old xenstore userspace tools expect to find "xenbus" The old xenstore userspace tools expect to find "xenbus"
under /proc/xen, but "xenbus" is now found at the root of the under /proc/xen, but "xenbus" is now found at the root of the
xenfs filesystem. Selecting this causes the kernel to create xenfs filesystem. Selecting this causes the kernel to create
the compatibility mount point /proc/xen if it is running on the compatibility mount point /proc/xen if it is running on
a xen platform. a xen platform.
If in doubt, say yes. If in doubt, say yes.
config XEN_SYS_HYPERVISOR config XEN_SYS_HYPERVISOR
bool "Create xen entries under /sys/hypervisor" bool "Create xen entries under /sys/hypervisor"
depends on SYSFS depends on SYSFS
select SYS_HYPERVISOR select SYS_HYPERVISOR
default y default y
help help
Create entries under /sys/hypervisor describing the Xen Create entries under /sys/hypervisor describing the Xen
hypervisor environment. When running native or in another hypervisor environment. When running native or in another
virtual environment, /sys/hypervisor will still be present, virtual environment, /sys/hypervisor will still be present,
but will have no xen contents. but will have no xen contents.
config XEN_XENBUS_FRONTEND config XEN_XENBUS_FRONTEND
tristate tristate
@ -141,7 +141,8 @@ config XEN_GNTDEV
config XEN_GNTDEV_DMABUF config XEN_GNTDEV_DMABUF
bool "Add support for dma-buf grant access device driver extension" bool "Add support for dma-buf grant access device driver extension"
depends on XEN_GNTDEV && XEN_GRANT_DMA_ALLOC && DMA_SHARED_BUFFER depends on XEN_GNTDEV && XEN_GRANT_DMA_ALLOC
select DMA_SHARED_BUFFER
help help
Allows userspace processes and kernel modules to use Xen backed Allows userspace processes and kernel modules to use Xen backed
dma-buf implementation. With this extension grant references to dma-buf implementation. With this extension grant references to
@ -270,7 +271,7 @@ config XEN_ACPI_PROCESSOR
depends on XEN && XEN_DOM0 && X86 && ACPI_PROCESSOR && CPU_FREQ depends on XEN && XEN_DOM0 && X86 && ACPI_PROCESSOR && CPU_FREQ
default m default m
help help
This ACPI processor uploads Power Management information to the Xen This ACPI processor uploads Power Management information to the Xen
hypervisor. hypervisor.
To do that the driver parses the Power Management data and uploads To do that the driver parses the Power Management data and uploads
@ -279,19 +280,19 @@ config XEN_ACPI_PROCESSOR
SMM so that other drivers (such as ACPI cpufreq scaling driver) will SMM so that other drivers (such as ACPI cpufreq scaling driver) will
not load. not load.
To compile this driver as a module, choose M here: the module will be To compile this driver as a module, choose M here: the module will be
called xen_acpi_processor If you do not know what to choose, select called xen_acpi_processor If you do not know what to choose, select
M here. If the CPUFREQ drivers are built in, select Y here. M here. If the CPUFREQ drivers are built in, select Y here.
config XEN_MCE_LOG config XEN_MCE_LOG
bool "Xen platform mcelog" bool "Xen platform mcelog"
depends on XEN_DOM0 && X86_64 && X86_MCE depends on XEN_DOM0 && X86_MCE
help help
Allow kernel fetching MCE error from Xen platform and Allow kernel fetching MCE error from Xen platform and
converting it into Linux mcelog format for mcelog tools converting it into Linux mcelog format for mcelog tools
config XEN_HAVE_PVMMU config XEN_HAVE_PVMMU
bool bool
config XEN_EFI config XEN_EFI
def_bool y def_bool y
@ -308,15 +309,15 @@ config XEN_ACPI
depends on X86 && ACPI depends on X86 && ACPI
config XEN_SYMS config XEN_SYMS
bool "Xen symbols" bool "Xen symbols"
depends on X86 && XEN_DOM0 && XENFS depends on X86 && XEN_DOM0 && XENFS
default y if KALLSYMS default y if KALLSYMS
help help
Exports hypervisor symbols (along with their types and addresses) via Exports hypervisor symbols (along with their types and addresses) via
/proc/xen/xensyms file, similar to /proc/kallsyms /proc/xen/xensyms file, similar to /proc/kallsyms
config XEN_HAVE_VPMU config XEN_HAVE_VPMU
bool bool
config XEN_FRONT_PGDIR_SHBUF config XEN_FRONT_PGDIR_SHBUF
tristate tristate

Просмотреть файл

@ -222,7 +222,7 @@ static int convert_log(struct mc_info *mi)
struct mcinfo_global *mc_global; struct mcinfo_global *mc_global;
struct mcinfo_bank *mc_bank; struct mcinfo_bank *mc_bank;
struct xen_mce m; struct xen_mce m;
uint32_t i; unsigned int i, j;
mic = NULL; mic = NULL;
x86_mcinfo_lookup(&mic, mi, MC_TYPE_GLOBAL); x86_mcinfo_lookup(&mic, mi, MC_TYPE_GLOBAL);
@ -248,7 +248,17 @@ static int convert_log(struct mc_info *mi)
m.socketid = g_physinfo[i].mc_chipid; m.socketid = g_physinfo[i].mc_chipid;
m.cpu = m.extcpu = g_physinfo[i].mc_cpunr; m.cpu = m.extcpu = g_physinfo[i].mc_cpunr;
m.cpuvendor = (__u8)g_physinfo[i].mc_vendor; m.cpuvendor = (__u8)g_physinfo[i].mc_vendor;
m.mcgcap = g_physinfo[i].mc_msrvalues[__MC_MSR_MCGCAP].value; for (j = 0; j < g_physinfo[i].mc_nmsrvals; ++j)
switch (g_physinfo[i].mc_msrvalues[j].reg) {
case MSR_IA32_MCG_CAP:
m.mcgcap = g_physinfo[i].mc_msrvalues[j].value;
break;
case MSR_PPIN:
case MSR_AMD_PPIN:
m.ppin = g_physinfo[i].mc_msrvalues[j].value;
break;
}
mic = NULL; mic = NULL;
x86_mcinfo_lookup(&mic, mi, MC_TYPE_BANK); x86_mcinfo_lookup(&mic, mi, MC_TYPE_BANK);

Просмотреть файл

@ -183,7 +183,6 @@ struct mc_info {
DEFINE_GUEST_HANDLE_STRUCT(mc_info); DEFINE_GUEST_HANDLE_STRUCT(mc_info);
#define __MC_MSR_ARRAYSIZE 8 #define __MC_MSR_ARRAYSIZE 8
#define __MC_MSR_MCGCAP 0
#define __MC_NMSRS 1 #define __MC_NMSRS 1
#define MC_NCAPS 7 #define MC_NCAPS 7
struct mcinfo_logical_cpu { struct mcinfo_logical_cpu {
@ -332,7 +331,11 @@ struct xen_mc {
}; };
DEFINE_GUEST_HANDLE_STRUCT(xen_mc); DEFINE_GUEST_HANDLE_STRUCT(xen_mc);
/* Fields are zero when not available */ /*
* Fields are zero when not available. Also, this struct is shared with
* userspace mcelog and thus must keep existing fields at current offsets.
* Only add new fields to the end of the structure
*/
struct xen_mce { struct xen_mce {
__u64 status; __u64 status;
__u64 misc; __u64 misc;
@ -353,6 +356,9 @@ struct xen_mce {
__u32 socketid; /* CPU socket ID */ __u32 socketid; /* CPU socket ID */
__u32 apicid; /* CPU initial apic ID */ __u32 apicid; /* CPU initial apic ID */
__u64 mcgcap; /* MCGCAP MSR: machine check capabilities of CPU */ __u64 mcgcap; /* MCGCAP MSR: machine check capabilities of CPU */
__u64 synd; /* MCA_SYND MSR: only valid on SMCA systems */
__u64 ipid; /* MCA_IPID MSR: only valid on SMCA systems */
__u64 ppin; /* Protected Processor Inventory Number */
}; };
/* /*