lkml.org 
[lkml]   [2020]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 02/76] KVM: SVM: Add GHCB definitions
On Mon, Aug 24, 2020 at 12:44:51PM +0200, Borislav Petkov wrote:
> On Mon, Aug 24, 2020 at 10:53:57AM +0200, Joerg Roedel wrote:
> > static inline void __unused_size_checks(void)
> > {
> > - BUILD_BUG_ON(sizeof(struct vmcb_save_area) != 0x298);
> > + BUILD_BUG_ON(sizeof(struct vmcb_save_area) != 1032);
> > BUILD_BUG_ON(sizeof(struct vmcb_control_area) != 256);
> > + BUILD_BUG_ON(sizeof(struct ghcb) != 4096);
>
> Could those naked numbers be proper, meaningfully named defines?

I don't think so, if I look at the history of these checks their whole
purpose seems to be to alert the developer/maintainer when their size
changes and that they might not fit on the stack anymore. But that is
taken care of in patch 1.

Regards,

Joerg

\
 
 \ /
  Last update: 2020-08-25 11:22    [W:0.122 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site