[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yhzz/N4+3vNh7AQn@google.com>
Date: Mon, 28 Feb 2022 16:10:36 +0000
From: Sean Christopherson <seanjc@...gle.com>
To: Peng Hao <flyingpenghao@...il.com>
Cc: pbonzini@...hat.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kvm: x86: Adjust the location of pkru_mask of kvm_mmu
to reduce memory
On Mon, Feb 28, 2022, Peng Hao wrote:
> From: Peng Hao <flyingpeng@...cent.com>
>
> Adjust the field pkru_mask to the back of direct_map to make up 8-byte
> alignment.This reduces the size of kvm_mmu by 8 bytes.
I'd prefer we just burn the extra 8 bytes, at least for now. 'prku' and 'permissions'
are related fields, IMO splitting them to save 24 bytes per vCPU isn't a good tradeoff.
And in the not-too-distant future, all of the 1-byte fields will hopefully go
away, at which point were "wasting" 4 bytes no matter where 'pkru' is defined. 'ept_ad'
can be dropped immediately, I'll send a patch for that. We should be able to drop
'root_level', 'shadow_root_level', and 'direct_map' once Paolo's clean up of the role
stuff lands.
Powered by blists - more mailing lists