Back to home page

OSCL-LXR

 
 

    


0001 /******************************************************************************
0002  * hypervisor.h
0003  *
0004  * Linux-specific hypervisor handling.
0005  *
0006  * Copyright (c) 2002-2004, K A Fraser
0007  *
0008  * This program is free software; you can redistribute it and/or
0009  * modify it under the terms of the GNU General Public License version 2
0010  * as published by the Free Software Foundation; or, when distributed
0011  * separately from the Linux kernel or incorporated into other
0012  * software packages, subject to the following license:
0013  *
0014  * Permission is hereby granted, free of charge, to any person obtaining a copy
0015  * of this source file (the "Software"), to deal in the Software without
0016  * restriction, including without limitation the rights to use, copy, modify,
0017  * merge, publish, distribute, sublicense, and/or sell copies of the Software,
0018  * and to permit persons to whom the Software is furnished to do so, subject to
0019  * the following conditions:
0020  *
0021  * The above copyright notice and this permission notice shall be included in
0022  * all copies or substantial portions of the Software.
0023  *
0024  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0025  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0026  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
0027  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
0028  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
0029  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
0030  * IN THE SOFTWARE.
0031  */
0032 
0033 #ifndef _ASM_X86_XEN_HYPERVISOR_H
0034 #define _ASM_X86_XEN_HYPERVISOR_H
0035 
0036 extern struct shared_info *HYPERVISOR_shared_info;
0037 extern struct start_info *xen_start_info;
0038 
0039 #include <asm/processor.h>
0040 
0041 static inline uint32_t xen_cpuid_base(void)
0042 {
0043     return hypervisor_cpuid_base("XenVMMXenVMM", 2);
0044 }
0045 
0046 struct pci_dev;
0047 
0048 #ifdef CONFIG_XEN_PV_DOM0
0049 bool xen_initdom_restore_msi(struct pci_dev *dev);
0050 #else
0051 static inline bool xen_initdom_restore_msi(struct pci_dev *dev) { return true; }
0052 #endif
0053 
0054 #ifdef CONFIG_HOTPLUG_CPU
0055 void xen_arch_register_cpu(int num);
0056 void xen_arch_unregister_cpu(int num);
0057 #endif
0058 
0059 #ifdef CONFIG_PVH
0060 void __init xen_pvh_init(struct boot_params *boot_params);
0061 void __init mem_map_via_hcall(struct boot_params *boot_params_p);
0062 #endif
0063 
0064 #endif /* _ASM_X86_XEN_HYPERVISOR_H */