TUD-OS / NRE

NOVA runtime environment (official branch)
GNU General Public License v2.0
33 stars 12 forks source link

Cannot run Linux on Qemu #65

Closed GToad closed 2 years ago

GToad commented 2 years ago

Sorry for help. I've followed the "Getting started" part in arch "x86_64" and finally run command "./b qemu boot/linux" However, I didn't get a console of Linux, instead I got the following output: ... [vancouve] not finished 1404034,0 inprogress 0 [vancouve] RESET device state [vancouve] reset CPU from c mtr_in effff [vancouve: 1] Killed EC:0xffffffff82040100 SC:0xffffffff820312e0 V:0xe CR0:0xffffffff82040198 CR3:0xffffffff81007911 CR4:0x0 (#PF (kernel))

Have I miss anything? Thank you for help!

GToad commented 2 years ago

And I run "./b qemu boot/mini" can get similar output: ... [vancouve] Unable to connect to vmmanager: Unable to find service 'vmmanager' (args=) [vancouve] Unable to connect to network: Unable to find service 'network' (args=0) ... [vancouve] LAPIC freq ld [vancouve] RESET device state
[vancouve] reset CPU from c mtr_in effff [vancouve: 0] Killed EC:0xffffffff820012e0 SC:0xffffffff8220ac80 V:0xe CR0:0xffffffff82001378 CR3:0xffffffff81007911 CR4:0x0 (#PF (kernel))

Nils-TUD commented 2 years ago

I can reproduce the problem. After a quick investigation, it seems that virtualization based on AMD's SVM doesn't work anymore. Maybe only in newer QEMU versions (I have QEMU 7.0.0)? The first problem is that QEMU reports 0xFFFF_FFFF as exit reason, but NOVA expects 0xFFFF_FFFF_FFFF_FFFF (on x86-64). But even when fixing that, it runs into other problems in vancouver. Not sure what's wrong there. As I don't work on NRE anymore, I don't have time to fix these issues. Sorry.

As a workaround, you can use Intel's VMX. If I for example add -cpu host -enable-kvm on my Intel machine to QEMU_FLAGS in boot/mini, it works for me.

alex-ab commented 2 years ago

@GToad: depending on what you are interested in, Genode may also be an option. It also supports Seoul/Vancouver and I had to do some fixups on the kernel as on Seoul to keep up the support with Qemu.

GToad commented 2 years ago

@Nils-TUD Thank you so much! I tried qemu 1.3.1 instead of qemu 7.0 and it worked! And I will try VMX on Qemu 7.0. @alex-ab Thank you so much! I'm trying Genode.