From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6ABB6A0350; Tue, 8 Feb 2022 20:57:42 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4AE5C41144; Tue, 8 Feb 2022 20:57:42 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 9AA2641101 for ; Tue, 8 Feb 2022 20:57:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644350260; x=1675886260; h=message-id:date:to:cc:references:from:subject: in-reply-to:content-transfer-encoding:mime-version; bh=NFpZVMPpHxzvcRcS/yIH3ihH9zLGwe1Z/F89w9YtDnA=; b=Sy+VKtFte+iO9rkRYbMHXv8TQ/09IE7cwxuSuHvCbOqocxcVqQGbNthq Uz6pXRogHTSiT6XGxZP/nzA/B+qUzwCpwHVZ7v0HVf8VZh4ygjxrksDAG hSzssOS7ALBna8jl2HZ5PNhtmGRWayoYzIpveiDecHhV/o/aHSG5sgTGX 5wXAfV3S2M35n4jpUE3Pd6iaSKL55GRO4UgOf9DauqAJA20wy7ma3t20M N4rtLSz/09wPqiKZNRBQRhiIjeIBg8FUKCjGBqsRLxDAArpLBBdWyzZ/a KxvpDI3KdFF25kLKwE+hwpc6/JgB+JxfPHE9TShG1/+jooqU5/WPHK7j9 A==; X-IronPort-AV: E=McAfee;i="6200,9189,10252"; a="249245442" X-IronPort-AV: E=Sophos;i="5.88,353,1635231600"; d="scan'208";a="249245442" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2022 11:57:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,353,1635231600"; d="scan'208";a="773236853" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga005.fm.intel.com with ESMTP; 08 Feb 2022 11:57:39 -0800 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Tue, 8 Feb 2022 11:57:39 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Tue, 8 Feb 2022 11:57:39 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.102) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Tue, 8 Feb 2022 11:57:38 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GkD+pj0JAuPOuprK69nsK3lrOU5LuJ/yx6bPoG1c77FfLWbcFbjz+YOnONWe7cA9scVazT9qP1ye26xsC21hA5DSSurFVJsxpC6aOSse4CZIVgoC92/svoFDGcu0BR+kYumkhnCI4pO026U/LjrbtQaTqYQyEKBj9SRnbxnJuCC38md+PEkWPGFqPXbebZ3j6S+zTnYGZ76Uclnf5ICVuNia3lGI5XvyhS1XSo6362Q7SQ966vgaMJDKoNilbnYanVAFx4pUuWwl2swnazgjYbeEQasiqgVNFMsKLI188CXKKduivQZ91V4WhK8zamVKJUv2W6JmgjC9dfMKiDAdVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wZpjWVimCtq8D97CWPt8sNZ/LbkBNf/JBQyvjEXeWy0=; b=QNa8nkO1lk6xd46XnL5OdmskGWaqVFaNm0AdUUkSuxIw4DavQvFPz7QI8KfAaTUEP9MDDAkbwYkTDZ13qu8oD5EVZaobNN8tdN3W0+ane+pnt8rQfmQtp9MGntNUMrJCBGMyxrpu1YYixeAERQgDfbgre8MsKVuUgwXfNmi7b/lB44waVvWRhLvb03x4Z6J/jig2UlVzwsS68q6WjKdUmwpfik15cLRZNt5ILssgJ+FT/DGEFOn7FxZjtpldRe7zNs0iFjwxY+aTMjlGjb9IJLKPHNn+91i+MnADKe49rkfTpeyTr0UgOSu0scc9m1zmcK4PUJHJNssjNJTavtu2VQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) by DM4PR11MB5391.namprd11.prod.outlook.com (2603:10b6:5:396::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4951.12; Tue, 8 Feb 2022 19:57:36 +0000 Received: from PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e]) by PH0PR11MB5000.namprd11.prod.outlook.com ([fe80::5046:8550:928d:850e%7]) with mapi id 15.20.4951.019; Tue, 8 Feb 2022 19:57:36 +0000 Message-ID: Date: Tue, 8 Feb 2022 19:57:30 +0000 Content-Language: en-US To: Maxime Coquelin , Yuan Wang , CC: , , , , References: <20220117162027.927041-1-yuanx.wang@intel.com> <90f3976c-bec7-5ff6-06b1-f1d3cf6618d9@redhat.com> From: Ferruh Yigit Subject: Re: [PATCH] vhost: fix guest physical address to host physical address mapping X-User: ferruhy In-Reply-To: <90f3976c-bec7-5ff6-06b1-f1d3cf6618d9@redhat.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0046.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ac::20) To PH0PR11MB5000.namprd11.prod.outlook.com (2603:10b6:510:41::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: adc39b41-faf1-476e-b413-08d9eb3d40a3 X-MS-TrafficTypeDiagnostic: DM4PR11MB5391:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3968; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cM8brxvR+P0ASIwfbY5K7Kyl/xertXGeps8Ob9FQkdYLY+Bxq+KaGm/n1vn+gOlK2RieTq6G2SYnmKyIOgdCOlHdfmjFfh7/GvI86WzRHOcR1XmEXLwi2y/SASfqS29v6oDP3ANGYh3HwcVbR6KSude+8lxGbhO+GrzzbzTddJIjUh4RMWZ1dtjZZwbBHOKcn/MSSIhb9nM91vFAHHuSjEpG5slslfsL6IMLsZq+gCtubB/Cnq2NcS1ydj6QdOPt7+5ICOwGy4/K5lhL0vhJ4HSFwrkpB93TAeCuyw8yLR/Wf1mwDhoklMOFIz9HfutnfLC6zCP4X7vAKM7tLwNb/b9S0+EQ7ymqhSGbAZIc+HYj5zmUCjDLmKXKQvKHtOwpYYJ5xRHI12cZQmoOZpGUpkUs2Rna/FQ6VgJPAn/wMDXs5fds0Jb0EzKcnysouYVPv5X+fiX9kcpgDvWe/nT8Q66Tzv0TiuWMI4KnJY35pJX5IurOmsgX+2mnTPIhNrJgvX2LFZLn78Qtp9B/CLuLa4UZHRNZX0AWyP1k+7JMVIkAdmhjTB3eQoBTzOOG8NSEz4dItRNkxF3zRqzVm2DuZU3iv/Oo7Iho+4pSUibrybWytHbDXK/z7vPoBoZFlUYIyCFtgKW+jsWwePajEKrYx+YB2l3t9TVxVPheTbROOroOGoluTR2npFyGhBM3gZd0cGxvNezecYmFo+tZ3bgHEQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5000.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(5660300002)(44832011)(4744005)(8676002)(8936002)(66946007)(31686004)(36756003)(2906002)(4326008)(66556008)(66476007)(83380400001)(38100700002)(53546011)(82960400001)(86362001)(6486002)(31696002)(55236004)(107886003)(186003)(110136005)(2616005)(316002)(6636002)(6506007)(6666004)(26005)(6512007)(508600001)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NzE4RUEzSDViaG1wdnNtOXNpMDQ0QzRLRkkzT1RHa0hITVp2TkxjZ0lIak1i?= =?utf-8?B?bmozOU5PQmlhT1RVN1Bady9RL1dFcjBkaTV1M25pbkx0czVZQ2tjMnk1bmtR?= =?utf-8?B?MlRrMjNtQ1pGZkhrQWYwYzJoTWF4SVJBLzB3aW1oTkNGbFIxVkVRRnFJa0pl?= =?utf-8?B?NUV4MW8yeXI2WHhuTW5yZmlXYkk5bjBDclEyOVZXa0VySEFzZ2JYV3Nja0pV?= =?utf-8?B?eXd5QSttV05MelhwTVRrNkhyRUpETmxERmZOa3laOUVOYWx2TTlkclhZVldF?= =?utf-8?B?alFHUCs1ZWVub1dXc1RPZWNEbU8zc1VlQ2o0b295Zlo1WEhzaDlYNEVWZ3pr?= =?utf-8?B?M0hVNnkwT1BiTktpNVd1eW90VjQzdzdRS3JwNHFUV2xkN2RMWFlzcDYweXU3?= =?utf-8?B?bU1XQnZuWVJvYkduY1FjT3N1VlM0eWhHV1BCOHZBRk94aTRWYUN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-Exchange-CrossTenant-AuthSource: PH0PR11MB5000.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Feb 2022 19:57:36.3544 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UMKfqFHsUp2KMTH6As3EIaKoRZDtIfG6jN2TRawx3VWTQosLPYk1tr/MyS0BVvz+rO9Aj9zVcVewpRTO9NpbYA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB5391 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 2/8/2022 11:11 AM, Maxime Coquelin wrote: > > > On 1/17/22 17:20, Yuan Wang wrote: >> Async copy fails when looking up hpa in the gpa to hpa mapping table. >> This happens because the gpa is matched exactly in the merged >> mapping table, and the merge loses the mapping entries. >> A new range comparison method is introduced to solve this issue. >> >> Fixes: 6563cf92380 ("vhost: fix async copy on multi-page buffers") >> >> Signed-off-by: Yuan Wang >> --- >>   lib/vhost/vhost.h | 18 ++++++++++++++++-- >>   1 file changed, 16 insertions(+), 2 deletions(-) >> > > Applied to dpdk-next-virtio/main. > Is it candidate for Cc: stable@dpdk.org backport? adding stable tag in the next-net, please comment if it shouldn't.