<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>13374</bug_id>
          
          <creation_ts>2019-05-30 22:58:25 +0000</creation_ts>
          <short_desc>Determine 32bit guest support on arm64</short_desc>
          <delta_ts>2021-02-10 13:25:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>Scripts and Tools</component>
          <version>0.0.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>3.3 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jon Mason">jon.mason</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>84021</commentid>
    <comment_count>0</comment_count>
    <who name="Jon Mason">jon.mason</who>
    <bug_when>2019-05-30 22:58:25 +0000</bug_when>
    <thetext>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&apos;t all of them).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>84349</commentid>
    <comment_count>1</comment_count>
    <who name="Jon Mason">jon.mason</who>
    <bug_when>2019-07-01 15:53:33 +0000</bug_when>
    <thetext>Via internal queries, I have been able to discover that 32bit KVM guests should function on &quot;source systems that have AArch32 at EL1&quot;.  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&apos;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, &quot;KVM cannot be compiled as a module on arm/arm64&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>88322</commentid>
    <comment_count>2</comment_count>
    <who name="Jon Mason">jon.mason</who>
    <bug_when>2020-10-08 06:29:36 +0000</bug_when>
    <thetext>I believe this answers the question about whether we can run qemuarm on the arm64 autobuilder.  Long term this won&apos;t work, but should be fine in the short term.

If there are no other questions about this, please close.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89189</commentid>
    <comment_count>3</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2021-02-09 22:59:22 +0000</bug_when>
    <thetext>It helps and answers the question, I just don&apos;t know where it leaves the implementation.

We basically can&apos;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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89196</commentid>
    <comment_count>4</comment_count>
    <who name="Jon Mason">jon.mason</who>
    <bug_when>2021-02-10 13:25:34 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>