Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965581AbcKJXR3 (ORCPT ); Thu, 10 Nov 2016 18:17:29 -0500 Received: from mail-sn1nam02on0129.outbound.protection.outlook.com ([104.47.36.129]:51469 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S965513AbcKJXR0 (ORCPT ); Thu, 10 Nov 2016 18:17:26 -0500 X-Greylist: delayed 10774 seconds by postgrey-1.27 at vger.kernel.org; Thu, 10 Nov 2016 18:17:26 EST From: "Alex Ng (LIS)" To: Dan Carpenter , KY Srinivasan CC: "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "olaf@aepfle.de" , "apw@canonical.com" , "vkuznets@redhat.com" , "jasowang@redhat.com" , "leann.ogasawara@canonical.com" , Stephen Hemminger Subject: RE: [PATCH V2 08/14] Drivers: hv: balloon: Fix info request to show max page count Thread-Topic: [PATCH V2 08/14] Drivers: hv: balloon: Fix info request to show max page count Thread-Index: AQHSNGvQ2wwgEybzlU+wdrN2cgP+s6DSow+AgAAFBtA= Date: Thu, 10 Nov 2016 19:38:41 +0000 Message-ID: References: <1478030807-5915-1-git-send-email-kys@exchange.microsoft.com> <1478030854-5970-1-git-send-email-kys@exchange.microsoft.com> <1478030854-5970-8-git-send-email-kys@exchange.microsoft.com> <20161110190924.GD28701@mwanda> In-Reply-To: <20161110190924.GD28701@mwanda> 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=alexng@microsoft.com; x-originating-ip: [2001:4898:80e8:7::35d] x-microsoft-exchange-diagnostics: 1;MWHPR03MB2496;7:CbQcm0pTOdfFFV3Ngp39QFuusPvADAwU/Z2+w0lM4+kN2StJ/UO6xpsG74lFQICWjkBXUz7bWU6hLdiPu+D4tjf2LUHzd3jBEQdrnSb0jB6E5seUQCSUimnhH630yIojFNU1DmfNBcMrFI1hUGeLPGLjgNBnBbyFW/iPYyLnveYjq3a7VxRuzHG5ihGDUL3yo22t816oWoE7DvMFFdZt+sUQuvhKyp6NMSjvYgxLBpLekU1aWAnhCCOzFPA2BqlDKJdjzL6Dv+oUjaOjJT1NJaXJjDOIFIq/TCDfxna2UKYagOJO+yzpGz8f8ckpH3+25vpsp9JWH8Pmwsys7AOjvRcUDhDEhA1yF7jA/QIay2uCjT3co60wFz4aek+YNI6H;23:xMPDNEPtglYhobZaQNPk/teRRFQSEANEow8S4WrUIF1RybH7Vjl5yGgsuCVZRjjpyKA4yEYqHbz2EE47UI4l8tkaePKlNu4MZM1SNtHdEHGtUx4YVYaEE1IbNPb5oRmxRE8KK2cv3F08gwAypbRE2Q== x-ms-office365-filtering-correlation-id: bc687f2e-65da-431c-7981-08d409a12ce8 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR03MB2496; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(9452136761055)(140211028294663)(146099531331640)(198206253151910); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(61425038)(6045074)(6060229)(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(61426038)(61427038)(6046074)(6061226);SRVR:MWHPR03MB2496;BCL:0;PCL:0;RULEID:;SRVR:MWHPR03MB2496; x-forefront-prvs: 01221E3973 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(7916002)(3905003)(377454003)(199003)(189002)(24454002)(13464003)(8676002)(3660700001)(81156014)(2906002)(4001430100002)(74316002)(1511001)(4326007)(2950100002)(6862003)(54356999)(93886004)(33656002)(586003)(9686002)(7696004)(8936002)(2421001)(106356001)(229853002)(77096005)(5660300001)(6636002)(2900100001)(7846002)(68736007)(101416001)(76576001)(305945005)(122556002)(76176999)(50986999)(105586002)(7736002)(99286002)(3280700002)(6116002)(106116001)(102836003)(92566002)(86612001)(107886002)(8990500004)(10290500002)(5005710100001)(5001770100001)(86362001)(10090500001)(97736004)(87936001)(81166006)(2561002)(189998001);DIR:OUT;SFP:1102;SCL:1;SRVR:MWHPR03MB2496;H:MWHPR03MB2734.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Nov 2016 19:38:41.1968 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2496 X-OriginatorOrg: microsoft.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id uAANHkgn027061 Content-Length: 2085 Lines: 55 > -----Original Message----- > From: Dan Carpenter [mailto:dan.carpenter@oracle.com] > Sent: Thursday, November 10, 2016 11:09 AM > To: KY Srinivasan > Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; > devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com; > vkuznets@redhat.com; jasowang@redhat.com; > leann.ogasawara@canonical.com; Stephen Hemminger > ; Alex Ng (LIS) ; Alex > Ng (LIS) > Subject: Re: [PATCH V2 08/14] Drivers: hv: balloon: Fix info request to show > max page count > > On Tue, Nov 01, 2016 at 01:07:28PM -0700, kys@exchange.microsoft.com > wrote: > > From: Alex Ng > > > > Balloon driver was only printing the size of the info blob and not the > > actual content. This fixes it so that the info blob (max page count as > > configured in Hyper-V) is printed out. > > > > Signed-off-by: Alex Ng > > Signed-off-by: K. Y. Srinivasan > > --- > > drivers/hv/hv_balloon.c | 9 +++++++-- > > 1 files changed, 7 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/hv/hv_balloon.c b/drivers/hv/hv_balloon.c > > index 8cac29a..14c3dc4 100644 > > --- a/drivers/hv/hv_balloon.c > > +++ b/drivers/hv/hv_balloon.c > > @@ -1034,8 +1034,13 @@ static void process_info(struct > hv_dynmem_device *dm, struct dm_info_msg *msg) > > > > switch (info_hdr->type) { > > case INFO_TYPE_MAX_PAGE_CNT: > > - pr_info("Received INFO_TYPE_MAX_PAGE_CNT\n"); > > - pr_info("Data Size is %d\n", info_hdr->data_size); > > + if (info_hdr->data_size == sizeof(__u64)) { > > + __u64 *max_page_count = (__u64 *)&info_hdr[1]; > > Why __u64 instead of u64? Is this code shared with user space? __u64 was being used in other parts of this code already and I decided to follow that. I wasn't aware of this distinction between the two. This code is not shared in user-space, so perhaps we should clean up this file in a future patch. Thanks for bringing it up. > > regards, > dan carpenter >