[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.5] x86: don't unconditionally touch the hvm_domain union during domain construction
commit 9c3d34da0c4af86ebecc0af140144a35902e2986 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Thu May 28 12:29:19 2015 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Thu May 28 12:29:19 2015 +0200 x86: don't unconditionally touch the hvm_domain union during domain construction It may not be the appropriate half to touch. Drop the superfluous mem_sharing_enabled assignment, and move the hap_enabled assignment to a suitable conditional before it is actually needed. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> master commit: 74d0932448245cc4776d50811ceb80365623893c master date: 2015-05-20 13:25:12 +0200 --- xen/arch/x86/domain.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index f1fc993..61deaff 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -519,12 +519,6 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags) int i, paging_initialised = 0; int rc = -ENOMEM; - d->arch.hvm_domain.hap_enabled = - has_hvm_container_domain(d) && - hvm_funcs.hap_supported && - (domcr_flags & DOMCRF_hap); - d->arch.hvm_domain.mem_sharing_enabled = 0; - d->arch.s3_integrity = !!(domcr_flags & DOMCRF_s3_integrity); INIT_LIST_HEAD(&d->arch.pdev_list); @@ -547,7 +541,12 @@ int arch_domain_create(struct domain *d, unsigned int domcr_flags) } if ( has_hvm_container_domain(d) ) + { + d->arch.hvm_domain.hap_enabled = + hvm_funcs.hap_supported && (domcr_flags & DOMCRF_hap); + rc = create_perdomain_mapping(d, PERDOMAIN_VIRT_START, 0, NULL, NULL); + } else if ( is_idle_domain(d) ) rc = 0; else -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.5 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |