Signed-off-by: Mohamed Mediouni --- meson.build | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/meson.build b/meson.build index 72da97829a..ca333a35e4 100644 --- a/meson.build +++ b/meson.build @@ -327,7 +327,8 @@ accelerator_targets += { 'CONFIG_XEN': xen_targets } if cpu == 'aarch64' accelerator_targets += { - 'CONFIG_HVF': ['aarch64-softmmu'] + 'CONFIG_HVF': ['aarch64-softmmu'], + 'CONFIG_WHPX': ['aarch64-softmmu'] } elif cpu == 'x86_64' accelerator_targets += { @@ -880,14 +881,20 @@ accelerators = [] if get_option('kvm').allowed() and host_os == 'linux' accelerators += 'CONFIG_KVM' endif + if get_option('whpx').allowed() and host_os == 'windows' - if get_option('whpx').enabled() and host_machine.cpu() != 'x86_64' - error('WHPX requires 64-bit host') - elif cc.has_header('winhvplatform.h', required: get_option('whpx')) and \ - cc.has_header('winhvemulation.h', required: get_option('whpx')) - accelerators += 'CONFIG_WHPX' + if cpu == 'i386' + if get_option('whpx').enabled() + error('WHPX requires 64-bit host') + endif + # Leave CONFIG_WHPX disabled + else + if cc.has_header('winhvplatform.h', required: get_option('whpx')) and \ + cc.has_header('winhvemulation.h', required: get_option('whpx')) + accelerators += 'CONFIG_WHPX' + endif endif -endif + endif hvf = not_found if get_option('hvf').allowed() -- 2.50.1 (Apple Git-155)