<div dir="ltr">So. ok. If I understood correctly : In my system the 
file kvm.h is missing. I should install the kernel headers file if I 
want it. I could do this if the kernel in use was 6.1,but I'm forced to 
use 5.4. I can't install the kernel headers for the kernel 5.4 on top of
 debian bookworm. Or at least,at the moment I don't know how to do this.
 I'm not sure that the kernel headers for the 5.4 kernel are present 
between the packages. Or maybe I can build it from scratch or I can find
 it somewhere ? Even in this case, I'm not sure that they will work on a
 system that has been compiled on top of a 6.x kernel.
I think that I should re-compile libvirt and QEMU on top of the 5.4 
kernel and for this reason I should use an older version of Debian,maybe
 8 or 9. Maybe later,I can upgrade the userland from 8/9 to 12,keeping 
intact the same kernel. What do you think ? Do you see a shorter 
solution ? for sure I don't like to reinstall and recompile everything 
on an older version of Linux.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 30, 2023 at 11:19 AM Mario Marietto <<a href="mailto:marietto2008@gmail.com">marietto2008@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><font size="4"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">ok. I've copied this file :</span></span></font></div><div><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></span></div><div><font size="4"><span style="font-family:monospace">/home/marietto/Desktop/Dati/virt/qemu-v5.1.0/linux-headers/linux/kvm.h </span></font></div><div><font size="4"><span style="font-family:monospace"><br></span></font></div><div><font size="4"><span style="font-family:monospace">to this directory :</span></font></div><div><font size="4"><span style="font-family:monospace"></span><br></font></div><div><font size="4">/usr/include/linux</font></div><div><font size="4"><span style="font-family:monospace"><br></span></font></div><div><font size="4"><span style="font-family:monospace">the previous error is gone,but it still doesn't work :</span></font></div><div><font size="4"><span style="font-family:monospace"><br></span></font></div><div><font size="4"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"># virsh domcapabilities --machine virt --emulatorbin /usr/local/bin/qemu-system-arm
</span></span></font></div><div><font size="4"><span style="font-family:monospace"></span></font></div><font size="4"><span style="font-family:monospace">error: failed to get emulator capabilities
<br></span></font><div><font size="4"><span style="font-family:monospace">error: KVM is not supported on this platform: Function not implemented</span></font></div><br><div><br></div><div><font size="4">this time there isn't any specific error :(</font><br></div><div><font size="4"><span style="font-family:monospace"></span></font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 30, 2023 at 11:11 AM Mario Marietto <<a href="mailto:marietto2008@gmail.com" target="_blank">marietto2008@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><font size="4"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">Ok. thanks. Yes,I'm obliged to use a kernel minor than 5.7 and I've chosen 5.4. These are the places where I've found the kvm.h file that I need. <br></span></span></font></div><div><font size="4"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)"><br></span></span></font></div><div><font size="4"><span style="font-family:monospace"><span style="color:rgb(0,0,0);background-color:rgb(255,255,255)">/home/marietto/Desktop/Dati/virt/qemu-v5.1.0/include/sysemu/kvm.h
</span></span></font></div><div><font size="4"><span style="font-family:monospace"></span></font></div><font size="4"><span style="font-family:monospace">/home/marietto/Desktop/Dati/virt/qemu-v5.1.0/linux-headers/asm-arm/kvm.h
<br></span></font><div><font size="4"><span style="font-family:monospace">/home/marietto/Desktop/Dati/virt/qemu-v5.1.0/linux-headers/linux/kvm.h
</span></font></div><font size="4"><br></font><div><font size="4"><span style="font-family:monospace"></span></font></div><font size="4"><span style="font-family:monospace">/home/marietto/Desktop/Dati/200/Si/linux-5.4.244/tools/include/uapi/linux/kvm.h
<br>/home/marietto/Desktop/Dati/200/Si/linux-5.4.244/tools/arch/arm/include/uapi/asm/kvm.h
<br>/home/marietto/Desktop/Dati/200/Si/linux-5.4.244/include/uapi/linux/kvm.h
<br>/home/marietto/Desktop/Dati/200/Si/linux-5.4.244/include/config/kvm.h
<br>/home/marietto/Desktop/Dati/200/Si/linux-5.4.244/include/trace/events/kvm.h
<br>/home/marietto/Desktop/Dati/200/Si/linux-5.4.244/arch/arm/include/uapi/asm/kvm.h
<br><br></span></font></div><div><font size="4"><span style="font-family:monospace">Basically it seems that I can get it from the qemu 5.1 or from the kernel 5.4 source code files. Can you tell me what's the correct one ? You talked about linux-headers,so it might be this : <br></span></font></div><div><font size="4"><span style="font-family:monospace"><br></span></font></div><div><div><font size="4"><span style="font-family:monospace">/home/marietto/Desktop/Dati/virt/qemu-v5.1.0/linux-headers/linux/kvm.h <br></span></font></div><div><font size="4"><span style="font-family:monospace"><br></span></font></div><div><font size="4"><span style="font-family:monospace">?</span></font></div><div><font size="4"><span style="font-family:monospace"><br></span></font></div><div><font size="4"><span style="font-family:monospace">where should I copy it ? to </span>/usr/include/linux is the right place ?<br></font></div></div><div><font size="4"><span style="font-family:monospace"><br></span></font></div><div><font size="4"><span style="font-family:monospace">thanks.<br></span></font></div><div><span style="font-family:monospace"></span></div><div><span style="font-family:monospace"><br><br></span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 30, 2023 at 9:46 AM Daniel P. Berrangé <<a href="mailto:berrange@redhat.com" target="_blank">berrange@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Aug 29, 2023 at 09:22:35PM +0200, Mario Marietto wrote:<br>
> Hello.<br>
> <br>
> I'm running Debian bookworm on my ARM Chromebook,model "xe303c12" and<br>
> I've recompiled the kernel (5.4) to enable KVM,so now my system sounds like<br>
> this :<br>
<br>
That's surely not the default kernel that comes with Debian bookworm,<br>
as that 5.4 version is many years old.<br>
<br>
IIUC the standard bookworm kernel will be 6.4<br>
<br>
> root@chromarietto:~#  virsh domcapabilities --machine virt<br>
> --emulatorbin /usr/local/bin/qemu-system-arm<br>
> <br>
> 2023-08-29 10:17:59.110+0000: 1763: error : virHostCPUGetKVMMaxVCPUs:1228 :<br>
> KVM is not supported on this platform: Function not implemented ;<br>
> error: failed to get emulator capabilities<br>
> error: KVM is not supported on this platform: Function not implemented<br>
<br>
This shows libvirt was built against a kernel that lacks the<br>
kvm.h header file.<br>
<br>
This is expected for armv7 as support for KVM on 32-bit arm was<br>
deleted in the 5.7 kernel. I expect libvirt was built against<br>
the kernel headers from Debian's default 6.4 kernel and thus<br>
lacks KVM support.<br>
<br>
Your booting of the old 5.4 kernel doesn't solve this - you<br>
would actually need to build libvirt (and QEMU) against this<br>
outdated kernel too.<br>
<br>
<br>
With regards,<br>
Daniel<br>
-- <br>
|: <a href="https://berrange.com" rel="noreferrer" target="_blank">https://berrange.com</a>      -o-    <a href="https://www.flickr.com/photos/dberrange" rel="noreferrer" target="_blank">https://www.flickr.com/photos/dberrange</a> :|<br>
|: <a href="https://libvirt.org" rel="noreferrer" target="_blank">https://libvirt.org</a>         -o-            <a href="https://fstop138.berrange.com" rel="noreferrer" target="_blank">https://fstop138.berrange.com</a> :|<br>
|: <a href="https://entangle-photo.org" rel="noreferrer" target="_blank">https://entangle-photo.org</a>    -o-    <a href="https://www.instagram.com/dberrange" rel="noreferrer" target="_blank">https://www.instagram.com/dberrange</a> :|<br>
<br>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Mario.<br></div>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Mario.<br></div>
</blockquote></div><br clear="all"><br><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature">Mario.<br></div>