mirror of
https://github.com/justinian/jsix.git
synced 2025-12-10 00:14:32 -08:00
Fix KVM page faults from lack of 1GB page support
This commit is contained in:
4
qemu.sh
4
qemu.sh
@@ -6,6 +6,7 @@ debug=""
|
|||||||
flash_name="ovmf_vars"
|
flash_name="ovmf_vars"
|
||||||
gfx="-nographic"
|
gfx="-nographic"
|
||||||
kvm=""
|
kvm=""
|
||||||
|
cpu="Broadwell,+pdpe1gb"
|
||||||
|
|
||||||
for arg in $@; do
|
for arg in $@; do
|
||||||
case "${arg}" in
|
case "${arg}" in
|
||||||
@@ -18,6 +19,7 @@ for arg in $@; do
|
|||||||
;;
|
;;
|
||||||
--kvm)
|
--kvm)
|
||||||
kvm="-enable-kvm"
|
kvm="-enable-kvm"
|
||||||
|
cpu="host"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
build="${arg}"
|
build="${arg}"
|
||||||
@@ -56,7 +58,7 @@ exec qemu-system-x86_64 \
|
|||||||
-m 512 \
|
-m 512 \
|
||||||
-d mmu,int,guest_errors \
|
-d mmu,int,guest_errors \
|
||||||
-D jsix.log \
|
-D jsix.log \
|
||||||
-cpu Broadwell \
|
-cpu "${cpu}" \
|
||||||
-M q35 \
|
-M q35 \
|
||||||
-no-reboot \
|
-no-reboot \
|
||||||
$gfx $kvm $debug
|
$gfx $kvm $debug
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ apic::apic(uint32_t *base) :
|
|||||||
lapic::lapic(uint32_t *base, isr spurious) :
|
lapic::lapic(uint32_t *base, isr spurious) :
|
||||||
apic(base)
|
apic(base)
|
||||||
{
|
{
|
||||||
// TODO: This causes a "reserved" page fault under KVM
|
|
||||||
apic_write(m_base, 0xf0, static_cast<uint32_t>(spurious));
|
apic_write(m_base, 0xf0, static_cast<uint32_t>(spurious));
|
||||||
log::info(logs::apic, "LAPIC created, base %lx", m_base);
|
log::info(logs::apic, "LAPIC created, base %lx", m_base);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user