Skip to content

Commit 1662439

Browse files
vittyvkjgross1
authored andcommitted
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 <[email protected]> Reviewed-by: Juergen Gross <[email protected]> Signed-off-by: Juergen Gross <[email protected]>
1 parent 4fee9ad commit 1662439

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

include/xen/xen-ops.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,25 @@ u64 xen_steal_clock(int cpu);
3434
int xen_setup_shutdown_event(void);
3535

3636
extern unsigned long *xen_contiguous_bitmap;
37+
38+
#ifdef CONFIG_XEN_PV
3739
int xen_create_contiguous_region(phys_addr_t pstart, unsigned int order,
3840
unsigned int address_bits,
3941
dma_addr_t *dma_handle);
4042

4143
void xen_destroy_contiguous_region(phys_addr_t pstart, unsigned int order);
44+
#else
45+
static inline int xen_create_contiguous_region(phys_addr_t pstart,
46+
unsigned int order,
47+
unsigned int address_bits,
48+
dma_addr_t *dma_handle)
49+
{
50+
return 0;
51+
}
52+
53+
static inline void xen_destroy_contiguous_region(phys_addr_t pstart,
54+
unsigned int order) { }
55+
#endif
4256

4357
struct vm_area_struct;
4458

0 commit comments

Comments
 (0)