linuxyne wrote:I downloaded the 'initial' branch. I was able to build the hypervisor, although I could not get it to work using grub-mkrescue iso cdrom. Grub does load the hypervisor, but it remains stuck somewhere in or after the 'init' function of the hypervisor. The display remains blank.
What steps should one perform to build a working qemu image?
To make it work quickly, I suggest you also download the userland code (Genode)
here because Nova is part of a bigger project (Genode OS framework).
You may follow the instructions on the
project site, or follow this summary I provide here for the circumstance.
Clone the project into genode directory.
Code: Select all
git clone github.com/genodelabs/genode.git
This folder will be the home directory for the project.
download the latest toolchain and uncompress it to the right location (/usr/local/genode-gcc)
https://sourceforge.net/projects/genode ... ain/17.05/
Code: Select all
sudo tar xPf genode-toolchain-<version>-<arch>.tar.xz
Create the build directory (in this case, for 64 bit binary)
Code: Select all
cd genode
./tool/create_builddir x86_64
Ajust the build config according to your purpose: Open the file build/x86_64/etc/build.conf and Uncomment lines 78 (libports) 86 (ports) 96 (dde_rump) 103 (gems) 112 (world) 117 (dde_bsd) 122 (dde_ipxe)
Prepare kernel source (and other libs) ports:
Code: Select all
./tool/ports/prepare_port x86emu nova grub2
This should create 3 folders in genode/contrib, one for each source code we import
The Nova code does not contain the Performance Monitoring Interrupt (PMI) code to test PMI. So
Replace the content of genode/contrib/nova-*/src/kernel/nova/ with the Nova code you pulled from
my repo (or addapt it to your convenience to test PMI. The objective is to program another PMI each time we have one.
Nova is the kernel.
The file genode/repos/base/src/lib/startup/spec/x86_64/crt0.s contains the first instruction executed in user land. (Ring 3). Add
at line 41 to loop forever just after sysretq from the kernel.
Build the demo scenario. It is just a simple scenario to show some features of Genode.
Code: Select all
cd build/x86_64/
make run/demo KERNEL=nova
If all go well, this should produce a working qemu image in genode/build/x86_64/var/run/demo.iso
Now you may test it with
Code: Select all
qemu-system-x86_64 -enable-kvm -cpu host -m 5120 -net nic,model=e1000 -net user -serial mon:stdio -d int,guest_errors,unimp,pcall,cpu_reset -cdrom var/run/demo.iso
I hope i didn't forget anything. That should work.
If you have any trouble, I 'll be glad to answer
linuxyne wrote:
I take it that in your tests, the kvm traces show a single NMI being raised, despite your attempts to reprogram. Is that correct?
Correct!
Thank you for your help!