Commit Graph
5 Commits
Author SHA1 Message Date
Pekka Enberg 7fb218bdd0 kvm: Load bzImage real-mode boot sector and setup code
We start KVM in 16-bit mode so we should set cs:ip to point to the real-mode
boot sector and setup code, not the protected mode kernel that starts at 1M.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2015-06-01 16:39:38 +01:00
Pekka Enberg 5360207747 Setup segmentation for the guest
This patch adds segmentation setup for the guest. It's not perfect yet as we
get KVM_EXIT_UNKNOWN but it's a start nevertheless.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2015-06-01 16:39:38 +01:00
Pekka Enberg ae1fae34a8 Separate KVM code from the main loop
This patch separates the KVM code in its own file and cleans everything up a
bit while at it.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2015-06-01 16:39:38 +01:00
Pekka Enberg b6e5a081c5 Move CPU emulation code to cpu.c
The kvm.c file is getting bigger so move CPU emulation code to a separate file.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2015-06-01 16:39:38 +01:00
Pekka Enberg b8f6afcd5e Initial commit
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
2015-06-01 16:39:38 +01:00