Received: by 10.213.65.68 with SMTP id h4csp857301imn; Wed, 28 Mar 2018 14:19:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx48Xrh4bWyAejqEVPchuaI9LFwULCo9nEo+NsgG8azpmu0aQcB1IuQWLCOLd14zAiRojaijI X-Received: by 10.99.122.80 with SMTP id j16mr3650095pgn.5.1522271958150; Wed, 28 Mar 2018 14:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522271958; cv=none; d=google.com; s=arc-20160816; b=jeNt+c8ORVT9LTbWfM8IdOKiXlel8PTj7MIMAucyh3OByciqs5QxJMh2k4EU5HceYi oK1M1yYEEJF6xLjurfpHNvpyLqydXT8hQ2iDGZw1cuG01QUCSEQS9EGTvuAkYBHHgvPy 0Ii4uoGZ+gAwMJGK2ddVUjaXIlN/TtGfBqVuVmnGWv9xtHkc4B68JQYqRRPQI8YND+Co 5MQtwctfLHaIHX+cWZkSWUlOhtAOa6zwi/21DkxPQ6mj1FkaKntiN7MwZRItdxTy0w5m dJXs1nUugT3A6k9RzmjgyV+XHsUh5DoMJkfcKwJxcZ3U7CRZGY24eLETIuHjKRiYqvhl EHLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=bas3M80zqPSv7TBWyO7YIeRELOOm9j5t2DmleCctGNE=; b=yqAn6TYPVPyCO39TTa9GEI56U2G9T0+Qoj5KMvSuUsYfkGaVl33Cv6K5Zup6TsR1aQ MOqXs/03fvaVi9uI4vl4SK4vq+yxIUKk3fkmefFeTXi0HXPlYKGc3mDSyFjyCphhYEUn 7eidEaVW65LVHR/wF5TuidNOnWPb7Fe8TsEHx5mjLn+59Vd2MtVdJjQkvRGSkIMMWZTV +fI95Aum/6mH8FNmpBpesiZajgcB2osIWpxzKlWdtR8/AoQfPgoRq7MNyCAlxzIodPoW j2YMo/CwDhJuRiALWCFf1WmNtV/6QznePPcZe1yRmoJtbANu5Qm1izHZH1pPDJWPWNZr WPrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=W3EN4gn5; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i137si3285394pfe.97.2018.03.28.14.19.03; Wed, 28 Mar 2018 14:19:18 -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; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=W3EN4gn5; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753232AbeC1VMk (ORCPT + 99 others); Wed, 28 Mar 2018 17:12:40 -0400 Received: from mail-sn1nam01on0048.outbound.protection.outlook.com ([104.47.32.48]:46256 "EHLO NAM01-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753068AbeC1VMj (ORCPT ); Wed, 28 Mar 2018 17:12:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=bas3M80zqPSv7TBWyO7YIeRELOOm9j5t2DmleCctGNE=; b=W3EN4gn57IZn+FuzDhtDK2vZwsZaWRzkzqn16VJ6UQ3WBj9rRyxLDkC+MZLsfxT05bDX6lB0uH7KmG9cScIcilnHY8Qf3QN7YG9UJvoBNjCZ1WBUQ/V2echOgcuhx+XtcdAjqYcqPRxggmp1eCyLVOCRMGPC4X50/co5Pn5q5sU= Received: from CY4PR12MB1768.namprd12.prod.outlook.com (10.175.63.10) by CY4PR12MB1926.namprd12.prod.outlook.com (10.175.82.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.609.10; Wed, 28 Mar 2018 21:12:36 +0000 Received: from CY4PR12MB1768.namprd12.prod.outlook.com ([fe80::4873:8395:24d2:8f6f]) by CY4PR12MB1768.namprd12.prod.outlook.com ([fe80::4873:8395:24d2:8f6f%13]) with mapi id 15.20.0609.012; Wed, 28 Mar 2018 21:12:36 +0000 From: "Moger, Babu" To: =?iso-8859-2?Q?Radim_Kr=E8m=E1=F8?= 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 Thread-Topic: [PATCH v2 3/5] KVM: VMX: Bring the common code to header file Thread-Index: AQHTvWbQNuxdQSk8B0ynPvZatwcbCaPmK1uAgAAMloA= Date: Wed, 28 Mar 2018 21:12:35 +0000 Message-ID: References: <1521232646-79580-1-git-send-email-babu.moger@amd.com> <1521232646-79580-4-git-send-email-babu.moger@amd.com> <20180328202640.GJ26753@flask> In-Reply-To: <20180328202640.GJ26753@flask> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Babu.Moger@amd.com; x-originating-ip: [165.204.77.1] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;CY4PR12MB1926;7:x16xhhdRCF6CCXSXLoJas08UtcwWSPB2bBjLJ7aXX61rNC9tvURoTTfDjFAXz+Vo93F1MWgwp93yYAea0qihUhyts5GpPsEn7dAPUsI4wZQNTmbmlmMKROI0zAn15lnG0yvUeeQrfVFNfzFALqc6b+FIJyMMBRXTH54rABjHtXLMNem2YQUfJUDhARsv6LcgWuLzN7ewYwveK7X/TU4jqj25Ee00ktV9zSOTko7MpnbXuR2/A5VV0cWGRh62Uh2E;20:yCYetWucfk2yp1UibGMPQmiMzDB0Vd9qI1P5JnV2UIYphl8ktosV+kMUzsRzxGaivlr6VxdmmNW7TsshC05GaMPVscNBWzoalq/NhVDrKSftPBM0wAnHjdLQJnFjeC33Jz2qHa51ytQB9ybTDunmcDftdnAHtku9Hz7wAkmo93NkFn2NO64ZkIdLkGLCoXMHy9UqHWm3wPSYNDVrMx70+mNzgtBPGQXoO/liwVVHhXt6orGb/kOCkNIBDBvtjlTr x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 28cf8c2f-22f5-4691-6325-08d594f0a138 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:CY4PR12MB1926; x-ms-traffictypediagnostic: CY4PR12MB1926: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(767451399110); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231221)(944501327)(52105095)(10201501046)(3002001)(93006095)(93001095)(6055026)(6041310)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(6072148)(201708071742011);SRVR:CY4PR12MB1926;BCL:0;PCL:0;RULEID:;SRVR:CY4PR12MB1926; x-forefront-prvs: 06259BA5A2 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(376002)(396003)(346002)(366004)(39380400002)(39860400002)(13464003)(189003)(199004)(377424004)(4326008)(5660300001)(99286004)(316002)(2900100001)(54906003)(7736002)(478600001)(6916009)(33656002)(229853002)(305945005)(6246003)(25786009)(74316002)(53546011)(6506007)(66066001)(5250100002)(53936002)(76176011)(486005)(476003)(11346002)(26005)(486005)(105586002)(81156014)(102836004)(186003)(446003)(72206003)(2906002)(14454004)(68736007)(3660700001)(3280700002)(6116002)(7696005)(3846002)(8676002)(6436002)(81166006)(86362001)(8936002)(55016002)(9686003)(106356001)(97736004);DIR:OUT;SFP:1101;SCL:1;SRVR:CY4PR12MB1926;H:CY4PR12MB1768.namprd12.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: SMdfBLX2ieivrsTBLZA8CJI94vMmnXPy+LxyTHMogUhzYsP6WBT/unec2+8X3bLdEzxmf/4+b0IZ2vshNTzVFk0sa1pwlx4+P+tDAJhLRfxO/OKdSbfSlxnFm7Nz30j5gcvJCDy2YZyB4fThg8WsN8nq0Bm0tkzNJOyf43tNbb6zCARTbYArIt6MFpOS+IJJYWZKWvKWaBjuZ/+NFJ+WPrg7AT7/olYxSBCjHPC2M4BOuJOMh8v4zlk9GACpnHc2HV0iQPUWy+wr7AOtkULwKceFGOFHXlsYbvUdxtwfnnsgTDEvmRKaFVVBk7ZtShXX9SFYsFb4b55q/gWN0xDcqQ== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 28cf8c2f-22f5-4691-6325-08d594f0a138 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Mar 2018 21:12:36.0213 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1926 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Radim Kr=E8m=E1=F8 > Sent: Wednesday, March 28, 2018 3:27 PM > To: Moger, Babu > 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 >=20 > 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 =3D to_vmx(vcpu); > > int old =3D vmx->ple_window; > > > > - vmx->ple_window =3D __shrink_ple_window(old, > > - ple_window_shrink, ple_window); > > + vmx->ple_window =3D __shrink_ple_window(old, ple_window, > > + ple_window_shrink, > > + 0); >=20 > I have preserved the old minumum (ple_window, so we could't get > uselessly small values). Ok. Looks good. Thanks