All,

After turning HugePage off, I can successfully build the tutorial solution
and boot into the virtual machine from outside the Docker instance.
However, just before being prompted to log in, the following errors appear:

Failed to locate device consumes_event
Failed to locate device emits_event

and when I try to `grep poke /proc/devices` as directed in the tutorial,
there is no output, so I don't think the kernel module is working. I
recognize the "consume" and "emit" keywords, but I'm confused because there
are no such references in the .camkes file. I mainly want to ensure I have
a functioning kernel module to work with, so I would appreciate any
guidance you can provide.

I've tried to collect all my steps so far here:
https://github.com/NeisesResearch/vm_measure/wiki/Building-the-camkes_vm_linux-Tutorial-on-Debian-10

Cheers,
Michael

On Sun, Jul 4, 2021 at 7:54 PM Kent Mcleod <kent.mcleo...@gmail.com> wrote:

> You can turn kernel huge page support off with the config option:
> KernelHugePage.  `cmake -DKernelHugePage=OFF .` in the build directory
> and then rebuilding should turn it off.
>
>
> On Mon, Jul 5, 2021 at 10:00 AM Michael Neises <neisesmich...@gmail.com>
> wrote:
> >
> > All,
> >
> > I tried to run ./simulate outside of the Docker instance as recommended.
> While that seems to solve the KVM issue, another error has taken its place.
> >
> > "host doesn't support requested feature: CPUID.80000001H:EDX.pdpe1g"
> >
> > If I remove the flag, the simulation will begin, but it soon dies
> because "Huge page not supported by the processor." None of my machines
> (even my newest CPU which was launched in 2019) support huge pages. Am I
> out of luck?
> >
> > Cheers,
> > Michael Neises
> >
> > On Tue, Jun 29, 2021 at 11:36 PM Hugo V.C. <skydive...@gmail.com> wrote:
> >>
> >> Hi all,
> >>
> >> Michael, I ran into very similar problems as you (almost same order:
> VT-x, support, nested emulation,etc... ) that's why, desperated, I ended up
> working via qemu/arm option but my original intention (and still I'm
> interested) was to work with qemu/PC99. The option you are looking for
> (running qemu inside docker container) looks interesting to me from
> developers point of view (portable dev environment). I would appreciate if
> you share any details of your progress here as maybe would be interesting
> to write up a specific intructions for this so in the future others can
> benefit.
> >>
> >> Cheers,
> >>
> >> El mié., 30 jun. 2021 5:23, Michael Neises <neisesmich...@gmail.com>
> escribió:
> >>>
> >>> Peter and Kent,
> >>>
> >>> I did `sudo apt-get install qemu-kvm` and I got an update.
> >>> I can reboot and do `groups` to verify I'm in the correct group.
> >>> By this webpage I have that my CPU supports vt-x:
> >>>
> https://ark.intel.com/content/www/us/en/ark/products/72164/intel-core-i5-3230m-processor-3m-cache-up-to-3-20-ghz-rpga.html
> >>> When I run `cat /sys/module/kvm_intel/parameters/nested` it outputs
> 'Y'.
> >>>
> >>> All said, when I enter the Docker container and do:
> >>> sudo ./simulate --machine q35,accel=kvm,kernel-irqchip=split
> --mem-size 2G
> >>> --extra-cpu-opts "+vmx" --extra-qemu-args="-enable-kvm -device
> >>> intel-iommu,intremap=off -net nic,model=e1000 -net
> >>> tap,script=no,ifname=tap0"
> >>>
> >>> (or even just ./simulate with the -enable-kvm option added)
> >>>
> >>> I still get this error:
> >>>
> >>> Could not access KVM kernel module: No such file or directory
> >>>
> >>> qemu-system-x86_64: failed to initialize KVM: No such file or directory
> >>>
> >>>
> >>> By all rights it seems like I have KVM and it's loaded and I have the
> right
> >>> permissions. However, if I do `groups` from within the Docker
> instance, I
> >>> am not part of the kvm group, and in fact there is apparently no
> visible
> >>> kvm group by way of `cat /etc/group | grep kvm`- nor is there a
> /dev/kvm to
> >>> speak of. If it's a problem with using Docker, I can try to install the
> >>> dependencies natively, but I've been there before and it's difficult to
> >>> maintain.
> >>>
> >>>
> >>> If need be, I can also go back to booting the image on its own
> machine, but
> >>> I have really enjoyed the turnover times that simulation allows.
> >>>
> >>>
> >>> Cheers,
> >>>
> >>> Michael Neises
> >>>
> >>> On Tue, Jun 29, 2021 at 9:18 PM Kent Mcleod <kent.mcleo...@gmail.com>
> wrote:
> >>>
> >>> > On Wed, Jun 30, 2021 at 11:53 AM Michael Neises <
> neisesmich...@gmail.com>
> >>> > wrote:
> >>> > >
> >>> > > Kent,
> >>> > >
> >>> > >
> >>> > >
> >>> > > I tried using those extra arguments and got the same error
> regarding kvm
> >>> > I reported a few minutes ago:
> >>> > >
> >>> > >
> >>> > >
> >>> > > ./simulate: qemu-system-x86_64 -machine
> >>> > q35,accel=kvm,kernel-irqchip=split -cpu
> >>> >
> Nehalem,+vme,+pdpe1gb,-xsave,-xsaveopt,-xsavec,-fsgsbase,-invpcid,+syscall,+lm,enforce,+vmx
> >>> > -nographic -serial mon:stdio -m size=2G -enable-kvm -device
> >>> > intel-iommu,intremap=off -net nic,model=e1000 -net
> >>> > tap,script=no,ifname=tap0 -kernel images/kernel-x86_64-pc99 -initrd
> >>> > images/capdl-loader-image-x86_64-pc99 Could not access KVM kernel
> module:
> >>> > No such file or directory
> >>> > >
> >>> > > qemu-system-x86_64: failed to initialize KVM: No such file or
> directory
> >>> > >
> >>> >
> >>> > There are instructions on how to setup KVM and nested virtualization
> >>> > on the tutorial that I've pasted here:
> >>> > "Note if you are using QEMU it is important to ensure that your host
> >>> > machine has VT-x support and KVM
> >>> > (https://www.linux-kvm.org/page/Main_Page) installed. You also need
> to
> >>> > ensure you have enabled nested virtulisation with KVM guests as
> >>> > described here (https://www.linux-kvm.org/page/Nested_Guests)."
> >>> >
> >>> > A quick way to check if nested virtualization is enabled (and
> >>> > therefore supported) on your host is to run `cat
> >>> > /sys/module/kvm_intel/parameters/nested`.  `Y` should be returned if
> >>> > it's enabled.
> >>> >
> >>> > It may be easier to run the image on an actual machine instead of in
> >>> > qemu. The images produced can be loaded by a multiboot loader such as
> >>> > grub or pxelinux.
> >>> > (
> https://docs.sel4.systems/Hardware/VMware/#add-grub2-option-to-run-sel4)
> >>> > has an example grub config.
> >>> >
> >>> _______________________________________________
> >>> Devel mailing list -- devel@sel4.systems
> >>> To unsubscribe send an email to devel-leave@sel4.systems
>
_______________________________________________
Devel mailing list -- devel@sel4.systems
To unsubscribe send an email to devel-leave@sel4.systems

Reply via email to