Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp17866imm; Tue, 12 Jun 2018 17:33:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKJu1+ed1aoK9TBbY4tGTU4jRoXAgtS+Mf8BVN6WgwYU86dPlitX/ZawKn8cL/Gw2lbyVoj X-Received: by 2002:a63:b956:: with SMTP id v22-v6mr2176940pgo.438.1528850002024; Tue, 12 Jun 2018 17:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528850001; cv=none; d=google.com; s=arc-20160816; b=Rr8vgyDwRqgtj+q5UMlX89arqaYjZXbhPW2bMGrNnVhDADtDE13ivFSgdOvaVuvqHp vS1CdTQuKvB0lIF5P+I30tYZrERkT7xIICM3zWkpLIRugkJMyttYrZsKjr13WUAblVxc PFKgMT1lNheNbzGanMNPGtcd/SqnWlk5tj19K8/TrWDmKdgaZF1N1P5QgzWRangFxTvA 0uLPVmgJDANgCmdyIVTwasxye0+pSWoeE+/v/2dOw1iAW+gumyVlYu/Eus82WWXzZ/c9 KTkZNlAfL+Bih691tVllvcCrOo6+QCLFyOH6PRgVi/ywTW/9vQ2A3tx0ptbT49UC/RyQ qJJw== 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 :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from :arc-authentication-results; bh=NAe3GgtTIkeCbAoUKnZjdxDo/HKTuu1Flo4vbxa4V7k=; b=v0l9IH504uQ0K9r+5jjamJSC4Em7ghhsoDL0n+Iz4xH92OK7v8tmpSTSDVGrQyQriF BKXia2YtSc8Q1kAmsEjG6mS/ECuUPf8Dm1CaWhCVY5Yb8VA5fAhLbdN+8RPvP/bMa/4r OprHY79rMKG9bjms2gd2ECn5+hWWFoEPeIe37eB20CTBTBAW7fxNudFR6v8JhmgRUqAO /hAVqG8HMs6zUf1RYME2TAe8Ai6SgLjSdLJwFv8Rxfg7Mey9IpmviZleNoJx9bwWyKhz MBukRzgnHez+br3boMMKYamI79a04SoFKRUuZdsoyd+i2e9nV5EEunuZ9DKs3n0Bi9Y6 2x7Q== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w78-v6si1309696pfa.359.2018.06.12.17.33.07; Tue, 12 Jun 2018 17:33:21 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934688AbeFMAbc (ORCPT + 99 others); Tue, 12 Jun 2018 20:31:32 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:5562 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934860AbeFMAba (ORCPT ); Tue, 12 Jun 2018 20:31:30 -0400 Received: from DGGEML404-HUB.china.huawei.com (unknown [172.30.72.56]) by Forcepoint Email with ESMTP id 8C412A11FB3B0; Wed, 13 Jun 2018 08:31:17 +0800 (CST) Received: from DGGEML511-MBX.china.huawei.com ([169.254.1.61]) by DGGEML404-HUB.china.huawei.com ([fe80::b177:a243:7a69:5ab8%31]) with mapi id 14.03.0382.000; Wed, 13 Jun 2018 08:31:11 +0800 From: "Gonglei (Arei)" To: Farhan Ali , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" CC: "mst@redhat.com" , "qemu-devel@nongnu.org" , longpeng , "pasic@linux.ibm.com" , "frankja@linux.ibm.com" , "borntraeger@de.ibm.com" Subject: RE: [RFC v1 2/2] crypto/virtio-crypto: Register an algo only if it's supported Thread-Topic: [RFC v1 2/2] crypto/virtio-crypto: Register an algo only if it's supported Thread-Index: AQHT/1w9irxqESt7g0CZ2KZ6/sbWPKRawPbggAGZ84CAAQDvIA== Date: Wed, 13 Jun 2018 00:31:10 +0000 Message-ID: <33183CC9F5247A488A2544077AF19020DB018593@dggeml511-mbx.china.huawei.com> References: <33183CC9F5247A488A2544077AF19020DB015ABF@dggeml511-mbx.china.huawei.com> <7957a36b-6881-1967-fa60-eaeaa38256c0@linux.ibm.com> In-Reply-To: <7957a36b-6881-1967-fa60-eaeaa38256c0@linux.ibm.com> Accept-Language: zh-CN, en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.177.18.62] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogRmFyaGFuIEFsaSBbbWFp bHRvOmFsaWZtQGxpbnV4LmlibS5jb21dDQo+IFNlbnQ6IFdlZG5lc2RheSwgSnVuZSAxMywgMjAx OCAxOjA4IEFNDQo+IFRvOiBHb25nbGVpIChBcmVpKSA8YXJlaS5nb25nbGVpQGh1YXdlaS5jb20+ OyBsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnOw0KPiBrdm1Admdlci5rZXJuZWwub3JnDQo+ IENjOiBtc3RAcmVkaGF0LmNvbTsgcWVtdS1kZXZlbEBub25nbnUub3JnOyBsb25ncGVuZw0KPiA8 bG9uZ3BlbmcyQGh1YXdlaS5jb20+OyBwYXNpY0BsaW51eC5pYm0uY29tOyBmcmFua2phQGxpbnV4 LmlibS5jb207DQo+IGJvcm50cmFlZ2VyQGRlLmlibS5jb20NCj4gU3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