Bug 13374

Summary: Determine 32bit guest support on arm64
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Jon Mason <jon.mason>
Component: Scripts and ToolsAssignee: Richard Purdie <richard.purdie>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: Medium+ CC: randy.macleod, ross.burton
Version: 0.0.0   
Target Milestone: 3.3 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Jon Mason 2019-05-30 22:58:25 UTC
Determine 32bit KVM guest support on arm64, and which host CPUs this applies too.  Also, add checks in runqemu for the relevant machines (assuming it isn't all of them).
Comment 1 Jon Mason 2019-07-01 15:53:33 UTC
Via internal queries, I have been able to discover that 32bit KVM guests should function on "source systems that have AArch32 at EL1".  Unfortunately, this is not all systems, and there is no way to check CPU flags (as is currently done in runqemu) for this.  The suggested method was to:

    The best thing to do would be to use the KVM API, and try to create a
    vcpu that boots in 32bit EL1. If this fails, you know your HW is not
    suitable for this.


Also of note in the email exchange, there is no way to determine if a particular CPU has the ability to have KVM acceleration (similar to the CPU flags above on x86).

    Flags in /proc/cpuinfo are a terrible idea, and we thankfully didn't put
    anything there. The presence of /dev/kvm is all you should look for,
    really, and anything else can be discovered by nicely asking KVM (and
    QEMU has all of that built-in).

Also, "KVM cannot be compiled as a module on arm/arm64"
Comment 2 Jon Mason 2020-10-08 06:29:36 UTC
I believe this answers the question about whether we can run qemuarm on the arm64 autobuilder.  Long term this won't work, but should be fine in the short term.

If there are no other questions about this, please close.
Comment 3 Richard Purdie 2021-02-09 22:59:22 UTC
It helps and answers the question, I just don't know where it leaves the implementation.

We basically can't tell whether a given machine can run accelerated with kvm or not without actually trying it and seeing what happens. We certainly never got this to work with the current ARM server on the autobuilder so we should probably just forget about this?
Comment 4 Jon Mason 2021-02-10 13:25:34 UTC
Yes, trial and error is their suggested method.  Perhaps opening a bug to get 32bit KVM acceleration working on Arm hosts, and it in the scripts can be modified to look try 32bit and handle errors if they occur.  Alternatively, this bug could be reused for this purpose.  Either way, please assign to me.