On 2018/7/31 15:38, Paolo Bonzini wrote:
But if that's the case, it doesn't make sense to have a new vendor! If AMD's 17h and Hygon's 18h ever diverge, you could always choose the right behavior based on the family, without checking the vendor. However, if the x86 maintainers prefer to have a new X86_VENDOR_* constant, I'd just ignore the fact that AMD will skip family 18h, and introduce vendor checks along the lines below. This has the advantage that it's not an issue if AMD ends up _not_ skipping family 18h.
Thanks for the suggestion. It's reasonable for the fully consideration. For code consistency, will check explicitly for Hygon before testing family 18h in next patch set. Thanks, Pu Wen