View previous topic :: View next topic |
Author |
Message |
Elleni Veteran

Joined: 23 May 2006 Posts: 1293
|
Posted: Wed Feb 19, 2025 9:37 am Post subject: kernelpanic auf gentoo kvm guest by cpu type kvm64 |
|
|
I have changed the cpu type to host and assigned tons of resources (ram and cpu) in order to quickly update a gentoo guest on a proxmox kvm vm. Now it only boots with cpu type host, and panics when I set other cpu type like kvm64. I already disabled the experimental useflag in gentoo-sources and recompiled the kernel with generic 86 84 in processor type and features, but this was apparently not enough. Would maybe grub too need to be recompiled to fix the kernel panic?
How can I fix this. Do I need to boot from a livecd and chroot into the system with a generic cpu type to recompile everything with generic 86 64 cpu, and/or would I need to change the CFLAGS=-march=native -O2 -pipe? Which march would be the one with the best choice, suitable for a kvm guest? |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 54884 Location: 56N 3W
|
Posted: Wed Feb 19, 2025 11:00 am Post subject: |
|
|
Elleni,
If you have set Code: | CFLAGS="-march=native ... " | then changeh the CPU type to something with more instructions, then updated, you may not change the CPU back again.
The problem will be that the build systems of the updated packages may use instruction only available on the 'better' CPU.
As make.conf is not used when building the kernel, we need the text of the panic message.
Your initrd will have been rebuilt with a kernel update. An illegal instruction exception there will bring things to a grinding halt.
To go back, boot however you like, set Code: | CFLAGS="-mtune=generic -O2 -pipe" | now to get run anywhere binaries.
After that, rebuild the initrd. The kernel itself should be OK.
Now it should be possible to downgrade the CPU type. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
Elleni Veteran

Joined: 23 May 2006 Posts: 1293
|
Posted: Wed Feb 19, 2025 2:40 pm Post subject: |
|
|
Hi Neddy, I dont have an initrd as I like to keep things as simple as possible.
I understand, so I will need to emerge -e @world with CFLAGS="-mtune=generic -O2 -pipe" instead of -march=native -O2 -pipe. If I then can boot successfully I will need to know which cpu instructions would the best supported ones as a kvm guest.
The text of the panic message is difficult to capture as I cannot scroll back, but will try to photo the part that is on screen in the end or will somehow else try to provide it if necessary - hopefully the emerge -e world with mtune generic will already fix this.
Will report back especially as I d like to configure the cpu flags the most performant way possible in this kvm vm while still maintaining some compatibility.
Code: | */* CPU_FLAGS_X86: mmx mmxext sse sse2 sse3
*/* CPU_FLAGS_X86: aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3 |
By the way the first line was the flags I had set before, where it run successfully on the kvm hypervisor even with native march. Now having setup a new hypervisor I was curious and had set the second line of cpuflags as these were the ones, that were shown by cpuid2cpuflags. Unfortunatelly I had not commented them out - in fact I only had copied them into the /etc/portage/package.use/00cpu-flags to compare them and the file wasn't meant to be saved, but obviously I did save it thus those useflags were taken into account the last time I updated the system.
I reverted them back now before recompiling world -e |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|