On Thu, Apr 29, 2021 at 04:09:30PM +0200, Jan Beulich wrote: > On 29.04.2021 15:17, Roger Pau Monné wrote: > > On Mon, Apr 12, 2021 at 04:05:41PM +0200, Jan Beulich wrote: > >> Extend a respective #ifdef from inside set_typed_p2m_entry() to around > >> all three functions. Add ASSERT_UNREACHABLE() to the latter one's safety > >> check path. > > > > Wouldn't it be better to also move the prototypes in p2m.h into a > > CONFIG_HVM guarded region, so that it fails at compile time rather > > than link time? > > In the header I'm fearing this ending up as spaghetti more than in > the .c file.
I would just move them all into a common CONFIG_HVM section rather than adding CONFIG_HVM guards around each of them. > I think where possible we may want to do so once we > have a clear / clean set of APIs which are generic vs such which > are HVM-specific (which I expect to be the case once p2m.c as a > whole becomes HVM-only). Oh, I would certainly like p2m.c to be HVM-only (see my comment about introducing a p2m-hvm.c). Anyway, my only comment was about the header, so: Acked-by: Roger Pau Monné <roger....@citrix.com> Thanks, Roger.