Re: [libvirt PATCH 4/5] Implement the method of getting host info for loongarch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrea:
On Thu, Dec 14, 2023 at 02:08:48PM +0800, xianglai li wrote:
+++ b/src/util/virhostcpu.c
@@ -579,7 +579,7 @@ virHostCPUParsePhysAddrSize(FILE *cpuinfo, unsigned int *addrsz)
          char *str;
          char *endptr;

-        if (!(str = STRSKIP(line, "address sizes")))
+        if (!(str = STRCASESKIP(line, "address sizes")))
              continue;
So is the case different on loongarch than it is on other
architectures? Weird.


Yes, loongarch and x86 do have some similarities and differences in the cpu Address space string, loongarch is "Address Sizes" under X86 is "address sizes",

arm and other architectures should not have this identifier, At present, only x86 architecture and sh architecture can enter the process,

other architectures will directly return, and the superior call also needs to allow the loongarch architecture. I will correct it in the next version



+++ b/src/util/virsysinfo.c
@@ -1241,14 +1241,15 @@ virSysinfoRead(void)
  {
  #if defined(__powerpc__)
      return virSysinfoReadPPC();
-#elif defined(__arm__) || defined(__aarch64__)
+#elif defined(__arm__) || defined(__aarch64__) || defined(__loongarch__)
      return virSysinfoReadARM();
This is definitely not right: we shouldn't be calling the
Arm-specific function on loongarch.


Ok, I'll correct that in the next version.


  #elif defined(__s390__) || defined(__s390x__)
      return virSysinfoReadS390();
  #elif !defined(WIN32) && \
      (defined(__x86_64__) || \
       defined(__i386__) || \
-     defined(__amd64__))
+     defined(__amd64__) || \
+    defined(__loongarch__))
      return virSysinfoReadDMI();
Does loongarch actually have DMI support?

Yes, loongarch does support dmi.


Thanks,

Xianglai.

_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux