~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/ia64/xen/hypervisor.c

Version: ~ [ linux-5.10-rc1 ] ~ [ linux-5.9.1 ] ~ [ linux-5.8.16 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.72 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.152 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.202 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.240 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.240 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.85 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /******************************************************************************
  2  * arch/ia64/xen/hypervisor.c
  3  *
  4  * Copyright (c) 2006 Isaku Yamahata <yamahata at valinux co jp>
  5  *                    VA Linux Systems Japan K.K.
  6  *
  7  * This program is free software; you can redistribute it and/or modify
  8  * it under the terms of the GNU General Public License as published by
  9  * the Free Software Foundation; either version 2 of the License, or
 10  * (at your option) any later version.
 11  *
 12  * This program is distributed in the hope that it will be useful,
 13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 15  * GNU General Public License for more details.
 16  *
 17  * You should have received a copy of the GNU General Public License
 18  * along with this program; if not, write to the Free Software
 19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 20  *
 21  */
 22 
 23 #include <linux/efi.h>
 24 #include <linux/export.h>
 25 #include <asm/xen/hypervisor.h>
 26 #include <asm/xen/privop.h>
 27 
 28 #include "irq_xen.h"
 29 
 30 struct shared_info *HYPERVISOR_shared_info __read_mostly =
 31         (struct shared_info *)XSI_BASE;
 32 EXPORT_SYMBOL(HYPERVISOR_shared_info);
 33 
 34 DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu);
 35 
 36 struct start_info *xen_start_info;
 37 EXPORT_SYMBOL(xen_start_info);
 38 
 39 EXPORT_SYMBOL(xen_domain_type);
 40 
 41 EXPORT_SYMBOL(__hypercall);
 42 
 43 /* Stolen from arch/x86/xen/enlighten.c */
 44 /*
 45  * Flag to determine whether vcpu info placement is available on all
 46  * VCPUs.  We assume it is to start with, and then set it to zero on
 47  * the first failure.  This is because it can succeed on some VCPUs
 48  * and not others, since it can involve hypervisor memory allocation,
 49  * or because the guest failed to guarantee all the appropriate
 50  * constraints on all VCPUs (ie buffer can't cross a page boundary).
 51  *
 52  * Note that any particular CPU may be using a placed vcpu structure,
 53  * but we can only optimise if the all are.
 54  *
 55  * 0: not available, 1: available
 56  */
 57 
 58 static void __init xen_vcpu_setup(int cpu)
 59 {
 60         /*
 61          * WARNING:
 62          * before changing MAX_VIRT_CPUS,
 63          * check that shared_info fits on a page
 64          */
 65         BUILD_BUG_ON(sizeof(struct shared_info) > PAGE_SIZE);
 66         per_cpu(xen_vcpu, cpu) = &HYPERVISOR_shared_info->vcpu_info[cpu];
 67 }
 68 
 69 void __init xen_setup_vcpu_info_placement(void)
 70 {
 71         int cpu;
 72 
 73         for_each_possible_cpu(cpu)
 74                 xen_vcpu_setup(cpu);
 75 }
 76 
 77 void __cpuinit
 78 xen_cpu_init(void)
 79 {
 80         xen_smp_intr_init();
 81 }
 82 
 83 /**************************************************************************
 84  * opt feature
 85  */
 86 void
 87 xen_ia64_enable_opt_feature(void)
 88 {
 89         /* Enable region 7 identity map optimizations in Xen */
 90         struct xen_ia64_opt_feature optf;
 91 
 92         optf.cmd = XEN_IA64_OPTF_IDENT_MAP_REG7;
 93         optf.on = XEN_IA64_OPTF_ON;
 94         optf.pgprot = pgprot_val(PAGE_KERNEL);
 95         optf.key = 0;   /* No key on linux. */
 96         HYPERVISOR_opt_feature(&optf);
 97 }
 98 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp