|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging-4.9] x86: don't enable XPTI on idle domain
commit 1c6b8f23b9c5099cdf9a530e0d044b1ab5a83511
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Wed May 30 13:34:33 2018 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed May 30 13:34:33 2018 +0200
x86: don't enable XPTI on idle domain
While the involved code (in pv_domain_initialise()) sits behind an
!is_idle_domain() check already in 4.10, we need to add one here.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
xen/arch/x86/domain.c | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index c116b39f4f..fa0fe3153e 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -714,20 +714,15 @@ int arch_domain_create(struct domain *d, unsigned int
domcr_flags,
if ( (rc = hvm_domain_initialise(d)) != 0 )
goto fail;
}
- else
+ else if ( !is_idle_domain(d) )
{
static const struct arch_csw pv_csw = {
.from = paravirt_ctxt_switch_from,
.to = paravirt_ctxt_switch_to,
.tail = continue_nonidle_domain,
};
- static const struct arch_csw idle_csw = {
- .from = paravirt_ctxt_switch_from,
- .to = paravirt_ctxt_switch_to,
- .tail = continue_idle_domain,
- };
- d->arch.ctxt_switch = is_idle_domain(d) ? &idle_csw : &pv_csw;
+ d->arch.ctxt_switch = &pv_csw;
/* 64-bit PV guest by default. */
d->arch.is_32bit_pv = d->arch.has_32bit_shinfo = 0;
@@ -758,6 +753,16 @@ int arch_domain_create(struct domain *d, unsigned int
domcr_flags,
break;
}
}
+ else
+ {
+ static const struct arch_csw idle_csw = {
+ .from = paravirt_ctxt_switch_from,
+ .to = paravirt_ctxt_switch_to,
+ .tail = continue_idle_domain,
+ };
+
+ d->arch.ctxt_switch = &idle_csw;
+ }
/* initialize default tsc behavior in case tools don't */
tsc_set_info(d, TSC_MODE_DEFAULT, 0UL, 0, 0);
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.9
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |