Skip to content
Snippets Groups Projects
Select Git revision
  • 4256f43f9fab91e1c17b5846a240cf4b66a768a8
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

kvm_host.h

Blame
  • kvm_host.h 30.66 KiB
    /*
     * Kernel-based Virtual Machine driver for Linux
     *
     * This header defines architecture specific interfaces, x86 version
     *
     * This work is licensed under the terms of the GNU GPL, version 2.  See
     * the COPYING file in the top-level directory.
     *
     */
    
    #ifndef _ASM_X86_KVM_HOST_H
    #define _ASM_X86_KVM_HOST_H
    
    #include <linux/types.h>
    #include <linux/mm.h>
    #include <linux/mmu_notifier.h>
    #include <linux/tracepoint.h>
    #include <linux/cpumask.h>
    #include <linux/irq_work.h>
    
    #include <linux/kvm.h>
    #include <linux/kvm_para.h>
    #include <linux/kvm_types.h>
    #include <linux/perf_event.h>
    #include <linux/pvclock_gtod.h>
    #include <linux/clocksource.h>
    
    #include <asm/pvclock-abi.h>
    #include <asm/desc.h>
    #include <asm/mtrr.h>
    #include <asm/msr-index.h>
    #include <asm/asm.h>
    
    #define KVM_MAX_VCPUS 255
    #define KVM_SOFT_MAX_VCPUS 160
    #define KVM_USER_MEM_SLOTS 125
    /* memory slots that are not exposed to userspace */
    #define KVM_PRIVATE_MEM_SLOTS 3
    #define KVM_MEM_SLOTS_NUM (KVM_USER_MEM_SLOTS + KVM_PRIVATE_MEM_SLOTS)
    
    #define KVM_MMIO_SIZE 16
    
    #define KVM_PIO_PAGE_OFFSET 1
    #define KVM_COALESCED_MMIO_PAGE_OFFSET 2
    
    #define KVM_IRQCHIP_NUM_PINS  KVM_IOAPIC_NUM_PINS
    
    #define CR0_RESERVED_BITS                                               \
    	(~(unsigned long)(X86_CR0_PE | X86_CR0_MP | X86_CR0_EM | X86_CR0_TS \
    			  | X86_CR0_ET | X86_CR0_NE | X86_CR0_WP | X86_CR0_AM \
    			  | X86_CR0_NW | X86_CR0_CD | X86_CR0_PG))
    
    #define CR3_L_MODE_RESERVED_BITS 0xFFFFFF0000000000ULL
    #define CR4_RESERVED_BITS                                               \
    	(~(unsigned long)(X86_CR4_VME | X86_CR4_PVI | X86_CR4_TSD | X86_CR4_DE\
    			  | X86_CR4_PSE | X86_CR4_PAE | X86_CR4_MCE     \
    			  | X86_CR4_PGE | X86_CR4_PCE | X86_CR4_OSFXSR | X86_CR4_PCIDE \
    			  | X86_CR4_OSXSAVE | X86_CR4_SMEP | X86_CR4_FSGSBASE \
    			  | X86_CR4_OSXMMEXCPT | X86_CR4_VMXE | X86_CR4_SMAP))
    
    #define CR8_RESERVED_BITS (~(unsigned long)X86_CR8_TPR)
    
    
    
    #define INVALID_PAGE (~(hpa_t)0)
    #define VALID_PAGE(x) ((x) != INVALID_PAGE)
    
    #define UNMAPPED_GVA (~(gpa_t)0)
    
    /* KVM Hugepage definitions for x86 */