Th theory the arch header rework should have been fully transparent to
the users of the file. In practice it isn't, mostly due to "int" not
"long" being used for int32_t on x86_32. This patch makes unstable
build again.
Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxx>
Cc: Jan Beulich <jbeulich@xxxxxxxxxx>
---
linux-2.6-xen-sparse/arch/x86_64/kernel/traps-xen.c | 38 ++++++++++----------
tools/ioemu/vl.h | 4 +-
tools/libxc/xc_hvm_build.c | 4 +-
tools/libxc/xc_linux_restore.c | 2 -
tools/libxc/xc_linux_save.c | 8 ++--
tools/libxc/xc_ptrace.c | 2 -
xen/arch/x86/domctl.c | 2 -
xen/arch/x86/hvm/svm/svm.c | 2 -
xen/arch/x86/hvm/vmx/vmx.c | 2 -
xen/arch/x86/mm.c | 4 +-
xen/arch/x86/x86_32/mm.c | 2 -
xen/arch/x86/x86_32/traps.c | 4 +-
xen/include/asm-x86/processor.h | 2 -
13 files changed, 38 insertions(+), 38 deletions(-)
Index: build-32-unstable-11625/xen/arch/x86/domctl.c
===================================================================
--- build-32-unstable-11625.orig/xen/arch/x86/domctl.c
+++ build-32-unstable-11625/xen/arch/x86/domctl.c
@@ -214,7 +214,7 @@ long arch_do_domctl(
int i;
struct domain *d = find_domain_by_id(domctl->domain);
unsigned long max_pfns = domctl->u.getmemlist.max_pfns;
- unsigned long mfn, gmfn;
+ xen_pfn_t mfn, gmfn;
struct list_head *list_ent;
ret = -EINVAL;
Index: build-32-unstable-11625/xen/arch/x86/hvm/svm/svm.c
===================================================================
--- build-32-unstable-11625.orig/xen/arch/x86/hvm/svm/svm.c
+++ build-32-unstable-11625/xen/arch/x86/hvm/svm/svm.c
@@ -223,7 +223,7 @@ static void stop_svm(void)
static void svm_store_cpu_guest_regs(
- struct vcpu *v, struct cpu_user_regs *regs, unsigned long *crs)
+ struct vcpu *v, struct cpu_user_regs *regs, xen_ulong_t *crs)
{
struct vmcb_struct *vmcb = v->arch.hvm_svm.vmcb;
Index: build-32-unstable-11625/xen/arch/x86/hvm/vmx/vmx.c
===================================================================
--- build-32-unstable-11625.orig/xen/arch/x86/hvm/vmx/vmx.c
+++ build-32-unstable-11625/xen/arch/x86/hvm/vmx/vmx.c
@@ -501,7 +501,7 @@ void vmx_migrate_timers(struct vcpu *v)
}
static void vmx_store_cpu_guest_regs(
- struct vcpu *v, struct cpu_user_regs *regs, unsigned long *crs)
+ struct vcpu *v, struct cpu_user_regs *regs, xen_ulong_t *crs)
{
vmx_vmcs_enter(v);
Index: build-32-unstable-11625/xen/arch/x86/mm.c
===================================================================
--- build-32-unstable-11625.orig/xen/arch/x86/mm.c
+++ build-32-unstable-11625/xen/arch/x86/mm.c
@@ -2755,7 +2755,7 @@ void destroy_gdt(struct vcpu *v)
long set_gdt(struct vcpu *v,
- unsigned long *frames,
+ xen_ulong_t *frames,
unsigned int entries)
{
struct domain *d = v->domain;
@@ -2798,7 +2798,7 @@ long set_gdt(struct vcpu *v,
long do_set_gdt(XEN_GUEST_HANDLE(ulong) frame_list, unsigned int entries)
{
int nr_pages = (entries + 511) / 512;
- unsigned long frames[16];
+ xen_ulong_t frames[16];
long ret;
/* Rechecked in set_gdt, but ensures a sane limit for copy_from_user(). */
Index: build-32-unstable-11625/xen/arch/x86/x86_32/mm.c
===================================================================
--- build-32-unstable-11625.orig/xen/arch/x86/x86_32/mm.c
+++ build-32-unstable-11625/xen/arch/x86/x86_32/mm.c
@@ -188,7 +188,7 @@ void subarch_init_memory(void)
long subarch_memory_op(int op, XEN_GUEST_HANDLE(void) arg)
{
struct xen_machphys_mfn_list xmml;
- unsigned long mfn;
+ xen_ulong_t mfn;
unsigned int i, max;
long rc = 0;
Index: build-32-unstable-11625/xen/arch/x86/x86_32/traps.c
===================================================================
--- build-32-unstable-11625.orig/xen/arch/x86/x86_32/traps.c
+++ build-32-unstable-11625/xen/arch/x86/x86_32/traps.c
@@ -42,7 +42,7 @@ static void print_xen_info(void)
void show_registers(struct cpu_user_regs *regs)
{
struct cpu_user_regs fault_regs = *regs;
- unsigned long fault_crs[8];
+ xen_ulong_t fault_crs[8];
const char *context;
if ( hvm_guest(current) && guest_mode(regs) )
@@ -84,7 +84,7 @@ void show_registers(struct cpu_user_regs
fault_regs.eax, fault_regs.ebx, fault_regs.ecx, fault_regs.edx);
printk("esi: %08x edi: %08x ebp: %08x esp: %08x\n",
fault_regs.esi, fault_regs.edi, fault_regs.ebp, fault_regs.esp);
- printk("cr0: %08lx cr4: %08lx cr3: %08lx cr2: %08lx\n",
+ printk("cr0: %08x cr4: %08x cr3: %08x cr2: %08x\n",
fault_crs[0], fault_crs[4], fault_crs[3], fault_crs[2]);
printk("ds: %04x es: %04x fs: %04x gs: %04x "
"ss: %04x cs: %04x\n",
Index: build-32-unstable-11625/xen/include/asm-x86/processor.h
===================================================================
--- build-32-unstable-11625.orig/xen/include/asm-x86/processor.h
+++ build-32-unstable-11625/xen/include/asm-x86/processor.h
@@ -475,7 +475,7 @@ extern void write_ptbase(struct vcpu *v)
void destroy_gdt(struct vcpu *d);
long set_gdt(struct vcpu *d,
- unsigned long *frames,
+ xen_ulong_t *frames,
unsigned int entries);
long set_debugreg(struct vcpu *p, int reg, unsigned long value);
Index: build-32-unstable-11625/tools/libxc/xc_linux_restore.c
===================================================================
--- build-32-unstable-11625.orig/tools/libxc/xc_linux_restore.c
+++ build-32-unstable-11625/tools/libxc/xc_linux_restore.c
@@ -634,7 +634,7 @@ int xc_linux_restore(int xc_handle, int
/* Get the list of PFNs that are not in the psuedo-phys map */
{
unsigned int count;
- unsigned long *pfntab;
+ xen_ulong_t *pfntab;
int rc;
if (!read_exact(io_fd, &count, sizeof(count))) {
Index: build-32-unstable-11625/tools/libxc/xc_linux_save.c
===================================================================
--- build-32-unstable-11625.orig/tools/libxc/xc_linux_save.c
+++ build-32-unstable-11625/tools/libxc/xc_linux_save.c
@@ -805,7 +805,7 @@ int xc_linux_save(int xc_handle, int io_
mfn = live_p2m[i];
if((mfn != INVALID_P2M_ENTRY) && (mfn_to_pfn(mfn) != i)) {
- DPRINTF("i=0x%x mfn=%lx live_m2p=%lx\n", i,
+ DPRINTF("i=0x%x mfn=%lx live_m2p=%" PRIpfn "\n", i,
mfn, mfn_to_pfn(mfn));
err++;
}
@@ -889,7 +889,7 @@ int xc_linux_save(int xc_handle, int io_
int n = permute(N, max_pfn, order_nr);
if (debug) {
- DPRINTF("%d pfn= %08lx mfn= %08lx %d [mfn]= %08lx\n",
+ DPRINTF("%d pfn= %08lx mfn= %08" PRIpfn " %d [mfn]= %08"
PRIpfn "\n",
iter, (unsigned long)n, live_p2m[n],
test_bit(n, to_send),
mfn_to_pfn(live_p2m[n]&0xFFFFF));
@@ -941,7 +941,7 @@ int xc_linux_save(int xc_handle, int io_
goto skip; /* vanishingly unlikely... */
if ((region_base = xc_map_foreign_batch(
- xc_handle, dom, PROT_READ, pfn_type, batch)) == 0) {
+ xc_handle, dom, PROT_READ, /* FIXME */
(xen_pfn_t*)pfn_type, batch)) == 0) {
ERR("map batch failed");
goto out;
}
@@ -962,7 +962,7 @@ int xc_linux_save(int xc_handle, int io_
}
if (debug)
- DPRINTF("%d pfn= %08lx mfn= %08lx [mfn]= %08lx"
+ DPRINTF("%d pfn= %08lx mfn= %08lx [mfn]= %08" PRIpfn
" sum= %08lx\n",
iter,
(pfn_type[j] & XEN_DOMCTL_PFINFO_LTAB_MASK) |
Index: build-32-unstable-11625/tools/libxc/xc_ptrace.c
===================================================================
--- build-32-unstable-11625.orig/tools/libxc/xc_ptrace.c
+++ build-32-unstable-11625/tools/libxc/xc_ptrace.c
@@ -156,7 +156,7 @@ online_vcpus_changed(uint64_t cpumap)
/* --------------------- */
/* XXX application state */
static long nr_pages = 0;
-static unsigned long *page_array = NULL;
+static xen_ulong_t *page_array = NULL;
/*
Index:
build-32-unstable-11625/linux-2.6-xen-sparse/arch/x86_64/kernel/traps-xen.c
===================================================================
---
build-32-unstable-11625.orig/linux-2.6-xen-sparse/arch/x86_64/kernel/traps-xen.c
+++ build-32-unstable-11625/linux-2.6-xen-sparse/arch/x86_64/kernel/traps-xen.c
@@ -957,28 +957,28 @@ asmlinkage void math_state_restore(void)
* specify <dpl>|4 in the second field.
*/
static trap_info_t trap_table[] = {
- { 0, 0|4, __KERNEL_CS, (unsigned long)divide_error },
- { 1, 0|4, __KERNEL_CS, (unsigned long)debug },
- { 3, 3|4, __KERNEL_CS, (unsigned long)int3 },
- { 4, 3|4, __KERNEL_CS, (unsigned long)overflow },
- { 5, 0|4, __KERNEL_CS, (unsigned long)bounds },
- { 6, 0|4, __KERNEL_CS, (unsigned long)invalid_op },
- { 7, 0|4, __KERNEL_CS, (unsigned long)device_not_available },
- { 9, 0|4, __KERNEL_CS, (unsigned long)coprocessor_segment_overrun},
- { 10, 0|4, __KERNEL_CS, (unsigned long)invalid_TSS },
- { 11, 0|4, __KERNEL_CS, (unsigned long)segment_not_present },
- { 12, 0|4, __KERNEL_CS, (unsigned long)stack_segment },
- { 13, 0|4, __KERNEL_CS, (unsigned long)general_protection },
- { 14, 0|4, __KERNEL_CS, (unsigned long)page_fault },
- { 15, 0|4, __KERNEL_CS, (unsigned long)spurious_interrupt_bug },
- { 16, 0|4, __KERNEL_CS, (unsigned long)coprocessor_error },
- { 17, 0|4, __KERNEL_CS, (unsigned long)alignment_check },
+ { 0, 0|4, __KERNEL_CS, .address = (unsigned long)divide_error
},
+ { 1, 0|4, __KERNEL_CS, .address = (unsigned long)debug
},
+ { 3, 3|4, __KERNEL_CS, .address = (unsigned long)int3
},
+ { 4, 3|4, __KERNEL_CS, .address = (unsigned long)overflow
},
+ { 5, 0|4, __KERNEL_CS, .address = (unsigned long)bounds
},
+ { 6, 0|4, __KERNEL_CS, .address = (unsigned long)invalid_op
},
+ { 7, 0|4, __KERNEL_CS, .address = (unsigned long)device_not_available
},
+ { 9, 0|4, __KERNEL_CS, .address = (unsigned
long)coprocessor_segment_overrun},
+ { 10, 0|4, __KERNEL_CS, .address = (unsigned long)invalid_TSS
},
+ { 11, 0|4, __KERNEL_CS, .address = (unsigned long)segment_not_present
},
+ { 12, 0|4, __KERNEL_CS, .address = (unsigned long)stack_segment
},
+ { 13, 0|4, __KERNEL_CS, .address = (unsigned long)general_protection
},
+ { 14, 0|4, __KERNEL_CS, .address = (unsigned long)page_fault
},
+ { 15, 0|4, __KERNEL_CS, .address = (unsigned
long)spurious_interrupt_bug },
+ { 16, 0|4, __KERNEL_CS, .address = (unsigned long)coprocessor_error
},
+ { 17, 0|4, __KERNEL_CS, .address = (unsigned long)alignment_check
},
#ifdef CONFIG_X86_MCE
- { 18, 0|4, __KERNEL_CS, (unsigned long)machine_check },
+ { 18, 0|4, __KERNEL_CS, .address = (unsigned long)machine_check
},
#endif
- { 19, 0|4, __KERNEL_CS, (unsigned long)simd_coprocessor_error },
+ { 19, 0|4, __KERNEL_CS, .address = (unsigned
long)simd_coprocessor_error },
#ifdef CONFIG_IA32_EMULATION
- { IA32_SYSCALL_VECTOR, 3|4, __KERNEL_CS, (unsigned long)ia32_syscall},
+ { IA32_SYSCALL_VECTOR, 3|4, __KERNEL_CS, .address = (unsigned
long)ia32_syscall},
#endif
{ 0, 0, 0, 0 }
};
Index: build-32-unstable-11625/tools/ioemu/vl.h
===================================================================
--- build-32-unstable-11625.orig/tools/ioemu/vl.h
+++ build-32-unstable-11625/tools/ioemu/vl.h
@@ -146,9 +146,9 @@ extern int reset_requested;
void main_loop_wait(int timeout);
int unset_mm_mapping(int xc_handle, uint32_t domid, unsigned long nr_pages,
- unsigned int address_bits, unsigned long *extent_start);
+ unsigned int address_bits, xen_pfn_t *extent_start);
int set_mm_mapping(int xc_handle, uint32_t domid, unsigned long nr_pages,
- unsigned int address_bits, unsigned long *extent_start);
+ unsigned int address_bits, xen_pfn_t *extent_start);
extern void *shared_vram;
Index: build-32-unstable-11625/tools/libxc/xc_hvm_build.c
===================================================================
--- build-32-unstable-11625.orig/tools/libxc/xc_hvm_build.c
+++ build-32-unstable-11625/tools/libxc/xc_hvm_build.c
@@ -23,7 +23,7 @@ parseelfimage(
char *elfbase, unsigned long elfsize, struct domain_setup_info *dsi);
static int
loadelfimage(
- char *elfbase, int xch, uint32_t dom, unsigned long *parray,
+ char *elfbase, int xch, uint32_t dom, xen_pfn_t *parray,
struct domain_setup_info *dsi);
static void xc_set_hvm_param(int handle,
@@ -587,7 +587,7 @@ static int parseelfimage(char *elfbase,
static int
loadelfimage(
- char *elfbase, int xch, uint32_t dom, unsigned long *parray,
+ char *elfbase, int xch, uint32_t dom, xen_pfn_t *parray,
struct domain_setup_info *dsi)
{
Elf32_Ehdr *ehdr = (Elf32_Ehdr *)elfbase;
--
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|