UPSTREAM: KVM: arm64: Reduce the size of the vcpu flag members

Now that we can detect flags overflowing their container, reduce
the size of all flag set members in the vcpu struct, turning them
into 8bit quantities.

Even with the FP state enum occupying 32bit, the whole of the state
that was represented by flags is smaller by one byte. Profit!

Reviewed-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
(cherry picked from commit 54ddda919c)
Signed-off-by: Will Deacon <willdeacon@google.com>
Bug: 233587962
Bug: 233588291
Change-Id: I3ccd004f5507a72229d4afefbac98abc486d845c
This commit is contained in:
Marc Zyngier
2022-05-28 12:38:27 +01:00
committed by Quentin Perret
parent e46c3a4c3d
commit 8640b09352

View File

@@ -336,13 +336,13 @@ struct kvm_vcpu_arch {
} fp_state;
/* Configuration flags, set once and for all before the vcpu can run */
u64 cflags;
u8 cflags;
/* Input flags to the hypervisor code, potentially cleared after use */
u64 iflags;
u8 iflags;
/* State flags for kernel bookkeeping, unused by the hypervisor code */
u64 sflags;
u8 sflags;
/*
* We maintain more than a single set of debug registers to support