Hello Guys,
I am experimenting with NOVA Microkernel and trying to run some code
in guest mode.
I am attaching test program which usage NOVA syscall binding interface
to create test program. Objective of this test program to run cpuid
and outb instruction in
guest mode on intel machine. Here, I am launching intel vcpu in real
mode paging disable with all necessary register setup properly in vcpu
startup portal handler.
Once you download this code, run make and modify run.sh to point NOVA
hypervisor.
I want to discuss two problem.
Problem -1:
This test program runs (guest mode code) cpuid instruction but outb/inb
instruction never runs in guest mode. I see that for outb instruction
gives IO portal invoked again and again. First, I
delegate IO ports from Kernel in root pd. My vcpu execution context
is created in root pd. I believe that IO ports should be accessible
from guest mode after delegating IO ports from kernel to guest.
Secondly, same code for AMD runs if I set proper AMD vcpu registers in
startup handler.
Problem -2
As Intel process supports unrestricted guest mode; Advantage of that,
I can run real mode instruction in vCPU context with paging disable
without doing any instruction interpretations.
I set Unrestricted guest mode control bit in VMCS control registers,
though intel vCPU never runs guest in unrestricted mode. But When I
experiments this with KVM it works.
My question is, does NOVA kernel supports to run intel cpu in
unrestricted guest mode? or is there any trick to do that so. Please
help me if I am missing something.
Any help regarding these two issues would be very helpful.
Regards
Avinash Singh