Re: [RFC PATCH v11 01/29] KVM: Wrap kvm_gfn_range.pte in a per-action union

From
Paolo Bonzini <pbonzini@redhat.com>
Date
2023-07-19 16:56:25
Also in
kvm, kvm-riscv, kvmarm, linux-arm-kernel, linux-fsdevel, linux-mips, linux-mm, linux-riscv, linuxppc-dev, lkml
Reply to
Sean Christopherson, 2023-07-18
On 7/19/23 01:44, Sean Christopherson wrote:
+	BUILD_BUG_ON(sizeof(gfn_range.arg) != sizeof(gfn_range.arg.raw));
+	BUILD_BUG_ON(sizeof(range->arg) != sizeof(range->arg.raw));
I think these should be static assertions near the definition of the structs.  However another possibility is to remove 'raw' and just assign the whole union.

Apart from this,

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo
+	BUILD_BUG_ON(sizeof(gfn_range.arg) != sizeof(range->arg));
  
Thread (108 messages) 108 messages, 20 authors, last reply 2023-09-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help