e46082b3ea
530b27fd-x86-MCE-Fix-race-condition-in-mctelem_reserve.patch 530b2880-Nested-VMX-update-nested-paging-mode-on-vmexit.patch 530b28c5-x86-MSI-don-t-risk-division-by-zero.patch 530c54c3-x86-mce-Reduce-boot-time-logspam.patch 5310bac3-mm-ensure-useful-progress-in-decrease_reservation.patch 5315a254-IOMMU-generalize-and-correct-softirq-processing.patch 5315a3bb-x86-don-t-propagate-acpi_skip_timer_override-do-Dom0.patch 5315a43a-x86-ACPI-also-print-address-space-for-PM1x-fields.patch 531d8db1-x86-hvm-refine-the-judgment-on-IDENT_PT-for-EMT.patch 531d8e09-x86-HVM-fix-memory-type-merging-in-epte_get_entry_emt.patch 531d8e34-x86-HVM-consolidate-passthrough-handling-in-epte_get_entry_emt.patch 531d8fd0-kexec-identify-which-cpu-the-kexec-image-is-being-executed-on.patch 531dc0e2-xmalloc-handle-correctly-page-allocation-when-align-size.patch - Add conversion tool for migrating xend/xm managed VMs to libvirt xen2libvirt.py (Jim Fehlig) OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=304
57 lines
2.1 KiB
Diff
57 lines
2.1 KiB
Diff
# Commit cadfd7bca999c0a795dc27be72d43c92e8943a0b
|
|
# Date 2014-03-10 11:02:25 +0100
|
|
# Author Dongxiao Xu <dongxiao.xu@intel.com>
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
x86/hvm: refine the judgment on IDENT_PT for EMT
|
|
|
|
When trying to get the EPT EMT type, the judgment on
|
|
HVM_PARAM_IDENT_PT is not correct which always returns WB type if
|
|
the parameter is not set. Remove the related code.
|
|
|
|
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
|
|
|
|
We can't fully drop the dependency yet, but we should certainly avoid
|
|
overriding cases already properly handled. The reason for this is that
|
|
the guest setting up its MTRRs happens _after_ the EPT tables got
|
|
already constructed, and no code is in place to propagate this to the
|
|
EPT code. Without this check we're forcing the guest to run with all of
|
|
its memory uncachable until something happens to re-write every single
|
|
EPT entry. But of course this has to be just a temporary solution.
|
|
|
|
In the same spirit we should defer the "very early" (when the guest is
|
|
still being constructed and has no vCPU yet) override to the last
|
|
possible point.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Reviewed-by: "Xu, Dongxiao" <dongxiao.xu@intel.com>
|
|
Acked-by: Keir Fraser <keir@xen.org>
|
|
|
|
--- a/xen/arch/x86/hvm/mtrr.c
|
|
+++ b/xen/arch/x86/hvm/mtrr.c
|
|
@@ -689,13 +689,8 @@ uint8_t epte_get_entry_emt(struct domain
|
|
|
|
*ipat = 0;
|
|
|
|
- if ( (current->domain != d) &&
|
|
- ((d->vcpu == NULL) || ((v = d->vcpu[0]) == NULL)) )
|
|
- return MTRR_TYPE_WRBACK;
|
|
-
|
|
- if ( !is_pvh_vcpu(v) &&
|
|
- !v->domain->arch.hvm_domain.params[HVM_PARAM_IDENT_PT] )
|
|
- return MTRR_TYPE_WRBACK;
|
|
+ if ( v->domain != d )
|
|
+ v = d->vcpu ? d->vcpu[0] : NULL;
|
|
|
|
if ( !mfn_valid(mfn_x(mfn)) )
|
|
return MTRR_TYPE_UNCACHABLE;
|
|
@@ -718,7 +713,8 @@ uint8_t epte_get_entry_emt(struct domain
|
|
return MTRR_TYPE_WRBACK;
|
|
}
|
|
|
|
- gmtrr_mtype = is_hvm_vcpu(v) ?
|
|
+ gmtrr_mtype = is_hvm_domain(d) && v &&
|
|
+ d->arch.hvm_domain.params[HVM_PARAM_IDENT_PT] ?
|
|
get_mtrr_type(&v->arch.hvm_vcpu.mtrr, (gfn << PAGE_SHIFT)) :
|
|
MTRR_TYPE_WRBACK;
|
|
|