From mboxrd@z Thu Jan 1 00:00:00 1970 From: Borislav Petkov Subject: Re: [PATCH v6 5/5] x86/kvm: Avoid dynamic allocation of pvclock data when SEV is active Date: Tue, 11 Sep 2018 12:25:04 +0200 Message-ID: <20180911102504.GC11418@zn.tnic> References: <20180910122727.GE21815@zn.tnic> <026d5ca5-7b77-de6c-477e-ff39f0291ac0@amd.com> <1536586152.11460.40.camel@intel.com> <097eb5f5-2cd9-8b08-32c5-d90c8e0cbb6d@amd.com> <1536593297.11460.72.camel@intel.com> <11618b8b-4d1f-9307-35f0-3c0f0fc856ca@amd.com> <20180910164851.GC20286@zn.tnic> <3b8b4c9c-b0f6-1e08-3d26-0e146cd7189e@redhat.com> <20180911100142.GA11418@zn.tnic> <554c6fb5-0de4-5415-9970-0d09325d718b@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Brijesh Singh , Sean Christopherson , x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Tom Lendacky , Thomas Gleixner , "H. Peter Anvin" , Radim =?utf-8?B?S3LEjW3DocWZ?= To: Paolo Bonzini Return-path: Content-Disposition: inline In-Reply-To: <554c6fb5-0de4-5415-9970-0d09325d718b@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Tue, Sep 11, 2018 at 12:19:13PM +0200, Paolo Bonzini wrote: > That's exactly what kvmclock is for, it provides a stable and > synchronized clock on top of unsynchronized TSCs. But that's also why > you need one struct per vCPU, at least in the synchronized case. Why? Why can't it be a single pointer to a struct pvclock_vsyscall_time_info shared between all vCPUs? Or does each vCPU write its own specific stuff into it so it has to be per-vCPU? -- Regards/Gruss, Boris. SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) --