[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 12/13] xen: register 3-level event channel
3-level event channel is registered in a) xen_init_IRQ(), when the guest is fresh started; b) xen_vcpu_restore(), when the guest is restored. Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> --- arch/x86/xen/enlighten.c | 13 +++++++++++++ drivers/xen/events.c | 11 ++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index bc893e7..919c7ed 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -43,6 +43,7 @@ #include <xen/hvm.h> #include <xen/hvc-console.h> #include <xen/acpi.h> +#include <xen/events.h> #include <asm/paravirt.h> #include <asm/apic.h> @@ -177,6 +178,7 @@ static void xen_vcpu_setup(int cpu) void xen_vcpu_restore(void) { int cpu; + int rc; for_each_possible_cpu(cpu) { bool other_cpu = (cpu != smp_processor_id()); @@ -195,6 +197,17 @@ void xen_vcpu_restore(void) HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL)) BUG(); } + + rc = xen_event_channel_register_nlevel(3); + if (!rc) { + printk(KERN_INFO "Register 3-level event channel succeeded.\n"); + xen_set_event_channel_nlevel(3); + } else { + printk(KERN_INFO "Register 3-level event channel failed with %d.\n" + "Fall back to default 2-level event channel.\n", + rc); + xen_set_event_channel_nlevel(2); + } } static void __init xen_banner(void) diff --git a/drivers/xen/events.c b/drivers/xen/events.c index f77909d..87088b2 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -2261,7 +2261,16 @@ void __init xen_init_IRQ(void) int i, rc; int cpu; - xen_set_event_channel_nlevel(2); + rc = xen_event_channel_register_nlevel(3); + if (!rc) { + printk(KERN_INFO "Register 3-level event channel succeeded.\n"); + xen_set_event_channel_nlevel(3); + } else { + printk(KERN_INFO "Register 3-level event channel failed with %d.\n" + "Fall back to default 2-level event channel.\n", + rc); + xen_set_event_channel_nlevel(2); + } evtchn_to_irq = kcalloc(nr_event_channels, sizeof(*evtchn_to_irq), GFP_KERNEL); -- 1.7.10.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |