Skip to content

Commit 2235a54

Browse files
sanjaylcaralfbaechle
authored andcommitted
KVM/MIPS32: Infrastructure/build files.
- Add the KVM option to MIPS build files. - Add default config files for KVM host/guest kernels. - Change the link address for the Malta KVM Guest kernel to UM (0x40100000). - Add KVM Kconfig file with KVM/MIPS specific options Signed-off-by: Sanjay Lal <sanjayl@kymasys.com> Cc: kvm@vger.kernel.org Cc: linux-mips@linux-mips.org Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent fc0460d commit 2235a54

File tree

6 files changed

+985
-1
lines changed

6 files changed

+985
-1
lines changed

arch/mips/Kbuild

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,7 @@ obj- := $(platform-)
1717
obj-y += kernel/
1818
obj-y += mm/
1919
obj-y += math-emu/
20+
21+
ifdef CONFIG_KVM
22+
obj-y += kvm/
23+
endif

arch/mips/Kconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,7 @@ config CPU_MIPS32_R2
12421242
select CPU_HAS_PREFETCH
12431243
select CPU_SUPPORTS_32BIT_KERNEL
12441244
select CPU_SUPPORTS_HIGHMEM
1245+
select HAVE_KVM
12451246
help
12461247
Choose this option to build a kernel for release 2 or later of the
12471248
MIPS32 architecture. Most modern embedded systems with a 32-bit
@@ -1743,6 +1744,20 @@ config 64BIT
17431744

17441745
endchoice
17451746

1747+
config KVM_GUEST
1748+
bool "KVM Guest Kernel"
1749+
help
1750+
Select this option if building a guest kernel for KVM (Trap & Emulate) mode
1751+
1752+
config KVM_HOST_FREQ
1753+
int "KVM Host Processor Frequency (MHz)"
1754+
depends on KVM_GUEST
1755+
default 500
1756+
help
1757+
Select this option if building a guest kernel for KVM to skip
1758+
RTC emulation when determining guest CPU Frequency. Instead, the guest
1759+
processor frequency is automatically derived from the host frequency.
1760+
17461761
choice
17471762
prompt "Kernel page size"
17481763
default PAGE_SIZE_4KB
@@ -2023,6 +2038,7 @@ config SB1_PASS_2_1_WORKAROUNDS
20232038
depends on CPU_SB1 && CPU_SB1_PASS_2
20242039
default y
20252040

2041+
20262042
config 64BIT_PHYS_ADDR
20272043
bool
20282044

@@ -2556,3 +2572,5 @@ source "security/Kconfig"
25562572
source "crypto/Kconfig"
25572573

25582574
source "lib/Kconfig"
2575+
2576+
source "arch/mips/kvm/Kconfig"

0 commit comments

Comments
 (0)