|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [RFC][PATCH 05/10] xen/hybrid: Add PV halt support
Signed-off-by: Sheng Yang <sheng@xxxxxxxxxxxxxxx>
---
arch/x86/xen/enlighten.c | 2 ++
arch/x86/xen/irq.c | 10 ++++++++++
arch/x86/xen/xen-ops.h | 1 +
3 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c
index b290d65..b95c696 100644
--- a/arch/x86/xen/enlighten.c
+++ b/arch/x86/xen/enlighten.c
@@ -1122,5 +1122,7 @@ void __init xen_start_hybrid(void)
r = init_hybrid_info();
if (r < 0)
return;
+
+ xen_hybrid_init_irq_ops();
}
diff --git a/arch/x86/xen/irq.c b/arch/x86/xen/irq.c
index cfd1779..52885c1 100644
--- a/arch/x86/xen/irq.c
+++ b/arch/x86/xen/irq.c
@@ -98,6 +98,10 @@ PV_CALLEE_SAVE_REGS_THUNK(xen_irq_enable);
static void xen_safe_halt(void)
{
+ /* Do local_irq_enable() explicitly in hybrid guest */
+ if (xen_hybrid_enabled())
+ local_irq_enable();
+
/* Blocking includes an implicit local_irq_enable(). */
if (HYPERVISOR_sched_op(SCHEDOP_block, NULL) != 0)
BUG();
@@ -130,3 +134,9 @@ void __init xen_init_irq_ops()
{
pv_irq_ops = xen_irq_ops;
}
+
+void __init xen_hybrid_init_irq_ops(void)
+{
+ pv_irq_ops.safe_halt = xen_safe_halt;
+ pv_irq_ops.halt = xen_halt;
+}
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h
index ca6596b..9bb90d5 100644
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -43,6 +43,7 @@ void xen_vcpu_restore(void);
void __init xen_build_dynamic_phys_to_machine(void);
void xen_init_irq_ops(void);
+void xen_hybrid_init_irq_ops(void);
void xen_setup_timer(int cpu);
void xen_teardown_timer(int cpu);
cycle_t xen_clocksource_read(void);
--
1.5.4.5
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|