[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] evtchn: don't lose pending state if FIFO event array page is missing
On 18/10/13 16:06, Jan Beulich wrote: >>>> On 18.10.13 at 16:06, David Vrabel <david.vrabel@xxxxxxxxxx> wrote: >> @@ -322,16 +330,29 @@ static void cleanup_event_array(struct domain *d) >> xfree(d->evtchn_fifo); >> } >> >> -static void set_priority_all(struct domain *d, unsigned int priority) >> +static void setup_ports(struct domain *d) >> { >> unsigned int port; >> >> + /* >> + * For each port that is already bound: >> + * >> + * - save its pending state. >> + * - set default priority. >> + */ >> for ( port = 1; port < d->max_evtchns; port++ ) >> { >> + struct evtchn *evtchn; >> + >> if ( !port_is_valid(d, port) ) >> break; >> >> - evtchn_port_set_priority(d, evtchn_from_port(d, port), priority); >> + evtchn = evtchn_from_port(d, port); >> + >> + if ( test_and_clear_bit(port, &shared_info(d, evtchn_pending)) ) > > So why test_and_clear rather than just test? I thought of it as moving the bit, but it's not necessary so I'll replace it with a plain test_bit(). Similarly, the evtchn->pending = 0 isn't needed either. David _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |