From: "Jan Beulich" Subject: Re: [PATCH v4 4/4] xen: rework paging_log_dirty_op to work with hvm guests Date: Fri, 08 May 2015 09:40:51 +0100 Message-ID: <554C92B30200007800078040@mail.emea.novell.com> References: <1431008976-20414-1-git-send-email-roger.pau@citrix.com> <1431008976-20414-5-git-send-email-roger.pau@citrix.com> <554BA5690200007800077C00@mail.emea.novell.com> <554C7394.7010509@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yqdq0-0006B0-DE for xen-devel@lists.xenproject.org; Fri, 08 May 2015 08:40:52 +0000 In-Reply-To: <554C7394.7010509@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: =?UTF-8?Q?Roger=20Pau=20Monn=C3=A9?= Cc: Andrew Cooper , Tim Deegan , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 08.05.15 at 10:28, wrote: > El 07/05/15 a les 17.48, Jan Beulich ha escrit: >>>>> On 07.05.15 at 16:29, wrote: >>> --- a/xen/arch/x86/mm/paging.c >>> +++ b/xen/arch/x86/mm/paging.c >>> @@ -408,6 +408,51 @@ int paging_mfn_is_dirty(struct domain *d, mfn_t gmfn) >>> return rv; >>> } >>> >>> +static inline void *map_dirty_bitmap(XEN_GUEST_HANDLE_64(uint8) > dirty_bitmap, >>> + unsigned long pages, >>> + struct page_info **page) >>> +{ >>> + uint32_t pfec = PFEC_page_present | PFEC_write_access; >>> + unsigned long gfn; >>> + p2m_type_t p2mt; >>> + >>> + gfn = paging_gva_to_gfn(current, >>> + (paddr_t)(dirty_bitmap.p + (pages >> 3)), >> >> Why paddr_t? > > Without it I get: > > paging.c:421:29: error: passing argument 2 of 'paging_gva_to_gfn' makes > integer from pointer without a cast [-Werror] I didn't object to the cast, but to the type used in it: This is a virtual (guest) address, and the respective function parameter has type "unsigned long". Jan