target-arm: Provide mechanism for getting KVM constants even if not CONFIG_KVM
commit72b0cd35ad3e216a1db7f6a08a2ff65bb577c119
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 22 Nov 2013 17:17:08 +0000 (22 17:17 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 10 Dec 2013 13:28:29 +0000 (10 13:28 +0000)
tree817aa988e4dbb4fb02bf805d605fd4d2d5a42c09
parent57e72f2a1977448959fe4a492bc48cd2988c1f3b
target-arm: Provide mechanism for getting KVM constants even if not CONFIG_KVM

There are a number of places where it would be convenient for ARM
code to have working definitions of KVM constants even in code
which is compiled with CONFIG_KVM not set. In this situation we
can't simply include the kernel KVM headers (which might conflict
with host header definitions or not even compile on the compiler
we're using) so we have to redefine equivalent constants.
Provide a mechanism for doing this and checking that the values
match, and use it for the constants we're currently exposing
via an ad-hoc mechanism.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Message-id: 1385140638-10444-2-git-send-email-peter.maydell@linaro.org
target-arm/cpu.h
target-arm/kvm-consts.h [new file with mode: 0644]
target-arm/kvm.c