Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1322411pxu; Fri, 16 Oct 2020 09:09:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyXWFGfL92wbNxKfqRJh1OtWR0MXBvXsO7ulEI3CM5b2f9RVs6a1UDvYLyfVEiQSYdwv5h X-Received: by 2002:aa7:dac4:: with SMTP id x4mr4714995eds.165.1602864572572; Fri, 16 Oct 2020 09:09:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602864572; cv=none; d=google.com; s=arc-20160816; b=XnofP9U1Xt3cy2DOFCBsOVy0yu4hApNq8S+5jgG0XLp+Em0NRQyhXOqzmrOhTov5SR AVmPcFxa8k2/TIc8NLUldB5+MCayJWEn2tnODj+TggMVyTNQDaBV+Q669olKIOu5Iqey JcHmWrkUzNYjtcdKNOMz+GvvSFc8nk4G8mnrTqE24b30wjILBSq/Ik3VuQBX/zztL/bZ Atbn8006xfaopPwKkBVW8YSkYlciT0THz5KcKWKBBMlmysW+aiPu3zr/GrsVe4YXVLOu YYsgT5PdPkNF2hHLHorOMJDCvUL1Nv5kU3rIRDtM/t0skkiSF9fIKTJwAb6JiG78jd/h anTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=0bvCI9qhgwDNOXyioSYQAvjCrO8LtTi3PmpddE+7JiI=; b=jKnfyUiL2vVMBn3K4qLU2dnbjKqhtEv8MnPxS2Ok4B7ADMjaBvScctgOQVFZsIXGGd 66mBI7SbTM53eS43Z7/sMkVv8nQYiDuYKUdrxcPhaY5UKycxTxI7v7OE1jP6oavS/vbo mmz7of61D1iTrPUHyihqK2kLOlKKtJXkJZ8XY7GRoxxlSb07zQyHqz4W33Tct9XkKYiU lwL98Mm86oZ6EsY0NxyW8NaYO5V6UiHoBZQO2zpmAXBWWLs3uoYIAqQZwxBg+POxV/qb H4H5HwE6+LPmGUA37cRva5rXUtuJPzS7ykyInSgS+oTNZHaifLA5q0qFquRFr5aFx4fn uZsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=KvA+HaFG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d2si2014691ejm.716.2020.10.16.09.09.08; Fri, 16 Oct 2020 09:09:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=KvA+HaFG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2409679AbgJPPAc (ORCPT + 99 others); Fri, 16 Oct 2020 11:00:32 -0400 Received: from smtp-fw-33001.amazon.com ([207.171.190.10]:13994 "EHLO smtp-fw-33001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409656AbgJPPAb (ORCPT ); Fri, 16 Oct 2020 11:00:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1602860429; x=1634396429; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:mime-version: content-transfer-encoding; bh=0bvCI9qhgwDNOXyioSYQAvjCrO8LtTi3PmpddE+7JiI=; b=KvA+HaFGAJpHIyEZgyYqneW5OlHoOSfvkG4HVX9nPjhBKorxq7QGAyFt c8k6kBiQvBuT+agyIVBZnBpSgHhpE0Lke/CZuI9UA6ZEQid94prAcTJ8i 76LP06OQEmXa6nyir1D4tuxAPgXx0DI0+7y4EL1hvdbiKRZmZ/Ffq75bX o=; X-IronPort-AV: E=Sophos;i="5.77,383,1596499200"; d="scan'208";a="84074977" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-1a-af6a10df.us-east-1.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-33001.sea14.amazon.com with ESMTP; 16 Oct 2020 15:00:19 +0000 Received: from EX13D07EUB001.ant.amazon.com (iad12-ws-svc-p26-lb9-vlan2.iad.amazon.com [10.40.163.34]) by email-inbound-relay-1a-af6a10df.us-east-1.amazon.com (Postfix) with ESMTPS id F250BA19A1; Fri, 16 Oct 2020 15:00:13 +0000 (UTC) Received: from EX13D08EUB004.ant.amazon.com (10.43.166.158) by EX13D07EUB001.ant.amazon.com (10.43.166.214) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 16 Oct 2020 15:00:12 +0000 Received: from EX13D08EUB004.ant.amazon.com ([10.43.166.158]) by EX13D08EUB004.ant.amazon.com ([10.43.166.158]) with mapi id 15.00.1497.006; Fri, 16 Oct 2020 15:00:12 +0000 From: "Catangiu, Adrian Costin" To: "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "virtualization@lists.linux-foundation.org" CC: "Graf (AWS), Alexander" , "MacCarthaigh, Colm" , "Woodhouse, David" , "bonzini@gnu.org" , "Singh, Balbir" , "Weiss, Radu" , "oridgar@gmail.com" , "ghammer@redhat.com" , "corbet@lwn.net" , "gregkh@linuxfoundation.org" , "mst@redhat.com" , "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" , Jann Horn , Michal Hocko , "Rafael J. Wysocki" , Pavel Machek Subject: Re: [PATCH] drivers/virt: vmgenid: add vm generation id driver Thread-Topic: [PATCH] drivers/virt: vmgenid: add vm generation id driver Thread-Index: AQHWo8lIfZnFKGe8nkGmhTCXwq5R36mahM6A Date: Fri, 16 Oct 2020 15:00:12 +0000 Message-ID: References: <788878CE-2578-4991-A5A6-669DCABAC2F2@amazon.com> In-Reply-To: <788878CE-2578-4991-A5A6-669DCABAC2F2@amazon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.43.166.12] Content-Type: text/plain; charset="utf-8" Content-ID: <625B216E1C4A04429A230313B4D7F26D@amazon.com> MIME-Version: 1.0 Content-Transfer-Encoding: base64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org U29ycnksIEkgZm9yZ290IHRvIGFkZCBhIGZldyBwZW9wbGUgaW50ZXJlc3RlZCBpbiB0aGlzIGFu ZCB0aGUgS1ZNIE1MIHRvIENDLiBBZGRlZCB0aGVtLg0KDQrvu79PbiAxNi8xMC8yMDIwLCAxNzoz MywgIkNhdGFuZ2l1LCBBZHJpYW4gQ29zdGluIiA8YWNhdGFuQGFtYXpvbi5jb20+IHdyb3RlOg0K DQogICAgLSBCYWNrZ3JvdW5kDQogICAgDQogICAgVGhlIFZNIEdlbmVyYXRpb24gSUQgaXMgYSBm ZWF0dXJlIGRlZmluZWQgYnkgTWljcm9zb2Z0IChwYXBlcjoNCiAgICBodHRwOi8vZ28ubWljcm9z b2Z0LmNvbS9md2xpbmsvP0xpbmtJZD0yNjA3MDkpIGFuZCBzdXBwb3J0ZWQgYnkNCiAgICBtdWx0 aXBsZSBoeXBlcnZpc29yIHZlbmRvcnMuDQogICAgDQogICAgVGhlIGZlYXR1cmUgaXMgcmVxdWly ZWQgaW4gdmlydHVhbGl6ZWQgZW52aXJvbm1lbnRzIGJ5IGFwcHMgdGhhdCB3b3JrDQogICAgd2l0 aCBsb2NhbCBjb3BpZXMvY2FjaGVzIG9mIHdvcmxkLX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y8gU1BEWC1MaWNlbnNlLUlkZW50aWZpZXI6IEdQTC0yLjANCiAgICArLyoNCiAgICArICog VmlydHVhbCBNYWNoaW5lIEdlbmVyYXRpb24gSUQgZHJpdmVyDQogICAgKyAqDQogICAgKyAqIENv cHlyaWdodCAoQykgMjAxOCBSZWQgSGF0IEluYywgQ29weXJpZ2h0IChDKSAyMDIwIEFtYXpvbi5j b20gSW5jDQogICAgKyAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuDQogICAgKyAqCUF1dGhvcnM6DQog ICAgKyAqCSAgQWRyaWFuIENhdGFuZ2l1IDxhY2F0YW5AYW1hem9uLmNvbT4NCiAgICArICoJICBP ciBJZGdhciA8b3JpZGdhckBnbWFpbC5jb20+DQogICAgKyAqCSAgR2FsIEhhbW1lciA8Z2hhbW1l ckByZWRoYXQuY29tPg0KICAgICsgKg0KICAgICsgKi8NCiAgICArI2luY2x1ZGUgPGxpbnV4L2Fj cGkuaD4NCiAgICArI2luY2x1ZGUgPGxpbnV4L2NkZXYuaD4NCiAgICArI2luY2x1ZGUgPGxpbnV4 L2tlcm5lbC5oPg0KICAgICsjaW5jbHVkZSA8bGludXgvbW0uaD4NCiAgICArI2luY2x1ZGUgPGxp bnV4L21vZHVsZS5oPg0KICAgICsjaW5jbHVkZSA8bGludXgvcG9sbC5oPg0KICAgICsjaW5jbHVk ZSA8bGludXgvdXVpZC5oPg0KICAgICsjaW5jbHVkZSA8bGludXgvdm1nZW5pZC5oPg0KICAgICsN CiAgICArI2RlZmluZSBERVZfTkFNRSAidm1nZW5pZCINCiAgICArQUNQSV9NT0RVTEVfTkFNRShE RVZfTkFNRSk7DQogICAgKw0KICAgICtzdHJ1Y3QgZGV2X2RhdGEgew0KICAgICsJc3RydWN0IGNk ZXYgICAgICAgY2RldjsNCiAgICArCWRldl90ICAgICAgICAgICAgIGRldl9pZDsNCiAgICArCXVu c2lnbmVkIGxvbmcgICAgIG1hcF9idWY7DQogICAgKw0KICAgICsJdm9pZCAgICAgIC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EgPQ0KICAgICsJCShzdHJ1Y3QgZmlsZV9kYXRhICopIGZpbGUtPnByaXZhdGVfZGF0 YTsNCiAgICArCXN0cnVjdCBkZXZfZGF0YSAqcHJpdiA9IGZpbGVfZGF0YS0+ZGV2X2RhdGE7DQog ICAgKwlzdHJ1Y3QgdGltZXNwZWMgX191c2VyICp0aW1lb3V0ID0gKHZvaWQgKikgYXJnOw0KICAg ICsJc3RydWN0IHRpbWVzcGVjIGt0czsNCiAgICArCWt0aW1lX3QgdW50aWw7DQogICAgKwlpbnQg cmV0Ow0KICAgICsNCiAgICArCXN3aXRjaCAoY21kKSB7DQogICAgKwljYXNlIFZNR0VOSURfR0VU X09VVERBVEVEX1dBVENIRVJTOg0KICAgICsJCXJldCA9IGF0b21pY19yZWFkKCZwcml2LT5vdXRk YXRlZF93YXRjaGVycyk7DQogICAgKwkJYnJlYWs7DQogICAgKwljYXNlIFZNR0VOSURfV0FJVF9X QVRDSEVSUzoNCiAgICArCQlpZiAodGltZW91dCkgew0KICAgICsJCQlyZXQgPSBjb3B5X2Zyb21f dXNlcigma3RzLCB0aW1lb3V0LCBzaXplb2Yoa3RzKSk7DQogICAgKwkJCWlmIChyZXQpDQogICAg KwkJCQlyZXR1cm4gLUVGQVVMVDsNCiAgICArCQkJdW50aWwgPSB0aW1lc3BlY190b19rdGltZShr dHMpOw0KICAgICsJCX0gZWxzZSB7DQogICAgKwkJCXVudGlsID0gS1RJTUVfTUFYOw0KICAgICsJ CX0NCiAgICArDQogICAgKwkJcmV0ID0gd2FpdF9ldmVudF9pbnRlcnJ1cHRpYmxlX2hydGltZW91 dCgNCiAgICArCQkJcHJpdi0+b3V0ZGF0ZWRfd2FpdCwNCiAgICArCQkJIWF0b21pY19yZWFkKCZw cml2LT5vdXRkYXRlZF93YXRjaGVycyksDQogICAgKwkJCXVudGlsDQogICAgKwkJKTsNCiAgICAr CQlicmVhazsNCiAgICArCWRlZmF1bHQ6DQogICAgKwkJcmV0ID0gLUVJTlZBTDsNC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4JWxseCwgc2l6ZSAldSIsDQogICAgKwkJCSAgIHBoeXNfYWRk ciwNCiAgICArCQkJICAgKHUzMilzaXplb2YodXVpZF90KSk7DQogICAgKwkJcmV0dXJuIC1FTk9N RU07DQogICAgKwl9DQogICAgKw0KICAgICsJbWVtY3B5X2Zyb21pbygmcHJpdi0+dXVpZCwgcHJp di0+dXVpZF9pb21hcCwgc2l6ZW9mKHV1aWRfdCkpOw0KICAgICsJbWVtY3B5KCh2b2lkICopIHBy aXYtPm1hcF9idWYsICZwcml2LT51dWlkLCBzaXplb2YodXVpZF90KSk7DQogICAgKw0KICAgICsJ cmV0dXJuIDA7DQogICAgK30NCiAgICArDQogICAgK3N0YXRpYyBpbnQgdm1nZW5pZF9hY3BpX2Fk ZChzdHJ1Y3QgYWNwaV9kZXZpY2UgKmRldmljZSkNCiAgICArew0KICAgICsJaW50IHJldDsNCiAg ICArCXN0cnVjdCBkZXZfZGF0YSAqcHJpdjsNCiAgICArDQogICAgKwlpZiAoIWRldmljZSkNCiAg ICArCQlyZXR1cm4gLUVJTlZBTDsNCiAgICArDQogICAgKwlwcml2ID0ga3phbGxvYyhzaXplb2Yo c3RydWN0IGRldl9kYXRhKSwgR0ZQX0tFUk5FTCk7DQogICAgKwlpZiAoIXByaXYpDQogICAgKwkJ cmV0dXJuIC1FTk9NRU07DQogICAgKw0KICAgICsJcHJpdi0+bWFwX2J1ZiA9IGdldF96ZXJvZWRf cGFnZShHRlBfS0VSTkVMKTsNCiAgICArCWlmICghcHJpdi0+bWFwX2J1Zikgew0KICAgICsJCXJl dCA9IC1FTk9NRU07DQogICAgKwkJZ290byBmcmVlOw0KICAgICsJfQ0KICAgICsNCiAgICArCWRl dmljZS0+ZHJpdmVyX2RhdGEgPSBwcml2Ow0KICAgICsNCiAgICArCWluaXRfd2FpdHF1ZXVlX2hl YWQoJnByaXYtPnJlYWRfd2FpdCk7DQogICAgKwlhdG9taWNfc2V0KCZwcml2LT53YXRjaGVycywg MCk7DQogICAgKwlhdG9taWNfc2V0KCZwcml2LT5vdXRkYXRlZF93YXRjaGVycywgMCk7DQogICAg Kwlpbml0X3dhaXRxdWV1ZV9oZWFkKCZwcml2LT5vdXRkYXRlZF93YWl0KTsNCiAgICArDQogICAg KwlyZXQgPSB2bWdlbmlkX2FjcGlfbWFwKHByaXYsIGRldmljZS0+aGFuZGxlKTsNCiAgICArCWlm IChyZXQgPCAwKQ0KICAgICsJCWdvdG8gZXJyOw0KICAgICsNCiAgICArCXJldCA9IGFsbG9jX2No cmRldl9yZWdpb24oJnByaXYtPmRldl9pZCwgMCwgMSwgREVWX05BTUUpOw0KICAgICsJaWYgKHJl dCA8IDApIHsNCiAgICArCQlwcl9lcnIoImFsbG9jX2NocmRldl9yZWdpb24oKSBmYWlsZWQgZm9y IHZtZ2VuaWRcbiIpOw0KICAgICsJCWdvdG8gZXJyOw0KICAgICsJfQ0KICAgICsNCiAgICArCWNk ZXZfaW5pdCgmcHJpdi0+Y2RldiwgJmZvcHMpOw0KICAgICsJY2Rldl9hZGQoJnByaXYtPmNkZXYs IHByaXYtPmRldl9pZCwgMSk7DQogICAgKw0KICAgICsJcmV0dXJuIDA7DQogICAgKw0KICAgICtl cnI6DQogICAgKwlpZiAocHJpdi0+dXVpZF9pb21hcCkNCiAgICArCQlhY3BpX29zX3VubWFwX21l bW9yeShwcml2LT51dWlkX2lvbWFwLCBzaXplb2YodXVpZF90KSk7DQogICAgKw0KICAgICsJZnJl ZV9wYWdlcyhwcml2LT5tYXBfYnVmLCAwKTsNCiAgICArDQogICAgK2ZyZWU6DQogICAgKwlrZnJl ZShwcml2KTsNCiAgICArDQogICAgKwlyZXR1cm4gcmV0Ow0KICAgICt9DQogICAgKw0KICAgICtz dGF0aWMgaW50IHZtZ2VuaWRfYWNwaV9yZW1vdmUoc3RydWN0IGFjcGlfZGV2aWNlICpkZXZpY2Up DQogICAgK3sNCiAgICArCXN0cnVjdCBkZXZfZGF0YSAqcHJpdjsNCiAgICArDQogICAgKwlpZiAo I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