Nested Virtualization: localevent
PATCH 2/15 Nested Virtualization: localevent
Signed-off-by Christoph Egger <[email protected]>
Signature · 6 lines
---to satisfy European Law for business letters: Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Andrew Bowd, Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632
# HG changeset patch
# User cegger
# Date 1274771180 -7200
Change local_event_delivery_* to take vcpu argument.
This is needed as 'current' is not accessable on guest shutdown/destroy. This fixes spurious xen crashes on shutdown/destroy with nestedhvm enabled.
xen/arch/ia64/xen/hypercall.c +2 -2
@@ -309,13 +309,13 @@ ia64_hypercall(struct pt_regs *regs)do_softirq ();stop_timer (&v->arch.hlt_timer);/* do_block() calls -* local_event_delivery_enable(), +* local_event_delivery_enable(v), * but PAL CALL must be called with * psr.i = 0 and psr.i is unchanged. * SDM vol.2 Part I 11.10.2 * PAL Calling Conventions. */ -local_event_delivery_disable (); +local_event_delivery_disable (v); } regs->r8 =0 ; regs->r9 =0 ;
xen/common/schedule.c +1 -1
@@ -547,7 +547,7 @@ static long do_block(void) {struct vcpu *v = current; -local_event_delivery_enable (); +local_event_delivery_enable (v);set_bit (_VPF_blocked, &v->pause_flags);/* Check for events /after/ blocking: avoids wakeup waiting race. */
xen/include/asm-ia64/event.h +6 -6
@@ -48,19 +48,19 @@ static inline int local_events_need_delireturn event_pending (current); } -static inline int local_event_delivery_is_enabled (void ) +static inline int local_event_delivery_is_enabled (struct vcpu *v) { -return !current->vcpu_info->evtchn_upcall_mask; +return !v->vcpu_info->evtchn_upcall_mask; } -static inline void local_event_delivery_disable (void ) +static inline void local_event_delivery_disable (struct vcpu *v) { - current->vcpu_info->evtchn_upcall_mask =1 ; + v->vcpu_info->evtchn_upcall_mask =1 ; } -static inline void local_event_delivery_enable (void ) +static inline void local_event_delivery_enable (struct vcpu *v) { - current->vcpu_info->evtchn_upcall_mask =0 ; + v->vcpu_info->evtchn_upcall_mask =0 ; }static inline int arch_virq_is_global (int virq)
xen/include/asm-x86/event.h +6 -6
@@ -23,19 +23,19 @@ static inline int local_events_need_deli !vcpu_info(v, evtchn_upcall_mask))); } -static inline int local_event_delivery_is_enabled (void ) +static inline int local_event_delivery_is_enabled (struct vcpu *v) { -return !vcpu_info (current, evtchn_upcall_mask); +return !vcpu_info (v, evtchn_upcall_mask); } -static inline void local_event_delivery_disable (void ) +static inline void local_event_delivery_disable (struct vcpu *v) { -vcpu_info (current, evtchn_upcall_mask) =1 ; +vcpu_info (v, evtchn_upcall_mask) =1 ; } -static inline void local_event_delivery_enable (void ) +static inline void local_event_delivery_enable (struct vcpu *v) { -vcpu_info (current, evtchn_upcall_mask) =0 ; +vcpu_info (v, evtchn_upcall_mask) =0 ; }/* No arch specific virq definition now. Default to global. */
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel