Return-Path: Received: from mail.linutronix.de (146.0.238.70:993) by crypto-ml.lab.linutronix.de with IMAP4-SSL for ; 01 Jul 2018 16:14:41 -0000 Received: from mx3-rdu2.redhat.com ([66.187.233.73] helo=mx1.redhat.com) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fZezn-0007Z4-CR for speck@linutronix.de; Sun, 01 Jul 2018 18:14:39 +0200 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C3D214000B8A for ; Sun, 1 Jul 2018 16:14:31 +0000 (UTC) Received: from treble (ovpn-120-16.rdu2.redhat.com [10.10.120.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 723082026D66 for ; Sun, 1 Jul 2018 16:14:31 +0000 (UTC) Date: Sun, 1 Jul 2018 11:14:29 -0500 From: Josh Poimboeuf Subject: [MODERATED] Re: [PATCH v4 2/8] [PATCH v4 2/8] Linux Patch #2 Message-ID: <20180701161429.cjtgofoepigrokgy@treble> References: <20180623135445.576988756@localhost.localdomain> MIME-Version: 1.0 In-Reply-To: <20180623135445.576988756@localhost.localdomain> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: speck@linutronix.de List-ID: On Sat, Jun 23, 2018 at 09:54:16AM -0400, speck for konrad.wilk_at_oracle.com wrote: > @@ -7392,7 +7447,11 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) > > preempt_disable(); > > + vcpu->arch.flush_cache_req = vcpu->arch.vcpu_unconfined; > kvm_x86_ops->prepare_guest_switch(vcpu); > + vcpu->arch.vcpu_unconfined = false; > + if (vcpu->arch.flush_cache_req) > + vcpu->stat.l1d_flush++; As Boris said, I don't see the need for the two different variables which basically track the same thing. And why is the stat updated in a separate location from the actual flush? -- Josh