x86/hvm/domain: remove the 'hap_enabled' flag
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 28 Aug 2019 14:58:45 +0000 (16:58 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 28 Aug 2019 14:58:45 +0000 (16:58 +0200)
commitd0c0ba7d3de63c40058e0e28882faa5daa68edc1
treedf43ed72b2d8d8858b461728be40fa63ac34cf7b
parentb806c91275fb1ab7696ebf033b56631693056c90
x86/hvm/domain: remove the 'hap_enabled' flag

The hap_enabled() macro can determine whether the feature is available
using the domain 'options'; there is no need for a separate flag.

NOTE: Furthermore, by extending sanitizing of the domain 'options', the
      macro can be transformed into an inline function and re-located to
      xen/sched.h. This also makes hap_enabled() common, thus allowing
      removal of an ugly ifdef CONFIG_X86 from the common iommu code.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/domain.c
xen/arch/x86/mm/paging.c
xen/common/domain.c
xen/drivers/passthrough/iommu.c
xen/include/asm-x86/hvm/domain.h
xen/include/asm-x86/paging.h
xen/include/xen/sched.h