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

Fail to run kvm-host with Linux in version 6.1.91 #35

Closed
RinHizakura opened this issue Jul 10, 2024 · 6 comments
Closed

Fail to run kvm-host with Linux in version 6.1.91 #35

RinHizakura opened this issue Jul 10, 2024 · 6 comments

Comments

@RinHizakura
Copy link
Collaborator

RinHizakura commented Jul 10, 2024

In 0f31f1b, the kernel bumped to 6.1.91. I am not able to see any message in this version.

$ make check
Once the message 'Kernel panic' appears, press Ctrl-C to exit

Everything goes fine if I use the 6.1.35 kernel, so I believe this is not an issue that fully relates to my host PC.

I'm wondering if only I face the issue. Note that if we already built the kernel with make check before, we have to manually remove the build/bzImage to force make check using the latest version of the kernel. Or we can clone a clean repo and build again. This could be another thing we have to fix.

@RinHizakura RinHizakura changed the title Fail to run linux in version 6.1.91 Fail to run kvm-host with Linux in version 6.1.91 Jul 10, 2024
@RinHizakura
Copy link
Collaborator Author

RinHizakura commented Jul 10, 2024

Some information of my environment.

$ uname -r
6.5.0-35-generic

$ lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         46 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  32
  On-line CPU(s) list:   0-31
Vendor ID:               GenuineIntel
  Model name:            13th Gen Intel(R) Core(TM) i9-13900K
    CPU family:          6
    Model:               183
    Thread(s) per core:  2
    Core(s) per socket:  24
    Socket(s):           1
    Stepping:            1
    CPU max MHz:         5800.0000
    CPU min MHz:         800.0000
    BogoMIPS:            5990.40
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht
                         tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cp
                         uid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm s
                         se4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fau
                         lt epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 s
                         mep bmi2 erms invpcid rdseed adx smap clflushopt clwb intel_pt sha_ni xsaveopt xsavec xgetbv1 xsaves split_lock_d
                         etect avx_vnni dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp hwp_pkg_req hfi vnmi umip pku ospke
                         waitpkg gfni vaes vpclmulqdq tme rdpid movdiri movdir64b fsrm md_clear serialize pconfig arch_lbr ibt flush_l1d a
                         rch_capabilities
Virtualization features:
  Virtualization:        VT-x
Caches (sum of all):
  L1d:                   896 KiB (24 instances)
  L1i:                   1.3 MiB (24 instances)
  L2:                    32 MiB (12 instances)
  L3:                    36 MiB (1 instance)
NUMA:
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-31
Vulnerabilities:
  Gather data sampling:  Not affected
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Retbleed:              Not affected
  Spec rstack overflow:  Not affected
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
  Srbds:                 Not affected
  Tsx async abort:       Not affected

@jserv
Copy link
Contributor

jserv commented Jul 15, 2024

Using GDB, I found that it blocks at ioctl:

125	        int err = ioctl(v->vcpu_fd, KVM_RUN, 0);

@RinHizakura
Copy link
Collaborator Author

It seems good at v6.1.87 but fails at v6.1.88. We need to check the commits between them.

@RinHizakura
Copy link
Collaborator Author

The regression is caused by the removal of boot sector: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.88&id=f31f521ad27e3e476a58c07bf0825c4441317dba

We'll need to implement bios/bootloader for the latest kernel.

@RinHizakura
Copy link
Collaborator Author

Oh. Maybe the bios is not required. We just need to change the way we parse the PE header?

@RinHizakura
Copy link
Collaborator Author

Solved in #37

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