<div dir="ltr"><div>Hi,</div><div><br></div>Thanks alot for the review and feedback. As for host-passthrough cases, I have some other understandings,<div>if I understand correctly, what you mean is that if a vm uses host-passthrough, it can migrate to any other</div><div>host, since it asks for host-passthrough. In my point of view, I think in real cases, there are few different kinds</div><div>of ARM datacenter CPUs on the market, and there CPU capabilities are different, so one might create a vm on</div><div>hostA with feature1 and feature2 because it uses host-passthrough and hostA has these features. Now in your</div><div>definition(if I understand correctly) of host-passthrough and the current code(returns identical directly), this vm</div><div>can be migrated to hostB with only feature1, since there are no limitations. If one has some important application</div><div>that dependsĀ on feature2, the app will break as feature2 is not available on hostB. Considering this, I proposed</div><div>to add basic checks to compare CPU to limit the migration to only the same CPU models. And once the capability</div><div>of ARM driver is enhanced in QEMU or other related projects, we can make the compare API better.</div><div><br></div><div>And yes, the code referenced X86 and S390 driver, I have modified them to be workable with ARM and tested</div><div>the functions, I was also thinking that in the future there might be possibility that we can compare cpu features</div><div>so I kept the data compare case.</div><div><br></div><div>Thanks again for the feedback.</div><div><br></div><div>Zhenyu</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 1, 2020 at 10:50 PM Jiri Denemark <<a href="mailto:jdenemar@redhat.com">jdenemar@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 Fri, Aug 21, 2020 at 10:20:15 +0800, Zhenyu Zheng wrote:<br>
> Modify virCPUarmCompare in cpu_arm.c to perform<br>
> actual compare actions. Compare host cpu vendor<br>
> and model info with guest cpu as initial implementation,<br>
> as most ARM clouds uses host-passthrogh mode.<br>
<br>
In addition to the low-level coding issues found by Daniel Henrique<br>
Barboza, I'd like to ask some high level questions...<br>
<br>
What is the point in making this patch (except for copying the logic<br>
from x86 CPU driver, which mostly does not fit ARM world very well)?<br>
<br>
As you say, most ARM clouds use host-passthrough, so why would CPU<br>
comparison be needed at all? Host-passthrough CPU is by definition<br>
compatible with any host CPU as it asks for the host CPU itself.<br>
<br>
Also IIRC the CPU model names as advertised by libvirt in host<br>
capabilities are only useful for identifying the host CPU, but they<br>
cannot be directly pass to QEMU. As such, you can't use these models<br>
when defining a CPU in a domain XML.<br>
<br>
That said, I doubt this patch is useful at all.<br>
<br>
Jirka<br>
<br>
</blockquote></div>