Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+50 -22
+18 -4
arch/x86/include/asm/xen/cpuid.h
··· 89 89 * Sub-leaf 2: EAX: host tsc frequency in kHz 90 90 */ 91 91 92 + #define XEN_CPUID_TSC_EMULATED (1u << 0) 93 + #define XEN_CPUID_HOST_TSC_RELIABLE (1u << 1) 94 + #define XEN_CPUID_RDTSCP_INSTR_AVAIL (1u << 2) 95 + 96 + #define XEN_CPUID_TSC_MODE_DEFAULT (0) 97 + #define XEN_CPUID_TSC_MODE_ALWAYS_EMULATE (1u) 98 + #define XEN_CPUID_TSC_MODE_NEVER_EMULATE (2u) 99 + #define XEN_CPUID_TSC_MODE_PVRDTSCP (3u) 100 + 92 101 /* 93 102 * Leaf 5 (0x40000x04) 94 103 * HVM-specific features 95 104 * Sub-leaf 0: EAX: Features 96 105 * Sub-leaf 0: EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag) 106 + * Sub-leaf 0: ECX: domain id (iff EAX has XEN_HVM_CPUID_DOMID_PRESENT flag) 97 107 */ 98 108 #define XEN_HVM_CPUID_APIC_ACCESS_VIRT (1u << 0) /* Virtualized APIC registers */ 99 109 #define XEN_HVM_CPUID_X2APIC_VIRT (1u << 1) /* Virtualized x2APIC accesses */ ··· 112 102 #define XEN_HVM_CPUID_VCPU_ID_PRESENT (1u << 3) /* vcpu id is present in EBX */ 113 103 #define XEN_HVM_CPUID_DOMID_PRESENT (1u << 4) /* domid is present in ECX */ 114 104 /* 115 - * Bits 55:49 from the IO-APIC RTE and bits 11:5 from the MSI address can be 116 - * used to store high bits for the Destination ID. This expands the Destination 117 - * ID field from 8 to 15 bits, allowing to target APIC IDs up 32768. 105 + * With interrupt format set to 0 (non-remappable) bits 55:49 from the 106 + * IO-APIC RTE and bits 11:5 from the MSI address can be used to store 107 + * high bits for the Destination ID. This expands the Destination ID 108 + * field from 8 to 15 bits, allowing to target APIC IDs up 32768. 118 109 */ 119 110 #define XEN_HVM_CPUID_EXT_DEST_ID (1u << 5) 120 - /* Per-vCPU event channel upcalls */ 111 + /* 112 + * Per-vCPU event channel upcalls work correctly with physical IRQs 113 + * bound to event channels. 114 + */ 121 115 #define XEN_HVM_CPUID_UPCALL_VECTOR (1u << 6) 122 116 123 117 /*
+1 -1
arch/x86/xen/Makefile
··· 45 45 46 46 obj-$(CONFIG_XEN_DEBUG_FS) += debugfs.o 47 47 48 - obj-$(CONFIG_XEN_PV_DOM0) += vga.o 48 + obj-$(CONFIG_XEN_DOM0) += vga.o 49 49 50 50 obj-$(CONFIG_XEN_EFI) += efi.o
+2 -1
arch/x86/xen/enlighten_pv.c
··· 1390 1390 1391 1391 x86_platform.set_legacy_features = 1392 1392 xen_dom0_set_legacy_features; 1393 - xen_init_vga(info, xen_start_info->console.dom0.info_size); 1393 + xen_init_vga(info, xen_start_info->console.dom0.info_size, 1394 + &boot_params.screen_info); 1394 1395 xen_start_info->console.domU.mfn = 0; 1395 1396 xen_start_info->console.domU.evtchn = 0; 1396 1397
+13
arch/x86/xen/enlighten_pvh.c
··· 43 43 x86_init.oem.banner = xen_banner; 44 44 45 45 xen_efi_init(boot_params); 46 + 47 + if (xen_initial_domain()) { 48 + struct xen_platform_op op = { 49 + .cmd = XENPF_get_dom0_console, 50 + }; 51 + long ret = HYPERVISOR_platform_op(&op); 52 + 53 + if (ret > 0) 54 + xen_init_vga(&op.u.dom0_console, 55 + min(ret * sizeof(char), 56 + sizeof(op.u.dom0_console)), 57 + &boot_params->screen_info); 58 + } 46 59 } 47 60 48 61 void __init mem_map_via_hcall(struct boot_params *boot_params_p)
+2 -5
arch/x86/xen/time.c
··· 20 20 #include <asm/pvclock.h> 21 21 #include <asm/xen/hypervisor.h> 22 22 #include <asm/xen/hypercall.h> 23 + #include <asm/xen/cpuid.h> 23 24 24 25 #include <xen/events.h> 25 26 #include <xen/features.h> ··· 504 503 /* Leaf 4, sub-leaf 0 (0x40000x03) */ 505 504 cpuid_count(xen_cpuid_base() + 3, 0, &eax, &ebx, &ecx, &edx); 506 505 507 - /* tsc_mode = no_emulate (2) */ 508 - if (ebx != 2) 509 - return 0; 510 - 511 - return 1; 506 + return ebx == XEN_CPUID_TSC_MODE_NEVER_EMULATE; 512 507 } 513 508 514 509 static void __init xen_time_init(void)
+2 -3
arch/x86/xen/vga.c
··· 9 9 10 10 #include "xen-ops.h" 11 11 12 - void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size) 12 + void __init xen_init_vga(const struct dom0_vga_console_info *info, size_t size, 13 + struct screen_info *screen_info) 13 14 { 14 - struct screen_info *screen_info = &boot_params.screen_info; 15 - 16 15 /* This is drawn from a dump from vgacon:startup in 17 16 * standard Linux. */ 18 17 screen_info->orig_video_mode = 3;
+4 -3
arch/x86/xen/xen-ops.h
··· 108 108 109 109 struct dom0_vga_console_info; 110 110 111 - #ifdef CONFIG_XEN_PV_DOM0 112 - void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size); 111 + #ifdef CONFIG_XEN_DOM0 112 + void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size, 113 + struct screen_info *); 113 114 #else 114 115 static inline void __init xen_init_vga(const struct dom0_vga_console_info *info, 115 - size_t size) 116 + size_t size, struct screen_info *si) 116 117 { 117 118 } 118 119 #endif
+5 -5
drivers/xen/xenfs/xensyms.c
··· 64 64 65 65 static void *xensyms_start(struct seq_file *m, loff_t *pos) 66 66 { 67 - struct xensyms *xs = (struct xensyms *)m->private; 67 + struct xensyms *xs = m->private; 68 68 69 69 xs->op.u.symdata.symnum = *pos; 70 70 ··· 76 76 77 77 static void *xensyms_next(struct seq_file *m, void *p, loff_t *pos) 78 78 { 79 - struct xensyms *xs = (struct xensyms *)m->private; 79 + struct xensyms *xs = m->private; 80 80 81 81 xs->op.u.symdata.symnum = ++(*pos); 82 82 ··· 88 88 89 89 static int xensyms_show(struct seq_file *m, void *p) 90 90 { 91 - struct xensyms *xs = (struct xensyms *)m->private; 91 + struct xensyms *xs = m->private; 92 92 struct xenpf_symdata *symdata = &xs->op.u.symdata; 93 93 94 94 seq_printf(m, "%016llx %c %s\n", symdata->address, ··· 120 120 return ret; 121 121 122 122 m = file->private_data; 123 - xs = (struct xensyms *)m->private; 123 + xs = m->private; 124 124 125 125 xs->namelen = XEN_KSYM_NAME_LEN + 1; 126 126 xs->name = kzalloc(xs->namelen, GFP_KERNEL); ··· 138 138 static int xensyms_release(struct inode *inode, struct file *file) 139 139 { 140 140 struct seq_file *m = file->private_data; 141 - struct xensyms *xs = (struct xensyms *)m->private; 141 + struct xensyms *xs = m->private; 142 142 143 143 kfree(xs->name); 144 144 return seq_release_private(inode, file);
+3
include/xen/interface/platform.h
··· 483 483 }; 484 484 DEFINE_GUEST_HANDLE_STRUCT(xenpf_symdata); 485 485 486 + #define XENPF_get_dom0_console 64 487 + 486 488 struct xen_platform_op { 487 489 uint32_t cmd; 488 490 uint32_t interface_version; /* XENPF_INTERFACE_VERSION */ ··· 508 506 struct xenpf_mem_hotadd mem_add; 509 507 struct xenpf_core_parking core_parking; 510 508 struct xenpf_symdata symdata; 509 + struct dom0_vga_console_info dom0_console; 511 510 uint8_t pad[128]; 512 511 } u; 513 512 };