da53445dea
recursive pagetable for 32-bit PV guests (XSA-185) 57d1563d-x86-32on64-don-t-allow-recursive-page-tables-from-L3.patch - bsc#995789 - VUL-0: CVE-2016-7093: xen: x86: Mishandling of instruction pointer truncation during emulation (XSA-186) 57d15679-x86-emulate-Correct-boundary-interactions-of-emulated-insns.patch 57d18642-hvm-fep-Allow-test-insns-crossing-1-0-boundary.patch - bsc#995792 - VUL-0: CVE-2016-7094: xen: x86 HVM: Overflow of sh_ctxt->seg_reg[] (XSA-187) 57d1569a-x86-shadow-Avoid-overflowing-sh_ctxt-seg_reg.patch 57d18642-x86-segment-Bounds-check-accesses-to-emulation-ctxt-seg_reg.patch - bsc#991934 - xen hypervisor crash in csched_acct 57c96df3-credit1-fix-a-race-when-picking-initial-pCPU.patch - Upstream patches from Jan 57c4412b-x86-HVM-add-guarding-logic-for-VMX-specific-code.patch 57c57f73-libxc-correct-max_pfn-calculation-for-saving-domain.patch 57c805bf-x86-levelling-restrict-non-architectural-OSXSAVE-handling.patch 57c805c1-x86-levelling-pass-vcpu-to-ctxt_switch_levelling.patch 57c805c3-x86-levelling-provide-architectural-OSXSAVE-handling.patch 57c82be2-x86-32on64-adjust-call-gate-emulation.patch 57c96e2c-x86-correct-PT_NOTE-file-position.patch 57cfed43-VMX-correct-feature-checks-for-MPX-and-XSAVES.patch - bsc#989679 - [pvusb feature] USB device not found when 'virsh detach-device guest usb.xml' 57c93e52-fix-error-in-libxl_device_usbdev_list.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=450
81 lines
2.9 KiB
Diff
81 lines
2.9 KiB
Diff
# Commit 33b23e5ab319a6bf9bfd38c4d9268fa6d9d072c6
|
|
# Date 2016-09-01 11:41:05 +0100
|
|
# Author Andrew Cooper <andrew.cooper3@citrix.com>
|
|
# Committer Andrew Cooper <andrew.cooper3@citrix.com>
|
|
x86/levelling: Pass a vcpu rather than a domain to ctxt_switch_levelling()
|
|
|
|
A subsequent change needs to special-case OSXSAVE handling, which is per-vcpu
|
|
rather than per-domain.
|
|
|
|
No functional change.
|
|
|
|
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
|
Reviewed-by: Jan Beulich <jbeulich@suse.com>
|
|
|
|
--- a/xen/arch/x86/cpu/amd.c
|
|
+++ b/xen/arch/x86/cpu/amd.c
|
|
@@ -203,9 +203,10 @@ static void __init noinline probe_maskin
|
|
* used to context switch to the default host state (by the cpu bringup-code,
|
|
* crash path, etc).
|
|
*/
|
|
-static void amd_ctxt_switch_levelling(const struct domain *nextd)
|
|
+static void amd_ctxt_switch_levelling(const struct vcpu *next)
|
|
{
|
|
struct cpuidmasks *these_masks = &this_cpu(cpuidmasks);
|
|
+ const struct domain *nextd = next ? next->domain : NULL;
|
|
const struct cpuidmasks *masks =
|
|
(nextd && is_pv_domain(nextd) && nextd->arch.pv_domain.cpuidmasks)
|
|
? nextd->arch.pv_domain.cpuidmasks : &cpuidmask_defaults;
|
|
--- a/xen/arch/x86/cpu/common.c
|
|
+++ b/xen/arch/x86/cpu/common.c
|
|
@@ -90,11 +90,11 @@ static const struct cpu_dev default_cpu
|
|
};
|
|
static const struct cpu_dev *this_cpu = &default_cpu;
|
|
|
|
-static void default_ctxt_switch_levelling(const struct domain *nextd)
|
|
+static void default_ctxt_switch_levelling(const struct vcpu *next)
|
|
{
|
|
/* Nop */
|
|
}
|
|
-void (* __read_mostly ctxt_switch_levelling)(const struct domain *nextd) =
|
|
+void (* __read_mostly ctxt_switch_levelling)(const struct vcpu *next) =
|
|
default_ctxt_switch_levelling;
|
|
|
|
bool_t opt_cpu_info;
|
|
--- a/xen/arch/x86/cpu/intel.c
|
|
+++ b/xen/arch/x86/cpu/intel.c
|
|
@@ -151,9 +151,10 @@ static void __init probe_masking_msrs(vo
|
|
* used to context switch to the default host state (by the cpu bringup-code,
|
|
* crash path, etc).
|
|
*/
|
|
-static void intel_ctxt_switch_levelling(const struct domain *nextd)
|
|
+static void intel_ctxt_switch_levelling(const struct vcpu *next)
|
|
{
|
|
struct cpuidmasks *these_masks = &this_cpu(cpuidmasks);
|
|
+ const struct domain *nextd = next ? next->domain : NULL;
|
|
const struct cpuidmasks *masks;
|
|
|
|
if (cpu_has_cpuid_faulting) {
|
|
--- a/xen/arch/x86/domain.c
|
|
+++ b/xen/arch/x86/domain.c
|
|
@@ -2107,7 +2107,7 @@ void context_switch(struct vcpu *prev, s
|
|
load_segments(next);
|
|
}
|
|
|
|
- ctxt_switch_levelling(nextd);
|
|
+ ctxt_switch_levelling(next);
|
|
}
|
|
|
|
context_saved(prev);
|
|
--- a/xen/include/asm-x86/processor.h
|
|
+++ b/xen/include/asm-x86/processor.h
|
|
@@ -211,7 +211,7 @@ extern struct cpuinfo_x86 boot_cpu_data;
|
|
extern struct cpuinfo_x86 cpu_data[];
|
|
#define current_cpu_data cpu_data[smp_processor_id()]
|
|
|
|
-extern void (*ctxt_switch_levelling)(const struct domain *nextd);
|
|
+extern void (*ctxt_switch_levelling)(const struct vcpu *next);
|
|
|
|
extern u64 host_pat;
|
|
extern bool_t opt_cpu_info;
|