lkml.org 
[lkml]   [2019]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2] xen/events: remove event handling recursion detection
From
Date
On 11/28/19 3:45 AM, Juergen Gross wrote:
> -
> static void __xen_evtchn_do_upcall(void)
> {
> struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
> - int cpu = get_cpu();
> - unsigned count;
> + int cpu = smp_processor_id();
>
> do {
> vcpu_info->evtchn_upcall_pending = 0;
>
> - if (__this_cpu_inc_return(xed_nesting_count) - 1)
> - goto out;
> -
> xen_evtchn_handle_events(cpu);
>
> BUG_ON(!irqs_disabled());
>
> - count = __this_cpu_read(xed_nesting_count);
> - __this_cpu_write(xed_nesting_count, 0);
> - } while (count != 1 || vcpu_info->evtchn_upcall_pending);
> -
> -out:
> + rmb(); /* Hypervisor can set upcall pending. */

virt_rmb() perhaps then?

-boris

>
> - put_cpu();
> + } while (vcpu_info->evtchn_upcall_pending);
> }
>
> void xen_evtchn_do_upcall(struct pt_regs *regs)

\
 
 \ /
  Last update: 2019-11-28 22:46    [W:0.033 / U:1.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site