From: Dave Winchell <dwinchell@virtualiron.com>
To: Ivan Kelly <ivanbkelly@gmail.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: Clock Interrupt not occurring. hypervisor_callback not being called. (more info)
Date: Wed, 01 Mar 2006 15:16:12 -0500 [thread overview]
Message-ID: <4406010C.4080303@virtualiron.com> (raw)
In-Reply-To: <eec2a0080603010817r36679464g2f5edebb09c13aa5@mail.gmail.com>
Ivan,
How about a memory barrier right before the call to evtchn_notify
in evtchn_set_pending and one before l1 =
x86_atomic_xchg(&s->evtchn_pending_sel, 0)
in do_hypervisor_callback?
Regards,
Dave
Ivan Kelly wrote:
>Some more info on this problem.
>The problem seems to be that evtchn_pending[0] is not being updated
>fast enough after the callback is made. Therefore the callback is
>running and seeing nothing as pending and discarding anything that
>happens.
>If i put in something that delays before the start of the inner loop
>somewhere, it will work fine. It doesn't have to be a printf, can be a
>for(i=0;i<100000;i++) or something similar.
>evtchn_pending is set as volatile. Im not sure if this is actually
>helping at all though, since I have to use the ACK compiler which is
>the only thing that minix will compile with.
>
>Does anyone have any idea on how i can get evtchn_pending to update on time?
>Regards
>Ivan
>
>
>
>><SNIP>
>>PUBLIC void
>>do_hypervisor_callback(struct stackframe_s *regs)
>>{
>> unsigned long l1, l2;
>> unsigned int l1i, l2i, port;
>> int irq;
>> shared_info_t *s = hypervisor_shared_info;
>>
>> s->vcpu_data[0].evtchn_upcall_pending = 0;
>>
>> l1 = x86_atomic_xchg(&s->evtchn_pending_sel, 0);
>>
>> while ( l1 != 0 )
>> {
>>/* kprintf("l1: %x\n");*/
>> l1i = x86_scan_forward(l1);
>> l1 &= ~(1 << l1i);
>>
>> l2 = s->evtchn_pending[l1i] & ~s->evtchn_mask[l1i];
>> while ( l2 != 0 )
>> {
>> kprintf("l2: %x\n", l2);
>> l2i = x86_scan_forward(l2);
>> l2 &= ~(1 << l2i);
>>
>> port = (l1i << 5) + l2i;
>>
>> if ( (irq = event_to_action[port]) != -1 ) {
>> do_event(irq, regs);
>> }
>> }
>> }
>>}
>><ENDSNIP>
>>
>>
>>
>
>_______________________________________________
>Xen-devel mailing list
>Xen-devel@lists.xensource.com
>http://lists.xensource.com/xen-devel
>
>
next prev parent reply other threads:[~2006-03-01 20:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-01 16:17 Clock Interrupt not occurring. hypervisor_callback not being called. (more info) Ivan Kelly
2006-03-01 20:16 ` Dave Winchell [this message]
2006-03-01 22:29 ` Ivan Kelly
2006-03-01 22:48 ` Dave Winchell
2006-03-01 22:42 ` Keir Fraser
2006-03-01 23:04 ` Ivan Kelly
2006-03-02 0:19 ` Ivan Kelly
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4406010C.4080303@virtualiron.com \
--to=dwinchell@virtualiron.com \
--cc=ivanbkelly@gmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.