97a0425e04
xen-4.5.1-testing-src.tar.bz2 - Dropped patches now contained in tarball 556c2cf2-x86-don-t-crash-mapping-a-page-using-EFI-rt-page-tables.patch 556d9718-efi-fix-allocation-problems-if-ExitBootServices-fails.patch 556eabf7-x86-apic-Disable-the-LAPIC-later-in-smp_send_stop.patch 556eac15-x86-crash-don-t-use-set_fixmap-in-the-crash-path.patch 55780aaa-efi-avoid-calling-boot-services-after-ExitBootServices.patch 55780aff-x86-EFI-fix-EFI_MEMORY_WP-handling.patch 55780b43-EFI-early-add-mapbs-to-map-EfiBootServices-Code-Data.patch 55780b97-EFI-support-default-attributes-to-map-Runtime-service-areas.patch - Replace 5124efbe-add-qxl-support.patch with the variant that finally made it upstream, 554cc211-libxl-add-qxl.patch - bsc#931627 - VUL-0: CVE-2015-4105: XSA-130: xen: Guest triggerable qemu MSI-X pass-through error messages qemu-MSI-X-latch-writes.patch - bsc#907514 - Bus fatal error & sles12 sudden reboot has been observed - bsc#910258 - SLES12 Xen host crashes with FATAL NMI after shutdown of guest with VT-d NIC - bsc#918984 - Bus fatal error & sles11-SP4 sudden reboot has been observed - bsc#923967 - Partner-L3: Bus fatal error & sles11-SP3 sudden reboot has been observed x86-MSI-X-teardown.patch x86-MSI-X-enable.patch x86-MSI-X-guest-mask.patch x86-MSI-X-maskall.patch qemu-MSI-X-enable-maskall.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=364
114 lines
3.8 KiB
Diff
114 lines
3.8 KiB
Diff
# Commit 88a2372c6ba44dd42b915a95a823cf9d4d260e25
|
|
# Date 2015-03-23 16:49:42 +0100
|
|
# Author Jan Beulich <jbeulich@suse.com>
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
vm-assist: prepare for discontiguous used bit numbers
|
|
|
|
Since the a flag will get assigned a value discontiguous to the
|
|
existing ones (in order to preserve the low bits, as only those are
|
|
currently accessible to 32-bit guests), this requires a little bit of
|
|
rework of the VM assist code in general: An architecture specific
|
|
VM_ASSIST_VALID definition gets introduced (with an optional compat
|
|
mode counterpart), and compilation of the respective code becomes
|
|
conditional upon this being defined (ARM doesn't wire these up and
|
|
hence doesn't need that code).
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Reviewed-by: Tim Deegan <tim@xen.org>
|
|
|
|
--- a/xen/common/compat/kernel.c
|
|
+++ b/xen/common/compat/kernel.c
|
|
@@ -41,6 +41,11 @@ CHECK_TYPE(domain_handle);
|
|
#define xennmi_callback compat_nmi_callback
|
|
#define xennmi_callback_t compat_nmi_callback_t
|
|
|
|
+#ifdef COMPAT_VM_ASSIST_VALID
|
|
+#undef VM_ASSIST_VALID
|
|
+#define VM_ASSIST_VALID COMPAT_VM_ASSIST_VALID
|
|
+#endif
|
|
+
|
|
#define DO(fn) int compat_##fn
|
|
#define COMPAT
|
|
|
|
--- a/xen/common/domain.c
|
|
+++ b/xen/common/domain.c
|
|
@@ -1325,9 +1325,11 @@ long do_vcpu_op(int cmd, int vcpuid, XEN
|
|
return rc;
|
|
}
|
|
|
|
-long vm_assist(struct domain *p, unsigned int cmd, unsigned int type)
|
|
+#ifdef VM_ASSIST_VALID
|
|
+long vm_assist(struct domain *p, unsigned int cmd, unsigned int type,
|
|
+ unsigned long valid)
|
|
{
|
|
- if ( type > MAX_VMASST_TYPE )
|
|
+ if ( type >= BITS_PER_LONG || !test_bit(type, &valid) )
|
|
return -EINVAL;
|
|
|
|
switch ( cmd )
|
|
@@ -1342,6 +1344,7 @@ long vm_assist(struct domain *p, unsigne
|
|
|
|
return -ENOSYS;
|
|
}
|
|
+#endif
|
|
|
|
struct pirq *pirq_get_info(struct domain *d, int pirq)
|
|
{
|
|
--- a/xen/common/kernel.c
|
|
+++ b/xen/common/kernel.c
|
|
@@ -396,10 +396,12 @@ DO(nmi_op)(unsigned int cmd, XEN_GUEST_H
|
|
return rc;
|
|
}
|
|
|
|
+#ifdef VM_ASSIST_VALID
|
|
DO(vm_assist)(unsigned int cmd, unsigned int type)
|
|
{
|
|
- return vm_assist(current->domain, cmd, type);
|
|
+ return vm_assist(current->domain, cmd, type, VM_ASSIST_VALID);
|
|
}
|
|
+#endif
|
|
|
|
DO(ni_hypercall)(void)
|
|
{
|
|
--- a/xen/include/asm-x86/config.h
|
|
+++ b/xen/include/asm-x86/config.h
|
|
@@ -327,6 +327,14 @@ extern unsigned long xen_phys_start;
|
|
#define ARG_XLAT_START(v) \
|
|
(ARG_XLAT_VIRT_START + ((v)->vcpu_id << ARG_XLAT_VA_SHIFT))
|
|
|
|
+#define NATIVE_VM_ASSIST_VALID ((1UL << VMASST_TYPE_4gb_segments) | \
|
|
+ (1UL << VMASST_TYPE_4gb_segments_notify) | \
|
|
+ (1UL << VMASST_TYPE_writable_pagetables) | \
|
|
+ (1UL << VMASST_TYPE_pae_extended_cr3))
|
|
+#define VM_ASSIST_VALID NATIVE_VM_ASSIST_VALID
|
|
+#define COMPAT_VM_ASSIST_VALID (NATIVE_VM_ASSIST_VALID & \
|
|
+ ((1UL << COMPAT_BITS_PER_LONG) - 1))
|
|
+
|
|
#define ELFSIZE 64
|
|
|
|
#define ARCH_CRASH_SAVE_VMCOREINFO
|
|
--- a/xen/include/public/xen.h
|
|
+++ b/xen/include/public/xen.h
|
|
@@ -486,7 +486,9 @@ DEFINE_XEN_GUEST_HANDLE(mmuext_op_t);
|
|
/* x86/PAE guests: support PDPTs above 4GB. */
|
|
#define VMASST_TYPE_pae_extended_cr3 3
|
|
|
|
+#if __XEN_INTERFACE_VERSION__ < 0x00040600
|
|
#define MAX_VMASST_TYPE 3
|
|
+#endif
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
--- a/xen/include/xen/lib.h
|
|
+++ b/xen/include/xen/lib.h
|
|
@@ -92,7 +92,8 @@ extern void guest_printk(const struct do
|
|
__attribute__ ((format (printf, 2, 3)));
|
|
extern void noreturn panic(const char *format, ...)
|
|
__attribute__ ((format (printf, 1, 2)));
|
|
-extern long vm_assist(struct domain *, unsigned int, unsigned int);
|
|
+extern long vm_assist(struct domain *, unsigned int cmd, unsigned int type,
|
|
+ unsigned long valid);
|
|
extern int __printk_ratelimit(int ratelimit_ms, int ratelimit_burst);
|
|
extern int printk_ratelimit(void);
|
|
|