[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170302175357.8222-20-vkuznets@redhat.com>
Date: Thu, 2 Mar 2017 18:53:55 +0100
From: Vitaly Kuznetsov <vkuznets@...hat.com>
To: xen-devel@...ts.xenproject.org
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Juergen Gross <jgross@...e.com>,
Andrew Jones <drjones@...hat.com>
Subject: [PATCH v2 19/21] xen: create xen_create/destroy_contiguous_region() stubs for PVHVM only builds
xen_create_contiguous_region()/xen_create_contiguous_region() are PV-only,
they both contain xen_feature(XENFEAT_auto_translated_physmap) check and
bail in the very beginning.
Signed-off-by: Vitaly Kuznetsov <vkuznets@...hat.com>
---
include/xen/xen-ops.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/xen/xen-ops.h b/include/xen/xen-ops.h
index b5486e6..f939114 100644
--- a/include/xen/xen-ops.h
+++ b/include/xen/xen-ops.h
@@ -34,11 +34,25 @@ u64 xen_steal_clock(int cpu);
int xen_setup_shutdown_event(void);
extern unsigned long *xen_contiguous_bitmap;
+
+#ifdef CONFIG_XEN_PV
int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order,
unsigned int address_bits,
dma_addr_t *dma_handle);
void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order);
+#else
+static inline int xen_create_contiguous_region(phys_addr_t pstart,
+ unsigned int order,
+ unsigned int address_bits,
+ dma_addr_t *dma_handle)
+{
+ return 0;
+}
+
+static inline void xen_destroy_contiguous_region(phys_addr_t pstart,
+ unsigned int order) { }
+#endif
struct vm_area_struct;
--
2.9.3
Powered by blists - more mailing lists