x86/mce: add compat struct checking for XEN_MC_inject_v2
authorJan Beulich <jbeulich@suse.com>
Fri, 4 Sep 2020 09:06:56 +0000 (11:06 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 4 Sep 2020 09:06:56 +0000 (11:06 +0200)
commit9d207b88ff208ad829822a4f1da9d8ab020ef263
tree7151e126f4e5e14831d2053f30a29a4cc9d4f7dc
parent0dd40d68b10a2b3191a06ff8a996a57dcca96a88
x86/mce: add compat struct checking for XEN_MC_inject_v2

84e364f2eda2 ("x86: add CMCI software injection interface") merely made
sure things would build, without any concern about things actually
working:
- despite the addition of xenctl_bitmap to xlat.lst, the resulting macro
  wasn't invoked anywhere (which would have lead to recognizing that the
  structure appeared to have no fully compatible layout, despite the use
  of a 64-bit handle),
- the interface struct itself was neither added to xlat.lst (and the
  resulting macro then invoked) nor was any manual checking of
  individual fields added.

Adjust compat header generation logic to retain XEN_GUEST_HANDLE_64(),
which is intentionally layed out to be compatible between different size
guests. Invoke the missing checking (implicitly through CHECK_mc).

No change in the resulting generated code.

Fixes: 84e364f2eda2 ("x86: add CMCI software injection interface")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/cpu/mcheck/mce.c
xen/include/public/arch-x86/xen-mca.h
xen/include/xlat.lst
xen/tools/compat-build-header.py
xen/tools/compat-build-source.py