On Tue, Dec 19, 2023 at 05:23:36PM +0800, lixianglai wrote:
> 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",
Unfortunate choice on the kernel's part, but not much we can do about
that I guess. The way you handled it is perfectly fine.
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
Good catch! I hadn't even noticed that but it definitely needs to be
addressed.
> > #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.
Excellent, just making sure :)
--
Andrea Bolognani / Red Hat / Virtualization