Re: [PATCH v6 02/76] KVM: SVM: Add GHCB definitions

2020-08-28 Thread Joerg Roedel
On Thu, Aug 27, 2020 at 12:01:13PM -0400, Arvind Sankar wrote: > Wouldn't we rather just remove the checks? I think that's a different topic to be discussed with the KVM maintainers. For now I will add defines for the magic numbers. Regards, Joerg

Re: [PATCH v6 02/76] KVM: SVM: Add GHCB definitions

2020-08-27 Thread Arvind Sankar
On Tue, Aug 25, 2020 at 01:04:46PM +0200, Borislav Petkov wrote: > On Tue, Aug 25, 2020 at 11:22:24AM +0200, Joerg Roedel wrote: > > 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

Re: [PATCH v6 02/76] KVM: SVM: Add GHCB definitions

2020-08-25 Thread Borislav Petkov
On Tue, Aug 25, 2020 at 11:22:24AM +0200, Joerg Roedel wrote: > 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 p

Re: [PATCH v6 02/76] KVM: SVM: Add GHCB definitions

2020-08-25 Thread Joerg Roedel
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)

Re: [PATCH v6 02/76] KVM: SVM: Add GHCB definitions

2020-08-24 Thread Borislav Petkov
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

[PATCH v6 02/76] KVM: SVM: Add GHCB definitions

2020-08-24 Thread Joerg Roedel
From: Tom Lendacky Extend the vmcb_safe_area with SEV-ES fields and add a new 'struct ghcb' which will be used for guest-hypervisor communication. Signed-off-by: Tom Lendacky Signed-off-by: Joerg Roedel --- arch/x86/include/asm/svm.h | 45 +- arch/x86/kvm/s