[PATCH] i386: Build SEV only for 64-bit target

Cédric Le Goater posted 1 patch 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250716071554.377356-1-clg@redhat.com
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>
hw/i386/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] i386: Build SEV only for 64-bit target
Posted by Cédric Le Goater 4 months ago
Recent changes broke build on 32-bit host. Since there is no 32-bit
support, restrict SEV to 64-bit.

Signed-off-by: Cédric Le Goater <clg@redhat.com>
---
 hw/i386/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 14d23e27b580b2d5ea3aa4c07ba066f21a62e348..5139d2308777114e76a789c4f850fa20f3fa754f 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -4,7 +4,7 @@ config X86_FW_OVMF
 config SEV
     bool
     select X86_FW_OVMF
-    depends on KVM
+    depends on KVM && X86_64
 
 config SGX
     bool
-- 
2.50.1


Re: [PATCH] i386: Build SEV only for 64-bit target
Posted by Cédric Le Goater 3 months, 2 weeks ago
On 7/16/25 09:15, Cédric Le Goater wrote:
> Recent changes broke build on 32-bit host. Since there is no 32-bit
> support, restrict SEV to 64-bit.
> 
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
> ---
>   hw/i386/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 14d23e27b580b2d5ea3aa4c07ba066f21a62e348..5139d2308777114e76a789c4f850fa20f3fa754f 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -4,7 +4,7 @@ config X86_FW_OVMF
>   config SEV
>       bool
>       select X86_FW_OVMF
> -    depends on KVM
> +    depends on KVM && X86_64
>   
>   config SGX
>       bool


Applied to vfio-next.

Thanks,

C.



Re: [PATCH] i386: Build SEV only for 64-bit target
Posted by Xiaoyao Li 4 months ago
On 7/16/2025 3:15 PM, Cédric Le Goater wrote:
> Recent changes broke build on 32-bit host. Since there is no 32-bit
> support, restrict SEV to 64-bit.
> 
> Signed-off-by: Cédric Le Goater <clg@redhat.com>

Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>

> ---
>   hw/i386/Kconfig | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 14d23e27b580b2d5ea3aa4c07ba066f21a62e348..5139d2308777114e76a789c4f850fa20f3fa754f 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -4,7 +4,7 @@ config X86_FW_OVMF
>   config SEV
>       bool
>       select X86_FW_OVMF
> -    depends on KVM
> +    depends on KVM && X86_64
>   
>   config SGX
>       bool


Re: [PATCH] i386: Build SEV only for 64-bit target
Posted by Daniel P. Berrangé 4 months ago
On Wed, Jul 16, 2025 at 09:15:54AM +0200, Cédric Le Goater wrote:
> Recent changes broke build on 32-bit host. Since there is no 32-bit
> support, restrict SEV to 64-bit.
> 
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
> ---
>  hw/i386/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

Matches what we just did for TDX too.


> 
> diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
> index 14d23e27b580b2d5ea3aa4c07ba066f21a62e348..5139d2308777114e76a789c4f850fa20f3fa754f 100644
> --- a/hw/i386/Kconfig
> +++ b/hw/i386/Kconfig
> @@ -4,7 +4,7 @@ config X86_FW_OVMF
>  config SEV
>      bool
>      select X86_FW_OVMF
> -    depends on KVM
> +    depends on KVM && X86_64
>  
>  config SGX
>      bool
> -- 
> 2.50.1
> 
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


Re: [PATCH] i386: Build SEV only for 64-bit target
Posted by Cédric Le Goater 4 months ago
On 7/16/25 11:28, Daniel P. Berrangé wrote:
> On Wed, Jul 16, 2025 at 09:15:54AM +0200, Cédric Le Goater wrote:
>> Recent changes broke build on 32-bit host. Since there is no 32-bit
>> support, restrict SEV to 64-bit.
>>
>> Signed-off-by: Cédric Le Goater <clg@redhat.com>
>> ---
>>   hw/i386/Kconfig | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> 
> Matches what we just did for TDX too.

What about SGX ?

Thanks,

C.


Re: [PATCH] i386: Build SEV only for 64-bit target
Posted by Daniel P. Berrangé 4 months ago
On Wed, Jul 16, 2025 at 11:36:48AM +0200, Cédric Le Goater wrote:
> On 7/16/25 11:28, Daniel P. Berrangé wrote:
> > On Wed, Jul 16, 2025 at 09:15:54AM +0200, Cédric Le Goater wrote:
> > > Recent changes broke build on 32-bit host. Since there is no 32-bit
> > > support, restrict SEV to 64-bit.
> > > 
> > > Signed-off-by: Cédric Le Goater <clg@redhat.com>
> > > ---
> > >   hw/i386/Kconfig | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> > 
> > Matches what we just did for TDX too.
> 
> What about SGX ?

Our SGX features only require kernel support.

The SGX userspace SDK can build for 32 & 64 bit, though in Fedora/RHEL I
will only build it for 64-bit, but that's not relevant for QEMU's needs
anyway.

Ultimately we're dropping 32-bit host support for QEMU in general at the
end of this year, so we don't need to go out of our way to selectively
drop things before then unless they're giving us trouble today.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|