On 21.05.2024 12:00, Sergiy Kibrik wrote: > 21.05.24 09:05, Jan Beulich: >>> This is because MCG_LMCE_P is defined in arch/x86/cpu/mcheck/x86_mca.h >>> -- so either MCG_LMCE_P (+ a bunch of MCG_* declarations) has to be >>> moved to common header to be accessible, or local x86_mca.h got to be >>> included from common arch/x86/include/asm/mce.h. >>> >>> As for the MCG_* declarations movement I didn't think there's a good >>> enough reason to do it; as for the inclusion of x86_mca.h it didn't look >>> nice at all. >> I'm afraid I don't follow the latter: Why's including x86_mca.h any worse >> than what you do right now? > > To include x86_mca.h from asm/mce.h something like this line would be > needed: > > #include "../../cpu/mcheck/x86_mca.h" > > I've found only two include-s of such kind, so I presume they're not common.
Indeed, and I have to apologize for not reading your earlier reply quite right. Jan > Besides xen/sched.h includes asm/mce.h before declaration of struct > vcpu, so body of vmce_has_lmce(const struct vcpu *v) can't really be > compiled in asm/mce.h > > -Sergiy