Re: [PATCH 3/4] KVM: SVM: Add GHCB Accessor functions

2020-07-30 Thread Joerg Roedel
On Wed, Jul 29, 2020 at 08:43:28AM -0700, Sean Christopherson wrote: > Rather than manually calculate the byte/bit indices just use __set_bit() > and test_bit(). That will also solve the variable declaration issue. > > E.g. > > #define GHB_BITMAP_IDX(field) \ > (offsetof(struct

Re: [PATCH 3/4] KVM: SVM: Add GHCB Accessor functions

2020-07-29 Thread Sean Christopherson
On Wed, Jul 29, 2020 at 03:22:33PM +0200, Joerg Roedel wrote: > From: Joerg Roedel > > Building a correct GHCB for the hypervisor requires setting valid bits > in the GHCB. Simplify that process by providing accessor functions to > set values and to update the valid bitmap. > > Signed-off-by:

[PATCH 3/4] KVM: SVM: Add GHCB Accessor functions

2020-07-29 Thread Joerg Roedel
From: Joerg Roedel Building a correct GHCB for the hypervisor requires setting valid bits in the GHCB. Simplify that process by providing accessor functions to set values and to update the valid bitmap. Signed-off-by: Joerg Roedel --- arch/x86/include/asm/svm.h | 61