From nobody Mon May 20 13:01:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1685362346; cv=none; d=zohomail.com; s=zohoarc; b=nEJ8jm4BeUON+cascYrkp7/SXgeOdqWakoI/Pawbg2rIoJO0bMrfjcZx+ysXphn8DyX3QboxaqTKT7t9ujxecGqSjtsWDoQmk1cOEhe4Wk4TgGn4SVXR1t0rFJotJ0nCg3ZiuYln+tVy/2U9NMDg6fVTeNkiSDR0bFBvM40AxcU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685362346; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=3OsXxxnXNwnjmJq/rnH9B3J2bdp80uT/CjFz88Pf7PI=; b=Vlev8v7i2To/73yhdowLkAFyw5b3o6lR6FBxgfRLCCP/KXJPzI6TI4JZ9a8psRtMXOw17y6WE/H9aiT3aHIunPUecqHc0e7ueB7PZOVlGhLxNUUNawyrMAVMByFjV6aycKV0QgFuvzvEiQQuXHye/a71D9Af/HPvIdoNsHb45gE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1685362346710866.2393933493023; Mon, 29 May 2023 05:12:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3biw-0006vO-Sm; Mon, 29 May 2023 08:11:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3biu-0006vC-Tt for qemu-devel@nongnu.org; Mon, 29 May 2023 08:11:40 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3bis-0003OB-Q7 for qemu-devel@nongnu.org; Mon, 29 May 2023 08:11:40 -0400 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34T7TOJ2031168; Mon, 29 May 2023 12:11:35 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qvhmegu7r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 May 2023 12:11:34 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 34TAGBXL026104; Mon, 29 May 2023 12:11:34 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3qu8a92m8u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 May 2023 12:11:34 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34TCBVLQ038099; Mon, 29 May 2023 12:11:33 GMT Received: from joaomart-mac.uk.oracle.com (dhcp-10-175-183-111.vpn.oracle.com [10.175.183.111]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3qu8a92m66-2; Mon, 29 May 2023 12:11:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-03-30; bh=3OsXxxnXNwnjmJq/rnH9B3J2bdp80uT/CjFz88Pf7PI=; b=VJLxuLvwBMk+u0MB5tNBvLGlQ9zIxiYxcbP3tiMGLI15g4Ah/mmih5eZYNIEGd7/S+kJ 7F7UjKh8wFEe5DTO3Q3EL5U8mLA6p8BcChhoyFerEN0Z/zdmLUbqNTDQlA9lh2bZ3EPU DCzvpvjghgPN0xlmCGvnNSqEz2mpmjUedbb0VbMIFHX5Y6rY4OcK3wIIiiHJ1stGKMgX KMuiuGKN1ts+Y32nNiUEK7ZzDFk3entLXEJG1CyLBKg++9nFcgY0qWXjI5GrSpcIWI3c 5wS4yyaeLXhWSBuiQxvWSonPcE8guhWAxqJ+1OsrxisZIim7gxlMdnZoBB2kD1JFvxpn Hg== From: Joao Martins To: qemu-devel@nongnu.org Cc: Alex Williamson , Cedric Le Goater , Paolo Bonzini , Peter Xu , David Hildenbrand , Philippe Mathieu-Daude , Avihai Horon , Joao Martins Subject: [PATCH v3 1/2] exec/ram_addr: return nr of dirty pages in cpu_physical_memory_set_dirty_lebitmap() Date: Mon, 29 May 2023 13:11:13 +0100 Message-Id: <20230529121114.5038-2-joao.m.martins@oracle.com> In-Reply-To: <20230529121114.5038-1-joao.m.martins@oracle.com> References: <20230529121114.5038-1-joao.m.martins@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-29_08,2023-05-25_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 spamscore=0 adultscore=0 mlxlogscore=999 bulkscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305290105 X-Proofpoint-ORIG-GUID: faRIOuRUqZ_dt2qmXwiTvyBtkpVqrbXv X-Proofpoint-GUID: faRIOuRUqZ_dt2qmXwiTvyBtkpVqrbXv Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.220.177.32; envelope-from=joao.m.martins@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @oracle.com) X-ZM-MESSAGEID: 1685362348378100005 Content-Type: text/plain; charset="utf-8" In preparation for including the number of dirty pages in the vfio_get_dirty_bitmap() tracepoint, return the number of dirty pages in cpu_physical_memory_set_dirty_lebitmap() similar to cpu_physical_memory_sync_dirty_bitmap(). To avoid counting twice when GLOBAL_DIRTY_RATE is enabled, stash the number of bits set per bitmap quad in a variable (@nbits) and reuse it there. Signed-off-by: Joao Martins Reviewed-by: Peter Xu Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- include/exec/ram_addr.h | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h index 90a82692904f..9f2e3893f562 100644 --- a/include/exec/ram_addr.h +++ b/include/exec/ram_addr.h @@ -334,14 +334,23 @@ static inline void cpu_physical_memory_set_dirty_rang= e(ram_addr_t start, } =20 #if !defined(_WIN32) -static inline void cpu_physical_memory_set_dirty_lebitmap(unsigned long *b= itmap, - ram_addr_t start, - ram_addr_t pages) + +/* + * Contrary to cpu_physical_memory_sync_dirty_bitmap() this function retur= ns + * the number of dirty pages in @bitmap passed as argument. On the other h= and, + * cpu_physical_memory_sync_dirty_bitmap() returns newly dirtied pages that + * weren't set in the global migration bitmap. + */ +static inline +uint64_t cpu_physical_memory_set_dirty_lebitmap(unsigned long *bitmap, + ram_addr_t start, + ram_addr_t pages) { unsigned long i, j; - unsigned long page_number, c; + unsigned long page_number, c, nbits; hwaddr addr; ram_addr_t ram_addr; + uint64_t num_dirty =3D 0; unsigned long len =3D (pages + HOST_LONG_BITS - 1) / HOST_LONG_BITS; unsigned long hpratio =3D qemu_real_host_page_size() / TARGET_PAGE_SIZ= E; unsigned long page =3D BIT_WORD(start >> TARGET_PAGE_BITS); @@ -369,6 +378,7 @@ static inline void cpu_physical_memory_set_dirty_lebitm= ap(unsigned long *bitmap, if (bitmap[k]) { unsigned long temp =3D leul_to_cpu(bitmap[k]); =20 + nbits =3D ctpopl(temp); qatomic_or(&blocks[DIRTY_MEMORY_VGA][idx][offset], tem= p); =20 if (global_dirty_tracking) { @@ -377,10 +387,12 @@ static inline void cpu_physical_memory_set_dirty_lebi= tmap(unsigned long *bitmap, temp); if (unlikely( global_dirty_tracking & GLOBAL_DIRTY_DIRTY_RAT= E)) { - total_dirty_pages +=3D ctpopl(temp); + total_dirty_pages +=3D nbits; } } =20 + num_dirty +=3D nbits; + if (tcg_enabled()) { qatomic_or(&blocks[DIRTY_MEMORY_CODE][idx][offset], temp); @@ -409,9 +421,11 @@ static inline void cpu_physical_memory_set_dirty_lebit= map(unsigned long *bitmap, for (i =3D 0; i < len; i++) { if (bitmap[i] !=3D 0) { c =3D leul_to_cpu(bitmap[i]); + nbits =3D ctpopl(c); if (unlikely(global_dirty_tracking & GLOBAL_DIRTY_DIRTY_RA= TE)) { - total_dirty_pages +=3D ctpopl(c); + total_dirty_pages +=3D nbits; } + num_dirty +=3D nbits; do { j =3D ctzl(c); c &=3D ~(1ul << j); @@ -424,6 +438,8 @@ static inline void cpu_physical_memory_set_dirty_lebitm= ap(unsigned long *bitmap, } } } + + return num_dirty; } #endif /* not _WIN32 */ =20 --=20 2.39.3 From nobody Mon May 20 13:01:30 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1685362355; cv=none; d=zohomail.com; s=zohoarc; b=jnMd60/VFU1Ju3g7673uS8WebTdUTxkwFuptOlAWe+cFHdIx35AY3Kd2VQ7livqL2KP/PFshj5TIMmjrKjx7nXlFWoDispcMPlPUkDYYS0nzkThXHcx26/y5RJvM/6mGIeqJW9gBhGoxXtLTcPirAhbPoTPE2AOu3VDc5gAbSSA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685362355; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=1UAtNPKnpOQzqu8SkGp7lY1q+2CW6YybIezCRQzeQiw=; b=hY3jFVNAD3VxNQ5xitM6jadRo1vqzymwiqrmfBEc6QUhVVAiLBCFmNO50hvmeOQHsSEX85TXQNxj2eWKc49EIK495b/iZ4bQ6HRdETKFxrQzw/7Qvn+iLkbeS+OijaXHYFnjKla9jCbybntt4HhDfQtrtM8PuxU8tKQRZaihOaI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1685362355688463.31122062649956; Mon, 29 May 2023 05:12:35 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q3biy-0006vs-GV; Mon, 29 May 2023 08:11:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3biw-0006vP-7J for qemu-devel@nongnu.org; Mon, 29 May 2023 08:11:42 -0400 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q3biu-0003Ps-FX for qemu-devel@nongnu.org; Mon, 29 May 2023 08:11:41 -0400 Received: from pps.filterd (m0246630.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34T7TGrZ031492; Mon, 29 May 2023 12:11:37 GMT Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3qvhww8tp7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 May 2023 12:11:37 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 34TAxLbm026022; Mon, 29 May 2023 12:11:36 GMT Received: from pps.reinject (localhost [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3qu8a92m9s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 29 May 2023 12:11:36 +0000 Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34TCBVLS038099; Mon, 29 May 2023 12:11:36 GMT Received: from joaomart-mac.uk.oracle.com (dhcp-10-175-183-111.vpn.oracle.com [10.175.183.111]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTP id 3qu8a92m66-3; Mon, 29 May 2023 12:11:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2023-03-30; bh=1UAtNPKnpOQzqu8SkGp7lY1q+2CW6YybIezCRQzeQiw=; b=yakGilRutZtxhz8tlfpyqwqKpxpjC+ZZlu7sk844OySbDjjIdHB+S/tSd36pJ+lKuoXf pY4X2o9WTev1LUxcqHJbQw8q87OcqOw04Qh4DwiTz9mZMAxWAiM/G9LC5IPS/KoE+tUl oBAtaJzd3pgpzMWZQw6ZueE55QPsZfXwxTTNJ4ce3zlGztrlOBJ7TmChBefVQ+M+LBcz s89aOSFMWERUY+vjDvO1wFhuwrcec3MRaRngJySTU5iH8jFtkBObo0nyPcYATxPxAAh3 4dUmKVYPW1UQzzkkbLIBiuX4gk4XKqRhW3Jna3Gbu48rvx7Ip12ep7EFpqKAelWwUwNj nA== From: Joao Martins To: qemu-devel@nongnu.org Cc: Alex Williamson , Cedric Le Goater , Paolo Bonzini , Peter Xu , David Hildenbrand , Philippe Mathieu-Daude , Avihai Horon , Joao Martins Subject: [PATCH v3 2/2] hw/vfio: Add nr of dirty pages to vfio_get_dirty_bitmap tracepoint Date: Mon, 29 May 2023 13:11:14 +0100 Message-Id: <20230529121114.5038-3-joao.m.martins@oracle.com> In-Reply-To: <20230529121114.5038-1-joao.m.martins@oracle.com> References: <20230529121114.5038-1-joao.m.martins@oracle.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-29_08,2023-05-25_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 spamscore=0 adultscore=0 mlxlogscore=892 bulkscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305290105 X-Proofpoint-ORIG-GUID: -fKXX41wLISoIo4b25SZC_QzLp5qdf-S X-Proofpoint-GUID: -fKXX41wLISoIo4b25SZC_QzLp5qdf-S Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.220.177.32; envelope-from=joao.m.martins@oracle.com; helo=mx0b-00069f02.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @oracle.com) X-ZM-MESSAGEID: 1685362357923100003 Content-Type: text/plain; charset="utf-8" Include the number of dirty pages on the vfio_get_dirty_bitmap tracepoint. These are fetched from the newly added return value in cpu_physical_memory_set_lebitmap(). Signed-off-by: Joao Martins Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/vfio/common.c | 7 ++++--- hw/vfio/trace-events | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/vfio/common.c b/hw/vfio/common.c index 78358ede2764..fa8fd949b1cf 100644 --- a/hw/vfio/common.c +++ b/hw/vfio/common.c @@ -1747,6 +1747,7 @@ static int vfio_get_dirty_bitmap(VFIOContainer *conta= iner, uint64_t iova, { bool all_device_dirty_tracking =3D vfio_devices_all_device_dirty_tracking(container); + uint64_t dirty_pages; VFIOBitmap vbmap; int ret; =20 @@ -1772,11 +1773,11 @@ static int vfio_get_dirty_bitmap(VFIOContainer *con= tainer, uint64_t iova, goto out; } =20 - cpu_physical_memory_set_dirty_lebitmap(vbmap.bitmap, ram_addr, - vbmap.pages); + dirty_pages =3D cpu_physical_memory_set_dirty_lebitmap(vbmap.bitmap, r= am_addr, + vbmap.pages); =20 trace_vfio_get_dirty_bitmap(container->fd, iova, size, vbmap.size, - ram_addr); + ram_addr, dirty_pages); out: g_free(vbmap.bitmap); =20 diff --git a/hw/vfio/trace-events b/hw/vfio/trace-events index 646e42fd27f9..cfb60c354de3 100644 --- a/hw/vfio/trace-events +++ b/hw/vfio/trace-events @@ -120,7 +120,7 @@ vfio_region_sparse_mmap_header(const char *name, int in= dex, int nr_areas) "Devic vfio_region_sparse_mmap_entry(int i, unsigned long start, unsigned long en= d) "sparse entry %d [0x%lx - 0x%lx]" vfio_get_dev_region(const char *name, int index, uint32_t type, uint32_t s= ubtype) "%s index %d, %08x/%08x" vfio_dma_unmap_overflow_workaround(void) "" -vfio_get_dirty_bitmap(int fd, uint64_t iova, uint64_t size, uint64_t bitma= p_size, uint64_t start) "container fd=3D%d, iova=3D0x%"PRIx64" size=3D 0x%"= PRIx64" bitmap_size=3D0x%"PRIx64" start=3D0x%"PRIx64 +vfio_get_dirty_bitmap(int fd, uint64_t iova, uint64_t size, uint64_t bitma= p_size, uint64_t start, uint64_t dirty_pages) "container fd=3D%d, iova=3D0x= %"PRIx64" size=3D 0x%"PRIx64" bitmap_size=3D0x%"PRIx64" start=3D0x%"PRIx64"= dirty_pages=3D%"PRIu64 vfio_iommu_map_dirty_notify(uint64_t iova_start, uint64_t iova_end) "iommu= dirty @ 0x%"PRIx64" - 0x%"PRIx64 =20 # platform.c --=20 2.39.3