Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why Hyper-V doesn't work in nyx 6.8 kernel? #290

Open
bjloed opened this issue Aug 22, 2024 · 3 comments
Open

Why Hyper-V doesn't work in nyx 6.8 kernel? #290

bjloed opened this issue Aug 22, 2024 · 3 comments

Comments

@bjloed
Copy link

bjloed commented Aug 22, 2024

I understand that Hyper-V build flags have been added to the kernel since the kernel came up to 6.8
However, in the nyx kernel, modified mmu.c and mmu.h, so Hyper-V doesn't seem to work properly. (Can't build)
Is there a reason for the modification? I want to use Hyper-V in nyx 6.8 kernel :(

IntelLabs/kafl.linux@99f6245

Thanks!

@Wenzel
Copy link
Contributor

Wenzel commented Aug 23, 2024

Hi @bjloed

Could you be more specific regarding your build failure with the Nyx kernel sources ?
Which config option did you try to enable ?

Thanks !

@bjloed
Copy link
Author

bjloed commented Aug 24, 2024

Hello, @Wenzel Thanks for your response!

Here's the situation I'm currently facing: First, using the 5.12.x kernel from https://github.com/SB-GC-Labs/hAFL1, I successfully created and booted a Hyper-V VM instance within QEMU without modifying the build options much.

However, with the kAFL 0.7 kernel, which has nyx applied, after applying the same QEMU options and modifying the Vagrantfile, either the host system freezes, or Hyper-V installs within QEMU but the VM instance fails to run, showing a hardware error warning.

In the case of the 6.8 kernel, I get a "cpu->kvm_msr_buf->nmsrs" error when running QEMU, or I encounter an error saying that this kernel does not support Hyper-V.

To resolve this, I tried downloading the 6.8 kernel from kafl.linux and building it with the CONFIG_KVM_HYPERV option enabled, but due to a commit mentioned earlier, there’s a conflict with this build option.

Why is it that only the 5.12.x kernel can boot successfully? The QEMU options I applied are as follows: QEMU: -cpu Skylake-Client,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time,+intel-pt,-hypervisor,+vmx -enable-kvm

Thanks!

@bjloed
Copy link
Author

bjloed commented Sep 2, 2024

any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants