# HG changeset patch # User gingold@virtu10 # Node ID 2458be180782060cc805bc2f5e3ff165391d50ee # Parent 8314141cfe543d0e83b15a6eca9569df4b82a0b2 Transparent virtualization fixes. Signed-off-by: Tristan Gingold diff -r 8314141cfe54 -r 2458be180782 linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Tue Jun 20 17:02:22 2006 -0600 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c Wed Jun 21 15:19:57 2006 +0200 @@ -464,10 +464,10 @@ static int __init balloon_init(void) unsigned long pfn; struct page *page; - IPRINTK("Initialising balloon driver.\n"); - if (!is_running_on_xen()) return -ENODEV; + + IPRINTK("Initialising balloon driver.\n"); current_pages = min(xen_start_info->nr_pages, max_pfn); totalram_pages = current_pages; diff -r 8314141cfe54 -r 2458be180782 linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c --- a/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c Tue Jun 20 17:02:22 2006 -0600 +++ b/linux-2.6-xen-sparse/drivers/xen/core/cpu_hotplug.c Wed Jun 21 15:19:57 2006 +0200 @@ -109,6 +109,9 @@ static int __init setup_vcpu_hotplug_eve static struct notifier_block xsn_cpu = { .notifier_call = setup_cpu_watcher }; + if (!is_running_on_xen()) + return -ENODEV; + register_cpu_notifier(&hotplug_cpu); register_xenstore_notifier(&xsn_cpu); diff -r 8314141cfe54 -r 2458be180782 linux-2.6-xen-sparse/drivers/xen/core/evtchn.c --- a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c Tue Jun 20 17:02:22 2006 -0600 +++ b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c Wed Jun 21 15:19:57 2006 +0200 @@ -666,7 +666,11 @@ int irq_ignore_unhandled(unsigned int ir int irq_ignore_unhandled(unsigned int irq) { struct physdev_irq_status_query irq_status = { .irq = irq }; - (void)HYPERVISOR_physdev_op(PHYSDEVOP_irq_status_query, &irq_status); + + if (!is_running_on_xen()) + return 0; + + (void)HYPERVISOR_physdev_op(PHYSDEVOP_irq_status_query,&irq_status); return !!(irq_status.flags & XENIRQSTAT_shared); }