mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 01:04:08 +08:00
xen: branch for v6.3-rc3
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRTLbB6QfY48x44uB6AXGG7T9hjvgUCZBQKJwAKCRCAXGG7T9hj vuVgAQDhvr5mBFNqFxIfTnE8+oEsnYb0OgmR+9U3h+ECDB0P0gEAmR1fAee441YE 2DWOAlvjmqoI2K8DTTabizXvm7x3bQk= =jcYl -----END PGP SIGNATURE----- Merge tag 'for-linus-6.3-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen fixes from Juergen Gross: - cleanup for xen time handling - enable the VGA console in a Xen PVH dom0 - cleanup in the xenfs driver * tag 'for-linus-6.3-rc3-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen: remove unnecessary (void*) conversions x86/PVH: obtain VGA console info in Dom0 x86/xen/time: cleanup xen_tsc_safe_clocksource xen: update arch/x86/include/asm/xen/cpuid.h
This commit is contained in:
commit
0eb392ec09
@ -89,11 +89,21 @@
|
|||||||
* Sub-leaf 2: EAX: host tsc frequency in kHz
|
* Sub-leaf 2: EAX: host tsc frequency in kHz
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define XEN_CPUID_TSC_EMULATED (1u << 0)
|
||||||
|
#define XEN_CPUID_HOST_TSC_RELIABLE (1u << 1)
|
||||||
|
#define XEN_CPUID_RDTSCP_INSTR_AVAIL (1u << 2)
|
||||||
|
|
||||||
|
#define XEN_CPUID_TSC_MODE_DEFAULT (0)
|
||||||
|
#define XEN_CPUID_TSC_MODE_ALWAYS_EMULATE (1u)
|
||||||
|
#define XEN_CPUID_TSC_MODE_NEVER_EMULATE (2u)
|
||||||
|
#define XEN_CPUID_TSC_MODE_PVRDTSCP (3u)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Leaf 5 (0x40000x04)
|
* Leaf 5 (0x40000x04)
|
||||||
* HVM-specific features
|
* HVM-specific features
|
||||||
* Sub-leaf 0: EAX: Features
|
* Sub-leaf 0: EAX: Features
|
||||||
* Sub-leaf 0: EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag)
|
* Sub-leaf 0: EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag)
|
||||||
|
* Sub-leaf 0: ECX: domain id (iff EAX has XEN_HVM_CPUID_DOMID_PRESENT flag)
|
||||||
*/
|
*/
|
||||||
#define XEN_HVM_CPUID_APIC_ACCESS_VIRT (1u << 0) /* Virtualized APIC registers */
|
#define XEN_HVM_CPUID_APIC_ACCESS_VIRT (1u << 0) /* Virtualized APIC registers */
|
||||||
#define XEN_HVM_CPUID_X2APIC_VIRT (1u << 1) /* Virtualized x2APIC accesses */
|
#define XEN_HVM_CPUID_X2APIC_VIRT (1u << 1) /* Virtualized x2APIC accesses */
|
||||||
@ -102,12 +112,16 @@
|
|||||||
#define XEN_HVM_CPUID_VCPU_ID_PRESENT (1u << 3) /* vcpu id is present in EBX */
|
#define XEN_HVM_CPUID_VCPU_ID_PRESENT (1u << 3) /* vcpu id is present in EBX */
|
||||||
#define XEN_HVM_CPUID_DOMID_PRESENT (1u << 4) /* domid is present in ECX */
|
#define XEN_HVM_CPUID_DOMID_PRESENT (1u << 4) /* domid is present in ECX */
|
||||||
/*
|
/*
|
||||||
* Bits 55:49 from the IO-APIC RTE and bits 11:5 from the MSI address can be
|
* With interrupt format set to 0 (non-remappable) bits 55:49 from the
|
||||||
* used to store high bits for the Destination ID. This expands the Destination
|
* IO-APIC RTE and bits 11:5 from the MSI address can be used to store
|
||||||
* ID field from 8 to 15 bits, allowing to target APIC IDs up 32768.
|
* high bits for the Destination ID. This expands the Destination ID
|
||||||
|
* field from 8 to 15 bits, allowing to target APIC IDs up 32768.
|
||||||
*/
|
*/
|
||||||
#define XEN_HVM_CPUID_EXT_DEST_ID (1u << 5)
|
#define XEN_HVM_CPUID_EXT_DEST_ID (1u << 5)
|
||||||
/* Per-vCPU event channel upcalls */
|
/*
|
||||||
|
* Per-vCPU event channel upcalls work correctly with physical IRQs
|
||||||
|
* bound to event channels.
|
||||||
|
*/
|
||||||
#define XEN_HVM_CPUID_UPCALL_VECTOR (1u << 6)
|
#define XEN_HVM_CPUID_UPCALL_VECTOR (1u << 6)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -45,6 +45,6 @@ obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o
|
|||||||
|
|
||||||
obj-$(CONFIG_XEN_DEBUG_FS) += debugfs.o
|
obj-$(CONFIG_XEN_DEBUG_FS) += debugfs.o
|
||||||
|
|
||||||
obj-$(CONFIG_XEN_PV_DOM0) += vga.o
|
obj-$(CONFIG_XEN_DOM0) += vga.o
|
||||||
|
|
||||||
obj-$(CONFIG_XEN_EFI) += efi.o
|
obj-$(CONFIG_XEN_EFI) += efi.o
|
||||||
|
@ -1390,7 +1390,8 @@ asmlinkage __visible void __init xen_start_kernel(struct start_info *si)
|
|||||||
|
|
||||||
x86_platform.set_legacy_features =
|
x86_platform.set_legacy_features =
|
||||||
xen_dom0_set_legacy_features;
|
xen_dom0_set_legacy_features;
|
||||||
xen_init_vga(info, xen_start_info->console.dom0.info_size);
|
xen_init_vga(info, xen_start_info->console.dom0.info_size,
|
||||||
|
&boot_params.screen_info);
|
||||||
xen_start_info->console.domU.mfn = 0;
|
xen_start_info->console.domU.mfn = 0;
|
||||||
xen_start_info->console.domU.evtchn = 0;
|
xen_start_info->console.domU.evtchn = 0;
|
||||||
|
|
||||||
|
@ -43,6 +43,19 @@ void __init xen_pvh_init(struct boot_params *boot_params)
|
|||||||
x86_init.oem.banner = xen_banner;
|
x86_init.oem.banner = xen_banner;
|
||||||
|
|
||||||
xen_efi_init(boot_params);
|
xen_efi_init(boot_params);
|
||||||
|
|
||||||
|
if (xen_initial_domain()) {
|
||||||
|
struct xen_platform_op op = {
|
||||||
|
.cmd = XENPF_get_dom0_console,
|
||||||
|
};
|
||||||
|
long ret = HYPERVISOR_platform_op(&op);
|
||||||
|
|
||||||
|
if (ret > 0)
|
||||||
|
xen_init_vga(&op.u.dom0_console,
|
||||||
|
min(ret * sizeof(char),
|
||||||
|
sizeof(op.u.dom0_console)),
|
||||||
|
&boot_params->screen_info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void __init mem_map_via_hcall(struct boot_params *boot_params_p)
|
void __init mem_map_via_hcall(struct boot_params *boot_params_p)
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <asm/pvclock.h>
|
#include <asm/pvclock.h>
|
||||||
#include <asm/xen/hypervisor.h>
|
#include <asm/xen/hypervisor.h>
|
||||||
#include <asm/xen/hypercall.h>
|
#include <asm/xen/hypercall.h>
|
||||||
|
#include <asm/xen/cpuid.h>
|
||||||
|
|
||||||
#include <xen/events.h>
|
#include <xen/events.h>
|
||||||
#include <xen/features.h>
|
#include <xen/features.h>
|
||||||
@ -503,11 +504,7 @@ static int __init xen_tsc_safe_clocksource(void)
|
|||||||
/* Leaf 4, sub-leaf 0 (0x40000x03) */
|
/* Leaf 4, sub-leaf 0 (0x40000x03) */
|
||||||
cpuid_count(xen_cpuid_base() + 3, 0, &eax, &ebx, &ecx, &edx);
|
cpuid_count(xen_cpuid_base() + 3, 0, &eax, &ebx, &ecx, &edx);
|
||||||
|
|
||||||
/* tsc_mode = no_emulate (2) */
|
return ebx == XEN_CPUID_TSC_MODE_NEVER_EMULATE;
|
||||||
if (ebx != 2)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __init xen_time_init(void)
|
static void __init xen_time_init(void)
|
||||||
|
@ -9,10 +9,9 @@
|
|||||||
|
|
||||||
#include "xen-ops.h"
|
#include "xen-ops.h"
|
||||||
|
|
||||||
void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size)
|
void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size,
|
||||||
|
struct screen_info *screen_info)
|
||||||
{
|
{
|
||||||
struct screen_info *screen_info = &boot_params.screen_info;
|
|
||||||
|
|
||||||
/* This is drawn from a dump from vgacon:startup in
|
/* This is drawn from a dump from vgacon:startup in
|
||||||
* standard Linux. */
|
* standard Linux. */
|
||||||
screen_info->orig_video_mode = 3;
|
screen_info->orig_video_mode = 3;
|
||||||
|
@ -108,11 +108,12 @@ static inline void xen_uninit_lock_cpu(int cpu)
|
|||||||
|
|
||||||
struct dom0_vga_console_info;
|
struct dom0_vga_console_info;
|
||||||
|
|
||||||
#ifdef CONFIG_XEN_PV_DOM0
|
#ifdef CONFIG_XEN_DOM0
|
||||||
void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size);
|
void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size,
|
||||||
|
struct screen_info *);
|
||||||
#else
|
#else
|
||||||
static inline void __init xen_init_vga(const struct dom0_vga_console_info *info,
|
static inline void __init xen_init_vga(const struct dom0_vga_console_info *info,
|
||||||
size_t size)
|
size_t size, struct screen_info *si)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -64,7 +64,7 @@ static int xensyms_next_sym(struct xensyms *xs)
|
|||||||
|
|
||||||
static void *xensyms_start(struct seq_file *m, loff_t *pos)
|
static void *xensyms_start(struct seq_file *m, loff_t *pos)
|
||||||
{
|
{
|
||||||
struct xensyms *xs = (struct xensyms *)m->private;
|
struct xensyms *xs = m->private;
|
||||||
|
|
||||||
xs->op.u.symdata.symnum = *pos;
|
xs->op.u.symdata.symnum = *pos;
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ static void *xensyms_start(struct seq_file *m, loff_t *pos)
|
|||||||
|
|
||||||
static void *xensyms_next(struct seq_file *m, void *p, loff_t *pos)
|
static void *xensyms_next(struct seq_file *m, void *p, loff_t *pos)
|
||||||
{
|
{
|
||||||
struct xensyms *xs = (struct xensyms *)m->private;
|
struct xensyms *xs = m->private;
|
||||||
|
|
||||||
xs->op.u.symdata.symnum = ++(*pos);
|
xs->op.u.symdata.symnum = ++(*pos);
|
||||||
|
|
||||||
@ -88,7 +88,7 @@ static void *xensyms_next(struct seq_file *m, void *p, loff_t *pos)
|
|||||||
|
|
||||||
static int xensyms_show(struct seq_file *m, void *p)
|
static int xensyms_show(struct seq_file *m, void *p)
|
||||||
{
|
{
|
||||||
struct xensyms *xs = (struct xensyms *)m->private;
|
struct xensyms *xs = m->private;
|
||||||
struct xenpf_symdata *symdata = &xs->op.u.symdata;
|
struct xenpf_symdata *symdata = &xs->op.u.symdata;
|
||||||
|
|
||||||
seq_printf(m, "%016llx %c %s\n", symdata->address,
|
seq_printf(m, "%016llx %c %s\n", symdata->address,
|
||||||
@ -120,7 +120,7 @@ static int xensyms_open(struct inode *inode, struct file *file)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
m = file->private_data;
|
m = file->private_data;
|
||||||
xs = (struct xensyms *)m->private;
|
xs = m->private;
|
||||||
|
|
||||||
xs->namelen = XEN_KSYM_NAME_LEN + 1;
|
xs->namelen = XEN_KSYM_NAME_LEN + 1;
|
||||||
xs->name = kzalloc(xs->namelen, GFP_KERNEL);
|
xs->name = kzalloc(xs->namelen, GFP_KERNEL);
|
||||||
@ -138,7 +138,7 @@ static int xensyms_open(struct inode *inode, struct file *file)
|
|||||||
static int xensyms_release(struct inode *inode, struct file *file)
|
static int xensyms_release(struct inode *inode, struct file *file)
|
||||||
{
|
{
|
||||||
struct seq_file *m = file->private_data;
|
struct seq_file *m = file->private_data;
|
||||||
struct xensyms *xs = (struct xensyms *)m->private;
|
struct xensyms *xs = m->private;
|
||||||
|
|
||||||
kfree(xs->name);
|
kfree(xs->name);
|
||||||
return seq_release_private(inode, file);
|
return seq_release_private(inode, file);
|
||||||
|
@ -483,6 +483,8 @@ struct xenpf_symdata {
|
|||||||
};
|
};
|
||||||
DEFINE_GUEST_HANDLE_STRUCT(xenpf_symdata);
|
DEFINE_GUEST_HANDLE_STRUCT(xenpf_symdata);
|
||||||
|
|
||||||
|
#define XENPF_get_dom0_console 64
|
||||||
|
|
||||||
struct xen_platform_op {
|
struct xen_platform_op {
|
||||||
uint32_t cmd;
|
uint32_t cmd;
|
||||||
uint32_t interface_version; /* XENPF_INTERFACE_VERSION */
|
uint32_t interface_version; /* XENPF_INTERFACE_VERSION */
|
||||||
@ -506,6 +508,7 @@ struct xen_platform_op {
|
|||||||
struct xenpf_mem_hotadd mem_add;
|
struct xenpf_mem_hotadd mem_add;
|
||||||
struct xenpf_core_parking core_parking;
|
struct xenpf_core_parking core_parking;
|
||||||
struct xenpf_symdata symdata;
|
struct xenpf_symdata symdata;
|
||||||
|
struct dom0_vga_console_info dom0_console;
|
||||||
uint8_t pad[128];
|
uint8_t pad[128];
|
||||||
} u;
|
} u;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user