diff --git a/x86-ioapic-ack-default.patch b/x86-ioapic-ack-default.patch index d5c5b52..815d347 100644 --- a/x86-ioapic-ack-default.patch +++ b/x86-ioapic-ack-default.patch @@ -4,7 +4,7 @@ Index: xen-4.1.0-testing/xen/arch/x86/io_apic.c =================================================================== --- xen-4.1.0-testing.orig/xen/arch/x86/io_apic.c +++ xen-4.1.0-testing/xen/arch/x86/io_apic.c -@@ -1546,7 +1546,7 @@ static unsigned int startup_level_ioapic +@@ -1547,7 +1547,7 @@ static unsigned int startup_level_ioapic return 0; /* don't check for pending */ } @@ -13,7 +13,7 @@ Index: xen-4.1.0-testing/xen/arch/x86/io_apic.c static void setup_ioapic_ack(char *s) { if ( !strcmp(s, "old") ) -@@ -2053,6 +2053,8 @@ void __init setup_IO_APIC(void) +@@ -2054,6 +2054,8 @@ void __init setup_IO_APIC(void) else io_apic_irqs = ~PIC_IRQS; diff --git a/x86-show-page-walk-early.patch b/x86-show-page-walk-early.patch index 0128418..dcbff38 100644 --- a/x86-show-page-walk-early.patch +++ b/x86-show-page-walk-early.patch @@ -74,7 +74,7 @@ Index: xen-4.1.0-testing/xen/arch/x86/x86_64/mm.c =================================================================== --- xen-4.1.0-testing.orig/xen/arch/x86/x86_64/mm.c +++ xen-4.1.0-testing/xen/arch/x86/x86_64/mm.c -@@ -749,6 +749,8 @@ void __init paging_init(void) +@@ -750,6 +750,8 @@ void __init paging_init(void) #undef CNT #undef MFN diff --git a/xen-utils-0.1.tar.bz2 b/xen-utils-0.1.tar.bz2 index bbe1ced..c4e0360 100644 --- a/xen-utils-0.1.tar.bz2 +++ b/xen-utils-0.1.tar.bz2 @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d6865844744c4a2b6466903ba0686e11cbf20f1fce1b34b79c60599f658c3519 -size 6384 +oid sha256:fd14ba8dac0acc960105eed40d9b4044f2ec551a976a5709d363fb5ac0027353 +size 6812 diff --git a/xen-warnings-unused.diff b/xen-warnings-unused.diff new file mode 100644 index 0000000..4bec9eb --- /dev/null +++ b/xen-warnings-unused.diff @@ -0,0 +1,758 @@ +Index: xen-4.1.0-testing/tools/libxc/xc_tmem.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/libxc/xc_tmem.c ++++ xen-4.1.0-testing/tools/libxc/xc_tmem.c +@@ -390,7 +390,8 @@ static int xc_tmem_restore_new_pool( + + int xc_tmem_restore(xc_interface *xch, int dom, int io_fd) + { +- uint32_t save_max_pools, save_version; ++ uint32_t save_version; ++ uint32_t __attribute__((__unused__)) save_max_pools; + uint32_t this_max_pools, this_version; + uint32_t pool_id; + uint32_t minusone; +Index: xen-4.1.0-testing/tools/libxc/xc_domain_restore.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/libxc/xc_domain_restore.c ++++ xen-4.1.0-testing/tools/libxc/xc_domain_restore.c +@@ -1087,7 +1087,6 @@ int xc_domain_restore(xc_interface *xch, + int vcpuextstate = 0; + uint32_t vcpuextstate_size = 0; + unsigned long mfn, pfn; +- unsigned int prev_pc; + int nraces = 0; + + /* The new domain's shared-info frame number. */ +@@ -1255,7 +1254,6 @@ int xc_domain_restore(xc_interface *xch, + * Now simply read each saved frame into its new machine frame. + * We uncanonicalise page tables as we go. + */ +- prev_pc = 0; + + n = m = 0; + loadpages: +Index: xen-4.1.0-testing/tools/misc/gtraceview.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/misc/gtraceview.c ++++ xen-4.1.0-testing/tools/misc/gtraceview.c +@@ -622,7 +622,8 @@ void crt_init(void) + void nr_addch(int nr, int ch) + { + int i; +- int y, x; ++ int x; ++ int __attribute__((__unused__)) y; + getyx(stdscr, y, x); + for (i = 0; i < nr; i++) { + if (x == COLS-1) +Index: xen-4.1.0-testing/tools/xcutils/xc_restore.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/xcutils/xc_restore.c ++++ xen-4.1.0-testing/tools/xcutils/xc_restore.c +@@ -19,7 +19,8 @@ int + main(int argc, char **argv) + { + unsigned int domid, store_evtchn, console_evtchn; +- unsigned int hvm, pae, apic; ++ unsigned int hvm, pae; ++ unsigned int __attribute__((__unused__)) apic; + xc_interface *xch; + int io_fd, ret; + int superpages; +Index: xen-4.1.0-testing/tools/firmware/rombios/32bit/tcgbios/tcgbios.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/firmware/rombios/32bit/tcgbios/tcgbios.c ++++ xen-4.1.0-testing/tools/firmware/rombios/32bit/tcgbios/tcgbios.c +@@ -1064,7 +1064,7 @@ uint32_t HashLogEvent32(struct hlei *hle + uint32_t rc = 0; + uint16_t size; + uint32_t logdataptr; +- uint32_t logdatalen; ++ uint32_t __attribute__((__unused__)) logdatalen; + uint32_t hashdataptr; + uint32_t hashdatalen; + +Index: xen-4.1.0-testing/tools/console/client/main.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/console/client/main.c ++++ xen-4.1.0-testing/tools/console/client/main.c +@@ -277,7 +277,8 @@ int main(int argc, char **argv) + + }; + char *dom_path = NULL, *path = NULL; +- int spty, xsfd; ++ int spty; ++ int __attribute__((__unused__)) xsfd; + struct xs_handle *xs; + char *end; + console_type type = CONSOLE_INVAL; +Index: xen-4.1.0-testing/tools/xenstat/xentop/xentop.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/xenstat/xentop/xentop.c ++++ xen-4.1.0-testing/tools/xenstat/xentop/xentop.c +@@ -272,7 +272,8 @@ static void fail(const char *str) + /* Return the row containing the cursor. */ + static int current_row(void) + { +- int y, x; ++ int __attribute__((__unused__)) x; ++ int y; + getyx(stdscr, y, x); + return y; + } +@@ -280,7 +281,8 @@ static int current_row(void) + /* Return the number of lines on the screen. */ + static int lines(void) + { +- int y, x; ++ int __attribute__((__unused__)) x; ++ int y; + getmaxyx(stdscr, y, x); + return y; + } +Index: xen-4.1.0-testing/tools/libxl/libxlu_cfg.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/libxl/libxlu_cfg.c ++++ xen-4.1.0-testing/tools/libxl/libxlu_cfg.c +@@ -348,7 +348,7 @@ char *xlu__cfgl_dequote(CfgParseContext + + #define NUMERIC_CHAR(minlen,maxlen,base,basetext) do{ \ + char numbuf[(maxlen)+1], *ep; \ +- unsigned long val; \ ++ unsigned long __attribute__((__unused__)) val; \ + \ + strncpy(numbuf,p,(maxlen)); \ + numbuf[(maxlen)]= 0; \ +Index: xen-4.1.0-testing/tools/libxl/libxl.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/libxl/libxl.c ++++ xen-4.1.0-testing/tools/libxl/libxl.c +@@ -221,7 +221,7 @@ int libxl_domain_rename(libxl_ctx *ctx, + int libxl_domain_resume(libxl_ctx *ctx, uint32_t domid) + { + libxl__gc gc = LIBXL_INIT_GC(ctx); +- int rc = 0; ++ int __attribute__((__unused__)) rc = 0; + + if (libxl__domain_is_hvm(ctx, domid)) { + LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Called domain_resume on " +@@ -1291,7 +1291,7 @@ libxl_nicinfo *libxl_list_nics(libxl_ctx + { + libxl__gc gc = LIBXL_INIT_GC(ctx); + char *dompath, *nic_path_fe; +- char **l, **list; ++ char **l; + char *val, *tok; + unsigned int nb_nics, i; + libxl_nicinfo *res, *nics; +@@ -1299,7 +1299,7 @@ libxl_nicinfo *libxl_list_nics(libxl_ctx + dompath = libxl__xs_get_dompath(&gc, domid); + if (!dompath) + goto err; +- list = l = libxl__xs_directory(&gc, XBT_NULL, ++ l = libxl__xs_directory(&gc, XBT_NULL, + libxl__sprintf(&gc, "%s/device/vif", dompath), &nb_nics); + if (!l) + goto err; +Index: xen-4.1.0-testing/tools/libxl/libxl_pci.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/libxl/libxl_pci.c ++++ xen-4.1.0-testing/tools/libxl/libxl_pci.c +@@ -240,7 +240,7 @@ static int libxl_create_pci_backend(libx + flexarray_t *front = NULL; + flexarray_t *back = NULL; + libxl__device device; +- int ret = ERROR_NOMEM, i; ++ int i; + + front = flexarray_make(16, 1); + if (!front) +@@ -249,8 +249,6 @@ static int libxl_create_pci_backend(libx + if (!back) + goto out; + +- ret = 0; +- + LIBXL__LOG(ctx, LIBXL__LOG_DEBUG, "Creating pci backend"); + + /* add pci device */ +Index: xen-4.1.0-testing/tools/libxl/libxl_dom.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/libxl/libxl_dom.c ++++ xen-4.1.0-testing/tools/libxl/libxl_dom.c +@@ -265,14 +265,13 @@ int libxl__build_hvm(libxl_ctx *ctx, uin + libxl_domain_build_info *info, libxl_domain_build_state *state) + { + libxl__gc gc = LIBXL_INIT_GC(ctx); +- int ret, rc = ERROR_INVAL; ++ int ret; + + if (info->kernel.mapped) { + LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "libxl__build_hvm kernel cannot be mmapped"); + goto out; + } + +- rc = ERROR_FAIL; + ret = xc_hvm_build_target_mem( + ctx->xch, + domid, +@@ -290,7 +289,6 @@ int libxl__build_hvm(libxl_ctx *ctx, uin + LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, ret, "hvm build set params failed"); + goto out; + } +- rc = 0; + out: + libxl__free_all(&gc); + return 0; +Index: xen-4.1.0-testing/tools/libxl/libxl_utils.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/libxl/libxl_utils.c ++++ xen-4.1.0-testing/tools/libxl/libxl_utils.c +@@ -531,7 +531,7 @@ int libxl_devid_to_device_disk(libxl_ctx + libxl__gc gc = LIBXL_INIT_GC(ctx); + char *endptr, *val; + char *dompath, *diskpath, *be_path; +- unsigned int devid_n; ++ unsigned int __attribute__((__unused__)) devid_n; + int rc = ERROR_INVAL; + + devid_n = strtoul(devid, &endptr, 10); +Index: xen-4.1.0-testing/tools/libxl/xl_cmdimpl.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/libxl/xl_cmdimpl.c ++++ xen-4.1.0-testing/tools/libxl/xl_cmdimpl.c +@@ -5448,7 +5448,7 @@ int main_cpupoollist(int argc, char **ar + {"cpus", 0, 0, 'c'}, + {0, 0, 0, 0} + }; +- int opt_long = 0; ++ int __attribute__((__unused__)) opt_long = 0; + int opt_cpus = 0; + const char *pool = NULL; + libxl_cpupoolinfo *poolinfo; +Index: xen-4.1.0-testing/tools/debugger/gdbsx/gx/gx_comm.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/debugger/gdbsx/gx/gx_comm.c ++++ xen-4.1.0-testing/tools/debugger/gdbsx/gx/gx_comm.c +@@ -163,7 +163,7 @@ readchar(void) + static char buf[BUFSIZ]; + static int bufcnt = 0; + static char *bufp; +- uint64_t ll; ++ uint64_t __attribute__((__unused__)) ll; + + if (bufcnt-- > 0) + return *bufp++ & 0x7f; +Index: xen-4.1.0-testing/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c ++++ xen-4.1.0-testing/tools/python/xen/lowlevel/checkpoint/libcheckpoint.c +@@ -820,7 +820,7 @@ static int create_suspend_thread(checkpo + + static void stop_suspend_thread(checkpoint_state* s) + { +- int err; ++ int __attribute__((__unused__)) err; + + s->done = 1; + +Index: xen-4.1.0-testing/tools/python/xen/lowlevel/netlink/libnetlink.c +=================================================================== +--- xen-4.1.0-testing.orig/tools/python/xen/lowlevel/netlink/libnetlink.c ++++ xen-4.1.0-testing/tools/python/xen/lowlevel/netlink/libnetlink.c +@@ -433,7 +433,8 @@ int rtnl_from_file(FILE *rtnl, rtnl_filt + nladdr.nl_groups = 0; + + while (1) { +- int err, len, type; ++ int err, len; ++ int __attribute__((__unused__)) type; + int l; + + status = fread(&buf, 1, sizeof(*h), rtnl); +Index: xen-4.1.0-testing/xen/arch/x86/msi.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/msi.c ++++ xen-4.1.0-testing/xen/arch/x86/msi.c +@@ -745,7 +745,7 @@ static void __pci_disable_msi(struct msi + { + struct pci_dev *dev; + int pos; +- u16 control; ++ u16 __attribute__((__unused__)) control; + u8 bus, slot, func; + + dev = entry->dev; +Index: xen-4.1.0-testing/xen/arch/x86/microcode_amd.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/microcode_amd.c ++++ xen-4.1.0-testing/xen/arch/x86/microcode_amd.c +@@ -164,7 +164,7 @@ static int apply_microcode(int cpu) + static int get_next_ucode_from_buffer_amd(void *mc, const void *buf, + size_t size, unsigned long *offset) + { +- struct microcode_header_amd *mc_header; ++ struct microcode_header_amd __attribute__((__unused__)) *mc_header; + size_t total_size; + const uint8_t *bufp = buf; + unsigned long off; +Index: xen-4.1.0-testing/xen/common/cpupool.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/common/cpupool.c ++++ xen-4.1.0-testing/xen/common/cpupool.c +@@ -356,7 +356,7 @@ int cpupool_add_domain(struct domain *d, + { + struct cpupool *c; + int rc = 1; +- int n_dom = 0; ++ int __attribute__((__unused__)) n_dom = 0; + + if ( poolid == CPUPOOLID_NONE ) + return 0; +@@ -380,8 +380,8 @@ int cpupool_add_domain(struct domain *d, + */ + void cpupool_rm_domain(struct domain *d) + { +- int cpupool_id; +- int n_dom; ++ int __attribute__((__unused__)) cpupool_id; ++ int __attribute__((__unused__)) n_dom; + + if ( d->cpupool == NULL ) + return; +Index: xen-4.1.0-testing/xen/common/grant_table.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/common/grant_table.c ++++ xen-4.1.0-testing/xen/common/grant_table.c +@@ -765,7 +765,7 @@ __gnttab_unmap_common( + struct domain *ld, *rd; + struct active_grant_entry *act; + s16 rc = 0; +- u32 old_pin; ++ u32 __attribute__((__unused__)) old_pin; + + ld = current->domain; + +Index: xen-4.1.0-testing/xen/drivers/passthrough/vtd/iommu.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/drivers/passthrough/vtd/iommu.c ++++ xen-4.1.0-testing/xen/drivers/passthrough/vtd/iommu.c +@@ -1743,7 +1743,7 @@ static int vtd_ept_page_compatible(struc + static bool_t vtd_ept_share(void) + { + struct acpi_drhd_unit *drhd; +- struct iommu *iommu; ++ struct iommu __attribute__((__unused__)) *iommu; + bool_t share = TRUE; + + /* sharept defaults to 0 for now, default to 1 when feature matures */ +Index: xen-4.1.0-testing/xen/common/kexec.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/common/kexec.c ++++ xen-4.1.0-testing/xen/common/kexec.c +@@ -563,7 +563,8 @@ static int kexec_exec(XEN_GUEST_HANDLE(v + { + xen_kexec_exec_t exec; + xen_kexec_image_t *image; +- int base, bit, pos, ret = -EINVAL; ++ int base, bit, pos; ++ int __attribute__((__unused__)) ret = -EINVAL; + + if ( unlikely(copy_from_guest(&exec, uarg, 1)) ) + return -EFAULT; +Index: xen-4.1.0-testing/xen/drivers/passthrough/vtd/intremap.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/drivers/passthrough/vtd/intremap.c ++++ xen-4.1.0-testing/xen/drivers/passthrough/vtd/intremap.c +@@ -363,7 +363,7 @@ unsigned int io_apic_read_remap_rte( + unsigned int ioapic_pin = (reg - 0x10) / 2; + int index; + struct IO_xAPIC_route_entry old_rte = { 0 }; +- struct IO_APIC_route_remap_entry *remap_rte; ++ struct IO_APIC_route_remap_entry __attribute__((__unused__)) *remap_rte; + int rte_upper = (reg & 1) ? 1 : 0; + struct iommu *iommu = ioapic_to_iommu(IO_APIC_ID(apic)); + struct ir_ctrl *ir_ctrl = iommu_ir_ctrl(iommu); +@@ -844,7 +844,7 @@ int iommu_enable_x2apic_IR(void) + + for_each_drhd_unit ( drhd ) + { +- struct qi_ctrl *qi_ctrl = NULL; ++ struct qi_ctrl __attribute__((__unused__)) *qi_ctrl = NULL; + + iommu = drhd->iommu; + qi_ctrl = iommu_qi_ctrl(iommu); +Index: xen-4.1.0-testing/xen/common/sched_credit2.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/common/sched_credit2.c ++++ xen-4.1.0-testing/xen/common/sched_credit2.c +@@ -1847,7 +1847,8 @@ static void deactivate_runqueue(struct c + + static void init_pcpu(const struct scheduler *ops, int cpu) + { +- int rqi, old_rqi, flags; ++ int rqi, flags; ++ int __attribute__((__unused__)) old_rqi; + struct csched_private *prv = CSCHED_PRIV(ops); + struct csched_runqueue_data *rqd; + spinlock_t *old_lock; +Index: xen-4.1.0-testing/xen/common/unlzo.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/common/unlzo.c ++++ xen-4.1.0-testing/xen/common/unlzo.c +@@ -68,7 +68,7 @@ static int INIT parse_header(u8 *input, + { + int l; + u8 *parse = input; +- u8 level = 0; ++ u8 __attribute__((__unused__)) level = 0; + u16 version; + + /* read magic: 9 first bits */ +Index: xen-4.1.0-testing/xen/arch/x86/time.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/time.c ++++ xen-4.1.0-testing/xen/arch/x86/time.c +@@ -1003,7 +1003,8 @@ static void local_time_calibration(void) + * System timestamps, extrapolated from local and master oscillators, + * taken during this calibration and the previous calibration. + */ +- s_time_t prev_local_stime, curr_local_stime; ++ s_time_t curr_local_stime; ++ s_time_t __attribute__((__unused__)) prev_local_stime; + s_time_t prev_master_stime, curr_master_stime; + + /* TSC timestamps taken during this calibration and prev calibration. */ +Index: xen-4.1.0-testing/xen/arch/x86/cpu/amd.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/cpu/amd.c ++++ xen-4.1.0-testing/xen/arch/x86/cpu/amd.c +@@ -348,7 +348,7 @@ static void __devinit init_amd(struct cp + { + u32 l, h; + int mbytes = num_physpages >> (20-PAGE_SHIFT); +- int r; ++ int __attribute__((__unused__)) r; + + #ifdef CONFIG_SMP + unsigned long long value; +Index: xen-4.1.0-testing/xen/arch/x86/mm/p2m.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/mm/p2m.c ++++ xen-4.1.0-testing/xen/arch/x86/mm/p2m.c +@@ -2266,7 +2266,7 @@ p2m_remove_page(struct p2m_domain *p2m, + unsigned int page_order) + { + unsigned long i; +- mfn_t mfn_return; ++ mfn_t __attribute__((__unused__)) mfn_return; + p2m_type_t t; + p2m_access_t a; + +@@ -2335,7 +2335,7 @@ guest_physmap_mark_populate_on_demand(st + struct p2m_domain *p2m = p2m_get_hostp2m(d); + unsigned long i; + p2m_type_t ot; +- mfn_t omfn; ++ mfn_t __attribute__((__unused__)) omfn; + int pod_count = 0; + int rc = 0; + +Index: xen-4.1.0-testing/xen/arch/x86/hvm/emulate.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/hvm/emulate.c ++++ xen-4.1.0-testing/xen/arch/x86/hvm/emulate.c +@@ -59,7 +59,7 @@ static int hvmemul_do_io( + ioreq_t *p = get_ioreq(curr); + unsigned long ram_gfn = paddr_to_pfn(ram_gpa); + p2m_type_t p2mt; +- mfn_t ram_mfn; ++ mfn_t __attribute__((__unused__)) ram_mfn; + int rc; + + /* Check for paged out page */ +Index: xen-4.1.0-testing/xen/arch/x86/hvm/hvm.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/hvm/hvm.c ++++ xen-4.1.0-testing/xen/arch/x86/hvm/hvm.c +@@ -253,7 +253,8 @@ void hvm_migrate_timers(struct vcpu *v) + + void hvm_migrate_pirqs(struct vcpu *v) + { +- int pirq, irq; ++ int pirq; ++ int __attribute__((__unused__)) irq; + struct irq_desc *desc; + struct domain *d = v->domain; + struct hvm_irq_dpci *hvm_irq_dpci = d->arch.hvm_domain.irq.dpci; +@@ -3468,7 +3469,7 @@ long do_hvm_op(unsigned long op, XEN_GUE + { + p2m_type_t t; + p2m_type_t nt; +- mfn_t mfn; ++ mfn_t __attribute__((__unused__)) mfn; + mfn = gfn_to_mfn_unshare(p2m, pfn, &t, 0); + if ( p2m_is_paging(t) ) + { +Index: xen-4.1.0-testing/xen/arch/x86/acpi/cpu_idle.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/acpi/cpu_idle.c ++++ xen-4.1.0-testing/xen/arch/x86/acpi/cpu_idle.c +@@ -273,7 +273,7 @@ static void acpi_processor_ffh_cstate_en + + static void acpi_idle_do_entry(struct acpi_processor_cx *cx) + { +- int unused; ++ int __attribute__((__unused__)) unused; + + switch ( cx->entry_method ) + { +Index: xen-4.1.0-testing/xen/arch/x86/cpu/intel.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/cpu/intel.c ++++ xen-4.1.0-testing/xen/arch/x86/cpu/intel.c +@@ -35,7 +35,7 @@ struct movsl_mask movsl_mask __read_most + */ + static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c) + { +- const char *extra = ""; ++ const char __attribute__((__unused__)) *extra = ""; + + if (!~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx & + opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx)) +Index: xen-4.1.0-testing/xen/arch/x86/cpu/intel_cacheinfo.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/cpu/intel_cacheinfo.c ++++ xen-4.1.0-testing/xen/arch/x86/cpu/intel_cacheinfo.c +@@ -170,7 +170,8 @@ unsigned int __cpuinit init_intel_cachei + unsigned int trace = 0, l1i = 0, l1d = 0, l2 = 0, l3 = 0; /* Cache sizes */ + unsigned int new_l1d = 0, new_l1i = 0; /* Cache sizes from cpuid(4) */ + unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ +- unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; ++ unsigned int num_threads_sharing, index_msb; ++ unsigned int __attribute__((__unused__)) l2_id = 0, l3_id = 0; + + if (c->cpuid_level > 3) { + static int is_initialized; +Index: xen-4.1.0-testing/xen/arch/x86/mm/mem_sharing.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/mm/mem_sharing.c ++++ xen-4.1.0-testing/xen/arch/x86/mm/mem_sharing.c +@@ -376,7 +376,7 @@ int mem_sharing_debug_gfn(struct domain + { + p2m_type_t p2mt; + mfn_t mfn; +- struct page_info *page; ++ struct page_info __attribute__((__unused__)) *page; + + mfn = gfn_to_mfn(p2m_get_hostp2m(d), gfn, &p2mt); + page = mfn_to_page(mfn); +Index: xen-4.1.0-testing/xen/arch/x86/hvm/viridian.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/hvm/viridian.c ++++ xen-4.1.0-testing/xen/arch/x86/hvm/viridian.c +@@ -270,7 +270,7 @@ int rdmsr_viridian_regs(uint32_t idx, ui + int viridian_hypercall(struct cpu_user_regs *regs) + { + int mode = hvm_guest_x86_mode(current); +- unsigned long input_params_gpa, output_params_gpa; ++ unsigned long __attribute__((__unused__)) input_params_gpa, output_params_gpa; + uint16_t status = HV_STATUS_SUCCESS; + + union hypercall_input { +Index: xen-4.1.0-testing/xen/arch/x86/mm.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/mm.c ++++ xen-4.1.0-testing/xen/arch/x86/mm.c +@@ -4900,7 +4900,7 @@ static int ptwr_emulated_update( + { + unsigned long mfn; + unsigned long unaligned_addr = addr; +- struct page_info *page; ++ struct page_info __attribute__((__unused__)) *page; + l1_pgentry_t pte, ol1e, nl1e, *pl1e; + struct vcpu *v = current; + struct domain *d = v->domain; +Index: xen-4.1.0-testing/xen/arch/x86/x86_64/mm.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/x86_64/mm.c ++++ xen-4.1.0-testing/xen/arch/x86/x86_64/mm.c +@@ -435,7 +435,8 @@ void destroy_m2p_mapping(struct mem_hota + static int setup_compat_m2p_table(struct mem_hotadd_info *info) + { + unsigned long i, va, smap, emap, rwva, epfn = info->epfn; +- unsigned int n, memflags; ++ unsigned int n; ++ unsigned int __attribute__((__unused__)) memflags; + l3_pgentry_t *l3_ro_mpt = NULL; + l2_pgentry_t *l2_ro_mpt = NULL; + struct page_info *l1_pg; +Index: xen-4.1.0-testing/xen/arch/x86/cpu/mcheck/mce.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/cpu/mcheck/mce.c ++++ xen-4.1.0-testing/xen/arch/x86/cpu/mcheck/mce.c +@@ -151,7 +151,6 @@ static struct mcinfo_bank *mca_init_bank + struct mc_info *mi, int bank) + { + struct mcinfo_bank *mib; +- uint64_t addr=0, misc = 0; + + if (!mi) + return NULL; +@@ -170,7 +169,6 @@ static struct mcinfo_bank *mca_init_bank + mib->common.size = sizeof (struct mcinfo_bank); + mib->mc_bank = bank; + +- addr = misc = 0; + if (mib->mc_status & MCi_STATUS_MISCV) + mib->mc_misc = mca_rdmsr(MSR_IA32_MCx_MISC(bank)); + +@@ -281,7 +279,7 @@ mctelem_cookie_t mcheck_mca_logout(enum + recover = (mc_recoverable_scan)? 1: 0; + + for (i = 0; i < 32 && i < nr_mce_banks; i++) { +- struct mcinfo_bank *mib; /* on stack */ ++ struct mcinfo_bank __attribute__((__unused__)) *mib; /* on stack */ + + /* Skip bank if corresponding bit in bankmask is clear */ + if (!mcabanks_test(i, bankmask)) +@@ -1214,7 +1212,7 @@ static void x86_mc_msrinject(void *data) + { + struct xen_mc_msrinject *mci = data; + struct mcinfo_msr *msr; +- struct cpuinfo_x86 *c; ++ struct cpuinfo_x86 __attribute__((__unused__)) *c; + uint64_t hwcr = 0; + int intpose; + int i; +Index: xen-4.1.0-testing/xen/common/tmem.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/common/tmem.c ++++ xen-4.1.0-testing/xen/common/tmem.c +@@ -1351,7 +1351,8 @@ obj_unlock: + static int tmem_evict(void) + { + client_t *client = tmh_client_from_current(); +- pgp_t *pgp = NULL, *pgp2, *pgp_del; ++ pgp_t *pgp = NULL, *pgp2; ++ pgp_t __attribute__((__unused__)) *pgp_del; + obj_t *obj; + pool_t *pool; + int ret = 0; +@@ -1588,7 +1589,8 @@ static NOINLINE int do_tmem_put(pool_t * + pagesize_t pfn_offset, pagesize_t len, void *cva) + { + obj_t *obj = NULL, *objfound = NULL, *objnew = NULL; +- pgp_t *pgp = NULL, *pgpdel = NULL; ++ pgp_t *pgp = NULL; ++ pgp_t __attribute__((__unused__)) *pgpdel = NULL; + client_t *client = pool->client; + int ret = client->frozen ? -EFROZEN : -ENOMEM; + +Index: xen-4.1.0-testing/xen/common/tmem_xen.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/common/tmem_xen.c ++++ xen-4.1.0-testing/xen/common/tmem_xen.c +@@ -177,7 +177,7 @@ EXPORT int tmh_copy_from_client(pfp_t *p + EXPORT int tmh_compress_from_client(tmem_cli_mfn_t cmfn, + void **out_va, size_t *out_len, void *cli_va) + { +- int ret = 0; ++ int __attribute__((__unused__)) ret = 0; + unsigned char *dmem = this_cpu(dstmem); + unsigned char *wmem = this_cpu(workmem); + pfp_t *cli_pfp = NULL; +@@ -237,7 +237,7 @@ EXPORT int tmh_decompress_to_client(tmem + pfp_t *cli_pfp = NULL; + size_t out_len = PAGE_SIZE; + bool_t tmemc = cli_va != NULL; /* if true, cli_va is control-op buffer */ +- int ret; ++ int __attribute__((__unused__)) ret; + + if ( !tmemc ) + { +@@ -366,15 +366,17 @@ static void tmh_persistent_pool_page_put + EXPORT tmh_client_t *tmh_client_init(cli_id_t cli_id) + { + tmh_client_t *tmh; ++#ifndef __i386__ + char name[5]; + int i, shift; ++#endif + + if ( (tmh = xmalloc(tmh_client_t)) == NULL ) + return NULL; ++#ifndef __i386__ + for (i = 0, shift = 12; i < 4; shift -=4, i++) + name[i] = (((unsigned short)cli_id >> shift) & 0xf) + '0'; + name[4] = '\0'; +-#ifndef __i386__ + tmh->persistent_pool = xmem_pool_create(name, tmh_persistent_pool_page_get, + tmh_persistent_pool_page_put, PAGE_SIZE, 0, PAGE_SIZE); + if ( tmh->persistent_pool == NULL ) +Index: xen-4.1.0-testing/xen/arch/x86/cpu/mcheck/vmce.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/cpu/mcheck/vmce.c ++++ xen-4.1.0-testing/xen/arch/x86/cpu/mcheck/vmce.c +@@ -574,7 +574,7 @@ int is_vmce_ready(struct mcinfo_bank *ba + */ + int unmmap_broken_page(struct domain *d, mfn_t mfn, unsigned long gfn) + { +- mfn_t r_mfn; ++ mfn_t __attribute__((__unused__)) r_mfn; + struct p2m_domain *p2m; + p2m_type_t pt; + +Index: xen-4.1.0-testing/xen/arch/x86/mm/shadow/multi.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/mm/shadow/multi.c ++++ xen-4.1.0-testing/xen/arch/x86/mm/shadow/multi.c +@@ -124,7 +124,7 @@ set_shadow_status(struct vcpu *v, mfn_t + /* Put a shadow into the hash table */ + { + struct domain *d = v->domain; +- int res; ++ int __attribute__((__unused__)) res; + + SHADOW_PRINTK("d=%d, v=%d, gmfn=%05lx, type=%08x, smfn=%05lx\n", + d->domain_id, v->vcpu_id, mfn_x(gmfn), +@@ -4446,7 +4446,7 @@ sh_update_cr3(struct vcpu *v, int do_loc + int sh_rm_write_access_from_sl1p(struct vcpu *v, mfn_t gmfn, + mfn_t smfn, unsigned long off) + { +- int r; ++ int __attribute__((__unused__)) r; + shadow_l1e_t *sl1p, sl1e; + struct page_info *sp; + +Index: xen-4.1.0-testing/xen/arch/x86/domain_build.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/domain_build.c ++++ xen-4.1.0-testing/xen/arch/x86/domain_build.c +@@ -375,8 +375,7 @@ int __init construct_dom0( + return rc; + + /* compatibility check */ +- compatible = 0; +- compat32 = 0; ++ compatible = compat32 = 0; + machine = elf_uval(&elf, elf.ehdr, e_machine); + switch (CONFIG_PAGING_LEVELS) { + case 3: /* x86_32p */ +Index: xen-4.1.0-testing/xen/arch/x86/traps.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/traps.c ++++ xen-4.1.0-testing/xen/arch/x86/traps.c +@@ -1708,7 +1708,11 @@ static int emulate_privileged_op(struct + struct vcpu *v = current; + unsigned long *reg, eip = regs->eip; + u8 opcode, modrm_reg = 0, modrm_rm = 0, rep_prefix = 0, lock = 0, rex = 0; ++#ifdef CONFIG_X86_64 + enum { lm_seg_none, lm_seg_fs, lm_seg_gs } lm_ovr = lm_seg_none; ++#else ++ enum { lm_seg_none, lm_seg_fs, lm_seg_gs } __attribute__((__unused__)) lm_ovr = lm_seg_none; ++#endif + int rc; + unsigned int port, i, data_sel, ar, data, bpmatch = 0; + unsigned int op_bytes, op_default, ad_bytes, ad_default, opsize_prefix= 0; diff --git a/xen-warnings.diff b/xen-warnings.diff index d66cabf..abb066b 100644 --- a/xen-warnings.diff +++ b/xen-warnings.diff @@ -78,6 +78,24 @@ Index: xen-4.1.0-testing/tools/xenstore/xenstored_core.c TDB_CONTEXT *tdb_context(struct connection *conn) { +@@ -130,7 +130,7 @@ void trace(const char *fmt, ...) + va_list arglist; + char *str; + char sbuf[1024]; +- int ret, dummy; ++ int ret, __attribute__((__unused__)) dummy; + + if (tracefd < 0) + return; +@@ -200,7 +200,7 @@ void trace_destroy(const void *data, con + static void trigger_reopen_log(int signal __attribute__((unused))) + { + char c = 'A'; +- int dummy; ++ int __attribute__((__unused__)) dummy; + dummy = write(reopen_log_pipe[1], &c, 1); + } + @@ -1786,10 +1786,10 @@ int main(int argc, char *argv[]) remove_local = false; break; @@ -198,3 +216,22 @@ Index: xen-4.1.0-testing/tools/blktap2/include/blktaplib.h #define WRITE 1 /*Control Messages between manager and tapdev*/ +Index: xen-4.1.0-testing/xen/arch/x86/io_apic.c +=================================================================== +--- xen-4.1.0-testing.orig/xen/arch/x86/io_apic.c ++++ xen-4.1.0-testing/xen/arch/x86/io_apic.c +@@ -227,12 +227,13 @@ int restore_IO_APIC_setup(struct IO_APIC + if (!ioapic_entries[apic]) + return -ENOMEM; + +- for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) ++ for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) { + entry = ioapic_entries[apic][pin]; + spin_lock_irqsave(&ioapic_lock, flags); + __io_apic_write(apic, 0x11+2*pin, *(((int *)&entry)+1)); + __io_apic_write(apic, 0x10+2*pin, *(((int *)&entry)+0)); + spin_unlock_irqrestore(&ioapic_lock, flags); ++ } + } + + return 0; diff --git a/xen.changes b/xen.changes index 74c721e..c8e7b9c 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Thu May 12 21:10:21 MDT 2011 - carnold@novell.com + +- Numerous cleanups when compiling with the unused-but-set-variable + flag enabled and warnings equal to errors. + xen-warnings-unused.diff + +------------------------------------------------------------------- +Thu May 12 08:30:48 MDT 2011 - jfehlig@novell.com + +- Add a 'long' option to xen-list utility + Updated xen-utils-0.1.tar.bz2 + ------------------------------------------------------------------- Tue May 10 08:53:27 MDT 2011 - jfehlig@novell.com diff --git a/xen.spec b/xen.spec index 3b02d4e..d443635 100644 --- a/xen.spec +++ b/xen.spec @@ -140,16 +140,17 @@ Patch301: xend-config.diff Patch302: xen-destdir.diff Patch303: xen-rpmoptflags.diff Patch304: xen-warnings.diff -Patch305: xen-changeset.diff -Patch306: xen-paths.diff -Patch307: xen-xmexample.diff -Patch308: xen-xmexample-vti.diff -Patch309: xen-fixme-doc.diff -Patch310: xen-domUloader.diff -Patch311: xen-no-dummy-nfs-ip.diff -Patch312: serial-split.patch -Patch313: xen-xm-top-needs-root.diff -Patch314: xen-max-free-mem.diff +Patch305: xen-warnings-unused.diff +Patch306: xen-changeset.diff +Patch307: xen-paths.diff +Patch308: xen-xmexample.diff +Patch309: xen-xmexample-vti.diff +Patch310: xen-fixme-doc.diff +Patch311: xen-domUloader.diff +Patch312: xen-no-dummy-nfs-ip.diff +Patch313: serial-split.patch +Patch314: xen-xm-top-needs-root.diff +Patch315: xen-max-free-mem.diff Patch322: bridge-opensuse.patch Patch323: bridge-vlan.diff Patch324: bridge-bonding.diff @@ -635,6 +636,7 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools %patch312 -p1 %patch313 -p1 %patch314 -p1 +%patch315 -p1 %patch322 -p1 %patch323 -p1 %patch324 -p1 diff --git a/xenalyze.gcc46.patch b/xenalyze.gcc46.patch index 880a565..1d68bc4 100644 --- a/xenalyze.gcc46.patch +++ b/xenalyze.gcc46.patch @@ -120,3 +120,21 @@ Index: xen-4.1.0-testing/xenalyze.hg/xenalyze.c /* Close vmexits when the putative reason for blocking / &c stops. * This way, we don't account cpu contention to some other overhead. */ +@@ -9284,7 +9263,7 @@ error_t cmd_parser(int key, char *arg, s + + case OPT_TOLERANCE: + { +- char * inval, *p; ++ char * inval; + + opt.tolerance = (int)strtol(arg, &inval, 0); + +@@ -9298,8 +9277,6 @@ error_t cmd_parser(int key, char *arg, s + exit(1); + } + +- p = inval; +- + printf("Tolerating errors at or below %d\n", + opt.tolerance); + }