diff options
-rw-r--r-- | arch/arm/include/asm/xen/interface.h | 12 | ||||
-rw-r--r-- | arch/arm/include/asm/xen/page.h | 13 | ||||
-rw-r--r-- | arch/arm/xen/grant-table.c | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/xen/interface.h | 4 | ||||
-rw-r--r-- | arch/x86/kernel/entry_32.S | 8 | ||||
-rw-r--r-- | arch/x86/kernel/entry_64.S | 2 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 2 | ||||
-rw-r--r-- | drivers/xen/balloon.c | 3 | ||||
-rw-r--r-- | drivers/xen/dbgp.c | 2 | ||||
-rw-r--r-- | drivers/xen/events.c | 4 | ||||
-rw-r--r-- | drivers/xen/grant-table.c | 8 | ||||
-rw-r--r-- | drivers/xen/sys-hypervisor.c | 4 | ||||
-rw-r--r-- | drivers/xen/xen-pciback/vpci.c | 14 | ||||
-rw-r--r-- | drivers/xen/xenbus/xenbus_xs.c | 2 | ||||
-rw-r--r-- | include/xen/grant_table.h | 2 | ||||
-rw-r--r-- | include/xen/interface/grant_table.h | 2 | ||||
-rw-r--r-- | include/xen/interface/memory.h | 24 |
17 files changed, 58 insertions, 50 deletions
diff --git a/arch/arm/include/asm/xen/interface.h b/arch/arm/include/asm/xen/interface.h index ae05e56dd17d..5000397134b4 100644 --- a/arch/arm/include/asm/xen/interface.h +++ b/arch/arm/include/asm/xen/interface.h | |||
@@ -29,16 +29,22 @@ | |||
29 | 29 | ||
30 | #ifndef __ASSEMBLY__ | 30 | #ifndef __ASSEMBLY__ |
31 | /* Explicitly size integers that represent pfns in the interface with | 31 | /* Explicitly size integers that represent pfns in the interface with |
32 | * Xen so that we can have one ABI that works for 32 and 64 bit guests. */ | 32 | * Xen so that we can have one ABI that works for 32 and 64 bit guests. |
33 | * Note that this means that the xen_pfn_t type may be capable of | ||
34 | * representing pfn's which the guest cannot represent in its own pfn | ||
35 | * type. However since pfn space is controlled by the guest this is | ||
36 | * fine since it simply wouldn't be able to create any sure pfns in | ||
37 | * the first place. | ||
38 | */ | ||
33 | typedef uint64_t xen_pfn_t; | 39 | typedef uint64_t xen_pfn_t; |
40 | #define PRI_xen_pfn "llx" | ||
34 | typedef uint64_t xen_ulong_t; | 41 | typedef uint64_t xen_ulong_t; |
42 | #define PRI_xen_ulong "llx" | ||
35 | /* Guest handles for primitive C types. */ | 43 | /* Guest handles for primitive C types. */ |
36 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); | 44 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); |
37 | __DEFINE_GUEST_HANDLE(uint, unsigned int); | 45 | __DEFINE_GUEST_HANDLE(uint, unsigned int); |
38 | __DEFINE_GUEST_HANDLE(ulong, unsigned long); | ||
39 | DEFINE_GUEST_HANDLE(char); | 46 | DEFINE_GUEST_HANDLE(char); |
40 | DEFINE_GUEST_HANDLE(int); | 47 | DEFINE_GUEST_HANDLE(int); |
41 | DEFINE_GUEST_HANDLE(long); | ||
42 | DEFINE_GUEST_HANDLE(void); | 48 | DEFINE_GUEST_HANDLE(void); |
43 | DEFINE_GUEST_HANDLE(uint64_t); | 49 | DEFINE_GUEST_HANDLE(uint64_t); |
44 | DEFINE_GUEST_HANDLE(uint32_t); | 50 | DEFINE_GUEST_HANDLE(uint32_t); |
diff --git a/arch/arm/include/asm/xen/page.h b/arch/arm/include/asm/xen/page.h index 174202318dff..c6b9096cef95 100644 --- a/arch/arm/include/asm/xen/page.h +++ b/arch/arm/include/asm/xen/page.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #include <xen/interface/grant_table.h> | 10 | #include <xen/interface/grant_table.h> |
11 | 11 | ||
12 | #define pfn_to_mfn(pfn) (pfn) | 12 | #define pfn_to_mfn(pfn) (pfn) |
13 | #define phys_to_machine_mapping_valid (1) | 13 | #define phys_to_machine_mapping_valid(pfn) (1) |
14 | #define mfn_to_pfn(mfn) (mfn) | 14 | #define mfn_to_pfn(mfn) (mfn) |
15 | #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) | 15 | #define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT)) |
16 | 16 | ||
@@ -30,6 +30,8 @@ typedef struct xpaddr { | |||
30 | #define XMADDR(x) ((xmaddr_t) { .maddr = (x) }) | 30 | #define XMADDR(x) ((xmaddr_t) { .maddr = (x) }) |
31 | #define XPADDR(x) ((xpaddr_t) { .paddr = (x) }) | 31 | #define XPADDR(x) ((xpaddr_t) { .paddr = (x) }) |
32 | 32 | ||
33 | #define INVALID_P2M_ENTRY (~0UL) | ||
34 | |||
33 | static inline xmaddr_t phys_to_machine(xpaddr_t phys) | 35 | static inline xmaddr_t phys_to_machine(xpaddr_t phys) |
34 | { | 36 | { |
35 | unsigned offset = phys.paddr & ~PAGE_MASK; | 37 | unsigned offset = phys.paddr & ~PAGE_MASK; |
@@ -74,9 +76,14 @@ static inline int m2p_remove_override(struct page *page, bool clear_pte) | |||
74 | return 0; | 76 | return 0; |
75 | } | 77 | } |
76 | 78 | ||
79 | static inline bool __set_phys_to_machine(unsigned long pfn, unsigned long mfn) | ||
80 | { | ||
81 | BUG_ON(pfn != mfn && mfn != INVALID_P2M_ENTRY); | ||
82 | return true; | ||
83 | } | ||
84 | |||
77 | static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) | 85 | static inline bool set_phys_to_machine(unsigned long pfn, unsigned long mfn) |
78 | { | 86 | { |
79 | BUG(); | 87 | return __set_phys_to_machine(pfn, mfn); |
80 | return false; | ||
81 | } | 88 | } |
82 | #endif /* _ASM_ARM_XEN_PAGE_H */ | 89 | #endif /* _ASM_ARM_XEN_PAGE_H */ |
diff --git a/arch/arm/xen/grant-table.c b/arch/arm/xen/grant-table.c index dbd1330c0196..859a9bb002d5 100644 --- a/arch/arm/xen/grant-table.c +++ b/arch/arm/xen/grant-table.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <xen/page.h> | 33 | #include <xen/page.h> |
34 | #include <xen/grant_table.h> | 34 | #include <xen/grant_table.h> |
35 | 35 | ||
36 | int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes, | 36 | int arch_gnttab_map_shared(xen_pfn_t *frames, unsigned long nr_gframes, |
37 | unsigned long max_nr_gframes, | 37 | unsigned long max_nr_gframes, |
38 | void **__shared) | 38 | void **__shared) |
39 | { | 39 | { |
diff --git a/arch/x86/include/asm/xen/interface.h b/arch/x86/include/asm/xen/interface.h index 6d2f75a82a14..54d52ff1304a 100644 --- a/arch/x86/include/asm/xen/interface.h +++ b/arch/x86/include/asm/xen/interface.h | |||
@@ -51,14 +51,14 @@ | |||
51 | * with Xen so that on ARM we can have one ABI that works for 32 and 64 | 51 | * with Xen so that on ARM we can have one ABI that works for 32 and 64 |
52 | * bit guests. */ | 52 | * bit guests. */ |
53 | typedef unsigned long xen_pfn_t; | 53 | typedef unsigned long xen_pfn_t; |
54 | #define PRI_xen_pfn "lx" | ||
54 | typedef unsigned long xen_ulong_t; | 55 | typedef unsigned long xen_ulong_t; |
56 | #define PRI_xen_ulong "lx" | ||
55 | /* Guest handles for primitive C types. */ | 57 | /* Guest handles for primitive C types. */ |
56 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); | 58 | __DEFINE_GUEST_HANDLE(uchar, unsigned char); |
57 | __DEFINE_GUEST_HANDLE(uint, unsigned int); | 59 | __DEFINE_GUEST_HANDLE(uint, unsigned int); |
58 | __DEFINE_GUEST_HANDLE(ulong, unsigned long); | ||
59 | DEFINE_GUEST_HANDLE(char); | 60 | DEFINE_GUEST_HANDLE(char); |
60 | DEFINE_GUEST_HANDLE(int); | 61 | DEFINE_GUEST_HANDLE(int); |
61 | DEFINE_GUEST_HANDLE(long); | ||
62 | DEFINE_GUEST_HANDLE(void); | 62 | DEFINE_GUEST_HANDLE(void); |
63 | DEFINE_GUEST_HANDLE(uint64_t); | 63 | DEFINE_GUEST_HANDLE(uint64_t); |
64 | DEFINE_GUEST_HANDLE(uint32_t); | 64 | DEFINE_GUEST_HANDLE(uint32_t); |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index a1193aef6d7d..88b725aa1d52 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -1035,7 +1035,7 @@ ENTRY(xen_sysenter_target) | |||
1035 | 1035 | ||
1036 | ENTRY(xen_hypervisor_callback) | 1036 | ENTRY(xen_hypervisor_callback) |
1037 | CFI_STARTPROC | 1037 | CFI_STARTPROC |
1038 | pushl_cfi $0 | 1038 | pushl_cfi $-1 /* orig_ax = -1 => not a system call */ |
1039 | SAVE_ALL | 1039 | SAVE_ALL |
1040 | TRACE_IRQS_OFF | 1040 | TRACE_IRQS_OFF |
1041 | 1041 | ||
@@ -1077,14 +1077,16 @@ ENTRY(xen_failsafe_callback) | |||
1077 | 2: mov 8(%esp),%es | 1077 | 2: mov 8(%esp),%es |
1078 | 3: mov 12(%esp),%fs | 1078 | 3: mov 12(%esp),%fs |
1079 | 4: mov 16(%esp),%gs | 1079 | 4: mov 16(%esp),%gs |
1080 | /* EAX == 0 => Category 1 (Bad segment) | ||
1081 | EAX != 0 => Category 2 (Bad IRET) */ | ||
1080 | testl %eax,%eax | 1082 | testl %eax,%eax |
1081 | popl_cfi %eax | 1083 | popl_cfi %eax |
1082 | lea 16(%esp),%esp | 1084 | lea 16(%esp),%esp |
1083 | CFI_ADJUST_CFA_OFFSET -16 | 1085 | CFI_ADJUST_CFA_OFFSET -16 |
1084 | jz 5f | 1086 | jz 5f |
1085 | addl $16,%esp | 1087 | addl $16,%esp |
1086 | jmp iret_exc # EAX != 0 => Category 2 (Bad IRET) | 1088 | jmp iret_exc |
1087 | 5: pushl_cfi $0 # EAX == 0 => Category 1 (Bad segment) | 1089 | 5: pushl_cfi $-1 /* orig_ax = -1 => not a system call */ |
1088 | SAVE_ALL | 1090 | SAVE_ALL |
1089 | jmp ret_from_exception | 1091 | jmp ret_from_exception |
1090 | CFI_ENDPROC | 1092 | CFI_ENDPROC |
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index 0c58952d64e8..b51b2c7ee51f 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -1435,7 +1435,7 @@ ENTRY(xen_failsafe_callback) | |||
1435 | CFI_RESTORE r11 | 1435 | CFI_RESTORE r11 |
1436 | addq $0x30,%rsp | 1436 | addq $0x30,%rsp |
1437 | CFI_ADJUST_CFA_OFFSET -0x30 | 1437 | CFI_ADJUST_CFA_OFFSET -0x30 |
1438 | pushq_cfi $0 | 1438 | pushq_cfi $-1 /* orig_ax = -1 => not a system call */ |
1439 | SAVE_ALL | 1439 | SAVE_ALL |
1440 | jmp error_exit | 1440 | jmp error_exit |
1441 | CFI_ENDPROC | 1441 | CFI_ENDPROC |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index e3497f240eab..586d83812b67 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -81,8 +81,6 @@ | |||
81 | #include "smp.h" | 81 | #include "smp.h" |
82 | #include "multicalls.h" | 82 | #include "multicalls.h" |
83 | 83 | ||
84 | #include <xen/events.h> | ||
85 | |||
86 | EXPORT_SYMBOL_GPL(hypercall_page); | 84 | EXPORT_SYMBOL_GPL(hypercall_page); |
87 | 85 | ||
88 | DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu); | 86 | DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu); |
diff --git a/drivers/xen/balloon.c b/drivers/xen/balloon.c index 31ab82fda38a..d6886d90ccfd 100644 --- a/drivers/xen/balloon.c +++ b/drivers/xen/balloon.c | |||
@@ -55,7 +55,6 @@ | |||
55 | #include <asm/pgalloc.h> | 55 | #include <asm/pgalloc.h> |
56 | #include <asm/pgtable.h> | 56 | #include <asm/pgtable.h> |
57 | #include <asm/tlb.h> | 57 | #include <asm/tlb.h> |
58 | #include <asm/e820.h> | ||
59 | 58 | ||
60 | #include <asm/xen/hypervisor.h> | 59 | #include <asm/xen/hypervisor.h> |
61 | #include <asm/xen/hypercall.h> | 60 | #include <asm/xen/hypercall.h> |
@@ -88,7 +87,7 @@ struct balloon_stats balloon_stats; | |||
88 | EXPORT_SYMBOL_GPL(balloon_stats); | 87 | EXPORT_SYMBOL_GPL(balloon_stats); |
89 | 88 | ||
90 | /* We increase/decrease in batches which fit in a page */ | 89 | /* We increase/decrease in batches which fit in a page */ |
91 | static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)]; | 90 | static xen_pfn_t frame_list[PAGE_SIZE / sizeof(unsigned long)]; |
92 | 91 | ||
93 | #ifdef CONFIG_HIGHMEM | 92 | #ifdef CONFIG_HIGHMEM |
94 | #define inc_totalhigh_pages() (totalhigh_pages++) | 93 | #define inc_totalhigh_pages() (totalhigh_pages++) |
diff --git a/drivers/xen/dbgp.c b/drivers/xen/dbgp.c index 42569c77ccc8..f3ccc80a455f 100644 --- a/drivers/xen/dbgp.c +++ b/drivers/xen/dbgp.c | |||
@@ -8,7 +8,9 @@ | |||
8 | 8 | ||
9 | static int xen_dbgp_op(struct usb_hcd *hcd, int op) | 9 | static int xen_dbgp_op(struct usb_hcd *hcd, int op) |
10 | { | 10 | { |
11 | #ifdef CONFIG_PCI | ||
11 | const struct device *ctrlr = hcd_to_bus(hcd)->controller; | 12 | const struct device *ctrlr = hcd_to_bus(hcd)->controller; |
13 | #endif | ||
12 | struct physdev_dbgp_op dbgp; | 14 | struct physdev_dbgp_op dbgp; |
13 | 15 | ||
14 | if (!xen_initial_domain()) | 16 | if (!xen_initial_domain()) |
diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 59e10a1286d5..912ac81b6dbf 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c | |||
@@ -115,7 +115,9 @@ struct irq_info { | |||
115 | #define PIRQ_SHAREABLE (1 << 1) | 115 | #define PIRQ_SHAREABLE (1 << 1) |
116 | 116 | ||
117 | static int *evtchn_to_irq; | 117 | static int *evtchn_to_irq; |
118 | #ifdef CONFIG_X86 | ||
118 | static unsigned long *pirq_eoi_map; | 119 | static unsigned long *pirq_eoi_map; |
120 | #endif | ||
119 | static bool (*pirq_needs_eoi)(unsigned irq); | 121 | static bool (*pirq_needs_eoi)(unsigned irq); |
120 | 122 | ||
121 | static DEFINE_PER_CPU(unsigned long [NR_EVENT_CHANNELS/BITS_PER_LONG], | 123 | static DEFINE_PER_CPU(unsigned long [NR_EVENT_CHANNELS/BITS_PER_LONG], |
@@ -277,10 +279,12 @@ static unsigned int cpu_from_evtchn(unsigned int evtchn) | |||
277 | return ret; | 279 | return ret; |
278 | } | 280 | } |
279 | 281 | ||
282 | #ifdef CONFIG_X86 | ||
280 | static bool pirq_check_eoi_map(unsigned irq) | 283 | static bool pirq_check_eoi_map(unsigned irq) |
281 | { | 284 | { |
282 | return test_bit(pirq_from_irq(irq), pirq_eoi_map); | 285 | return test_bit(pirq_from_irq(irq), pirq_eoi_map); |
283 | } | 286 | } |
287 | #endif | ||
284 | 288 | ||
285 | static bool pirq_needs_eoi_flag(unsigned irq) | 289 | static bool pirq_needs_eoi_flag(unsigned irq) |
286 | { | 290 | { |
diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index b2b0a375b348..b91f14e83164 100644 --- a/drivers/xen/grant-table.c +++ b/drivers/xen/grant-table.c | |||
@@ -84,7 +84,7 @@ struct gnttab_ops { | |||
84 | * nr_gframes is the number of frames to map grant table. Returning | 84 | * nr_gframes is the number of frames to map grant table. Returning |
85 | * GNTST_okay means success and negative value means failure. | 85 | * GNTST_okay means success and negative value means failure. |
86 | */ | 86 | */ |
87 | int (*map_frames)(unsigned long *frames, unsigned int nr_gframes); | 87 | int (*map_frames)(xen_pfn_t *frames, unsigned int nr_gframes); |
88 | /* | 88 | /* |
89 | * Release a list of frames which are mapped in map_frames for grant | 89 | * Release a list of frames which are mapped in map_frames for grant |
90 | * entry status. | 90 | * entry status. |
@@ -960,7 +960,7 @@ static unsigned nr_status_frames(unsigned nr_grant_frames) | |||
960 | return (nr_grant_frames * GREFS_PER_GRANT_FRAME + SPP - 1) / SPP; | 960 | return (nr_grant_frames * GREFS_PER_GRANT_FRAME + SPP - 1) / SPP; |
961 | } | 961 | } |
962 | 962 | ||
963 | static int gnttab_map_frames_v1(unsigned long *frames, unsigned int nr_gframes) | 963 | static int gnttab_map_frames_v1(xen_pfn_t *frames, unsigned int nr_gframes) |
964 | { | 964 | { |
965 | int rc; | 965 | int rc; |
966 | 966 | ||
@@ -977,7 +977,7 @@ static void gnttab_unmap_frames_v1(void) | |||
977 | arch_gnttab_unmap(gnttab_shared.addr, nr_grant_frames); | 977 | arch_gnttab_unmap(gnttab_shared.addr, nr_grant_frames); |
978 | } | 978 | } |
979 | 979 | ||
980 | static int gnttab_map_frames_v2(unsigned long *frames, unsigned int nr_gframes) | 980 | static int gnttab_map_frames_v2(xen_pfn_t *frames, unsigned int nr_gframes) |
981 | { | 981 | { |
982 | uint64_t *sframes; | 982 | uint64_t *sframes; |
983 | unsigned int nr_sframes; | 983 | unsigned int nr_sframes; |
@@ -1029,7 +1029,7 @@ static void gnttab_unmap_frames_v2(void) | |||
1029 | static int gnttab_map(unsigned int start_idx, unsigned int end_idx) | 1029 | static int gnttab_map(unsigned int start_idx, unsigned int end_idx) |
1030 | { | 1030 | { |
1031 | struct gnttab_setup_table setup; | 1031 | struct gnttab_setup_table setup; |
1032 | unsigned long *frames; | 1032 | xen_pfn_t *frames; |
1033 | unsigned int nr_gframes = end_idx + 1; | 1033 | unsigned int nr_gframes = end_idx + 1; |
1034 | int rc; | 1034 | int rc; |
1035 | 1035 | ||
diff --git a/drivers/xen/sys-hypervisor.c b/drivers/xen/sys-hypervisor.c index 5e5ad7e28858..96453f8a85c5 100644 --- a/drivers/xen/sys-hypervisor.c +++ b/drivers/xen/sys-hypervisor.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/kernel.h> | 11 | #include <linux/kernel.h> |
12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
13 | #include <linux/kobject.h> | 13 | #include <linux/kobject.h> |
14 | #include <linux/err.h> | ||
14 | 15 | ||
15 | #include <asm/xen/hypervisor.h> | 16 | #include <asm/xen/hypervisor.h> |
16 | #include <asm/xen/hypercall.h> | 17 | #include <asm/xen/hypercall.h> |
@@ -284,7 +285,8 @@ static ssize_t virtual_start_show(struct hyp_sysfs_attr *attr, char *buffer) | |||
284 | ret = HYPERVISOR_xen_version(XENVER_platform_parameters, | 285 | ret = HYPERVISOR_xen_version(XENVER_platform_parameters, |
285 | parms); | 286 | parms); |
286 | if (!ret) | 287 | if (!ret) |
287 | ret = sprintf(buffer, "%lx\n", parms->virt_start); | 288 | ret = sprintf(buffer, "%"PRI_xen_ulong"\n", |
289 | parms->virt_start); | ||
288 | kfree(parms); | 290 | kfree(parms); |
289 | } | 291 | } |
290 | 292 | ||
diff --git a/drivers/xen/xen-pciback/vpci.c b/drivers/xen/xen-pciback/vpci.c index 46d140baebd8..0f478ac483cd 100644 --- a/drivers/xen/xen-pciback/vpci.c +++ b/drivers/xen/xen-pciback/vpci.c | |||
@@ -89,9 +89,15 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev, | |||
89 | 89 | ||
90 | mutex_lock(&vpci_dev->lock); | 90 | mutex_lock(&vpci_dev->lock); |
91 | 91 | ||
92 | /* Keep multi-function devices together on the virtual PCI bus */ | 92 | /* |
93 | for (slot = 0; slot < PCI_SLOT_MAX; slot++) { | 93 | * Keep multi-function devices together on the virtual PCI bus, except |
94 | if (!list_empty(&vpci_dev->dev_list[slot])) { | 94 | * virtual functions. |
95 | */ | ||
96 | if (!dev->is_virtfn) { | ||
97 | for (slot = 0; slot < PCI_SLOT_MAX; slot++) { | ||
98 | if (list_empty(&vpci_dev->dev_list[slot])) | ||
99 | continue; | ||
100 | |||
95 | t = list_entry(list_first(&vpci_dev->dev_list[slot]), | 101 | t = list_entry(list_first(&vpci_dev->dev_list[slot]), |
96 | struct pci_dev_entry, list); | 102 | struct pci_dev_entry, list); |
97 | 103 | ||
@@ -116,7 +122,7 @@ static int __xen_pcibk_add_pci_dev(struct xen_pcibk_device *pdev, | |||
116 | pci_name(dev), slot); | 122 | pci_name(dev), slot); |
117 | list_add_tail(&dev_entry->list, | 123 | list_add_tail(&dev_entry->list, |
118 | &vpci_dev->dev_list[slot]); | 124 | &vpci_dev->dev_list[slot]); |
119 | func = PCI_FUNC(dev->devfn); | 125 | func = dev->is_virtfn ? 0 : PCI_FUNC(dev->devfn); |
120 | goto unlock; | 126 | goto unlock; |
121 | } | 127 | } |
122 | } | 128 | } |
diff --git a/drivers/xen/xenbus/xenbus_xs.c b/drivers/xen/xenbus/xenbus_xs.c index f5dda83ad7a5..acedeabe589c 100644 --- a/drivers/xen/xenbus/xenbus_xs.c +++ b/drivers/xen/xenbus/xenbus_xs.c | |||
@@ -627,6 +627,7 @@ static struct xenbus_watch *find_watch(const char *token) | |||
627 | */ | 627 | */ |
628 | static bool xen_strict_xenbus_quirk(void) | 628 | static bool xen_strict_xenbus_quirk(void) |
629 | { | 629 | { |
630 | #ifdef CONFIG_X86 | ||
630 | uint32_t eax, ebx, ecx, edx, base; | 631 | uint32_t eax, ebx, ecx, edx, base; |
631 | 632 | ||
632 | base = xen_cpuid_base(); | 633 | base = xen_cpuid_base(); |
@@ -634,6 +635,7 @@ static bool xen_strict_xenbus_quirk(void) | |||
634 | 635 | ||
635 | if ((eax >> 16) < 4) | 636 | if ((eax >> 16) < 4) |
636 | return true; | 637 | return true; |
638 | #endif | ||
637 | return false; | 639 | return false; |
638 | 640 | ||
639 | } | 641 | } |
diff --git a/include/xen/grant_table.h b/include/xen/grant_table.h index aecee9d112cb..694dcaf266e6 100644 --- a/include/xen/grant_table.h +++ b/include/xen/grant_table.h | |||
@@ -170,7 +170,7 @@ gnttab_set_unmap_op(struct gnttab_unmap_grant_ref *unmap, phys_addr_t addr, | |||
170 | unmap->dev_bus_addr = 0; | 170 | unmap->dev_bus_addr = 0; |
171 | } | 171 | } |
172 | 172 | ||
173 | int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes, | 173 | int arch_gnttab_map_shared(xen_pfn_t *frames, unsigned long nr_gframes, |
174 | unsigned long max_nr_gframes, | 174 | unsigned long max_nr_gframes, |
175 | void **__shared); | 175 | void **__shared); |
176 | int arch_gnttab_map_status(uint64_t *frames, unsigned long nr_gframes, | 176 | int arch_gnttab_map_status(uint64_t *frames, unsigned long nr_gframes, |
diff --git a/include/xen/interface/grant_table.h b/include/xen/interface/grant_table.h index f9f8b975ae74..e40fae9bf11a 100644 --- a/include/xen/interface/grant_table.h +++ b/include/xen/interface/grant_table.h | |||
@@ -310,7 +310,7 @@ struct gnttab_setup_table { | |||
310 | uint32_t nr_frames; | 310 | uint32_t nr_frames; |
311 | /* OUT parameters. */ | 311 | /* OUT parameters. */ |
312 | int16_t status; /* GNTST_* */ | 312 | int16_t status; /* GNTST_* */ |
313 | GUEST_HANDLE(ulong) frame_list; | 313 | GUEST_HANDLE(xen_pfn_t) frame_list; |
314 | }; | 314 | }; |
315 | DEFINE_GUEST_HANDLE_STRUCT(gnttab_setup_table); | 315 | DEFINE_GUEST_HANDLE_STRUCT(gnttab_setup_table); |
316 | 316 | ||
diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h index b66d04ce6957..90712e2072d5 100644 --- a/include/xen/interface/memory.h +++ b/include/xen/interface/memory.h | |||
@@ -179,28 +179,8 @@ struct xen_add_to_physmap { | |||
179 | }; | 179 | }; |
180 | DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap); | 180 | DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap); |
181 | 181 | ||
182 | /* | 182 | /*** REMOVED ***/ |
183 | * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error | 183 | /*#define XENMEM_translate_gpfn_list 8*/ |
184 | * code on failure. This call only works for auto-translated guests. | ||
185 | */ | ||
186 | #define XENMEM_translate_gpfn_list 8 | ||
187 | struct xen_translate_gpfn_list { | ||
188 | /* Which domain to translate for? */ | ||
189 | domid_t domid; | ||
190 | |||
191 | /* Length of list. */ | ||
192 | xen_ulong_t nr_gpfns; | ||
193 | |||
194 | /* List of GPFNs to translate. */ | ||
195 | GUEST_HANDLE(ulong) gpfn_list; | ||
196 | |||
197 | /* | ||
198 | * Output list to contain MFN translations. May be the same as the input | ||
199 | * list (in which case each input GPFN is overwritten with the output MFN). | ||
200 | */ | ||
201 | GUEST_HANDLE(ulong) mfn_list; | ||
202 | }; | ||
203 | DEFINE_GUEST_HANDLE_STRUCT(xen_translate_gpfn_list); | ||
204 | 184 | ||
205 | /* | 185 | /* |
206 | * Returns the pseudo-physical memory map as it was when the domain | 186 | * Returns the pseudo-physical memory map as it was when the domain |