From: "Ivan Kelly" Subject: Re: Clock Interrupt not occurring. hypervisor_callback not being called. Date: Tue, 28 Feb 2006 23:48:42 +0000 Message-ID: References: <4404D14F.1060200@virtualiron.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <4404D14F.1060200@virtualiron.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dave Winchell Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 2/28/06, Dave Winchell wrote: > Have you tried making evtchn_pending and evtchn_mask volatile in > shared_info_t? I tried that. It's still showing the same behaviour. The function is as below. When the kprintf("l1 ... bit is uncommented, the clock events seem to get fired fine, and the the main loop also continues to run. When removed, it doesn't get called at all. It never gets as far as do_event. kprintf is a function that calls hypervisor_console_io. This is 2.0.7 btw. Regards Ivan PUBLIC void do_hypervisor_callback(struct stackframe_s *regs) { unsigned long l1, l2; unsigned int l1i, l2i, port; int irq; shared_info_t *s =3D hypervisor_shared_info; s->vcpu_data[0].evtchn_upcall_pending =3D 0; l1 =3D x86_atomic_xchg(&s->evtchn_pending_sel, 0); while ( l1 !=3D 0 ) { /* kprintf("l1: %x\n");*/ l1i =3D x86_scan_forward(l1); l1 &=3D ~(1 << l1i); l2 =3D s->evtchn_pending[l1i] & ~s->evtchn_mask[l1i]; while ( l2 !=3D 0 ) { kprintf("l2: %x\n", l2); l2i =3D x86_scan_forward(l2); l2 &=3D ~(1 << l2i); port =3D (l1i << 5) + l2i; if ( (irq =3D event_to_action[port]) !=3D -1 ) { do_event(irq, regs); } } } }