From: Christoph Egger <Christoph.Egger@amd.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH 2/15] Nested Virtualization: localevent
Date: Thu, 3 Jun 2010 18:05:38 +0200 [thread overview]
Message-ID: <201006031805.38305.Christoph.Egger@amd.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 341 bytes --]
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---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
[-- Attachment #2: xen_nh02_localevent.diff --]
[-- Type: text/x-diff, Size: 3228 bytes --]
# 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.
diff -r 357c949c1dcc -r 8dd8474427c6 xen/arch/ia64/xen/hypercall.c
--- a/xen/arch/ia64/xen/hypercall.c
+++ b/xen/arch/ia64/xen/hypercall.c
@@ -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;
diff -r 357c949c1dcc -r 8dd8474427c6 xen/common/schedule.c
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -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. */
diff -r 357c949c1dcc -r 8dd8474427c6 xen/include/asm-ia64/event.h
--- a/xen/include/asm-ia64/event.h
+++ b/xen/include/asm-ia64/event.h
@@ -48,19 +48,19 @@ static inline int local_events_need_deli
return 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)
diff -r 357c949c1dcc -r 8dd8474427c6 xen/include/asm-x86/event.h
--- a/xen/include/asm-x86/event.h
+++ b/xen/include/asm-x86/event.h
@@ -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. */
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2010-06-03 16:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=201006031805.38305.Christoph.Egger@amd.com \
--to=christoph.egger@amd.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.