Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp1367822pxb; Fri, 21 Jan 2022 16:42:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5wRCIlk3tpQRpcLGfwbGEoQS14jUCIS5EbFSAztEVcT1fJR9kZJx8K0fJMx3MPTEmY4W2 X-Received: by 2002:a17:90a:8808:: with SMTP id s8mr3062478pjn.9.1642812120834; Fri, 21 Jan 2022 16:42:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642812120; cv=none; d=google.com; s=arc-20160816; b=WCVMdIXv4eI524mYK3dY/Zjp31Sjd+mj6dPtey6Cr3G0qorLNaMfL+Ij6kbY8XOSWj 42cIU/WOmDA8+rfx0awOYqD5j8JLspHF5d0ovzeqKwMV5VdRY45yCBxiQn4BD+pgp845 3gcCI1KAQIixpJNcXqs0szt6bkqc9llkfWdT3mZfO9N+yAIpPl4HNixA2650CWpG6DzR 2e1/lm65yL+QTCVlmLvMVglcBs9O8F2ZLcB+7GncUAOJ6gvSigUEf4eJ7igl/sWtwhFV yCNhr0OQLGflzSS2EDW3iUSrUk3krMjvNd1gmlKgpMlGXvlQFq4lmjtGd6qsygfXSHfh jsTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=Vg+SOPZmNDBSo2srvZGPBGSs9M4wMzerK7caF1d+5S8=; b=msjqVKt2bLF4qFh8+k79858k/XDBcRmx3GP5a2sVQRO+NlmoieVVJqpQa5nAVEtm53 L0EVYz2XxhmA2JP2ERTbhqQnWjjPq0IU/5lYiCiSyak72gK3fpOYoLXG/b/wcQyX/j41 FzyAEV1aopQ2maejVG9AaWPkxqFNocUtsUauoE+lZyR1Xu2pL9BtukP8NeizjM+sEj5Q SC3nPbOZiz03tz4U6lT+cEIMwX3jtDnA+Sz6VBIo2hTyfI37+kXJ7uDCqBn8sXFqBRhc yGA09Xf/J75l1q+YMvxZEm7Ag/gqSB1TSoX1vu0OTJUbbmZR9xMxrX5575bwHhf9pnuR nbvA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n1si1610546plf.417.2022.01.21.16.41.49; Fri, 21 Jan 2022 16:42:00 -0800 (PST) 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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234734AbiAUIqc (ORCPT + 99 others); Fri, 21 Jan 2022 03:46:32 -0500 Received: from frasgout.his.huawei.com ([185.176.79.56]:4435 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379676AbiAUIoi (ORCPT ); Fri, 21 Jan 2022 03:44:38 -0500 Received: from fraeml734-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4JgCbl4Kz9z67mwQ; Fri, 21 Jan 2022 16:44:19 +0800 (CST) Received: from lhreml715-chm.china.huawei.com (10.201.108.66) by fraeml734-chm.china.huawei.com (10.206.15.215) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 21 Jan 2022 09:44:35 +0100 Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by lhreml715-chm.china.huawei.com (10.201.108.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Fri, 21 Jan 2022 08:44:35 +0000 Received: from lhreml710-chm.china.huawei.com ([169.254.81.184]) by lhreml710-chm.china.huawei.com ([169.254.81.184]) with mapi id 15.01.2308.021; Fri, 21 Jan 2022 08:44:35 +0000 From: Shameerali Kolothum Thodi To: Reiji Watanabe CC: Linux ARM , "kvmarm@lists.cs.columbia.edu" , "linux-kernel@vger.kernel.org" , "jean-philippe@linaro.org" , Marc Zyngier , Linuxarm , Jonathan Cameron , Catalin Marinas , Will Deacon Subject: RE: [PATCH v4 1/4] KVM: arm64: Introduce a new VMID allocator for KVM Thread-Topic: [PATCH v4 1/4] KVM: arm64: Introduce a new VMID allocator for KVM Thread-Index: AQHX35su0U0y9O5EHEKbE33+2AyGfqxtc72AgAANKrA= Date: Fri, 21 Jan 2022 08:44:35 +0000 Message-ID: <1bca6f5f13424601b431f72a1b1f2319@huawei.com> References: <20211122121844.867-1-shameerali.kolothum.thodi@huawei.com> <20211122121844.867-2-shameerali.kolothum.thodi@huawei.com> In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.84.166] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org DQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogUmVpamkgV2F0YW5hYmUg W21haWx0bzpyZWlqaXdAZ29vZ2xlLmNvbV0NCj4gU2VudDogMjEgSmFudWFyeSAyMDIyIDA3OjM2 DQo+IFRvOiBTaGFtZWVyYWxpIEtvbG90aHVtIFRob2RpIDxzaGFtZWVyYWxpLmtvbG90aHVtLnRo b2RpQGh1YXdla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ArICAgICAgIHU2NCB2bWlkID0gYXRvbWljNjRfcmVhZCgma3ZtX3ZtaWQt PmlkKTsNCj4gPiArICAgICAgIHU2NCBnZW5lcmF0aW9uID0gYXRvbWljNjRfcmVhZCgmdm1pZF9n ZW5lcmF0aW9uKTsNCj4gPiArDQo+ID4gKyAgICAgICBpZiAodm1pZCAhPSAwKSB7DQo+ID4gKyAg ICAgICAgICAgICAgIHU2NCBuZXd2bWlkID0gZ2VuZXJhdGlvbiB8ICh2bWlkICYgflZNSURfTUFT Syk7DQo+ID4gKw0KPiA+ICsgICAgICAgICAgICAgICBpZiAoY2hlY2tfdXBkYXRlX3Jlc2VydmVk X3ZtaWQodm1pZCwgbmV3dm1pZCkpIHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICBhdG9t aWM2NF9zZXQoJmt2bV92bWlkLT5pZCwgbmV3dm1pZCk7DQo+ID4gKyAgICAgICAgICAgICAgICAg ICAgICAgcmV0dXJuIG5ld3ZtaWQ7DQo+ID4gKyAgICAgICAgICAgICAgIH0NCj4gPiArDQo+ID4g KyAgICAgICAgICAgICAgIGlmICghX190ZXN0X2FuZF9zZXRfYml0KHZtaWQyaWR4KHZtaWQpLCB2 bWlkX21hcCkpIHsNCj4gPiArICAgICAgICAgICAgICAgICAgICAgICBhdG9taWM2NF9zZXQoJmt2 bV92bWlkLT5pZCwgbmV3dm1pZCk7DQo+ID4gKyAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJu IG5ld3ZtaWQ7DQo+ID4gKyAgICAgICAgICAgICAgIH0NCj4gPiArICAgICAgIH0NCj4gPiArDQo+ ID4gKyAgICAgICB2bWlkID0gZmluZF9uZXh0X3plcm9fYml0KHZtaWRfbWFwLCBOVU1fVVNFUl9W TUlEUywNCj4gY3VyX2lkeCk7DQo+ID4gKyAgICAgICBpZiAodm1pZCAhPSBOVU1fVVNFUl9WTUlE UykNCj4gPiArICAgICAgICAgICAgICAgZ290byBzZXRfdm1pZDsNCj4gPiArDQo+ID4gKy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