From patchwork Wed Feb 20 05:10:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dexuan Cui X-Patchwork-Id: 10821175 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8ED666C2 for ; Wed, 20 Feb 2019 05:10:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 712752DEC3 for ; Wed, 20 Feb 2019 05:10:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F6AF2DEBE; Wed, 20 Feb 2019 05:10:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F35612DEBE for ; Wed, 20 Feb 2019 05:10:15 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id ADE9A208AE99C; Tue, 19 Feb 2019 21:10:15 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.107.132.97; helo=apc01-pu1-obe.outbound.protection.outlook.com; envelope-from=decui@microsoft.com; receiver=linux-nvdimm@lists.01.org Received: from APC01-PU1-obe.outbound.protection.outlook.com (mail-eopbgr1320097.outbound.protection.outlook.com [40.107.132.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1B16A208AE2C4 for ; Tue, 19 Feb 2019 21:10:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9t8hB3jSg8v8WDYfGMc/KsycGtl3V4xKM0nIQ4QqxRk=; b=mLdn0qKhoH7F7p0fD8n0FscvvkNedRxjojS+lX4sBYV0nBZgE8wr+juoB8vvxTPjvRdVgAjxTjdjFjw9qKWPraxIYkHHGrxhgl7VfE5tjBrl0z+oRsgSiroyr7wdjEhfA+q//+/dulnXaFs+iweW1AToUDseoIcNa12ieu5pt5A= Received: from PU1P153MB0169.APCP153.PROD.OUTLOOK.COM (10.170.189.13) by PU1P153MB0105.APCP153.PROD.OUTLOOK.COM (10.170.188.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1665.0; Wed, 20 Feb 2019 05:10:09 +0000 Received: from PU1P153MB0169.APCP153.PROD.OUTLOOK.COM ([fe80::7822:a20:e63c:de2f]) by PU1P153MB0169.APCP153.PROD.OUTLOOK.COM ([fe80::7822:a20:e63c:de2f%9]) with mapi id 15.20.1665.002; Wed, 20 Feb 2019 05:10:09 +0000 From: Dexuan Cui To: Dave Jiang , Vishal Verma , Dan Williams , "linux-nvdimm@lists.01.org" , Michael Kelley , "qi.fuli@fujitsu.com" , Johannes Thumshirn Subject: [ndctl PATCH v2 0/4] add the support for NVDIMM_FAMILY_HYPERV Thread-Topic: [ndctl PATCH v2 0/4] add the support for NVDIMM_FAMILY_HYPERV Thread-Index: AdTI2l+2Yn2+KTTVSSO7pXl36z4/Eg== Date: Wed, 20 Feb 2019 05:10:09 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Enabled=True; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SiteId=72f988bf-86f1-41af-91ab-2d7cd011db47; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Owner=decui@microsoft.com; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_SetDate=2019-02-20T05:10:07.3159866Z; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Name=General; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Application=Microsoft Azure Information Protection; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_ActionId=fe398d49-66c7-451c-afa8-9c5c70c34af0; MSIP_Label_f42aa342-8706-4288-bd11-ebb85995028c_Extended_MSFT_Method=Automatic x-originating-ip: [2001:4898:80e8:9:e09f:1351:8c90:7b8c] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 510f4ced-c9f5-496d-54f3-08d696f1afaf x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600126)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:PU1P153MB0105; x-ms-traffictypediagnostic: PU1P153MB0105: x-ms-exchange-purlcount: 1 x-microsoft-exchange-diagnostics: =?us-ascii?Q?1; PU1P153MB0105; 23:097kV6z03+AdCfgquWoHrB0BelUXLfB3scjrlu0qI?= fgtadfxarsPb59r6zdr1wDpb7CVuuNnP/k/haI9Iv6FmlhdixcgaGYFhz3CqoodKzM29JDzl3GsPDq8biNDw6i4KsZE0B5zikFTEXsPGEBVwlngpam0ABoRRGl6z+avveTgIuuFLNZ1VtIqGkhIHBWBJ9zCPnhnCs+hOYgKhN1rIvuTkqV6wPoIJ347B7qV+F99NlBj++aMIVqjr1Yt8hUp0y6QpmXHr3JNDe1HO10MKaU0q8mU5HauyZg9bJut2nh72p4sNpXaRyv701r8icC/o2qtKAIU3dJCmEARXUj0DzROo1ZWartysdrSbqvX0w/Qtu36rjnu3a4/08miD0uQrUh1zlsQXJ5LMaf0v+P+pCwQSBH7dh3MXWpBOOqbXLR+Wetyk/ytA/kjrReyB1KozzQGy9aVI1W8Bd/axWAv/Bc2Tg9WHLBCkyOoEpynMoD9DaNUxtDz1S1ZpFWB2kumv+veRpZm5Yv9RL7/b7IL92G1H8rtNVp6+Nlz6QitgLmm3nv7kbAiMj/esPhUioNBrssNCprghZ8bbLkFND6sShbIJj3CMfLaH4cKsyclDQ9TyFnZeShk3Tm1Tz93mpQSkwVVaZaT/xP++hK0QSFaGXWLn5vPygOj6ltxY0QlXkwS0sBngH+EKS0lgFext4+KcyqKUGnXxPfhoxVYfRjSKGMtCfa9tBupsZFF1fWK82DTuzMwjhmaZsEqNf2A1hVtKuv5bhtwaMsOt9AyUZyBXGuDPoWCCvfsizzitOh5NsnChVcFqVaQqRrwiW9RgAIMu0ZWWzyI07KhzAgvLKy6tyQ4/1ZXWHKVfWrWnCCUMzKfiHJpb+77jVNaelmnT0PbsvjAw5/c2kRyZ1TXZVLJCi+mHOmfZePdsgpRRUCAhT86fjF1Nwc4ymyFJji9LXcmw/TUh/WoWA0JuAFctKRKvfd2xtTjW7rXwFO1Sul+oa/bo9XybVuXNwyHr7BrBSBUPndAKOY90HUc3YjjwlnaI9MaAW7ItuARAxkgQQLyJC1fimwmLpH0/bsB5zpws9e42oI6BTYtWnVyKfGnHkxTjwNN+hrMoKi2j0CPcKgBgLOyPAEfNdF6b2enghkz42wyh83gdKeNh8lHfwbVOjaYHohXELvhslblzZtyMXEMUGgUyxgtGxSTwrkd9DV/NrNjtFX7VgWSs+0UePwHdQxliXCf9x5VGnMIYSzsltTPh58= x-microsoft-antispam-prvs: x-forefront-prvs: 0954EE4910 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(366004)(346002)(376002)(136003)(396003)(189003)(199004)(33656002)(478600001)(110136005)(316002)(14454004)(22452003)(106356001)(2906002)(46003)(8990500004)(6506007)(476003)(486006)(71200400001)(71190400001)(14444005)(256004)(186003)(6116002)(105586002)(10290500003)(68736007)(1511001)(97736004)(10090500001)(966005)(6346003)(102836004)(9686003)(6436002)(8676002)(55016002)(5660300002)(81156014)(6306002)(7736002)(305945005)(7696005)(86612001)(25786009)(53936002)(2501003)(74316002)(99286004)(86362001)(8936002)(81166006); DIR:OUT; SFP:1102; SCL:1; SRVR:PU1P153MB0105; H:PU1P153MB0169.APCP153.PROD.OUTLOOK.COM; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) authentication-results: spf=none (sender IP is ) smtp.mailfrom=decui@microsoft.com; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 2tMlbu3L0ak+uhpRtY3E+L5Ul7YIEPY6uUCrb7+uoL5Y8za3EnoTXbV+cUMNkx17xuvgkyZ5Pb/7gVfmT+BLB0Df0OiB3qQt2e+5cak2q4A/mYzfOfuOJUE6/wX/Z64eFH1mOusFa2Q0nLHa+XmYF3AzNLCV7dAvHZRtpZN1iVmec0RM/X0rOKR4kvO/SoZ7FTmvdUvBRlJ5CNlBxs07u3BD09WbgEmNwdx82PL3jqpgv1tQnFWDotQZOFEDZZEa3KrmAyvMR1RGoAFlnr7sW5cLGquhOFV6ik2NQoIvAhV2yWZX5k70NL/tk5LHO5a2hF50Y52oowHAML6Ll7qC1+mMcJGEVCbKjCRAlMRuaqJKJ6UYQtwcfV1Wgbdk7XZMBbbhccn/L51MYqALNlS4CKydm9+EzdJLdx0dJ6VjP+8= MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 510f4ced-c9f5-496d-54f3-08d696f1afaf X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Feb 2019 05:10:09.3744 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: PU1P153MB0105 X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Virus-Scanned: ClamAV using ClamSMTP NVDIMM_FAMILY_HYPERV has been supported on this branch of the kernel: https://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm.git/log/?h=libnvdimm-pending Now, let's add the ndctl part as well. Patch 0001 and 0002 have been posted on Feb 5, and this is just a resend. Patch 0003 and 0004 are a split version of the single patch I posted on Feb 14. In v2, I split the single patch into 2 separate patches for easy review, and I also added an explicit warning if the user specifies unsupported events for "ndctl monitor". Thanks Qi Fuli for the suggestion, and thanks Johannes Thumshirn for reviewing the patch! Please review the new patchset. Thanks! Dexuan Cui (4): libndctl: add support for NVDIMM_FAMILY_HYPERV's _DSM Function 1 libndctl: NVDIMM_FAMILY_HYPERV: add .smart_get_shutdown_count (Function 2) ndctl, lib: implement ndctl_dimm_get_cmd_family() ndctl, monitor: support NVDIMM_FAMILY_HYPERV ndctl/lib/Makefile.am | 1 + ndctl/lib/hyperv.c | 177 +++++++++++++++++++++++++++++++++++++++++ ndctl/lib/hyperv.h | 58 ++++++++++++++ ndctl/lib/libndctl.c | 7 ++ ndctl/lib/libndctl.sym | 1 + ndctl/lib/private.h | 3 + ndctl/libndctl.h | 1 + ndctl/monitor.c | 42 ++++++++-- ndctl/ndctl.h | 1 + 9 files changed, 284 insertions(+), 7 deletions(-) create mode 100644 ndctl/lib/hyperv.c create mode 100644 ndctl/lib/hyperv.h