ia64/xen-unstable

changeset 18613:60bd590a0438

Merge with IA64 tree
author Keir Fraser <keir.fraser@citrix.com>
date Fri Oct 10 10:18:06 2008 +0100 (2008-10-10)
parents c2fc4d26ef18 cafbd83e2258
children 365674de23c2
files
line diff
     1.1 --- a/tools/misc/Makefile	Fri Oct 10 12:06:46 2008 +0900
     1.2 +++ b/tools/misc/Makefile	Fri Oct 10 10:18:06 2008 +0100
     1.3 @@ -10,8 +10,8 @@ CFLAGS   += $(INCLUDES)
     1.4  
     1.5  HDRS     = $(wildcard *.h)
     1.6  
     1.7 -TARGETS-y := xenperf
     1.8 -TARGETS-$(CONFIG_X86) += xen-detect xenpm
     1.9 +TARGETS-y := xenperf xenpm
    1.10 +TARGETS-$(CONFIG_X86) += xen-detect
    1.11  TARGETS := $(TARGETS-y)
    1.12  
    1.13  SUBDIRS-$(CONFIG_LOMOUNT) += lomount
    1.14 @@ -22,8 +22,7 @@ INSTALL_BIN-y := xencons
    1.15  INSTALL_BIN-$(CONFIG_X86) += xen-detect
    1.16  INSTALL_BIN := $(INSTALL_BIN-y)
    1.17  
    1.18 -INSTALL_SBIN-y := netfix xm xen-bugtool xen-python-path xend xenperf xsview
    1.19 -INSTALL_SBIN-$(CONFIG_X86) += xenpm
    1.20 +INSTALL_SBIN-y := netfix xm xen-bugtool xen-python-path xend xenperf xsview xenpm
    1.21  INSTALL_SBIN := $(INSTALL_SBIN-y)
    1.22  
    1.23  DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path)
     2.1 --- a/tools/python/xen/util/pci.py	Fri Oct 10 12:06:46 2008 +0900
     2.2 +++ b/tools/python/xen/util/pci.py	Fri Oct 10 10:18:06 2008 +0100
     2.3 @@ -400,12 +400,8 @@ class PciDevice:
     2.4              lst = target.split('/')
     2.5              parent = lst[len(lst)-2]
     2.6              if parent[0:3] == 'pci':
     2.7 -                parent = parent[3:]
     2.8 -                lst = parent.split(':')
     2.9 -                dom = int(lst[0], 16)
    2.10 -                bus = int(lst[1], 16)
    2.11 -                dev = 0
    2.12 -                func = 0
    2.13 +                # We have reached the upmost one.
    2.14 +                return None
    2.15              else:
    2.16                  lst = parent.split(':')
    2.17                  dom = int(lst[0], 16)
    2.18 @@ -424,7 +420,10 @@ class PciDevice:
    2.19          (dom, b, d, f) = self.find_parent()
    2.20          dev = dev_parent = PciDevice(dom, b, d, f)
    2.21          while dev_parent.dev_type != DEV_TYPE_PCIe_BRIDGE:
    2.22 -            (dom, b, d, f) = dev_parent.find_parent()
    2.23 +            parent = dev_parent.find_parent()
    2.24 +            if parent is None:
    2.25 +                break
    2.26 +            (dom, b, d, f) = parent
    2.27              dev = dev_parent
    2.28              dev_parent = PciDevice(dom, b, d, f)
    2.29          return dev
     3.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Fri Oct 10 12:06:46 2008 +0900
     3.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Fri Oct 10 10:18:06 2008 +0100
     3.3 @@ -2109,9 +2109,21 @@ asmlinkage void vmx_vmexit_handler(struc
     3.4          switch ( vector )
     3.5          {
     3.6          case TRAP_debug:
     3.7 +            /*
     3.8 +             * Updates DR6 where debugger can peek (See 3B 23.2.1,
     3.9 +             * Table 23-1, "Exit Qualification for Debug Exceptions").
    3.10 +             */
    3.11 +            exit_qualification = __vmread(EXIT_QUALIFICATION);
    3.12 +            write_debugreg(6, exit_qualification | 0xffff0ff0);
    3.13 +            if ( !v->domain->debugger_attached )
    3.14 +                goto exit_and_crash;
    3.15 +            domain_pause_for_debugger();
    3.16 +            break;
    3.17          case TRAP_int3:
    3.18              if ( !v->domain->debugger_attached )
    3.19                  goto exit_and_crash;
    3.20 +            inst_len = __get_instruction_length(); /* Safe: INT3 */
    3.21 +            __update_guest_eip(inst_len);
    3.22              domain_pause_for_debugger();
    3.23              break;
    3.24          case TRAP_no_device:
     4.1 --- a/xen/drivers/acpi/pmstat.c	Fri Oct 10 12:06:46 2008 +0900
     4.2 +++ b/xen/drivers/acpi/pmstat.c	Fri Oct 10 10:18:06 2008 +0100
     4.3 @@ -50,10 +50,11 @@ extern int pmstat_reset_cx_stat(uint32_t
     4.4  int do_get_pm_info(struct xen_sysctl_get_pmstat *op)
     4.5  {
     4.6      int ret = 0;
     4.7 -    const struct processor_pminfo *pmpt = processor_pminfo[op->cpuid];
     4.8 +    const struct processor_pminfo *pmpt;
     4.9  
    4.10      if ( (op->cpuid >= NR_CPUS) || !cpu_online(op->cpuid) )
    4.11          return -EINVAL;
    4.12 +    pmpt = processor_pminfo[op->cpuid];
    4.13  
    4.14      switch ( op->type & PMSTAT_CATEGORY_MASK )
    4.15      {
     5.1 --- a/xen/drivers/cpufreq/cpufreq.c	Fri Oct 10 12:06:46 2008 +0900
     5.2 +++ b/xen/drivers/cpufreq/cpufreq.c	Fri Oct 10 10:18:06 2008 +0100
     5.3 @@ -213,7 +213,7 @@ static void print_PSD( struct xen_psd_pa
     5.4  
     5.5  int set_px_pminfo(uint32_t acpi_id, struct xen_processor_performance *dom0_px_info)
     5.6  {
     5.7 -    int cpu_count = 0, ret=0, cpuid;
     5.8 +    int ret=0, cpuid;
     5.9      struct processor_pminfo *pmpt;
    5.10      struct processor_performance *pxpt;
    5.11  
    5.12 @@ -298,7 +298,6 @@ int set_px_pminfo(uint32_t acpi_id, stru
    5.13                  XEN_PX_PSD | XEN_PX_PPC ) )
    5.14      {
    5.15          pxpt->init = XEN_PX_INIT;
    5.16 -        cpu_count++;
    5.17  
    5.18          ret = cpufreq_cpu_init(cpuid);
    5.19          goto out;
     6.1 --- a/xen/drivers/passthrough/vtd/iommu.h	Fri Oct 10 12:06:46 2008 +0900
     6.2 +++ b/xen/drivers/passthrough/vtd/iommu.h	Fri Oct 10 10:18:06 2008 +0100
     6.3 @@ -258,15 +258,17 @@ struct context_entry {
     6.4  struct dma_pte {
     6.5      u64 val;
     6.6  };
     6.7 -#define dma_clear_pte(p)    do {(p).val = 0;} while(0)
     6.8 -#define dma_set_pte_readable(p) do {(p).val |= 1;} while(0)
     6.9 -#define dma_set_pte_writable(p) do {(p).val |= 2;} while(0)
    6.10 -#define dma_set_pte_superpage(p) do {(p).val |= 8;} while(0)
    6.11 -#define dma_set_pte_prot(p, prot) do { (p).val = (((p).val >> 2) << 2) | ((prot) & 3);} while (0)
    6.12 -#define dma_pte_addr(p) ((p).val & PAGE_MASK_4K)
    6.13 -#define dma_set_pte_addr(p, addr) do {(p).val |= ((addr) >> PAGE_SHIFT_4K) << PAGE_SHIFT_4K;} while(0)
    6.14  #define DMA_PTE_READ (1)
    6.15  #define DMA_PTE_WRITE (2)
    6.16 +#define dma_clear_pte(p)    do {(p).val = 0;} while(0)
    6.17 +#define dma_set_pte_readable(p) do {(p).val |= DMA_PTE_READ;} while(0)
    6.18 +#define dma_set_pte_writable(p) do {(p).val |= DMA_PTE_WRITE;} while(0)
    6.19 +#define dma_set_pte_superpage(p) do {(p).val |= (1 << 7);} while(0)
    6.20 +#define dma_set_pte_prot(p, prot) \
    6.21 +            do {(p).val = ((p).val & ~3) | ((prot) & 3); } while (0)
    6.22 +#define dma_pte_addr(p) ((p).val & PAGE_MASK_4K)
    6.23 +#define dma_set_pte_addr(p, addr) do {\
    6.24 +            (p).val |= ((addr) & PAGE_MASK_4K); } while (0)
    6.25  #define dma_pte_present(p) (((p).val & 3) != 0)
    6.26  
    6.27  /* interrupt remap entry */