[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] xen/arm: p2m: Restrict preemption check in apply_p2m_changes
Hi Konrad, On 05/05/15 16:50, Konrad Rzeszutek Wilk wrote: >> --- >> xen/arch/arm/p2m.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/xen/arch/arm/p2m.c b/xen/arch/arm/p2m.c >> index 65efa94..59dd23a 100644 >> --- a/xen/arch/arm/p2m.c >> +++ b/xen/arch/arm/p2m.c >> @@ -948,6 +948,7 @@ static int apply_p2m_changes(struct domain *d, >> const unsigned long sgfn = paddr_to_pfn(start_gpaddr), >> egfn = paddr_to_pfn(end_gpaddr); >> const unsigned int preempt_count_limit = (op == MEMACCESS) ? 1 : 0x2000; >> + const bool_t preempt = !is_idle_vcpu(current); >> bool_t flush = false; >> bool_t flush_pt; >> >> @@ -980,7 +981,8 @@ static int apply_p2m_changes(struct domain *d, >> * always make at least one pass as long as preempt_count_limit is >> * initialized with a value >= 1. >> */ >> - if ( count >= preempt_count_limit && hypercall_preempt_check() ) >> + if ( preempt && count >= preempt_count_limit >> + && hypercall_preempt_check() ) > > Could you use the softirq_pending() check to deal when there are no domains? apply_p2m_changes will only be called with no current domain (i.e idle vcpu) during DOM0 construction. If we check softirq_pending for this case, you will Xen will fail to build DOM0 but the preemption is not supported. I suspect this is the same on x86. Regards, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |