├── stubdom ├── c │ ├── minios.cfg │ ├── main.c │ └── Makefile ├── caml │ ├── minios.cfg │ ├── hello.ml │ └── Makefile ├── grub │ ├── minios.cfg │ ├── mini-os.h │ ├── config.h │ └── osdep.h ├── ioemu-minios.cfg ├── lwip.patch-cvs ├── grub.patches │ ├── 10graphics.diff │ └── 11graphics-keyboard.diff ├── libpci.config.mak ├── libpci.config.h ├── xenstore-minios.cfg ├── vtpmmgr │ ├── common_types.h │ ├── minios.cfg │ ├── mgmt_authority.h │ └── disk_io.h ├── vtpm │ └── minios.cfg ├── vtpm-bufsize.patch ├── ocaml.patch ├── newlib-stdint-size_max-fix-from-1.17.0.patch ├── lwip.dhcp_create_request-hwaddr_len.patch ├── tpmemu-0.7.4.patch └── vtpm-cmake-Wextra.patch ├── tools ├── pygrub │ ├── src │ │ └── __init__.py │ ├── examples │ │ └── alpine-linux-2.3.2.extlinux │ ├── README │ └── Makefile ├── python │ ├── xen │ │ ├── __init__.py │ │ ├── migration │ │ │ ├── __init__.py │ │ │ ├── xl.py │ │ │ └── public.py │ │ └── lowlevel │ │ │ └── __init__.py │ └── README ├── tests │ ├── vhpet │ │ └── .gitignore │ ├── mce-test │ │ ├── Makefile │ │ └── tools │ │ │ └── Makefile │ ├── regression │ │ └── scripts │ │ │ ├── download_python.sh │ │ │ ├── build_python.sh │ │ │ └── check_python_syntax.sh │ ├── x86_emulator │ │ ├── blowfish.mk │ │ └── x86_emulate.c │ ├── Makefile │ ├── mem-sharing │ │ └── Makefile │ └── xen-access │ │ └── Makefile ├── xenstore │ ├── include │ │ └── compat │ │ │ ├── xs.h │ │ │ └── xs_lib.h │ ├── .gdbinit │ ├── README │ ├── TODO │ ├── xenstore_control.c │ └── xenstored_osdep.h ├── firmware │ ├── vgabios │ │ ├── BUGS │ │ ├── Notes │ │ ├── dataseghack │ │ └── TODO │ ├── etherboot │ │ ├── patches │ │ │ ├── series │ │ │ ├── build_fix_3.patch │ │ │ └── build-compare.patch │ │ └── Config │ ├── hvmloader │ │ ├── config-seabios.h │ │ ├── acpi │ │ │ └── README │ │ ├── e820.h │ │ └── hvm_param.c │ ├── rombios │ │ ├── e820.h │ │ ├── 32bit │ │ │ └── tcgbios │ │ │ │ ├── Makefile │ │ │ │ └── tpm_drivers.h │ │ └── 32bitprotos.h │ ├── Rules.mk │ └── ovmf-makefile ├── xenstat │ ├── libxenstat │ │ └── bindings │ │ │ └── swig │ │ │ ├── perl │ │ │ └── .empty │ │ │ ├── python │ │ │ └── .empty │ │ │ └── xenstat.i │ └── Makefile ├── ocaml │ ├── libs │ │ ├── mmap │ │ │ ├── META.in │ │ │ └── Makefile │ │ ├── xentoollog │ │ │ └── META.in │ │ ├── xb │ │ │ └── META.in │ │ ├── xc │ │ │ └── META.in │ │ ├── xl │ │ │ └── META.in │ │ ├── xs │ │ │ └── META.in │ │ ├── eventchn │ │ │ └── META.in │ │ └── Makefile │ ├── test │ │ ├── raise_exception.ml │ │ ├── send_debug_keys.ml │ │ └── dmesg.ml │ ├── Makefile │ ├── common.make │ └── xenstored │ │ └── systemd.ml ├── debugger │ ├── gdbsx │ │ ├── Rules.mk │ │ ├── gx │ │ │ └── Makefile │ │ └── Makefile │ └── kdd │ │ └── Makefile ├── hotplug │ ├── Linux │ │ ├── vif-setup.in │ │ ├── systemd │ │ │ ├── proc-xen.mount.in │ │ │ ├── var-lib-xenstored.mount.in │ │ │ ├── xen-watchdog.service.in │ │ │ ├── xenstored.socket.in │ │ │ ├── xenstored_ro.socket.in │ │ │ ├── xen-init-dom0.service.in │ │ │ ├── xendomains.service.in │ │ │ ├── xen-qemu-dom0-disk-backend.service.in │ │ │ ├── xenconsoled.service.in │ │ │ ├── show_service_dependencies.sh │ │ │ └── xenstored.service.in │ │ ├── vscsi │ │ ├── block-nbd │ │ ├── block-enbd │ │ └── logging.sh │ ├── Makefile │ └── NetBSD │ │ ├── rc.d │ │ └── xen-watchdog │ │ ├── vif-ip │ │ └── vif-bridge ├── cross-install ├── flask │ ├── policy │ │ └── policy │ │ │ ├── global_tunables │ │ │ ├── modules.conf │ │ │ ├── security_classes │ │ │ ├── users │ │ │ └── access_vectors │ └── Makefile ├── libxc │ ├── xc_dom_decompress.h │ ├── xc_dom_decompress_unsafe_bzip2.c │ ├── xc_dom_decompress_unsafe_lzma.c │ ├── xc_sr_common_x86.h │ └── xc_elf.h ├── examples │ ├── vnc │ │ └── Xservers │ └── cpupool ├── libfsimage │ ├── fat │ │ └── Makefile │ ├── ufs │ │ └── Makefile │ ├── xfs │ │ └── Makefile │ ├── ext2fs │ │ └── Makefile │ ├── reiserfs │ │ └── Makefile │ ├── iso9660 │ │ └── Makefile │ ├── ext2fs-lib │ │ └── Makefile │ ├── Makefile │ ├── Rules.mk │ └── common │ │ ├── mapfile-SunOS │ │ └── mapfile-GNU ├── libxl │ ├── xlutil.pc.in.in │ ├── libxl_test_timedereg.h │ ├── test_timedereg.c │ ├── xenlight.pc.in.in │ ├── libxl_test_fdevent.h │ ├── bash-completion │ ├── check-libxl-api-rules │ ├── libxlu_disk_i.h │ └── test_common.h ├── blktap2 │ ├── include │ │ └── Makefile │ ├── drivers │ │ ├── check_gcrypt │ │ ├── md5.h │ │ ├── aes.h │ │ └── blk_netbsd.c │ ├── Makefile │ └── lvm │ │ └── Makefile ├── misc │ └── xen-bugtool ├── console │ └── testsuite │ │ └── Makefile ├── xentrace │ └── mread.h ├── xenpmd │ └── Makefile └── include │ ├── xen-foreign │ └── reference.size │ └── xen-external │ └── README ├── .bk-to-hg ├── .hg-to-bk ├── xen ├── common │ ├── hvm │ │ └── Makefile │ ├── gcov │ │ └── Makefile │ ├── libelf │ │ ├── README │ │ └── Makefile │ ├── libfdt │ │ ├── TODO │ │ ├── Makefile │ │ └── Makefile.libfdt │ ├── compat │ │ ├── Makefile │ │ └── tmem_xen.c │ ├── symbols-dummy.c │ ├── decompress.h │ └── guestcopy.c ├── drivers │ ├── pci │ │ └── Makefile │ ├── passthrough │ │ ├── arm │ │ │ └── Makefile │ │ ├── vtd │ │ │ ├── x86 │ │ │ │ └── Makefile │ │ │ └── Makefile │ │ ├── x86 │ │ │ └── Makefile │ │ ├── Makefile │ │ └── amd │ │ │ └── Makefile │ ├── acpi │ │ ├── utilities │ │ │ └── Makefile │ │ ├── apei │ │ │ └── Makefile │ │ ├── tables │ │ │ └── Makefile │ │ └── Makefile │ ├── video │ │ ├── font_8x8.c │ │ ├── font_8x14.c │ │ ├── font_8x16.c │ │ ├── Makefile │ │ └── font.h │ ├── cpufreq │ │ └── Makefile │ ├── Makefile │ └── char │ │ └── Makefile ├── crypto │ └── Makefile ├── arch │ ├── x86 │ │ ├── x86_64 │ │ │ ├── compat │ │ │ │ └── Makefile │ │ │ ├── Makefile │ │ │ ├── machine_kexec.c │ │ │ └── compat.c │ │ ├── cpu │ │ │ ├── mtrr │ │ │ │ └── Makefile │ │ │ ├── mcheck │ │ │ │ ├── util.h │ │ │ │ ├── mce_amd.h │ │ │ │ ├── Makefile │ │ │ │ ├── util.c │ │ │ │ └── mcaction.h │ │ │ ├── Makefile │ │ │ └── cpu.h │ │ ├── acpi │ │ │ ├── cpufreq │ │ │ │ └── Makefile │ │ │ └── Makefile │ │ ├── efi │ │ │ ├── check.c │ │ │ ├── relocs-dummy.S │ │ │ ├── runtime.h │ │ │ └── Makefile │ │ ├── genapic │ │ │ ├── Makefile │ │ │ └── default.c │ │ ├── hvm │ │ │ ├── vmx │ │ │ │ └── Makefile │ │ │ ├── svm │ │ │ │ └── Makefile │ │ │ └── Makefile │ │ ├── oprofile │ │ │ └── Makefile │ │ ├── mm │ │ │ ├── shadow │ │ │ │ └── Makefile │ │ │ ├── hap │ │ │ │ └── Makefile │ │ │ └── Makefile │ │ ├── boot │ │ │ └── Makefile │ │ ├── clear_page.S │ │ └── delay.c │ └── arm │ │ ├── dtb.S │ │ ├── efi │ │ ├── Makefile │ │ └── runtime.h │ │ ├── arm64 │ │ ├── lib │ │ │ ├── Makefile │ │ │ └── assembler.h │ │ └── Makefile │ │ ├── arm32 │ │ ├── Makefile │ │ ├── lib │ │ │ ├── Makefile │ │ │ ├── setbit.S │ │ │ ├── changebit.S │ │ │ ├── clearbit.S │ │ │ ├── testsetbit.S │ │ │ ├── testchangebit.S │ │ │ ├── testclearbit.S │ │ │ ├── memchr.S │ │ │ ├── strrchr.S │ │ │ └── strchr.S │ │ ├── smpboot.c │ │ └── domctl.c │ │ ├── platforms │ │ └── Makefile │ │ ├── physdev.c │ │ ├── smc.S │ │ └── sysctl.c ├── include │ ├── asm-arm │ │ ├── efibind.h │ │ ├── pci.h │ │ ├── spinlock.h │ │ ├── arm32 │ │ │ ├── macros.h │ │ │ └── bug.h │ │ ├── random.h │ │ ├── arm64 │ │ │ ├── bug.h │ │ │ └── vfp.h │ │ ├── desc.h │ │ ├── hvm │ │ │ └── iommu.h │ │ ├── trace.h │ │ ├── xenoprof.h │ │ ├── delay.h │ │ ├── nmi.h │ │ ├── multicall.h │ │ ├── softirq.h │ │ ├── debugger.h │ │ ├── paging.h │ │ ├── byteorder.h │ │ ├── perfc.h │ │ ├── io.h │ │ ├── macros.h │ │ ├── cache.h │ │ ├── init.h │ │ ├── iocap.h │ │ ├── vfp.h │ │ ├── platforms │ │ │ ├── exynos5.h │ │ │ └── midway.h │ │ ├── hypercall.h │ │ ├── asm_defns.h │ │ ├── elf.h │ │ ├── numa.h │ │ ├── early_printk.h │ │ └── hardirq.h │ ├── asm-x86 │ │ ├── efibind.h │ │ ├── init.h │ │ ├── perfc.h │ │ ├── spinlock.h │ │ ├── compat.h │ │ ├── mach-generic │ │ │ └── mach_mpparse.h │ │ ├── delay.h │ │ ├── mach-default │ │ │ ├── mach_mpspec.h │ │ │ ├── mach_wakecpu.h │ │ │ ├── bios_ebda.h │ │ │ ├── mach_mpparse.h │ │ │ └── io_ports.h │ │ ├── bzimage.h │ │ ├── cache.h │ │ ├── hvm │ │ │ ├── guest_access.h │ │ │ └── cacheattr.h │ │ ├── elf.h │ │ ├── random.h │ │ ├── div64.h │ │ ├── mwait.h │ │ ├── machine_kexec.h │ │ ├── string.h │ │ ├── device.h │ │ ├── softirq.h │ │ ├── x86_emulate.h │ │ ├── hardirq.h │ │ └── percpu.h │ └── xen │ │ ├── stdbool.h │ │ ├── pfn.h │ │ ├── random.h │ │ ├── delay.h │ │ ├── pci_ids.h │ │ ├── sort.h │ │ ├── earlycpio.h │ │ ├── nmi.h │ │ ├── stdarg.h │ │ ├── stringify.h │ │ ├── shutdown.h │ │ ├── errno.h │ │ ├── vga.h │ │ ├── early_printk.h │ │ ├── cache.h │ │ ├── compile.h.in │ │ ├── symbols.h │ │ ├── numa.h │ │ ├── version.h │ │ ├── tmem.h │ │ ├── video.h │ │ ├── paging.h │ │ ├── libfdt │ │ └── libfdt_env.h │ │ ├── pmstat.h │ │ ├── const.h │ │ ├── multicall.h │ │ ├── percpu.h │ │ ├── watchdog.h │ │ ├── stop_machine.h │ │ └── vmap.h ├── xsm │ ├── Makefile │ └── flask │ │ ├── ss │ │ ├── Makefile │ │ ├── services.h │ │ └── symtab.h │ │ ├── policy │ │ ├── initial_sids │ │ └── security_classes │ │ └── include │ │ ├── avc_ss.h │ │ ├── conditional.h │ │ └── objsec.h └── tools │ ├── Makefile │ ├── fig-to-oct.py │ └── compat-build-header.py ├── unmodified_drivers └── linux-2.6 │ ├── xenbus │ └── empty_directory │ ├── balloon │ ├── Makefile │ └── Kbuild │ ├── blkfront │ ├── Makefile │ └── Kbuild │ ├── netfront │ ├── Makefile │ └── Kbuild │ ├── scsifront │ ├── Makefile │ └── Kbuild │ ├── usbfront │ ├── Makefile │ └── Kbuild │ ├── platform-pci │ ├── Makefile │ └── Kbuild │ ├── Makefile │ ├── compat-include │ ├── linux │ │ ├── io.h │ │ └── scatterlist.h │ └── asm-generic │ │ ├── pgtable-nopmd.h │ │ └── pgtable-nopud.h │ └── overrides.mk ├── config ├── OpenBSD.mk ├── Toplevel.mk.in ├── Linux.mk ├── FreeBSD.mk ├── NetBSD.mk ├── NetBSDRump.mk ├── Docs.mk.in ├── MiniOS.mk ├── arm64.mk ├── x86_32.mk ├── arm32.mk └── x86_64.mk ├── m4 ├── savevar.m4 ├── path_or_fail.m4 ├── uuid.m4 ├── checkpolicy.m4 ├── depends.m4 ├── fetcher.m4 ├── python_version.m4 ├── docs_tool.m4 ├── set_cflags_ldflags.m4 ├── features.m4 ├── extfs.m4 └── curses.m4 ├── autogen.sh ├── version.sh ├── docs ├── figs │ └── Makefile ├── misc │ └── arm │ │ └── device-tree │ │ └── passthrough.txt └── README.xen-bugtool ├── CREDITS ├── scripts └── git-checkout.sh └── install.sh /stubdom/c/minios.cfg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /stubdom/caml/minios.cfg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/pygrub/src/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.bk-to-hg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exit 0 3 | -------------------------------------------------------------------------------- /.hg-to-bk: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | exit 0 3 | -------------------------------------------------------------------------------- /tools/python/xen/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tools/python/xen/migration/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/python/xen/lowlevel/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /xen/common/hvm/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += save.o 2 | -------------------------------------------------------------------------------- /xen/drivers/pci/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += pci.o 2 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/xenbus/empty_directory: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /xen/common/gcov/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += gcov.o 2 | 3 | -------------------------------------------------------------------------------- /config/OpenBSD.mk: -------------------------------------------------------------------------------- 1 | include $(XEN_ROOT)/config/StdGNU.mk 2 | -------------------------------------------------------------------------------- /xen/crypto/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += rijndael.o 2 | obj-y += vmac.o 3 | -------------------------------------------------------------------------------- /config/Toplevel.mk.in: -------------------------------------------------------------------------------- 1 | SUBSYSTEMS := @SUBSYSTEMS@ 2 | -------------------------------------------------------------------------------- /xen/arch/x86/x86_64/compat/Makefile: -------------------------------------------------------------------------------- 1 | obj-bin-y += entry.o 2 | 3 | -------------------------------------------------------------------------------- /xen/arch/x86/cpu/mtrr/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += generic.o 2 | obj-y += main.o 3 | -------------------------------------------------------------------------------- /xen/drivers/passthrough/arm/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += iommu.o 2 | obj-y += smmu.o 3 | -------------------------------------------------------------------------------- /xen/drivers/passthrough/vtd/x86/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += vtd.o 2 | obj-y += ats.o 3 | -------------------------------------------------------------------------------- /xen/drivers/passthrough/x86/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += ats.o 2 | obj-y += iommu.o 3 | -------------------------------------------------------------------------------- /xen/arch/x86/acpi/cpufreq/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += cpufreq.o 2 | obj-y += powernow.o 3 | -------------------------------------------------------------------------------- /xen/common/libelf/README: -------------------------------------------------------------------------------- 1 | Take care, this code is used by both xen and tools ... 2 | -------------------------------------------------------------------------------- /tools/tests/vhpet/.gitignore: -------------------------------------------------------------------------------- 1 | test_vhpet 2 | test_vhpet.out 3 | hpet.h 4 | hpet.c 5 | -------------------------------------------------------------------------------- /xen/arch/arm/dtb.S: -------------------------------------------------------------------------------- 1 | .section .dtb,#alloc 2 | .incbin CONFIG_DTB_FILE 3 | -------------------------------------------------------------------------------- /xen/drivers/acpi/utilities/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += utglobal.o 2 | obj-bin-y += utmisc.init.o 3 | -------------------------------------------------------------------------------- /xen/include/asm-arm/efibind.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | -------------------------------------------------------------------------------- /xen/include/asm-x86/efibind.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | -------------------------------------------------------------------------------- /stubdom/grub/minios.cfg: -------------------------------------------------------------------------------- 1 | CONFIG_START_NETWORK=n 2 | CONFIG_SPARSE_BSS=n 3 | CONFIG_TPMFRONT=y 4 | -------------------------------------------------------------------------------- /xen/arch/arm/efi/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -fshort-wchar 2 | 3 | obj-y += boot.init.o runtime.o 4 | -------------------------------------------------------------------------------- /xen/arch/arm/efi/runtime.h: -------------------------------------------------------------------------------- 1 | /* Placeholder for ARM-specific runtime include/declarations */ 2 | -------------------------------------------------------------------------------- /stubdom/ioemu-minios.cfg: -------------------------------------------------------------------------------- 1 | CONFIG_START_NETWORK=n 2 | CONFIG_QEMU_XS_ARGS=y 3 | CONFIG_PCIFRONT=y 4 | -------------------------------------------------------------------------------- /stubdom/lwip.patch-cvs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systempanda200/RT-Xen/HEAD/stubdom/lwip.patch-cvs -------------------------------------------------------------------------------- /xen/arch/x86/efi/check.c: -------------------------------------------------------------------------------- 1 | int __attribute__((__ms_abi__)) test(int i) 2 | { 3 | return i; 4 | } 5 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/balloon/Makefile: -------------------------------------------------------------------------------- 1 | ifneq ($(KERNELRELEASE),) 2 | include $(src)/Kbuild 3 | endif 4 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/blkfront/Makefile: -------------------------------------------------------------------------------- 1 | ifneq ($(KERNELRELEASE),) 2 | include $(src)/Kbuild 3 | endif 4 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/netfront/Makefile: -------------------------------------------------------------------------------- 1 | ifneq ($(KERNELRELEASE),) 2 | include $(src)/Kbuild 3 | endif 4 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/scsifront/Makefile: -------------------------------------------------------------------------------- 1 | ifneq ($(KERNELRELEASE),) 2 | include $(src)/Kbuild 3 | endif 4 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/usbfront/Makefile: -------------------------------------------------------------------------------- 1 | ifneq ($(KERNELRELEASE),) 2 | include $(src)/Kbuild 3 | endif 4 | -------------------------------------------------------------------------------- /xen/drivers/video/font_8x8.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systempanda200/RT-Xen/HEAD/xen/drivers/video/font_8x8.c -------------------------------------------------------------------------------- /config/Linux.mk: -------------------------------------------------------------------------------- 1 | include $(XEN_ROOT)/config/StdGNU.mk 2 | 3 | SYSCONFIG_DIR = $(CONFIG_DIR)/$(CONFIG_LEAF_DIR) 4 | -------------------------------------------------------------------------------- /tools/xenstore/include/compat/xs.h: -------------------------------------------------------------------------------- 1 | #warning xs.h is deprecated use xenstore.h instead 2 | #include 3 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/platform-pci/Makefile: -------------------------------------------------------------------------------- 1 | ifneq ($(KERNELRELEASE),) 2 | include $(src)/Kbuild 3 | endif 4 | -------------------------------------------------------------------------------- /xen/drivers/acpi/apei/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += erst.o 2 | obj-y += hest.o 3 | obj-y += apei-base.o 4 | obj-y += apei-io.o 5 | -------------------------------------------------------------------------------- /xen/drivers/video/font_8x14.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systempanda200/RT-Xen/HEAD/xen/drivers/video/font_8x14.c -------------------------------------------------------------------------------- /xen/drivers/video/font_8x16.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systempanda200/RT-Xen/HEAD/xen/drivers/video/font_8x16.c -------------------------------------------------------------------------------- /xen/common/libfdt/TODO: -------------------------------------------------------------------------------- 1 | - Tree traversal functions 2 | - Graft function 3 | - Complete libfdt.h documenting comments 4 | -------------------------------------------------------------------------------- /xen/include/asm-x86/init.h: -------------------------------------------------------------------------------- 1 | #ifndef _XEN_ASM_INIT_H 2 | #define _XEN_ASM_INIT_H 3 | 4 | #endif /* _XEN_ASM_INIT_H */ 5 | -------------------------------------------------------------------------------- /stubdom/caml/hello.ml: -------------------------------------------------------------------------------- 1 | let main arg = 2 | Printf.printf "Hello, world!\n%!." 3 | 4 | let _ = Callback.register "main" main 5 | -------------------------------------------------------------------------------- /stubdom/grub.patches/10graphics.diff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/systempanda200/RT-Xen/HEAD/stubdom/grub.patches/10graphics.diff -------------------------------------------------------------------------------- /tools/xenstore/include/compat/xs_lib.h: -------------------------------------------------------------------------------- 1 | #warning xs_lib.h is deprecated use xenstore_lib.h instead 2 | #include 3 | -------------------------------------------------------------------------------- /config/FreeBSD.mk: -------------------------------------------------------------------------------- 1 | include $(XEN_ROOT)/config/StdGNU.mk 2 | 3 | DLOPEN_LIBS = 4 | 5 | # No wget on FreeBSD base system 6 | WGET = ftp 7 | -------------------------------------------------------------------------------- /config/NetBSD.mk: -------------------------------------------------------------------------------- 1 | include $(XEN_ROOT)/config/StdGNU.mk 2 | 3 | # Override settings for this OS 4 | DLOPEN_LIBS = 5 | 6 | WGET = ftp 7 | -------------------------------------------------------------------------------- /tools/firmware/vgabios/BUGS: -------------------------------------------------------------------------------- 1 | Not all the functions have been implemented yet. 2 | 3 | Please report any bugs to 4 | -------------------------------------------------------------------------------- /xen/arch/x86/cpu/mcheck/util.h: -------------------------------------------------------------------------------- 1 | #ifndef _MCHECK_UTIL_H 2 | #define _MCHECK_UTIL_H 3 | 4 | void mce_panic_check(void); 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /m4/savevar.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AX_SAVEVAR_SAVE],[ 2 | saved_$1="$$1" 3 | ]) 4 | AC_DEFUN([AX_SAVEVAR_RESTORE],[ 5 | $1="$saved_$1" 6 | ]) 7 | -------------------------------------------------------------------------------- /xen/arch/x86/genapic/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += bigsmp.o 2 | obj-y += x2apic.o 3 | obj-y += default.o 4 | obj-y += delivery.o 5 | obj-y += probe.o 6 | -------------------------------------------------------------------------------- /xen/common/libfdt/Makefile: -------------------------------------------------------------------------------- 1 | include Makefile.libfdt 2 | 3 | obj-y += $(LIBFDT_OBJS) 4 | 5 | CFLAGS += -I$(BASEDIR)/include/xen/libfdt/ 6 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/blkfront/Kbuild: -------------------------------------------------------------------------------- 1 | include $(M)/overrides.mk 2 | 3 | obj-m += xen-vbd.o 4 | 5 | xen-vbd-objs := blkfront.o vbd.o 6 | -------------------------------------------------------------------------------- /xen/drivers/cpufreq/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += cpufreq.o 2 | obj-y += cpufreq_ondemand.o 3 | obj-y += cpufreq_misc_governors.o 4 | obj-y += utility.o 5 | -------------------------------------------------------------------------------- /xen/include/asm-arm/pci.h: -------------------------------------------------------------------------------- 1 | #ifndef __X86_PCI_H__ 2 | #define __X86_PCI_H__ 3 | 4 | struct arch_pci_dev { 5 | }; 6 | 7 | #endif /* __X86_PCI_H__ */ 8 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/scsifront/Kbuild: -------------------------------------------------------------------------------- 1 | include $(M)/overrides.mk 2 | 3 | obj-m += xen-scsi.o 4 | 5 | xen-scsi-objs := scsifront.o xenbus.o 6 | 7 | -------------------------------------------------------------------------------- /xen/arch/x86/hvm/vmx/Makefile: -------------------------------------------------------------------------------- 1 | obj-bin-y += entry.o 2 | obj-y += intr.o 3 | obj-y += realmode.o 4 | obj-y += vmcs.o 5 | obj-y += vmx.o 6 | obj-y += vvmx.o 7 | -------------------------------------------------------------------------------- /xen/arch/x86/acpi/Makefile: -------------------------------------------------------------------------------- 1 | subdir-y += cpufreq 2 | 3 | obj-y += lib.o power.o suspend.o cpu_idle.o cpuidle_menu.o 4 | obj-bin-y += boot.init.o wakeup_prot.o 5 | -------------------------------------------------------------------------------- /xen/common/compat/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += domain.o 2 | obj-y += kernel.o 3 | obj-y += memory.o 4 | obj-y += multicall.o 5 | obj-y += xlat.o 6 | obj-y += tmem_xen.o 7 | -------------------------------------------------------------------------------- /tools/xenstat/libxenstat/bindings/swig/perl/.empty: -------------------------------------------------------------------------------- 1 | This directory is empty; this file is included to prevent version control systems from removing the directory. 2 | -------------------------------------------------------------------------------- /tools/xenstat/libxenstat/bindings/swig/python/.empty: -------------------------------------------------------------------------------- 1 | This directory is empty; this file is included to prevent version control systems from removing the directory. 2 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/netfront/Kbuild: -------------------------------------------------------------------------------- 1 | include $(M)/overrides.mk 2 | 3 | obj-m = xen-vnif.o 4 | xen-vnif-objs := netfront.o 5 | xen-vnif-objs += accel.o 6 | -------------------------------------------------------------------------------- /xen/include/asm-arm/spinlock.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_SPINLOCK_H 2 | #define __ASM_SPINLOCK_H 3 | 4 | /* Nothing ARM specific. */ 5 | 6 | #endif /* __ASM_SPINLOCK_H */ 7 | -------------------------------------------------------------------------------- /xen/xsm/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += xsm_core.o 2 | ifeq ($(XSM_ENABLE),y) 3 | obj-y += xsm_policy.o 4 | obj-y += dummy.o 5 | endif 6 | 7 | subdir-$(FLASK_ENABLE) += flask 8 | -------------------------------------------------------------------------------- /stubdom/libpci.config.mak: -------------------------------------------------------------------------------- 1 | LIBZ=-lz 2 | LDLIBS+=$(LIBZ) 3 | PCI_OS_MINIOS=1 4 | PCI_HAVE_STDINT_H=1 5 | PCI_PATH_IDS_DIR=. 6 | PCI_COMPRESSED_IDS=1 7 | PCI_IDS=pci.ids.gz 8 | -------------------------------------------------------------------------------- /tools/ocaml/libs/mmap/META.in: -------------------------------------------------------------------------------- 1 | version = "@VERSION@" 2 | description = "Mmap interface extension" 3 | archive(byte) = "xenmmap.cma" 4 | archive(native) = "xenmmap.cmxa" 5 | -------------------------------------------------------------------------------- /stubdom/c/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | int main(void) { 5 | sleep(2); 6 | printf("Hello, world!\n"); 7 | return 0; 8 | } 9 | -------------------------------------------------------------------------------- /stubdom/libpci.config.h: -------------------------------------------------------------------------------- 1 | #define PCI_OS_MINIOS 2 | #define PCI_HAVE_STDINT_H 3 | #define PCI_PATH_IDS_DIR "." 4 | #define PCI_COMPRESSED_IDS 5 | #define PCI_IDS "pci.ids.gz" 6 | -------------------------------------------------------------------------------- /stubdom/xenstore-minios.cfg: -------------------------------------------------------------------------------- 1 | CONFIG_BLKFRONT=n 2 | CONFIG_NETFRONT=n 3 | CONFIG_FBFRONT=n 4 | CONFIG_KBDFRONT=n 5 | CONFIG_CONSFRONT=n 6 | CONFIG_XENBUS=n 7 | CONFIG_LWIP=n 8 | -------------------------------------------------------------------------------- /config/NetBSDRump.mk: -------------------------------------------------------------------------------- 1 | include $(XEN_ROOT)/config/StdGNU.mk 2 | 3 | DLOPEN_LIBS = 4 | PTHREAD_LIBS = 5 | 6 | WGET = ftp 7 | 8 | XENSTORE_XENSTORED=n 9 | nosharedlibs=y 10 | -------------------------------------------------------------------------------- /tools/debugger/gdbsx/Rules.mk: -------------------------------------------------------------------------------- 1 | include $(XEN_ROOT)/tools/Rules.mk 2 | 3 | CFLAGS += -Werror -Wmissing-prototypes 4 | # (gcc 4.3x and later) -Wconversion -Wno-sign-conversion 5 | -------------------------------------------------------------------------------- /tools/firmware/etherboot/patches/series: -------------------------------------------------------------------------------- 1 | boot_prompt_option.patch 2 | build_fix_1.patch 3 | build_fix_2.patch 4 | build_fix_3.patch 5 | build-compare.patch 6 | build_fix_4.patch 7 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/vif-setup.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if test "$script" 4 | then 5 | exec $script $* 6 | else 7 | exec @XEN_SCRIPT_DIR@/vif-bridge $* 8 | fi 9 | 10 | -------------------------------------------------------------------------------- /tools/ocaml/libs/xentoollog/META.in: -------------------------------------------------------------------------------- 1 | version = "@VERSION@" 2 | description = "Xen Tools Logger Interface" 3 | archive(byte) = "xentoollog.cma" 4 | archive(native) = "xentoollog.cmxa" 5 | -------------------------------------------------------------------------------- /xen/drivers/acpi/tables/Makefile: -------------------------------------------------------------------------------- 1 | obj-bin-y += tbfadt.init.o 2 | obj-bin-y += tbinstal.init.o 3 | obj-y += tbutils.o 4 | obj-bin-y += tbxface.init.o 5 | obj-bin-y += tbxfroot.init.o 6 | -------------------------------------------------------------------------------- /autogen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | autoconf -f 3 | ( cd tools 4 | autoconf -f 5 | autoheader 6 | ) 7 | ( cd stubdom 8 | autoconf -f 9 | ) 10 | ( cd docs 11 | autoconf -f 12 | ) 13 | -------------------------------------------------------------------------------- /tools/ocaml/libs/xb/META.in: -------------------------------------------------------------------------------- 1 | version = "@VERSION@" 2 | description = "XenBus Interface" 3 | requires = "unix,xenmmap" 4 | archive(byte) = "xenbus.cma" 5 | archive(native) = "xenbus.cmxa" 6 | -------------------------------------------------------------------------------- /xen/arch/x86/oprofile/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += xenoprof.o 2 | obj-y += nmi_int.o 3 | obj-y += op_model_p4.o 4 | obj-y += op_model_ppro.o 5 | obj-y += op_model_athlon.o 6 | obj-y += backtrace.o 7 | -------------------------------------------------------------------------------- /tools/ocaml/libs/xc/META.in: -------------------------------------------------------------------------------- 1 | version = "@VERSION@" 2 | description = "Xen Control Interface" 3 | requires = "unix,xenmmap" 4 | archive(byte) = "xenctrl.cma" 5 | archive(native) = "xenctrl.cmxa" 6 | -------------------------------------------------------------------------------- /tools/ocaml/libs/xl/META.in: -------------------------------------------------------------------------------- 1 | version = "@VERSION@" 2 | description = "Xen Toolstack Library" 3 | requires = "xentoollog" 4 | archive(byte) = "xenlight.cma" 5 | archive(native) = "xenlight.cmxa" 6 | -------------------------------------------------------------------------------- /tools/ocaml/libs/xs/META.in: -------------------------------------------------------------------------------- 1 | version = "@VERSION@" 2 | description = "XenStore Interface" 3 | requires = "unix,xenbus" 4 | archive(byte) = "xenstore.cma" 5 | archive(native) = "xenstore.cmxa" 6 | -------------------------------------------------------------------------------- /tools/xenstore/.gdbinit: -------------------------------------------------------------------------------- 1 | set environment XENSTORED_RUNDIR=testsuite/tmp 2 | set environment XENSTORED_ROOTDIR=testsuite/tmp 3 | handle SIGUSR1 noprint nostop 4 | handle SIGPIPE noprint nostop 5 | -------------------------------------------------------------------------------- /xen/drivers/passthrough/vtd/Makefile: -------------------------------------------------------------------------------- 1 | subdir-$(x86) += x86 2 | 3 | obj-y += iommu.o 4 | obj-y += dmar.o 5 | obj-y += utils.o 6 | obj-y += qinval.o 7 | obj-y += intremap.o 8 | obj-y += quirks.o 9 | -------------------------------------------------------------------------------- /m4/path_or_fail.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AX_PATH_PROG_OR_FAIL], 2 | [AC_PATH_PROG([$1], [$2], [no]) 3 | if test x"${$1}" = x"no" 4 | then 5 | AC_MSG_ERROR([Unable to find $2, please install $2]) 6 | fi]) 7 | -------------------------------------------------------------------------------- /tools/cross-install: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # prepend CROSS_BIN_PATH to find the right "strip" 4 | if [ -n "$CROSS_BIN_PATH" ]; then 5 | PATH="$CROSS_BIN_PATH:$PATH" 6 | fi 7 | 8 | exec $_INSTALL "$@" 9 | -------------------------------------------------------------------------------- /tools/flask/policy/policy/global_tunables: -------------------------------------------------------------------------------- 1 | # 2 | # This file is for the declaration of global policy tunables, booleans, 3 | # and other components not defined within a specific policy module. 4 | # 5 | 6 | -------------------------------------------------------------------------------- /tools/tests/mce-test/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean distclean 2 | 3 | all: 4 | $(MAKE) -C tools 5 | 6 | clean: 7 | $(MAKE) -C tools clean 8 | 9 | distclean: 10 | $(MAKE) -C tools distclean 11 | -------------------------------------------------------------------------------- /version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | MAJOR=`grep "export XEN_VERSION" $1 | sed 's/.*=//g' | tr -s " "` 4 | MINOR=`grep "export XEN_SUBVERSION" $1 | sed 's/.*=//g' | tr -s " "` 5 | printf "%d.%d" $MAJOR $MINOR 6 | -------------------------------------------------------------------------------- /xen/arch/x86/hvm/svm/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += asid.o 2 | obj-y += emulate.o 3 | obj-bin-y += entry.o 4 | obj-y += intr.o 5 | obj-y += nestedsvm.o 6 | obj-y += svm.o 7 | obj-y += svmdebug.o 8 | obj-y += vmcb.o 9 | -------------------------------------------------------------------------------- /tools/ocaml/libs/eventchn/META.in: -------------------------------------------------------------------------------- 1 | version = "@VERSION@" 2 | description = "Eventchn interface extension" 3 | requires = "unix" 4 | archive(byte) = "xeneventchn.cma" 5 | archive(native) = "xeneventchn.cmxa" 6 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/Makefile: -------------------------------------------------------------------------------- 1 | include $(M)/overrides.mk 2 | 3 | obj-m += platform-pci/ 4 | obj-m += balloon/ 5 | obj-m += blkfront/ 6 | obj-m += netfront/ 7 | obj-m += scsifront/ 8 | obj-m += usbfront/ 9 | -------------------------------------------------------------------------------- /xen/drivers/Makefile: -------------------------------------------------------------------------------- 1 | subdir-y += char 2 | subdir-$(HAS_CPUFREQ) += cpufreq 3 | subdir-$(HAS_PCI) += pci 4 | subdir-$(HAS_PASSTHROUGH) += passthrough 5 | subdir-$(HAS_ACPI) += acpi 6 | subdir-$(HAS_VIDEO) += video 7 | -------------------------------------------------------------------------------- /xen/include/asm-arm/arm32/macros.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_ARM_ARM32_MACROS_H 2 | #define __ASM_ARM_ARM32_MACROS_H 3 | 4 | .macro ret 5 | mov pc, lr 6 | .endm 7 | 8 | #endif /* __ASM_ARM_ARM32_MACROS_H */ 9 | -------------------------------------------------------------------------------- /xen/include/asm-arm/random.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_RANDOM_H__ 2 | #define __ASM_RANDOM_H__ 3 | 4 | static inline unsigned int arch_get_random(void) 5 | { 6 | return 0; 7 | } 8 | 9 | #endif /* __ASM_RANDOM_H__ */ 10 | -------------------------------------------------------------------------------- /xen/arch/arm/arm64/lib/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += memcpy.o memcmp.o memmove.o memset.o memchr.o 2 | obj-y += clear_page.o 3 | obj-y += bitops.o find_next_bit.o 4 | obj-y += strchr.o strcmp.o strlen.o strncmp.o strnlen.o strrchr.o 5 | -------------------------------------------------------------------------------- /xen/arch/x86/cpu/mcheck/mce_amd.h: -------------------------------------------------------------------------------- 1 | #ifndef _MCHECK_AMD_H 2 | #define _MCHECK_AMD_H 3 | 4 | int mc_amd_recoverable_scan(uint64_t status); 5 | int mc_amd_addrcheck(uint64_t status, uint64_t misc, int addrtype); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /tools/libxc/xc_dom_decompress.h: -------------------------------------------------------------------------------- 1 | #ifndef __MINIOS__ 2 | # include "xc_dom.h" 3 | #else 4 | # include "xc_dom_decompress_unsafe.h" 5 | #endif 6 | 7 | int xc_try_lz4_decode(struct xc_dom_image *dom, void **blob, size_t *size); 8 | 9 | -------------------------------------------------------------------------------- /stubdom/grub/mini-os.h: -------------------------------------------------------------------------------- 1 | extern int blk_nb; 2 | extern struct blkfront_dev **blk_dev; 3 | extern struct netfront_dev *net_dev; 4 | extern struct kbdfront_dev *kbd_dev; 5 | extern struct fbfront_dev *fb_dev; 6 | 7 | extern char* vtpm_label; 8 | -------------------------------------------------------------------------------- /xen/include/asm-x86/perfc.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_PERFC_H__ 2 | #define __ASM_PERFC_H__ 3 | 4 | static inline void arch_perfc_reset(void) 5 | { 6 | } 7 | 8 | static inline void arch_perfc_gather(void) 9 | { 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /xen/include/asm-x86/spinlock.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_SPINLOCK_H 2 | #define __ASM_SPINLOCK_H 3 | 4 | #define _raw_read_unlock(l) \ 5 | asm volatile ( "lock; dec%z0 %0" : "+m" ((l)->lock) :: "memory" ) 6 | 7 | #endif /* __ASM_SPINLOCK_H */ 8 | -------------------------------------------------------------------------------- /tools/firmware/etherboot/Config: -------------------------------------------------------------------------------- 1 | 2 | CFLAGS += -UPXE_DHCP_STRICT 3 | CFLAGS += -DPXE_DHCP_STRICT 4 | 5 | CFLAGS += -UNO_POST_PROMPT 6 | CFLAGS += -DNO_POST_PROMPT 7 | 8 | CFLAGS += -UCONSOLE_SERIAL 9 | CFLAGS += -DCONSOLE_SERIAL=1 10 | -------------------------------------------------------------------------------- /tools/xenstat/libxenstat/bindings/swig/xenstat.i: -------------------------------------------------------------------------------- 1 | %module xenstat_swig 2 | %{ 3 | /* Includes the header in the wrapper code */ 4 | #include "xenstat.h" 5 | %} 6 | 7 | /* Parse the header file to generate wrappers */ 8 | %include "xenstat.h" 9 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/balloon/Kbuild: -------------------------------------------------------------------------------- 1 | include $(M)/overrides.mk 2 | 3 | obj-m = xen-balloon.o 4 | 5 | EXTRA_CFLAGS += -I$(M)/platform-pci 6 | 7 | xen-balloon-y := balloon.o sysfs.o 8 | xen-balloon-$(CONFIG_XEN_SCRUB_PAGES) += scrub.o 9 | -------------------------------------------------------------------------------- /xen/arch/x86/mm/shadow/Makefile: -------------------------------------------------------------------------------- 1 | ifeq ($(shadow-paging),y) 2 | obj-y += common.o guest_2.o guest_3.o guest_4.o 3 | else 4 | obj-y += none.o 5 | endif 6 | 7 | guest_%.o: multi.c Makefile 8 | $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ 9 | -------------------------------------------------------------------------------- /xen/include/xen/stdbool.h: -------------------------------------------------------------------------------- 1 | #ifndef __XEN_STDBOOL_H__ 2 | #define __XEN_STDBOOL_H__ 3 | 4 | #define bool _Bool 5 | #define true 1 6 | #define false 0 7 | #define __bool_true_false_are_defined 1 8 | 9 | #endif /* __XEN_STDBOOL_H__ */ 10 | -------------------------------------------------------------------------------- /tools/python/README: -------------------------------------------------------------------------------- 1 | The file test.py here is from the Zope project, and is Copyright (c) 2001, 2 | 2002 Zope Corporation and Contributors. This file is released under the Zope 3 | Public License, version 2.0, a copy of which is in the file ZPL-2.0. 4 | -------------------------------------------------------------------------------- /xen/tools/Makefile: -------------------------------------------------------------------------------- 1 | 2 | include $(XEN_ROOT)/Config.mk 3 | 4 | .PHONY: default 5 | default: 6 | $(MAKE) symbols 7 | 8 | .PHONY: clean 9 | clean: 10 | rm -f *.o symbols 11 | 12 | symbols: symbols.c 13 | $(HOSTCC) $(HOSTCFLAGS) -o $@ $< 14 | -------------------------------------------------------------------------------- /xen/include/asm-x86/compat.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * compat.h 3 | */ 4 | 5 | #define COMPAT_BITS_PER_LONG 32 6 | 7 | typedef uint32_t compat_ptr_t; 8 | typedef unsigned long full_ptr_t; 9 | -------------------------------------------------------------------------------- /stubdom/c/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../.. 2 | 3 | ifeq (,$(findstring clean,$(MAKECMDGOALS))) 4 | include $(XEN_ROOT)/Config.mk 5 | endif 6 | 7 | all: main.a 8 | 9 | main.a: main.o 10 | $(AR) cr $@ $^ 11 | 12 | clean: 13 | rm -f *.a *.o 14 | -------------------------------------------------------------------------------- /tools/flask/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | SUBDIRS-y := utils 5 | SUBDIRS-$(FLASK_POLICY) += policy 6 | 7 | .PHONY: all clean install distclean 8 | all clean install distclean: %: subdirs-% 9 | 10 | -------------------------------------------------------------------------------- /xen/arch/arm/arm64/Makefile: -------------------------------------------------------------------------------- 1 | subdir-y += lib 2 | 3 | obj-y += entry.o 4 | 5 | obj-y += traps.o 6 | obj-y += domain.o 7 | obj-y += vfp.o 8 | obj-y += smpboot.o 9 | obj-y += domctl.o 10 | obj-y += cache.o 11 | 12 | obj-$(EARLY_PRINTK) += debug.o 13 | -------------------------------------------------------------------------------- /xen/drivers/video/Makefile: -------------------------------------------------------------------------------- 1 | obj-$(HAS_VGA) := vga.o 2 | obj-$(HAS_VIDEO) += font_8x14.o 3 | obj-$(HAS_VIDEO) += font_8x16.o 4 | obj-$(HAS_VIDEO) += font_8x8.o 5 | obj-$(HAS_VIDEO) += lfb.o 6 | obj-$(HAS_VGA) += vesa.o 7 | obj-$(HAS_ARM_HDLCD) += arm_hdlcd.o 8 | -------------------------------------------------------------------------------- /xen/include/xen/pfn.h: -------------------------------------------------------------------------------- 1 | #ifndef __XEN_PFN_H__ 2 | #define __XEN_PFN_H__ 3 | 4 | #include 5 | 6 | #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) 7 | #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) 8 | 9 | #endif /* __XEN_PFN_H__ */ 10 | -------------------------------------------------------------------------------- /xen/arch/x86/boot/Makefile: -------------------------------------------------------------------------------- 1 | obj-bin-y += head.o 2 | 3 | RELOC_DEPS = $(BASEDIR)/include/asm-x86/config.h $(BASEDIR)/include/xen/multiboot.h 4 | 5 | head.o: reloc.S 6 | 7 | reloc.S: reloc.c $(RELOC_DEPS) 8 | $(MAKE) -f build32.mk $@ RELOC_DEPS="$(RELOC_DEPS)" 9 | -------------------------------------------------------------------------------- /xen/drivers/acpi/Makefile: -------------------------------------------------------------------------------- 1 | subdir-y += tables 2 | subdir-y += utilities 3 | subdir-$(x86) += apei 4 | 5 | obj-bin-y += tables.init.o 6 | obj-y += numa.o 7 | obj-y += osl.o 8 | obj-y += pmstat.o 9 | 10 | obj-$(x86) += hwregs.o 11 | obj-$(x86) += reboot.o 12 | -------------------------------------------------------------------------------- /xen/drivers/passthrough/Makefile: -------------------------------------------------------------------------------- 1 | subdir-$(x86) += vtd 2 | subdir-$(x86) += amd 3 | subdir-$(x86_64) += x86 4 | subdir-$(arm) += arm 5 | 6 | obj-y += iommu.o 7 | obj-$(x86) += io.o 8 | obj-$(HAS_PCI) += pci.o 9 | obj-$(HAS_DEVICE_TREE) += device_tree.o 10 | -------------------------------------------------------------------------------- /xen/drivers/passthrough/amd/Makefile: -------------------------------------------------------------------------------- 1 | obj-bin-y += iommu_detect.init.o 2 | obj-y += iommu_init.o 3 | obj-y += iommu_map.o 4 | obj-y += pci_amd_iommu.o 5 | obj-bin-y += iommu_acpi.init.o 6 | obj-y += iommu_intr.o 7 | obj-y += iommu_cmd.o 8 | obj-y += iommu_guest.o 9 | -------------------------------------------------------------------------------- /tools/examples/vnc/Xservers: -------------------------------------------------------------------------------- 1 | # Configuration lines to go in /etc/X11/xdm/Xservers to 2 | # start Xvnc and connect back to a vncviewer in domain-0. 3 | # See 'man xdm' under 'LOCAL SERVER SPECIFICATION' for format details. 4 | 5 | :1 Xvnc local /usr/X11R6/bin/Xvnc-xen :1 -------------------------------------------------------------------------------- /tools/libfsimage/fat/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../.. 2 | 3 | LIB_SRCS-y = fsys_fat.c 4 | 5 | FS = fat 6 | 7 | .PHONY: all 8 | all: fs-all 9 | 10 | .PHONY: install 11 | install: fs-install 12 | 13 | include $(XEN_ROOT)/tools/libfsimage/Rules.mk 14 | -------------------------------------------------------------------------------- /tools/libfsimage/ufs/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../.. 2 | 3 | LIB_SRCS-y = fsys_ufs.c 4 | 5 | FS = ufs 6 | 7 | .PHONY: all 8 | all: fs-all 9 | 10 | .PHONY: install 11 | install: fs-install 12 | 13 | include $(XEN_ROOT)/tools/libfsimage/Rules.mk 14 | -------------------------------------------------------------------------------- /tools/libfsimage/xfs/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../.. 2 | 3 | LIB_SRCS-y = fsys_xfs.c 4 | 5 | FS = xfs 6 | 7 | .PHONY: all 8 | all: fs-all 9 | 10 | .PHONY: install 11 | install: fs-install 12 | 13 | include $(XEN_ROOT)/tools/libfsimage/Rules.mk 14 | -------------------------------------------------------------------------------- /tools/libxl/xlutil.pc.in.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | includedir=@includedir@ 3 | libdir=@libdir@ 4 | 5 | Name: Xlutil 6 | Description: The xl utility library for Xen hypervisor 7 | Version: @@version@@ 8 | Cflags: -I${includedir} 9 | Libs: -L${libdir} -lxlutil 10 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/Makefile: -------------------------------------------------------------------------------- 1 | subdir-y += lib 2 | 3 | obj-y += entry.o 4 | obj-y += proc-v7.o proc-caxx.o 5 | 6 | obj-y += traps.o 7 | obj-y += domain.o 8 | obj-y += vfp.o 9 | obj-y += smpboot.o 10 | obj-y += domctl.o 11 | 12 | obj-$(EARLY_PRINTK) += debug.o 13 | -------------------------------------------------------------------------------- /xen/arch/x86/cpu/Makefile: -------------------------------------------------------------------------------- 1 | subdir-y += mcheck 2 | subdir-y += mtrr 3 | 4 | obj-y += amd.o 5 | obj-y += centaur.o 6 | obj-y += common.o 7 | obj-y += intel.o 8 | obj-y += intel_cacheinfo.o 9 | obj-y += mwait-idle.o 10 | obj-y += vpmu.o vpmu_amd.o vpmu_intel.o 11 | -------------------------------------------------------------------------------- /xen/include/asm-x86/mach-generic/mach_mpparse.h: -------------------------------------------------------------------------------- 1 | #ifndef _MACH_MPPARSE_H 2 | #define _MACH_MPPARSE_H 1 3 | 4 | int mps_oem_check(struct mp_config_table *mpc, char *oem, char *productid); 5 | int acpi_madt_oem_check(char *oem_id, char *oem_table_id); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /tools/libfsimage/ext2fs/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../.. 2 | 3 | LIB_SRCS-y = fsys_ext2fs.c 4 | 5 | FS = ext2fs 6 | 7 | .PHONY: all 8 | all: fs-all 9 | 10 | .PHONY: install 11 | install: fs-install 12 | 13 | include $(XEN_ROOT)/tools/libfsimage/Rules.mk 14 | -------------------------------------------------------------------------------- /tools/python/xen/migration/xl.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | XL migration stream format 6 | """ 7 | 8 | MAGIC = "Xen saved domain, xl format\n \0 \r" 9 | 10 | HEADER_FORMAT = "=IIII" 11 | 12 | MANDATORY_FLAG_STREAMV2 = 2 13 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/usbfront/Kbuild: -------------------------------------------------------------------------------- 1 | include $(M)/overrides.mk 2 | 3 | obj-m += $(if $(shell grep '^\#include "\.\./\.\./' $(obj)/usbfront.h), \ 4 | $(warning usbfront cannot be built), \ 5 | xen-usb.o) 6 | 7 | xen-usb-objs := usbfront-hcd.o xenbus.o 8 | -------------------------------------------------------------------------------- /xen/include/asm-arm/arm64/bug.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARM_ARM64_BUG_H__ 2 | #define __ARM_ARM64_BUG_H__ 3 | 4 | #include 5 | 6 | #define BRK_BUG_FRAME 1 7 | 8 | #define BUG_INSTR "brk " __stringify(BRK_BUG_FRAME) 9 | 10 | #endif /* __ARM_ARM64_BUG_H__ */ 11 | -------------------------------------------------------------------------------- /xen/include/asm-arm/desc.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARCH_DESC_H 2 | #define __ARCH_DESC_H 3 | 4 | #endif /* __ARCH_DESC_H */ 5 | /* 6 | * Local variables: 7 | * mode: C 8 | * c-file-style: "BSD" 9 | * c-basic-offset: 4 10 | * indent-tabs-mode: nil 11 | * End: 12 | */ 13 | -------------------------------------------------------------------------------- /xen/include/asm-arm/hvm/iommu.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_ARM_HVM_IOMMU_H_ 2 | #define __ASM_ARM_HVM_IOMMU_H_ 3 | 4 | struct arch_hvm_iommu 5 | { 6 | /* Private information for the IOMMU drivers */ 7 | void *priv; 8 | }; 9 | 10 | #endif /* __ASM_ARM_HVM_IOMMU_H_ */ 11 | -------------------------------------------------------------------------------- /xen/xsm/flask/ss/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += ebitmap.o 2 | obj-y += hashtab.o 3 | obj-y += symtab.o 4 | obj-y += sidtab.o 5 | obj-y += avtab.o 6 | obj-y += policydb.o 7 | obj-y += services.o 8 | obj-y += conditional.o 9 | obj-y += mls.o 10 | 11 | CFLAGS += -I../include 12 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/systemd/proc-xen.mount.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Mount /proc/xen files 3 | ConditionPathExists=/proc/xen 4 | ConditionPathExists=!/proc/xen/capabilities 5 | RefuseManualStop=true 6 | 7 | [Mount] 8 | What=xenfs 9 | Where=/proc/xen 10 | Type=xenfs 11 | -------------------------------------------------------------------------------- /tools/libxl/libxl_test_timedereg.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST_TIMEDEREG_H 2 | #define TEST_TIMEDEREG_H 3 | 4 | #include 5 | 6 | int libxl_test_timedereg(libxl_ctx *ctx, libxl_asyncop_how *ao_how) 7 | LIBXL_EXTERNAL_CALLERS_ONLY; 8 | 9 | #endif /*TEST_TIMEDEREG_H*/ 10 | -------------------------------------------------------------------------------- /xen/include/asm-arm/trace.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_TRACE_H__ 2 | #define __ASM_TRACE_H__ 3 | 4 | #endif /* __ASM_TRACE_H__ */ 5 | /* 6 | * Local variables: 7 | * mode: C 8 | * c-file-style: "BSD" 9 | * c-basic-offset: 4 10 | * indent-tabs-mode: nil 11 | * End: 12 | */ 13 | -------------------------------------------------------------------------------- /xen/include/xen/random.h: -------------------------------------------------------------------------------- 1 | #ifndef __XEN_RANDOM_H__ 2 | #define __XEN_RANDOM_H__ 3 | 4 | unsigned int get_random(void); 5 | 6 | /* The value keeps unchange once initialized for each booting */ 7 | extern unsigned int boot_random; 8 | 9 | #endif /* __XEN_RANDOM_H__ */ 10 | -------------------------------------------------------------------------------- /tools/libfsimage/reiserfs/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../.. 2 | 3 | LIB_SRCS-y = fsys_reiserfs.c 4 | 5 | FS = reiserfs 6 | 7 | .PHONY: all 8 | all: fs-all 9 | 10 | .PHONY: install 11 | install: fs-install 12 | 13 | include $(XEN_ROOT)/tools/libfsimage/Rules.mk 14 | -------------------------------------------------------------------------------- /tools/libxl/test_timedereg.c: -------------------------------------------------------------------------------- 1 | #include "test_common.h" 2 | #include "libxl_test_timedereg.h" 3 | 4 | int main(int argc, char **argv) { 5 | int rc; 6 | 7 | test_common_setup(XTL_DEBUG); 8 | 9 | rc = libxl_test_timedereg(ctx, 0); 10 | assert(!rc); 11 | } 12 | -------------------------------------------------------------------------------- /xen/include/asm-arm/xenoprof.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_XENOPROF_H__ 2 | #define __ASM_XENOPROF_H__ 3 | 4 | #endif /* __ASM_XENOPROF_H__ */ 5 | /* 6 | * Local variables: 7 | * mode: C 8 | * c-file-style: "BSD" 9 | * c-basic-offset: 4 10 | * indent-tabs-mode: nil 11 | * End: 12 | */ 13 | -------------------------------------------------------------------------------- /stubdom/vtpmmgr/common_types.h: -------------------------------------------------------------------------------- 1 | #ifndef VTPM_COMMON_TYPES 2 | #define VTPM_COMMON_TYPES 1 3 | typedef unsigned char BYTE; 4 | typedef unsigned char BOOL; 5 | typedef unsigned char UINT8; 6 | typedef uint16_t UINT16; 7 | typedef uint32_t UINT32; 8 | typedef uint64_t UINT64; 9 | #endif 10 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/compat-include/linux/io.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_IO_H 2 | #define _LINUX_IO_H 3 | 4 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) 5 | #error "This version of Linux should not need compat linux/io.h" 6 | #endif 7 | 8 | #include 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /xen/arch/x86/cpu/mcheck/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += amd_nonfatal.o 2 | obj-y += mce_amd.o 3 | obj-y += mcaction.o 4 | obj-y += barrier.o 5 | obj-y += mctelem.o 6 | obj-y += mce.o 7 | obj-y += mce-apei.o 8 | obj-y += mce_intel.o 9 | obj-y += non-fatal.o 10 | obj-y += util.o 11 | obj-y += vmce.o 12 | -------------------------------------------------------------------------------- /xen/arch/x86/cpu/mcheck/util.c: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | #include "util.h" 4 | #include "mce.h" 5 | 6 | void mce_panic_check(void) 7 | { 8 | if ( is_mc_panic ) 9 | { 10 | local_irq_enable(); 11 | for ( ; ; ) 12 | halt(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/lib/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += memcpy.o memmove.o memset.o memchr.o memzero.o 2 | obj-y += findbit.o setbit.o 3 | obj-y += setbit.o clearbit.o changebit.o 4 | obj-y += testsetbit.o testclearbit.o testchangebit.o 5 | obj-y += strchr.o strrchr.o 6 | obj-y += lib1funcs.o lshrdi3.o div64.o 7 | -------------------------------------------------------------------------------- /xen/include/xen/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_DELAY_H 2 | #define _LINUX_DELAY_H 3 | 4 | /* Copyright (C) 1993 Linus Torvalds */ 5 | 6 | #include 7 | #define mdelay(n) (\ 8 | {unsigned long msec=(n); while (msec--) udelay(1000);}) 9 | 10 | #endif /* defined(_LINUX_DELAY_H) */ 11 | -------------------------------------------------------------------------------- /m4/uuid.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AX_CHECK_UUID], [ 2 | AC_CHECK_HEADER([uuid/uuid.h],[ 3 | AC_CHECK_LIB([uuid], [uuid_clear], [libuuid="y"]) 4 | ]) 5 | AC_CHECK_HEADER([uuid.h],[libuuid="y"]) 6 | AS_IF([test "$libuuid" != "y"], [ 7 | AC_MSG_ERROR([cannot find a valid uuid library]) 8 | ]) 9 | ]) 10 | -------------------------------------------------------------------------------- /tools/ocaml/test/raise_exception.ml: -------------------------------------------------------------------------------- 1 | open Printf 2 | open Xentoollog 3 | open Xenlight 4 | 5 | let _ = 6 | try 7 | Xenlight.test_raise_exception () 8 | with Xenlight.Error(err, fn) -> begin 9 | printf "Caught Exception: %s: %s\n" (Xenlight.string_of_error err) fn; 10 | end 11 | 12 | -------------------------------------------------------------------------------- /xen/xsm/flask/policy/initial_sids: -------------------------------------------------------------------------------- 1 | # FLASK 2 | 3 | # 4 | # Define initial security identifiers 5 | # 6 | sid xen 7 | sid dom0 8 | sid domio 9 | sid domxen 10 | sid unlabeled 11 | sid security 12 | sid ioport 13 | sid iomem 14 | sid irq 15 | sid device 16 | sid domU 17 | sid domDM 18 | # FLASK 19 | -------------------------------------------------------------------------------- /tools/libfsimage/iso9660/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../.. 2 | 3 | LIB_SRCS-y = fsys_iso9660.c 4 | 5 | FS = iso9660 6 | 7 | .PHONY: all 8 | all: fs-all 9 | 10 | .PHONY: install 11 | install: fs-install 12 | 13 | fsys_iso9660.c: iso9660.h 14 | 15 | include $(XEN_ROOT)/tools/libfsimage/Rules.mk 16 | -------------------------------------------------------------------------------- /xen/include/xen/pci_ids.h: -------------------------------------------------------------------------------- 1 | #define PCI_VENDOR_ID_AMD 0x1022 2 | 3 | #define PCI_VENDOR_ID_NVIDIA 0x10de 4 | 5 | #define PCI_VENDOR_ID_OXSEMI 0x1415 6 | 7 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 8 | 9 | #define PCI_VENDOR_ID_INTEL 0x8086 10 | -------------------------------------------------------------------------------- /xen/include/xen/sort.h: -------------------------------------------------------------------------------- 1 | #ifndef __XEN_SORT_H__ 2 | #define __XEN_SORT_H__ 3 | 4 | #include 5 | 6 | void sort(void *base, size_t num, size_t size, 7 | int (*cmp)(const void *, const void *), 8 | void (*swap)(void *, void *, int)); 9 | 10 | #endif /* __XEN_SORT_H__ */ 11 | -------------------------------------------------------------------------------- /tools/xenstore/README: -------------------------------------------------------------------------------- 1 | The following files are imported from the Samba project. We use the versions 2 | from Samba 3, the current stable branch. 3 | 4 | talloc.c: samba-trunk/source/lib/talloc.c r14291 2006-03-13 04:27:47 +0000 5 | talloc.h: samba-trunk/source/include/talloc.h r11986 2005-12-01 00:43:36 +0000 6 | -------------------------------------------------------------------------------- /xen/arch/x86/efi/relocs-dummy.S: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | .section .reloc, "a", @progbits 4 | .balign 4 5 | GLOBAL(__base_relocs_start) 6 | .long 0 7 | .long 8 8 | GLOBAL(__base_relocs_end) 9 | 10 | .globl VIRT_START, ALT_START 11 | .equ VIRT_START, XEN_VIRT_START 12 | .equ ALT_START, XEN_VIRT_END 13 | -------------------------------------------------------------------------------- /xen/arch/x86/mm/hap/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += hap.o 2 | obj-y += guest_walk_2level.o 3 | obj-y += guest_walk_3level.o 4 | obj-$(x86_64) += guest_walk_4level.o 5 | obj-y += nested_hap.o 6 | obj-y += nested_ept.o 7 | 8 | guest_walk_%level.o: guest_walk.c Makefile 9 | $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ 10 | -------------------------------------------------------------------------------- /stubdom/vtpm/minios.cfg: -------------------------------------------------------------------------------- 1 | CONFIG_TPMFRONT=y 2 | CONFIG_TPM_TIS=n 3 | CONFIG_TPMBACK=y 4 | CONFIG_START_NETWORK=n 5 | CONFIG_TEST=n 6 | CONFIG_PCIFRONT=n 7 | CONFIG_BLKFRONT=y 8 | CONFIG_NETFRONT=n 9 | CONFIG_FBFRONT=n 10 | CONFIG_KBDFRONT=n 11 | CONFIG_CONSFRONT=n 12 | CONFIG_XENBUS=y 13 | CONFIG_LWIP=n 14 | CONFIG_XC=n 15 | -------------------------------------------------------------------------------- /tools/blktap2/include/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT := $(CURDIR)/../../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | .PHONY: all 5 | all: 6 | 7 | .PHONY: install 8 | install: 9 | $(INSTALL_DIR) -p $(DESTDIR)$(includedir) 10 | 11 | 12 | .PHONY: clean 13 | clean: 14 | @: 15 | 16 | .PHONY: distclean 17 | distclean: clean 18 | -------------------------------------------------------------------------------- /xen/include/asm-arm/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_DELAY_H 2 | #define _ARM_DELAY_H 3 | 4 | extern void udelay(unsigned long usecs); 5 | 6 | #endif /* defined(_ARM_DELAY_H) */ 7 | /* 8 | * Local variables: 9 | * mode: C 10 | * c-file-style: "BSD" 11 | * c-basic-offset: 4 12 | * indent-tabs-mode: nil 13 | * End: 14 | */ 15 | -------------------------------------------------------------------------------- /docs/figs/Makefile: -------------------------------------------------------------------------------- 1 | 2 | XEN_ROOT=$(CURDIR)/../.. 3 | include $(XEN_ROOT)/Config.mk 4 | -include $(XEN_ROOT)/config/Docs.mk 5 | 6 | TARGETS= network-bridge.png network-basic.png 7 | 8 | all: $(TARGETS) 9 | 10 | %.png: %.fig 11 | $(FIG2DEV) -L png $< >$@.tmp 12 | mv -f $@.tmp $@ 13 | 14 | clean: 15 | rm -f *~ *.png 16 | -------------------------------------------------------------------------------- /stubdom/vtpmmgr/minios.cfg: -------------------------------------------------------------------------------- 1 | CONFIG_TPMFRONT=y 2 | CONFIG_TPM_TIS=y 3 | CONFIG_TPMBACK=y 4 | CONFIG_START_NETWORK=n 5 | CONFIG_TEST=n 6 | CONFIG_PCIFRONT=n 7 | CONFIG_BLKFRONT=y 8 | CONFIG_NETFRONT=n 9 | CONFIG_FBFRONT=n 10 | CONFIG_KBDFRONT=n 11 | CONFIG_CONSFRONT=n 12 | CONFIG_XENBUS=y 13 | CONFIG_LWIP=n 14 | CONFIG_XC=n 15 | -------------------------------------------------------------------------------- /xen/arch/arm/arm64/lib/assembler.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_ASSEMBLER_H__ 2 | #define __ASM_ASSEMBLER_H__ 3 | 4 | #ifndef __ASSEMBLY__ 5 | #error "Only include this from assembly code" 6 | #endif 7 | 8 | /* Only LE support so far */ 9 | #define CPU_BE(x...) 10 | #define CPU_LE(x...) x 11 | 12 | #endif /* __ASM_ASSEMBLER_H__ */ 13 | -------------------------------------------------------------------------------- /tools/hotplug/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | SUBDIRS-y := common 5 | SUBDIRS-$(CONFIG_NetBSD) += NetBSD 6 | SUBDIRS-$(CONFIG_Linux) += Linux 7 | SUBDIRS-$(CONFIG_FreeBSD) += FreeBSD 8 | 9 | .PHONY: all clean install distclean 10 | all clean install distclean: %: subdirs-% 11 | -------------------------------------------------------------------------------- /tools/libxl/xenlight.pc.in.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | includedir=@includedir@ 3 | libdir=@libdir@ 4 | xenfirmwaredir=@XENFIRMWAREDIR@ 5 | libexec_bin=@LIBEXEC_BIN@ 6 | 7 | Name: Xenlight 8 | Description: The Xenlight library for Xen hypervisor 9 | Version: @@version@@ 10 | Cflags: -I${includedir} 11 | Libs: -L${libdir} -lxenlight 12 | -------------------------------------------------------------------------------- /config/Docs.mk.in: -------------------------------------------------------------------------------- 1 | -include $(XEN_ROOT)/config/Paths.mk 2 | 3 | # Tools 4 | FIG2DEV := @FIG2DEV@ 5 | POD2MAN := @POD2MAN@ 6 | POD2HTML := @POD2HTML@ 7 | POD2TEXT := @POD2TEXT@ 8 | MARKDOWN := @MARKDOWN@ 9 | PANDOC := @PANDOC@ 10 | PERL := @PERL@ 11 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/systemd/var-lib-xenstored.mount.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=mount xenstore file system 3 | Requires=proc-xen.mount 4 | After=proc-xen.mount 5 | ConditionPathExists=/proc/xen/capabilities 6 | RefuseManualStop=true 7 | 8 | [Mount] 9 | What=xenstore 10 | Where=@XEN_LIB_STORED@ 11 | Type=tmpfs 12 | Options=mode=755 13 | -------------------------------------------------------------------------------- /xen/arch/x86/efi/runtime.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #ifndef COMPAT 5 | l4_pgentry_t *__read_mostly efi_l4_pgtable; 6 | 7 | void efi_update_l4_pgtable(unsigned int l4idx, l4_pgentry_t l4e) 8 | { 9 | if ( efi_l4_pgtable ) 10 | l4e_write(efi_l4_pgtable + l4idx, l4e); 11 | } 12 | #endif 13 | -------------------------------------------------------------------------------- /xen/include/asm-x86/delay.h: -------------------------------------------------------------------------------- 1 | #ifndef _X86_DELAY_H 2 | #define _X86_DELAY_H 3 | 4 | /* 5 | * Copyright (C) 1993 Linus Torvalds 6 | * 7 | * Delay routines calling functions in arch/i386/lib/delay.c 8 | */ 9 | 10 | extern void __udelay(unsigned long usecs); 11 | #define udelay(n) __udelay(n) 12 | 13 | #endif /* defined(_X86_DELAY_H) */ 14 | -------------------------------------------------------------------------------- /xen/arch/arm/platforms/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += vexpress.o 2 | obj-$(CONFIG_ARM_32) += brcm.o 3 | obj-$(CONFIG_ARM_32) += exynos5.o 4 | obj-$(CONFIG_ARM_32) += midway.o 5 | obj-$(CONFIG_ARM_32) += omap5.o 6 | obj-$(CONFIG_ARM_32) += sunxi.o 7 | obj-$(CONFIG_ARM_32) += rcar2.o 8 | obj-$(CONFIG_ARM_64) += seattle.o 9 | obj-$(CONFIG_ARM_64) += xgene-storm.o 10 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/compat-include/linux/scatterlist.h: -------------------------------------------------------------------------------- 1 | #ifndef _LINUX_SCATTERLIST_H 2 | #define _LINUX_SCATTERLIST_H 3 | 4 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12) 5 | #error "This version of Linux should not need compat linux/scatterlist.h" 6 | #endif 7 | 8 | #include 9 | 10 | #endif /* _LINUX_SCATTERLIST_H */ 11 | -------------------------------------------------------------------------------- /xen/xsm/flask/ss/services.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Implementation of the security services. 3 | * 4 | * Author : Stephen Smalley, 5 | */ 6 | #ifndef _SS_SERVICES_H_ 7 | #define _SS_SERVICES_H_ 8 | 9 | #include "policydb.h" 10 | #include "sidtab.h" 11 | 12 | extern struct policydb policydb; 13 | 14 | #endif /* _SS_SERVICES_H_ */ 15 | 16 | -------------------------------------------------------------------------------- /tools/blktap2/drivers/check_gcrypt: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | cat > .gcrypt.c << EOF 4 | #include 5 | int main(void) 6 | { 7 | gcry_md_hash_buffer(GCRY_MD_MD5, NULL, NULL, 0); 8 | return 0; 9 | } 10 | EOF 11 | 12 | if $1 -o .gcrypt .gcrypt.c -lgcrypt 2>/dev/null ; then 13 | echo "yes" 14 | else 15 | echo "no" 16 | fi 17 | 18 | rm -f .gcrypt* 19 | -------------------------------------------------------------------------------- /xen/include/asm-arm/nmi.h: -------------------------------------------------------------------------------- 1 | #ifndef ASM_NMI_H 2 | #define ASM_NMI_H 3 | 4 | #define register_guest_nmi_callback(a) (-ENOSYS) 5 | #define unregister_guest_nmi_callback() (-ENOSYS) 6 | 7 | #endif /* ASM_NMI_H */ 8 | /* 9 | * Local variables: 10 | * mode: C 11 | * c-file-style: "BSD" 12 | * c-basic-offset: 4 13 | * indent-tabs-mode: nil 14 | * End: 15 | */ 16 | -------------------------------------------------------------------------------- /xen/include/asm-x86/mach-default/mach_mpspec.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_MACH_MPSPEC_H 2 | #define __ASM_MACH_MPSPEC_H 3 | 4 | #define MAX_IRQ_SOURCES 256 5 | 6 | /* Generic (i.e. installer) kernels need lots of bus entries. */ 7 | /* Maximum 256 PCI busses, plus 1 ISA bus in each of 4 cabinets. */ 8 | #define MAX_MP_BUSSES 260 9 | 10 | #endif /* __ASM_MACH_MPSPEC_H */ 11 | -------------------------------------------------------------------------------- /tools/flask/policy/policy/modules.conf: -------------------------------------------------------------------------------- 1 | # 2 | # This file contains a listing of available modules. 3 | # To prevent a module from being used in policy 4 | # creation, set the module name to "off" otherwise 5 | # set the module name on "on". 6 | # 7 | 8 | # Layer: xen 9 | # Module: xen 10 | # Required in base 11 | # 12 | # Policy for xen. 13 | # 14 | xen = on 15 | 16 | -------------------------------------------------------------------------------- /tools/flask/policy/policy/security_classes: -------------------------------------------------------------------------------- 1 | # Locally defined security classes 2 | # 3 | # These classes are not used by the hypervisor, but may be used by domains or 4 | # daemons that need to make access control decisions using the hypervisor's 5 | # security policy. 6 | # 7 | # Access vectors for these classes must be defined in the access_vectors file. 8 | class xenstore 9 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/vscsi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright (c) 2007, FUJITSU Limited 4 | # Based on the block scripts code. 5 | # 6 | 7 | dir=$(dirname "$0") 8 | . "$dir/xen-hotplug-common.sh" 9 | 10 | findCommand "$@" 11 | 12 | case "$command" in 13 | add) 14 | success 15 | ;; 16 | remove) 17 | # TODO 18 | exit 0 19 | ;; 20 | esac 21 | 22 | exit 0 23 | -------------------------------------------------------------------------------- /xen/drivers/char/Makefile: -------------------------------------------------------------------------------- 1 | obj-y += console.o 2 | obj-$(HAS_NS16550) += ns16550.o 3 | obj-$(HAS_CADENCE_UART) += cadence-uart.o 4 | obj-$(HAS_PL011) += pl011.o 5 | obj-$(HAS_EXYNOS4210) += exynos4210-uart.o 6 | obj-$(HAS_OMAP) += omap-uart.o 7 | obj-$(HAS_SCIF) += scif-uart.o 8 | obj-$(HAS_EHCI) += ehci-dbgp.o 9 | obj-$(CONFIG_ARM) += dt-uart.o 10 | obj-y += serial.o 11 | -------------------------------------------------------------------------------- /xen/include/asm-arm/multicall.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_ARM_MULTICALL_H__ 2 | #define __ASM_ARM_MULTICALL_H__ 3 | 4 | extern void do_multicall_call(struct multicall_entry *call); 5 | 6 | #endif /* __ASM_ARM_MULTICALL_H__ */ 7 | /* 8 | * Local variables: 9 | * mode: C 10 | * c-file-style: "BSD" 11 | * c-basic-offset: 4 12 | * indent-tabs-mode: nil 13 | * End: 14 | */ 15 | -------------------------------------------------------------------------------- /xen/include/xen/earlycpio.h: -------------------------------------------------------------------------------- 1 | #ifndef _EARLYCPIO_H 2 | #define _EARLYCPIO_H 3 | 4 | #define MAX_CPIO_FILE_NAME 18 5 | 6 | struct cpio_data { 7 | void *data; 8 | size_t size; 9 | char name[MAX_CPIO_FILE_NAME]; 10 | }; 11 | 12 | struct cpio_data find_cpio_data(const char *path, void *data, size_t len, 13 | long *offset); 14 | 15 | #endif /* _EARLYCPIO_H */ 16 | -------------------------------------------------------------------------------- /tools/firmware/vgabios/Notes: -------------------------------------------------------------------------------- 1 | Development notes 2 | ----------------- 3 | 4 | - need to split video init function 5 | 1. set bios variables 6 | 2. do the real init with io based on bios variables 7 | 8 | - characters format switching will set the bios 9 | variables and call function #2 above 10 | 11 | - need to rework the tables as explained in Interrupt list 12 | -------------------------------------------------------------------------------- /tools/misc/xen-bugtool: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # -*- mode: python; -*- 4 | 5 | # Copyright (c) 2005, XenSource Ltd. 6 | 7 | import sys 8 | 9 | from xen.util import bugtool 10 | 11 | 12 | if __name__ == "__main__": 13 | try: 14 | sys.exit(bugtool.main()) 15 | except KeyboardInterrupt: 16 | print "\nInterrupted." 17 | sys.exit(1) 18 | -------------------------------------------------------------------------------- /xen/include/asm-arm/softirq.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_SOFTIRQ_H__ 2 | #define __ASM_SOFTIRQ_H__ 3 | 4 | #define NR_ARCH_SOFTIRQS 0 5 | 6 | #define arch_skip_send_event_check(cpu) 0 7 | 8 | #endif /* __ASM_SOFTIRQ_H__ */ 9 | /* 10 | * Local variables: 11 | * mode: C 12 | * c-file-style: "BSD" 13 | * c-basic-offset: 4 14 | * indent-tabs-mode: nil 15 | * End: 16 | */ 17 | -------------------------------------------------------------------------------- /tools/flask/policy/policy/users: -------------------------------------------------------------------------------- 1 | ################################## 2 | # 3 | # System User configuration. 4 | # 5 | 6 | # system_u is the user identity for system domains and objects 7 | gen_user(system_u,, system_r, s0, s0 - mls_systemhigh) 8 | 9 | # Other users are defined using the vm role 10 | gen_user(customer_1,, vm_r, s0, s0) 11 | gen_user(customer_2,, vm_r, s0, s0) 12 | -------------------------------------------------------------------------------- /xen/include/asm-arm/debugger.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARM_DEBUGGER_H__ 2 | #define __ARM_DEBUGGER_H__ 3 | 4 | #define debugger_trap_fatal(v, r) (0) 5 | #define debugger_trap_immediate() ((void) 0) 6 | 7 | #endif /* __ARM_DEBUGGER_H__ */ 8 | /* 9 | * Local variables: 10 | * mode: C 11 | * c-file-style: "BSD" 12 | * c-basic-offset: 4 13 | * indent-tabs-mode: nil 14 | * End: 15 | */ 16 | -------------------------------------------------------------------------------- /xen/include/xen/nmi.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * nmi.h 3 | * 4 | * Register and unregister NMI callbacks. 5 | * 6 | * Copyright (c) 2006, Ian Campbell 7 | */ 8 | 9 | #ifndef __XEN_NMI_H__ 10 | #define __XEN_NMI_H__ 11 | 12 | #include 13 | 14 | #endif /* __XEN_NMI_H__ */ 15 | -------------------------------------------------------------------------------- /config/MiniOS.mk: -------------------------------------------------------------------------------- 1 | include $(XEN_ROOT)/config/StdGNU.mk 2 | include $(XEN_ROOT)/extras/mini-os/Config.mk 3 | CFLAGS += $(DEF_CFLAGS) $(ARCH_CFLAGS) 4 | CPPFLAGS += $(DEF_CPPFLAGS) $(ARCH_CPPFLAGS) $(extra_incl) 5 | ASFLAGS += $(DEF_ASFLAGS) $(ARCH_ASFLAGS) 6 | LDFLAGS += $(DEF_LDFLAGS) $(ARCH_LDFLAGS) 7 | 8 | # Override settings for this OS 9 | PTHREAD_LIBS = 10 | nosharedlibs=y 11 | -------------------------------------------------------------------------------- /m4/checkpolicy.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AC_PROG_CHECKPOLICY], 2 | [dnl 3 | # check for a checkpolicy binary with support for -t xen 4 | AC_CHECK_TOOL([CHECKPOLICY],[checkpolicy],[no]) 5 | 6 | if test "$CHECKPOLICY" != "no"; then 7 | CHECKPOLICYHELP=`$CHECKPOLICY -h | grep xen` 8 | if test "$CHECKPOLICYHELP" = ""; then 9 | CHECKPOLICY=no 10 | fi 11 | fi 12 | ]) 13 | -------------------------------------------------------------------------------- /m4/depends.m4: -------------------------------------------------------------------------------- 1 | 2 | AC_DEFUN([AX_DEPENDS_PATH_PROG], [ 3 | AS_IF([test "x$$1" = "xy"], [AX_PATH_PROG_OR_FAIL([$2], [$3])], [ 4 | AS_IF([test "x$$1" = "xn"], [ 5 | $2="/$3-disabled-in-configure-script" 6 | ], [ 7 | AC_PATH_PROG([$2], [$3], [no]) 8 | AS_IF([test x"${$2}" = "xno"], [ 9 | $1=n 10 | $2="/$3-disabled-in-configure-script" 11 | ]) 12 | ]) 13 | ]) 14 | AC_SUBST($2) 15 | ]) 16 | -------------------------------------------------------------------------------- /tools/blktap2/drivers/md5.h: -------------------------------------------------------------------------------- 1 | #ifndef MD5_H 2 | #define MD5_H 3 | 4 | #include 5 | #include 6 | 7 | /** 8 | * md5_sum - MD5 hash for a data block 9 | * @addr: Pointers to the data area 10 | * @len: Lengths of the data block 11 | * @mac: Buffer for the hash 12 | */ 13 | void md5_sum(const uint8_t *addr, const size_t len, uint8_t *mac); 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /tools/tests/regression/scripts/download_python.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Downloads python with version $1 and stores in into the downloads dir. 4 | # 5 | 6 | set -e 7 | 8 | REG_TEST_DIR=$1 9 | VERSION=$2 10 | 11 | mkdir -p ${REG_TEST_DIR}/downloads 12 | wget -q -O ${REG_TEST_DIR}/downloads/Python-${VERSION}.tgz http://www.python.org/ftp/python/${VERSION}/Python-${VERSION}.tgz 13 | -------------------------------------------------------------------------------- /xen/include/asm-arm/paging.h: -------------------------------------------------------------------------------- 1 | #ifndef _XEN_PAGING_H 2 | #define _XEN_PAGING_H 3 | 4 | #define paging_mode_translate(d) (1) 5 | #define paging_mode_external(d) (1) 6 | 7 | #endif /* XEN_PAGING_H */ 8 | 9 | /* 10 | * Local variables: 11 | * mode: C 12 | * c-file-style: "BSD" 13 | * c-basic-offset: 4 14 | * indent-tabs-mode: nil 15 | * End: 16 | */ 17 | -------------------------------------------------------------------------------- /m4/fetcher.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AX_CHECK_FETCHER], [ 2 | AC_PATH_PROG([WGET],[wget], [no]) 3 | AS_IF([test x"$WGET" != x"no"], [ 4 | FETCHER="$WGET -c -O" 5 | ], [ 6 | AC_PATH_PROG([FTP],[ftp], [no]) 7 | AS_IF([test x"$FTP" != x"no"], [ 8 | FETCHER="$FTP -o" 9 | ], [ 10 | AC_MSG_ERROR([cannot find wget or ftp]) 11 | ]) 12 | ]) 13 | AC_SUBST(FETCHER) 14 | ]) 15 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/systemd/xen-watchdog.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Xen-watchdog - run xen watchdog daemon 3 | Requires=proc-xen.mount 4 | After=proc-xen.mount xendomains.service 5 | ConditionPathExists=/proc/xen/capabilities 6 | 7 | [Service] 8 | Type=forking 9 | ExecStart=@sbindir@/xenwatchdogd 30 15 10 | KillSignal=USR1 11 | 12 | [Install] 13 | WantedBy=multi-user.target 14 | -------------------------------------------------------------------------------- /xen/include/asm-arm/byteorder.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_ARM_BYTEORDER_H__ 2 | #define __ASM_ARM_BYTEORDER_H__ 3 | 4 | #define __BYTEORDER_HAS_U64__ 5 | 6 | #include 7 | 8 | #endif /* __ASM_ARM_BYTEORDER_H__ */ 9 | /* 10 | * Local variables: 11 | * mode: C 12 | * c-file-style: "BSD" 13 | * c-basic-offset: 4 14 | * indent-tabs-mode: nil 15 | * End: 16 | */ 17 | -------------------------------------------------------------------------------- /xen/include/asm-arm/perfc.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_PERFC_H__ 2 | #define __ASM_PERFC_H__ 3 | 4 | static inline void arch_perfc_reset(void) 5 | { 6 | } 7 | 8 | static inline void arch_perfc_gather(void) 9 | { 10 | } 11 | 12 | #endif 13 | 14 | /* 15 | * Local variables: 16 | * mode: C 17 | * c-file-style: "BSD" 18 | * c-basic-offset: 4 19 | * indent-tabs-mode: nil 20 | * End: 21 | */ 22 | -------------------------------------------------------------------------------- /xen/include/asm-x86/bzimage.h: -------------------------------------------------------------------------------- 1 | #ifndef __X86_BZIMAGE_H__ 2 | #define __X86_BZIMAGE_H__ 3 | 4 | #include 5 | #include 6 | 7 | unsigned long bzimage_headroom(char *image_start, unsigned long image_length); 8 | 9 | int bzimage_parse(char *image_base, char **image_start, 10 | unsigned long *image_len); 11 | 12 | #endif /* __X86_BZIMAGE_H__ */ 13 | -------------------------------------------------------------------------------- /xen/include/asm-x86/cache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * include/asm-x86/cache.h 3 | */ 4 | #ifndef __ARCH_X86_CACHE_H 5 | #define __ARCH_X86_CACHE_H 6 | 7 | #include 8 | 9 | /* L1 cache line size */ 10 | #define L1_CACHE_SHIFT (CONFIG_X86_L1_CACHE_SHIFT) 11 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 12 | 13 | #define __read_mostly __section(".data.read_mostly") 14 | 15 | #endif 16 | -------------------------------------------------------------------------------- /xen/include/asm-x86/hvm/guest_access.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_X86_HVM_GUEST_ACCESS_H__ 2 | #define __ASM_X86_HVM_GUEST_ACCESS_H__ 3 | 4 | unsigned long copy_to_user_hvm(void *to, const void *from, unsigned len); 5 | unsigned long clear_user_hvm(void *to, unsigned int len); 6 | unsigned long copy_from_user_hvm(void *to, const void *from, unsigned len); 7 | 8 | #endif /* __ASM_X86_HVM_GUEST_ACCESS_H__ */ 9 | -------------------------------------------------------------------------------- /xen/include/asm-x86/mach-default/mach_wakecpu.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_MACH_WAKECPU_H 2 | #define __ASM_MACH_WAKECPU_H 3 | 4 | /* 5 | * This file copes with machines that wakeup secondary CPUs by the 6 | * INIT, INIT, STARTUP sequence. 7 | */ 8 | 9 | #define TRAMPOLINE_LOW maddr_to_virt(0x467) 10 | #define TRAMPOLINE_HIGH maddr_to_virt(0x469) 11 | 12 | #endif /* __ASM_MACH_WAKECPU_H */ 13 | -------------------------------------------------------------------------------- /tools/ocaml/libs/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | SUBDIRS= \ 5 | mmap \ 6 | xentoollog \ 7 | xc eventchn \ 8 | xb xs xl 9 | 10 | .PHONY: all 11 | all: subdirs-all 12 | 13 | .PHONY: install 14 | install: subdirs-install 15 | 16 | .PHONY: clean 17 | clean: subdirs-clean 18 | 19 | .PHONY: distclean 20 | distclean: subdirs-distclean 21 | -------------------------------------------------------------------------------- /xen/common/libelf/Makefile: -------------------------------------------------------------------------------- 1 | obj-bin-y := libelf.o 2 | 3 | SECTIONS := text data $(SPECIAL_DATA_SECTIONS) 4 | 5 | CFLAGS += -Wno-pointer-sign 6 | 7 | libelf.o: libelf-temp.o Makefile 8 | $(OBJCOPY) $(foreach s,$(SECTIONS),--rename-section .$(s)=.init.$(s)) $< $@ 9 | 10 | libelf-temp.o: libelf-tools.o libelf-loader.o libelf-dominfo.o #libelf-relocate.o 11 | $(LD) $(LDFLAGS) -r -o $@ $^ 12 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/systemd/xenstored.socket.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=xenstore socket 3 | Requires=proc-xen.mount var-lib-xenstored.mount 4 | After=proc-xen.mount var-lib-xenstored.mount 5 | ConditionPathExists=/proc/xen/capabilities 6 | 7 | [Socket] 8 | ListenStream=/var/run/xenstored/socket 9 | SocketMode=0600 10 | Service=xenstored.service 11 | 12 | [Install] 13 | WantedBy=sockets.target 14 | -------------------------------------------------------------------------------- /xen/include/xen/stdarg.h: -------------------------------------------------------------------------------- 1 | #ifndef __XEN_STDARG_H__ 2 | #define __XEN_STDARG_H__ 3 | 4 | typedef __builtin_va_list va_list; 5 | #define va_copy(dest, src) __builtin_va_copy((dest), (src)) 6 | #define va_start(ap, last) __builtin_va_start((ap), (last)) 7 | #define va_end(ap) __builtin_va_end(ap) 8 | #define va_arg __builtin_va_arg 9 | 10 | #endif /* __XEN_STDARG_H__ */ 11 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/systemd/xenstored_ro.socket.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=xenstore ro socket 3 | Requires=proc-xen.mount var-lib-xenstored.mount 4 | After=proc-xen.mount var-lib-xenstored.mount 5 | ConditionPathExists=/proc/xen/capabilities 6 | 7 | [Socket] 8 | ListenStream=/var/run/xenstored/socket_ro 9 | SocketMode=0660 10 | Service=xenstored.service 11 | 12 | [Install] 13 | WantedBy=sockets.target 14 | -------------------------------------------------------------------------------- /tools/libfsimage/ext2fs-lib/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../.. 2 | 3 | LIB_SRCS-y = ext2fs-lib.c 4 | 5 | FS = ext2fs-lib 6 | 7 | FS_LIBDEPS = $(EXTFS_LIBS) 8 | 9 | # Include configure output (config.h) 10 | CFLAGS += -include $(XEN_ROOT)/tools/config.h 11 | 12 | .PHONY: all 13 | all: fs-all 14 | 15 | .PHONY: install 16 | install: fs-install 17 | 18 | include $(XEN_ROOT)/tools/libfsimage/Rules.mk 19 | -------------------------------------------------------------------------------- /xen/xsm/flask/policy/security_classes: -------------------------------------------------------------------------------- 1 | # FLASK 2 | 3 | # 4 | # Define the security object classes 5 | # 6 | 7 | # Classes marked as userspace are classes 8 | # for userspace object managers 9 | 10 | class xen 11 | class xen2 12 | class domain 13 | class domain2 14 | class hvm 15 | class mmu 16 | class resource 17 | class shadow 18 | class event 19 | class grant 20 | class security 21 | 22 | # FLASK 23 | -------------------------------------------------------------------------------- /tools/firmware/hvmloader/config-seabios.h: -------------------------------------------------------------------------------- 1 | #ifndef __HVMLOADER_CONFIG_SEABIOS_H__ 2 | #define __HVMLOADER_CONFIG_SEABIOS_H__ 3 | 4 | #define BIOS_INFO_PHYSICAL_ADDRESS 0x00001000 5 | 6 | #endif /* __HVMLOADER_CONFIG_SEABIOS_H__ */ 7 | 8 | /* 9 | * Local variables: 10 | * mode: C 11 | * c-file-style: "BSD" 12 | * c-basic-offset: 4 13 | * tab-width: 4 14 | * indent-tabs-mode: nil 15 | * End: 16 | */ 17 | -------------------------------------------------------------------------------- /tools/libfsimage/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | SUBDIRS-y = common ufs reiserfs iso9660 fat zfs 5 | SUBDIRS-$(CONFIG_X86) += xfs 6 | ifneq ($(EXTFS_LIBS), ) 7 | SUBDIRS-y += ext2fs-lib 8 | else 9 | SUBDIRS-y += ext2fs 10 | endif 11 | 12 | .PHONY: all clean install 13 | all clean install: %: subdirs-% 14 | 15 | .PHONY: distclean 16 | distclean: clean 17 | -------------------------------------------------------------------------------- /tools/libxc/xc_dom_decompress_unsafe_bzip2.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "xg_private.h" 6 | #include "xc_dom_decompress_unsafe.h" 7 | 8 | #include "../../xen/common/bunzip2.c" 9 | 10 | int xc_try_bzip2_decode( 11 | struct xc_dom_image *dom, void **blob, size_t *size) 12 | { 13 | return xc_dom_decompress_unsafe(bunzip2, dom, blob, size); 14 | } 15 | -------------------------------------------------------------------------------- /tools/libxc/xc_dom_decompress_unsafe_lzma.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "xg_private.h" 6 | #include "xc_dom_decompress_unsafe.h" 7 | 8 | #include "../../xen/common/unlzma.c" 9 | 10 | int xc_try_lzma_decode( 11 | struct xc_dom_image *dom, void **blob, size_t *size) 12 | { 13 | return xc_dom_decompress_unsafe(unlzma, dom, blob, size); 14 | } 15 | -------------------------------------------------------------------------------- /tools/ocaml/test/send_debug_keys.ml: -------------------------------------------------------------------------------- 1 | open Arg 2 | open Printf 3 | open Xenlight 4 | 5 | let send_keys ctx s = 6 | printf "Sending debug key %s\n" s; 7 | Xenlight.Host.send_debug_keys ctx s; 8 | () 9 | 10 | let _ = 11 | let logger = Xtl.create_stdio_logger () in 12 | let ctx = Xenlight.ctx_alloc logger in 13 | Arg.parse [ 14 | ] (fun s -> send_keys ctx s) "usage: send_debug_keys " 15 | 16 | -------------------------------------------------------------------------------- /xen/include/asm-arm/arm32/bug.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARM_ARM32_BUG_H__ 2 | #define __ARM_ARM32_BUG_H__ 3 | 4 | #include 5 | 6 | /* ARMv7 provides a list of undefined opcode (see A8.8.247 DDI 0406C.b) 7 | * Use one them encoding A1 to go in exception mode 8 | */ 9 | #define BUG_OPCODE 0xe7f000f0 10 | 11 | #define BUG_INSTR ".word " __stringify(BUG_OPCODE) 12 | 13 | #endif /* __ARM_ARM32_BUG_H__ */ 14 | -------------------------------------------------------------------------------- /xen/include/xen/stringify.h: -------------------------------------------------------------------------------- 1 | #ifndef __XEN_STRINGIFY_H 2 | #define __XEN_STRINGIFY_H 3 | 4 | /* Indirect stringification. Doing two levels allows the parameter to be a 5 | * macro itself. For example, compile with -DFOO=bar, __stringify(FOO) 6 | * converts to "bar". 7 | */ 8 | 9 | #define __stringify_1(x...) #x 10 | #define __stringify(x...) __stringify_1(x) 11 | 12 | #endif /* !__XEN_STRINGIFY_H */ 13 | -------------------------------------------------------------------------------- /docs/misc/arm/device-tree/passthrough.txt: -------------------------------------------------------------------------------- 1 | Device passthrough 2 | =================== 3 | 4 | Any device with the property "xen,passthrough" set will not be exposed to 5 | DOM0 and therefore no driver will be loaded. 6 | 7 | It is highly recommended to set this property on devices which are passed 8 | through since many devices will not cope with being accessed by dom0 and 9 | then handed over to another domain. 10 | -------------------------------------------------------------------------------- /tools/console/testsuite/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | LDFLAGS=-static 5 | 6 | .PHONY: all 7 | all: console-dom0 console-domU procpipe 8 | 9 | console-dom0: console-dom0.o 10 | console-domU: console-domU.o 11 | procpipe: procpipe.o 12 | 13 | .PHONY: clean 14 | clean: $(RM) *.o console-domU console-dom0 procpipe 15 | 16 | .PHONY: distclean 17 | distclean: clean 18 | -------------------------------------------------------------------------------- /xen/include/asm-arm/io.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASM_IO_H 2 | #define _ASM_IO_H 3 | 4 | #if defined(CONFIG_ARM_32) 5 | # include 6 | #elif defined(CONFIG_ARM_64) 7 | # include 8 | #else 9 | # error "unknown ARM variant" 10 | #endif 11 | 12 | #endif 13 | /* 14 | * Local variables: 15 | * mode: C 16 | * c-file-style: "BSD" 17 | * c-basic-offset: 4 18 | * indent-tabs-mode: nil 19 | * End: 20 | */ 21 | -------------------------------------------------------------------------------- /xen/include/asm-x86/elf.h: -------------------------------------------------------------------------------- 1 | #ifndef __X86_ELF_H__ 2 | #define __X86_ELF_H__ 3 | 4 | typedef struct { 5 | unsigned long cr0, cr2, cr3, cr4; 6 | } crash_xen_core_t; 7 | 8 | #include 9 | 10 | #endif /* __X86_ELF_H__ */ 11 | 12 | /* 13 | * Local variables: 14 | * mode: C 15 | * c-file-style: "BSD" 16 | * c-basic-offset: 4 17 | * tab-width: 4 18 | * indent-tabs-mode: nil 19 | * End: 20 | */ 21 | -------------------------------------------------------------------------------- /xen/include/asm-x86/random.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_RANDOM_H__ 2 | #define __ASM_RANDOM_H__ 3 | 4 | #include 5 | 6 | static inline unsigned int arch_get_random(void) 7 | { 8 | unsigned int val = 0; 9 | 10 | if ( cpu_has(¤t_cpu_data, X86_FEATURE_RDRAND) ) 11 | asm volatile ( ".byte 0x0f,0xc7,0xf0" : "+a" (val) ); 12 | 13 | return val; 14 | } 15 | 16 | #endif /* __ASM_RANDOM_H__ */ 17 | -------------------------------------------------------------------------------- /stubdom/vtpm-bufsize.patch: -------------------------------------------------------------------------------- 1 | diff --git a/config.h.in b/config.h.in 2 | index d16a997..8088a2a 100644 3 | --- a/config.h.in 4 | +++ b/config.h.in 5 | @@ -27,7 +27,7 @@ 6 | #define TPM_STORAGE_NAME "${TPM_STORAGE_NAME}" 7 | #define TPM_DEVICE_NAME "${TPM_DEVICE_NAME}" 8 | #define TPM_LOG_FILE "${TPM_LOG_FILE}" 9 | -#define TPM_CMD_BUF_SIZE 4096 10 | +#define TPM_CMD_BUF_SIZE 4088 11 | 12 | #endif /* _CONFIG_H_ */ 13 | 14 | -------------------------------------------------------------------------------- /xen/arch/x86/mm/Makefile: -------------------------------------------------------------------------------- 1 | subdir-y += shadow 2 | subdir-y += hap 3 | 4 | obj-y += paging.o 5 | obj-y += p2m.o p2m-pt.o p2m-ept.o p2m-pod.o 6 | obj-y += altp2m.o 7 | obj-y += guest_walk_2.o 8 | obj-y += guest_walk_3.o 9 | obj-$(x86_64) += guest_walk_4.o 10 | obj-$(x86_64) += mem_paging.o 11 | obj-$(x86_64) += mem_sharing.o 12 | 13 | guest_walk_%.o: guest_walk.c Makefile 14 | $(CC) $(CFLAGS) -DGUEST_PAGING_LEVELS=$* -c $< -o $@ 15 | -------------------------------------------------------------------------------- /xen/include/xen/shutdown.h: -------------------------------------------------------------------------------- 1 | #ifndef __XEN_SHUTDOWN_H__ 2 | #define __XEN_SHUTDOWN_H__ 3 | 4 | #include 5 | 6 | /* opt_noreboot: If true, machine will need manual reset on error. */ 7 | extern bool_t opt_noreboot; 8 | 9 | void noreturn hwdom_shutdown(u8 reason); 10 | 11 | void noreturn machine_restart(unsigned int delay_millisecs); 12 | void noreturn machine_halt(void); 13 | 14 | #endif /* __XEN_SHUTDOWN_H__ */ 15 | -------------------------------------------------------------------------------- /xen/tools/fig-to-oct.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import sys 3 | 4 | chars_per_line = 18 5 | chars_so_far = 0 6 | 7 | sys.stdout.write('"') 8 | 9 | for char in sys.stdin.read(): 10 | 11 | sys.stdout.write("\\%03o" % ord(char)) 12 | chars_so_far = chars_so_far + 1 13 | 14 | if chars_so_far == chars_per_line: 15 | chars_so_far = 0 16 | sys.stdout.write('" \\\n"') 17 | 18 | sys.stdout.write('"\n') 19 | -------------------------------------------------------------------------------- /m4/python_version.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AX_CHECK_PYTHON_VERSION], 2 | [AC_MSG_CHECKING([for python version >= $1.$2 ]) 3 | `$PYTHON -c 'import sys; sys.exit(eval("sys.version_info < ($1, $2)"))'` 4 | if test "$?" != "0" 5 | then 6 | python_version=`$PYTHON -V 2>&1` 7 | AC_MSG_RESULT([no]) 8 | AC_MSG_ERROR( 9 | [$python_version is too old, minimum required version is $1.$2]) 10 | else 11 | AC_MSG_RESULT([yes]) 12 | fi]) 13 | -------------------------------------------------------------------------------- /xen/include/asm-arm/macros.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_MACROS_H 2 | #define __ASM_MACROS_H 3 | 4 | #ifndef __ASSEMBLY__ 5 | # error "This file should only be included in assembly file" 6 | #endif 7 | 8 | #if defined (CONFIG_ARM_32) 9 | # include 10 | #elif defined(CONFIG_ARM_64) 11 | /* No specific ARM64 macros for now */ 12 | #else 13 | # error "unknown ARM variant" 14 | #endif 15 | 16 | #endif /* __ASM_ARM_MACROS_H */ 17 | -------------------------------------------------------------------------------- /tools/pygrub/examples/alpine-linux-2.3.2.extlinux: -------------------------------------------------------------------------------- 1 | DEFAULT menu.c32 2 | PROMPT 0 3 | MENU TITLE Alpine/Linux Boot Menu 4 | MENU HIDDEN 5 | MENU AUTOBOOT Alpine will be booted automatically in # seconds. 6 | TIMEOUT 30 7 | LABEL grsec 8 | MENU DEFAULT 9 | MENU LABEL Linux 3.0.10-grsec 10 | KERNEL vmlinuz-3.0.10-grsec 11 | APPEND initrd=initramfs-3.0.10-grsec root=UUID=a97ffe64-430f-4fd3-830e-4736d9a27af0 modules=sd-mod,usb-storage,ext4 quiet 12 | -------------------------------------------------------------------------------- /xen/include/asm-x86/mach-default/bios_ebda.h: -------------------------------------------------------------------------------- 1 | #ifndef _MACH_BIOS_EBDA_H 2 | #define _MACH_BIOS_EBDA_H 3 | 4 | /* 5 | * there is a real-mode segmented pointer pointing to the 6 | * 4K EBDA area at 0x40E. 7 | */ 8 | static inline unsigned int get_bios_ebda(void) 9 | { 10 | unsigned int address = *(unsigned short *)maddr_to_virt(0x40E); 11 | address <<= 4; 12 | return address; /* 0 means none */ 13 | } 14 | 15 | #endif /* _MACH_BIOS_EBDA_H */ 16 | -------------------------------------------------------------------------------- /xen/include/xen/errno.h: -------------------------------------------------------------------------------- 1 | #ifndef __XEN_ERRNO_H__ 2 | #define __XEN_ERRNO_H__ 3 | 4 | #include 5 | 6 | #ifndef __ASSEMBLY__ 7 | 8 | #define XEN_ERRNO(name, value) name = XEN_##name, 9 | enum { 10 | #include 11 | }; 12 | 13 | #else /* !__ASSEMBLY__ */ 14 | 15 | #define XEN_ERRNO(name, value) .equ name, XEN_##name 16 | #include 17 | 18 | #endif /* __ASSEMBLY__ */ 19 | 20 | #endif /* __XEN_ERRNO_H__ */ 21 | -------------------------------------------------------------------------------- /xen/include/xen/vga.h: -------------------------------------------------------------------------------- 1 | /* 2 | * vga.h 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file COPYING in the main directory of this archive 6 | * for more details. 7 | */ 8 | 9 | #ifndef _XEN_VGA_H 10 | #define _XEN_VGA_H 11 | 12 | #include 13 | 14 | #ifdef CONFIG_VGA 15 | extern struct xen_vga_console_info vga_console_info; 16 | #endif 17 | 18 | #endif /* _XEN_VGA_H */ 19 | -------------------------------------------------------------------------------- /tools/firmware/rombios/e820.h: -------------------------------------------------------------------------------- 1 | #ifndef __ROMBIOS_E820_H__ 2 | #define __ROMBIOS_E820_H__ 3 | 4 | /* 5 | * PC BIOS standard E820 types and structure. 6 | */ 7 | #define E820_RAM 1 8 | #define E820_RESERVED 2 9 | #define E820_ACPI 3 10 | #define E820_NVS 4 11 | 12 | struct e820entry { 13 | uint64_t addr; 14 | uint64_t size; 15 | uint32_t type; 16 | } __attribute__((packed)); 17 | 18 | #endif /* __ROMBIOS_E820_H__ */ 19 | -------------------------------------------------------------------------------- /xen/common/libfdt/Makefile.libfdt: -------------------------------------------------------------------------------- 1 | # Makefile.libfdt 2 | # 3 | # This is not a complete Makefile of itself. Instead, it is designed to 4 | # be easily embeddable into other systems of Makefiles. 5 | # 6 | LIBFDT_soname = libfdt.$(SHAREDLIB_EXT).1 7 | LIBFDT_INCLUDES = fdt.h libfdt.h libfdt_env.h 8 | LIBFDT_VERSION = version.lds 9 | LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c fdt_empty_tree.c 10 | LIBFDT_OBJS = $(LIBFDT_SRCS:%.c=%.o) 11 | -------------------------------------------------------------------------------- /xen/include/asm-x86/div64.h: -------------------------------------------------------------------------------- 1 | #ifndef __X86_DIV64 2 | #define __X86_DIV64 3 | 4 | #include 5 | 6 | #define do_div(n,base) ({ \ 7 | uint32_t __base = (base); \ 8 | uint32_t __rem; \ 9 | __rem = ((uint64_t)(n)) % __base; \ 10 | (n) = ((uint64_t)(n)) / __base; \ 11 | __rem; \ 12 | }) 13 | 14 | #endif 15 | -------------------------------------------------------------------------------- /stubdom/grub/config.h: -------------------------------------------------------------------------------- 1 | #include 2 | #undef putchar 3 | #include 4 | #include 5 | #include 6 | #define debug _debug 7 | #define grub_halt(a) do_exit() 8 | #define printf grub_printf 9 | void kexec(void *kernel, long kernel_size, void *module, long module_size, char *cmdline, unsigned long flags); 10 | struct fbfront_dev *fb_open(void *fb, int width, int height, int depth); 11 | void fb_close(void); 12 | void pv_boot (void); 13 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/lib/setbit.S: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/arch/arm/lib/setbit.S 3 | * 4 | * Copyright (C) 1995-1996 Russell King 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License version 2 as 8 | * published by the Free Software Foundation. 9 | */ 10 | #include 11 | 12 | #include "assembler.h" 13 | #include "bitops.h" 14 | .text 15 | 16 | bitop _set_bit, orr 17 | -------------------------------------------------------------------------------- /xen/include/asm-x86/mach-default/mach_mpparse.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_MACH_MPPARSE_H 2 | #define __ASM_MACH_MPPARSE_H 3 | 4 | static inline int __init mps_oem_check(struct mp_config_table *mpc, char *oem, 5 | char *productid) 6 | { 7 | return 0; 8 | } 9 | 10 | /* Hook from generic ACPI tables.c */ 11 | static inline int __init acpi_madt_oem_check(char *oem_id, char *oem_table_id) 12 | { 13 | return 0; 14 | } 15 | 16 | 17 | #endif /* __ASM_MACH_MPPARSE_H */ 18 | -------------------------------------------------------------------------------- /xen/include/xen/early_printk.h: -------------------------------------------------------------------------------- 1 | /* 2 | * printk() for use before the console is initialized 3 | */ 4 | #ifndef __XEN_EARLY_PRINTK_H__ 5 | #define __XEN_EARLY_PRINTK_H__ 6 | 7 | #ifdef CONFIG_EARLY_PRINTK 8 | void early_puts(const char *s); 9 | #else 10 | #define early_puts NULL 11 | #endif 12 | 13 | #endif 14 | /* 15 | * Local variables: 16 | * mode: C 17 | * c-file-style: "BSD" 18 | * c-basic-offset: 4 19 | * indent-tabs-mode: nil 20 | * End: 21 | */ 22 | -------------------------------------------------------------------------------- /tools/libxl/libxl_test_fdevent.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST_FDEVENT_H 2 | #define TEST_FDEVENT_H 3 | 4 | #include 5 | 6 | int libxl_test_fdevent(libxl_ctx *ctx, int fd, short events, 7 | libxl_asyncop_how *ao_how) 8 | LIBXL_EXTERNAL_CALLERS_ONLY; 9 | /* This operation waits for one of the poll events to occur on fd, and 10 | * then completes successfully. (Or, it can be aborted.) */ 11 | 12 | #endif /*TEST_FDEVENT_H*/ 13 | -------------------------------------------------------------------------------- /config/arm64.mk: -------------------------------------------------------------------------------- 1 | CONFIG_ARM := y 2 | CONFIG_ARM_64 := y 3 | CONFIG_ARM_$(XEN_OS) := y 4 | 5 | CONFIG_XEN_INSTALL_SUFFIX := 6 | 7 | CFLAGS += #-marm -march= -mcpu= etc 8 | 9 | HAS_PL011 := y 10 | HAS_CADENCE_UART := y 11 | HAS_NS16550 := y 12 | HAS_MEM_ACCESS := y 13 | HAS_GICV3 := y 14 | 15 | # Use only if calling $(LD) directly. 16 | LDFLAGS_DIRECT += -EL 17 | 18 | CONFIG_LOAD_ADDRESS ?= 0x80000000 19 | 20 | IOEMU_CPU_ARCH ?= aarch64 21 | 22 | EFI_DIR ?= /usr/lib64/efi 23 | -------------------------------------------------------------------------------- /tools/xenstat/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | SUBDIRS := 5 | SUBDIRS += libxenstat 6 | 7 | # This doesn't cross-compile (cross-compile environments rarely have curses) 8 | ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH)) 9 | ifeq ($(wildcard /usr/include/curses.h),/usr/include/curses.h) 10 | SUBDIRS += xentop 11 | endif 12 | endif 13 | 14 | .PHONY: all install clean distclean 15 | 16 | all install clean distclean: %: subdirs-% 17 | -------------------------------------------------------------------------------- /tools/xenstore/TODO: -------------------------------------------------------------------------------- 1 | TODO in no particular order. Some of these will never be done. There 2 | are omissions of important but necessary things. It is up to the 3 | reader to fill in the blanks. 4 | 5 | - Timeout failed watch responses 6 | - Dynamic/supply nodes 7 | - Persistant storage of introductions, watches and transactions, so daemon can restart 8 | - Remove assumption that rename doesn't fail 9 | - Multi-root transactions, for setting up front and back ends at same time. 10 | 11 | -------------------------------------------------------------------------------- /xen/include/xen/cache.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINUX_CACHE_H 2 | #define __LINUX_CACHE_H 3 | 4 | #include 5 | 6 | #ifndef L1_CACHE_ALIGN 7 | #define L1_CACHE_ALIGN(x) (((x)+(L1_CACHE_BYTES-1))&~(L1_CACHE_BYTES-1)) 8 | #endif 9 | 10 | #ifndef SMP_CACHE_BYTES 11 | #define SMP_CACHE_BYTES L1_CACHE_BYTES 12 | #endif 13 | 14 | #ifndef __cacheline_aligned 15 | #define __cacheline_aligned __attribute__((__aligned__(SMP_CACHE_BYTES))) 16 | #endif 17 | 18 | #endif /* __LINUX_CACHE_H */ 19 | -------------------------------------------------------------------------------- /xen/include/xen/compile.h.in: -------------------------------------------------------------------------------- 1 | #define XEN_COMPILE_DATE "@@date@@" 2 | #define XEN_COMPILE_TIME "@@time@@" 3 | #define XEN_COMPILE_BY "@@whoami@@" 4 | #define XEN_COMPILE_DOMAIN "@@domain@@" 5 | #define XEN_COMPILE_HOST "@@hostname@@" 6 | #define XEN_COMPILER "@@compiler@@" 7 | 8 | #define XEN_VERSION @@version@@ 9 | #define XEN_SUBVERSION @@subversion@@ 10 | #define XEN_EXTRAVERSION "@@extraversion@@" 11 | 12 | #define XEN_CHANGESET "@@changeset@@" 13 | #define XEN_BANNER \ 14 | -------------------------------------------------------------------------------- /config/x86_32.mk: -------------------------------------------------------------------------------- 1 | CONFIG_X86 := y 2 | CONFIG_X86_32 := y 3 | CONFIG_X86_$(XEN_OS) := y 4 | 5 | CONFIG_HVM := y 6 | CONFIG_MIGRATE := y 7 | CONFIG_XCUTILS := y 8 | 9 | HAS_MEM_ACCESS := y 10 | HAS_MEM_PAGING := y 11 | HAS_MEM_SHARING := y 12 | 13 | CFLAGS += -m32 -march=i686 14 | 15 | # Use only if calling $(LD) directly. 16 | LDFLAGS_DIRECT_OpenBSD = _obsd 17 | LDFLAGS_DIRECT_FreeBSD = _fbsd 18 | LDFLAGS_DIRECT += -melf_i386$(LDFLAGS_DIRECT_$(XEN_OS)) 19 | 20 | IOEMU_CPU_ARCH ?= i386 21 | -------------------------------------------------------------------------------- /tools/firmware/rombios/32bit/tcgbios/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../../../.. 2 | include $(XEN_ROOT)/tools/firmware/Rules.mk 3 | 4 | TARGET = tcgbiosext.o 5 | 6 | CFLAGS += $(CFLAGS_xeninclude) -I.. -I../.. 7 | 8 | .PHONY: all 9 | all: $(TARGET) 10 | 11 | .PHONY: clean 12 | clean: 13 | rm -rf *.o $(TARGET) $(DEPS) 14 | 15 | .PHONY: distclean 16 | distclean: clean 17 | 18 | $(TARGET): tcgbios.o tpm_drivers.o 19 | $(LD) $(LDFLAGS_DIRECT) -r $^ -o $@ 20 | 21 | -include $(DEPS) 22 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/lib/changebit.S: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/arch/arm/lib/changebit.S 3 | * 4 | * Copyright (C) 1995-1996 Russell King 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License version 2 as 8 | * published by the Free Software Foundation. 9 | */ 10 | #include 11 | 12 | #include "assembler.h" 13 | #include "bitops.h" 14 | .text 15 | 16 | bitop _change_bit, eor 17 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/lib/clearbit.S: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/arch/arm/lib/clearbit.S 3 | * 4 | * Copyright (C) 1995-1996 Russell King 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License version 2 as 8 | * published by the Free Software Foundation. 9 | */ 10 | 11 | #include 12 | 13 | #include "assembler.h" 14 | #include "bitops.h" 15 | .text 16 | 17 | bitop _clear_bit, bic 18 | -------------------------------------------------------------------------------- /xen/include/asm-arm/cache.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARCH_ARM_CACHE_H 2 | #define __ARCH_ARM_CACHE_H 3 | 4 | #include 5 | 6 | /* L1 cache line size */ 7 | #define L1_CACHE_SHIFT (CONFIG_ARM_L1_CACHE_SHIFT) 8 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 9 | 10 | #define __read_mostly __section(".data.read_mostly") 11 | 12 | #endif 13 | /* 14 | * Local variables: 15 | * mode: C 16 | * c-file-style: "BSD" 17 | * c-basic-offset: 4 18 | * indent-tabs-mode: nil 19 | * End: 20 | */ 21 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopmd.h: -------------------------------------------------------------------------------- 1 | #ifndef _PGTABLE_NOPMD_H 2 | #define _PGTABLE_NOPMD_H 3 | 4 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) 5 | #error "This version of Linux should not need compat pgtable-nopmd.h" 6 | #endif 7 | 8 | #define pud_t pgd_t 9 | #define pud_offset(d, va) d 10 | #define pud_none(pud) 0 11 | #define pud_present(pud) 1 12 | #define PTRS_PER_PUD 1 13 | 14 | #endif /* _PGTABLE_NOPMD_H */ 15 | -------------------------------------------------------------------------------- /xen/arch/x86/clear_page.S: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define ptr_reg %rdi 5 | 6 | ENTRY(clear_page_sse2) 7 | mov $PAGE_SIZE/16, %ecx 8 | xor %eax,%eax 9 | 10 | 0: dec %ecx 11 | movnti %eax, (ptr_reg) 12 | movnti %eax, 4(ptr_reg) 13 | movnti %eax, 8(ptr_reg) 14 | movnti %eax, 12(ptr_reg) 15 | lea 16(ptr_reg), ptr_reg 16 | jnz 0b 17 | 18 | sfence 19 | ret 20 | -------------------------------------------------------------------------------- /xen/include/asm-arm/init.h: -------------------------------------------------------------------------------- 1 | #ifndef _XEN_ASM_INIT_H 2 | #define _XEN_ASM_INIT_H 3 | 4 | struct init_info 5 | { 6 | /* Pointer to the stack, used by head.S when entering in C */ 7 | unsigned char *stack; 8 | /* Logical CPU ID, used by start_secondary */ 9 | unsigned int cpuid; 10 | }; 11 | 12 | #endif /* _XEN_ASM_INIT_H */ 13 | /* 14 | * Local variables: 15 | * mode: C 16 | * c-file-style: "BSD" 17 | * c-basic-offset: 4 18 | * indent-tabs-mode: nil 19 | * End: 20 | */ 21 | -------------------------------------------------------------------------------- /xen/include/asm-x86/mwait.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_X86_MWAIT_H__ 2 | #define __ASM_X86_MWAIT_H__ 3 | 4 | #define MWAIT_SUBSTATE_MASK 0xf 5 | #define MWAIT_CSTATE_MASK 0xf 6 | #define MWAIT_SUBSTATE_SIZE 4 7 | 8 | #define CPUID_MWAIT_LEAF 5 9 | #define CPUID5_ECX_EXTENSIONS_SUPPORTED 0x1 10 | #define CPUID5_ECX_INTERRUPT_BREAK 0x2 11 | 12 | #define MWAIT_ECX_INTERRUPT_BREAK 0x1 13 | 14 | void mwait_idle_with_hints(unsigned int eax, unsigned int ecx); 15 | 16 | #endif /* __ASM_X86_MWAIT_H__ */ 17 | -------------------------------------------------------------------------------- /tools/firmware/Rules.mk: -------------------------------------------------------------------------------- 1 | # Firmware is a 32-bit target 2 | override XEN_TARGET_ARCH = x86_32 3 | 4 | # User-supplied CFLAGS are not useful here. 5 | CFLAGS = 6 | EXTRA_CFLAGS_XEN_TOOLS = 7 | 8 | include $(XEN_ROOT)/tools/Rules.mk 9 | 10 | ifneq ($(debug),y) 11 | CFLAGS += -DNDEBUG 12 | endif 13 | 14 | CFLAGS += -Werror 15 | 16 | $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) 17 | 18 | # Extra CFLAGS suitable for an embedded type of environment. 19 | CFLAGS += -fno-builtin -msoft-float 20 | -------------------------------------------------------------------------------- /tools/tests/x86_emulator/blowfish.mk: -------------------------------------------------------------------------------- 1 | 2 | XEN_ROOT = $(CURDIR)/../../.. 3 | CFLAGS = 4 | include $(XEN_ROOT)/tools/Rules.mk 5 | 6 | $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) 7 | 8 | CFLAGS += -fno-builtin -msoft-float 9 | 10 | .PHONY: all 11 | all: blowfish.bin 12 | 13 | blowfish.bin: blowfish.c 14 | $(CC) $(CFLAGS) -c blowfish.c 15 | $(LD) $(LDFLAGS_DIRECT) -N -Ttext 0x100000 -o blowfish.tmp blowfish.o 16 | $(OBJCOPY) -O binary blowfish.tmp blowfish.bin 17 | rm -f blowfish.tmp 18 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/lib/testsetbit.S: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/arch/arm/lib/testsetbit.S 3 | * 4 | * Copyright (C) 1995-1996 Russell King 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License version 2 as 8 | * published by the Free Software Foundation. 9 | */ 10 | #include 11 | 12 | #include "assembler.h" 13 | #include "bitops.h" 14 | .text 15 | 16 | testop _test_and_set_bit, orreq, streq 17 | -------------------------------------------------------------------------------- /tools/libxl/bash-completion: -------------------------------------------------------------------------------- 1 | # Copy this file to /etc/bash_completion.d/xl.sh 2 | 3 | _xl() 4 | { 5 | local IFS=$'\n,' 6 | 7 | local cur opts xl 8 | COMPREPLY=() 9 | cur="${COMP_WORDS[COMP_CWORD]}" 10 | xl=xl 11 | 12 | if [[ $COMP_CWORD == 1 ]] ; then 13 | opts=`${xl} help 2>/dev/null | sed '1,4d' | awk '/^ [^ ]/ {print $1}' | sed 's/$/ ,/g'` && COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) 14 | return 0 15 | fi 16 | 17 | return 0 18 | } 19 | 20 | complete -F _xl -o nospace -o default xl 21 | -------------------------------------------------------------------------------- /tools/tests/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | CFLAGS += $(CFLAGS_libxenctrl) 5 | LDLIBS += $(LDLIBS_libxenctrl) 6 | 7 | SUBDIRS-y := 8 | SUBDIRS-$(CONFIG_X86) += mce-test 9 | SUBDIRS-y += mem-sharing 10 | ifeq ($(XEN_TARGET_ARCH),__fixme__) 11 | SUBDIRS-y += regression 12 | endif 13 | SUBDIRS-$(CONFIG_X86) += x86_emulator 14 | SUBDIRS-y += xen-access 15 | 16 | .PHONY: all clean install distclean 17 | all clean distclean: %: subdirs-% 18 | 19 | install: 20 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/lib/testchangebit.S: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/arch/arm/lib/testchangebit.S 3 | * 4 | * Copyright (C) 1995-1996 Russell King 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License version 2 as 8 | * published by the Free Software Foundation. 9 | */ 10 | #include 11 | 12 | #include "assembler.h" 13 | #include "bitops.h" 14 | .text 15 | 16 | testop _test_and_change_bit, eor, str 17 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/systemd/xen-init-dom0.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=xen-init-dom0, initialise Dom0 configuration (xenstore nodes, JSON configuration stub) 3 | Requires=xenstored.service proc-xen.mount 4 | After=xenstored.service proc-xen.mount 5 | ConditionPathExists=/proc/xen/capabilities 6 | 7 | [Service] 8 | Type=oneshot 9 | RemainAfterExit=true 10 | ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities 11 | ExecStart=@LIBEXEC_BIN@/xen-init-dom0 12 | 13 | [Install] 14 | WantedBy=multi-user.target 15 | -------------------------------------------------------------------------------- /tools/ocaml/test/dmesg.ml: -------------------------------------------------------------------------------- 1 | open Printf 2 | 3 | let _ = 4 | Xenlight.register_exceptions (); 5 | let logger = Xtl.create_stdio_logger ~level:Xentoollog.Debug () in 6 | let ctx = Xenlight.ctx_alloc logger in 7 | 8 | let open Xenlight.Host in 9 | let reader = xen_console_read_start ctx 0 in 10 | (try 11 | while true do 12 | let line = xen_console_read_line ctx reader in 13 | print_string line 14 | done 15 | with End_of_file -> ()); 16 | let _ = xen_console_read_finish ctx reader in 17 | () 18 | 19 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/lib/testclearbit.S: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/arch/arm/lib/testclearbit.S 3 | * 4 | * Copyright (C) 1995-1996 Russell King 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License version 2 as 8 | * published by the Free Software Foundation. 9 | */ 10 | #include 11 | 12 | #include "assembler.h" 13 | #include "bitops.h" 14 | .text 15 | 16 | testop _test_and_clear_bit, bicne, strne 17 | -------------------------------------------------------------------------------- /tools/blktap2/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | CFLAGS += $(CFLAGS_libxenctrl) 5 | LDLIBS += $(LDLIBS_libxenctrl) 6 | 7 | SUBDIRS-y := 8 | SUBDIRS-y += include 9 | SUBDIRS-y += lvm 10 | SUBDIRS-y += vhd 11 | SUBDIRS-$(CONFIG_Linux) += drivers 12 | SUBDIRS-$(CONFIG_Linux) += control 13 | 14 | clean: 15 | rm -rf *.a *.so *.o *.rpm $(LIB) *~ $(DEPS) TAGS 16 | 17 | distclean: clean 18 | 19 | .PHONY: all clean install distclean 20 | all clean install distclean: %: subdirs-% 21 | -------------------------------------------------------------------------------- /xen/include/asm-x86/machine_kexec.h: -------------------------------------------------------------------------------- 1 | #ifndef __X86_MACHINE_KEXEC_H__ 2 | #define __X86_MACHINE_KEXEC_H__ 3 | 4 | #define KEXEC_RELOC_FLAG_COMPAT 0x1 /* 32-bit image */ 5 | 6 | #ifndef __ASSEMBLY__ 7 | 8 | extern void kexec_reloc(unsigned long reloc_code, unsigned long reloc_pt, 9 | unsigned long ind_maddr, unsigned long entry_maddr, 10 | unsigned long flags); 11 | 12 | extern unsigned int kexec_reloc_size; 13 | 14 | #endif 15 | 16 | #endif /* __X86_MACHINE_KEXEC_H__ */ 17 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/compat-include/asm-generic/pgtable-nopud.h: -------------------------------------------------------------------------------- 1 | #ifndef _PGTABLE_NOPUD_H 2 | #define _PGTABLE_NOPUD_H 3 | 4 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) 5 | #error "This version of Linux should not need compat pgtable-nopud.h" 6 | #endif 7 | 8 | #define pud_t pgd_t 9 | #define pud_offset(d, va) d 10 | #define pud_none(pud) 0 11 | #define pud_present(pud) 1 12 | #define pud_bad(pud) 0 13 | #define PTRS_PER_PUD 1 14 | 15 | #endif /* _PGTABLE_NOPUD_H */ 16 | -------------------------------------------------------------------------------- /xen/include/asm-x86/string.h: -------------------------------------------------------------------------------- 1 | #ifndef __X86_STRING_H__ 2 | #define __X86_STRING_H__ 3 | 4 | #include 5 | 6 | #define __HAVE_ARCH_MEMCPY 7 | #define memcpy(t,f,n) (__builtin_memcpy((t),(f),(n))) 8 | 9 | /* Some versions of gcc don't have this builtin. It's non-critical anyway. */ 10 | #define __HAVE_ARCH_MEMMOVE 11 | extern void *memmove(void *dest, const void *src, size_t n); 12 | 13 | #define __HAVE_ARCH_MEMSET 14 | #define memset(s,c,n) (__builtin_memset((s),(c),(n))) 15 | 16 | #endif /* __X86_STRING_H__ */ 17 | -------------------------------------------------------------------------------- /tools/debugger/gdbsx/gx/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../../.. 2 | include ../Rules.mk 3 | 4 | GX_OBJS := gx_comm.o gx_main.o gx_utils.o gx_local.o 5 | GX_HDRS := $(wildcard *.h) 6 | 7 | .PHONY: all 8 | all: gx_all.a 9 | 10 | .PHONY: clean 11 | clean: 12 | rm -rf gx_all.a *.o .*.d 13 | 14 | .PHONY: distclean 15 | distclean: clean 16 | 17 | #%.o: %.c $(GX_HDRS) Makefile 18 | # $(CC) -c $(CFLAGS) -o $@ $< 19 | 20 | gx_all.a: $(GX_OBJS) Makefile $(GX_HDRS) 21 | ar cr $@ $(GX_OBJS) # problem with ld using -m32 22 | 23 | -------------------------------------------------------------------------------- /tools/firmware/ovmf-makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT=$(CURDIR)/../../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | ifeq ($(debug),y) 5 | TARGET=DEBUG 6 | else 7 | TARGET=RELEASE 8 | endif 9 | 10 | # OVMF build system has its own parallel building support. 11 | .NOTPARALLEL: 12 | MAKEFLAGS += -j1 13 | 14 | .PHONY: all 15 | all: build 16 | 17 | .PHONY: build 18 | build: 19 | OvmfPkg/build.sh -a X64 -b $(TARGET) -n 4 20 | cp Build/OvmfX64/$(TARGET)_GCC*/FV/OVMF.fd ovmf.bin 21 | 22 | .PHONY: clean 23 | clean: 24 | rm -rf ovmf.bin Build/* 25 | -------------------------------------------------------------------------------- /xen/include/xen/symbols.h: -------------------------------------------------------------------------------- 1 | #ifndef _XEN_SYMBOLS_H 2 | #define _XEN_SYMBOLS_H 3 | 4 | #include 5 | 6 | #define KSYM_NAME_LEN 127 7 | 8 | /* Lookup an address. */ 9 | const char *symbols_lookup(unsigned long addr, 10 | unsigned long *symbolsize, 11 | unsigned long *offset, 12 | char *namebuf); 13 | 14 | int xensyms_read(uint32_t *symnum, char *type, 15 | uint64_t *address, char *name); 16 | 17 | #endif /*_XEN_SYMBOLS_H*/ 18 | -------------------------------------------------------------------------------- /xen/arch/x86/x86_64/Makefile: -------------------------------------------------------------------------------- 1 | subdir-y += compat 2 | 3 | obj-bin-y += entry.o 4 | obj-bin-y += gpr_switch.o 5 | obj-y += mm.o 6 | obj-y += traps.o 7 | obj-y += machine_kexec.o 8 | obj-y += pci.o 9 | obj-y += acpi_mmcfg.o 10 | obj-y += mmconf-fam10h.o 11 | obj-y += mmconfig_64.o 12 | obj-y += mmconfig-shared.o 13 | obj-y += compat.o 14 | obj-y += domain.o 15 | obj-y += physdev.o 16 | obj-y += platform_hypercall.o 17 | obj-y += cpu_idle.o 18 | obj-y += cpufreq.o 19 | obj-bin-y += kexec_reloc.o 20 | 21 | obj-$(crash_debug) += gdbstub.o 22 | -------------------------------------------------------------------------------- /xen/include/xen/numa.h: -------------------------------------------------------------------------------- 1 | #ifndef _XEN_NUMA_H 2 | #define _XEN_NUMA_H 3 | 4 | #include 5 | 6 | #ifndef NODES_SHIFT 7 | #define NODES_SHIFT 0 8 | #endif 9 | 10 | #define NUMA_NO_NODE 0xFF 11 | #define NUMA_NO_DISTANCE 0xFF 12 | 13 | #define MAX_NUMNODES (1 << NODES_SHIFT) 14 | 15 | #define vcpu_to_node(v) (cpu_to_node((v)->processor)) 16 | 17 | #define domain_to_node(d) \ 18 | (((d)->vcpu != NULL && (d)->vcpu[0] != NULL) \ 19 | ? vcpu_to_node((d)->vcpu[0]) : NUMA_NO_NODE) 20 | 21 | #endif /* _XEN_NUMA_H */ 22 | -------------------------------------------------------------------------------- /config/arm32.mk: -------------------------------------------------------------------------------- 1 | CONFIG_ARM := y 2 | CONFIG_ARM_32 := y 3 | CONFIG_ARM_$(XEN_OS) := y 4 | 5 | CONFIG_XEN_INSTALL_SUFFIX := 6 | 7 | # -march= -mcpu= 8 | 9 | # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: 10 | CFLAGS += -marm 11 | 12 | HAS_PL011 := y 13 | HAS_EXYNOS4210 := y 14 | HAS_OMAP := y 15 | HAS_SCIF := y 16 | HAS_NS16550 := y 17 | HAS_MEM_ACCESS := y 18 | 19 | # Use only if calling $(LD) directly. 20 | LDFLAGS_DIRECT += -EL 21 | 22 | CONFIG_LOAD_ADDRESS ?= 0x80000000 23 | 24 | IOEMU_CPU_ARCH ?= arm 25 | -------------------------------------------------------------------------------- /stubdom/caml/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../.. 2 | 3 | ifeq (,$(findstring clean,$(MAKECMDGOALS))) 4 | include $(XEN_ROOT)/Config.mk 5 | endif 6 | 7 | CAMLLIB = $(shell $(OCAMLC_CROSS_PREFIX)ocamlc -where) 8 | DEF_CPPFLAGS += -I$(CAMLLIB) 9 | 10 | OCAMLOPT=$(OCAMLC_CROSS_PREFIX)ocamlopt 11 | 12 | OBJS := hello.cmx 13 | LIBS := 14 | 15 | all: main-caml.o caml.o 16 | 17 | %.cmx: %.ml 18 | $(OCAMLOPT) -c $< -o $@ 19 | 20 | caml.o: $(OBJS) 21 | $(OCAMLOPT) $(LIBS) $^ -output-obj -o $@ 22 | 23 | clean: 24 | rm -f *.a *.o *.cmx *.cmi 25 | -------------------------------------------------------------------------------- /tools/hotplug/NetBSD/rc.d/xen-watchdog: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # PROVIDE: xen-watchdog 4 | # REQUIRE: DAEMON 5 | # 6 | # description: Run domain watchdog daemon 7 | # 8 | 9 | . /etc/rc.subr 10 | 11 | DIR=$(dirname "$0") 12 | . "${DIR}/xen-hotplugpath.sh" 13 | 14 | LD_LIBRARY_PATH="${libdir}" 15 | export LD_LIBRARY_PATH 16 | 17 | name="xenwatchdog" 18 | rcvar=$name 19 | command="${sbindir}/xenwatchdogd" 20 | start_cmd="echo Starting ${name}. && PATH=${PATH}:${sbindir} ${command} 30 15" 21 | 22 | load_rc_config $name 23 | run_rc_command "$1" 24 | -------------------------------------------------------------------------------- /xen/arch/x86/hvm/Makefile: -------------------------------------------------------------------------------- 1 | subdir-y += svm 2 | subdir-y += vmx 3 | 4 | obj-y += asid.o 5 | obj-y += emulate.o 6 | obj-y += event.o 7 | obj-y += hpet.o 8 | obj-y += hvm.o 9 | obj-y += i8254.o 10 | obj-y += intercept.o 11 | obj-y += io.o 12 | obj-y += irq.o 13 | obj-y += mtrr.o 14 | obj-y += nestedhvm.o 15 | obj-y += pmtimer.o 16 | obj-y += quirks.o 17 | obj-y += rtc.o 18 | obj-y += save.o 19 | obj-y += stdvga.o 20 | obj-y += vioapic.o 21 | obj-y += viridian.o 22 | obj-y += vlapic.o 23 | obj-y += vmsi.o 24 | obj-y += vpic.o 25 | obj-y += vpt.o 26 | -------------------------------------------------------------------------------- /xen/include/asm-arm/iocap.h: -------------------------------------------------------------------------------- 1 | #ifndef __X86_IOCAP_H__ 2 | #define __X86_IOCAP_H__ 3 | 4 | #define cache_flush_permitted(d) \ 5 | (!rangeset_is_empty((d)->iomem_caps)) 6 | 7 | #define multipage_allocation_permitted(d, order) \ 8 | (((order) <= 9) || /* allow 2MB superpages */ \ 9 | !rangeset_is_empty((d)->iomem_caps)) 10 | 11 | #endif 12 | 13 | /* 14 | * Local variables: 15 | * mode: C 16 | * c-file-style: "BSD" 17 | * c-basic-offset: 4 18 | * indent-tabs-mode: nil 19 | * End: 20 | */ 21 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- 1 | This is at least a partial credits-file of people that have 2 | contributed to the Xen project. It is sorted by name and 3 | formatted to allow easy grepping and beautification by 4 | scripts. The fields are: name (N), email (E), web-address 5 | (W), PGP key ID and fingerprint (P), description (D), and 6 | snail-mail address (S). 7 | Thanks, 8 | 9 | Xen team 10 | ---------- 11 | 12 | N: Jeremy Fitzhardinge 13 | E: jeremy@goop.org 14 | W: http://www.goop.org/~jeremy 15 | P: 1B40B6D0 16 | D: Linux pvops 17 | -------------------------------------------------------------------------------- /stubdom/vtpmmgr/mgmt_authority.h: -------------------------------------------------------------------------------- 1 | #ifndef __VTPMMGR_MGMT_AUTHORITY_H 2 | #define __VTPMMGR_MGMT_AUTHORITY_H 3 | 4 | struct mem_group *vtpm_new_group(const struct tpm_authdata *privCADigest); 5 | int group_do_activate(struct mem_group *group, void* blob, int blobSize, 6 | void* resp, unsigned int *rlen); 7 | int vtpm_do_quote(struct mem_group *group, const uuid_t uuid, 8 | const uint8_t* kern_hash, const struct tpm_authdata *data, TPM_PCR_SELECTION *sel, uint32_t extraInfoFlags, 9 | void* pcr_out, uint32_t *pcr_size, void* sig_out); 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /tools/ocaml/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | SUBDIRS := libs 5 | SUBDIRS += xenstored 6 | 7 | ifeq ($(CONFIG_TESTS),y) 8 | SUBDIRS += test 9 | endif 10 | 11 | .NOTPARALLEL: 12 | # targets here must be run in order, otherwise we can try 13 | # to build programs before the libraries are done 14 | 15 | .PHONY: all 16 | all: subdirs-all 17 | 18 | .PHONY: install 19 | install: subdirs-install 20 | 21 | .PHONY: clean 22 | clean: subdirs-clean 23 | 24 | .PHONY: distclean 25 | distclean: subdirs-distclean 26 | -------------------------------------------------------------------------------- /m4/docs_tool.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AX_DOCS_TOOL_PROG], [ 2 | dnl 3 | AC_ARG_VAR([$1], [Path to $2 tool]) 4 | AC_PATH_PROG([$1], [$2]) 5 | AS_IF([! test -x "$ac_cv_path_$1"], [ 6 | AC_MSG_WARN([$2 is not available so some documentation won't be built]) 7 | ]) 8 | ]) 9 | 10 | AC_DEFUN([AX_DOCS_TOOL_PROGS], [ 11 | dnl 12 | AC_ARG_VAR([$1], [Path to $2 tool]) 13 | AC_PATH_PROGS([$1], [$3]) 14 | AS_IF([! test -x "$ac_cv_path_$1"], [ 15 | AC_MSG_WARN([$2 is not available so some documentation won't be built]) 16 | ]) 17 | ]) 18 | -------------------------------------------------------------------------------- /xen/common/compat/tmem_xen.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * tmem_xen.c 3 | * 4 | */ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | CHECK_tmem_oid; 15 | 16 | /* 17 | * Local variables: 18 | * mode: C 19 | * c-file-style: "BSD" 20 | * c-basic-offset: 4 21 | * tab-width: 4 22 | * indent-tabs-mode: nil 23 | * End: 24 | */ 25 | -------------------------------------------------------------------------------- /xen/include/xen/version.h: -------------------------------------------------------------------------------- 1 | #ifndef __XEN_VERSION_H__ 2 | #define __XEN_VERSION_H__ 3 | 4 | const char *xen_compile_date(void); 5 | const char *xen_compile_time(void); 6 | const char *xen_compile_by(void); 7 | const char *xen_compile_domain(void); 8 | const char *xen_compile_host(void); 9 | const char *xen_compiler(void); 10 | unsigned int xen_major_version(void); 11 | unsigned int xen_minor_version(void); 12 | const char *xen_extra_version(void); 13 | const char *xen_changeset(void); 14 | const char *xen_banner(void); 15 | 16 | #endif /* __XEN_VERSION_H__ */ 17 | -------------------------------------------------------------------------------- /xen/include/asm-arm/vfp.h: -------------------------------------------------------------------------------- 1 | #ifndef _ASM_VFP_H 2 | #define _ASM_VFP_H 3 | 4 | #include 5 | 6 | #if defined(CONFIG_ARM_32) 7 | # include 8 | #elif defined(CONFIG_ARM_64) 9 | # include 10 | #else 11 | # error "Unknown ARM variant" 12 | #endif 13 | 14 | void vfp_save_state(struct vcpu *v); 15 | void vfp_restore_state(struct vcpu *v); 16 | 17 | #endif /* _ASM_VFP_H */ 18 | /* 19 | * Local variables: 20 | * mode: C 21 | * c-file-style: "BSD" 22 | * c-basic-offset: 4 23 | * indent-tabs-mode: nil 24 | * End: 25 | */ 26 | -------------------------------------------------------------------------------- /xen/common/symbols-dummy.c: -------------------------------------------------------------------------------- 1 | /* 2 | * symbols-dummy.c: dummy symbol-table definitions for the inital partial 3 | * link of the hypervisor image. 4 | */ 5 | 6 | #include 7 | #include 8 | 9 | #ifdef SYMBOLS_ORIGIN 10 | const unsigned int symbols_offsets[1]; 11 | #else 12 | const unsigned long symbols_addresses[1]; 13 | #endif 14 | const unsigned int symbols_num_syms; 15 | const u8 symbols_names[1]; 16 | 17 | const u8 symbols_token_table[1]; 18 | const u16 symbols_token_index[1]; 19 | 20 | const unsigned int symbols_markers[1]; 21 | -------------------------------------------------------------------------------- /xen/include/asm-arm/arm64/vfp.h: -------------------------------------------------------------------------------- 1 | #ifndef _ARM_ARM64_VFP_H 2 | #define _ARM_ARM64_VFP_H 3 | 4 | /* ARM64 VFP instruction requires fpregs address to be 128-byte aligned */ 5 | #define __vfp_aligned __attribute__((aligned(16))) 6 | 7 | struct vfp_state 8 | { 9 | uint64_t fpregs[64] __vfp_aligned; 10 | uint32_t fpcr; 11 | uint32_t fpexc32_el2; 12 | uint32_t fpsr; 13 | }; 14 | 15 | #endif /* _ARM_ARM64_VFP_H */ 16 | /* 17 | * Local variables: 18 | * mode: C 19 | * c-file-style: "BSD" 20 | * c-basic-offset: 4 21 | * indent-tabs-mode: nil 22 | * End: 23 | */ 24 | -------------------------------------------------------------------------------- /xen/include/asm-x86/device.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_X86_DEVICE_H 2 | #define __ASM_X86_DEVICE_H 3 | 4 | #include 5 | 6 | /* 7 | * x86 only supports PCI. Therefore it's possible to directly use 8 | * pci_dev to avoid adding new field. 9 | */ 10 | 11 | typedef struct pci_dev device_t; 12 | 13 | #define dev_is_pci(dev) ((void)(dev), 1) 14 | #define pci_to_dev(pci) (pci) 15 | 16 | #endif /* __ASM_X86_DEVICE_H */ 17 | 18 | /* 19 | * Local variables: 20 | * mode: C 21 | * c-file-style: "BSD" 22 | * c-basic-offset: 4 23 | * indent-tabs-mode: nil 24 | * End: 25 | */ 26 | -------------------------------------------------------------------------------- /xen/include/xen/tmem.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * tmem.h 3 | * 4 | * Transcendent memory 5 | * 6 | * Copyright (c) 2008, Dan Magenheimer, Oracle Corp. 7 | */ 8 | 9 | #ifndef __XEN_TMEM_H__ 10 | #define __XEN_TMEM_H__ 11 | 12 | struct xen_sysctl_tmem_op; 13 | 14 | extern int tmem_control(struct xen_sysctl_tmem_op *op); 15 | extern void tmem_destroy(void *); 16 | extern void *tmem_relinquish_pages(unsigned int, unsigned int); 17 | extern unsigned long tmem_freeable_pages(void); 18 | 19 | #endif /* __XEN_TMEM_H__ */ 20 | -------------------------------------------------------------------------------- /m4/set_cflags_ldflags.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AX_SET_FLAGS], 2 | [for cppflag in $PREPEND_INCLUDES 3 | do 4 | PREPEND_CPPFLAGS="$PREPEND_CPPFLAGS -I$cppflag" 5 | done 6 | for ldflag in $PREPEND_LIB 7 | do 8 | PREPEND_LDFLAGS="$PREPEND_LDFLAGS -L$ldflag" 9 | done 10 | for cppflag in $APPEND_INCLUDES 11 | do 12 | APPEND_CPPFLAGS="$APPEND_CPPFLAGS -I$cppflag" 13 | done 14 | for ldflag in $APPEND_LIB 15 | do 16 | APPEND_LDFLAGS="$APPEND_LDFLAGS -L$ldflag" 17 | done 18 | CPPFLAGS="$PREPEND_CPPFLAGS $CPPFLAGS $APPEND_CPPFLAGS" 19 | LDFLAGS="$PREPEND_LDFLAGS $LDFLAGS $APPEND_LDFLAGS"]) 20 | 21 | -------------------------------------------------------------------------------- /stubdom/ocaml.patch: -------------------------------------------------------------------------------- 1 | --- byterun/Makefile.orig 2009-04-07 12:14:02.000000000 +0100 2 | +++ byterun/Makefile 2009-04-07 12:13:50.000000000 +0100 3 | @@ -22,14 +22,14 @@ 4 | DOBJS=$(OBJS:.o=.d.o) instrtrace.d.o 5 | PICOBJS=$(OBJS:.o=.pic.o) 6 | 7 | -#ifeq ($(SUPPORTS_SHARED_LIBRARIES),true) 8 | +ifeq ($(SUPPORTS_SHARED_LIBRARIES),true) 9 | 10 | all:: libcamlrun_shared.so 11 | 12 | install:: 13 | cp libcamlrun_shared.so $(LIBDIR)/libcamlrun_shared.so 14 | 15 | -#endif 16 | +endif 17 | 18 | ocamlrun$(EXE): libcamlrun.a prims.o 19 | $(MKEXE) $(BYTECCLINKOPTS) -o ocamlrun$(EXE) \ 20 | -------------------------------------------------------------------------------- /tools/firmware/etherboot/patches/build_fix_3.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/drivers/infiniband/qib7322.c b/src/drivers/infiniband/qib7322.c 2 | index b66f8ef..d8a54c9 100644 3 | --- a/src/drivers/infiniband/qib7322.c 4 | +++ b/src/drivers/infiniband/qib7322.c 5 | @@ -2120,7 +2120,7 @@ static int qib7322_ahb_write ( struct qib7322 *qib7322, unsigned int location, 6 | */ 7 | static int qib7322_ahb_mod_reg ( struct qib7322 *qib7322, unsigned int location, 8 | uint32_t value, uint32_t mask ) { 9 | - uint32_t old_value; 10 | + uint32_t old_value = 0; 11 | uint32_t new_value; 12 | int rc; 13 | 14 | -------------------------------------------------------------------------------- /xen/arch/x86/cpu/mcheck/mcaction.h: -------------------------------------------------------------------------------- 1 | #ifndef _MCHECK_ACTION_H 2 | #define _MCHECK_ACTION_H 3 | 4 | #include 5 | #include "x86_mca.h" 6 | 7 | void 8 | mc_memerr_dhandler(struct mca_binfo *binfo, 9 | enum mce_result *result, 10 | const struct cpu_user_regs *regs); 11 | 12 | #define MC_ADDR_PHYSICAL 0 13 | #define MC_ADDR_VIRTUAL 1 14 | 15 | typedef int (*mce_check_addr_t)(uint64_t status, uint64_t misc, int addr_type); 16 | extern void mce_register_addrcheck(mce_check_addr_t); 17 | 18 | extern mce_check_addr_t mc_check_addr; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /xen/include/asm-x86/softirq.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_SOFTIRQ_H__ 2 | #define __ASM_SOFTIRQ_H__ 3 | 4 | #define NMI_MCE_SOFTIRQ (NR_COMMON_SOFTIRQS + 0) 5 | #define TIME_CALIBRATE_SOFTIRQ (NR_COMMON_SOFTIRQS + 1) 6 | #define VCPU_KICK_SOFTIRQ (NR_COMMON_SOFTIRQS + 2) 7 | 8 | #define MACHINE_CHECK_SOFTIRQ (NR_COMMON_SOFTIRQS + 3) 9 | #define PCI_SERR_SOFTIRQ (NR_COMMON_SOFTIRQS + 4) 10 | #define HVM_DPCI_SOFTIRQ (NR_COMMON_SOFTIRQS + 5) 11 | #define NR_ARCH_SOFTIRQS 6 12 | 13 | bool_t arch_skip_send_event_check(unsigned int cpu); 14 | 15 | #endif /* __ASM_SOFTIRQ_H__ */ 16 | -------------------------------------------------------------------------------- /scripts/git-checkout.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if test $# -lt 3; then 4 | echo "Usage: $0 " 5 | exit 1 6 | fi 7 | 8 | TREE=$1 9 | TAG=$2 10 | DIR=$3 11 | 12 | set -e 13 | 14 | if test \! -d $DIR-remote; then 15 | rm -rf $DIR-remote $DIR-remote.tmp 16 | mkdir -p $DIR-remote.tmp; rmdir $DIR-remote.tmp 17 | $GIT clone $TREE $DIR-remote.tmp 18 | if test "$TAG" ; then 19 | cd $DIR-remote.tmp 20 | $GIT branch -D dummy >/dev/null 2>&1 ||: 21 | $GIT checkout -b dummy $TAG 22 | cd .. 23 | fi 24 | mv $DIR-remote.tmp $DIR-remote 25 | fi 26 | rm -f $DIR 27 | ln -sf $DIR-remote $DIR 28 | -------------------------------------------------------------------------------- /stubdom/grub.patches/11graphics-keyboard.diff: -------------------------------------------------------------------------------- 1 | diff --git a/stage2/stage2.c b/stage2/stage2.c 2 | index 9d9fcc3..8353a3b 100644 3 | --- a/stage2/stage2.c 4 | +++ b/stage2/stage2.c 5 | @@ -395,7 +395,7 @@ restart: 6 | pressed. 7 | This avoids polling (relevant in the grub-shell and later on 8 | in grub if interrupt driven I/O is done). */ 9 | - if (checkkey () >= 0 || grub_timeout < 0) 10 | + if (checkkey () > 0 || grub_timeout < 0) 11 | { 12 | /* Key was pressed, show which entry is selected before GETKEY, 13 | since we're comming in here also on GRUB_TIMEOUT == -1 and 14 | -------------------------------------------------------------------------------- /tools/xentrace/mread.h: -------------------------------------------------------------------------------- 1 | #define MREAD_MAPS 8 2 | #define MREAD_BUF_SHIFT 9 3 | #define PAGE_SHIFT 12 4 | #define MREAD_BUF_SIZE (1ULL<<(PAGE_SHIFT+MREAD_BUF_SHIFT)) 5 | #define MREAD_BUF_MASK (~(MREAD_BUF_SIZE-1)) 6 | typedef struct mread_ctrl { 7 | int fd; 8 | off_t file_size; 9 | struct mread_buffer { 10 | char * buffer; 11 | off_t start_offset; 12 | int accessed; 13 | } map[MREAD_MAPS]; 14 | int clock, last; 15 | } *mread_handle_t; 16 | 17 | mread_handle_t mread_init(int fd); 18 | ssize_t mread64(mread_handle_t h, void *dst, ssize_t len, off_t offset); 19 | -------------------------------------------------------------------------------- /tools/xenpmd/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT=$(CURDIR)/../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | CFLAGS += -Werror 5 | CFLAGS += $(CFLAGS_libxenstore) 6 | 7 | LDLIBS += $(LDLIBS_libxenstore) 8 | 9 | .PHONY: all 10 | all: xenpmd 11 | 12 | .PHONY: install 13 | install: all 14 | $(INSTALL_DIR) $(DESTDIR)$(sbindir) 15 | $(INSTALL_PROG) xenpmd $(DESTDIR)$(sbindir) 16 | 17 | .PHONY: clean 18 | clean: 19 | $(RM) -f xenpmd xenpmd.o $(DEPS) 20 | 21 | .PHONY: distclean 22 | distclean: clean 23 | 24 | xenpmd: xenpmd.o Makefile 25 | $(CC) $(LDFLAGS) $< -o $@ $(LDLIBS) $(APPEND_LDFLAGS) 26 | 27 | -include $(DEPS) 28 | -------------------------------------------------------------------------------- /tools/tests/mem-sharing/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT=$(CURDIR)/../../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | CFLAGS += -Werror 5 | 6 | CFLAGS += $(CFLAGS_libxenctrl) 7 | CFLAGS += $(CFLAGS_xeninclude) 8 | 9 | TARGETS-y := 10 | TARGETS-$(CONFIG_X86) += memshrtool 11 | TARGETS := $(TARGETS-y) 12 | 13 | .PHONY: all 14 | all: build 15 | 16 | .PHONY: build 17 | build: $(TARGETS) 18 | 19 | .PHONY: clean 20 | clean: 21 | $(RM) *.o $(TARGETS) *~ $(DEPS) 22 | 23 | .PHONY: distclean 24 | distclean: clean 25 | 26 | memshrtool: memshrtool.o 27 | $(CC) -o $@ $< $(LDFLAGS) $(LDLIBS_libxenctrl) 28 | 29 | -include $(DEPS) 30 | -------------------------------------------------------------------------------- /xen/arch/x86/efi/Makefile: -------------------------------------------------------------------------------- 1 | CFLAGS += -fshort-wchar 2 | 3 | obj-y += stub.o 4 | 5 | create = test -e $(1) || touch -t 199901010000 $(1) 6 | 7 | efi := $(filter y,$(x86_64)$(shell rm -f disabled)) 8 | efi := $(if $(efi),$(shell $(CC) $(filter-out $(CFLAGS-y) .%.d,$(CFLAGS)) -c check.c 2>disabled && echo y)) 9 | efi := $(if $(efi),$(shell $(LD) -mi386pep --subsystem=10 -o check.efi check.o 2>disabled && echo y)) 10 | efi := $(if $(efi),$(shell rm disabled)y,$(shell $(call create,boot.init.o); $(call create,runtime.o))) 11 | 12 | extra-$(efi) += boot.init.o relocs-dummy.o runtime.o compat.o 13 | 14 | stub.o: $(extra-y) 15 | -------------------------------------------------------------------------------- /xen/drivers/video/font.h: -------------------------------------------------------------------------------- 1 | /* 2 | * font.h -- `Soft' font definitions 3 | * 4 | * Created 1995 by Geert Uytterhoeven 5 | * 6 | * This file is subject to the terms and conditions of the GNU General Public 7 | * License. See the file COPYING in the main directory of this archive 8 | * for more details. 9 | */ 10 | 11 | #ifndef _XEN_FONT_H 12 | #define _XEN_FONT_H 13 | 14 | struct font_desc { 15 | const char *name; 16 | unsigned width, height, count; 17 | const void *data; 18 | }; 19 | 20 | extern const struct font_desc font_vga_8x8, font_vga_8x14, font_vga_8x16; 21 | 22 | #endif /* _XEN_FONT_H */ 23 | -------------------------------------------------------------------------------- /tools/debugger/kdd/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | CFLAGS += $(CFLAGS_libxenctrl) 5 | LDLIBS += $(LDLIBS_libxenctrl) 6 | 7 | CFILES := kdd.c kdd-xen.c 8 | OBJS := $(CFILES:.c=.o) 9 | 10 | all: kdd 11 | 12 | kdd: $(OBJS) 13 | $(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS) 14 | 15 | .PHONY: clean 16 | clean: 17 | rm -f $(OBJS) $(DEPS) kdd 18 | 19 | .PHONY: distclean 20 | distclean: clean 21 | 22 | .PHONY: install 23 | install: all 24 | [ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir) 25 | $(INSTALL_PROG) kdd $(DESTDIR)$(sbindir)/kdd 26 | -------------------------------------------------------------------------------- /tools/tests/x86_emulator/x86_emulate.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | typedef bool bool_t; 10 | 11 | #define BUG() abort() 12 | #define ASSERT assert 13 | 14 | #define cpu_has_amd_erratum(nr) 0 15 | #define mark_regs_dirty(r) ((void)(r)) 16 | 17 | #define __packed __attribute__((packed)) 18 | 19 | #include "x86_emulate/x86_emulate.h" 20 | 21 | #define get_stub(stb) ((void *)((stb).addr = (uintptr_t)(stb).buf)) 22 | #define put_stub(stb) 23 | 24 | #include "x86_emulate/x86_emulate.c" 25 | -------------------------------------------------------------------------------- /xen/common/decompress.h: -------------------------------------------------------------------------------- 1 | #ifdef __XEN__ 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #define STATIC 12 | #define INIT __init 13 | #define INITDATA __initdata 14 | 15 | #define malloc xmalloc_bytes 16 | #define free xfree 17 | 18 | #define large_malloc xmalloc_bytes 19 | #define large_free xfree 20 | 21 | #else 22 | 23 | #define STATIC static 24 | #define INIT 25 | #define INITDATA 26 | 27 | #define large_malloc malloc 28 | #define large_free free 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/block-nbd: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Usage: block-nbd [bind server ctl_port |unbind node] 4 | # 5 | # The node argument to unbind is the name of the device node we are to 6 | # unbind. 7 | # 8 | # This assumes you're running a correctly configured server at the other end! 9 | 10 | dir=$(dirname "$0") 11 | . "$dir/block-common.sh" 12 | 13 | case "$command" in 14 | add) 15 | for dev in /dev/nbd*; do 16 | if nbd-client $2 $3 $dev; then 17 | write_dev $dev 18 | exit 0 19 | fi 20 | done 21 | exit 1 22 | ;; 23 | remove) 24 | nbd-client -d $2 25 | exit 0 26 | ;; 27 | esac 28 | -------------------------------------------------------------------------------- /xen/include/asm-x86/x86_emulate.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * x86_emulate.h 3 | * 4 | * Wrapper for generic x86 instruction decoder and emulator. 5 | * 6 | * Copyright (c) 2008, Citrix Systems, Inc. 7 | * 8 | * Authors: 9 | * Keir Fraser 10 | */ 11 | 12 | #ifndef __ASM_X86_X86_EMULATE_H__ 13 | #define __ASM_X86_X86_EMULATE_H__ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include "../../arch/x86/x86_emulate/x86_emulate.h" 21 | 22 | #endif /* __ASM_X86_X86_EMULATE_H__ */ 23 | -------------------------------------------------------------------------------- /xen/include/xen/video.h: -------------------------------------------------------------------------------- 1 | /* 2 | * video.h 3 | * 4 | * This file is subject to the terms and conditions of the GNU General Public 5 | * License. See the file COPYING in the main directory of this archive 6 | * for more details. 7 | */ 8 | 9 | #ifndef _XEN_VIDEO_H 10 | #define _XEN_VIDEO_H 11 | 12 | #include 13 | 14 | #ifdef CONFIG_VIDEO 15 | void video_init(void); 16 | extern void (*video_puts)(const char *); 17 | void video_endboot(void); 18 | #else 19 | #define video_init() ((void)0) 20 | #define video_puts(s) ((void)0) 21 | #define video_endboot() ((void)0) 22 | #endif 23 | 24 | #endif /* _XEN_VIDEO_H */ 25 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/block-enbd: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Usage: block-enbd [bind server ctl_port |unbind node] 4 | # 5 | # The node argument to unbind is the name of the device node we are to 6 | # unbind. 7 | # 8 | # This assumes you're running a correctly configured server at the other end! 9 | 10 | dir=$(dirname "$0") 11 | . "$dir/block-common.sh" 12 | 13 | case "$command" in 14 | add) 15 | for dev in /dev/nd*; do 16 | if nbd-client $2:$3 $dev; then 17 | write_dev $dev 18 | exit 0 19 | fi 20 | done 21 | exit 1 22 | ;; 23 | remove) 24 | nbd-client -d $2 25 | exit 0 26 | ;; 27 | esac 28 | -------------------------------------------------------------------------------- /xen/include/asm-arm/platforms/exynos5.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_ARM_PLATFORMS_EXYNOS5_H 2 | #define __ASM_ARM_PLATFORMS_EXYNOS5_H 3 | 4 | #define EXYNOS5_MCT_G_TCON 0x240 /* Relative to MCT_BASE */ 5 | #define EXYNOS5_MCT_G_TCON_START (1 << 8) 6 | 7 | #define EXYNOS5_PA_CHIPID 0x10000000 8 | #define EXYNOS5_PA_TIMER 0x12dd0000 9 | 10 | #define EXYNOS5_SWRESET 0x0400 /* Relative to PA_PMU */ 11 | 12 | #endif /* __ASM_ARM_PLATFORMS_EXYNOS5_H */ 13 | /* 14 | * Local variables: 15 | * mode: C 16 | * c-file-style: "BSD" 17 | * c-basic-offset: 4 18 | * indent-tabs-mode: nil 19 | * End: 20 | */ 21 | -------------------------------------------------------------------------------- /tools/libxc/xc_sr_common_x86.h: -------------------------------------------------------------------------------- 1 | #ifndef __COMMON_X86__H 2 | #define __COMMON_X86__H 3 | 4 | #include "xc_sr_common.h" 5 | 6 | /* 7 | * Obtains a domains TSC information from Xen and writes a TSC_INFO record 8 | * into the stream. 9 | */ 10 | int write_tsc_info(struct xc_sr_context *ctx); 11 | 12 | /* 13 | * Parses a TSC_INFO record and applies the result to the domain. 14 | */ 15 | int handle_tsc_info(struct xc_sr_context *ctx, struct xc_sr_record *rec); 16 | 17 | #endif 18 | /* 19 | * Local variables: 20 | * mode: C 21 | * c-file-style: "BSD" 22 | * c-basic-offset: 4 23 | * tab-width: 4 24 | * indent-tabs-mode: nil 25 | * End: 26 | */ 27 | -------------------------------------------------------------------------------- /m4/features.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AX_ARG_DEFAULT_ENABLE], [ 2 | AC_ARG_ENABLE([$1], AS_HELP_STRING([--disable-$1], [$2 (default is ENABLED)])) 3 | AX_PARSE_VALUE([$1], [y]) 4 | ]) 5 | 6 | AC_DEFUN([AX_ARG_DEFAULT_DISABLE], [ 7 | AC_ARG_ENABLE([$1], AS_HELP_STRING([--enable-$1], [$2 (default is DISABLED)])) 8 | AX_PARSE_VALUE([$1], [n]) 9 | ]) 10 | 11 | dnl This function should not be called outside of this file 12 | AC_DEFUN([AX_PARSE_VALUE], [ 13 | AS_IF([test "x$enable_$1" = "xno"], [ 14 | ax_cv_$1="n" 15 | ], [test "x$enable_$1" = "xyes"], [ 16 | ax_cv_$1="y" 17 | ], [test -z $ax_cv_$1], [ 18 | ax_cv_$1="$2" 19 | ]) 20 | $1=$ax_cv_$1 21 | AC_SUBST($1)]) 22 | -------------------------------------------------------------------------------- /tools/libxl/check-libxl-api-rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | use strict; 3 | our $needed=0; 4 | our $speclineoffset=0; 5 | our $specfile; 6 | while (<>) { 7 | if (m/^\# (\d+) \"(.*)\"$/) { 8 | $speclineoffset = $1 - $. -1; 9 | $specfile = $2; 10 | } 11 | my $file = defined($specfile) ? $specfile : $ARGV; 12 | my $line = $speclineoffset + $.; 13 | if (m/libxl_asyncop_how[^;]/) { 14 | $needed=1; 15 | } 16 | if (m/LIBXL_EXTERNAL_CALLERS_ONLY/) { 17 | $needed=0; 18 | } 19 | next unless $needed; 20 | if (m/\;/) { 21 | die "$file:$line:missing LIBXL_EXTERNAL_CALLERS_ONLY"; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /xen/include/asm-arm/platforms/midway.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_ARM_PLATFORMS_MIDWAY_H 2 | #define __ASM_ASM_PLATFORMS_MIDWAY_H 3 | 4 | /* addresses of SREG registers for resetting the SoC */ 5 | #define MW_SREG_PWR_REQ 0xfff3cf00 6 | #define MW_SREG_A15_PWR_CTRL 0xfff3c200 7 | 8 | #define MW_PWR_SUSPEND 0 9 | #define MW_PWR_SOFT_RESET 1 10 | #define MW_PWR_HARD_RESET 2 11 | #define MW_PWR_SHUTDOWN 3 12 | 13 | #endif /* __ASM_ARM_PLATFORMS_MIDWAY_H */ 14 | /* 15 | * Local variables: 16 | * mode: C 17 | * c-file-style: "BSD" 18 | * c-basic-offset: 4 19 | * indent-tabs-mode: nil 20 | * End: 21 | */ 22 | -------------------------------------------------------------------------------- /stubdom/grub/osdep.h: -------------------------------------------------------------------------------- 1 | #ifndef __OSDEP_H__ 2 | #define __OSDEP_H__ 3 | 4 | #include 5 | #define swap32(x) bswap_32(x) 6 | #define swap16(x) bswap_16(x) 7 | 8 | #include 9 | #if BYTE_ORDER == BIG_ENDIAN 10 | #define htons(x) (x) 11 | #define ntohs(x) (x) 12 | #define htonl(x) (x) 13 | #define ntohl(x) (x) 14 | #else 15 | #define htons(x) swap16(x) 16 | #define ntohs(x) swap16(x) 17 | #define htonl(x) swap32(x) 18 | #define ntohl(x) swap32(x) 19 | #endif 20 | 21 | typedef unsigned long Address; 22 | 23 | /* ANSI prototyping macro */ 24 | #ifdef __STDC__ 25 | #define P(x) x 26 | #else 27 | #define P(x) () 28 | #endif 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /tools/libxl/libxlu_disk_i.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBXLU_DISK_I_H 2 | #define LIBXLU_DISK_I_H 3 | 4 | #include "libxlu_internal.h" 5 | 6 | 7 | typedef struct { 8 | XLU_Config *cfg; 9 | int err; 10 | void *scanner; 11 | YY_BUFFER_STATE buf; 12 | libxl_device_disk *disk; 13 | int access_set, had_depr_prefix; 14 | const char *spec; 15 | } DiskParseContext; 16 | 17 | void xlu__disk_err(DiskParseContext *dpc, const char *erroneous, 18 | const char *message); 19 | 20 | 21 | #endif /*LIBXLU_DISK_I_H*/ 22 | 23 | /* 24 | * Local variables: 25 | * mode: C 26 | * c-basic-offset: 4 27 | * indent-tabs-mode: nil 28 | * End: 29 | */ 30 | -------------------------------------------------------------------------------- /tools/firmware/vgabios/dataseghack: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | awk \ 4 | 'BEGIN { }\ 5 | /^\.text/,/DATA_SEG_DEFS_HERE/ { print }\ 6 | END { }'\ 7 | $1 > temp.awk.1 8 | 9 | awk \ 10 | 'BEGIN { i = 0; last = "hello" }\ 11 | /BLOCK_STRINGS_BEGIN/,/^\.bss/ { if ( i > 1 ) { print last } last = $0; i = i + 1 }\ 12 | END { }'\ 13 | $1 > temp.awk.2 14 | 15 | awk \ 16 | 'BEGIN { }\ 17 | /DATA_SEG_DEFS_HERE/,/BLOCK_STRINGS_BEGIN/ { print }\ 18 | END { }'\ 19 | $1 > temp.awk.3 20 | 21 | cp $1 $1.orig 22 | cat temp.awk.1 temp.awk.2 temp.awk.3 | sed -e 's/^\.data//' -e 's/^\.bss//' -e 's/^\.text//' > $1 23 | /bin/rm -f temp.awk.1 temp.awk.2 temp.awk.3 $1.orig 24 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/lib/memchr.S: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/arch/arm/lib/memchr.S 3 | * 4 | * Copyright (C) 1995-2000 Russell King 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License version 2 as 8 | * published by the Free Software Foundation. 9 | * 10 | * ASM optimised string functions 11 | */ 12 | 13 | #include 14 | 15 | #include "assembler.h" 16 | 17 | .text 18 | .align 5 19 | ENTRY(memchr) 20 | 1: subs r2, r2, #1 21 | bmi 2f 22 | ldrb r3, [r0], #1 23 | teq r3, r1 24 | bne 1b 25 | sub r0, r0, #1 26 | 2: movne r0, #0 27 | mov pc, lr 28 | ENDPROC(memchr) 29 | -------------------------------------------------------------------------------- /xen/include/asm-arm/hypercall.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_ARM_HYPERCALL_H__ 2 | #define __ASM_ARM_HYPERCALL_H__ 3 | 4 | #include /* for arch_do_domctl */ 5 | int do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg); 6 | 7 | long do_arm_vcpu_op(int cmd, unsigned int vcpuid, XEN_GUEST_HANDLE_PARAM(void) arg); 8 | 9 | long subarch_do_domctl(struct xen_domctl *domctl, struct domain *d, 10 | XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl); 11 | 12 | #endif /* __ASM_ARM_HYPERCALL_H__ */ 13 | /* 14 | * Local variables: 15 | * mode: C 16 | * c-file-style: "BSD" 17 | * c-basic-offset: 4 18 | * indent-tabs-mode: nil 19 | * End: 20 | */ 21 | -------------------------------------------------------------------------------- /tools/firmware/rombios/32bit/tcgbios/tpm_drivers.h: -------------------------------------------------------------------------------- 1 | #ifndef TPM_DRIVER_H 2 | /* low level driver implementation */ 3 | struct tpm_driver { 4 | uint32_t baseaddr; 5 | uint32_t (*activate)(uint32_t baseaddr); 6 | uint32_t (*ready)(uint32_t baseaddr); 7 | uint32_t (*senddata)(uint32_t baseaddr, unsigned char *data, uint32_t len); 8 | uint32_t (*readresp)(uint32_t baseaddr, unsigned char *buffer, uint32_t len); 9 | uint32_t (*waitdatavalid)(uint32_t baseaddr); 10 | uint32_t (*waitrespready)(uint32_t baseaddr, uint32_t timeout); 11 | uint32_t (*probe)(uint32_t baseaddr); 12 | }; 13 | 14 | #define TPM_NUM_DRIVERS 1 15 | 16 | #define TPM_INVALID_DRIVER -1 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/systemd/xendomains.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Xendomains - start and stop guests on boot and shutdown 3 | Requires=proc-xen.mount xenstored.service 4 | After=proc-xen.mount xenstored.service xenconsoled.service xen-init-dom0.service 5 | After=network-online.target 6 | After=remote-fs.target 7 | ConditionPathExists=/proc/xen/capabilities 8 | 9 | [Service] 10 | Type=oneshot 11 | RemainAfterExit=true 12 | ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities 13 | ExecStart=-@LIBEXEC_BIN@/xendomains start 14 | ExecStop=@LIBEXEC_BIN@/xendomains stop 15 | ExecReload=@LIBEXEC_BIN@/xendomains restart 16 | 17 | [Install] 18 | WantedBy=multi-user.target 19 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/lib/strrchr.S: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/arch/arm/lib/strrchr.S 3 | * 4 | * Copyright (C) 1995-2000 Russell King 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License version 2 as 8 | * published by the Free Software Foundation. 9 | * 10 | * ASM optimised string functions 11 | */ 12 | 13 | #include 14 | 15 | #include "assembler.h" 16 | 17 | .text 18 | .align 5 19 | ENTRY(strrchr) 20 | mov r3, #0 21 | 1: ldrb r2, [r0], #1 22 | teq r2, r1 23 | subeq r3, r0, #1 24 | teq r2, #0 25 | bne 1b 26 | mov r0, r3 27 | mov pc, lr 28 | ENDPROC(strrchr) 29 | -------------------------------------------------------------------------------- /tools/libxl/test_common.h: -------------------------------------------------------------------------------- 1 | #ifndef TEST_COMMON_H 2 | #define TEST_COMMON_H 3 | 4 | #include "libxl.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | void test_common_setup(int level); 14 | 15 | extern libxl_ctx *ctx; 16 | 17 | void test_common_get_now(void); 18 | 19 | extern struct timeval now; 20 | 21 | void test_common_beforepoll(void); 22 | void test_common_dopoll(void); 23 | void test_common_afterpoll(void); 24 | 25 | extern int poll_nfds, poll_nfds_allocd; 26 | extern struct pollfd *poll_fds; 27 | extern int poll_timeout; 28 | 29 | #endif /*TEST_COMMON_H*/ 30 | -------------------------------------------------------------------------------- /tools/tests/xen-access/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT=$(CURDIR)/../../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | CFLAGS += -Werror 5 | 6 | CFLAGS += $(CFLAGS_libxenctrl) 7 | CFLAGS += $(CFLAGS_libxenguest) 8 | CFLAGS += $(CFLAGS_xeninclude) 9 | 10 | TARGETS-y := 11 | TARGETS-$(HAS_MEM_ACCESS) := xen-access 12 | TARGETS := $(TARGETS-y) 13 | 14 | .PHONY: all 15 | all: build 16 | 17 | .PHONY: build 18 | build: $(TARGETS) 19 | 20 | .PHONY: clean 21 | clean: 22 | $(RM) *.o $(TARGETS) *~ $(DEPS) 23 | 24 | .PHONY: distclean 25 | distclean: clean 26 | 27 | xen-access: xen-access.o Makefile 28 | $(CC) -o $@ $< $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) 29 | 30 | -include $(DEPS) 31 | -------------------------------------------------------------------------------- /xen/arch/arm/physdev.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Arch-specific physdev.c 3 | * 4 | * Copyright (c) 2012, Citrix Systems 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | 14 | int do_physdev_op(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg) 15 | { 16 | printk("%s %d cmd=%d: not implemented yet\n", __func__, __LINE__, cmd); 17 | return -ENOSYS; 18 | } 19 | 20 | /* 21 | * Local variables: 22 | * mode: C 23 | * c-file-style: "BSD" 24 | * c-basic-offset: 4 25 | * indent-tabs-mode: nil 26 | * End: 27 | */ 28 | -------------------------------------------------------------------------------- /xen/include/xen/paging.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef __XEN_PAGING_H__ 3 | #define __XEN_PAGING_H__ 4 | 5 | #if defined CONFIG_PAGING_ASSISTANCE 6 | 7 | #include 8 | #include 9 | 10 | #elif defined CONFIG_SHADOW_PAGING 11 | 12 | #include 13 | 14 | #define paging_mode_translate(d) shadow_mode_translate(d) 15 | #define paging_mode_external(d) (0) 16 | 17 | #else 18 | 19 | #define paging_mode_translate(d) (0) 20 | #define paging_mode_external(d) (0) 21 | #define guest_physmap_add_page(d, p, m, o) ((void)0) 22 | #define guest_physmap_remove_page(d, p, m, o) ((void)0) 23 | 24 | #endif 25 | 26 | #endif /* __XEN_PAGING_H__ */ 27 | -------------------------------------------------------------------------------- /xen/include/asm-arm/asm_defns.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARM_ASM_DEFNS_H__ 2 | #define __ARM_ASM_DEFNS_H__ 3 | 4 | #ifndef COMPILE_OFFSETS 5 | /* NB. Auto-generated from arch/.../asm-offsets.c */ 6 | #include 7 | #endif 8 | #include 9 | 10 | /* For generic assembly code: use macros to define operand sizes. */ 11 | #if defined(CONFIG_ARM_32) 12 | # define __OP32 13 | #elif defined(CONFIG_ARM_64) 14 | # define __OP32 "w" 15 | #else 16 | # error "unknown ARM variant" 17 | #endif 18 | 19 | #endif /* __ARM_ASM_DEFNS_H__ */ 20 | /* 21 | * Local variables: 22 | * mode: C 23 | * c-file-style: "BSD" 24 | * c-basic-offset: 4 25 | * indent-tabs-mode: nil 26 | * End: 27 | */ 28 | -------------------------------------------------------------------------------- /xen/include/xen/libfdt/libfdt_env.h: -------------------------------------------------------------------------------- 1 | #ifndef _LIBFDT_ENV_H 2 | #define _LIBFDT_ENV_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | typedef uint16_t fdt16_t; 10 | typedef uint32_t fdt32_t; 11 | typedef uint64_t fdt64_t; 12 | 13 | #define fdt16_to_cpu(x) be16_to_cpu(x) 14 | #define cpu_to_fdt16(x) cpu_to_be16(x) 15 | #define fdt32_to_cpu(x) be32_to_cpu(x) 16 | #define cpu_to_fdt32(x) cpu_to_be32(x) 17 | #define fdt64_to_cpu(x) be64_to_cpu(x) 18 | #define cpu_to_fdt64(x) cpu_to_be64(x) 19 | 20 | /* Xen-specific libfdt error code. */ 21 | #define FDT_ERR_XEN(err) (FDT_ERR_MAX + (err)) 22 | 23 | #endif /* _LIBFDT_ENV_H */ 24 | -------------------------------------------------------------------------------- /xen/xsm/flask/ss/symtab.h: -------------------------------------------------------------------------------- 1 | /* 2 | * A symbol table (symtab) maintains associations between symbol 3 | * strings and datum values. The type of the datum values 4 | * is arbitrary. The symbol table type is implemented 5 | * using the hash table type (hashtab). 6 | * 7 | * Author : Stephen Smalley, 8 | */ 9 | #ifndef _SS_SYMTAB_H_ 10 | #define _SS_SYMTAB_H_ 11 | 12 | #include "hashtab.h" 13 | 14 | struct symtab { 15 | struct hashtab *table; /* hash table (keyed on a string) */ 16 | u32 nprim; /* number of primary names in table */ 17 | }; 18 | 19 | int symtab_init(struct symtab *s, unsigned int size); 20 | 21 | #endif /* _SS_SYMTAB_H_ */ 22 | 23 | 24 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/lib/strchr.S: -------------------------------------------------------------------------------- 1 | /* 2 | * linux/arch/arm/lib/strchr.S 3 | * 4 | * Copyright (C) 1995-2000 Russell King 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License version 2 as 8 | * published by the Free Software Foundation. 9 | * 10 | * ASM optimised string functions 11 | */ 12 | 13 | #include 14 | 15 | #include "assembler.h" 16 | 17 | .text 18 | .align 5 19 | ENTRY(strchr) 20 | and r1, r1, #0xff 21 | 1: ldrb r2, [r0], #1 22 | teq r2, r1 23 | teqne r2, #0 24 | bne 1b 25 | teq r2, r1 26 | movne r0, #0 27 | subeq r0, r0, #1 28 | mov pc, lr 29 | ENDPROC(strchr) 30 | -------------------------------------------------------------------------------- /xen/include/xen/pmstat.h: -------------------------------------------------------------------------------- 1 | #ifndef __XEN_PMSTAT_H_ 2 | #define __XEN_PMSTAT_H_ 3 | 4 | #include 5 | #include /* for struct xen_processor_power */ 6 | #include /* for struct pm_cx_stat */ 7 | 8 | int set_px_pminfo(uint32_t cpu, struct xen_processor_performance *perf); 9 | long set_cx_pminfo(uint32_t cpu, struct xen_processor_power *power); 10 | uint32_t pmstat_get_cx_nr(uint32_t cpuid); 11 | int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat); 12 | int pmstat_reset_cx_stat(uint32_t cpuid); 13 | 14 | int do_get_pm_info(struct xen_sysctl_get_pmstat *op); 15 | int do_pm_op(struct xen_sysctl_pm_op *op); 16 | 17 | #endif /* __XEN_PMSTAT_H_ */ 18 | -------------------------------------------------------------------------------- /xen/xsm/flask/include/avc_ss.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Access vector cache interface for the security server. 3 | * 4 | * Author : Stephen Smalley, 5 | */ 6 | #ifndef _FLASK_AVC_SS_H_ 7 | #define _FLASK_AVC_SS_H_ 8 | 9 | #include "flask.h" 10 | 11 | int avc_ss_reset(u32 seqno); 12 | 13 | struct av_perm_to_string { 14 | u16 tclass; 15 | u32 value; 16 | const char *name; 17 | }; 18 | 19 | struct selinux_class_perm { 20 | const struct av_perm_to_string *av_perm_to_string; 21 | u32 av_pts_len; 22 | u32 cts_len; 23 | const char **class_to_string; 24 | }; 25 | 26 | extern const struct selinux_class_perm selinux_class_perm; 27 | 28 | #endif /* _FLASK_AVC_SS_H_ */ 29 | 30 | -------------------------------------------------------------------------------- /config/x86_64.mk: -------------------------------------------------------------------------------- 1 | CONFIG_X86 := y 2 | CONFIG_X86_64 := y 3 | CONFIG_X86_$(XEN_OS) := y 4 | 5 | CONFIG_COMPAT := y 6 | CONFIG_HVM := y 7 | CONFIG_MIGRATE := y 8 | CONFIG_XCUTILS := y 9 | 10 | HAS_MEM_ACCESS := y 11 | HAS_MEM_PAGING := y 12 | HAS_MEM_SHARING := y 13 | 14 | CONFIG_XEN_INSTALL_SUFFIX := .gz 15 | 16 | CFLAGS += -m64 17 | 18 | SunOS_LIBDIR = $(SunOS_LIBDIR_x86_64) 19 | 20 | EFI_DIR ?= /usr/lib64/efi 21 | 22 | # Use only if calling $(LD) directly. 23 | ifeq ($(XEN_OS),OpenBSD) 24 | LDFLAGS_DIRECT += -melf_x86_64_obsd 25 | else 26 | ifeq ($(XEN_OS),FreeBSD) 27 | LDFLAGS_DIRECT += -melf_x86_64_fbsd 28 | else 29 | LDFLAGS_DIRECT += -melf_x86_64 30 | endif 31 | endif 32 | 33 | IOEMU_CPU_ARCH ?= x86_64 34 | -------------------------------------------------------------------------------- /stubdom/newlib-stdint-size_max-fix-from-1.17.0.patch: -------------------------------------------------------------------------------- 1 | --- newlib-1.16.0/newlib/libc/include/stdint.h.orig 2006-08-17 00:39:43.000000000 +0300 2 | +++ newlib-1.16.0/newlib/libc/include/stdint.h 2009-08-25 17:33:23.000000000 +0300 3 | @@ -348,8 +348,11 @@ 4 | #endif 5 | 6 | /* This must match size_t in stddef.h, currently long unsigned int */ 7 | -#define SIZE_MIN (-__STDINT_EXP(LONG_MAX) - 1L) 8 | -#define SIZE_MAX __STDINT_EXP(LONG_MAX) 9 | +#ifdef __SIZE_MAX__ 10 | +#define SIZE_MAX __SIZE_MAX__ 11 | +#else 12 | +#define SIZE_MAX (__STDINT_EXP(LONG_MAX) * 2UL + 1) 13 | +#endif 14 | 15 | /* This must match sig_atomic_t in (currently int) */ 16 | #define SIG_ATOMIC_MIN (-__STDINT_EXP(INT_MAX) - 1) 17 | -------------------------------------------------------------------------------- /tools/ocaml/common.make: -------------------------------------------------------------------------------- 1 | include $(XEN_ROOT)/tools/Rules.mk 2 | 3 | CC ?= gcc 4 | OCAMLOPT ?= ocamlopt 5 | OCAMLC ?= ocamlc 6 | OCAMLMKLIB ?= ocamlmklib 7 | OCAMLDEP ?= ocamldep 8 | OCAMLLEX ?= ocamllex 9 | OCAMLYACC ?= ocamlyacc 10 | OCAMLFIND ?= ocamlfind 11 | 12 | CFLAGS += -fPIC -Werror -I$(shell ocamlc -where) 13 | 14 | OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p') 15 | OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F 16 | OCAMLCFLAGS += -g $(OCAMLINCLUDE) -w F -warn-error F 17 | 18 | VERSION := 4.1 19 | 20 | OCAMLDESTDIR ?= $(DESTDIR)$(shell $(OCAMLFIND) printconf destdir) 21 | 22 | o= >$@.new && mv -f $@.new $@ 23 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/smpboot.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | int __init arch_smp_init(void) 7 | { 8 | return platform_smp_init(); 9 | } 10 | 11 | int __init arch_cpu_init(int cpu, struct dt_device_node *dn) 12 | { 13 | /* Not needed on ARM32, as there is no relevant information in 14 | * the CPU device tree node for ARMv7 CPUs. 15 | */ 16 | return 0; 17 | } 18 | 19 | int __init arch_cpu_up(int cpu) 20 | { 21 | return platform_cpu_up(cpu); 22 | } 23 | 24 | /* 25 | * Local variables: 26 | * mode: C 27 | * c-file-style: "BSD" 28 | * c-basic-offset: 4 29 | * indent-tabs-mode: nil 30 | * End: 31 | */ 32 | -------------------------------------------------------------------------------- /xen/arch/x86/genapic/default.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Default generic APIC driver. This handles upto 8 CPUs. 3 | */ 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | #include 17 | 18 | /* should be called last. */ 19 | static __init int probe_default(void) 20 | { 21 | return 1; 22 | } 23 | 24 | const struct genapic apic_default = { 25 | APIC_INIT("default", probe_default), 26 | GENAPIC_FLAT 27 | }; 28 | -------------------------------------------------------------------------------- /xen/include/xen/const.h: -------------------------------------------------------------------------------- 1 | /* const.h: Macros for dealing with constants. */ 2 | 3 | #ifndef __XEN_CONST_H__ 4 | #define __XEN_CONST_H__ 5 | 6 | /* Some constant macros are used in both assembler and 7 | * C code. Therefore we cannot annotate them always with 8 | * 'UL' and other type specifiers unilaterally. We 9 | * use the following macros to deal with this. 10 | * 11 | * Similarly, _AT() will cast an expression with a type in C, but 12 | * leave it unchanged in asm. 13 | */ 14 | 15 | #ifdef __ASSEMBLY__ 16 | #define _AC(X,Y) X 17 | #define _AT(T,X) X 18 | #else 19 | #define __AC(X,Y) (X##Y) 20 | #define _AC(X,Y) __AC(X,Y) 21 | #define _AT(T,X) ((T)(X)) 22 | #endif 23 | 24 | #endif /* __XEN_CONST_H__ */ 25 | -------------------------------------------------------------------------------- /tools/firmware/etherboot/patches/build-compare.patch: -------------------------------------------------------------------------------- 1 | The result of $(wildcard *) is random. 2 | Sort input files to reduce build-compare noise. 3 | --- 4 | ipxe/src/Makefile.housekeeping | 2 +- 5 | 1 file changed, 1 insertion(+), 1 deletion(-) 6 | 7 | Index: ipxe/src/Makefile.housekeeping 8 | =================================================================== 9 | --- ipxe/src/Makefile.housekeeping 10 | +++ ipxe/src/Makefile.housekeeping 11 | @@ -773,7 +773,7 @@ BLIB = $(BIN)/blib.a 12 | $(BLIB) : $(BLIB_OBJS) $(BLIB_LIST) $(MAKEDEPS) 13 | $(Q)$(RM) $(BLIB) 14 | $(QM)$(ECHO) " [AR] $@" 15 | - $(Q)$(AR) r $@ $(BLIB_OBJS) 16 | + $(Q)$(AR) r $@ $(sort $(BLIB_OBJS)) 17 | $(Q)$(RANLIB) $@ 18 | blib : $(BLIB) 19 | 20 | -------------------------------------------------------------------------------- /tools/tests/regression/scripts/build_python.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script builds python in the dir 4 | # installed/python-${DEST} from package downloads/Python-{PKG_VERS}.tgz 5 | # 6 | 7 | set -e 8 | 9 | REG_TEST_DIR=$1 10 | DEST=$2 11 | PKG_VERS=$3 12 | 13 | SUB_MAKES_MINUS_J=-j4 14 | 15 | BUILD_DIR=${REG_TEST_DIR}/build 16 | 17 | mkdir -p ${BUILD_DIR} 18 | (cd ${BUILD_DIR} && tar -xf ${REG_TEST_DIR}/downloads/Python-$PKG_VERS.tgz) 19 | (cd ${BUILD_DIR}/Python-$PKG_VERS && 20 | ./configure --enable-shared --enable-ipv6 --without-cxx \ 21 | --with-threads --prefix=${REG_TEST_DIR}/installed/python-$DEST && 22 | make ${SUB_MAKES_MINUS_J} && 23 | make install) 24 | rm -fr ${BUILD_DIR}/Python-$PKG_VERS 25 | -------------------------------------------------------------------------------- /xen/arch/x86/cpu/cpu.h: -------------------------------------------------------------------------------- 1 | /* attempt to consolidate cpu attributes */ 2 | struct cpu_dev { 3 | char * c_vendor; 4 | 5 | /* some have two possibilities for cpuid string */ 6 | char * c_ident[2]; 7 | 8 | void (*c_init)(struct cpuinfo_x86 * c); 9 | }; 10 | 11 | extern const struct cpu_dev *cpu_devs[X86_VENDOR_NUM]; 12 | 13 | extern bool_t opt_arat; 14 | extern unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx; 15 | extern unsigned int opt_cpuid_mask_xsave_eax; 16 | extern unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx; 17 | 18 | extern int get_model_name(struct cpuinfo_x86 *c); 19 | extern void display_cacheinfo(struct cpuinfo_x86 *c); 20 | 21 | extern void early_intel_workaround(struct cpuinfo_x86 *c); 22 | -------------------------------------------------------------------------------- /tools/debugger/gdbsx/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../.. 2 | include ./Rules.mk 3 | 4 | .PHONY: all 5 | all: 6 | $(MAKE) -C gx 7 | $(MAKE) -C xg 8 | $(MAKE) gdbsx 9 | 10 | .PHONY: clean 11 | clean: 12 | rm -f xg_all.a gx_all.a gdbsx 13 | set -e; for d in xg gx; do $(MAKE) -C $$d clean; done 14 | 15 | .PHONY: distclean 16 | distclean: clean 17 | set -e; for d in xg gx; do $(MAKE) -c $$d distclean; done 18 | 19 | .PHONY: install 20 | install: all 21 | [ -d $(DESTDIR)$(sbindir) ] || $(INSTALL_DIR) $(DESTDIR)$(sbindir) 22 | $(INSTALL_PROG) gdbsx $(DESTDIR)$(sbindir)/gdbsx 23 | 24 | gdbsx: gx/gx_all.a xg/xg_all.a 25 | $(CC) -o $@ $^ 26 | 27 | xg/xg_all.a: 28 | $(MAKE) -C xg 29 | gx/gx_all.a: 30 | $(MAKE) -C gx 31 | -------------------------------------------------------------------------------- /tools/xenstore/xenstore_control.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "xenstore.h" 6 | 7 | 8 | int main(int argc, char **argv) 9 | { 10 | struct xs_handle * xsh; 11 | 12 | if (argc < 2 || 13 | strcmp(argv[1], "check")) 14 | { 15 | fprintf(stderr, 16 | "Usage:\n" 17 | "\n" 18 | " %s check\n" 19 | "\n", argv[0]); 20 | return 2; 21 | } 22 | 23 | xsh = xs_daemon_open(); 24 | 25 | if (xsh == NULL) { 26 | fprintf(stderr, "Failed to contact Xenstored.\n"); 27 | return 1; 28 | } 29 | 30 | xs_debug_command(xsh, argv[1], NULL, 0); 31 | 32 | xs_daemon_close(xsh); 33 | 34 | return 0; 35 | } 36 | -------------------------------------------------------------------------------- /m4/extfs.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AX_CHECK_EXTFS], [ 2 | AC_CHECK_HEADER([ext2fs/ext2fs.h], [ 3 | AC_CHECK_LIB([ext2fs], [ext2fs_open2], [ 4 | AC_DEFINE([INCLUDE_EXTFS_H], [], 5 | [Define extfs header to use]) 6 | EXTFS_LIBS="-lext2fs" 7 | ]) 8 | ]) 9 | dnl This is a temporary hack for CentOS 5.x, which split the ext4 support 10 | dnl of ext2fs in a different package. Once CentOS 5.x is no longer supported 11 | dnl we can remove this. 12 | AC_CHECK_HEADER([ext4fs/ext2fs.h], [ 13 | AC_CHECK_LIB([ext4fs], [ext2fs_open2], [ 14 | AC_DEFINE([INCLUDE_EXTFS_H], [], 15 | [Define extfs header to use]) 16 | EXTFS_LIBS="-lext4fs" 17 | ]) 18 | ]) 19 | AC_SUBST(EXTFS_LIBS) 20 | ]) 21 | -------------------------------------------------------------------------------- /tools/python/xen/migration/public.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | """ 5 | Xen public ABI constants, used in migration 6 | """ 7 | 8 | HVM_PARAM_STORE_PFN = 1 9 | HVM_PARAM_IOREQ_PFN = 5 10 | HVM_PARAM_BUFIOREQ_PFN = 6 11 | HVM_PARAM_VIRIDIAN = 9 12 | HVM_PARAM_IDENT_PT = 12 13 | HVM_PARAM_VM86_TSS = 15 14 | HVM_PARAM_CONSOLE_PFN = 17 15 | HVM_PARAM_ACPI_IOPORTS_LOCATION = 19 16 | HVM_PARAM_PAGING_RING_PFN = 27 17 | HVM_PARAM_MONITOR_RING_PFN = 28 18 | HVM_PARAM_SHARING_RING_PFN = 29 19 | HVM_PARAM_IOREQ_SERVER_PFN = 32 20 | HVM_PARAM_NR_IOREQ_SERVER_PAGES = 33 21 | HVM_PARAM_VM_GENERATION_ID_ADDR = 34 22 | -------------------------------------------------------------------------------- /tools/libxc/xc_elf.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This library is free software; you can redistribute it and/or 3 | * modify it under the terms of the GNU Lesser General Public 4 | * License as published by the Free Software Foundation; 5 | * version 2.1 of the License. 6 | * 7 | * This library is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 10 | * Lesser General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU Lesser General Public 13 | * License along with this library; If not, see . 14 | */ 15 | 16 | #include 17 | -------------------------------------------------------------------------------- /tools/tests/mce-test/tools/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT=$(CURDIR)/../../../.. 2 | include $(XEN_ROOT)/tools/Rules.mk 3 | 4 | CFLAGS += -Werror 5 | CFLAGS += $(CFLAGS_libxenctrl) 6 | # xen-mceinj.c incorrectly use libxc internals 7 | CFLAGS += -I$(XEN_ROOT)/tools/libxc 8 | CFLAGS += $(CFLAGS_libxenguest) 9 | CFLAGS += $(CFLAGS_libxenstore) 10 | CFLAGS += $(CFLAGS_xeninclude) 11 | 12 | .PHONY: all 13 | all: xen-mceinj 14 | 15 | install: xen-mceinj 16 | $(INSTALL_PROG) xen-mceinj $(DESTDIR)$(sbindir) 17 | 18 | .PHONY: clean 19 | clean: 20 | $(RM) *.o xen-mceinj 21 | 22 | .PHONY: distclean 23 | distclean: clean 24 | 25 | xen-mceinj: xen-mceinj.o Makefile 26 | $(CC) -o $@ $< $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) 27 | -------------------------------------------------------------------------------- /xen/arch/arm/smc.S: -------------------------------------------------------------------------------- 1 | /* 2 | * xen/arch/arm/smc.S 3 | * 4 | * Wrapper for Secure Monitors Calls 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | */ 16 | 17 | #include 18 | 19 | ENTRY(call_smc) 20 | smc #0 21 | ret 22 | -------------------------------------------------------------------------------- /tools/examples/cpupool: -------------------------------------------------------------------------------- 1 | #============================================================================ 2 | # Configuration setup for 'xm cpupool-create' or 'xl cpupool-create'. 3 | # This script sets the parameters used when a cpupool is created using 4 | # 'xm cpupool-create' or 'xl cpupool-create'. 5 | # You use a separate script for each cpupool you want to create, or 6 | # you can set the parameters for the cpupool on the xm command line. 7 | #============================================================================ 8 | 9 | # the name of the new cpupool 10 | name = "Example-Cpupool" 11 | 12 | # the scheduler to use: valid are e.g. credit, credit2 and rtds 13 | sched = "credit" 14 | 15 | # list of cpus to use 16 | cpus = ["2", "3"] 17 | 18 | -------------------------------------------------------------------------------- /stubdom/lwip.dhcp_create_request-hwaddr_len.patch: -------------------------------------------------------------------------------- 1 | Index: src/core/dhcp.c 2 | =================================================================== 3 | --- src/core/dhcp.c 4 | +++ src/core/dhcp.c 5 | @@ -1356,7 +1358,7 @@ dhcp_create_request(struct netif *netif) 6 | dhcp->msg_out->giaddr.addr = 0; 7 | for (i = 0; i < DHCP_CHADDR_LEN; i++) { 8 | /* copy netif hardware address, pad with zeroes */ 9 | - dhcp->msg_out->chaddr[i] = (i < netif->hwaddr_len) ? netif->hwaddr[i] : 0/* pad byte*/; 10 | + dhcp->msg_out->chaddr[i] = (i < (netif->hwaddr_len > NETIF_MAX_HWADDR_LEN ? NETIF_MAX_HWADDR_LEN : netif->hwaddr_len)) ? netif->hwaddr[i] : 0/* pad byte*/; 11 | } 12 | for (i = 0; i < DHCP_SNAME_LEN; i++) { 13 | dhcp->msg_out->sname[i] = 0; 14 | -------------------------------------------------------------------------------- /tools/firmware/hvmloader/acpi/README: -------------------------------------------------------------------------------- 1 | ACPI Table for domain firmware 2 | 3 | 4 | INSTALL 5 | ----------------- 6 | Simply make is OK. 7 | # make 8 | 9 | 10 | Note on DSDT Table 11 | ------------------ 12 | DSDT table source code is acpi_dsdt.asl 13 | It is already compiled and the output is acpi_dsdt.c 14 | Usually, user is not expected to change the acpi_dsdt.asl. 15 | In case that the acpi_dsdt.asl need to be updated, please 16 | Follow the instruction: 17 | 18 | # make acpi_dsdt.c 19 | 20 | Note: 21 | DSDT compiler "iasl" is needed. By default, it will be downloaded 22 | using wget in Makefile. if it failed, please download manually from 23 | http://developer.intel.com/technology/iapc/acpi/downloads.htm. 24 | then compile and install iasl 25 | -------------------------------------------------------------------------------- /tools/include/xen-foreign/reference.size: -------------------------------------------------------------------------------- 1 | 2 | structs | arm32 arm64 x86_32 x86_64 3 | 4 | start_info | - - 1112 1168 5 | trap_info | - - 8 16 6 | cpu_user_regs | - - 68 200 7 | vcpu_guest_core_regs | 304 304 - - 8 | vcpu_guest_context | 344 344 2800 5168 9 | arch_vcpu_info | 0 0 24 16 10 | vcpu_time_info | 32 32 32 32 11 | vcpu_info | 48 48 64 64 12 | arch_shared_info | 0 0 28 48 13 | shared_info | 1088 1088 2344 3136 14 | 15 | -------------------------------------------------------------------------------- /xen/include/asm-arm/elf.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARM_ELF_H__ 2 | #define __ARM_ELF_H__ 3 | 4 | typedef struct { 5 | unsigned long r0; 6 | unsigned long r1; 7 | unsigned long r2; 8 | unsigned long r3; 9 | unsigned long r4; 10 | unsigned long r5; 11 | unsigned long r6; 12 | unsigned long r7; 13 | unsigned long r8; 14 | unsigned long r9; 15 | unsigned long r10; 16 | unsigned long r11; 17 | unsigned long r12; 18 | unsigned long sp; 19 | unsigned long lr; 20 | unsigned long pc; 21 | } ELF_Gregset; 22 | 23 | #endif /* __ARM_ELF_H__ */ 24 | 25 | /* 26 | * Local variables: 27 | * mode: C 28 | * c-file-style: "BSD" 29 | * c-basic-offset: 4 30 | * tab-width: 4 31 | * indent-tabs-mode: nil 32 | * End: 33 | */ 34 | -------------------------------------------------------------------------------- /xen/include/asm-arm/numa.h: -------------------------------------------------------------------------------- 1 | #ifndef __ARCH_ARM_NUMA_H 2 | #define __ARCH_ARM_NUMA_H 3 | 4 | typedef u8 nodeid_t; 5 | 6 | /* Fake one node for now. See also node_online_map. */ 7 | #define cpu_to_node(cpu) 0 8 | #define node_to_cpumask(node) (cpu_online_map) 9 | 10 | static inline __attribute__((pure)) nodeid_t phys_to_nid(paddr_t addr) 11 | { 12 | return 0; 13 | } 14 | 15 | /* XXX: implement NUMA support */ 16 | #define node_spanned_pages(nid) (total_pages) 17 | #define node_start_pfn(nid) (pdx_to_pfn(frametable_base_pdx)) 18 | #define __node_distance(a, b) (20) 19 | 20 | #endif /* __ARCH_ARM_NUMA_H */ 21 | /* 22 | * Local variables: 23 | * mode: C 24 | * c-file-style: "BSD" 25 | * c-basic-offset: 4 26 | * indent-tabs-mode: nil 27 | * End: 28 | */ 29 | -------------------------------------------------------------------------------- /tools/firmware/vgabios/TODO: -------------------------------------------------------------------------------- 1 | Short term : 2 | ------------ 3 | 4 | General 5 | - Fix init mode (ah=00). Should use more BIOS variables 6 | - Add new functionalities and modify static functionality table 7 | - Performance : 16 bits IO 8 | 9 | v0.7 10 | - Implement the remaining functions (don't know if all are needed): 11 | - chargen ax=1120, ax=1121, ax=1122, ax=1123, ax=1124 12 | - display switch interface ah=12 bl=35 13 | - video refresh control ah=12 bl=36 14 | - Graphic modes 15 | 16 | v1.0 17 | - Bugfixes 18 | 19 | 20 | ================================================================================================= 21 | VBE: 22 | ---- 23 | Long term: 24 | - have plex86 host side display interface 25 | - have text io functions in vbe mode 26 | 27 | -------------------------------------------------------------------------------- /tools/libfsimage/Rules.mk: -------------------------------------------------------------------------------- 1 | include $(XEN_ROOT)/tools/Rules.mk 2 | 3 | CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\" 4 | CFLAGS += -Werror -D_GNU_SOURCE 5 | LDFLAGS += -L../common/ 6 | 7 | PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y)) 8 | 9 | FSDIR = $(libdir)/fs 10 | 11 | FSLIB = fsimage.so 12 | 13 | .PHONY: fs-all 14 | fs-all: $(FSLIB) 15 | 16 | .PHONY: fs-install 17 | fs-install: fs-all 18 | $(INSTALL_DIR) $(DESTDIR)$(FSDIR)/$(FS) 19 | $(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR)/$(FS) 20 | 21 | $(FSLIB): $(PIC_OBJS) 22 | $(CC) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS) $(APPEND_LDFLAGS) 23 | 24 | clean distclean:: 25 | rm -f $(PIC_OBJS) $(FSLIB) $(DEPS) 26 | 27 | -include $(DEPS) 28 | -------------------------------------------------------------------------------- /tools/xenstore/xenstored_osdep.h: -------------------------------------------------------------------------------- 1 | /* 2 | * OS specific bits for xenstored 3 | * Copyright (C) 2014 Citrix Systems R&D. 4 | * 5 | * This program is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU General Public License as 7 | * published by the Free Software Foundation, version 2 of the 8 | * License. 9 | */ 10 | 11 | #if defined(__linux__) 12 | #define XENSTORED_KVA_DEV "/proc/xen/xsd_kva" 13 | #define XENSTORED_PORT_DEV "/proc/xen/xsd_port" 14 | #elif defined(__NetBSD__) 15 | #define XENSTORED_KVA_DEV "/dev/xsd_kva" 16 | #define XENSTORED_PORT_DEV "/kern/xen/xsd_port" 17 | #elif defined(__FreeBSD__) 18 | #define XENSTORED_KVA_DEV "/dev/xen/xenstored" 19 | #define XENSTORED_PORT_DEV "/dev/xen/xenstored" 20 | #endif 21 | -------------------------------------------------------------------------------- /xen/include/asm-arm/early_printk.h: -------------------------------------------------------------------------------- 1 | /* 2 | * printk() for use before the final page tables are setup. 3 | * 4 | * Copyright (C) 2012 Citrix Systems, Inc. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License version 2 as 8 | * published by the Free Software Foundation. 9 | */ 10 | #ifndef __ARM_EARLY_PRINTK_H__ 11 | #define __ARM_EARLY_PRINTK_H__ 12 | 13 | #include 14 | 15 | #ifdef CONFIG_EARLY_PRINTK 16 | 17 | /* need to add the uart address offset in page to the fixmap address */ 18 | #define EARLY_UART_VIRTUAL_ADDRESS \ 19 | (FIXMAP_ADDR(FIXMAP_CONSOLE) +(EARLY_UART_BASE_ADDRESS & ~PAGE_MASK)) 20 | 21 | #endif /* !CONFIG_EARLY_PRINTK */ 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /tools/libfsimage/common/mapfile-SunOS: -------------------------------------------------------------------------------- 1 | libfsimage.so.1.0 { 2 | global: 3 | fsi_open_fsimage; 4 | fsi_close_fsimage; 5 | fsi_file_exists; 6 | fsi_open_file; 7 | fsi_close_file; 8 | fsi_read_file; 9 | fsi_pread_file; 10 | fsi_bootstring_alloc; 11 | fsi_bootstring_free; 12 | fsi_fs_bootstring; 13 | 14 | fsip_fs_set_data; 15 | fsip_file_alloc; 16 | fsip_file_free; 17 | fsip_fs; 18 | fsip_fs_data; 19 | fsip_fs_offset; 20 | fsip_file_data; 21 | 22 | fsig_init; 23 | fsig_devread; 24 | fsig_substring; 25 | fsig_log2; 26 | fsig_fs_buf; 27 | fsig_file_alloc; 28 | fsig_file_buf; 29 | fsig_filepos; 30 | fsig_filemax; 31 | fsig_int1; 32 | fsig_int2; 33 | fsig_errnum; 34 | fsig_disk_read_junk; 35 | 36 | local: 37 | *; 38 | }; 39 | -------------------------------------------------------------------------------- /tools/pygrub/README: -------------------------------------------------------------------------------- 1 | pygrub is a grub-like bootloader for xen. This tool is to use to boot domU images. 2 | 3 | To compile pygrub, you will need the following packages installed: 4 | 5 | 1) Libraries of ext2fs, which is the following package (depend on your Linux distribution): 6 | - e2fslibs-dev on Debian based distributions (Debian, Ubuntu, Linspire, Libranet, Xandros, etc...) 7 | - e2fsprogs-devel on RedHat, Fedora Core 8 | - libext2fs2-devel on Mandriva/Mandrake 9 | - e2fsprogs on Gentoo 10 | 11 | 2) Libraries of reiserfs, which is the following package (depend on your Linux distribution): 12 | - libreiserfs-dev on Debian based distributions (Debian, Ubuntu, Xandros, Libranet, Xandros, etc...) 13 | - progsreiserfs-devel on RedHat 14 | - progsreiserfs on Gentoo 15 | 16 | -------------------------------------------------------------------------------- /stubdom/vtpmmgr/disk_io.h: -------------------------------------------------------------------------------- 1 | #ifndef __VTPMMGR_DISK_IO_H 2 | #define __VTPMMGR_DISK_IO_H 3 | 4 | void* disk_read_sector(sector_t sector); 5 | void disk_write_sector(sector_t sector, void* buf, size_t siz); 6 | void* disk_write_buf(void); 7 | void disk_write_barrier(void); 8 | 9 | sector_t disk_find_free(const struct mem_tpm_mgr *mgr); 10 | void disk_flush_slot(const struct mem_tpm_mgr *mgr); 11 | void disk_set_used(sector_t loc, const struct mem_tpm_mgr *mgr); 12 | 13 | void disk_write_all(struct mem_tpm_mgr *mgr); 14 | 15 | static inline sector_t seal_loc(struct mem_tpm_mgr *mgr) 16 | { 17 | return native_be32(mgr->active_root); 18 | } 19 | 20 | static inline sector_t root_loc(struct mem_tpm_mgr *mgr) 21 | { 22 | return native_be32(2 + mgr->active_root); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /tools/firmware/hvmloader/e820.h: -------------------------------------------------------------------------------- 1 | #ifndef __HVMLOADER_E820_H__ 2 | #define __HVMLOADER_E820_H__ 3 | 4 | /* 5 | * PC BIOS standard E820 types and structure. 6 | */ 7 | #define E820_RAM 1 8 | #define E820_RESERVED 2 9 | #define E820_ACPI 3 10 | #define E820_NVS 4 11 | 12 | struct e820entry { 13 | uint64_t addr; 14 | uint64_t size; 15 | uint32_t type; 16 | } __attribute__((packed)); 17 | 18 | #define E820MAX 128 19 | 20 | struct e820map { 21 | unsigned int nr_map; 22 | struct e820entry map[E820MAX]; 23 | }; 24 | 25 | #endif /* __HVMLOADER_E820_H__ */ 26 | 27 | /* 28 | * Local variables: 29 | * mode: C 30 | * c-file-style: "BSD" 31 | * c-basic-offset: 4 32 | * tab-width: 4 33 | * indent-tabs-mode: nil 34 | * End: 35 | */ 36 | -------------------------------------------------------------------------------- /xen/include/xen/multicall.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * multicall.h 3 | */ 4 | 5 | #ifndef __XEN_MULTICALL_H__ 6 | #define __XEN_MULTICALL_H__ 7 | 8 | #include 9 | #include 10 | #ifdef CONFIG_COMPAT 11 | #include 12 | #endif 13 | 14 | #define _MCSF_in_multicall 0 15 | #define _MCSF_call_preempted 1 16 | #define MCSF_in_multicall (1<<_MCSF_in_multicall) 17 | #define MCSF_call_preempted (1<<_MCSF_call_preempted) 18 | struct mc_state { 19 | unsigned long flags; 20 | union { 21 | struct multicall_entry call; 22 | #ifdef CONFIG_COMPAT 23 | struct compat_multicall_entry compat_call; 24 | #endif 25 | }; 26 | }; 27 | 28 | #endif /* __XEN_MULTICALL_H__ */ 29 | -------------------------------------------------------------------------------- /m4/curses.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AX_CHECK_CURSES], [ 2 | AC_CHECK_HEADER([curses.h], [ 3 | AC_CHECK_LIB([curses], [clear], [curses="y"], [curses="n"]) 4 | ], [curses="n"]) 5 | AC_CHECK_HEADER([ncurses.h], [ 6 | AC_CHECK_LIB([ncurses], [clear], [ncurses="y"], [ncurses="n"]) 7 | ], [ncurses="n"]) 8 | AS_IF([test "$curses" = "n" && test "$ncurses" = "n"], [ 9 | AC_MSG_ERROR([Unable to find a suitable curses library]) 10 | ]) 11 | # Prefer ncurses over curses if both are present 12 | AS_IF([test "$ncurses" = "y"], [ 13 | CURSES_LIBS="-lncurses" 14 | AC_DEFINE([INCLUDE_CURSES_H], [], [Define curses header to use]) 15 | ], [ 16 | CURSES_LIBS="-lcurses" 17 | AC_DEFINE([INCLUDE_CURSES_H], [], [Define curses header to use]) 18 | ]) 19 | AC_SUBST(CURSES_LIBS) 20 | ]) 21 | -------------------------------------------------------------------------------- /xen/arch/x86/x86_64/machine_kexec.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * machine_kexec.c 3 | * 4 | * Xen port written by: 5 | * - Simon 'Horms' Horman 6 | * - Magnus Damm 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | int machine_kexec_get_xen(xen_kexec_range_t *range) 15 | { 16 | range->start = virt_to_maddr(_start); 17 | range->size = virt_to_maddr(_end) - (unsigned long)range->start; 18 | return 0; 19 | } 20 | 21 | /* 22 | * Local variables: 23 | * mode: C 24 | * c-file-style: "BSD" 25 | * c-basic-offset: 4 26 | * tab-width: 4 27 | * indent-tabs-mode: nil 28 | * End: 29 | */ 30 | -------------------------------------------------------------------------------- /xen/include/xen/percpu.h: -------------------------------------------------------------------------------- 1 | #ifndef __XEN_PERCPU_H__ 2 | #define __XEN_PERCPU_H__ 3 | 4 | #include 5 | 6 | /* 7 | * Separate out the type, so (int[3], foo) works. 8 | * 9 | * The _##name concatenation is being used here to prevent 'name' from getting 10 | * macro expanded, while still allowing a per-architecture symbol name prefix. 11 | */ 12 | #define DEFINE_PER_CPU(type, name) __DEFINE_PER_CPU(type, _##name, ) 13 | #define DEFINE_PER_CPU_READ_MOSTLY(type, name) \ 14 | __DEFINE_PER_CPU(type, _##name, .read_mostly) 15 | 16 | /* Preferred on Xen. Also see arch-defined per_cpu(). */ 17 | #define this_cpu(var) __get_cpu_var(var) 18 | 19 | /* Linux compatibility. */ 20 | #define get_cpu_var(var) this_cpu(var) 21 | #define put_cpu_var(var) 22 | 23 | #endif /* __XEN_PERCPU_H__ */ 24 | -------------------------------------------------------------------------------- /docs/README.xen-bugtool: -------------------------------------------------------------------------------- 1 | xen-bugtool 2 | =========== 3 | 4 | The xen-bugtool command line application will collate the Xen dmesg output, 5 | details of the hardware configuration of your machine, information about the 6 | build of Xen that you are using, plus, if you allow it, various logs. 7 | 8 | The information collated can either be posted to a Xen Bugzilla bug (this bug 9 | must already exist in the system, and you must be a registered user there), or 10 | it can be saved as a .tar.bz2 for sending or archiving. 11 | 12 | The collated logs may contain private information, and if you are at all 13 | worried about that, you should not use this tool, or you should explicitly 14 | exclude those logs from the archive. 15 | 16 | xen-bugtool is wholly interactive, so simply run it, and answer the questions. 17 | -------------------------------------------------------------------------------- /tools/hotplug/NetBSD/vif-ip: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | # $NetBSD: vif-ip-nbsd,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $ 4 | # Called by xenbackendd 5 | # Usage: vif-ip xsdir_backend_path state 6 | 7 | DIR=$(dirname "$0") 8 | . "${DIR}/hotplugpath.sh" 9 | 10 | PATH=${bindir}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin 11 | export PATH 12 | 13 | xpath=$1 14 | xstatus=$2 15 | 16 | case $xstatus in 17 | 6) 18 | # device removed 19 | xenstore-rm $xpath 20 | exit 0 21 | ;; 22 | 2) 23 | xip=$(xenstore-read "$xpath/ip") 24 | xfid=$(xenstore-read "$xpath/frontend-id") 25 | xhandle=$(xenstore-read "$xpath/handle") 26 | iface=$(xenstore-read "$xpath/vifname") 27 | ifconfig $iface $xip up 28 | xenstore-write $xpath/hotplug-status connected 29 | exit 0 30 | ;; 31 | *) 32 | exit 0 33 | ;; 34 | esac 35 | -------------------------------------------------------------------------------- /tools/include/xen-external/README: -------------------------------------------------------------------------------- 1 | WARNING - DO NOT EDIT THINGS IN THIS DIRECTORY 2 | ---------------------------------------------- 3 | 4 | These files were obtained elsewhere and should only be updated by 5 | copying new versions from the source location, as documented below: 6 | 7 | bsd-COPYRIGHT 8 | bsd-sys-queue.h 9 | bsd-queue.3 10 | 11 | Obtained from the FreeBSD SVN using the following commands: 12 | svn co -r 221843 svn://svn.freebsd.org/base/head/sys/sys/ 13 | svn co -r 221843 svn://svn.freebsd.org/base/head/share/man/man3 14 | svn cat -r 221843 http://svn.freebsd.org/base/head/COPYRIGHT >tools/libxl/external/bsd-COPYRIGHT 15 | 16 | Exceptions: 17 | 18 | README 19 | 20 | This file 21 | 22 | bsd-sys-queue-h-seddery 23 | 24 | Script to transform the above into a new namespace. 25 | -------------------------------------------------------------------------------- /tools/blktap2/lvm/Makefile: -------------------------------------------------------------------------------- 1 | XEN_ROOT = $(CURDIR)/../../.. 2 | BLKTAP_ROOT := .. 3 | include $(XEN_ROOT)/tools/Rules.mk 4 | 5 | ifeq ($(LVM_UTIL_TEST),y) 6 | TEST := lvm-util 7 | endif 8 | 9 | CFLAGS += -Werror 10 | CFLAGS += -Wno-unused 11 | CFLAGS += -I../include 12 | CFLAGS += -D_GNU_SOURCE 13 | 14 | ifeq ($(CONFIG_X86_64),y) 15 | CFLAGS += -fPIC 16 | endif 17 | 18 | LVM-OBJS := lvm-util.o 19 | 20 | all: build 21 | 22 | build: $(TEST) $(LVM-OBJS) 23 | 24 | install: all 25 | 26 | lvm-util: lvm-util.o 27 | $(CC) -DLVM_UTIL $(LDFLAGS) -o lvm-util lvm-util.c 28 | 29 | clean: 30 | rm -rf *.o *.opic *~ $(DEPS) $(IBIN) 31 | 32 | distclean: clean 33 | 34 | .PHONY: all build clean distclean install lvm-util 35 | 36 | -include $(DEPS) 37 | -------------------------------------------------------------------------------- /xen/include/asm-arm/hardirq.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_HARDIRQ_H 2 | #define __ASM_HARDIRQ_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | typedef struct { 9 | unsigned long __softirq_pending; 10 | unsigned int __local_irq_count; 11 | } __cacheline_aligned irq_cpustat_t; 12 | 13 | #include /* Standard mappings for irq_cpustat_t above */ 14 | 15 | #define in_irq() (local_irq_count(smp_processor_id()) != 0) 16 | 17 | #define irq_enter() (local_irq_count(smp_processor_id())++) 18 | #define irq_exit() (local_irq_count(smp_processor_id())--) 19 | 20 | #endif /* __ASM_HARDIRQ_H */ 21 | /* 22 | * Local variables: 23 | * mode: C 24 | * c-file-style: "BSD" 25 | * c-basic-offset: 4 26 | * indent-tabs-mode: nil 27 | * End: 28 | */ 29 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | src='./install' 4 | if [ -d ./dist ]; then 5 | src='./dist/install' 6 | fi 7 | 8 | if ! [ -d $src ]; then 9 | echo "ERROR: Could not find a valid distribution directory." 10 | echo " If this is a source-only release, try 'make dist'." 11 | exit 1 12 | fi 13 | 14 | dst='/' 15 | if [ $# -ne 0 ]; then 16 | dst=$1 17 | fi 18 | 19 | if ! [ -d $dst ]; then 20 | echo "ERROR: You must specify a valid install directory." 21 | echo " The specified directory '$dst' is not valid." 22 | exit 1 23 | fi 24 | 25 | tmp="`mktemp -d`" 26 | 27 | echo "Installing Xen from '$src' to '$dst'..." 28 | (cd $src; tar -cf - * ) | tar -C "$tmp" -xf - 29 | 30 | (cd $tmp; tar -cf - *) | tar --no-same-owner -C "$dst" -xf - 31 | rm -rf "$tmp" 32 | 33 | echo "All done." 34 | 35 | exit 0 36 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/systemd/xen-qemu-dom0-disk-backend.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=qemu for xen dom0 disk backend 3 | Requires=proc-xen.mount xenstored.service 4 | After=proc-xen.mount xenstored.service xenconsoled.service 5 | Before=xendomains.service libvirtd.service libvirt-guests.service 6 | RefuseManualStop=true 7 | ConditionPathExists=/proc/xen/capabilities 8 | 9 | [Service] 10 | Type=simple 11 | PIDFile=@XEN_RUN_DIR@/qemu-dom0.pid 12 | ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities 13 | ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@ 14 | ExecStart=@qemu_xen_systemd@ -xen-domid 0 \ 15 | -xen-attach -name dom0 -nographic -M xenpv -daemonize \ 16 | -monitor /dev/null -serial /dev/null -parallel /dev/null \ 17 | -pidfile @XEN_RUN_DIR@/qemu-dom0.pid 18 | 19 | [Install] 20 | WantedBy=multi-user.target 21 | -------------------------------------------------------------------------------- /tools/ocaml/libs/mmap/Makefile: -------------------------------------------------------------------------------- 1 | TOPLEVEL=$(CURDIR)/../.. 2 | XEN_ROOT=$(TOPLEVEL)/../.. 3 | include $(TOPLEVEL)/common.make 4 | 5 | OBJS = xenmmap 6 | INTF = $(foreach obj, $(OBJS),$(obj).cmi) 7 | LIBS = xenmmap.cma xenmmap.cmxa 8 | 9 | all: $(INTF) $(LIBS) $(PROGRAMS) 10 | 11 | bins: $(PROGRAMS) 12 | 13 | libs: $(LIBS) 14 | 15 | xenmmap_OBJS = $(OBJS) 16 | xenmmap_C_OBJS = xenmmap_stubs 17 | OCAML_LIBRARY = xenmmap 18 | 19 | .PHONY: install 20 | install: $(LIBS) META 21 | mkdir -p $(OCAMLDESTDIR) 22 | $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenmmap 23 | $(OCAMLFIND) install -destdir $(OCAMLDESTDIR) -ldconf ignore xenmmap META $(INTF) $(LIBS) *.a *.so *.cmx 24 | 25 | .PHONY: uninstall 26 | uninstall: 27 | $(OCAMLFIND) remove -destdir $(OCAMLDESTDIR) xenmmap 28 | 29 | include $(TOPLEVEL)/Makefile.rules 30 | 31 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/overrides.mk: -------------------------------------------------------------------------------- 1 | # Hack: we need to use the config which was used to build the kernel, 2 | # except that that won't have the right headers etc., so duplicate 3 | # some of the mach-xen infrastructure in here. 4 | # 5 | # (i.e. we need the native config for things like -mregparm, but 6 | # a Xen kernel to find the right headers) 7 | _XEN_CPPFLAGS += -D__XEN_INTERFACE_VERSION__=0x00030205 8 | _XEN_CPPFLAGS += -DCONFIG_XEN_COMPAT=0xffffff 9 | _XEN_CPPFLAGS += -I$(M)/include -I$(M)/compat-include -DHAVE_XEN_PLATFORM_COMPAT_H 10 | ifeq ($(ARCH),ia64) 11 | _XEN_CPPFLAGS += -DCONFIG_VMX_GUEST 12 | endif 13 | 14 | _XEN_CPPFLAGS += -include $(wildcard $(objtree)/include/*/autoconf.h) 15 | 16 | EXTRA_CFLAGS += $(_XEN_CPPFLAGS) 17 | EXTRA_AFLAGS += $(_XEN_CPPFLAGS) 18 | CPPFLAGS := -I$(M)/include $(CPPFLAGS) 19 | -------------------------------------------------------------------------------- /xen/include/asm-x86/hardirq.h: -------------------------------------------------------------------------------- 1 | #ifndef __ASM_HARDIRQ_H 2 | #define __ASM_HARDIRQ_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | typedef struct { 9 | unsigned int __softirq_pending; 10 | unsigned int __local_irq_count; 11 | unsigned int __nmi_count; 12 | bool_t __mwait_wakeup; 13 | } __cacheline_aligned irq_cpustat_t; 14 | 15 | #include /* Standard mappings for irq_cpustat_t above */ 16 | 17 | #define in_irq() (local_irq_count(smp_processor_id()) != 0) 18 | 19 | #define irq_enter() (local_irq_count(smp_processor_id())++) 20 | #define irq_exit() (local_irq_count(smp_processor_id())--) 21 | 22 | void ack_bad_irq(unsigned int irq); 23 | 24 | extern void apic_intr_init(void); 25 | extern void smp_intr_init(void); 26 | 27 | #endif /* __ASM_HARDIRQ_H */ 28 | -------------------------------------------------------------------------------- /tools/firmware/hvmloader/hvm_param.c: -------------------------------------------------------------------------------- 1 | /* 2 | * hvm_param.c: get/set HVM params. 3 | * 4 | * Copyright (C) 2014 Citrix Systems R&D Ltd. 5 | */ 6 | #include "util.h" 7 | #include "config.h" 8 | #include "hypercall.h" 9 | 10 | #include 11 | 12 | int hvm_param_get(uint32_t index, uint64_t *value) 13 | { 14 | struct xen_hvm_param p; 15 | int ret; 16 | 17 | p.domid = DOMID_SELF; 18 | p.index = index; 19 | 20 | ret = hypercall_hvm_op(HVMOP_get_param, &p); 21 | if (ret == 0) 22 | *value = p.value; 23 | 24 | return ret; 25 | } 26 | 27 | int hvm_param_set(uint32_t index, uint64_t value) 28 | { 29 | struct xen_hvm_param p; 30 | 31 | p.domid = DOMID_SELF; 32 | p.index = index; 33 | p.value = value; 34 | 35 | return hypercall_hvm_op(HVMOP_set_param, &p); 36 | } 37 | -------------------------------------------------------------------------------- /tools/libfsimage/common/mapfile-GNU: -------------------------------------------------------------------------------- 1 | VERSION { 2 | libfsimage.so.1.0 { 3 | global: 4 | fsi_open_fsimage; 5 | fsi_close_fsimage; 6 | fsi_file_exists; 7 | fsi_open_file; 8 | fsi_close_file; 9 | fsi_read_file; 10 | fsi_pread_file; 11 | fsi_bootstring_alloc; 12 | fsi_bootstring_free; 13 | fsi_fs_bootstring; 14 | 15 | fsip_fs_set_data; 16 | fsip_file_alloc; 17 | fsip_file_free; 18 | fsip_fs; 19 | fsip_fs_offset; 20 | fsip_fs_data; 21 | fsip_file_data; 22 | 23 | fsig_init; 24 | fsig_devread; 25 | fsig_substring; 26 | fsig_log2; 27 | fsig_fs_buf; 28 | fsig_file_alloc; 29 | fsig_file_buf; 30 | fsig_filepos; 31 | fsig_filemax; 32 | fsig_int1; 33 | fsig_int2; 34 | fsig_errnum; 35 | fsig_disk_read_junk; 36 | 37 | local: 38 | *; 39 | }; 40 | } 41 | -------------------------------------------------------------------------------- /stubdom/tpmemu-0.7.4.patch: -------------------------------------------------------------------------------- 1 | diff -Naur tpm_emulator-x86_64-back/tpm/tpm_emulator_extern.c tpm_emulator-x86_64/tpm/tpm_emulator_extern.c 2 | --- tpm_emulator-x86_64-back/tpm/tpm_emulator_extern.c 2012-04-27 10:55:46.581963398 -0400 3 | +++ tpm_emulator-x86_64/tpm/tpm_emulator_extern.c 2012-04-27 10:56:02.193034152 -0400 4 | @@ -249,7 +249,7 @@ 5 | #else /* TPM_NO_EXTERN */ 6 | 7 | int (*tpm_extern_init)(void) = NULL; 8 | -int (*tpm_extern_release)(void) = NULL; 9 | +void (*tpm_extern_release)(void) = NULL; 10 | void* (*tpm_malloc)(size_t size) = NULL; 11 | void (*tpm_free)(/*const*/ void *ptr) = NULL; 12 | void (*tpm_log)(int priority, const char *fmt, ...) = NULL; 13 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/logging.sh: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2005 XenSource Ltd. 3 | # 4 | # This library is free software; you can redistribute it and/or 5 | # modify it under the terms of version 2.1 of the GNU Lesser General Public 6 | # License as published by the Free Software Foundation. 7 | # 8 | # This library is distributed in the hope that it will be useful, 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | # Lesser General Public License for more details. 12 | # 13 | # You should have received a copy of the GNU Lesser General Public 14 | # License along with this library; If not, see . 15 | # 16 | 17 | log() { 18 | local level="$1" 19 | shift 20 | logger -p "daemon.$level" -- "$0:" "$@" || echo "$0 $@" >&2 21 | } 22 | -------------------------------------------------------------------------------- /xen/arch/arm/sysctl.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Arch-specific sysctl.c 3 | * 4 | * System management operations. For use by node control stack. 5 | * 6 | * Copyright (c) 2012, Citrix Systems 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | void arch_do_physinfo(xen_sysctl_physinfo_t *pi) { } 17 | 18 | long arch_do_sysctl(struct xen_sysctl *sysctl, 19 | XEN_GUEST_HANDLE_PARAM(xen_sysctl_t) u_sysctl) 20 | { 21 | return -ENOSYS; 22 | } 23 | 24 | /* 25 | * Local variables: 26 | * mode: C 27 | * c-file-style: "BSD" 28 | * c-basic-offset: 4 29 | * tab-width: 4 30 | * indent-tabs-mode: nil 31 | * End: 32 | */ 33 | -------------------------------------------------------------------------------- /xen/include/xen/watchdog.h: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * watchdog.h 3 | * 4 | * Common watchdog code 5 | */ 6 | 7 | #ifndef __XEN_WATCHDOG_H__ 8 | #define __XEN_WATCHDOG_H__ 9 | 10 | #include 11 | 12 | #ifdef CONFIG_WATCHDOG 13 | 14 | /* Try to set up a watchdog. */ 15 | int watchdog_setup(void); 16 | 17 | /* Enable the watchdog. */ 18 | void watchdog_enable(void); 19 | 20 | /* Disable the watchdog. */ 21 | void watchdog_disable(void); 22 | 23 | /* Is the watchdog currently enabled. */ 24 | bool_t watchdog_enabled(void); 25 | 26 | #else 27 | 28 | #define watchdog_setup() ((void)0) 29 | #define watchdog_enable() ((void)0) 30 | #define watchdog_disable() ((void)0) 31 | #define watchdog_enabled() ((void)0) 32 | 33 | #endif 34 | 35 | #endif /* __XEN_WATCHDOG_H__ */ 36 | -------------------------------------------------------------------------------- /tools/firmware/rombios/32bitprotos.h: -------------------------------------------------------------------------------- 1 | X(0, Bit32u, TCGInterruptHandler, 2 | pushad_regs_t *regs, Bit32u esds, Bit32u flags_ptr) 3 | X(1, void, tcpa_acpi_init, void) 4 | X(2, Bit32u, tcpa_extend_acpi_log, Bit32u entry_ptr) 5 | X(3, void, tcpa_calling_int19h,void) 6 | X(4, void, tcpa_returned_int19h, void) 7 | X(5, void, tcpa_add_event_separators, void) 8 | X(6, void, tcpa_wake_event, void) 9 | X(7, void, tcpa_add_bootdevice, Bit32u bootcd, Bit32u bootdrv) 10 | X(8, void, tcpa_start_option_rom_scan, void) 11 | X(9, void, tcpa_option_rom, Bit32u seg) 12 | X(10, void, tcpa_ipl, Bit32u bootcd, Bit32u seg, Bit32u off, Bit32u count) 13 | X(11, void, tcpa_measure_post, Bit32u from, Bit32u to) 14 | X(12, Bit32u, tcpa_initialize_tpm, Bit32u physpres) 15 | X(13, Bit32u, get_s3_waking_vector, void) 16 | X(14, Bit32u, pmm, void *argp) 17 | -------------------------------------------------------------------------------- /xen/arch/x86/delay.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Precise Delay Loops for i386 3 | * 4 | * Copyright (C) 1993 Linus Torvalds 5 | * Copyright (C) 1997 Martin Mares 6 | * 7 | * The __delay function must _NOT_ be inlined as its execution time 8 | * depends wildly on alignment on many x86 processors. The additional 9 | * jump magic is needed to get the timing stable on all the CPU's 10 | * we have to worry about. 11 | */ 12 | 13 | #include 14 | #include 15 | #include 16 | #include 17 | #include 18 | 19 | void __udelay(unsigned long usecs) 20 | { 21 | unsigned long ticks = usecs * (cpu_khz / 1000); 22 | unsigned long s, e; 23 | 24 | s = rdtsc(); 25 | do 26 | { 27 | rep_nop(); 28 | e = rdtsc(); 29 | } while ((e-s) < ticks); 30 | } 31 | -------------------------------------------------------------------------------- /tools/hotplug/NetBSD/vif-bridge: -------------------------------------------------------------------------------- 1 | #!/bin/sh -e 2 | 3 | # $NetBSD: vif-bridge-nbsd,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $ 4 | # Called by xenbackendd 5 | # Usage: vif-bridge xsdir_backend_path state 6 | 7 | DIR=$(dirname "$0") 8 | . "${DIR}/hotplugpath.sh" 9 | 10 | PATH=${bindir}:${sbindir}:${LIBEXEC_BIN}:/bin:/usr/bin:/sbin:/usr/sbin 11 | export PATH 12 | 13 | xpath=$1 14 | xstatus=$2 15 | 16 | case $xstatus in 17 | 6) 18 | # device removed 19 | xenstore-rm $xpath 20 | exit 0 21 | ;; 22 | 2) 23 | xbridge=$(xenstore-read "$xpath/bridge") 24 | xfid=$(xenstore-read "$xpath/frontend-id") 25 | xhandle=$(xenstore-read "$xpath/handle") 26 | iface=$(xenstore-read "$xpath/vifname") 27 | ifconfig $iface up 28 | brconfig $xbridge add $iface 29 | xenstore-write $xpath/hotplug-status connected 30 | exit 0 31 | ;; 32 | *) 33 | exit 0 34 | ;; 35 | esac 36 | -------------------------------------------------------------------------------- /xen/common/guestcopy.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | /* 7 | * The function copies a string from the guest and adds a NUL to 8 | * make sure the string is correctly terminated. 9 | */ 10 | char *safe_copy_string_from_guest(XEN_GUEST_HANDLE(char) u_buf, 11 | size_t size, size_t max_size) 12 | { 13 | char *tmp; 14 | 15 | if ( size > max_size ) 16 | return ERR_PTR(-ENOBUFS); 17 | 18 | /* Add an extra +1 to append \0 */ 19 | tmp = xmalloc_array(char, size + 1); 20 | if ( !tmp ) 21 | return ERR_PTR(-ENOMEM); 22 | 23 | if ( copy_from_guest(tmp, u_buf, size) ) 24 | { 25 | xfree(tmp); 26 | return ERR_PTR(-EFAULT); 27 | } 28 | tmp[size] = '\0'; 29 | 30 | return tmp; 31 | } 32 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/systemd/xenconsoled.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Xenconsoled - handles logging from guest consoles and hypervisor 3 | Requires=proc-xen.mount xenstored.service 4 | After=proc-xen.mount xenstored.service 5 | ConditionPathExists=/proc/xen/capabilities 6 | 7 | [Service] 8 | Type=simple 9 | Environment=XENCONSOLED_ARGS= 10 | Environment=XENCONSOLED_TRACE=none 11 | Environment=XENCONSOLED_LOG_DIR=@XEN_LOG_DIR@/console 12 | EnvironmentFile=@CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons 13 | PIDFile=@XEN_RUN_DIR@/xenconsoled.pid 14 | ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities 15 | ExecStartPre=/bin/mkdir -p ${XENCONSOLED_LOG_DIR} 16 | ExecStart=@sbindir@/xenconsoled --pid-file @XEN_RUN_DIR@/xenconsoled.pid --log=${XENCONSOLED_TRACE} --log-dir=${XENCONSOLED_LOG_DIR} $XENCONSOLED_ARGS 17 | 18 | [Install] 19 | WantedBy=multi-user.target 20 | -------------------------------------------------------------------------------- /unmodified_drivers/linux-2.6/platform-pci/Kbuild: -------------------------------------------------------------------------------- 1 | include $(M)/overrides.mk 2 | 3 | obj-m := xen-platform-pci.o 4 | 5 | EXTRA_CFLAGS += -I$(M)/platform-pci 6 | 7 | xen-platform-pci-objs := evtchn.o platform-pci.o gnttab.o xen_support.o 8 | xen-platform-pci-objs += features.o platform-compat.o 9 | xen-platform-pci-objs += reboot.o machine_reboot.o 10 | xen-platform-pci-objs += panic-handler.o 11 | 12 | xen-platform-pci-objs += ../xenbus/xenbus_comms.o 13 | xen-platform-pci-objs += ../xenbus/xenbus_xs.o 14 | xen-platform-pci-objs += ../xenbus/xenbus_probe.o 15 | xen-platform-pci-objs += ../xenbus/xenbus_dev.o 16 | xen-platform-pci-objs += ../xenbus/xenbus_client.o 17 | xen-platform-pci-objs += ../xenbus/xen_proc.o 18 | 19 | # Can we do better ? 20 | ifeq ($(ARCH),ia64) 21 | xen-platform-pci-objs += xencomm.o xencomm_arch.o xcom_hcall.o xcom_asm.o 22 | endif 23 | -------------------------------------------------------------------------------- /xen/include/xen/stop_machine.h: -------------------------------------------------------------------------------- 1 | #ifndef __XEN_STOP_MACHINE_H__ 2 | #define __XEN_STOP_MACHINE_H__ 3 | 4 | /** 5 | * stop_machine_run: freeze the machine on all CPUs and run this function 6 | * @fn: the function to run 7 | * @data: the data ptr for the @fn() 8 | * @cpu: the cpu to run @fn() on (or all, if @cpu == NR_CPUS). 9 | * 10 | * Description: This causes every other cpu to enter a safe point, with 11 | * each of which disables interrupts, and finally interrupts are disabled 12 | * on the current CPU. The result is that none is holding a spinlock 13 | * or inside any other preempt-disabled region when @fn() runs. 14 | * 15 | * This can be thought of as a very heavy write lock, equivalent to 16 | * grabbing every spinlock in the kernel. */ 17 | int stop_machine_run(int (*fn)(void *), void *data, unsigned int cpu); 18 | 19 | #endif /* __XEN_STOP_MACHINE_H__ */ 20 | -------------------------------------------------------------------------------- /xen/tools/compat-build-header.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import re,sys 4 | 5 | pats = [ 6 | [ r"__InClUdE__(.*)", r"#include\1\n#pragma pack(4)" ], 7 | [ r"__IfDeF__ (XEN_HAVE.*)", r"#ifdef \1" ], 8 | [ r"__ElSe__", r"#else" ], 9 | [ r"__EnDif__", r"#endif" ], 10 | [ r"\"xen-compat.h\"", r"" ], 11 | [ r"(struct|union|enum)\s+(xen_?)?(\w)", r"\1 compat_\3" ], 12 | [ r"@KeeP@", r"" ], 13 | [ r"_t([^\w]|$)", r"_compat_t\1" ], 14 | [ r"(8|16|32|64)_compat_t([^\w]|$)", r"\1_t\2" ], 15 | [ r"(^|[^\w])xen_?(\w*)_compat_t([^\w]|$$)", r"\1compat_\2_t\3" ], 16 | [ r"(^|[^\w])XEN_?", r"\1COMPAT_" ], 17 | [ r"(^|[^\w])Xen_?", r"\1Compat_" ], 18 | [ r"(^|[^\w])long([^\w]|$$)", r"\1int\2" ] 19 | ]; 20 | 21 | for line in sys.stdin.readlines(): 22 | for pat in pats: 23 | line = re.subn(pat[0], pat[1], line)[0] 24 | print line.rstrip() 25 | -------------------------------------------------------------------------------- /tools/blktap2/drivers/aes.h: -------------------------------------------------------------------------------- 1 | #ifndef QEMU_AES_H 2 | #define QEMU_AES_H 3 | 4 | #include 5 | 6 | #define AES_MAXNR 14 7 | #define AES_BLOCK_SIZE 16 8 | 9 | struct aes_key_st { 10 | uint32_t rd_key[4 *(AES_MAXNR + 1)]; 11 | int rounds; 12 | }; 13 | typedef struct aes_key_st AES_KEY; 14 | 15 | int AES_set_encrypt_key(const unsigned char *userKey, const int bits, 16 | AES_KEY *key); 17 | int AES_set_decrypt_key(const unsigned char *userKey, const int bits, 18 | AES_KEY *key); 19 | 20 | void AES_encrypt(const unsigned char *in, unsigned char *out, 21 | const AES_KEY *key); 22 | void AES_decrypt(const unsigned char *in, unsigned char *out, 23 | const AES_KEY *key); 24 | void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, 25 | const unsigned long length, const AES_KEY *key, 26 | unsigned char *ivec, const int enc); 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /xen/arch/x86/x86_64/compat.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * compat.c 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | DEFINE_XEN_GUEST_HANDLE(physdev_op_compat_t); 11 | #define physdev_op compat_physdev_op 12 | #define physdev_op_t physdev_op_compat_t 13 | #define do_physdev_op compat_physdev_op 14 | #define do_physdev_op_compat(x) compat_physdev_op_compat(_##x) 15 | 16 | #define COMPAT 17 | #define _XEN_GUEST_HANDLE(t) XEN_GUEST_HANDLE(t) 18 | typedef int ret_t; 19 | 20 | #include "../compat.c" 21 | 22 | /* 23 | * Local variables: 24 | * mode: C 25 | * c-file-style: "BSD" 26 | * c-basic-offset: 4 27 | * tab-width: 4 28 | * indent-tabs-mode: nil 29 | * End: 30 | */ 31 | -------------------------------------------------------------------------------- /tools/tests/regression/scripts/check_python_syntax.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Checks the syntax of all .py files 4 | # (compiles them into .pyc files) 5 | # 6 | 7 | REG_TEST_DIR=$1 8 | # Python version, e.g. python-2.3 9 | PYTHON=$2 10 | PATH_TO_CHECK=$3 11 | 12 | echo "Syntax check for $PYTHON" 13 | PYTHON_EXECUTABLE=`echo $PYTHON | tr -d "-"` 14 | export LD_LIBRARY_PATH=${REG_TEST_DIR}/installed/$PYTHON/lib 15 | export PATH=${REG_TEST_DIR}/installed/$PYTHON/bin:$PATH 16 | 17 | # -m is available starting with python 2.4 18 | # When support for 2.3 (and earlier) is dropped, 19 | # the following line will do. 20 | # ${PYTHON_EXECUTABLE} -m compileall -f -q -x ".*\.hg.*|.*/tools/tests/regression/installed.*" ${PATH_TO_CHECK} 21 | ${PYTHON_EXECUTABLE} ${REG_TEST_DIR}/installed/$PYTHON/lib/${PYTHON_EXECUTABLE}/compileall.py -f -q -x ".*\.hg.*|.*/installed/python-.*" ${PATH_TO_CHECK} 22 | exit $? 23 | -------------------------------------------------------------------------------- /tools/ocaml/xenstored/systemd.ml: -------------------------------------------------------------------------------- 1 | (* 2 | * Copyright (C) 2014 Luis R. Rodriguez 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU Lesser General Public License as published 6 | * by the Free Software Foundation; version 2.1 only. with the special 7 | * exception on linking described in file LICENSE. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU Lesser General Public License for more details. 13 | *) 14 | 15 | external sd_listen_fds: string -> Unix.file_descr = "ocaml_sd_listen_fds" 16 | external launched_by_systemd: unit -> bool = "ocaml_launched_by_systemd" 17 | external sd_notify_ready: unit -> unit = "ocaml_sd_notify_ready" 18 | -------------------------------------------------------------------------------- /xen/include/asm-x86/hvm/cacheattr.h: -------------------------------------------------------------------------------- 1 | #ifndef __HVM_CACHEATTR_H__ 2 | #define __HVM_CACHEATTR_H__ 3 | 4 | void hvm_init_cacheattr_region_list( 5 | struct domain *d); 6 | void hvm_destroy_cacheattr_region_list( 7 | struct domain *d); 8 | 9 | /* 10 | * To see guest_fn is in the pinned range or not, 11 | * if yes, return 1, and set type to value in this range 12 | * if no, return 0, setting type to ~0 13 | * if ambiguous, return -1, setting type to ~0 (possible only for order > 0) 14 | */ 15 | int hvm_get_mem_pinned_cacheattr( 16 | struct domain *d, 17 | uint64_t guest_fn, 18 | unsigned int order, 19 | uint32_t *type); 20 | 21 | 22 | /* Set pinned caching type for a domain. */ 23 | int32_t hvm_set_mem_pinned_cacheattr( 24 | struct domain *d, 25 | uint64_t gfn_start, 26 | uint64_t gfn_end, 27 | uint32_t type); 28 | 29 | #endif /* __HVM_CACHEATTR_H__ */ 30 | -------------------------------------------------------------------------------- /xen/xsm/flask/include/conditional.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Interface to booleans in the security server. This is exported 3 | * for the selinuxfs. 4 | * 5 | * Author: Karl MacMillan 6 | * 7 | * Copyright (C) 2003 - 2004 Tresys Technology, LLC 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License as published by 10 | * the Free Software Foundation, version 2. 11 | */ 12 | 13 | #ifndef _FLASK_CONDITIONAL_H_ 14 | #define _FLASK_CONDITIONAL_H_ 15 | 16 | #include 17 | 18 | int security_get_bools(int *len, char ***names, int **values, size_t *maxstr); 19 | 20 | int security_set_bools(int len, int *values); 21 | 22 | int security_find_bool(const char *name); 23 | 24 | char *security_get_bool_name(unsigned int b); 25 | int security_get_bool_value(unsigned int b); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /xen/include/xen/vmap.h: -------------------------------------------------------------------------------- 1 | #if !defined(__XEN_VMAP_H__) && defined(VMAP_VIRT_START) 2 | #define __XEN_VMAP_H__ 3 | 4 | #include 5 | #include 6 | 7 | void *vm_alloc(unsigned int nr, unsigned int align); 8 | void vm_free(const void *); 9 | 10 | void *__vmap(const mfn_t *mfn, unsigned int granularity, 11 | unsigned int nr, unsigned int align, unsigned int flags); 12 | void *vmap(const mfn_t *mfn, unsigned int nr); 13 | void vunmap(const void *); 14 | void *vmalloc(size_t size); 15 | void *vzalloc(size_t size); 16 | void vfree(void *va); 17 | 18 | void __iomem *ioremap(paddr_t, size_t); 19 | 20 | static inline void iounmap(void __iomem *va) 21 | { 22 | unsigned long addr = (unsigned long)(void __force *)va; 23 | 24 | vunmap((void *)(addr & PAGE_MASK)); 25 | } 26 | 27 | void vm_init(void); 28 | void *arch_vmap_virt_end(void); 29 | 30 | #endif /* __XEN_VMAP_H__ */ 31 | -------------------------------------------------------------------------------- /xen/xsm/flask/include/objsec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * NSA Security-Enhanced Linux (SELinux) security module 3 | * 4 | * This file contains the Flask security data structures for xen objects. 5 | * 6 | * Author(s): George Coker, 7 | * 8 | * This program is free software; you can redistribute it and/or modify 9 | * it under the terms of the GNU General Public License version 2, 10 | * as published by the Free Software Foundation. 11 | */ 12 | 13 | #ifndef _FLASK_OBJSEC_H_ 14 | #define _FLASK_OBJSEC_H_ 15 | 16 | #include 17 | #include "flask.h" 18 | #include "avc.h" 19 | 20 | struct domain_security_struct { 21 | u32 sid; /* current SID */ 22 | u32 self_sid; /* SID for target when operating on DOMID_SELF */ 23 | u32 target_sid; /* SID for device model target domain */ 24 | }; 25 | 26 | #endif /* _FLASK_OBJSEC_H_ */ 27 | -------------------------------------------------------------------------------- /tools/flask/policy/policy/access_vectors: -------------------------------------------------------------------------------- 1 | # Locally defined access vectors 2 | # 3 | # Define access vectors for the security classes defined in security_classes 4 | # 5 | 6 | # Note: this is an example; the xenstore daemon provided with Xen does 7 | # not yet include XSM support, and the exact permissions may be defined 8 | # differently if such support is added. 9 | class xenstore { 10 | # read from keys owned by the target domain (if permissions allow) 11 | read 12 | # write to keys owned by the target domain (if permissions allow) 13 | write 14 | # change permissions of a key owned by the target domain 15 | chmod 16 | # change the owner of a key which was owned by the target domain 17 | chown_from 18 | # change the owner of a key to the target domain 19 | chown_to 20 | # access a key owned by the target domain without permission 21 | override 22 | # introduce a domain 23 | introduce 24 | } 25 | -------------------------------------------------------------------------------- /tools/pygrub/Makefile: -------------------------------------------------------------------------------- 1 | 2 | XEN_ROOT = $(CURDIR)/../.. 3 | include $(XEN_ROOT)/tools/Rules.mk 4 | 5 | PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS) $(APPEND_LDFLAGS) 6 | 7 | .PHONY: all 8 | all: build 9 | .PHONY: build 10 | build: 11 | CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py build 12 | 13 | .PHONY: install 14 | install: all 15 | CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py install \ 16 | $(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \ 17 | --install-scripts=$(LIBEXEC_BIN) --force 18 | set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \ 19 | "`readlink -f $(DESTDIR)/$(bindir)`" != \ 20 | "`readlink -f $(LIBEXEC_BIN)`" ]; then \ 21 | ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(bindir); \ 22 | fi 23 | 24 | .PHONY: clean 25 | clean: 26 | rm -rf build tmp *.pyc *.pyo *.o *.a *~ a.out $(DEPS) 27 | 28 | .PHONY: distclean 29 | distclean: clean 30 | 31 | -include $(DEPS) 32 | -------------------------------------------------------------------------------- /xen/include/asm-x86/percpu.h: -------------------------------------------------------------------------------- 1 | #ifndef __X86_PERCPU_H__ 2 | #define __X86_PERCPU_H__ 3 | 4 | #ifndef __ASSEMBLY__ 5 | extern char __per_cpu_start[], __per_cpu_data_end[]; 6 | extern unsigned long __per_cpu_offset[NR_CPUS]; 7 | void percpu_init_areas(void); 8 | #endif 9 | 10 | /* Separate out the type, so (int[3], foo) works. */ 11 | #define __DEFINE_PER_CPU(type, name, suffix) \ 12 | __section(".bss.percpu" #suffix) \ 13 | __typeof__(type) per_cpu_##name 14 | 15 | /* var is in discarded region: offset to particular copy we want */ 16 | #define per_cpu(var, cpu) \ 17 | (*RELOC_HIDE(&per_cpu__##var, __per_cpu_offset[cpu])) 18 | #define __get_cpu_var(var) \ 19 | (*RELOC_HIDE(&per_cpu__##var, get_cpu_info()->per_cpu_offset)) 20 | 21 | #define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu__##name 22 | 23 | #endif /* __X86_PERCPU_H__ */ 24 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/systemd/show_service_dependencies.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # dot(1) from graphviz, display(1) from ImageMagick 3 | # Usage: bash $0 tools/hotplug/Linux/systemd/*.in 4 | ( 5 | echo " digraph systemd {" 6 | for file in "$@" 7 | do 8 | if test -f "$file" 9 | then 10 | unit=${file##*/} 11 | unit=${unit%.in} 12 | requires="`grep ^Requires= $file | cut -f 2- -d =`" 13 | before="`grep ^Before= $file | cut -f 2- -d =`" 14 | after="`grep ^After= $file | cut -f 2- -d =`" 15 | echo "\"$unit\" [fillcolor=lightgray color=black fontcolor=black style=filled];" 16 | for i in $requires 17 | do 18 | echo "\"$i\" -> \"$unit\" [color=red];" 19 | done 20 | for i in $after 21 | do 22 | echo "\"$i\" -> \"$unit\" [color=blue];" 23 | done 24 | for i in $before 25 | do 26 | echo "\"$unit\" -> \"$i\" [color=green];" 27 | done 28 | fi 29 | done 30 | echo "}" 31 | ) | dot -Tpng | display - 32 | -------------------------------------------------------------------------------- /xen/include/asm-x86/mach-default/io_ports.h: -------------------------------------------------------------------------------- 1 | /* 2 | * arch/i386/mach-generic/io_ports.h 3 | * 4 | * Machine specific IO port address definition for generic. 5 | * Written by Osamu Tomita 6 | */ 7 | #ifndef _MACH_IO_PORTS_H 8 | #define _MACH_IO_PORTS_H 9 | 10 | /* i8253A PIT registers */ 11 | #define PIT_MODE 0x43 12 | #define PIT_CH0 0x40 13 | #define PIT_CH2 0x42 14 | 15 | /* i8259A PIC registers */ 16 | #define PIC_MASTER_CMD 0x20 17 | #define PIC_MASTER_IMR 0x21 18 | #define PIC_MASTER_ISR PIC_MASTER_CMD 19 | #define PIC_MASTER_POLL PIC_MASTER_ISR 20 | #define PIC_MASTER_OCW3 PIC_MASTER_ISR 21 | #define PIC_SLAVE_CMD 0xa0 22 | #define PIC_SLAVE_IMR 0xa1 23 | 24 | /* i8259A PIC related value */ 25 | #define PIC_CASCADE_IR 2 26 | #define MASTER_ICW4_DEFAULT 0x01 27 | #define SLAVE_ICW4_DEFAULT 0x01 28 | #define PIC_ICW4_AEOI 2 29 | 30 | #endif /* !_MACH_IO_PORTS_H */ 31 | -------------------------------------------------------------------------------- /tools/hotplug/Linux/systemd/xenstored.service.in: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=The Xen xenstore 3 | Requires=xenstored_ro.socket xenstored.socket proc-xen.mount var-lib-xenstored.mount 4 | After=proc-xen.mount var-lib-xenstored.mount 5 | Before=libvirtd.service libvirt-guests.service 6 | RefuseManualStop=true 7 | ConditionPathExists=/proc/xen/capabilities 8 | 9 | [Service] 10 | Type=notify 11 | KillMode=none 12 | Environment=XENSTORED_ARGS= 13 | Environment=XENSTORED=@XENSTORED@ 14 | EnvironmentFile=-@CONFIG_DIR@/@CONFIG_LEAF_DIR@/xencommons 15 | ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities 16 | ExecStartPre=-/bin/rm -f @XEN_LIB_STORED@/tdb* 17 | ExecStartPre=/bin/mkdir -p @XEN_RUN_DIR@ 18 | ExecStart=/bin/sh -c "exec $XENSTORED --no-fork $XENSTORED_ARGS" 19 | 20 | [Install] 21 | WantedBy=multi-user.target 22 | Also=xenstored_ro.socket xenstored.socket 23 | Also=proc-xen.mount 24 | Also=var-lib-xenstored.mount 25 | -------------------------------------------------------------------------------- /stubdom/vtpm-cmake-Wextra.patch: -------------------------------------------------------------------------------- 1 | --- 2 | CMakeLists.txt | 3 ++- 3 | 1 file changed, 2 insertions(+), 1 deletion(-) 4 | 5 | Index: tpm_emulator-x86_64/CMakeLists.txt 6 | =================================================================== 7 | --- tpm_emulator-x86_64.orig/CMakeLists.txt 8 | +++ tpm_emulator-x86_64/CMakeLists.txt 9 | @@ -40,10 +40,11 @@ set(TPM_STORAGE_NAME "/var/lib/tpm/tpm_e 10 | set(TPM_DEVICE_NAME "/dev/tpm") 11 | endif() 12 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) 13 | -add_definitions(-Wall -Werror -Wno-unused-parameter -Wpointer-arith -Wcast-align -Wwrite-strings) 14 | +add_definitions(-Wall -Werror) 15 | if("${CMAKE_SYSTEM}" MATCHES "Linux") 16 | add_definitions(-Wextra) 17 | endif() 18 | +add_definitions(-Wno-unused-parameter -Wpointer-arith -Wcast-align -Wwrite-strings) 19 | if(USE_OPENSSL) 20 | add_definitions(-DUSE_OPENSSL) 21 | endif() 22 | -------------------------------------------------------------------------------- /tools/blktap2/drivers/blk_netbsd.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include "tapdisk.h" 7 | #include "blk.h" 8 | 9 | int blk_getimagesize(int fd, uint64_t *size) 10 | { 11 | int rc; 12 | struct disklabel dl; 13 | 14 | *size = 0; 15 | rc = ioctl(fd, DIOCGDINFO, &dl); 16 | if (rc) { 17 | DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image"); 18 | return -EINVAL; 19 | } 20 | 21 | *size = dl.d_secsize * dl.d_secpercyl; 22 | 23 | return 0; 24 | } 25 | 26 | int blk_getsectorsize(int fd, uint64_t *sector_size) 27 | { 28 | int rc; 29 | struct disklabel dl; 30 | 31 | *sector_size = DEV_BSIZE; 32 | rc = ioctl(fd, DIOCGDINFO, &dl); 33 | if (rc) { 34 | DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image"); 35 | return 0; /* fallback to DEV_BSIZE */ 36 | } 37 | 38 | *sector_size = dl.d_secsize; 39 | return 0; 40 | } 41 | 42 | -------------------------------------------------------------------------------- /xen/arch/arm/arm32/domctl.c: -------------------------------------------------------------------------------- 1 | /****************************************************************************** 2 | * Subarch-specific domctl.c 3 | * 4 | * Copyright (c) 2013, Citrix Systems 5 | */ 6 | 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | long subarch_do_domctl(struct xen_domctl *domctl, struct domain *d, 16 | XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) 17 | { 18 | switch ( domctl->cmd ) 19 | { 20 | case XEN_DOMCTL_set_address_size: 21 | return domctl->u.address_size.size == 32 ? 0 : -EINVAL; 22 | default: 23 | return -ENOSYS; 24 | } 25 | } 26 | 27 | /* 28 | * Local variables: 29 | * mode: C 30 | * c-file-style: "BSD" 31 | * c-basic-offset: 4 32 | * tab-width: 4 33 | * indent-tabs-mode: nil 34 | * End: 35 | */ 36 | --------------------------------------------------------------------------------