From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brijesh Singh Subject: Re: [RFC Part2 PATCH v3 11/26] KVM: X86: Extend struct kvm_arch to include SEV information Date: Wed, 13 Sep 2017 10:14:20 -0500 Message-ID: <2a5702c8-a60a-7836-6eec-891a3c3e8ace@amd.com> References: <20170724200303.12197-1-brijesh.singh@amd.com> <20170724200303.12197-12-brijesh.singh@amd.com> <20170913133729.dtae2a3kidoigri5@pd.tnic> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: brijesh.singh@amd.com, linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, Thomas Gleixner , Joerg Roedel , "Michael S . Tsirkin" , Paolo Bonzini , =?UTF-8?B?XCJSYWRpbSBLcsSNbcOhxZlcIg==?= , Tom Lendacky To: Borislav Petkov Return-path: In-Reply-To: <20170913133729.dtae2a3kidoigri5@pd.tnic> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 09/13/2017 08:37 AM, Borislav Petkov wrote: ... >> + return &kvm->arch.sev_info; >> +} >> + >> +static inline void sev_set_active(struct kvm *kvm) >> +{ >> + to_sev_info(kvm)->active = true; >> +} > > Is this the accepted way to do this in KVM land or can you simply access > all members directly: > > kvm->arch.sev_info. > > Because I see stuff like that: > Actually, I see both approaches used in svm.c but I am flexible to go with either ways. lets wait for Paolo and Radim comments. -Brijesh