Received: by 10.213.65.68 with SMTP id h4csp820889imn; Wed, 28 Mar 2018 13:27:55 -0700 (PDT) X-Google-Smtp-Source: AIpwx49orUxMrlAvz4MN1tAYk5cZoiXjqnj1DmraRbYwDZjVZrkZsWBAgV3VFj2h7n54EGU+2hls X-Received: by 2002:a17:902:227:: with SMTP id 36-v6mr5084167plc.134.1522268875709; Wed, 28 Mar 2018 13:27:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522268875; cv=none; d=google.com; s=arc-20160816; b=E7dawXmLvsiHYMJPQCm1vDqeBp+YKnbm8uhf/hmPMQC8dcbgTvVHQ51+Otfossi8R5 qF3YaI4ijvwSpEje4KkGVtDDxUrgwouusj6XQU1yXWgeGbGp6ZW0Y/eY1WvkyNfYrKYN 5pf0IAbIG6YJn2xziwt+5cBlctHJ5l5M/D3Rg1Dnohp6bTt/nVv8ejUlM9yJf7mrvvRa Sq9/Y5LV4uwTQ9D+8YAMUMmWpSJGrpFjI1P2VpAmTbAEJcFlvY60hCZxUxM4hIYu+6zT mpMZfmFKo9gPvl0HOvn0h4UVZ19pqZFC2yontIUc+62YezDjj5ezF1n+CVvgZbRseSQM ddeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=eA/HGMCL9EslYCyh8dAFH0YsdfrsOvbmKdvf0D32w2w=; b=CccbNSb26c6/nTfIVyJAIQG7cpdJNcvECjBrpOWqQJ1fRhO2yFuQ1WG4vek14ZUWGz 5Jy79JMunkeWTWwhs75PlaQ2LEgN+4q6BwVFQ3ovoCbNDM9FMbQtm6uz31eKNZk8R3an qrgkNLEG6KX8gfBikjxBUTGQweP61LfzcgO2e3Er0enQv8EnUbayvbaLdayf2LPyauRB uXd9fURHgo6U8sA9X948odning6s5dZUiAyOaNJT6ASrOFHI+EVe/IoFM37iHsgawxqV 4iszm6oP9jo6q86c+zTSQHev04wI4myTwhxCKGiorFfV5euGxCQy3Y1TlO4xxt6mJ0aD nIIg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2-v6si4072262plo.116.2018.03.28.13.27.41; Wed, 28 Mar 2018 13:27:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753320AbeC1U0q (ORCPT + 99 others); Wed, 28 Mar 2018 16:26:46 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54582 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752634AbeC1U0o (ORCPT ); Wed, 28 Mar 2018 16:26:44 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 45BC84270963; Wed, 28 Mar 2018 20:26:44 +0000 (UTC) Received: from flask (unknown [10.43.2.80]) by smtp.corp.redhat.com (Postfix) with SMTP id E2091215CDC5; Wed, 28 Mar 2018 20:26:41 +0000 (UTC) Received: by flask (sSMTP sendmail emulation); Wed, 28 Mar 2018 22:26:41 +0200 Date: Wed, 28 Mar 2018 22:26:41 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Babu Moger Cc: joro@8bytes.org, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, pbonzini@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 3/5] KVM: VMX: Bring the common code to header file Message-ID: <20180328202640.GJ26753@flask> References: <1521232646-79580-1-git-send-email-babu.moger@amd.com> <1521232646-79580-4-git-send-email-babu.moger@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1521232646-79580-4-git-send-email-babu.moger@amd.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 28 Mar 2018 20:26:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 28 Mar 2018 20:26:44 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'rkrcmar@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2018-03-16 16:37-0400, Babu Moger: > This patch brings some of the code from vmx to x86.h header file. Now, we > can share this code between vmx and svm. Modified couple functions to make > it common. > > Signed-off-by: Babu Moger > --- > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > @@ -6683,8 +6652,9 @@ static void shrink_ple_window(struct kvm_vcpu *vcpu) > struct vcpu_vmx *vmx = to_vmx(vcpu); > int old = vmx->ple_window; > > - vmx->ple_window = __shrink_ple_window(old, > - ple_window_shrink, ple_window); > + vmx->ple_window = __shrink_ple_window(old, ple_window, > + ple_window_shrink, > + 0); I have preserved the old minumum (ple_window, so we could't get uselessly small values).