[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 7/7] mini-os: Moved force_evtchn_callback to header
On 6 June 2014 15:17, Ian Campbell <Ian.Campbell@xxxxxxxxxx> wrote: > On Wed, 2014-06-04 at 17:06 +0100, Thomas Leonard wrote: >> From: Karim Raslan <karim.allah.ahmed@xxxxxxxxx> > > Why is this being done? [ CC += Karim ] I don't know Karim's exact reason, but it seems that ARM doesn't define XEN_HAVE_PV_UPCALL_MASK, so the existing code can't work. I don't know what the correct behaviour should be, though. For Mirage, we check for pending interrupts when we're about to block, rather than dealing with them in an interrupt handler, so it doesn't affect us. >> Signed-off-by: Karim Allah Ahmed <karim.allah.ahmed@xxxxxxxxx> >> [talex5@xxxxxxxxx: separated from big ARM commit] >> Signed-off-by: Thomas Leonard <talex5@xxxxxxxxx> >> --- >> extras/mini-os/hypervisor.c | 20 +------------------- >> extras/mini-os/include/hypervisor.h | 1 - >> extras/mini-os/include/x86/os.h | 17 +++++++++++++++++ >> 3 files changed, 18 insertions(+), 20 deletions(-) >> >> diff --git a/extras/mini-os/hypervisor.c b/extras/mini-os/hypervisor.c >> index b4688a0..9c79d5d 100644 >> --- a/extras/mini-os/hypervisor.c >> +++ b/extras/mini-os/hypervisor.c >> @@ -71,23 +71,6 @@ void do_hypervisor_callback(struct pt_regs *regs) >> in_callback = 0; >> } >> >> -void force_evtchn_callback(void) >> -{ >> - int save; >> - vcpu_info_t *vcpu; >> - vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; >> - save = vcpu->evtchn_upcall_mask; >> - >> - while (vcpu->evtchn_upcall_pending) { >> - vcpu->evtchn_upcall_mask = 1; >> - barrier(); >> - do_hypervisor_callback(NULL); >> - barrier(); >> - vcpu->evtchn_upcall_mask = save; >> - barrier(); >> - }; >> -} >> - >> inline void mask_evtchn(uint32_t port) >> { >> shared_info_t *s = HYPERVISOR_shared_info; >> @@ -110,8 +93,7 @@ inline void unmask_evtchn(uint32_t port) >> &vcpu_info->evtchn_pending_sel) ) >> { >> vcpu_info->evtchn_upcall_pending = 1; >> - if ( !vcpu_info->evtchn_upcall_mask ) >> - force_evtchn_callback(); >> + force_evtchn_callback(); > > If this is something to do with the code motion then I'm not sure what, > it certainly needs to be explained somewhere. > >> } >> } >> >> diff --git a/extras/mini-os/include/hypervisor.h >> b/extras/mini-os/include/hypervisor.h >> index a62cb78..9e9cac8 100644 >> --- a/extras/mini-os/include/hypervisor.h >> +++ b/extras/mini-os/include/hypervisor.h >> @@ -35,7 +35,6 @@ extern union start_info_union start_info_union; >> #define start_info (start_info_union.start_info) >> >> /* hypervisor.c */ >> -void force_evtchn_callback(void); >> void do_hypervisor_callback(struct pt_regs *regs); >> void mask_evtchn(uint32_t port); >> void unmask_evtchn(uint32_t port); >> diff --git a/extras/mini-os/include/x86/os.h >> b/extras/mini-os/include/x86/os.h >> index 73b8297..8eea1be 100644 >> --- a/extras/mini-os/include/x86/os.h >> +++ b/extras/mini-os/include/x86/os.h >> @@ -160,6 +160,23 @@ do { >> \ >> */ >> typedef struct { volatile int counter; } atomic_t; >> >> +static inline void force_evtchn_callback(void) >> +{ >> + int save; >> + vcpu_info_t *vcpu; >> + vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; >> + save = vcpu->evtchn_upcall_mask; >> + >> + while (vcpu->evtchn_upcall_pending) { >> + vcpu->evtchn_upcall_mask = 1; >> + barrier(); >> + do_hypervisor_callback(NULL); >> + barrier(); >> + vcpu->evtchn_upcall_mask = save; >> + barrier(); >> + }; >> +} >> + >> >> /************************** i386 *******************************/ >> #ifdef __INSIDE_MINIOS__ > > -- Dr Thomas Leonard http://0install.net/ GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1 GPG: DA98 25AE CAD0 8975 7CDA BD8E 0713 3F96 CA74 D8BA _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |