ia64/xen-unstable

changeset 10504:fc1c6dfd1807

[LINUX] Transparent virtualization fixes.
Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
author kaf24@firebug.cl.cam.ac.uk
date Wed Jun 21 16:54:09 2006 +0100 (2006-06-21)
parents 59e05ddfd0ad
children 79ea1d8a5bb2
files linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c linux-2.6-xen-sparse/drivers/xen/core/evtchn.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Wed Jun 21 10:56:20 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Wed Jun 21 16:54:09 2006 +0100
     1.3 @@ -468,11 +468,11 @@ static int __init balloon_init(void)
     1.4  	unsigned long pfn;
     1.5  	struct page *page;
     1.6  
     1.7 -	IPRINTK("Initialising balloon driver.\n");
     1.8 -
     1.9  	if (!is_running_on_xen())
    1.10  		return -ENODEV;
    1.11  
    1.12 +	IPRINTK("Initialising balloon driver.\n");
    1.13 +
    1.14  	current_pages = min(xen_start_info->nr_pages, max_pfn);
    1.15  	totalram_pages = current_pages;
    1.16  	target_pages  = current_pages;
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c	Wed Jun 21 10:56:20 2006 +0100
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c	Wed Jun 21 16:54:09 2006 +0100
     2.3 @@ -109,6 +109,9 @@ static int __init setup_vcpu_hotplug_eve
     2.4  	static struct notifier_block xsn_cpu = {
     2.5  		.notifier_call = setup_cpu_watcher };
     2.6  
     2.7 +	if (!is_running_on_xen())
     2.8 +		return -ENODEV;
     2.9 +
    2.10  	register_cpu_notifier(&hotplug_cpu);
    2.11  	register_xenstore_notifier(&xsn_cpu);
    2.12  
     3.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c	Wed Jun 21 10:56:20 2006 +0100
     3.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c	Wed Jun 21 16:54:09 2006 +0100
     3.3 @@ -666,6 +666,10 @@ static struct hw_interrupt_type pirq_typ
     3.4  int irq_ignore_unhandled(unsigned int irq)
     3.5  {
     3.6  	struct physdev_irq_status_query irq_status = { .irq = irq };
     3.7 +
     3.8 +	if (!is_running_on_xen())
     3.9 +		return 0;
    3.10 +
    3.11  	(void)HYPERVISOR_physdev_op(PHYSDEVOP_irq_status_query, &irq_status);
    3.12  	return !!(irq_status.flags & XENIRQSTAT_shared);
    3.13  }