Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 27 Jun 2018 14:47:50 -0000 Received: from smtp.ctxuk.citrix.com ([185.25.65.24] helo=SMTP.EU.CITRIX.COM) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fYBjY-0006yp-Qf for speck@linutronix.de; Wed, 27 Jun 2018 16:47:49 +0200 Subject: [MODERATED] Re: [PATCH v4 7/8] [PATCH v4 7/8] Linux Patch #7 References: <20180623135445.930989669@localhost.localdomain> <20180627143251.GC21873@char.US.ORACLE.com> From: Andrew Cooper Message-ID: <905046eb-0dd0-c539-a20b-ad60deafcbba@citrix.com> Date: Wed, 27 Jun 2018 15:47:39 +0100 MIME-Version: 1.0 In-Reply-To: <20180627143251.GC21873@char.US.ORACLE.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable Content-Language: en-GB To: speck@linutronix.de List-ID: On 27/06/18 15:32, speck for Konrad Rzeszutek Wilk wrote: > >> Changed that to: >> >> x86/KVM/VMX: Extend add_atomic_switch_msr() to allow VMENTER only MSRs >> >> The IA32_FLUSH_CMD MSR needs only to be written on VMENTER. Extend >> add_atomic_switch_msr() with an entry_only parameter to allow storing the >> MSR only in the guest (ENTRY) MST array. >> >> Hmm? > > > Albeit do you want to wait a bit until I have the performance numbers at > hand on how much this helps vs doing it the old-fashioned way (WRMSRL rig= ht > before VMENTER)? I've been told multiple times that MSR load/save lists are more than twice as slow as the equivalent rdmsr/wrmsr's in real code. However in this case, you've got a meaningful difference in which data is flushed from the L1D cache depending on the positioning.=A0 Using the MSR load/save list is the only way to the GPRs flushed. ~Andrew