[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Merge with IA64 tree



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1223630286 -3600
# Node ID 60bd590a0438e55f1bdd08c01cc6a4932a9b922e
# Parent  c2fc4d26ef18b53b19c4ca03a836b1b75143d158
# Parent  cafbd83e2258679ff2740a3f7bf7ade7640bfd89
Merge with IA64 tree
---
 tools/misc/Makefile                 |    7 +++----
 tools/python/xen/util/pci.py        |   13 ++++++-------
 xen/arch/x86/hvm/vmx/vmx.c          |   12 ++++++++++++
 xen/drivers/acpi/pmstat.c           |    3 ++-
 xen/drivers/cpufreq/cpufreq.c       |    3 +--
 xen/drivers/passthrough/vtd/iommu.h |   16 +++++++++-------
 6 files changed, 33 insertions(+), 21 deletions(-)

diff -r c2fc4d26ef18 -r 60bd590a0438 tools/misc/Makefile
--- a/tools/misc/Makefile       Fri Oct 10 12:06:46 2008 +0900
+++ b/tools/misc/Makefile       Fri Oct 10 10:18:06 2008 +0100
@@ -10,8 +10,8 @@ CFLAGS   += $(INCLUDES)
 
 HDRS     = $(wildcard *.h)
 
-TARGETS-y := xenperf
-TARGETS-$(CONFIG_X86) += xen-detect xenpm
+TARGETS-y := xenperf xenpm
+TARGETS-$(CONFIG_X86) += xen-detect
 TARGETS := $(TARGETS-y)
 
 SUBDIRS-$(CONFIG_LOMOUNT) += lomount
@@ -22,8 +22,7 @@ INSTALL_BIN-$(CONFIG_X86) += xen-detect
 INSTALL_BIN-$(CONFIG_X86) += xen-detect
 INSTALL_BIN := $(INSTALL_BIN-y)
 
-INSTALL_SBIN-y := netfix xm xen-bugtool xen-python-path xend xenperf xsview
-INSTALL_SBIN-$(CONFIG_X86) += xenpm
+INSTALL_SBIN-y := netfix xm xen-bugtool xen-python-path xend xenperf xsview 
xenpm
 INSTALL_SBIN := $(INSTALL_SBIN-y)
 
 DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path)
diff -r c2fc4d26ef18 -r 60bd590a0438 tools/python/xen/util/pci.py
--- a/tools/python/xen/util/pci.py      Fri Oct 10 12:06:46 2008 +0900
+++ b/tools/python/xen/util/pci.py      Fri Oct 10 10:18:06 2008 +0100
@@ -400,12 +400,8 @@ class PciDevice:
             lst = target.split('/')
             parent = lst[len(lst)-2]
             if parent[0:3] == 'pci':
-                parent = parent[3:]
-                lst = parent.split(':')
-                dom = int(lst[0], 16)
-                bus = int(lst[1], 16)
-                dev = 0
-                func = 0
+                # We have reached the upmost one.
+                return None
             else:
                 lst = parent.split(':')
                 dom = int(lst[0], 16)
@@ -424,7 +420,10 @@ class PciDevice:
         (dom, b, d, f) = self.find_parent()
         dev = dev_parent = PciDevice(dom, b, d, f)
         while dev_parent.dev_type != DEV_TYPE_PCIe_BRIDGE:
-            (dom, b, d, f) = dev_parent.find_parent()
+            parent = dev_parent.find_parent()
+            if parent is None:
+                break
+            (dom, b, d, f) = parent
             dev = dev_parent
             dev_parent = PciDevice(dom, b, d, f)
         return dev
diff -r c2fc4d26ef18 -r 60bd590a0438 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Fri Oct 10 12:06:46 2008 +0900
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Fri Oct 10 10:18:06 2008 +0100
@@ -2109,9 +2109,21 @@ asmlinkage void vmx_vmexit_handler(struc
         switch ( vector )
         {
         case TRAP_debug:
+            /*
+             * Updates DR6 where debugger can peek (See 3B 23.2.1,
+             * Table 23-1, "Exit Qualification for Debug Exceptions").
+             */
+            exit_qualification = __vmread(EXIT_QUALIFICATION);
+            write_debugreg(6, exit_qualification | 0xffff0ff0);
+            if ( !v->domain->debugger_attached )
+                goto exit_and_crash;
+            domain_pause_for_debugger();
+            break;
         case TRAP_int3:
             if ( !v->domain->debugger_attached )
                 goto exit_and_crash;
+            inst_len = __get_instruction_length(); /* Safe: INT3 */
+            __update_guest_eip(inst_len);
             domain_pause_for_debugger();
             break;
         case TRAP_no_device:
diff -r c2fc4d26ef18 -r 60bd590a0438 xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c Fri Oct 10 12:06:46 2008 +0900
+++ b/xen/drivers/acpi/pmstat.c Fri Oct 10 10:18:06 2008 +0100
@@ -50,10 +50,11 @@ int do_get_pm_info(struct xen_sysctl_get
 int do_get_pm_info(struct xen_sysctl_get_pmstat *op)
 {
     int ret = 0;
-    const struct processor_pminfo *pmpt = processor_pminfo[op->cpuid];
+    const struct processor_pminfo *pmpt;
 
     if ( (op->cpuid >= NR_CPUS) || !cpu_online(op->cpuid) )
         return -EINVAL;
+    pmpt = processor_pminfo[op->cpuid];
 
     switch ( op->type & PMSTAT_CATEGORY_MASK )
     {
diff -r c2fc4d26ef18 -r 60bd590a0438 xen/drivers/cpufreq/cpufreq.c
--- a/xen/drivers/cpufreq/cpufreq.c     Fri Oct 10 12:06:46 2008 +0900
+++ b/xen/drivers/cpufreq/cpufreq.c     Fri Oct 10 10:18:06 2008 +0100
@@ -213,7 +213,7 @@ static void print_PSD( struct xen_psd_pa
 
 int set_px_pminfo(uint32_t acpi_id, struct xen_processor_performance 
*dom0_px_info)
 {
-    int cpu_count = 0, ret=0, cpuid;
+    int ret=0, cpuid;
     struct processor_pminfo *pmpt;
     struct processor_performance *pxpt;
 
@@ -298,7 +298,6 @@ int set_px_pminfo(uint32_t acpi_id, stru
                 XEN_PX_PSD | XEN_PX_PPC ) )
     {
         pxpt->init = XEN_PX_INIT;
-        cpu_count++;
 
         ret = cpufreq_cpu_init(cpuid);
         goto out;
diff -r c2fc4d26ef18 -r 60bd590a0438 xen/drivers/passthrough/vtd/iommu.h
--- a/xen/drivers/passthrough/vtd/iommu.h       Fri Oct 10 12:06:46 2008 +0900
+++ b/xen/drivers/passthrough/vtd/iommu.h       Fri Oct 10 10:18:06 2008 +0100
@@ -258,15 +258,17 @@ struct dma_pte {
 struct dma_pte {
     u64 val;
 };
-#define dma_clear_pte(p)    do {(p).val = 0;} while(0)
-#define dma_set_pte_readable(p) do {(p).val |= 1;} while(0)
-#define dma_set_pte_writable(p) do {(p).val |= 2;} while(0)
-#define dma_set_pte_superpage(p) do {(p).val |= 8;} while(0)
-#define dma_set_pte_prot(p, prot) do { (p).val = (((p).val >> 2) << 2) | 
((prot) & 3);} while (0)
-#define dma_pte_addr(p) ((p).val & PAGE_MASK_4K)
-#define dma_set_pte_addr(p, addr) do {(p).val |= ((addr) >> PAGE_SHIFT_4K) << 
PAGE_SHIFT_4K;} while(0)
 #define DMA_PTE_READ (1)
 #define DMA_PTE_WRITE (2)
+#define dma_clear_pte(p)    do {(p).val = 0;} while(0)
+#define dma_set_pte_readable(p) do {(p).val |= DMA_PTE_READ;} while(0)
+#define dma_set_pte_writable(p) do {(p).val |= DMA_PTE_WRITE;} while(0)
+#define dma_set_pte_superpage(p) do {(p).val |= (1 << 7);} while(0)
+#define dma_set_pte_prot(p, prot) \
+            do {(p).val = ((p).val & ~3) | ((prot) & 3); } while (0)
+#define dma_pte_addr(p) ((p).val & PAGE_MASK_4K)
+#define dma_set_pte_addr(p, addr) do {\
+            (p).val |= ((addr) & PAGE_MASK_4K); } while (0)
 #define dma_pte_present(p) (((p).val & 3) != 0)
 
 /* interrupt remap entry */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.