From: Yousong Zhou Date: Wed, 23 Nov 2016 16:03:41 +0000 (+0800) Subject: target: sunxi: enable kvm support X-Git-Tag: v17.01.0-rc1~736 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=468735c3a2f75f4ae6592608c789d8753f418a84;p=openwrt%2Fstaging%2Fpepe2k.git target: sunxi: enable kvm support Unlike x86, kvm for arm has to be built into the kernel. The kernel config was prepared with the following command make kernel_menuconfig CONFIG_TARGET=platform Then enable ARM_LPAE, VIRTUALIZATION, KVM in that order Other config changes are done by the build system. The following text tries to explain some of them, for archive purposes probably... - BUILD_BIN2C. It was dropped probably because the prompt is empty and no other config option selects it. bin2c is a host executable for converting binary content to a piece of c code for inclusion - CRYPTO_DEV_SUN4I_SS. It was dropped because the dependency CRYPTO_HW was not enabled. Setting that aside, packaging it as a loadbable module in lieu of other sunxi specific modules seems more appropriate - PGTABLE_LEVELS. It was changed from 2 to 3 because 3 is the default when ARM_LPAE is enabled - HAVE_KERNEL_GZIP, etc.. These are enabled in generic config - SCHED_INFO, ZLIB_INFLATE. These were dropped probably for the same reason as for BUILD_BIN2C Signed-off-by: Yousong Zhou --- diff --git a/target/linux/sunxi/config-4.4 b/target/linux/sunxi/config-4.4 index b05446c6d2..b0a651a689 100644 --- a/target/linux/sunxi/config-4.4 +++ b/target/linux/sunxi/config-4.4 @@ -2,6 +2,7 @@ CONFIG_ADVISE_SYSCALLS=y # CONFIG_AHCI_SUNXI is not set CONFIG_ALIGNMENT_TRAP=y # CONFIG_APM_EMULATION is not set +# CONFIG_ARCH_AXXIA is not set CONFIG_ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE=y CONFIG_ARCH_HAS_ELF_RANDOMIZE=y CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y @@ -9,18 +10,21 @@ CONFIG_ARCH_HAS_RESET_CONTROLLER=y CONFIG_ARCH_HAS_SG_CHAIN=y CONFIG_ARCH_HAS_TICK_BROADCAST=y CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_ARCH_MULTIPLATFORM=y # CONFIG_ARCH_MULTI_CPU_AUTO is not set CONFIG_ARCH_MULTI_V6_V7=y CONFIG_ARCH_MULTI_V7=y CONFIG_ARCH_NR_GPIO=416 +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y CONFIG_ARCH_REQUIRE_GPIOLIB=y # CONFIG_ARCH_SELECT_MEMORY_MODEL is not set # CONFIG_ARCH_SPARSEMEM_DEFAULT is not set CONFIG_ARCH_SUNXI=y CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y CONFIG_ARCH_SUPPORTS_UPROBES=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y CONFIG_ARCH_WANT_GENERAL_HUGETLB=y @@ -40,7 +44,7 @@ CONFIG_ARM_HAS_SG_CHAIN=y CONFIG_ARM_HEAVY_MB=y CONFIG_ARM_L1_CACHE_SHIFT=6 CONFIG_ARM_L1_CACHE_SHIFT_6=y -# CONFIG_ARM_LPAE is not set +CONFIG_ARM_LPAE=y CONFIG_ARM_PATCH_PHYS_VIRT=y CONFIG_ARM_PMU=y CONFIG_ARM_PSCI=y @@ -57,18 +61,12 @@ CONFIG_AUDIT=y CONFIG_AUDIT_GENERIC=y CONFIG_AUTO_ZRELADDR=y CONFIG_AXP20X_POWER=y -CONFIG_SWCONFIG_B53=y -# CONFIG_SWCONFIG_B53_MMAP_DRIVER is not set -CONFIG_SWCONFIG_B53_PHY_DRIVER=y -CONFIG_SWCONFIG_B53_PHY_FIXUP=y -# CONFIG_SWCONFIG_B53_SRAB_DRIVER is not set CONFIG_BACKLIGHT_CLASS_DEVICE=y CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_BACKLIGHT_PWM=y CONFIG_BINFMT_MISC=y CONFIG_BOUNCE=y # CONFIG_BPF_SYSCALL is not set -CONFIG_BUILD_BIN2C=y CONFIG_CACHE_L2X0=y CONFIG_CAN=y CONFIG_CLKDEV_LOOKUP=y @@ -114,7 +112,6 @@ CONFIG_CRC16=y CONFIG_CRC_T10DIF=y CONFIG_CRYPTO_CRC32C=y CONFIG_CRYPTO_CRCT10DIF=y -CONFIG_CRYPTO_DEV_SUN4I_SS=y CONFIG_CRYPTO_HASH=y CONFIG_CRYPTO_HASH2=y CONFIG_CRYPTO_RNG2=y @@ -205,6 +202,7 @@ CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_PFN_VALID=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y CONFIG_HAVE_ARM_ARCH_TIMER=y # CONFIG_HAVE_BOOTMEM_INFO_NODE is not set CONFIG_HAVE_BPF_JIT=y @@ -223,13 +221,13 @@ CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y CONFIG_HAVE_FUNCTION_TRACER=y CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_HAVE_GENERIC_RCU_GUP=y CONFIG_HAVE_HW_BREAKPOINT=y CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y -CONFIG_HAVE_KERNEL_GZIP=y -CONFIG_HAVE_KERNEL_LZ4=y -CONFIG_HAVE_KERNEL_LZMA=y -CONFIG_HAVE_KERNEL_LZO=y -CONFIG_HAVE_KERNEL_XZ=y +CONFIG_HAVE_KVM_ARCH_TLB_FLUSH_ALL=y +CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT=y +CONFIG_HAVE_KVM_EVENTFD=y +CONFIG_HAVE_KVM_IRQFD=y CONFIG_HAVE_MEMBLOCK=y CONFIG_HAVE_MOD_ARCH_SPECIFIC=y CONFIG_HAVE_NET_DSA=y @@ -239,6 +237,7 @@ CONFIG_HAVE_PERF_EVENTS=y CONFIG_HAVE_PERF_REGS=y CONFIG_HAVE_PERF_USER_STACK_DUMP=y CONFIG_HAVE_PROC_CPU=y +CONFIG_HAVE_RCU_TABLE_FREE=y CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y CONFIG_HAVE_SMP=y CONFIG_HAVE_SYSCALL_TRACEPOINTS=y @@ -247,6 +246,7 @@ CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y CONFIG_HIGHMEM=y CONFIG_HIGHPTE=y CONFIG_HOTPLUG_CPU=y +# CONFIG_HUGETLBFS is not set CONFIG_HWMON=y CONFIG_HW_CONSOLE=y CONFIG_HW_RANDOM=y @@ -280,6 +280,11 @@ CONFIG_KALLSYMS=y # CONFIG_KERNEL_MODE_NEON is not set CONFIG_KEYBOARD_SUN4I_LRADC=y CONFIG_KSM=y +CONFIG_KVM=y +CONFIG_KVM_ARM_HOST=y +CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y +CONFIG_KVM_MMIO=y +CONFIG_KVM_VFIO=y CONFIG_LCD_CLASS_DEVICE=y CONFIG_LCD_PLATFORM=y CONFIG_LEDS_GPIO=y @@ -314,6 +319,7 @@ CONFIG_MMC=y CONFIG_MMC_BLOCK=y # CONFIG_MMC_BLOCK_BOUNCE is not set CONFIG_MMC_SUNXI=y +CONFIG_MMU_NOTIFIER=y CONFIG_MODULES_TREE_LOOKUP=y CONFIG_MODULES_USE_ELF_REL=y # CONFIG_MTD is not set @@ -352,12 +358,26 @@ CONFIG_PAGE_OFFSET=0xC0000000 # CONFIG_PCI_SYSCALL is not set CONFIG_PERF_EVENTS=y CONFIG_PERF_USE_VMALLOC=y -CONFIG_PGTABLE_LEVELS=2 +CONFIG_PGTABLE_LEVELS=3 CONFIG_PHYLIB=y +CONFIG_PHYS_ADDR_T_64BIT=y CONFIG_PHY_SUN4I_USB=y CONFIG_PHY_SUN9I_USB=y CONFIG_PINCTRL=y # CONFIG_PINCTRL_SINGLE is not set +CONFIG_PINCTRL_SUN4I_A10=y +CONFIG_PINCTRL_SUN5I_A10S=y +CONFIG_PINCTRL_SUN5I_A13=y +CONFIG_PINCTRL_SUN6I_A31=y +CONFIG_PINCTRL_SUN6I_A31S=y +CONFIG_PINCTRL_SUN6I_A31_R=y +CONFIG_PINCTRL_SUN7I_A20=y +CONFIG_PINCTRL_SUN8I_A23=y +CONFIG_PINCTRL_SUN8I_A23_R=y +CONFIG_PINCTRL_SUN8I_A33=y +CONFIG_PINCTRL_SUN8I_A83T=y +CONFIG_PINCTRL_SUN8I_H3=y +CONFIG_PINCTRL_SUN9I_A80=y CONFIG_PINCTRL_SUNXI_COMMON=y # CONFIG_PL310_ERRATA_588369 is not set # CONFIG_PL310_ERRATA_727915 is not set @@ -375,6 +395,7 @@ CONFIG_PPS=y CONFIG_PREEMPT=y CONFIG_PREEMPT_COUNT=y # CONFIG_PREEMPT_NONE is not set +CONFIG_PREEMPT_NOTIFIERS=y CONFIG_PREEMPT_RCU=y CONFIG_PRINTK_TIME=y CONFIG_PROC_EVENTS=y @@ -397,13 +418,15 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_REGULATOR_GPIO=y CONFIG_RELAY=y CONFIG_RESET_CONTROLLER=y +CONFIG_RFS_ACCEL=y +CONFIG_RPS=y CONFIG_RTC_CLASS=y # CONFIG_RTC_DRV_SUNXI is not set CONFIG_RWSEM_SPIN_ON_OWNER=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_SATA_PMP=y CONFIG_SCHED_HRTICK=y -CONFIG_SCHED_INFO=y +# CONFIG_SCHED_INFO is not set CONFIG_SCSI=y CONFIG_SDIO_UART=y CONFIG_SECURITYFS=y @@ -444,10 +467,16 @@ CONFIG_SUNXI_WATCHDOG=y CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y CONFIG_SWCONFIG=y +CONFIG_SWCONFIG_B53=y +# CONFIG_SWCONFIG_B53_MMAP_DRIVER is not set +CONFIG_SWCONFIG_B53_PHY_DRIVER=y +CONFIG_SWCONFIG_B53_PHY_FIXUP=y +# CONFIG_SWCONFIG_B53_SRAB_DRIVER is not set CONFIG_SWIOTLB=y CONFIG_SWP_EMULATE=y CONFIG_SYSFS_SYSCALL=y CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_SYS_SUPPORTS_HUGETLBFS=y CONFIG_THERMAL=y CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y CONFIG_THERMAL_GOV_STEP_WISE=y @@ -459,6 +488,7 @@ CONFIG_TMPFS_POSIX_ACL=y CONFIG_TOUCHSCREEN_PROPERTIES=y CONFIG_TOUCHSCREEN_SUN4I=y CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h" +CONFIG_UNINLINE_SPIN_UNLOCK=y CONFIG_USB=y CONFIG_USB_ANNOUNCE_NEW_DEVICES=y # CONFIG_USB_AUDIO is not set @@ -481,6 +511,9 @@ CONFIG_VDSO=y CONFIG_VECTORS_BASE=0xffff0000 CONFIG_VFP=y CONFIG_VFPv3=y +# CONFIG_VHOST_CROSS_ENDIAN_LEGACY is not set +# CONFIG_VHOST_NET is not set +CONFIG_VIRTUALIZATION=y CONFIG_VM_EVENT_COUNTERS=y CONFIG_VT=y CONFIG_VT_CONSOLE=y @@ -493,5 +526,4 @@ CONFIG_XZ_DEC_ARM=y CONFIG_XZ_DEC_BCJ=y CONFIG_ZBOOT_ROM_BSS=0 CONFIG_ZBOOT_ROM_TEXT=0 -CONFIG_ZLIB_INFLATE=y CONFIG_ZONE_DMA_FLAG=0