mbox series

[v2,0/2] KVM: Minor structure layout changes

Message ID 20230217193336.15278-1-minipli@grsecurity.net (mailing list archive)
Headers show
Series KVM: Minor structure layout changes | expand

Message

Mathias Krause Feb. 17, 2023, 7:33 p.m. UTC
v1: https://lore.kernel.org/kvm/20230213163351.30704-1-minipli@grsecurity.net/

This used to be a more exhaustive patch set shrinking kvm_vcpu's size.
But we concluded that this would be too fragile to maintain and would
require a more radical layout change to group often used members
together instead of chopping off individual padding bytes.

The remaining two patches are nonetheless useful, as they either make
the structure layout a more natural fit (as for kvm_pmu, putting the
version atop) or removing pointless padding (kvm_mmu_memory_cache).

Please apply!

Thanks,

Mathias Krause (2):
  KVM: x86: Shrink struct kvm_pmu
  KVM: Shrink struct kvm_mmu_memory_cache

 arch/x86/include/asm/kvm_host.h | 2 +-
 include/linux/kvm_types.h       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Sean Christopherson March 24, 2023, 11:37 p.m. UTC | #1
On Fri, 17 Feb 2023 20:33:34 +0100, Mathias Krause wrote:
> v1: https://lore.kernel.org/kvm/20230213163351.30704-1-minipli@grsecurity.net/
> 
> This used to be a more exhaustive patch set shrinking kvm_vcpu's size.
> But we concluded that this would be too fragile to maintain and would
> require a more radical layout change to group often used members
> together instead of chopping off individual padding bytes.
> 
> [...]

Applied patch 1 to kvm-x86 pmu, and patch 2 to generic, thanks!

[1/2] KVM: x86: Shrink struct kvm_pmu
      https://github.com/kvm-x86/linux/commit/12aad9164763
[2/2] KVM: Shrink struct kvm_mmu_memory_cache
      https://github.com/kvm-x86/linux/commit/f530b531fb9e

--
https://github.com/kvm-x86/linux/tree/next
https://github.com/kvm-x86/linux/tree/fixes