Skip to contentSkip to conversation

KVM: SEV-ES: reduce ghcb_sa_len to 32 bits

PATCH New Paolo Bonzini 1 participant 1 message Oct 18, 2021

Subsystems (4)
lore
Share & tools
lore

Paolo Bonzini

author maintainer
#0 lore raw

PATCH 1/1 KVM: SEV-ES: reduce ghcb_sa_len to 32 bits

The size of the GHCB scratch area is limited to 16 KiB (GHCB_SCRATCH_AREA_LIMIT), so there is no need for it to be a u64. This fixes a build error on 32-bit systems:

i686-linux-gnu-ld: arch/x86/kvm/svm/sev.o: in function `sev_es_string_io:
sev.c:(.text+0x110f): undefined reference to `__udivdi3'

Fixes 019057bd73d1 ("KVM: SEV-ES: fix length of string I/O")
---
 arch/x86/kvm/svm/svm.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/svm/svm.h +1 -1
index 128a54b1fbf1..5d30db599e10 100644
@@ -191,7 +191,7 @@ struct vcpu_svm {
 
 	/* SEV-ES scratch area support */
 	void *ghcb_sa;
-	u64 ghcb_sa_len;
+	u32 ghcb_sa_len;
 	bool ghcb_sa_sync;
 	bool ghcb_sa_free;
 
Signature · 1 line
2.27.0