diff mbox series

[v3,06/12] meson: Disallow 64-bit on 32-bit HVF/NVMM/WHPX emulation

Message ID 20250204215359.1238808-7-richard.henderson@linaro.org
State New
Headers show
Series meson: Deprecate 32-bit host support | expand

Commit Message

Richard Henderson Feb. 4, 2025, 9:53 p.m. UTC
Require a 64-bit host binary to spawn a 64-bit guest.

For HVF this is trivially true because macOS 11 dropped
support for 32-bit applications entirely.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 meson.build | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

Comments

Thomas Huth Feb. 5, 2025, 6:50 a.m. UTC | #1
On 04/02/2025 22.53, Richard Henderson wrote:
> Require a 64-bit host binary to spawn a 64-bit guest.
> 
> For HVF this is trivially true because macOS 11 dropped
> support for 32-bit applications entirely.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   meson.build | 11 +++++++----
>   1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 0ca83135e2..c80382befd 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -319,13 +319,16 @@ else
>   endif
>   accelerator_targets += { 'CONFIG_XEN': xen_targets }
>   
> -if cpu in ['aarch64']
> +if cpu == 'aarch64'
>     accelerator_targets += {
>       'CONFIG_HVF': ['aarch64-softmmu']
>     }
> -endif
> -
> -if cpu in ['x86', 'x86_64']
> +elif cpu == 'x86'
> +  accelerator_targets += {
> +    'CONFIG_NVMM': ['i386-softmmu'],
> +    'CONFIG_WHPX': ['i386-softmmu'],

We dropped support for 32-bit Windows last year, so I think you can remove 
that WHPX line.

And looking at the NetBSD Makefile:

  http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/nvmm/Makefile?rev=1.1.6.2;content-type=text%2Fplain

... it seems to me like NVMM only gets enabled there for x86_64, so I think 
you could likely remove the NVMM line / the whole 32-bit paragraph here, too?

  Thomas


> +  }
> +elif cpu == 'x86_64'
>     accelerator_targets += {
>       'CONFIG_HVF': ['x86_64-softmmu'],
>       'CONFIG_NVMM': ['i386-softmmu', 'x86_64-softmmu'],
Richard Henderson Feb. 5, 2025, 7:09 p.m. UTC | #2
On 2/4/25 22:50, Thomas Huth wrote:
> On 04/02/2025 22.53, Richard Henderson wrote:
>> Require a 64-bit host binary to spawn a 64-bit guest.
>>
>> For HVF this is trivially true because macOS 11 dropped
>> support for 32-bit applications entirely.
>>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>   meson.build | 11 +++++++----
>>   1 file changed, 7 insertions(+), 4 deletions(-)
>>
>> diff --git a/meson.build b/meson.build
>> index 0ca83135e2..c80382befd 100644
>> --- a/meson.build
>> +++ b/meson.build
>> @@ -319,13 +319,16 @@ else
>>   endif
>>   accelerator_targets += { 'CONFIG_XEN': xen_targets }
>> -if cpu in ['aarch64']
>> +if cpu == 'aarch64'
>>     accelerator_targets += {
>>       'CONFIG_HVF': ['aarch64-softmmu']
>>     }
>> -endif
>> -
>> -if cpu in ['x86', 'x86_64']
>> +elif cpu == 'x86'
>> +  accelerator_targets += {
>> +    'CONFIG_NVMM': ['i386-softmmu'],
>> +    'CONFIG_WHPX': ['i386-softmmu'],
> 
> We dropped support for 32-bit Windows last year, so I think you can remove that WHPX line.
> 
> And looking at the NetBSD Makefile:
> 
>   http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/nvmm/Makefile?rev=1.1.6.2;content- 
> type=text%2Fplain
> 
> ... it seems to me like NVMM only gets enabled there for x86_64, so I think you could 
> likely remove the NVMM line / the whole 32-bit paragraph here, too?

Good eye.  Thanks for double-checking NetBSD, especially.


r~
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index 0ca83135e2..c80382befd 100644
--- a/meson.build
+++ b/meson.build
@@ -319,13 +319,16 @@  else
 endif
 accelerator_targets += { 'CONFIG_XEN': xen_targets }
 
-if cpu in ['aarch64']
+if cpu == 'aarch64'
   accelerator_targets += {
     'CONFIG_HVF': ['aarch64-softmmu']
   }
-endif
-
-if cpu in ['x86', 'x86_64']
+elif cpu == 'x86'
+  accelerator_targets += {
+    'CONFIG_NVMM': ['i386-softmmu'],
+    'CONFIG_WHPX': ['i386-softmmu'],
+  }
+elif cpu == 'x86_64'
   accelerator_targets += {
     'CONFIG_HVF': ['x86_64-softmmu'],
     'CONFIG_NVMM': ['i386-softmmu', 'x86_64-softmmu'],