From patchwork Mon Mar 9 11:49:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 11426819 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BEA3613A4 for ; Mon, 9 Mar 2020 11:50:35 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A4FF320409 for ; Mon, 9 Mar 2020 11:50:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A4FF320409 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jBGuX-0000N2-Rn; Mon, 09 Mar 2020 11:49:29 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1jBGuW-0000Mx-Mr for xen-devel@lists.xenproject.org; Mon, 09 Mar 2020 11:49:28 +0000 X-Inumbo-ID: 075f375e-61fc-11ea-ac0c-12813bfff9fa Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 075f375e-61fc-11ea-ac0c-12813bfff9fa; Mon, 09 Mar 2020 11:49:27 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 734ECAEA2; Mon, 9 Mar 2020 11:49:26 +0000 (UTC) To: "xen-devel@lists.xenproject.org" From: Jan Beulich Message-ID: Date: Mon, 9 Mar 2020 12:49:30 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Language: en-US Subject: [Xen-devel] [PATCH] memaccess: reduce include dependencies X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Alexandru Isaila , Petre Pircalabu , Tamas K Lengyel Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The common header doesn't itself need to include public/vm_event.h nor public/memory.h. Drop their inclusion. This requires using the non- typedef names in two prototypes and an inline function; by not changing the callers and function definitions at the same time it'll remain certain that the build would fail if the typedef itself was changed. Signed-off-by: Jan Beulich --- a/xen/include/asm-arm/mem_access.h +++ b/xen/include/asm-arm/mem_access.h @@ -17,9 +17,11 @@ #ifndef _ASM_ARM_MEM_ACCESS_H #define _ASM_ARM_MEM_ACCESS_H +struct vm_event_st; + static inline bool p2m_mem_access_emulate_check(struct vcpu *v, - const vm_event_response_t *rsp) + const struct vm_event_st *rsp) { /* Not supported on ARM. */ return false; --- a/xen/include/asm-x86/mem_access.h +++ b/xen/include/asm-x86/mem_access.h @@ -26,6 +26,8 @@ #ifndef __ASM_X86_MEM_ACCESS_H__ #define __ASM_X86_MEM_ACCESS_H__ +struct vm_event_st; + /* * Setup vm_event request based on the access (gla is -1ull if not available). * Handles the rw2rx conversion. Boolean return value indicates if event type @@ -36,12 +38,12 @@ */ bool p2m_mem_access_check(paddr_t gpa, unsigned long gla, struct npfec npfec, - vm_event_request_t **req_ptr); + struct vm_event_st **req_ptr); /* Check for emulation and mark vcpu for skipping one instruction * upon rescheduling if required. */ bool p2m_mem_access_emulate_check(struct vcpu *v, - const vm_event_response_t *rsp); + const struct vm_event_st *rsp); /* Sanity check for mem_access hardware support */ bool p2m_mem_access_sanity_check(const struct domain *d); --- a/xen/include/xen/mem_access.h +++ b/xen/include/xen/mem_access.h @@ -24,8 +24,6 @@ #include #include -#include -#include #include /*