- bnc#717650 - Unable to start VM
- Update to Xen 4.1.2_rc2 c/s 23152 - bnc#716695 - domUs using tap devices will not start updated multi-xvdp.patch - Upstream patches from Jan 23803-intel-pmu-models.patch 23800-x86_64-guest-addr-range.patch 23795-intel-ich10-quirk.patch 23804-x86-IPI-counts.patch - bnc#706106 - Inconsistent reporting of VM names during migration xend-migration-domname-fix.patch - bnc#712823 - L3:Xen guest does not start reliable when rebooted xend-vcpu-affinity-fix.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=143
This commit is contained in:
parent
679b440be4
commit
800917b5a2
@ -19,10 +19,10 @@ could be introduced.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/mm/shadow/multi.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm/shadow/multi.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/mm/shadow/multi.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/mm/shadow/multi.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm/shadow/multi.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm/shadow/multi.c
|
||||
@@ -872,7 +872,7 @@ shadow_get_page_from_l1e(shadow_l1e_t sl
|
||||
// If a privileged domain is attempting to install a map of a page it does
|
||||
// not own, we let it succeed anyway.
|
||||
@ -74,10 +74,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/mm/shadow/multi.c
|
||||
shadow_vram_get_l1e(new_sl1e, sl1e, sl1mfn, d);
|
||||
break;
|
||||
}
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/mm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/mm.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
@@ -799,12 +799,12 @@ get_page_from_l1e(
|
||||
bool_t write;
|
||||
|
||||
|
@ -12,10 +12,10 @@ x86: make mod_l1_entry() return a proper error code
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/mm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/mm.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
@@ -1765,15 +1765,16 @@ static int mod_l1_entry(l1_pgentry_t *pl
|
||||
struct domain *pt_dom = pt_vcpu->domain;
|
||||
unsigned long mfn;
|
||||
|
@ -11,10 +11,10 @@ track both an okay status and an error code).
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/mm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/mm.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
@@ -1845,16 +1845,16 @@ static int mod_l2_entry(l2_pgentry_t *pl
|
||||
struct domain *d = vcpu->domain;
|
||||
struct page_info *l2pg = mfn_to_page(pfn);
|
||||
|
@ -9,8 +9,10 @@ Define new <pfn.h> header for PFN_{DOWN,UP} macros.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/domain_build.c
|
||||
+++ b/xen/arch/x86/domain_build.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/domain_build.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/domain_build.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/domain_build.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <xen/bitops.h>
|
||||
#include <xen/compat.h>
|
||||
@ -19,8 +21,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
#include <asm/regs.h>
|
||||
#include <asm/system.h>
|
||||
#include <asm/io.h>
|
||||
--- a/xen/arch/x86/e820.c
|
||||
+++ b/xen/arch/x86/e820.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/e820.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/e820.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/e820.c
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <xen/mm.h>
|
||||
#include <xen/compat.h>
|
||||
@ -29,8 +33,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
#include <asm/e820.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/processor.h>
|
||||
--- a/xen/arch/x86/mm.c
|
||||
+++ b/xen/arch/x86/mm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
@@ -99,6 +99,7 @@
|
||||
#include <xen/event.h>
|
||||
#include <xen/iocap.h>
|
||||
@ -39,8 +45,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
#include <asm/paging.h>
|
||||
#include <asm/shadow.h>
|
||||
#include <asm/page.h>
|
||||
--- a/xen/arch/x86/msi.c
|
||||
+++ b/xen/arch/x86/msi.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/msi.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/msi.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/msi.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <xen/pci_regs.h>
|
||||
#include <xen/iocap.h>
|
||||
@ -49,8 +57,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
#include <asm/io.h>
|
||||
#include <asm/smp.h>
|
||||
#include <asm/desc.h>
|
||||
--- a/xen/arch/x86/numa.c
|
||||
+++ b/xen/arch/x86/numa.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/numa.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/numa.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/numa.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <xen/keyhandler.h>
|
||||
#include <xen/time.h>
|
||||
@ -59,8 +69,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
#include <asm/acpi.h>
|
||||
#include <xen/sched.h>
|
||||
|
||||
--- a/xen/arch/x86/setup.c
|
||||
+++ b/xen/arch/x86/setup.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/setup.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/setup.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/setup.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <xen/rcupdate.h>
|
||||
#include <xen/vga.h>
|
||||
@ -69,8 +81,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
#include <xen/nodemask.h>
|
||||
#include <public/version.h>
|
||||
#ifdef CONFIG_COMPAT
|
||||
--- a/xen/arch/x86/srat.c
|
||||
+++ b/xen/arch/x86/srat.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/srat.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/srat.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/srat.c
|
||||
@@ -17,6 +17,7 @@
|
||||
#include <xen/nodemask.h>
|
||||
#include <xen/acpi.h>
|
||||
@ -79,8 +93,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
#include <asm/e820.h>
|
||||
#include <asm/page.h>
|
||||
|
||||
--- a/xen/arch/x86/tboot.c
|
||||
+++ b/xen/arch/x86/tboot.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/tboot.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/tboot.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/tboot.c
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <xen/domain_page.h>
|
||||
#include <xen/iommu.h>
|
||||
@ -89,8 +105,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
#include <asm/fixmap.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/processor.h>
|
||||
--- a/xen/include/asm-x86/page.h
|
||||
+++ b/xen/include/asm-x86/page.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/page.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/page.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/page.h
|
||||
@@ -396,8 +396,6 @@ static inline uint32_t cacheattr_to_pte_
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
@ -100,8 +118,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
#define PAGE_ALIGN(x) (((x) + PAGE_SIZE - 1) & PAGE_MASK)
|
||||
|
||||
#endif /* __X86_PAGE_H__ */
|
||||
Index: xen-4.1.2-testing/xen/include/xen/pfn.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/include/xen/pfn.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/pfn.h
|
||||
@@ -0,0 +1,9 @@
|
||||
+#ifndef __XEN_PFN_H__
|
||||
+#define __XEN_PFN_H__
|
||||
|
@ -16,10 +16,10 @@ found set by the surrounding loop).
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
Acked-by: Gang Wei <gang.wei@intel.com>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hpet.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hpet.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hpet.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hpet.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hpet.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hpet.c
|
||||
@@ -34,18 +34,6 @@ struct hpet_event_channel
|
||||
int shift;
|
||||
s_time_t next_event;
|
||||
|
@ -27,10 +27,10 @@ specify the operand suffix as 'l' for good measure.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/common/spinlock.c
|
||||
Index: xen-4.1.2-testing/xen/common/spinlock.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/common/spinlock.c
|
||||
+++ xen-4.1.1-testing/xen/common/spinlock.c
|
||||
--- xen-4.1.2-testing.orig/xen/common/spinlock.c
|
||||
+++ xen-4.1.2-testing/xen/common/spinlock.c
|
||||
@@ -234,7 +234,11 @@ void _spin_unlock_recursive(spinlock_t *
|
||||
void _read_lock(rwlock_t *lock)
|
||||
{
|
||||
@ -130,10 +130,10 @@ Index: xen-4.1.1-testing/xen/common/spinlock.c
|
||||
preempt_disable();
|
||||
return flags;
|
||||
}
|
||||
Index: xen-4.1.1-testing/xen/include/asm-ia64/linux-xen/asm/spinlock.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-ia64/linux-xen/asm/spinlock.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-ia64/linux-xen/asm/spinlock.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-ia64/linux-xen/asm/spinlock.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-ia64/linux-xen/asm/spinlock.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-ia64/linux-xen/asm/spinlock.h
|
||||
@@ -35,17 +35,6 @@ typedef struct {
|
||||
} raw_rwlock_t;
|
||||
#define _RAW_RW_LOCK_UNLOCKED /*(raw_rwlock_t)*/ { 0, 0 }
|
||||
@ -190,10 +190,10 @@ Index: xen-4.1.1-testing/xen/include/asm-ia64/linux-xen/asm/spinlock.h
|
||||
|
||||
#define _raw_write_trylock(rw) \
|
||||
({ \
|
||||
Index: xen-4.1.1-testing/xen/include/asm-x86/spinlock.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/spinlock.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-x86/spinlock.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-x86/spinlock.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/spinlock.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/spinlock.h
|
||||
@@ -35,51 +35,29 @@ typedef struct {
|
||||
volatile int lock;
|
||||
} raw_rwlock_t;
|
||||
@ -276,10 +276,10 @@ Index: xen-4.1.1-testing/xen/include/asm-x86/spinlock.h
|
||||
+#define _raw_rw_is_write_locked(x) ((x)->lock > 0)
|
||||
|
||||
#endif /* __ASM_SPINLOCK_H */
|
||||
Index: xen-4.1.1-testing/xen/include/xen/spinlock.h
|
||||
Index: xen-4.1.2-testing/xen/include/xen/spinlock.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/xen/spinlock.h
|
||||
+++ xen-4.1.1-testing/xen/include/xen/spinlock.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/spinlock.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/spinlock.h
|
||||
@@ -157,6 +157,7 @@ unsigned long _read_lock_irqsave(rwlock_
|
||||
void _read_unlock(rwlock_t *lock);
|
||||
void _read_unlock_irq(rwlock_t *lock);
|
||||
|
@ -8,11 +8,11 @@ guest-bound irq before accessing desc->action.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/irq.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/irq.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/irq.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/irq.c
|
||||
@@ -1028,6 +1028,12 @@ static void __pirq_guest_eoi(struct doma
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/irq.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/irq.c
|
||||
@@ -1032,6 +1032,12 @@ static void __pirq_guest_eoi(struct doma
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -27,11 +27,11 @@ Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
|
||||
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/apic.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/apic.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/apic.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/apic.c
|
||||
@@ -531,7 +531,7 @@ static void resume_x2apic(void)
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/apic.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/apic.c
|
||||
@@ -566,7 +566,7 @@ static void resume_x2apic(void)
|
||||
mask_8259A();
|
||||
mask_IO_APIC_setup(ioapic_entries);
|
||||
|
||||
@ -40,7 +40,7 @@ Index: xen-4.1.1-testing/xen/arch/x86/apic.c
|
||||
__enable_x2apic();
|
||||
|
||||
restore_IO_APIC_setup(ioapic_entries);
|
||||
@@ -748,7 +748,7 @@ int lapic_suspend(void)
|
||||
@@ -783,7 +783,7 @@ int lapic_suspend(void)
|
||||
|
||||
local_irq_save(flags);
|
||||
disable_local_APIC();
|
||||
@ -49,7 +49,7 @@ Index: xen-4.1.1-testing/xen/arch/x86/apic.c
|
||||
local_irq_restore(flags);
|
||||
return 0;
|
||||
}
|
||||
@@ -994,7 +994,7 @@ void __init x2apic_bsp_setup(void)
|
||||
@@ -1029,7 +1029,7 @@ void __init x2apic_bsp_setup(void)
|
||||
mask_8259A();
|
||||
mask_IO_APIC_setup(ioapic_entries);
|
||||
|
||||
@ -58,10 +58,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/apic.c
|
||||
{
|
||||
if ( x2apic_enabled )
|
||||
panic("Interrupt remapping could not be enabled while "
|
||||
Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/dmar.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/passthrough/vtd/dmar.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/drivers/passthrough/vtd/dmar.c
|
||||
+++ xen-4.1.1-testing/xen/drivers/passthrough/vtd/dmar.c
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/passthrough/vtd/dmar.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/passthrough/vtd/dmar.c
|
||||
@@ -46,6 +46,7 @@ LIST_HEAD(acpi_rmrr_units);
|
||||
LIST_HEAD(acpi_atsr_units);
|
||||
LIST_HEAD(acpi_rhsa_units);
|
||||
@ -70,7 +70,7 @@ Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/dmar.c
|
||||
static u64 igd_drhd_address;
|
||||
u8 dmar_host_address_width;
|
||||
|
||||
@@ -682,6 +683,7 @@ static int __init acpi_parse_dmar(struct
|
||||
@@ -684,6 +685,7 @@ static int __init acpi_parse_dmar(struct
|
||||
int ret = 0;
|
||||
|
||||
dmar = (struct acpi_table_dmar *)table;
|
||||
@ -78,7 +78,7 @@ Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/dmar.c
|
||||
|
||||
if ( !iommu_enabled )
|
||||
{
|
||||
@@ -802,3 +804,22 @@ void acpi_dmar_zap(void)
|
||||
@@ -804,3 +806,22 @@ void acpi_dmar_zap(void)
|
||||
dmar_table->signature[0] = 'X';
|
||||
dmar_table->checksum -= 'X'-'D';
|
||||
}
|
||||
@ -101,10 +101,10 @@ Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/dmar.c
|
||||
+ flags = DMAR_INTR_REMAP | DMAR_X2APIC_OPT_OUT;
|
||||
+ return ((dmar_flags & flags) == DMAR_INTR_REMAP);
|
||||
+}
|
||||
Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/extern.h
|
||||
Index: xen-4.1.2-testing/xen/drivers/passthrough/vtd/extern.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/drivers/passthrough/vtd/extern.h
|
||||
+++ xen-4.1.1-testing/xen/drivers/passthrough/vtd/extern.h
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/passthrough/vtd/extern.h
|
||||
+++ xen-4.1.2-testing/xen/drivers/passthrough/vtd/extern.h
|
||||
@@ -87,5 +87,7 @@ void vtd_ops_preamble_quirk(struct iommu
|
||||
void vtd_ops_postamble_quirk(struct iommu* iommu);
|
||||
void me_wifi_quirk(struct domain *domain, u8 bus, u8 devfn, int map);
|
||||
@ -113,10 +113,10 @@ Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/extern.h
|
||||
+int platform_supports_x2apic(void);
|
||||
|
||||
#endif // _VTD_EXTERN_H_
|
||||
Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/intremap.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/passthrough/vtd/intremap.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/drivers/passthrough/vtd/intremap.c
|
||||
+++ xen-4.1.1-testing/xen/drivers/passthrough/vtd/intremap.c
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/passthrough/vtd/intremap.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/passthrough/vtd/intremap.c
|
||||
@@ -741,6 +741,13 @@ int enable_intremap(struct iommu *iommu,
|
||||
|
||||
ASSERT(ecap_intr_remap(iommu->ecap) && iommu_intremap);
|
||||
@ -131,7 +131,7 @@ Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/intremap.c
|
||||
ir_ctrl = iommu_ir_ctrl(iommu);
|
||||
sts = dmar_readl(iommu->reg, DMAR_GSTS_REG);
|
||||
|
||||
@@ -827,10 +834,10 @@ out:
|
||||
@@ -847,10 +854,10 @@ out:
|
||||
}
|
||||
|
||||
/*
|
||||
@ -144,7 +144,7 @@ Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/intremap.c
|
||||
{
|
||||
struct acpi_drhd_unit *drhd;
|
||||
struct iommu *iommu;
|
||||
@@ -838,6 +845,9 @@ int iommu_enable_IR(void)
|
||||
@@ -858,6 +865,9 @@ int iommu_enable_IR(void)
|
||||
if ( !iommu_supports_eim() )
|
||||
return -1;
|
||||
|
||||
@ -154,7 +154,7 @@ Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/intremap.c
|
||||
for_each_drhd_unit ( drhd )
|
||||
{
|
||||
struct qi_ctrl *qi_ctrl = NULL;
|
||||
@@ -887,7 +897,7 @@ int iommu_enable_IR(void)
|
||||
@@ -907,7 +917,7 @@ int iommu_enable_IR(void)
|
||||
* This function is used to disable Interrutp remapping when
|
||||
* suspend local apic
|
||||
*/
|
||||
@ -163,11 +163,11 @@ Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/intremap.c
|
||||
{
|
||||
struct acpi_drhd_unit *drhd;
|
||||
|
||||
Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/drivers/passthrough/vtd/iommu.c
|
||||
+++ xen-4.1.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
@@ -1998,7 +1998,7 @@ static int init_vtd_hw(void)
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/passthrough/vtd/iommu.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
@@ -2006,7 +2006,7 @@ static int init_vtd_hw(void)
|
||||
{
|
||||
iommu_intremap = 0;
|
||||
dprintk(XENLOG_WARNING VTDPREFIX,
|
||||
@ -176,10 +176,10 @@ Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
break;
|
||||
}
|
||||
}
|
||||
Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/iommu.h
|
||||
Index: xen-4.1.2-testing/xen/drivers/passthrough/vtd/iommu.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/drivers/passthrough/vtd/iommu.h
|
||||
+++ xen-4.1.1-testing/xen/drivers/passthrough/vtd/iommu.h
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/passthrough/vtd/iommu.h
|
||||
+++ xen-4.1.2-testing/xen/drivers/passthrough/vtd/iommu.h
|
||||
@@ -22,6 +22,10 @@
|
||||
|
||||
#include <xen/types.h>
|
||||
@ -191,11 +191,11 @@ Index: xen-4.1.1-testing/xen/drivers/passthrough/vtd/iommu.h
|
||||
/*
|
||||
* Intel IOMMU register specification per version 1.0 public spec.
|
||||
*/
|
||||
Index: xen-4.1.1-testing/xen/include/xen/iommu.h
|
||||
Index: xen-4.1.2-testing/xen/include/xen/iommu.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/xen/iommu.h
|
||||
+++ xen-4.1.1-testing/xen/include/xen/iommu.h
|
||||
@@ -63,8 +63,8 @@ struct iommu {
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/iommu.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/iommu.h
|
||||
@@ -66,8 +66,8 @@ struct iommu {
|
||||
|
||||
int iommu_setup(void);
|
||||
int iommu_supports_eim(void);
|
||||
|
@ -9,10 +9,10 @@ This helps us to debug interrupt issues.
|
||||
|
||||
Signed-off-by: Wei Wang <wei.wang2@amd.com>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/drivers/passthrough/amd/iommu_map.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/passthrough/amd/iommu_map.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/drivers/passthrough/amd/iommu_map.c
|
||||
+++ xen-4.1.1-testing/xen/drivers/passthrough/amd/iommu_map.c
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/passthrough/amd/iommu_map.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/passthrough/amd/iommu_map.c
|
||||
@@ -327,8 +327,9 @@ void amd_iommu_set_intremap_table(u32 *d
|
||||
set_field_in_reg_u32(0xB, entry,
|
||||
IOMMU_DEV_TABLE_INT_TABLE_LENGTH_MASK,
|
||||
|
@ -14,11 +14,11 @@ into the generic HVM path and use the exported functions.
|
||||
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/hvm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/hvm.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/hvm.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/hvm.c
|
||||
@@ -1297,6 +1297,86 @@ static void hvm_set_uc_mode(struct vcpu
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/hvm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/hvm.c
|
||||
@@ -1298,6 +1298,86 @@ static void hvm_set_uc_mode(struct vcpu
|
||||
return hvm_funcs.set_uc_mode(v);
|
||||
}
|
||||
|
||||
@ -105,10 +105,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/hvm/hvm.c
|
||||
int hvm_set_cr0(unsigned long value)
|
||||
{
|
||||
struct vcpu *v = current;
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||
@@ -1545,182 +1545,42 @@ static void vmx_invlpg_intercept(unsigne
|
||||
vpid_sync_vcpu_gva(curr, vaddr);
|
||||
}
|
||||
@ -324,10 +324,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||
update_guest_eip(); /* Safe: MOV Cn, LMSW, CLTS */
|
||||
break;
|
||||
}
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/traps.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/traps.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/traps.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/traps.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/traps.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/traps.c
|
||||
@@ -368,6 +368,36 @@ void vcpu_show_execution_state(struct vc
|
||||
vcpu_unpause(v);
|
||||
}
|
||||
@ -365,10 +365,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/traps.c
|
||||
static char *trapstr(int trapnr)
|
||||
{
|
||||
static char *strings[] = {
|
||||
Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/support.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/hvm/support.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-x86/hvm/support.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-x86/hvm/support.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/hvm/support.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/hvm/support.h
|
||||
@@ -137,5 +137,7 @@ int hvm_set_cr3(unsigned long value);
|
||||
int hvm_set_cr4(unsigned long value);
|
||||
int hvm_msr_read_intercept(unsigned int msr, uint64_t *msr_content);
|
||||
@ -377,10 +377,10 @@ Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/support.h
|
||||
+int hvm_mov_from_cr(unsigned int cr, unsigned int gpr);
|
||||
|
||||
#endif /* __ASM_X86_HVM_SUPPORT_H__ */
|
||||
Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||
@@ -144,31 +144,15 @@ void vmx_update_cpu_exec_control(struct
|
||||
* Exit Qualifications for MOV for Control Register Access
|
||||
*/
|
||||
@ -420,11 +420,11 @@ Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||
|
||||
/*
|
||||
* Access Rights
|
||||
Index: xen-4.1.1-testing/xen/include/asm-x86/processor.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/processor.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-x86/processor.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-x86/processor.h
|
||||
@@ -589,6 +589,8 @@ int wrmsr_hypervisor_regs(uint32_t idx,
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/processor.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/processor.h
|
||||
@@ -590,6 +590,8 @@ int wrmsr_hypervisor_regs(uint32_t idx,
|
||||
int microcode_update(XEN_GUEST_HANDLE(const_void), unsigned long len);
|
||||
int microcode_resume_cpu(int cpu);
|
||||
|
||||
|
@ -25,10 +25,10 @@ valid.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
@@ -928,11 +928,16 @@ struct hvm_function_table * __init start
|
||||
|
||||
printk("SVM: Supported advanced features:\n");
|
||||
@ -46,10 +46,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
P(cpu_has_pause_filter, "Pause-Intercept Filter");
|
||||
#undef P
|
||||
|
||||
Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/svm.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/svm.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-x86/hvm/svm/svm.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/svm.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/hvm/svm/svm.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/svm.h
|
||||
@@ -80,6 +80,7 @@ extern u32 svm_feature_flags;
|
||||
#define cpu_has_svm_svml cpu_has_svm_feature(SVM_FEATURE_SVML)
|
||||
#define cpu_has_svm_nrips cpu_has_svm_feature(SVM_FEATURE_NRIPS)
|
||||
@ -58,10 +58,10 @@ Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/svm.h
|
||||
#define cpu_has_pause_filter cpu_has_svm_feature(SVM_FEATURE_PAUSEFILTER)
|
||||
|
||||
#endif /* __ASM_X86_HVM_SVM_H__ */
|
||||
Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/vmcb.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/vmcb.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-x86/hvm/svm/vmcb.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/vmcb.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/hvm/svm/vmcb.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/vmcb.h
|
||||
@@ -432,7 +432,9 @@ struct vmcb_struct {
|
||||
vmcbcleanbits_t cleanbits; /* offset 0xC0 */
|
||||
u32 res09; /* offset 0xC4 */
|
||||
|
@ -15,10 +15,10 @@ up some Windows guest, which exercise CR8 quite often.
|
||||
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
@@ -1039,6 +1039,22 @@ static void svm_vmexit_do_cpuid(struct c
|
||||
__update_guest_eip(regs, inst_len);
|
||||
}
|
||||
|
@ -34,10 +34,10 @@ Fixes endless loop.
|
||||
|
||||
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/emulate.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/svm/emulate.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/svm/emulate.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/svm/emulate.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/svm/emulate.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/svm/emulate.c
|
||||
@@ -102,6 +102,7 @@ MAKE_INSTR(INT3, 1, 0xcc);
|
||||
MAKE_INSTR(RDTSC, 2, 0x0f, 0x31);
|
||||
MAKE_INSTR(PAUSE, 1, 0x90);
|
||||
@ -54,10 +54,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/emulate.c
|
||||
};
|
||||
|
||||
static int fetch(struct vcpu *v, u8 *buf, unsigned long addr, int len)
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
@@ -1650,11 +1650,22 @@ asmlinkage void svm_vmexit_handler(struc
|
||||
break;
|
||||
|
||||
@ -83,10 +83,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
case VMEXIT_VMMCALL:
|
||||
if ( (inst_len = __get_instruction_length(v, INSTR_VMCALL)) == 0 )
|
||||
break;
|
||||
Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/asid.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/asid.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-x86/hvm/svm/asid.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/asid.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/hvm/svm/asid.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/asid.h
|
||||
@@ -34,10 +34,7 @@ static inline void svm_asid_g_invlpg(str
|
||||
{
|
||||
#if 0
|
||||
@ -99,10 +99,10 @@ Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/asid.h
|
||||
#endif
|
||||
|
||||
/* Safe fallback. Take a new ASID. */
|
||||
Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/emulate.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/emulate.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-x86/hvm/svm/emulate.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/emulate.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/hvm/svm/emulate.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/emulate.h
|
||||
@@ -33,6 +33,7 @@ enum instruction_index {
|
||||
INSTR_RDTSC,
|
||||
INSTR_PAUSE,
|
||||
@ -111,10 +111,10 @@ Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/emulate.h
|
||||
INSTR_MAX_COUNT /* Must be last - Number of instructions supported */
|
||||
};
|
||||
|
||||
Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/svm.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/svm.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-x86/hvm/svm/svm.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/svm.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/hvm/svm/svm.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/svm.h
|
||||
@@ -62,6 +62,15 @@ static inline void svm_vmsave(void *vmcb
|
||||
: : "a" (__pa(vmcb)) : "memory" );
|
||||
}
|
||||
|
@ -19,10 +19,10 @@ trashing.
|
||||
Signed-off-by: Andre Przywara <andre.przywara@amd.com>
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/emulate.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/emulate.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/emulate.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/emulate.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/emulate.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/emulate.c
|
||||
@@ -996,6 +996,8 @@ int hvm_emulate_one(
|
||||
|
||||
hvmemul_ctxt->insn_buf_eip = regs->eip;
|
||||
@ -32,10 +32,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/hvm/emulate.c
|
||||
(hvm_virtual_to_linear_addr(
|
||||
x86_seg_cs, &hvmemul_ctxt->seg_reg[x86_seg_cs],
|
||||
regs->eip, sizeof(hvmemul_ctxt->insn_buf),
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
@@ -603,6 +603,21 @@ static void svm_set_rdtsc_exiting(struct
|
||||
vmcb_set_general1_intercepts(vmcb, general1_intercepts);
|
||||
}
|
||||
@ -93,10 +93,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
break;
|
||||
|
||||
case VMEXIT_IRET: {
|
||||
Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/hvm.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/hvm/hvm.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-x86/hvm/hvm.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-x86/hvm/hvm.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/hvm/hvm.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/hvm/hvm.h
|
||||
@@ -132,6 +132,9 @@ struct hvm_function_table {
|
||||
int (*cpu_up)(void);
|
||||
void (*cpu_down)(void);
|
||||
@ -107,7 +107,7 @@ Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/hvm.h
|
||||
/* Instruction intercepts: non-void return values are X86EMUL codes. */
|
||||
void (*cpuid_intercept)(
|
||||
unsigned int *eax, unsigned int *ebx,
|
||||
@@ -324,6 +327,11 @@ static inline void hvm_cpu_down(void)
|
||||
@@ -328,6 +331,11 @@ static inline void hvm_cpu_down(void)
|
||||
hvm_funcs.cpu_down();
|
||||
}
|
||||
|
||||
@ -119,10 +119,10 @@ Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/hvm.h
|
||||
enum hvm_task_switch_reason { TSW_jmp, TSW_iret, TSW_call_or_int };
|
||||
void hvm_task_switch(
|
||||
uint16_t tss_sel, enum hvm_task_switch_reason taskswitch_reason,
|
||||
Index: xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/vmcb.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/vmcb.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-x86/hvm/svm/vmcb.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-x86/hvm/svm/vmcb.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/hvm/svm/vmcb.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/vmcb.h
|
||||
@@ -498,6 +498,9 @@ struct arch_svm_struct {
|
||||
int launch_core;
|
||||
bool_t vmcb_in_sync; /* VMCB sync'ed with VMSAVE? */
|
||||
|
@ -13,10 +13,10 @@ misc cpufreq cleanup
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/drivers/cpufreq/cpufreq.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/cpufreq/cpufreq.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/drivers/cpufreq/cpufreq.c
|
||||
+++ xen-4.1.1-testing/xen/drivers/cpufreq/cpufreq.c
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/cpufreq/cpufreq.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/cpufreq/cpufreq.c
|
||||
@@ -47,7 +47,8 @@
|
||||
#include <acpi/acpi.h>
|
||||
#include <acpi/cpufreq/cpufreq.h>
|
||||
@ -57,10 +57,10 @@ Index: xen-4.1.1-testing/xen/drivers/cpufreq/cpufreq.c
|
||||
|
||||
str = end;
|
||||
} while (str);
|
||||
Index: xen-4.1.1-testing/xen/drivers/cpufreq/cpufreq_misc_governors.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/cpufreq/cpufreq_misc_governors.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/drivers/cpufreq/cpufreq_misc_governors.c
|
||||
+++ xen-4.1.1-testing/xen/drivers/cpufreq/cpufreq_misc_governors.c
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/cpufreq/cpufreq_misc_governors.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/cpufreq/cpufreq_misc_governors.c
|
||||
@@ -14,14 +14,17 @@
|
||||
*
|
||||
*/
|
||||
@ -171,10 +171,10 @@ Index: xen-4.1.1-testing/xen/drivers/cpufreq/cpufreq_misc_governors.c
|
||||
return cpufreq_register_governor(&cpufreq_gov_userspace);
|
||||
}
|
||||
__initcall(cpufreq_gov_userspace_init);
|
||||
Index: xen-4.1.1-testing/xen/drivers/cpufreq/cpufreq_ondemand.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/cpufreq/cpufreq_ondemand.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/drivers/cpufreq/cpufreq_ondemand.c
|
||||
+++ xen-4.1.1-testing/xen/drivers/cpufreq/cpufreq_ondemand.c
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/cpufreq/cpufreq_ondemand.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/cpufreq/cpufreq_ondemand.c
|
||||
@@ -296,7 +296,7 @@ int cpufreq_governor_dbs(struct cpufreq_
|
||||
return 0;
|
||||
}
|
||||
@ -194,10 +194,10 @@ Index: xen-4.1.1-testing/xen/drivers/cpufreq/cpufreq_ondemand.c
|
||||
}
|
||||
|
||||
struct cpufreq_governor cpufreq_gov_dbs = {
|
||||
Index: xen-4.1.1-testing/xen/include/acpi/cpufreq/cpufreq.h
|
||||
Index: xen-4.1.2-testing/xen/include/acpi/cpufreq/cpufreq.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/acpi/cpufreq/cpufreq.h
|
||||
+++ xen-4.1.1-testing/xen/include/acpi/cpufreq/cpufreq.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/acpi/cpufreq/cpufreq.h
|
||||
+++ xen-4.1.2-testing/xen/include/acpi/cpufreq/cpufreq.h
|
||||
@@ -93,7 +93,7 @@ struct cpufreq_governor {
|
||||
char name[CPUFREQ_NAME_LEN];
|
||||
int (*governor)(struct cpufreq_policy *policy,
|
||||
|
@ -12,10 +12,10 @@ Family 11h ~ Family 15h are broken due to string mismatches.
|
||||
|
||||
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/oprofile/nmi_int.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/oprofile/nmi_int.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/oprofile/nmi_int.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/oprofile/nmi_int.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/oprofile/nmi_int.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/oprofile/nmi_int.c
|
||||
@@ -435,19 +435,19 @@ static int __init nmi_init(void)
|
||||
break;
|
||||
case 0x11:
|
||||
|
@ -18,10 +18,10 @@ Beulich.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/oprofile/nmi_int.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/oprofile/nmi_int.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/oprofile/nmi_int.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/oprofile/nmi_int.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/oprofile/nmi_int.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/oprofile/nmi_int.c
|
||||
@@ -30,7 +30,7 @@
|
||||
struct op_counter_config counter_config[OP_MAX_COUNTER];
|
||||
struct op_ibs_config ibs_config;
|
||||
@ -40,10 +40,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/oprofile/nmi_int.c
|
||||
cpu_type = "x86-64/family15h";
|
||||
break;
|
||||
}
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/oprofile/op_model_athlon.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/oprofile/op_model_athlon.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/oprofile/op_model_athlon.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/oprofile/op_model_athlon.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/oprofile/op_model_athlon.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/oprofile/op_model_athlon.c
|
||||
@@ -24,8 +24,13 @@
|
||||
#include "op_x86_model.h"
|
||||
#include "op_counter.h"
|
||||
@ -185,10 +185,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/oprofile/op_model_athlon.c
|
||||
+ .start = &athlon_start,
|
||||
.stop = &athlon_stop
|
||||
};
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/oprofile/op_x86_model.h
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/oprofile/op_x86_model.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/oprofile/op_x86_model.h
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/oprofile/op_x86_model.h
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/oprofile/op_x86_model.h
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/oprofile/op_x86_model.h
|
||||
@@ -48,6 +48,7 @@ extern struct op_x86_model_spec op_arch_
|
||||
extern struct op_x86_model_spec const op_p4_spec;
|
||||
extern struct op_x86_model_spec const op_p4_ht2_spec;
|
||||
@ -197,10 +197,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/oprofile/op_x86_model.h
|
||||
|
||||
void arch_perfmon_setup_counters(void);
|
||||
#endif /* OP_X86_MODEL_H */
|
||||
Index: xen-4.1.1-testing/xen/include/asm-x86/msr-index.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/msr-index.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/asm-x86/msr-index.h
|
||||
+++ xen-4.1.1-testing/xen/include/asm-x86/msr-index.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/msr-index.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/msr-index.h
|
||||
@@ -224,6 +224,19 @@
|
||||
#define MSR_K8_VM_CR 0xc0010114
|
||||
#define MSR_K8_VM_HSAVE_PA 0xc0010117
|
||||
|
@ -13,10 +13,10 @@ to take advantage of the new counters.
|
||||
|
||||
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
@@ -1142,6 +1142,18 @@ static int svm_msr_read_intercept(unsign
|
||||
case MSR_K7_EVNTSEL1:
|
||||
case MSR_K7_EVNTSEL2:
|
||||
@ -55,10 +55,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
vpmu_do_wrmsr(msr, msr_content);
|
||||
break;
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/vpmu.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/svm/vpmu.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/svm/vpmu.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/svm/vpmu.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/svm/vpmu.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/svm/vpmu.c
|
||||
@@ -36,7 +36,9 @@
|
||||
#include <public/hvm/save.h>
|
||||
#include <asm/hvm/vpmu.h>
|
||||
@ -247,10 +247,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/vpmu.c
|
||||
ctxt = xmalloc_bytes(sizeof(struct amd_vpmu_context));
|
||||
|
||||
if ( !ctxt )
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/vpmu.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/vpmu.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/vpmu.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/vpmu.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/vpmu.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/vpmu.c
|
||||
@@ -101,6 +101,7 @@ void vpmu_initialise(struct vcpu *v)
|
||||
switch ( family )
|
||||
{
|
||||
|
@ -12,10 +12,10 @@ by taking the same code path as 10h.
|
||||
|
||||
Signed-off-by: Jacob Shin <jacob.shin@amd.com>
|
||||
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/vpmu.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/svm/vpmu.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/svm/vpmu.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/svm/vpmu.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/svm/vpmu.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/svm/vpmu.c
|
||||
@@ -317,6 +317,8 @@ static void amd_vpmu_initialise(struct v
|
||||
k7_counters_mirrored = 1;
|
||||
break;
|
||||
@ -25,10 +25,10 @@ Index: xen-4.1.1-testing/xen/arch/x86/hvm/svm/vpmu.c
|
||||
default:
|
||||
num_counters = F10H_NUM_COUNTERS;
|
||||
counters = AMD_F10H_COUNTERS;
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/hvm/vpmu.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/vpmu.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/hvm/vpmu.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/hvm/vpmu.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/vpmu.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/vpmu.c
|
||||
@@ -101,6 +101,8 @@ void vpmu_initialise(struct vcpu *v)
|
||||
switch ( family )
|
||||
{
|
||||
|
@ -17,10 +17,10 @@ Acked-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
Acked-by: Vincent Hanquez <vincent.hanquez@eu.citrix.com>
|
||||
|
||||
Index: xen-4.1.1-testing/tools/libxc/xc_domain_restore.c
|
||||
Index: xen-4.1.2-testing/tools/libxc/xc_domain_restore.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/libxc/xc_domain_restore.c
|
||||
+++ xen-4.1.1-testing/tools/libxc/xc_domain_restore.c
|
||||
--- xen-4.1.2-testing.orig/tools/libxc/xc_domain_restore.c
|
||||
+++ xen-4.1.2-testing/tools/libxc/xc_domain_restore.c
|
||||
@@ -1134,23 +1134,19 @@ int xc_domain_restore(xc_interface *xch,
|
||||
|
||||
int orig_io_fd_flags;
|
||||
@ -49,10 +49,10 @@ Index: xen-4.1.1-testing/tools/libxc/xc_domain_restore.c
|
||||
ctxt = xc_hypercall_buffer_alloc(xch, ctxt, sizeof(*ctxt));
|
||||
|
||||
if ( ctxt == NULL )
|
||||
Index: xen-4.1.1-testing/tools/libxc/xc_domain_save.c
|
||||
Index: xen-4.1.2-testing/tools/libxc/xc_domain_save.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/libxc/xc_domain_save.c
|
||||
+++ xen-4.1.1-testing/tools/libxc/xc_domain_save.c
|
||||
--- xen-4.1.2-testing.orig/tools/libxc/xc_domain_save.c
|
||||
+++ xen-4.1.2-testing/tools/libxc/xc_domain_save.c
|
||||
@@ -958,11 +958,8 @@ int xc_domain_save(xc_interface *xch, in
|
||||
unsigned long mfn;
|
||||
|
||||
|
@ -21,8 +21,10 @@ rdtsc overhead.
|
||||
|
||||
Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
|
||||
--- a/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ b/xen/arch/x86/hvm/svm/svm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||
@@ -588,6 +588,22 @@ static void svm_set_segment_register(str
|
||||
static void svm_set_tsc_offset(struct vcpu *v, u64 offset)
|
||||
{
|
||||
@ -66,7 +68,7 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
static void svm_ctxt_switch_from(struct vcpu *v)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
@@ -646,6 +675,7 @@ static void svm_ctxt_switch_from(struct
|
||||
@@ -646,6 +675,7 @@ static void svm_ctxt_switch_from(struct
|
||||
|
||||
svm_save_dr(v);
|
||||
vpmu_save(v);
|
||||
@ -82,8 +84,10 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
|
||||
if ( cpu_has_rdtscp )
|
||||
wrmsrl(MSR_TSC_AUX, hvm_msr_tsc_aux(v));
|
||||
--- a/xen/arch/x86/hvm/svm/vmcb.c
|
||||
+++ b/xen/arch/x86/hvm/svm/vmcb.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/svm/vmcb.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/svm/vmcb.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/svm/vmcb.c
|
||||
@@ -165,7 +165,9 @@ static int construct_vmcb(struct vcpu *v
|
||||
|
||||
/* TSC. */
|
||||
@ -95,8 +99,10 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
{
|
||||
vmcb->_general1_intercepts |= GENERAL1_INTERCEPT_RDTSC;
|
||||
vmcb->_general2_intercepts |= GENERAL2_INTERCEPT_RDTSCP;
|
||||
--- a/xen/include/asm-x86/hvm/svm/svm.h
|
||||
+++ b/xen/include/asm-x86/hvm/svm/svm.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/svm.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/hvm/svm/svm.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/svm.h
|
||||
@@ -91,5 +91,13 @@ extern u32 svm_feature_flags;
|
||||
#define cpu_has_svm_cleanbits cpu_has_svm_feature(SVM_FEATURE_VMCBCLEAN)
|
||||
#define cpu_has_svm_decode cpu_has_svm_feature(SVM_FEATURE_DECODEASSISTS)
|
||||
@ -111,8 +117,10 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
+#define vcpu_tsc_ratio(v) TSC_RATIO((v)->domain->arch.tsc_khz, cpu_khz)
|
||||
|
||||
#endif /* __ASM_X86_HVM_SVM_H__ */
|
||||
--- a/xen/include/asm-x86/msr-index.h
|
||||
+++ b/xen/include/asm-x86/msr-index.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/msr-index.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/msr-index.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/msr-index.h
|
||||
@@ -266,6 +266,9 @@
|
||||
#define MSR_AMD_PATCHLEVEL 0x0000008b
|
||||
#define MSR_AMD_PATCHLOADER 0xc0010020
|
||||
|
@ -22,9 +22,11 @@ libxc: Don't refer to meaningless 'word offsets' in xc_cpufeature.h
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/tools/libxc/xc_cpufeature.h
|
||||
+++ b/tools/libxc/xc_cpufeature.h
|
||||
@@ -17,131 +17,112 @@
|
||||
Index: xen-4.1.2-testing/tools/libxc/xc_cpufeature.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/tools/libxc/xc_cpufeature.h
|
||||
+++ xen-4.1.2-testing/tools/libxc/xc_cpufeature.h
|
||||
@@ -17,134 +17,115 @@
|
||||
#ifndef __LIBXC_CPUFEATURE_H
|
||||
#define __LIBXC_CPUFEATURE_H
|
||||
|
||||
@ -149,6 +151,7 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
-#define X86_FEATURE_XSAVE (4*32+26) /* XSAVE/XRSTOR/XSETBV/XGETBV */
|
||||
-#define X86_FEATURE_AVX (4*32+28) /* Advanced Vector Extensions */
|
||||
-#define X86_FEATURE_F16C (4*32+29) /* Half-precision convert instruction */
|
||||
-#define X86_FEATURE_RDRAND (4*32+30) /* Digital Random Number Generator */
|
||||
-#define X86_FEATURE_HYPERVISOR (4*32+31) /* Running under some hypervisor */
|
||||
-
|
||||
-/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
|
||||
@ -183,6 +186,11 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
-#define X86_FEATURE_NODEID_MSR (6*32+19) /* NodeId MSR */
|
||||
-#define X86_FEATURE_TBM (6*32+21) /* trailing bit manipulations */
|
||||
-#define X86_FEATURE_TOPOEXT (6*32+22) /* topology extensions CPUID leafs */
|
||||
-
|
||||
-/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 9 */
|
||||
-#define X86_FEATURE_FSGSBASE (7*32+ 0) /* {RD,WR}{FS,GS}BASE instructions */
|
||||
-#define X86_FEATURE_SMEP (7*32+ 7) /* Supervisor Mode Execution Protection */
|
||||
-#define X86_FEATURE_ERMS (7*32+ 9) /* Enhanced REP MOVSB/STOSB */
|
||||
+#define X86_FEATURE_SYSCALL 11 /* SYSCALL/SYSRET */
|
||||
+#define X86_FEATURE_MP 19 /* MP Capable. */
|
||||
+#define X86_FEATURE_NX 20 /* Execute Disable */
|
||||
@ -219,6 +227,7 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
+#define X86_FEATURE_XSAVE 26 /* XSAVE/XRSTOR/XSETBV/XGETBV */
|
||||
+#define X86_FEATURE_AVX 28 /* Advanced Vector Extensions */
|
||||
+#define X86_FEATURE_F16C 29 /* Half-precision convert instruction */
|
||||
+#define X86_FEATURE_RDRAND 30 /* Digital Random Number Generator */
|
||||
+#define X86_FEATURE_HYPERVISOR 31 /* Running under some hypervisor */
|
||||
+
|
||||
+/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001 */
|
||||
@ -253,15 +262,17 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
+#define X86_FEATURE_NODEID_MSR 19 /* NodeId MSR */
|
||||
+#define X86_FEATURE_TBM 21 /* trailing bit manipulations */
|
||||
+#define X86_FEATURE_TOPOEXT 22 /* topology extensions CPUID leafs */
|
||||
|
||||
-/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 9 */
|
||||
-#define X86_FEATURE_FSGSBASE (7*32+ 0) /* {RD,WR}{FS,GS}BASE instructions */
|
||||
+
|
||||
+/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx) */
|
||||
+#define X86_FEATURE_FSGSBASE 0 /* {RD,WR}{FS,GS}BASE instructions */
|
||||
+#define X86_FEATURE_SMEP 7 /* Supervisor Mode Execution Protection */
|
||||
+#define X86_FEATURE_ERMS 9 /* Enhanced REP MOVSB/STOSB */
|
||||
|
||||
#endif /* __LIBXC_CPUFEATURE_H */
|
||||
--- a/tools/libxc/xc_cpuid_x86.c
|
||||
+++ b/tools/libxc/xc_cpuid_x86.c
|
||||
Index: xen-4.1.2-testing/tools/libxc/xc_cpuid_x86.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/tools/libxc/xc_cpuid_x86.c
|
||||
+++ xen-4.1.2-testing/tools/libxc/xc_cpuid_x86.c
|
||||
@@ -25,9 +25,9 @@
|
||||
#include "xc_cpufeature.h"
|
||||
#include <xen/hvm/params.h>
|
||||
|
@ -1,284 +0,0 @@
|
||||
References: FATE#311951
|
||||
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1307133540 -3600
|
||||
# Node ID 0c0884fd8b494932a4b707e339cbe1b881d09103
|
||||
# Parent bcd2476c2e2d00dc6371e52fbff66fe3178b7944
|
||||
x86: Enable Supervisor Mode Execution Protection (SMEP)
|
||||
|
||||
Intel new CPU supports SMEP (Supervisor Mode Execution
|
||||
Protection). SMEP prevents software operating with CPL < 3 (supervisor
|
||||
mode) from fetching instructions from any linear address with a valid
|
||||
translation for which the U/S flag (bit 2) is 1 in every
|
||||
paging-structure entry controlling the translation for the linear
|
||||
address.
|
||||
|
||||
This patch enables SMEP in Xen to protect Xen hypervisor from
|
||||
executing pv guest instructions, whose translation paging-structure
|
||||
entries' U/S flags are all set.
|
||||
|
||||
Signed-off-by: Yang Wei <wei.y.yang@intel.com>
|
||||
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
|
||||
Signed-off-by: Li Xin <xin.li@intel.com>
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/setup.c
|
||||
+++ b/xen/arch/x86/setup.c
|
||||
@@ -62,6 +62,10 @@ integer_param("maxcpus", max_cpus);
|
||||
static bool_t __initdata opt_watchdog;
|
||||
boolean_param("watchdog", opt_watchdog);
|
||||
|
||||
+/* smep: Enable/disable Supervisor Mode Execution Protection (default on). */
|
||||
+static bool_t __initdata disable_smep;
|
||||
+invbool_param("smep", disable_smep);
|
||||
+
|
||||
/* **** Linux config option: propagated to domain0. */
|
||||
/* "acpi=off": Sisables both ACPI table parsing and interpreter. */
|
||||
/* "acpi=force": Override the disable blacklist. */
|
||||
@@ -1205,11 +1209,17 @@ void __init __start_xen(unsigned long mb
|
||||
arch_init_memory();
|
||||
|
||||
identify_cpu(&boot_cpu_data);
|
||||
+
|
||||
if ( cpu_has_fxsr )
|
||||
set_in_cr4(X86_CR4_OSFXSR);
|
||||
if ( cpu_has_xmm )
|
||||
set_in_cr4(X86_CR4_OSXMMEXCPT);
|
||||
|
||||
+ if ( disable_smep )
|
||||
+ setup_clear_cpu_cap(X86_FEATURE_SMEP);
|
||||
+ if ( cpu_has_smep )
|
||||
+ set_in_cr4(X86_CR4_SMEP);
|
||||
+
|
||||
local_irq_enable();
|
||||
|
||||
#ifdef CONFIG_X86_64
|
||||
--- a/xen/arch/x86/traps.c
|
||||
+++ b/xen/arch/x86/traps.c
|
||||
@@ -1136,7 +1136,13 @@ static int handle_gdt_ldt_mapping_fault(
|
||||
(((va) >= HYPERVISOR_VIRT_START))
|
||||
#endif
|
||||
|
||||
-static int __spurious_page_fault(
|
||||
+enum pf_type {
|
||||
+ real_fault,
|
||||
+ smep_fault,
|
||||
+ spurious_fault
|
||||
+};
|
||||
+
|
||||
+static enum pf_type __page_fault_type(
|
||||
unsigned long addr, unsigned int error_code)
|
||||
{
|
||||
unsigned long mfn, cr3 = read_cr3();
|
||||
@@ -1148,7 +1154,7 @@ static int __spurious_page_fault(
|
||||
#endif
|
||||
l2_pgentry_t l2e, *l2t;
|
||||
l1_pgentry_t l1e, *l1t;
|
||||
- unsigned int required_flags, disallowed_flags;
|
||||
+ unsigned int required_flags, disallowed_flags, page_user;
|
||||
|
||||
/*
|
||||
* We do not take spurious page faults in IRQ handlers as we do not
|
||||
@@ -1156,11 +1162,11 @@ static int __spurious_page_fault(
|
||||
* map_domain_page() is not IRQ-safe.
|
||||
*/
|
||||
if ( in_irq() )
|
||||
- return 0;
|
||||
+ return real_fault;
|
||||
|
||||
/* Reserved bit violations are never spurious faults. */
|
||||
if ( error_code & PFEC_reserved_bit )
|
||||
- return 0;
|
||||
+ return real_fault;
|
||||
|
||||
required_flags = _PAGE_PRESENT;
|
||||
if ( error_code & PFEC_write_access )
|
||||
@@ -1172,6 +1178,8 @@ static int __spurious_page_fault(
|
||||
if ( error_code & PFEC_insn_fetch )
|
||||
disallowed_flags |= _PAGE_NX;
|
||||
|
||||
+ page_user = _PAGE_USER;
|
||||
+
|
||||
mfn = cr3 >> PAGE_SHIFT;
|
||||
|
||||
#if CONFIG_PAGING_LEVELS >= 4
|
||||
@@ -1181,7 +1189,8 @@ static int __spurious_page_fault(
|
||||
unmap_domain_page(l4t);
|
||||
if ( ((l4e_get_flags(l4e) & required_flags) != required_flags) ||
|
||||
(l4e_get_flags(l4e) & disallowed_flags) )
|
||||
- return 0;
|
||||
+ return real_fault;
|
||||
+ page_user &= l4e_get_flags(l4e);
|
||||
#endif
|
||||
|
||||
#if CONFIG_PAGING_LEVELS >= 3
|
||||
@@ -1194,13 +1203,14 @@ static int __spurious_page_fault(
|
||||
unmap_domain_page(l3t);
|
||||
#if CONFIG_PAGING_LEVELS == 3
|
||||
if ( !(l3e_get_flags(l3e) & _PAGE_PRESENT) )
|
||||
- return 0;
|
||||
+ return real_fault;
|
||||
#else
|
||||
if ( ((l3e_get_flags(l3e) & required_flags) != required_flags) ||
|
||||
(l3e_get_flags(l3e) & disallowed_flags) )
|
||||
- return 0;
|
||||
+ return real_fault;
|
||||
+ page_user &= l3e_get_flags(l3e);
|
||||
if ( l3e_get_flags(l3e) & _PAGE_PSE )
|
||||
- return 1;
|
||||
+ goto leaf;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -1210,9 +1220,10 @@ static int __spurious_page_fault(
|
||||
unmap_domain_page(l2t);
|
||||
if ( ((l2e_get_flags(l2e) & required_flags) != required_flags) ||
|
||||
(l2e_get_flags(l2e) & disallowed_flags) )
|
||||
- return 0;
|
||||
+ return real_fault;
|
||||
+ page_user &= l2e_get_flags(l2e);
|
||||
if ( l2e_get_flags(l2e) & _PAGE_PSE )
|
||||
- return 1;
|
||||
+ goto leaf;
|
||||
|
||||
l1t = map_domain_page(mfn);
|
||||
l1e = l1e_read_atomic(&l1t[l1_table_offset(addr)]);
|
||||
@@ -1220,26 +1231,36 @@ static int __spurious_page_fault(
|
||||
unmap_domain_page(l1t);
|
||||
if ( ((l1e_get_flags(l1e) & required_flags) != required_flags) ||
|
||||
(l1e_get_flags(l1e) & disallowed_flags) )
|
||||
- return 0;
|
||||
+ return real_fault;
|
||||
+ page_user &= l1e_get_flags(l1e);
|
||||
|
||||
- return 1;
|
||||
+leaf:
|
||||
+ /*
|
||||
+ * Supervisor Mode Execution Protection (SMEP):
|
||||
+ * Disallow supervisor execution from user-accessible mappings
|
||||
+ */
|
||||
+ if ( (read_cr4() & X86_CR4_SMEP) && page_user &&
|
||||
+ ((error_code & (PFEC_insn_fetch|PFEC_user_mode)) == PFEC_insn_fetch) )
|
||||
+ return smep_fault;
|
||||
+
|
||||
+ return spurious_fault;
|
||||
}
|
||||
|
||||
-static int spurious_page_fault(
|
||||
+static enum pf_type spurious_page_fault(
|
||||
unsigned long addr, unsigned int error_code)
|
||||
{
|
||||
unsigned long flags;
|
||||
- int is_spurious;
|
||||
+ enum pf_type pf_type;
|
||||
|
||||
/*
|
||||
* Disabling interrupts prevents TLB flushing, and hence prevents
|
||||
* page tables from becoming invalid under our feet during the walk.
|
||||
*/
|
||||
local_irq_save(flags);
|
||||
- is_spurious = __spurious_page_fault(addr, error_code);
|
||||
+ pf_type = __page_fault_type(addr, error_code);
|
||||
local_irq_restore(flags);
|
||||
|
||||
- return is_spurious;
|
||||
+ return pf_type;
|
||||
}
|
||||
|
||||
static int fixup_page_fault(unsigned long addr, struct cpu_user_regs *regs)
|
||||
@@ -1314,6 +1335,7 @@ asmlinkage void do_page_fault(struct cpu
|
||||
{
|
||||
unsigned long addr, fixup;
|
||||
unsigned int error_code;
|
||||
+ enum pf_type pf_type;
|
||||
|
||||
addr = read_cr2();
|
||||
|
||||
@@ -1329,7 +1351,9 @@ asmlinkage void do_page_fault(struct cpu
|
||||
|
||||
if ( unlikely(!guest_mode(regs)) )
|
||||
{
|
||||
- if ( spurious_page_fault(addr, error_code) )
|
||||
+ pf_type = spurious_page_fault(addr, error_code);
|
||||
+ BUG_ON(pf_type == smep_fault);
|
||||
+ if ( pf_type != real_fault )
|
||||
return;
|
||||
|
||||
if ( likely((fixup = search_exception_table(regs->eip)) != 0) )
|
||||
@@ -1351,9 +1375,17 @@ asmlinkage void do_page_fault(struct cpu
|
||||
error_code, _p(addr));
|
||||
}
|
||||
|
||||
- if ( unlikely(current->domain->arch.suppress_spurious_page_faults
|
||||
- && spurious_page_fault(addr, error_code)) )
|
||||
- return;
|
||||
+ if ( unlikely(current->domain->arch.suppress_spurious_page_faults) )
|
||||
+ {
|
||||
+ pf_type = spurious_page_fault(addr, error_code);
|
||||
+ if ( pf_type == smep_fault )
|
||||
+ {
|
||||
+ gdprintk(XENLOG_ERR, "Fatal SMEP fault\n");
|
||||
+ domain_crash(current->domain);
|
||||
+ }
|
||||
+ if ( pf_type != real_fault )
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
propagate_page_fault(addr, regs->error_code);
|
||||
}
|
||||
--- a/xen/include/asm-x86/cpufeature.h
|
||||
+++ b/xen/include/asm-x86/cpufeature.h
|
||||
@@ -140,8 +140,9 @@
|
||||
#define X86_FEATURE_TBM (6*32+21) /* trailing bit manipulations */
|
||||
#define X86_FEATURE_TOPOEXT (6*32+22) /* topology extensions CPUID leafs */
|
||||
|
||||
-/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 9 */
|
||||
+/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 7 */
|
||||
#define X86_FEATURE_FSGSBASE (7*32+ 0) /* {RD,WR}{FS,GS}BASE instructions */
|
||||
+#define X86_FEATURE_SMEP (7*32+ 7) /* Supervisor Mode Execution Protection */
|
||||
|
||||
#define cpu_has(c, bit) test_bit(bit, (c)->x86_capability)
|
||||
#define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability)
|
||||
@@ -201,6 +202,8 @@
|
||||
#define cpu_has_fsgsbase boot_cpu_has(X86_FEATURE_FSGSBASE)
|
||||
#endif
|
||||
|
||||
+#define cpu_has_smep boot_cpu_has(X86_FEATURE_SMEP)
|
||||
+
|
||||
#define cpu_has_ffxsr ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) \
|
||||
&& boot_cpu_has(X86_FEATURE_FFXSR))
|
||||
|
||||
--- a/xen/include/asm-x86/domain.h
|
||||
+++ b/xen/include/asm-x86/domain.h
|
||||
@@ -462,12 +462,14 @@ unsigned long pv_guest_cr4_fixup(const s
|
||||
/* Convert between guest-visible and real CR4 values. */
|
||||
#define pv_guest_cr4_to_real_cr4(v) \
|
||||
(((v)->arch.guest_context.ctrlreg[4] \
|
||||
- | (mmu_cr4_features & (X86_CR4_PGE | X86_CR4_PSE)) \
|
||||
- | ((v)->domain->arch.vtsc ? X86_CR4_TSD : 0) \
|
||||
- | ((xsave_enabled(v))? X86_CR4_OSXSAVE : 0)) \
|
||||
- & ~X86_CR4_DE)
|
||||
-#define real_cr4_to_pv_guest_cr4(c) \
|
||||
- ((c) & ~(X86_CR4_PGE | X86_CR4_PSE | X86_CR4_TSD | X86_CR4_OSXSAVE))
|
||||
+ | (mmu_cr4_features \
|
||||
+ & (X86_CR4_PGE | X86_CR4_PSE | X86_CR4_SMEP)) \
|
||||
+ | ((v)->domain->arch.vtsc ? X86_CR4_TSD : 0) \
|
||||
+ | ((xsave_enabled(v))? X86_CR4_OSXSAVE : 0)) \
|
||||
+ & ~X86_CR4_DE)
|
||||
+#define real_cr4_to_pv_guest_cr4(c) \
|
||||
+ ((c) & ~(X86_CR4_PGE | X86_CR4_PSE | X86_CR4_TSD \
|
||||
+ | X86_CR4_OSXSAVE | X86_CR4_SMEP))
|
||||
|
||||
void domain_cpuid(struct domain *d,
|
||||
unsigned int input,
|
||||
--- a/xen/include/asm-x86/processor.h
|
||||
+++ b/xen/include/asm-x86/processor.h
|
||||
@@ -85,6 +85,7 @@
|
||||
#define X86_CR4_SMXE 0x4000 /* enable SMX */
|
||||
#define X86_CR4_FSGSBASE 0x10000 /* enable {rd,wr}{fs,gs}base */
|
||||
#define X86_CR4_OSXSAVE 0x40000 /* enable XSAVE/XRSTOR */
|
||||
+#define X86_CR4_SMEP 0x100000/* enable SMEP */
|
||||
|
||||
/*
|
||||
* Trap/fault mnemonics.
|
@ -1,148 +0,0 @@
|
||||
References: FATE#311951
|
||||
|
||||
# HG changeset patch
|
||||
# User Tim Deegan <Tim.Deegan@citrix.com>
|
||||
# Date 1307364408 -3600
|
||||
# Node ID c34604d5a29336d902837542b915d3b09b27a361
|
||||
# Parent 664c419b55681feb233b33e0028d0f0af371bedd
|
||||
x86/hvm: add SMEP support to HVM guest
|
||||
|
||||
Intel new CPU supports SMEP (Supervisor Mode Execution Protection). SMEP
|
||||
prevents software operating with CPL < 3 (supervisor mode) from fetching
|
||||
instructions from any linear address with a valid translation for which the U/S
|
||||
flag (bit 2) is 1 in every paging-structure entry controlling the translation
|
||||
for the linear address.
|
||||
|
||||
This patch adds SMEP support to HVM guest.
|
||||
|
||||
Signed-off-by: Yang Wei <wei.y.yang@intel.com>
|
||||
Signed-off-by: Shan Haitao <haitao.shan@intel.com>
|
||||
Signed-off-by: Li Xin <xin.li@intel.com>
|
||||
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
|
||||
|
||||
--- a/tools/libxc/xc_cpufeature.h
|
||||
+++ b/tools/libxc/xc_cpufeature.h
|
||||
@@ -124,5 +124,6 @@
|
||||
|
||||
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx) */
|
||||
#define X86_FEATURE_FSGSBASE 0 /* {RD,WR}{FS,GS}BASE instructions */
|
||||
+#define X86_FEATURE_SMEP 7 /* Supervisor Mode Execution Protection */
|
||||
|
||||
#endif /* __LIBXC_CPUFEATURE_H */
|
||||
--- a/tools/libxc/xc_cpuid_x86.c
|
||||
+++ b/tools/libxc/xc_cpuid_x86.c
|
||||
@@ -300,6 +300,14 @@ static void xc_cpuid_hvm_policy(
|
||||
clear_bit(X86_FEATURE_PAE, regs[3]);
|
||||
break;
|
||||
|
||||
+ case 0x00000007: /* Intel-defined CPU features */
|
||||
+ if ( input[1] == 0 ) {
|
||||
+ regs[1] &= bitmaskof(X86_FEATURE_SMEP);
|
||||
+ } else
|
||||
+ regs[1] = 0;
|
||||
+ regs[0] = regs[2] = regs[3] = 0;
|
||||
+ break;
|
||||
+
|
||||
case 0x0000000d:
|
||||
xc_cpuid_config_xsave(xch, domid, xfeature_mask, input, regs);
|
||||
break;
|
||||
--- a/xen/arch/x86/hvm/hvm.c
|
||||
+++ b/xen/arch/x86/hvm/hvm.c
|
||||
@@ -1553,8 +1553,9 @@ int hvm_set_cr4(unsigned long value)
|
||||
v->arch.hvm_vcpu.guest_cr[4] = value;
|
||||
hvm_update_guest_cr(v, 4);
|
||||
|
||||
- /* Modifying CR4.{PSE,PAE,PGE} invalidates all TLB entries, inc. Global. */
|
||||
- if ( (old_cr ^ value) & (X86_CR4_PSE | X86_CR4_PGE | X86_CR4_PAE) )
|
||||
+ /* Modifying CR4.{PSE,PAE,PGE,SMEP} invalidates all TLB entries. */
|
||||
+ if ( (old_cr ^ value) & (X86_CR4_PSE | X86_CR4_PGE |
|
||||
+ X86_CR4_PAE | X86_CR4_SMEP) )
|
||||
paging_update_paging_modes(v);
|
||||
|
||||
return X86EMUL_OKAY;
|
||||
@@ -2196,7 +2197,7 @@ enum hvm_copy_result hvm_copy_from_guest
|
||||
enum hvm_copy_result hvm_fetch_from_guest_virt(
|
||||
void *buf, unsigned long vaddr, int size, uint32_t pfec)
|
||||
{
|
||||
- if ( hvm_nx_enabled(current) )
|
||||
+ if ( hvm_nx_enabled(current) || hvm_smep_enabled(current) )
|
||||
pfec |= PFEC_insn_fetch;
|
||||
return __hvm_copy(buf, vaddr, size,
|
||||
HVMCOPY_from_guest | HVMCOPY_fault | HVMCOPY_virt,
|
||||
@@ -2222,7 +2223,7 @@ enum hvm_copy_result hvm_copy_from_guest
|
||||
enum hvm_copy_result hvm_fetch_from_guest_virt_nofault(
|
||||
void *buf, unsigned long vaddr, int size, uint32_t pfec)
|
||||
{
|
||||
- if ( hvm_nx_enabled(current) )
|
||||
+ if ( hvm_nx_enabled(current) || hvm_smep_enabled(current) )
|
||||
pfec |= PFEC_insn_fetch;
|
||||
return __hvm_copy(buf, vaddr, size,
|
||||
HVMCOPY_from_guest | HVMCOPY_no_fault | HVMCOPY_virt,
|
||||
@@ -2292,6 +2293,10 @@ void hvm_cpuid(unsigned int input, unsig
|
||||
*ecx |= (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_OSXSAVE) ?
|
||||
cpufeat_mask(X86_FEATURE_OSXSAVE) : 0;
|
||||
break;
|
||||
+ case 0x7:
|
||||
+ if ( (count == 0) && !cpu_has_smep )
|
||||
+ *ebx &= ~cpufeat_mask(X86_FEATURE_SMEP);
|
||||
+ break;
|
||||
case 0xb:
|
||||
/* Fix the x2APIC identifier. */
|
||||
*edx = v->vcpu_id * 2;
|
||||
--- a/xen/arch/x86/mm/guest_walk.c
|
||||
+++ b/xen/arch/x86/mm/guest_walk.c
|
||||
@@ -132,7 +132,7 @@ guest_walk_tables(struct vcpu *v, struct
|
||||
guest_l4e_t *l4p;
|
||||
#endif
|
||||
uint32_t gflags, mflags, iflags, rc = 0;
|
||||
- int pse;
|
||||
+ int pse, smep;
|
||||
|
||||
perfc_incr(guest_walk);
|
||||
memset(gw, 0, sizeof(*gw));
|
||||
@@ -145,6 +145,15 @@ guest_walk_tables(struct vcpu *v, struct
|
||||
mflags = mandatory_flags(v, pfec);
|
||||
iflags = (_PAGE_NX_BIT | _PAGE_INVALID_BITS);
|
||||
|
||||
+ /* SMEP: kernel-mode instruction fetches from user-mode mappings
|
||||
+ * should fault. Unlike NX or invalid bits, we're looking for _all_
|
||||
+ * entries in the walk to have _PAGE_USER set, so we need to do the
|
||||
+ * whole walk as if it were a user-mode one and then invert the answer. */
|
||||
+ smep = (is_hvm_vcpu(v) && hvm_smep_enabled(v)
|
||||
+ && (pfec & PFEC_insn_fetch) && !(pfec & PFEC_user_mode) );
|
||||
+ if ( smep )
|
||||
+ mflags |= _PAGE_USER;
|
||||
+
|
||||
#if GUEST_PAGING_LEVELS >= 3 /* PAE or 64... */
|
||||
#if GUEST_PAGING_LEVELS >= 4 /* 64-bit only... */
|
||||
|
||||
@@ -271,6 +280,10 @@ guest_walk_tables(struct vcpu *v, struct
|
||||
rc |= ((gflags & mflags) ^ mflags);
|
||||
}
|
||||
|
||||
+ /* Now re-invert the user-mode requirement for SMEP. */
|
||||
+ if ( smep )
|
||||
+ rc ^= _PAGE_USER;
|
||||
+
|
||||
/* Go back and set accessed and dirty bits only if the walk was a
|
||||
* success. Although the PRMs say higher-level _PAGE_ACCESSED bits
|
||||
* get set whenever a lower-level PT is used, at least some hardware
|
||||
--- a/xen/include/asm-x86/hvm/hvm.h
|
||||
+++ b/xen/include/asm-x86/hvm/hvm.h
|
||||
@@ -181,6 +181,8 @@ int hvm_girq_dest_2_vcpu_id(struct domai
|
||||
(!!((v)->arch.hvm_vcpu.guest_cr[0] & X86_CR0_WP))
|
||||
#define hvm_pae_enabled(v) \
|
||||
(hvm_paging_enabled(v) && ((v)->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PAE))
|
||||
+#define hvm_smep_enabled(v) \
|
||||
+ (hvm_paging_enabled(v) && ((v)->arch.hvm_vcpu.guest_cr[4] & X86_CR4_SMEP))
|
||||
#define hvm_nx_enabled(v) \
|
||||
(!!((v)->arch.hvm_vcpu.guest_efer & EFER_NX))
|
||||
|
||||
@@ -294,6 +296,7 @@ static inline int hvm_do_pmu_interrupt(s
|
||||
X86_CR4_DE | X86_CR4_PSE | X86_CR4_PAE | \
|
||||
X86_CR4_MCE | X86_CR4_PGE | X86_CR4_PCE | \
|
||||
X86_CR4_OSFXSR | X86_CR4_OSXMMEXCPT | \
|
||||
+ (cpu_has_smep ? X86_CR4_SMEP : 0) | \
|
||||
(xsave_enabled(_v) ? X86_CR4_OSXSAVE : 0))))
|
||||
|
||||
/* These exceptions must always be intercepted. */
|
@ -1,24 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1307689724 -3600
|
||||
# Node ID 5a557fda70a99d287735b53957e865c8dac0e351
|
||||
# Parent c34604d5a29336d902837542b915d3b09b27a361
|
||||
x86: Fix argument checking in (privileged) function cpu_add().
|
||||
|
||||
Thanks to John McDermott <john.mcdermott@nrl.navy.mil> for spotting.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/smpboot.c
|
||||
+++ b/xen/arch/x86/smpboot.c
|
||||
@@ -899,7 +899,9 @@ int cpu_add(uint32_t apic_id, uint32_t a
|
||||
dprintk(XENLOG_DEBUG, "cpu_add apic_id %x acpi_id %x pxm %x\n",
|
||||
apic_id, acpi_id, pxm);
|
||||
|
||||
- if ( acpi_id > MAX_MADT_ENTRIES || apic_id > MAX_APICS || pxm > 256 )
|
||||
+ if ( (acpi_id >= MAX_MADT_ENTRIES) ||
|
||||
+ (apic_id >= MAX_APICS) ||
|
||||
+ (pxm >= 256) )
|
||||
return -EINVAL;
|
||||
|
||||
if ( !cpu_hotplug_begin() )
|
@ -12,8 +12,10 @@ is of use to nestedvmx, and every 64-bit cpu should support it.
|
||||
Signed-off-by: Eddie Dong <eddie.dong@intel.com>
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/hvm/vmx/vmcs.c
|
||||
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/vmx/vmcs.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/vmx/vmcs.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/vmx/vmcs.c
|
||||
@@ -147,6 +147,11 @@ static int vmx_init_vmcs_config(void)
|
||||
MSR_IA32_VMX_PINBASED_CTLS, &mismatch);
|
||||
|
||||
|
@ -1,44 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Yang, Wei <wei.y.yang@intel.com>
|
||||
# Date 1308051888 -3600
|
||||
# Node ID 864a3dd1d9b4664f1ece44c9eaf390969253b7a8
|
||||
# Parent 782bc7b2661a3921af21130f34f599f68911f2ce
|
||||
x86/hvm: Make DRNG feature visible in CPUID
|
||||
|
||||
This patch exposes DRNG feature to HVM guests.
|
||||
|
||||
The RDRAND instruction can provide software with sequences of
|
||||
random numbers generated from white noise.
|
||||
|
||||
Signed-off-by: Yang, Wei <wei.y.yang@intel.com>
|
||||
|
||||
--- a/tools/libxc/xc_cpufeature.h
|
||||
+++ b/tools/libxc/xc_cpufeature.h
|
||||
@@ -87,6 +87,7 @@
|
||||
#define X86_FEATURE_XSAVE 26 /* XSAVE/XRSTOR/XSETBV/XGETBV */
|
||||
#define X86_FEATURE_AVX 28 /* Advanced Vector Extensions */
|
||||
#define X86_FEATURE_F16C 29 /* Half-precision convert instruction */
|
||||
+#define X86_FEATURE_RDRAND 30 /* Digital Random Number Generator */
|
||||
#define X86_FEATURE_HYPERVISOR 31 /* Running under some hypervisor */
|
||||
|
||||
/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001 */
|
||||
--- a/tools/libxc/xc_cpuid_x86.c
|
||||
+++ b/tools/libxc/xc_cpuid_x86.c
|
||||
@@ -262,6 +262,7 @@ static void xc_cpuid_hvm_policy(
|
||||
bitmaskof(X86_FEATURE_POPCNT) |
|
||||
bitmaskof(X86_FEATURE_AES) |
|
||||
bitmaskof(X86_FEATURE_F16C) |
|
||||
+ bitmaskof(X86_FEATURE_RDRAND) |
|
||||
((xfeature_mask != 0) ?
|
||||
(bitmaskof(X86_FEATURE_AVX) |
|
||||
bitmaskof(X86_FEATURE_XSAVE)) : 0));
|
||||
--- a/xen/include/asm-x86/cpufeature.h
|
||||
+++ b/xen/include/asm-x86/cpufeature.h
|
||||
@@ -105,6 +105,7 @@
|
||||
#define X86_FEATURE_OSXSAVE (4*32+27) /* OSXSAVE */
|
||||
#define X86_FEATURE_AVX (4*32+28) /* Advanced Vector Extensions */
|
||||
#define X86_FEATURE_F16C (4*32+29) /* Half-precision convert instruction */
|
||||
+#define X86_FEATURE_RDRAND (4*32+30) /* Digital Random Number Generator */
|
||||
#define X86_FEATURE_HYPERVISOR (4*32+31) /* Running under some hypervisor */
|
||||
|
||||
/* VIA/Cyrix/Centaur-defined CPU features, CPUID level 0xC0000001, word 5 */
|
@ -14,9 +14,11 @@ prevent these processors from flushing when entering C3.
|
||||
|
||||
Signed-off-by: Mark Langsdorf <mark.langsdorf@amd.com>
|
||||
|
||||
--- a/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ b/xen/arch/x86/acpi/cpu_idle.c
|
||||
@@ -680,7 +680,8 @@ static void acpi_processor_power_init_bm
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
@@ -710,7 +710,8 @@ static void acpi_processor_power_init_bm
|
||||
flags->bm_check = 0;
|
||||
if ( num_online_cpus() == 1 )
|
||||
flags->bm_check = 1;
|
||||
|
@ -1,67 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Yang, Wei <wei.y.yang@intel.com>
|
||||
# Date 1308053598 -3600
|
||||
# Node ID f4a47275aebf383cf565e0a265a56a8c1110d45e
|
||||
# Parent 337520d94cba906e64dbd3089d65cda8cf97d1d0
|
||||
x86: Pass through ERMS CPUID feature for HVM and PV guests
|
||||
|
||||
This patch exposes ERMS feature to HVM and PV guests.
|
||||
|
||||
The REP MOVSB/STOSB instruction can enhance fast strings attempts to
|
||||
move as much of the data with larger size load/stores as possible.
|
||||
|
||||
Signed-off-by: Yang, Wei <wei.y.yang@intel.com>
|
||||
|
||||
--- a/tools/libxc/xc_cpufeature.h
|
||||
+++ b/tools/libxc/xc_cpufeature.h
|
||||
@@ -126,5 +126,6 @@
|
||||
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx) */
|
||||
#define X86_FEATURE_FSGSBASE 0 /* {RD,WR}{FS,GS}BASE instructions */
|
||||
#define X86_FEATURE_SMEP 7 /* Supervisor Mode Execution Protection */
|
||||
+#define X86_FEATURE_ERMS 9 /* Enhanced REP MOVSB/STOSB */
|
||||
|
||||
#endif /* __LIBXC_CPUFEATURE_H */
|
||||
--- a/tools/libxc/xc_cpuid_x86.c
|
||||
+++ b/tools/libxc/xc_cpuid_x86.c
|
||||
@@ -303,7 +303,8 @@ static void xc_cpuid_hvm_policy(
|
||||
|
||||
case 0x00000007: /* Intel-defined CPU features */
|
||||
if ( input[1] == 0 ) {
|
||||
- regs[1] &= bitmaskof(X86_FEATURE_SMEP);
|
||||
+ regs[1] &= (bitmaskof(X86_FEATURE_SMEP) |
|
||||
+ bitmaskof(X86_FEATURE_ERMS));
|
||||
} else
|
||||
regs[1] = 0;
|
||||
regs[0] = regs[2] = regs[3] = 0;
|
||||
@@ -425,7 +426,8 @@ static void xc_cpuid_pv_policy(
|
||||
|
||||
case 7:
|
||||
if ( input[1] == 0 )
|
||||
- regs[1] &= bitmaskof(X86_FEATURE_FSGSBASE);
|
||||
+ regs[1] &= (bitmaskof(X86_FEATURE_FSGSBASE) |
|
||||
+ bitmaskof(X86_FEATURE_ERMS));
|
||||
else
|
||||
regs[1] = 0;
|
||||
regs[0] = regs[2] = regs[3] = 0;
|
||||
--- a/xen/arch/x86/traps.c
|
||||
+++ b/xen/arch/x86/traps.c
|
||||
@@ -812,7 +812,8 @@ static void pv_cpuid(struct cpu_user_reg
|
||||
break;
|
||||
case 7:
|
||||
if ( regs->ecx == 0 )
|
||||
- b &= cpufeat_mask(X86_FEATURE_FSGSBASE);
|
||||
+ b &= (cpufeat_mask(X86_FEATURE_FSGSBASE) |
|
||||
+ cpufeat_mask(X86_FEATURE_ERMS));
|
||||
else
|
||||
b = 0;
|
||||
a = c = d = 0;
|
||||
--- a/xen/include/asm-x86/cpufeature.h
|
||||
+++ b/xen/include/asm-x86/cpufeature.h
|
||||
@@ -144,6 +144,7 @@
|
||||
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ebx), word 7 */
|
||||
#define X86_FEATURE_FSGSBASE (7*32+ 0) /* {RD,WR}{FS,GS}BASE instructions */
|
||||
#define X86_FEATURE_SMEP (7*32+ 7) /* Supervisor Mode Execution Protection */
|
||||
+#define X86_FEATURE_ERMS (7*32+ 9) /* Enhanced REP MOVSB/STOSB */
|
||||
|
||||
#define cpu_has(c, bit) test_bit(bit, (c)->x86_capability)
|
||||
#define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability)
|
@ -1,33 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User George Dunlap <george.dunlap@eu.citrix.com>
|
||||
# Date 1308150314 -3600
|
||||
# Node ID 35b4220c98bc89b7162d19ed6c858e027fabff69
|
||||
# Parent cac82bc1ea23bc213ece4c84db2703dd46df7f25
|
||||
x86/hvm: Crash domain rather than guest on unexpected PIO IO state
|
||||
|
||||
Under certain conditions, if an IO gets into an unexpected state,
|
||||
hvmemul_do_io can return X86EMUL_UNHANDLEABLE. Unfortunately,
|
||||
handle_pio() does not expect this state, and calls BUG() if it sees
|
||||
it, crashing the host.
|
||||
|
||||
Other HVM io-related code crashes the guest in this case. This patch
|
||||
makes handle_pio() do the same.
|
||||
|
||||
The crash was seen when executing crash_guest in dom0 to forcibly
|
||||
crash the guest.
|
||||
|
||||
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/hvm/io.c
|
||||
+++ b/xen/arch/x86/hvm/io.c
|
||||
@@ -239,7 +239,9 @@ int handle_pio(uint16_t port, int size,
|
||||
curr->arch.hvm_vcpu.io_state = HVMIO_handle_pio_awaiting_completion;
|
||||
break;
|
||||
default:
|
||||
- BUG();
|
||||
+ gdprintk(XENLOG_ERR, "Weird HVM ioemulation status %d.\n", rc);
|
||||
+ domain_crash(curr->domain);
|
||||
+ break;
|
||||
}
|
||||
|
||||
return 1;
|
@ -1,34 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Yang, Wei <wei.y.yang@intel.com>
|
||||
# Date 1308150408 -3600
|
||||
# Node ID 8c75f35d55f60cb2f374e3b5c7c520f8633d733f
|
||||
# Parent 35b4220c98bc89b7162d19ed6c858e027fabff69
|
||||
Enable RDWRGSFS feature support for HVM guests
|
||||
|
||||
Write/read FS/GS base instructions enable user level code to
|
||||
read/write FS & GS segment base registers for thread local storage.
|
||||
|
||||
Signed-off-by: Yang, Wei <wei.y.yang@intel.com>
|
||||
|
||||
--- a/tools/libxc/xc_cpuid_x86.c
|
||||
+++ b/tools/libxc/xc_cpuid_x86.c
|
||||
@@ -304,7 +304,8 @@ static void xc_cpuid_hvm_policy(
|
||||
case 0x00000007: /* Intel-defined CPU features */
|
||||
if ( input[1] == 0 ) {
|
||||
regs[1] &= (bitmaskof(X86_FEATURE_SMEP) |
|
||||
- bitmaskof(X86_FEATURE_ERMS));
|
||||
+ bitmaskof(X86_FEATURE_ERMS) |
|
||||
+ bitmaskof(X86_FEATURE_FSGSBASE));
|
||||
} else
|
||||
regs[1] = 0;
|
||||
regs[0] = regs[2] = regs[3] = 0;
|
||||
--- a/xen/include/asm-x86/hvm/hvm.h
|
||||
+++ b/xen/include/asm-x86/hvm/hvm.h
|
||||
@@ -297,6 +297,7 @@ static inline int hvm_do_pmu_interrupt(s
|
||||
X86_CR4_MCE | X86_CR4_PGE | X86_CR4_PCE | \
|
||||
X86_CR4_OSFXSR | X86_CR4_OSXMMEXCPT | \
|
||||
(cpu_has_smep ? X86_CR4_SMEP : 0) | \
|
||||
+ (cpu_has_fsgsbase ? X86_CR4_FSGSBASE : 0) | \
|
||||
(xsave_enabled(_v) ? X86_CR4_OSXSAVE : 0))))
|
||||
|
||||
/* These exceptions must always be intercepted. */
|
@ -1,24 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Jan Beulich <jbeulich@novell.com>
|
||||
# Date 1308165849 -3600
|
||||
# Node ID a8edfacd4b5e2cecb78d2ff93e57e7efa1bf2db2
|
||||
# Parent 23c068b109236657ededa3e3b7f180346a5cd9f9
|
||||
x86-64: fix incorrect assertion in __maddr_to_virt()
|
||||
|
||||
When memory map sparseness reduction is in use, machine address ranges
|
||||
can't validly be compared directly against the total size of the
|
||||
direct mapping range.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/include/asm-x86/x86_64/page.h
|
||||
+++ b/xen/include/asm-x86/x86_64/page.h
|
||||
@@ -95,7 +95,7 @@ static inline unsigned long __virt_to_ma
|
||||
|
||||
static inline void *__maddr_to_virt(unsigned long ma)
|
||||
{
|
||||
- ASSERT(ma < DIRECTMAP_VIRT_END - DIRECTMAP_VIRT_START);
|
||||
+ ASSERT(pfn_to_pdx(ma >> PAGE_SHIFT) < (DIRECTMAP_SIZE >> PAGE_SHIFT));
|
||||
return (void *)(DIRECTMAP_VIRT_START +
|
||||
((ma & ma_va_bottom_mask) |
|
||||
((ma & ma_top_mask) >> pfn_pdx_hole_shift)));
|
@ -1,23 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1308167438 -3600
|
||||
# Node ID b58c4ec2f6939b31d56307599b517b5bcfc90279
|
||||
# Parent 649372e3d46a795040a358075869336b15b6b627
|
||||
x86_emulate: Fix decode of FUCOMIP %stN.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
xen-unstable changeset: 23546:d25f2c114ace
|
||||
xen-unstable date: Wed Jun 15 20:33:58 2011 +0100
|
||||
|
||||
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
|
||||
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
|
||||
@@ -2936,8 +2936,8 @@ x86_emulate(
|
||||
dst.reg = (unsigned long *)&_regs.eax;
|
||||
emulate_fpu_insn_memdst("fnstsw", dst.val);
|
||||
break;
|
||||
+ case 0xe8 ... 0xef: /* fucomip %stN */
|
||||
case 0xf0 ... 0xf7: /* fcomip %stN */
|
||||
- case 0xf8 ... 0xff: /* fucomip %stN */
|
||||
emulate_fpu_insn_stub(0xdf, modrm);
|
||||
break;
|
||||
default:
|
@ -10,8 +10,10 @@ iommu=debug is set xen boot parameter.
|
||||
|
||||
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
|
||||
--- a/xen/drivers/passthrough/amd/iommu_acpi.c
|
||||
+++ b/xen/drivers/passthrough/amd/iommu_acpi.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/passthrough/amd/iommu_acpi.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/passthrough/amd/iommu_acpi.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/passthrough/amd/iommu_acpi.c
|
||||
@@ -822,7 +822,7 @@ static int __init parse_ivrs_table(struc
|
||||
|
||||
BUG_ON(!table);
|
||||
@ -21,8 +23,10 @@ Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
dump_acpi_table_header(table);
|
||||
|
||||
/* parse IVRS blocks */
|
||||
--- a/xen/drivers/passthrough/iommu.c
|
||||
+++ b/xen/drivers/passthrough/iommu.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/passthrough/iommu.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/passthrough/iommu.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/passthrough/iommu.c
|
||||
@@ -48,7 +48,7 @@ bool_t __read_mostly iommu_snoop = 1;
|
||||
bool_t __read_mostly iommu_qinval = 1;
|
||||
bool_t __read_mostly iommu_intremap = 1;
|
||||
@ -43,8 +47,10 @@ Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
else if ( !strcmp(s, "amd-iommu-perdev-intremap") )
|
||||
amd_iommu_perdev_intremap = 1;
|
||||
else if ( !strcmp(s, "dom0-passthrough") )
|
||||
--- a/xen/drivers/passthrough/vtd/iommu.c
|
||||
+++ b/xen/drivers/passthrough/vtd/iommu.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/passthrough/vtd/iommu.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/passthrough/vtd/iommu.c
|
||||
@@ -821,7 +821,7 @@ static int iommu_page_fault_do_one(struc
|
||||
|
||||
if ( fault_type == DMA_REMAP )
|
||||
@ -104,8 +110,10 @@ Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
}
|
||||
|
||||
#define PRIMARY_FAULT_REG_LEN (16)
|
||||
--- a/xen/drivers/passthrough/vtd/iommu.h
|
||||
+++ b/xen/drivers/passthrough/vtd/iommu.h
|
||||
Index: xen-4.1.2-testing/xen/drivers/passthrough/vtd/iommu.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/passthrough/vtd/iommu.h
|
||||
+++ xen-4.1.2-testing/xen/drivers/passthrough/vtd/iommu.h
|
||||
@@ -512,4 +512,11 @@ struct intel_iommu {
|
||||
struct acpi_drhd_unit *drhd;
|
||||
};
|
||||
@ -118,8 +126,10 @@ Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
+ } while(0)
|
||||
+
|
||||
#endif
|
||||
--- a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
|
||||
+++ b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h
|
||||
@@ -34,7 +34,7 @@
|
||||
#define AMD_IOMMU_DEBUG(fmt, args...) \
|
||||
do \
|
||||
@ -129,8 +139,10 @@ Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
printk(XENLOG_INFO "AMD-Vi: " fmt, ## args); \
|
||||
} while(0)
|
||||
|
||||
--- a/xen/include/xen/iommu.h
|
||||
+++ b/xen/include/xen/iommu.h
|
||||
Index: xen-4.1.2-testing/xen/include/xen/iommu.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/iommu.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/iommu.h
|
||||
@@ -31,7 +31,7 @@ extern bool_t force_iommu, iommu_verbose
|
||||
extern bool_t iommu_workaround_bios_bug, iommu_passthrough;
|
||||
extern bool_t iommu_snoop, iommu_qinval, iommu_intremap;
|
||||
@ -139,4 +151,4 @@ Signed-off-by: Allen Kay <allen.m.kay@intel.com>
|
||||
+extern bool_t iommu_debug;
|
||||
extern bool_t amd_iommu_perdev_intremap;
|
||||
|
||||
extern struct rangeset *mmio_ro_ranges;
|
||||
/* Does this domain have a P2M table we can use as its IOMMU pagetable? */
|
||||
|
@ -17,8 +17,10 @@ in compressed form).
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/bzimage.c
|
||||
+++ b/xen/arch/x86/bzimage.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/bzimage.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/bzimage.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/bzimage.c
|
||||
@@ -5,6 +5,7 @@
|
||||
#include <xen/string.h>
|
||||
#include <xen/types.h>
|
||||
@ -105,8 +107,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
if ( !err )
|
||||
{
|
||||
--- a/xen/include/asm-x86/bzimage.h
|
||||
+++ b/xen/include/asm-x86/bzimage.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/bzimage.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/bzimage.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/bzimage.h
|
||||
@@ -4,10 +4,9 @@
|
||||
#include <xen/config.h>
|
||||
#include <xen/init.h>
|
||||
|
@ -12,8 +12,10 @@ another prerequisite for native EFI booting support.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/dmi_scan.c
|
||||
+++ b/xen/arch/x86/dmi_scan.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/dmi_scan.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/dmi_scan.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/dmi_scan.c
|
||||
@@ -10,11 +10,31 @@
|
||||
#include <asm/system.h>
|
||||
#include <xen/dmi.h>
|
||||
|
@ -12,8 +12,10 @@ structure. This is similar to upstream Linux kernel's approach.
|
||||
|
||||
Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
|
||||
--- a/xen/arch/x86/cpu/amd.c
|
||||
+++ b/xen/arch/x86/cpu/amd.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/cpu/amd.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/cpu/amd.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/cpu/amd.c
|
||||
@@ -579,11 +579,11 @@ static void __devinit init_amd(struct cp
|
||||
while ((1 << bits) < c->x86_max_cores)
|
||||
bits++;
|
||||
@ -29,8 +31,10 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
}
|
||||
#endif
|
||||
|
||||
--- a/xen/arch/x86/cpu/common.c
|
||||
+++ b/xen/arch/x86/cpu/common.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/cpu/common.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/cpu/common.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/cpu/common.c
|
||||
@@ -326,7 +326,7 @@ void __cpuinit generic_identify(struct c
|
||||
early_intel_workaround(c);
|
||||
|
||||
@ -119,8 +123,10 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
}
|
||||
}
|
||||
#endif
|
||||
--- a/xen/arch/x86/cpu/mcheck/mce.c
|
||||
+++ b/xen/arch/x86/cpu/mcheck/mce.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/cpu/mcheck/mce.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/cpu/mcheck/mce.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/cpu/mcheck/mce.c
|
||||
@@ -1041,9 +1041,9 @@ void x86_mc_get_cpu_info(unsigned cpu, u
|
||||
if (nthreads != NULL)
|
||||
*nthreads = 1;
|
||||
@ -133,9 +139,11 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
else
|
||||
*coreid = 0;
|
||||
*threadid = c->apicid & ((1 << (c->x86_num_siblings - 1)) - 1);
|
||||
--- a/xen/arch/x86/smpboot.c
|
||||
+++ b/xen/arch/x86/smpboot.c
|
||||
@@ -52,12 +52,6 @@
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/smpboot.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/smpboot.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/smpboot.c
|
||||
@@ -51,12 +51,6 @@
|
||||
/* Set if we find a B stepping CPU */
|
||||
static int smp_b_stepping;
|
||||
|
||||
@ -148,7 +156,7 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
/* representing HT siblings of each logical CPU */
|
||||
DEFINE_PER_CPU_READ_MOSTLY(cpumask_t, cpu_sibling_map);
|
||||
/* representing HT and core siblings of each logical CPU */
|
||||
@@ -258,8 +252,8 @@ static void set_cpu_sibling_map(int cpu)
|
||||
@@ -257,8 +251,8 @@ static void set_cpu_sibling_map(int cpu)
|
||||
{
|
||||
for_each_cpu_mask ( i, cpu_sibling_setup_map )
|
||||
{
|
||||
@ -159,7 +167,7 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
{
|
||||
cpu_set(i, per_cpu(cpu_sibling_map, cpu));
|
||||
cpu_set(cpu, per_cpu(cpu_sibling_map, i));
|
||||
@@ -282,7 +276,7 @@ static void set_cpu_sibling_map(int cpu)
|
||||
@@ -281,7 +275,7 @@ static void set_cpu_sibling_map(int cpu)
|
||||
|
||||
for_each_cpu_mask ( i, cpu_sibling_setup_map )
|
||||
{
|
||||
@ -168,7 +176,7 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
{
|
||||
cpu_set(i, per_cpu(cpu_core_map, cpu));
|
||||
cpu_set(cpu, per_cpu(cpu_core_map, i));
|
||||
@@ -843,8 +837,8 @@ remove_siblinginfo(int cpu)
|
||||
@@ -842,8 +836,8 @@ remove_siblinginfo(int cpu)
|
||||
cpu_clear(cpu, per_cpu(cpu_sibling_map, sibling));
|
||||
cpus_clear(per_cpu(cpu_sibling_map, cpu));
|
||||
cpus_clear(per_cpu(cpu_core_map, cpu));
|
||||
@ -179,8 +187,10 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
cpu_clear(cpu, cpu_sibling_setup_map);
|
||||
}
|
||||
|
||||
--- a/xen/include/asm-x86/processor.h
|
||||
+++ b/xen/include/asm-x86/processor.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/processor.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/processor.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/processor.h
|
||||
@@ -175,6 +175,8 @@ struct cpuinfo_x86 {
|
||||
__u32 x86_max_cores; /* cpuid returned max cores value */
|
||||
__u32 booted_cores; /* number of cores as seen by OS */
|
||||
|
@ -16,8 +16,10 @@ stored in the sibling map in Xen hypervisor.
|
||||
|
||||
Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
|
||||
--- a/xen/arch/x86/cpu/amd.c
|
||||
+++ b/xen/arch/x86/cpu/amd.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/cpu/amd.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/cpu/amd.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/cpu/amd.c
|
||||
@@ -344,6 +344,49 @@ static void check_syscfg_dram_mod_en(voi
|
||||
wrmsrl(MSR_K8_SYSCFG, syscfg);
|
||||
}
|
||||
@ -96,8 +98,10 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
|
||||
/* Pointless to use MWAIT on Family10 as it does not deep sleep. */
|
||||
if (c->x86 >= 0x10 && !force_mwait)
|
||||
--- a/xen/arch/x86/cpu/common.c
|
||||
+++ b/xen/arch/x86/cpu/common.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/cpu/common.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/cpu/common.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/cpu/common.c
|
||||
@@ -364,6 +364,7 @@ void __cpuinit identify_cpu(struct cpuin
|
||||
c->x86_clflush_size = 0;
|
||||
c->phys_proc_id = BAD_APICID;
|
||||
@ -106,9 +110,11 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
memset(&c->x86_capability, 0, sizeof c->x86_capability);
|
||||
|
||||
if (!have_cpuid_p()) {
|
||||
--- a/xen/arch/x86/smpboot.c
|
||||
+++ b/xen/arch/x86/smpboot.c
|
||||
@@ -241,6 +241,14 @@ static int booting_cpu;
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/smpboot.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/smpboot.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/smpboot.c
|
||||
@@ -240,6 +240,14 @@ static int booting_cpu;
|
||||
/* CPUs for which sibling maps can be computed. */
|
||||
static cpumask_t cpu_sibling_setup_map;
|
||||
|
||||
@ -123,7 +129,7 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
static void set_cpu_sibling_map(int cpu)
|
||||
{
|
||||
int i;
|
||||
@@ -252,13 +260,13 @@ static void set_cpu_sibling_map(int cpu)
|
||||
@@ -251,13 +259,13 @@ static void set_cpu_sibling_map(int cpu)
|
||||
{
|
||||
for_each_cpu_mask ( i, cpu_sibling_setup_map )
|
||||
{
|
||||
@ -144,7 +150,7 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -839,6 +847,7 @@ remove_siblinginfo(int cpu)
|
||||
@@ -838,6 +846,7 @@ remove_siblinginfo(int cpu)
|
||||
cpus_clear(per_cpu(cpu_core_map, cpu));
|
||||
c[cpu].phys_proc_id = BAD_APICID;
|
||||
c[cpu].cpu_core_id = BAD_APICID;
|
||||
@ -152,8 +158,10 @@ Signed-off-by: Wei Huang <wei.huang2@amd.com>
|
||||
cpu_clear(cpu, cpu_sibling_setup_map);
|
||||
}
|
||||
|
||||
--- a/xen/include/asm-x86/processor.h
|
||||
+++ b/xen/include/asm-x86/processor.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/processor.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/processor.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/processor.h
|
||||
@@ -175,9 +175,10 @@ struct cpuinfo_x86 {
|
||||
__u32 x86_max_cores; /* cpuid returned max cores value */
|
||||
__u32 booted_cores; /* number of cores as seen by OS */
|
||||
|
@ -11,8 +11,10 @@ Taken from gnu-efi-3.0k (slightly edited).
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/efibind.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/include/asm-x86/efibind.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/efibind.h
|
||||
@@ -0,0 +1,6 @@
|
||||
+#include <xen/types.h>
|
||||
+#if defined(__i386__)
|
||||
@ -20,8 +22,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+#elif defined(__x86_64__)
|
||||
+# include <asm/x86_64/efibind.h>
|
||||
+#endif
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/x86_64/efibind.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/include/asm-x86/x86_64/efibind.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/x86_64/efibind.h
|
||||
@@ -0,0 +1,276 @@
|
||||
+/*++
|
||||
+
|
||||
@ -299,8 +303,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+#pragma warning ( disable : 4731 ) // Suppress warnings about modification of EBP
|
||||
+#endif
|
||||
+
|
||||
Index: xen-4.1.2-testing/xen/include/efi/efiapi.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/include/efi/efiapi.h
|
||||
+++ xen-4.1.2-testing/xen/include/efi/efiapi.h
|
||||
@@ -0,0 +1,718 @@
|
||||
+#ifndef _EFI_API_H
|
||||
+#define _EFI_API_H
|
||||
@ -1020,8 +1026,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
Index: xen-4.1.2-testing/xen/include/efi/eficon.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/include/efi/eficon.h
|
||||
+++ xen-4.1.2-testing/xen/include/efi/eficon.h
|
||||
@@ -0,0 +1,302 @@
|
||||
+#ifndef _EFI_CON_H
|
||||
+#define _EFI_CON_H
|
||||
@ -1325,8 +1333,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
Index: xen-4.1.2-testing/xen/include/efi/efidef.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/include/efi/efidef.h
|
||||
+++ xen-4.1.2-testing/xen/include/efi/efidef.h
|
||||
@@ -0,0 +1,196 @@
|
||||
+#ifndef _EFI_DEF_H
|
||||
+#define _EFI_DEF_H
|
||||
@ -1524,8 +1534,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+ ( ((a) >> EFI_PAGE_SHIFT) + ((a) & EFI_PAGE_MASK ? 1 : 0) )
|
||||
+
|
||||
+#endif
|
||||
Index: xen-4.1.2-testing/xen/include/efi/efidevp.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/include/efi/efidevp.h
|
||||
+++ xen-4.1.2-testing/xen/include/efi/efidevp.h
|
||||
@@ -0,0 +1,402 @@
|
||||
+#ifndef _DEVPATH_H
|
||||
+#define _DEVPATH_H
|
||||
@ -1929,8 +1941,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+
|
||||
+#endif
|
||||
Index: xen-4.1.2-testing/xen/include/efi/efierr.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/include/efi/efierr.h
|
||||
+++ xen-4.1.2-testing/xen/include/efi/efierr.h
|
||||
@@ -0,0 +1,60 @@
|
||||
+#ifndef _EFI_ERR_H
|
||||
+#define _EFI_ERR_H
|
||||
@ -1992,8 +2006,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
Index: xen-4.1.2-testing/xen/include/efi/efiprot.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/include/efi/efiprot.h
|
||||
+++ xen-4.1.2-testing/xen/include/efi/efiprot.h
|
||||
@@ -0,0 +1,728 @@
|
||||
+#ifndef _EFI_PROT_H
|
||||
+#define _EFI_PROT_H
|
||||
|
@ -59,8 +59,10 @@ corrupt other data.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/Makefile
|
||||
+++ b/xen/Makefile
|
||||
Index: xen-4.1.2-testing/xen/Makefile
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/Makefile
|
||||
+++ xen-4.1.2-testing/xen/Makefile
|
||||
@@ -11,6 +11,8 @@ export XEN_DOMAIN ?= $(shell ([ -x /bin/
|
||||
|
||||
export BASEDIR := $(CURDIR)
|
||||
@ -89,8 +91,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
.PHONY: _debug
|
||||
_debug:
|
||||
--- a/xen/arch/x86/Makefile
|
||||
+++ b/xen/arch/x86/Makefile
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/Makefile
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/Makefile
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/Makefile
|
||||
@@ -61,14 +61,21 @@ obj-$(crash_debug) += gdbstub.o
|
||||
|
||||
x86_emulate.o: x86_emulate/x86_emulate.c x86_emulate/x86_emulate.h
|
||||
@ -178,8 +182,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
rm -f $(BASEDIR)/.xen-syms.[0-9]* boot/.*.d
|
||||
+ rm -f $(BASEDIR)/.xen.efi.[0-9]* efi/*.o efi/mkreloc
|
||||
rm -f boot/reloc.S boot/reloc.lnk boot/reloc.bin
|
||||
--- a/xen/arch/x86/boot/trampoline.S
|
||||
+++ b/xen/arch/x86/boot/trampoline.S
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/boot/trampoline.S
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/boot/trampoline.S
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/boot/trampoline.S
|
||||
@@ -38,6 +38,7 @@ trampoline_gdt:
|
||||
.long 0x0000ffff | ((BOOT_TRAMPOLINE & 0x00ffff) << 16)
|
||||
.long 0x00009200 | ((BOOT_TRAMPOLINE & 0xff0000) >> 16)
|
||||
@ -188,8 +194,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
cpuid_ext_features:
|
||||
.long 0
|
||||
|
||||
--- a/xen/arch/x86/boot/x86_64.S
|
||||
+++ b/xen/arch/x86/boot/x86_64.S
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/boot/x86_64.S
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/boot/x86_64.S
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/boot/x86_64.S
|
||||
@@ -84,11 +84,13 @@ multiboot_ptr:
|
||||
.long 0
|
||||
|
||||
@ -204,8 +212,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
idt_descr:
|
||||
.word 256*16-1
|
||||
.quad idt_table
|
||||
--- a/xen/arch/x86/dmi_scan.c
|
||||
+++ b/xen/arch/x86/dmi_scan.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/dmi_scan.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/dmi_scan.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/dmi_scan.c
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <asm/io.h>
|
||||
#include <asm/system.h>
|
||||
@ -305,8 +315,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
dmi_check_system(dmi_blacklist);
|
||||
else
|
||||
printk(KERN_INFO "DMI not present.\n");
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/Makefile
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/arch/x86/efi/Makefile
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/Makefile
|
||||
@@ -0,0 +1,17 @@
|
||||
+CFLAGS += -fshort-wchar -mno-sse
|
||||
+
|
||||
@ -325,8 +337,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+clean::
|
||||
+ rm -f disabled *.efi
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/boot.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/arch/x86/efi/boot.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/boot.c
|
||||
@@ -0,0 +1,1221 @@
|
||||
+#include "efi.h"
|
||||
+#include <efi/efiprot.h>
|
||||
@ -1549,15 +1563,19 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+ mdesc_ver, efi_memmap);
|
||||
+#endif
|
||||
+}
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/check.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/arch/x86/efi/check.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/check.c
|
||||
@@ -0,0 +1,4 @@
|
||||
+int __attribute__((__ms_abi__)) test(int i)
|
||||
+{
|
||||
+ return i;
|
||||
+}
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/compat.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/arch/x86/efi/compat.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/compat.c
|
||||
@@ -0,0 +1,16 @@
|
||||
+#include <xen/guest_access.h>
|
||||
+#include <compat/platform.h>
|
||||
@ -1575,8 +1593,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+#undef __copy_to_guest_offset
|
||||
+#define __copy_to_guest_offset __copy_to_compat_offset
|
||||
+#include "runtime.c"
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/efi.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/arch/x86/efi/efi.h
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/efi.h
|
||||
@@ -0,0 +1,18 @@
|
||||
+#include <asm/efibind.h>
|
||||
+#include <efi/efidef.h>
|
||||
@ -1596,8 +1616,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+extern UINTN efi_memmap_size, efi_mdesc_size;
|
||||
+extern void *efi_memmap;
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/mkreloc.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/arch/x86/efi/mkreloc.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/mkreloc.c
|
||||
@@ -0,0 +1,377 @@
|
||||
+#include <fcntl.h>
|
||||
+#include <inttypes.h>
|
||||
@ -1976,8 +1998,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/relocs-dummy.S
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/arch/x86/efi/relocs-dummy.S
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/relocs-dummy.S
|
||||
@@ -0,0 +1,13 @@
|
||||
+#include <xen/config.h>
|
||||
+
|
||||
@ -1992,8 +2016,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+ .globl VIRT_START, ALT_START
|
||||
+ .equ VIRT_START, XEN_VIRT_START
|
||||
+ .equ ALT_START, XEN_VIRT_END
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/runtime.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/arch/x86/efi/runtime.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/runtime.c
|
||||
@@ -0,0 +1,88 @@
|
||||
+#include "efi.h"
|
||||
+#include <xen/cache.h>
|
||||
@ -2083,8 +2109,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/stub.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/arch/x86/efi/stub.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/stub.c
|
||||
@@ -0,0 +1,17 @@
|
||||
+#include <xen/efi.h>
|
||||
+#include <xen/errno.h>
|
||||
@ -2103,8 +2131,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
|
||||
+ __attribute__((__alias__("efi_get_info")));
|
||||
--- a/xen/arch/x86/mm.c
|
||||
+++ b/xen/arch/x86/mm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
@@ -100,6 +100,7 @@
|
||||
#include <xen/iocap.h>
|
||||
#include <xen/guest_access.h>
|
||||
@ -2122,8 +2152,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
mem_sharing_init();
|
||||
}
|
||||
|
||||
--- a/xen/arch/x86/platform_hypercall.c
|
||||
+++ b/xen/arch/x86/platform_hypercall.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/platform_hypercall.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/platform_hypercall.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/platform_hypercall.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <xen/iocap.h>
|
||||
#include <xen/guest_access.h>
|
||||
@ -2147,8 +2179,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
--- a/xen/arch/x86/setup.c
|
||||
+++ b/xen/arch/x86/setup.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/setup.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/setup.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/setup.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <xen/serial.h>
|
||||
#include <xen/softirq.h>
|
||||
@ -2229,8 +2263,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#endif
|
||||
|
||||
/* Late kexec reservation (dynamic start address). */
|
||||
--- a/xen/arch/x86/x86_32/mm.c
|
||||
+++ b/xen/arch/x86/x86_32/mm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/x86_32/mm.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/x86_32/mm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/x86_32/mm.c
|
||||
@@ -34,8 +34,6 @@
|
||||
l2_pgentry_t __attribute__ ((__section__ (".bss.page_aligned")))
|
||||
idle_pg_table_l2[4 * L2_PAGETABLE_ENTRIES];
|
||||
@ -2240,8 +2276,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
unsigned int __read_mostly PAGE_HYPERVISOR = __PAGE_HYPERVISOR;
|
||||
unsigned int __read_mostly PAGE_HYPERVISOR_NOCACHE = __PAGE_HYPERVISOR_NOCACHE;
|
||||
|
||||
--- a/xen/arch/x86/x86_64/mm.c
|
||||
+++ b/xen/arch/x86/x86_64/mm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/x86_64/mm.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/x86_64/mm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/x86_64/mm.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <xen/lib.h>
|
||||
#include <xen/init.h>
|
||||
@ -2260,8 +2298,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
}
|
||||
|
||||
void *compat_arg_xlat_virt_base(void)
|
||||
--- a/xen/arch/x86/x86_64/platform_hypercall.c
|
||||
+++ b/xen/arch/x86/x86_64/platform_hypercall.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/x86_64/platform_hypercall.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/x86_64/platform_hypercall.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/x86_64/platform_hypercall.c
|
||||
@@ -11,6 +11,8 @@ DEFINE_XEN_GUEST_HANDLE(compat_platform_
|
||||
#define xen_platform_op_t compat_platform_op_t
|
||||
#define do_platform_op(x) compat_platform_op(_##x)
|
||||
@ -2271,8 +2311,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#define xen_processor_px compat_processor_px
|
||||
#define xen_processor_px_t compat_processor_px_t
|
||||
#define xen_processor_performance compat_processor_performance
|
||||
--- a/xen/arch/x86/xen.lds.S
|
||||
+++ b/xen/arch/x86/xen.lds.S
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/xen.lds.S
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/xen.lds.S
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/xen.lds.S
|
||||
@@ -8,15 +8,34 @@
|
||||
#undef ENTRY
|
||||
#undef ALIGN
|
||||
@ -2342,8 +2384,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
}
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
--- a/xen/drivers/acpi/osl.c
|
||||
+++ b/xen/drivers/acpi/osl.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/acpi/osl.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/acpi/osl.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/acpi/osl.c
|
||||
@@ -37,9 +37,7 @@
|
||||
#include <acpi/platform/aclinux.h>
|
||||
#include <xen/spinlock.h>
|
||||
@ -2374,8 +2418,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
acpi_physical_address pa = 0;
|
||||
|
||||
acpi_find_root_pointer(&pa);
|
||||
--- a/xen/drivers/video/vga.c
|
||||
+++ b/xen/drivers/video/vga.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/video/vga.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/video/vga.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/video/vga.c
|
||||
@@ -89,6 +89,7 @@ void __init vga_init(void)
|
||||
vga_puts = vga_text_puts;
|
||||
break;
|
||||
@ -2392,8 +2438,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
vesa_endboot(vgacon_keep);
|
||||
break;
|
||||
default:
|
||||
--- a/xen/include/asm-x86/page.h
|
||||
+++ b/xen/include/asm-x86/page.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/page.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/page.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/page.h
|
||||
@@ -301,8 +301,14 @@ extern l2_pgentry_t idle_pg_table_l2[
|
||||
#elif CONFIG_PAGING_LEVELS == 4
|
||||
extern l2_pgentry_t *compat_idle_pg_table_l2;
|
||||
@ -2409,8 +2457,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
void paging_init(void);
|
||||
void setup_idle_pagetable(void);
|
||||
#endif /* !defined(__ASSEMBLY__) */
|
||||
--- a/xen/include/public/platform.h
|
||||
+++ b/xen/include/public/platform.h
|
||||
Index: xen-4.1.2-testing/xen/include/public/platform.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/public/platform.h
|
||||
+++ xen-4.1.2-testing/xen/include/public/platform.h
|
||||
@@ -118,6 +118,11 @@ DEFINE_XEN_GUEST_HANDLE(xenpf_platform_q
|
||||
#define XEN_FW_DISK_INFO 1 /* from int 13 AH=08/41/48 */
|
||||
#define XEN_FW_DISK_MBR_SIGNATURE 2 /* from MBR offset 0x1b8 */
|
||||
@ -2448,8 +2498,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
} u;
|
||||
};
|
||||
typedef struct xenpf_firmware_info xenpf_firmware_info_t;
|
||||
--- a/xen/include/public/xen.h
|
||||
+++ b/xen/include/public/xen.h
|
||||
Index: xen-4.1.2-testing/xen/include/public/xen.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/public/xen.h
|
||||
+++ xen-4.1.2-testing/xen/include/public/xen.h
|
||||
@@ -638,6 +638,7 @@ typedef struct dom0_vga_console_info {
|
||||
uint8_t video_type; /* DOM0_VGA_CONSOLE_??? */
|
||||
#define XEN_VGATYPE_TEXT_MODE_3 0x03
|
||||
@ -2458,8 +2510,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
union {
|
||||
struct {
|
||||
--- a/xen/include/xen/compat.h
|
||||
+++ b/xen/include/xen/compat.h
|
||||
Index: xen-4.1.2-testing/xen/include/xen/compat.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/compat.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/compat.h
|
||||
@@ -34,7 +34,7 @@
|
||||
/* Cast a compat handle to the specified type of handle. */
|
||||
#define compat_handle_cast(chnd, type) ({ \
|
||||
@ -2469,8 +2523,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
})
|
||||
|
||||
#define guest_from_compat_handle(ghnd, chnd) \
|
||||
--- a/xen/include/xen/dmi.h
|
||||
+++ b/xen/include/xen/dmi.h
|
||||
Index: xen-4.1.2-testing/xen/include/xen/dmi.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/dmi.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/dmi.h
|
||||
@@ -36,5 +36,6 @@ extern int dmi_check_system(struct dmi_s
|
||||
extern char * dmi_get_system_info(int field);
|
||||
extern void dmi_scan_machine(void);
|
||||
@ -2478,8 +2534,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+extern void dmi_efi_get_table(void *);
|
||||
|
||||
#endif /* __DMI_H__ */
|
||||
Index: xen-4.1.2-testing/xen/include/xen/efi.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ b/xen/include/xen/efi.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/efi.h
|
||||
@@ -0,0 +1,38 @@
|
||||
+#ifndef __XEN_EFI_H__
|
||||
+#define __XEN_EFI_H__
|
||||
|
@ -44,8 +44,10 @@ through efi_halt_system()) does.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/efi/boot.c
|
||||
+++ b/xen/arch/x86/efi/boot.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/boot.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/efi/boot.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/boot.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <xen/stringify.h>
|
||||
#include <xen/vga.h>
|
||||
@ -157,8 +159,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+ efi_l4_pgtable[i] = idle_pg_table[i];
|
||||
#endif
|
||||
}
|
||||
--- a/xen/arch/x86/efi/compat.c
|
||||
+++ b/xen/arch/x86/efi/compat.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/compat.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/efi/compat.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/compat.c
|
||||
@@ -4,13 +4,27 @@
|
||||
#define efi_get_info efi_compat_get_info
|
||||
#define xenpf_efi_info compat_pf_efi_info
|
||||
@ -187,8 +191,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#undef __copy_to_guest_offset
|
||||
#define __copy_to_guest_offset __copy_to_compat_offset
|
||||
#include "runtime.c"
|
||||
--- a/xen/arch/x86/efi/efi.h
|
||||
+++ b/xen/arch/x86/efi/efi.h
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/efi.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/efi/efi.h
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/efi.h
|
||||
@@ -5,6 +5,8 @@
|
||||
#include <efi/efidevp.h>
|
||||
#include <efi/efiapi.h>
|
||||
@ -207,8 +213,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+unsigned long efi_rs_enter(void);
|
||||
+void efi_rs_leave(unsigned long);
|
||||
--- a/xen/arch/x86/efi/runtime.c
|
||||
+++ b/xen/arch/x86/efi/runtime.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/runtime.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/efi/runtime.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/runtime.c
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <xen/cache.h>
|
||||
#include <xen/errno.h>
|
||||
@ -582,8 +590,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+ return rc;
|
||||
+}
|
||||
--- a/xen/arch/x86/efi/stub.c
|
||||
+++ b/xen/arch/x86/efi/stub.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/stub.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/efi/stub.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/stub.c
|
||||
@@ -1,6 +1,7 @@
|
||||
#include <xen/efi.h>
|
||||
#include <xen/errno.h>
|
||||
@ -620,8 +630,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
|
||||
+ __attribute__((__alias__("efi_runtime_call")));
|
||||
--- a/xen/arch/x86/platform_hypercall.c
|
||||
+++ b/xen/arch/x86/platform_hypercall.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/platform_hypercall.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/platform_hypercall.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/platform_hypercall.c
|
||||
@@ -309,6 +309,17 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
|
||||
}
|
||||
break;
|
||||
@ -640,8 +652,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
case XENPF_enter_acpi_sleep:
|
||||
ret = xsm_acpi_sleep();
|
||||
if ( ret )
|
||||
--- a/xen/arch/x86/shutdown.c
|
||||
+++ b/xen/arch/x86/shutdown.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/shutdown.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/shutdown.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/shutdown.c
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <xen/console.h>
|
||||
#include <xen/shutdown.h>
|
||||
@ -659,8 +673,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
/* Rebooting needs to touch the page at absolute address 0. */
|
||||
*((unsigned short *)__va(0x472)) = reboot_mode;
|
||||
|
||||
--- a/xen/arch/x86/time.c
|
||||
+++ b/xen/arch/x86/time.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/time.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/time.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/time.c
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <xen/smp.h>
|
||||
#include <xen/irq.h>
|
||||
@ -683,8 +699,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
spin_lock_irqsave(&rtc_lock, flags);
|
||||
|
||||
/* read RTC exactly on falling edge of update flag */
|
||||
--- a/xen/arch/x86/x86_64/platform_hypercall.c
|
||||
+++ b/xen/arch/x86/x86_64/platform_hypercall.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/x86_64/platform_hypercall.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/x86_64/platform_hypercall.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/x86_64/platform_hypercall.c
|
||||
@@ -12,6 +12,7 @@ DEFINE_XEN_GUEST_HANDLE(compat_platform_
|
||||
#define do_platform_op(x) compat_platform_op(_##x)
|
||||
|
||||
@ -693,8 +711,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
#define xen_processor_px compat_processor_px
|
||||
#define xen_processor_px_t compat_processor_px_t
|
||||
--- a/xen/include/public/platform.h
|
||||
+++ b/xen/include/public/platform.h
|
||||
Index: xen-4.1.2-testing/xen/include/public/platform.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/public/platform.h
|
||||
+++ xen-4.1.2-testing/xen/include/public/platform.h
|
||||
@@ -114,6 +114,77 @@ struct xenpf_platform_quirk {
|
||||
typedef struct xenpf_platform_quirk xenpf_platform_quirk_t;
|
||||
DEFINE_XEN_GUEST_HANDLE(xenpf_platform_quirk_t);
|
||||
@ -781,8 +801,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
struct xenpf_firmware_info firmware_info;
|
||||
struct xenpf_enter_acpi_sleep enter_acpi_sleep;
|
||||
struct xenpf_change_freq change_freq;
|
||||
--- a/xen/include/xen/efi.h
|
||||
+++ b/xen/include/xen/efi.h
|
||||
Index: xen-4.1.2-testing/xen/include/xen/efi.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/efi.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/efi.h
|
||||
@@ -29,10 +29,18 @@ extern struct efi efi;
|
||||
union xenpf_efi_info;
|
||||
union compat_pf_efi_info;
|
||||
@ -802,8 +824,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *);
|
||||
|
||||
#endif /* __XEN_EFI_H__ */
|
||||
--- a/xen/include/xsm/xsm.h
|
||||
+++ b/xen/include/xsm/xsm.h
|
||||
Index: xen-4.1.2-testing/xen/include/xsm/xsm.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xsm/xsm.h
|
||||
+++ xen-4.1.2-testing/xen/include/xsm/xsm.h
|
||||
@@ -131,6 +131,7 @@ struct xsm_operations {
|
||||
int (*physinfo) (void);
|
||||
int (*platform_quirk) (uint32_t);
|
||||
|
@ -21,8 +21,10 @@ x86_32: Fix build after EFI MPS patch.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/efi/boot.c
|
||||
+++ b/xen/arch/x86/efi/boot.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/boot.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/efi/boot.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/boot.c
|
||||
@@ -897,12 +897,15 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SY
|
||||
{
|
||||
static EFI_GUID __initdata acpi2_guid = ACPI_20_TABLE_GUID;
|
||||
@ -39,8 +41,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
if ( match_guid(&smbios_guid, &efi_ct[i].VendorGuid) )
|
||||
efi.smbios = (long)efi_ct[i].VendorTable;
|
||||
}
|
||||
--- a/xen/arch/x86/efi/runtime.c
|
||||
+++ b/xen/arch/x86/efi/runtime.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/runtime.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/efi/runtime.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/runtime.c
|
||||
@@ -29,6 +29,7 @@ void *__read_mostly efi_memmap;
|
||||
struct efi __read_mostly efi = {
|
||||
.acpi = EFI_INVALID_TABLE_ADDR,
|
||||
@ -49,8 +53,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
.smbios = EFI_INVALID_TABLE_ADDR,
|
||||
};
|
||||
|
||||
--- a/xen/arch/x86/mpparse.c
|
||||
+++ b/xen/arch/x86/mpparse.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mpparse.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mpparse.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mpparse.c
|
||||
@@ -19,6 +19,8 @@
|
||||
#include <xen/init.h>
|
||||
#include <xen/acpi.h>
|
||||
@ -83,7 +89,7 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
printk(KERN_INFO "Using ACPI (MADT) for SMP configuration information\n");
|
||||
return;
|
||||
}
|
||||
@@ -699,6 +709,7 @@ void __init get_smp_config (void)
|
||||
@@ -699,6 +710,7 @@ void __init get_smp_config (void)
|
||||
* override the defaults.
|
||||
*/
|
||||
if (!smp_read_mpc((void *)(unsigned long)mpf->mpf_physptr)) {
|
||||
@ -138,8 +144,10 @@ Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
/*
|
||||
* FIXME: Linux assumes you have 640K of base ram..
|
||||
* this continues the error...
|
||||
--- a/xen/include/xen/efi.h
|
||||
+++ b/xen/include/xen/efi.h
|
||||
Index: xen-4.1.2-testing/xen/include/xen/efi.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/efi.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/efi.h
|
||||
@@ -17,6 +17,7 @@ extern const bool_t efi_enabled;
|
||||
|
||||
/* Add fields here only if they need to be referenced from non-EFI code. */
|
||||
|
@ -14,9 +14,11 @@ other pages beyond _end when checking for aliases.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/mm.c
|
||||
+++ b/xen/arch/x86/mm.c
|
||||
@@ -776,7 +776,7 @@ static int update_xen_mappings(unsigned
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
@@ -776,7 +776,7 @@ static int update_xen_mappings(unsigned
|
||||
int err = 0;
|
||||
#ifdef __x86_64__
|
||||
bool_t alias = mfn >= PFN_DOWN(xen_phys_start) &&
|
||||
@ -25,8 +27,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
unsigned long xen_va =
|
||||
XEN_VIRT_START + ((mfn - PFN_DOWN(xen_phys_start)) << PAGE_SHIFT);
|
||||
|
||||
--- a/xen/arch/x86/setup.c
|
||||
+++ b/xen/arch/x86/setup.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/setup.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/setup.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/setup.c
|
||||
@@ -99,6 +99,8 @@ unsigned long __read_mostly xen_phys_sta
|
||||
/* Limits of Xen heap, used to initialise the allocator. */
|
||||
unsigned long __initdata xenheap_initial_phys_start;
|
||||
@ -46,8 +50,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#endif
|
||||
|
||||
memguard_init();
|
||||
--- a/xen/include/asm-x86/x86_64/page.h
|
||||
+++ b/xen/include/asm-x86/x86_64/page.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/x86_64/page.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/x86_64/page.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/x86_64/page.h
|
||||
@@ -34,6 +34,8 @@
|
||||
#include <xen/config.h>
|
||||
#include <asm/types.h>
|
||||
|
@ -16,10 +16,10 @@ want to add a new pci device to the array.
|
||||
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
|
||||
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
||||
|
||||
Index: xen-4.1.1-testing/tools/libxl/libxl_pci.c
|
||||
Index: xen-4.1.2-testing/tools/libxl/libxl_pci.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/libxl/libxl_pci.c
|
||||
+++ xen-4.1.1-testing/tools/libxl/libxl_pci.c
|
||||
--- xen-4.1.2-testing.orig/tools/libxl/libxl_pci.c
|
||||
+++ xen-4.1.2-testing/tools/libxl/libxl_pci.c
|
||||
@@ -434,7 +434,6 @@ retry_transaction2:
|
||||
|
||||
static int get_all_assigned_devices(libxl__gc *gc, libxl_device_pci **list, int *num)
|
||||
|
@ -1,28 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Jan Beulich <jbeulich@novell.com>
|
||||
# Date 1310804301 -3600
|
||||
# Node ID 3dd399873c9ef7762f4353f3259e502394f56a34
|
||||
# Parent 24e9ca968a2bc09d1aac927fcdbb7b769901d067
|
||||
x86: fix guest migration after c/s 20892:d311d1efc25e
|
||||
|
||||
Guests would not manage to run successfully after being migrated to a
|
||||
host having sufficiently much more memory than the host they were
|
||||
originally started on.
|
||||
|
||||
Subsequently the plan is to re-enable the changes behavior under the
|
||||
control of a guest kernel announced feature flag.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
Acked-by: Ian Campbell <ian.campbell@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/mm.c
|
||||
+++ b/xen/arch/x86/mm.c
|
||||
@@ -4791,7 +4791,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
|
||||
.max_mfn = MACH2PHYS_NR_ENTRIES - 1
|
||||
};
|
||||
|
||||
- if ( !mem_hotplug )
|
||||
+ if ( !mem_hotplug && current->domain == dom0 )
|
||||
mapping.max_mfn = max_page - 1;
|
||||
if ( copy_to_guest(arg, &mapping, 1) )
|
||||
return -EFAULT;
|
@ -18,8 +18,10 @@ for PCI config space method 1 accesses.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/efi/runtime.c
|
||||
+++ b/xen/arch/x86/efi/runtime.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/runtime.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/efi/runtime.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/runtime.c
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <xen/errno.h>
|
||||
#include <xen/guest_access.h>
|
||||
@ -96,8 +98,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
efi_rs_leave(cr3);
|
||||
|
||||
op->misc = 0;
|
||||
--- a/xen/arch/x86/hpet.c
|
||||
+++ b/xen/arch/x86/hpet.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hpet.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hpet.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hpet.c
|
||||
@@ -525,18 +525,10 @@ static void hpet_detach_channel(int cpu,
|
||||
|
||||
#include <asm/mc146818rtc.h>
|
||||
@ -119,8 +123,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
if ( index != RTC_REG_B )
|
||||
return;
|
||||
|
||||
--- a/xen/arch/x86/traps.c
|
||||
+++ b/xen/arch/x86/traps.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/traps.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/traps.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/traps.c
|
||||
@@ -67,6 +67,8 @@
|
||||
#include <asm/hypercall.h>
|
||||
#include <asm/mce.h>
|
||||
@ -130,7 +136,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#include <public/arch-x86/cpuid.h>
|
||||
|
||||
/*
|
||||
@@ -1620,6 +1622,10 @@ static int admin_io_okay(
|
||||
@@ -1629,6 +1631,10 @@ static int admin_io_okay(
|
||||
if ( (port == 0xcf8) && (bytes == 4) )
|
||||
return 0;
|
||||
|
||||
@ -141,7 +147,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
return ioports_access_permitted(v->domain, port, port + bytes - 1);
|
||||
}
|
||||
|
||||
@@ -1649,6 +1655,21 @@ static uint32_t guest_io_read(
|
||||
@@ -1658,6 +1664,21 @@ static uint32_t guest_io_read(
|
||||
{
|
||||
sub_data = pv_pit_handler(port, 0, 0);
|
||||
}
|
||||
@ -163,7 +169,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
else if ( (port == 0xcf8) && (bytes == 4) )
|
||||
{
|
||||
size = 4;
|
||||
@@ -1674,8 +1695,6 @@ static uint32_t guest_io_read(
|
||||
@@ -1683,8 +1704,6 @@ static uint32_t guest_io_read(
|
||||
return data;
|
||||
}
|
||||
|
||||
@ -172,7 +178,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
static void guest_io_write(
|
||||
unsigned int port, unsigned int bytes, uint32_t data,
|
||||
struct vcpu *v, struct cpu_user_regs *regs)
|
||||
@@ -1684,8 +1703,6 @@ static void guest_io_write(
|
||||
@@ -1693,8 +1712,6 @@ static void guest_io_write(
|
||||
{
|
||||
switch ( bytes ) {
|
||||
case 1:
|
||||
@ -181,7 +187,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
outb((uint8_t)data, port);
|
||||
if ( pv_post_outb_hook )
|
||||
pv_post_outb_hook(port, (uint8_t)data);
|
||||
@@ -1708,6 +1725,23 @@ static void guest_io_write(
|
||||
@@ -1717,6 +1734,23 @@ static void guest_io_write(
|
||||
{
|
||||
pv_pit_handler(port, (uint8_t)data, 1);
|
||||
}
|
||||
@ -205,7 +211,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
else if ( (port == 0xcf8) && (bytes == 4) )
|
||||
{
|
||||
size = 4;
|
||||
@@ -2073,10 +2107,6 @@ static int emulate_privileged_op(struct
|
||||
@@ -2082,10 +2116,6 @@ static int emulate_privileged_op(struct
|
||||
goto fail;
|
||||
if ( admin_io_okay(port, op_bytes, v, regs) )
|
||||
{
|
||||
@ -216,8 +222,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
io_emul(regs);
|
||||
if ( (op_bytes == 1) && pv_post_outb_hook )
|
||||
pv_post_outb_hook(port, regs->eax);
|
||||
--- a/xen/include/asm-x86/domain.h
|
||||
+++ b/xen/include/asm-x86/domain.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/domain.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/domain.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/domain.h
|
||||
@@ -251,6 +251,7 @@ struct arch_domain
|
||||
/* I/O-port admin-specified access capabilities. */
|
||||
struct rangeset *ioport_caps;
|
||||
@ -226,8 +234,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
struct list_head pdev_list;
|
||||
struct hvm_domain hvm_domain;
|
||||
--- a/xen/include/asm-x86/hpet.h
|
||||
+++ b/xen/include/asm-x86/hpet.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/hpet.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/hpet.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/hpet.h
|
||||
@@ -52,6 +52,7 @@
|
||||
#define HPET_TN_FSB_CAP 0x8000
|
||||
#define HPET_TN_ROUTE_SHIFT 9
|
||||
@ -236,8 +246,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
#define hpet_read32(x) \
|
||||
(*(volatile u32 *)(fix_to_virt(FIX_HPET_BASE) + (x)))
|
||||
--- a/xen/include/asm-x86/mach-default/smpboot_hooks.h
|
||||
+++ b/xen/include/asm-x86/mach-default/smpboot_hooks.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/mach-default/smpboot_hooks.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/mach-default/smpboot_hooks.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/mach-default/smpboot_hooks.h
|
||||
@@ -3,7 +3,11 @@
|
||||
|
||||
static inline void smpboot_setup_warm_reset_vector(unsigned long start_eip)
|
||||
|
@ -12,9 +12,11 @@ removing them makes AP bringup much more reliable on some test boxes.
|
||||
|
||||
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/smpboot.c
|
||||
+++ b/xen/arch/x86/smpboot.c
|
||||
@@ -448,29 +448,30 @@ static int wakeup_secondary_cpu(int phys
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/smpboot.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/smpboot.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/smpboot.c
|
||||
@@ -447,29 +447,30 @@ static int wakeup_secondary_cpu(int phys
|
||||
apic_icr_write(APIC_INT_LEVELTRIG | APIC_INT_ASSERT | APIC_DM_INIT,
|
||||
phys_apicid);
|
||||
|
||||
@ -62,20 +64,15 @@ Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
|
||||
|
||||
/*
|
||||
* Should we send STARTUP IPIs ?
|
||||
@@ -499,22 +500,24 @@ static int wakeup_secondary_cpu(int phys
|
||||
@@ -498,22 +499,24 @@ static int wakeup_secondary_cpu(int phys
|
||||
*/
|
||||
apic_icr_write(APIC_DM_STARTUP | (start_eip >> 12), phys_apicid);
|
||||
|
||||
- /* Give the other CPU some time to accept the IPI. */
|
||||
- udelay(300);
|
||||
+ if ( !x2apic_enabled )
|
||||
+ {
|
||||
+ /* Give the other CPU some time to accept the IPI. */
|
||||
+ udelay(300);
|
||||
|
||||
-
|
||||
- Dprintk("Startup point 1.\n");
|
||||
+ Dprintk("Startup point 1.\n");
|
||||
|
||||
-
|
||||
- Dprintk("Waiting for send to finish...\n");
|
||||
- timeout = 0;
|
||||
- do {
|
||||
@ -84,6 +81,16 @@ Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
|
||||
- if ( !x2apic_enabled )
|
||||
- send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY;
|
||||
- } while ( send_status && (timeout++ < 1000) );
|
||||
-
|
||||
- /* Give the other CPU some time to accept the IPI. */
|
||||
- udelay(200);
|
||||
+ if ( !x2apic_enabled )
|
||||
+ {
|
||||
+ /* Give the other CPU some time to accept the IPI. */
|
||||
+ udelay(300);
|
||||
+
|
||||
+ Dprintk("Startup point 1.\n");
|
||||
+
|
||||
+ Dprintk("Waiting for send to finish...\n");
|
||||
+ timeout = 0;
|
||||
+ do {
|
||||
@ -91,9 +98,7 @@ Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
|
||||
+ udelay(100);
|
||||
+ send_status = apic_read(APIC_ICR) & APIC_ICR_BUSY;
|
||||
+ } while ( send_status && (timeout++ < 1000) );
|
||||
|
||||
- /* Give the other CPU some time to accept the IPI. */
|
||||
- udelay(200);
|
||||
+
|
||||
+ /* Give the other CPU some time to accept the IPI. */
|
||||
+ udelay(200);
|
||||
+ }
|
||||
|
@ -1,174 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Jan Beulich <jbeulich@novell.com>
|
||||
# Date 1311081248 -3600
|
||||
# Node ID 4dc6a9ba90d60fdf0cc0898fc9a8fe84ae9030fc
|
||||
# Parent b3434f24b0827c5ef34e4b4a72893288e2ffbe40
|
||||
PCI: consolidate interface for adding devices
|
||||
|
||||
The functionality of pci_add_device_ext() can be easily folded into
|
||||
pci_add_device(), and eliminates the need to change two functions for
|
||||
future adjustments.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/ia64/xen/hypercall.c
|
||||
+++ b/xen/arch/ia64/xen/hypercall.c
|
||||
@@ -662,8 +662,8 @@ long do_physdev_op(int cmd, XEN_GUEST_HA
|
||||
if ( copy_from_guest(&manage_pci, arg, 1) != 0 )
|
||||
break;
|
||||
|
||||
- ret = pci_add_device(manage_pci.bus, manage_pci.devfn);
|
||||
- break;
|
||||
+ ret = pci_add_device(manage_pci.bus, manage_pci.devfn, NULL);
|
||||
+ break;
|
||||
}
|
||||
|
||||
case PHYSDEVOP_manage_pci_remove: {
|
||||
@@ -695,10 +695,10 @@ long do_physdev_op(int cmd, XEN_GUEST_HA
|
||||
pdev_info.is_virtfn = manage_pci_ext.is_virtfn;
|
||||
pdev_info.physfn.bus = manage_pci_ext.physfn.bus;
|
||||
pdev_info.physfn.devfn = manage_pci_ext.physfn.devfn;
|
||||
- ret = pci_add_device_ext(manage_pci_ext.bus,
|
||||
- manage_pci_ext.devfn,
|
||||
- &pdev_info);
|
||||
- break;
|
||||
+ ret = pci_add_device(manage_pci_ext.bus,
|
||||
+ manage_pci_ext.devfn,
|
||||
+ &pdev_info);
|
||||
+ break;
|
||||
}
|
||||
|
||||
default:
|
||||
--- a/xen/arch/x86/physdev.c
|
||||
+++ b/xen/arch/x86/physdev.c
|
||||
@@ -472,7 +472,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
|
||||
if ( copy_from_guest(&manage_pci, arg, 1) != 0 )
|
||||
break;
|
||||
|
||||
- ret = pci_add_device(manage_pci.bus, manage_pci.devfn);
|
||||
+ ret = pci_add_device(manage_pci.bus, manage_pci.devfn, NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -509,9 +509,9 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
|
||||
pdev_info.is_virtfn = manage_pci_ext.is_virtfn;
|
||||
pdev_info.physfn.bus = manage_pci_ext.physfn.bus;
|
||||
pdev_info.physfn.devfn = manage_pci_ext.physfn.devfn;
|
||||
- ret = pci_add_device_ext(manage_pci_ext.bus,
|
||||
- manage_pci_ext.devfn,
|
||||
- &pdev_info);
|
||||
+ ret = pci_add_device(manage_pci_ext.bus,
|
||||
+ manage_pci_ext.devfn,
|
||||
+ &pdev_info);
|
||||
break;
|
||||
}
|
||||
|
||||
--- a/xen/drivers/passthrough/pci.c
|
||||
+++ b/xen/drivers/passthrough/pci.c
|
||||
@@ -142,16 +142,29 @@ void pci_enable_acs(struct pci_dev *pdev
|
||||
pci_conf_write16(bus, dev, func, pos + PCI_ACS_CTRL, ctrl);
|
||||
}
|
||||
|
||||
-int pci_add_device(u8 bus, u8 devfn)
|
||||
+int pci_add_device(u8 bus, u8 devfn, const struct pci_dev_info *info)
|
||||
{
|
||||
struct pci_dev *pdev;
|
||||
+ const char *pdev_type;
|
||||
int ret = -ENOMEM;
|
||||
|
||||
+ if (!info)
|
||||
+ pdev_type = "device";
|
||||
+ else if (info->is_extfn)
|
||||
+ pdev_type = "extended function";
|
||||
+ else if (info->is_virtfn)
|
||||
+ pdev_type = "virtual function";
|
||||
+ else
|
||||
+ return -EINVAL;
|
||||
+
|
||||
spin_lock(&pcidevs_lock);
|
||||
pdev = alloc_pdev(bus, devfn);
|
||||
if ( !pdev )
|
||||
goto out;
|
||||
|
||||
+ if ( info )
|
||||
+ pdev->info = *info;
|
||||
+
|
||||
ret = 0;
|
||||
if ( !pdev->domain )
|
||||
{
|
||||
@@ -169,8 +182,8 @@ int pci_add_device(u8 bus, u8 devfn)
|
||||
|
||||
out:
|
||||
spin_unlock(&pcidevs_lock);
|
||||
- printk(XENLOG_DEBUG "PCI add device %02x:%02x.%x\n", bus,
|
||||
- PCI_SLOT(devfn), PCI_FUNC(devfn));
|
||||
+ printk(XENLOG_DEBUG "PCI add %s %02x:%02x.%x\n", pdev_type,
|
||||
+ bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -197,51 +210,6 @@ int pci_remove_device(u8 bus, u8 devfn)
|
||||
return ret;
|
||||
}
|
||||
|
||||
-int pci_add_device_ext(u8 bus, u8 devfn, struct pci_dev_info *info)
|
||||
-{
|
||||
- int ret;
|
||||
- char *pdev_type;
|
||||
- struct pci_dev *pdev;
|
||||
-
|
||||
- if (info->is_extfn)
|
||||
- pdev_type = "Extended Function";
|
||||
- else if (info->is_virtfn)
|
||||
- pdev_type = "Virtual Function";
|
||||
- else
|
||||
- return -EINVAL;
|
||||
-
|
||||
-
|
||||
- ret = -ENOMEM;
|
||||
- spin_lock(&pcidevs_lock);
|
||||
- pdev = alloc_pdev(bus, devfn);
|
||||
- if ( !pdev )
|
||||
- goto out;
|
||||
-
|
||||
- pdev->info = *info;
|
||||
-
|
||||
- ret = 0;
|
||||
- if ( !pdev->domain )
|
||||
- {
|
||||
- pdev->domain = dom0;
|
||||
- ret = iommu_add_device(pdev);
|
||||
- if ( ret )
|
||||
- {
|
||||
- pdev->domain = NULL;
|
||||
- goto out;
|
||||
- }
|
||||
-
|
||||
- list_add(&pdev->domain_list, &dom0->arch.pdev_list);
|
||||
- pci_enable_acs(pdev);
|
||||
- }
|
||||
-
|
||||
-out:
|
||||
- spin_unlock(&pcidevs_lock);
|
||||
- printk(XENLOG_DEBUG "PCI add %s %02x:%02x.%x\n", pdev_type,
|
||||
- bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
|
||||
-
|
||||
- return ret;
|
||||
-}
|
||||
-
|
||||
static void pci_clean_dpci_irqs(struct domain *d)
|
||||
{
|
||||
struct hvm_irq_dpci *hvm_irq_dpci = NULL;
|
||||
--- a/xen/include/xen/pci.h
|
||||
+++ b/xen/include/xen/pci.h
|
||||
@@ -86,9 +86,8 @@ struct pci_dev *pci_lock_pdev(int bus, i
|
||||
struct pci_dev *pci_lock_domain_pdev(struct domain *d, int bus, int devfn);
|
||||
|
||||
void pci_release_devices(struct domain *d);
|
||||
-int pci_add_device(u8 bus, u8 devfn);
|
||||
+int pci_add_device(u8 bus, u8 devfn, const struct pci_dev_info *);
|
||||
int pci_remove_device(u8 bus, u8 devfn);
|
||||
-int pci_add_device_ext(u8 bus, u8 devfn, struct pci_dev_info *info);
|
||||
struct pci_dev *pci_get_pdev(int bus, int devfn);
|
||||
struct pci_dev *pci_get_pdev_by_domain(struct domain *d, int bus, int devfn);
|
||||
|
@ -1,128 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Jan Beulich <jbeulich@novell.com>
|
||||
# Date 1311081291 -3600
|
||||
# Node ID fd97ca086df6808bffc6ecf3f79cebca64c60bc3
|
||||
# Parent 4dc6a9ba90d60fdf0cc0898fc9a8fe84ae9030fc
|
||||
x86: update Intel CPUID masking code to latest spec
|
||||
|
||||
..., which adds masking of the xsave feature leaf.
|
||||
|
||||
Also add back (and fix to actually make it do what it was supposed to
|
||||
do from the beginning) the printing of what specific masking couldn't
|
||||
be done in case the user requested something the hardware doesn't
|
||||
support.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
# HG changeset patch
|
||||
# User Jan Beulich <jbeulich@novell.com>
|
||||
# Date 1311255291 -3600
|
||||
# Node ID 48f72b389b04cfa8d44924577a69ed59e48fbe77
|
||||
# Parent dd5eecf739d152fb16bd44897875ea878d4c9d59
|
||||
x86: add change missing in c/s 23726:fd97ca086df6
|
||||
|
||||
The early "do we need to do anything" check needs adjustment, too.
|
||||
Thanks to Haitao Shan for pointing this out.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/cpu/common.c
|
||||
+++ b/xen/arch/x86/cpu/common.c
|
||||
@@ -27,10 +27,15 @@ boolean_param("noserialnumber", disable_
|
||||
|
||||
static bool_t __cpuinitdata use_xsave;
|
||||
boolean_param("xsave", use_xsave);
|
||||
+
|
||||
unsigned int __devinitdata opt_cpuid_mask_ecx = ~0u;
|
||||
integer_param("cpuid_mask_ecx", opt_cpuid_mask_ecx);
|
||||
unsigned int __devinitdata opt_cpuid_mask_edx = ~0u;
|
||||
integer_param("cpuid_mask_edx", opt_cpuid_mask_edx);
|
||||
+
|
||||
+unsigned int __devinitdata opt_cpuid_mask_xsave_eax = ~0u;
|
||||
+integer_param("cpuid_mask_xsave_eax", opt_cpuid_mask_xsave_eax);
|
||||
+
|
||||
unsigned int __devinitdata opt_cpuid_mask_ext_ecx = ~0u;
|
||||
integer_param("cpuid_mask_ext_ecx", opt_cpuid_mask_ext_ecx);
|
||||
unsigned int __devinitdata opt_cpuid_mask_ext_edx = ~0u;
|
||||
--- a/xen/arch/x86/cpu/cpu.h
|
||||
+++ b/xen/arch/x86/cpu/cpu.h
|
||||
@@ -22,6 +22,7 @@ struct cpu_dev {
|
||||
extern struct cpu_dev * cpu_devs [X86_VENDOR_NUM];
|
||||
|
||||
extern unsigned int opt_cpuid_mask_ecx, opt_cpuid_mask_edx;
|
||||
+extern unsigned int opt_cpuid_mask_xsave_eax;
|
||||
extern unsigned int opt_cpuid_mask_ext_ecx, opt_cpuid_mask_ext_edx;
|
||||
|
||||
extern int get_model_name(struct cpuinfo_x86 *c);
|
||||
--- a/xen/arch/x86/cpu/intel.c
|
||||
+++ b/xen/arch/x86/cpu/intel.c
|
||||
@@ -35,10 +35,12 @@ struct movsl_mask movsl_mask __read_most
|
||||
*/
|
||||
static void __devinit set_cpuidmask(const struct cpuinfo_x86 *c)
|
||||
{
|
||||
+ u32 eax, edx;
|
||||
const char *extra = "";
|
||||
|
||||
if (!~(opt_cpuid_mask_ecx & opt_cpuid_mask_edx &
|
||||
- opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx))
|
||||
+ opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx &
|
||||
+ opt_cpuid_mask_xsave_eax))
|
||||
return;
|
||||
|
||||
/* Only family 6 supports this feature */
|
||||
@@ -51,9 +53,12 @@ static void __devinit set_cpuidmask(cons
|
||||
wrmsr(MSR_INTEL_CPUID_FEATURE_MASK,
|
||||
opt_cpuid_mask_ecx,
|
||||
opt_cpuid_mask_edx);
|
||||
- if (!~(opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx))
|
||||
+ if (~(opt_cpuid_mask_ext_ecx & opt_cpuid_mask_ext_edx))
|
||||
+ extra = "extended ";
|
||||
+ else if (~opt_cpuid_mask_xsave_eax)
|
||||
+ extra = "xsave ";
|
||||
+ else
|
||||
return;
|
||||
- extra = "extended ";
|
||||
break;
|
||||
/*
|
||||
* CPU supports this feature if the processor signature meets the following:
|
||||
@@ -73,11 +78,25 @@ static void __devinit set_cpuidmask(cons
|
||||
wrmsr(MSR_INTEL_CPUID80000001_FEATURE_MASK,
|
||||
opt_cpuid_mask_ext_ecx,
|
||||
opt_cpuid_mask_ext_edx);
|
||||
+ if (!~opt_cpuid_mask_xsave_eax)
|
||||
+ return;
|
||||
+ extra = "xsave ";
|
||||
+ break;
|
||||
+ case 0x2a:
|
||||
+ wrmsr(MSR_INTEL_CPUID1_FEATURE_MASK_V2,
|
||||
+ opt_cpuid_mask_ecx,
|
||||
+ opt_cpuid_mask_edx);
|
||||
+ rdmsr(MSR_INTEL_CPUIDD_01_FEATURE_MASK, eax, edx);
|
||||
+ wrmsr(MSR_INTEL_CPUIDD_01_FEATURE_MASK,
|
||||
+ opt_cpuid_mask_xsave_eax, edx);
|
||||
+ wrmsr(MSR_INTEL_CPUID80000001_FEATURE_MASK_V2,
|
||||
+ opt_cpuid_mask_ext_ecx,
|
||||
+ opt_cpuid_mask_ext_edx);
|
||||
return;
|
||||
}
|
||||
|
||||
- printk(XENLOG_ERR "Cannot set CPU feature mask on CPU#%d\n",
|
||||
- smp_processor_id());
|
||||
+ printk(XENLOG_ERR "Cannot set CPU %sfeature mask on CPU#%d\n",
|
||||
+ extra, smp_processor_id());
|
||||
}
|
||||
|
||||
void __devinit early_intel_workaround(struct cpuinfo_x86 *c)
|
||||
--- a/xen/include/asm-x86/msr-index.h
|
||||
+++ b/xen/include/asm-x86/msr-index.h
|
||||
@@ -161,6 +161,10 @@
|
||||
#define MSR_INTEL_CPUID1_FEATURE_MASK 0x00000130
|
||||
#define MSR_INTEL_CPUID80000001_FEATURE_MASK 0x00000131
|
||||
|
||||
+#define MSR_INTEL_CPUID1_FEATURE_MASK_V2 0x00000132
|
||||
+#define MSR_INTEL_CPUID80000001_FEATURE_MASK_V2 0x00000133
|
||||
+#define MSR_INTEL_CPUIDD_01_FEATURE_MASK 0x00000134
|
||||
+
|
||||
/* MSRs & bits used for VMX enabling */
|
||||
#define MSR_IA32_VMX_BASIC 0x480
|
||||
#define MSR_IA32_VMX_PINBASED_CTLS 0x481
|
@ -1,60 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User George Dunlap <george.dunlap@eu.citrix.com>
|
||||
# Date 1311255331 -3600
|
||||
# Node ID 3795d79c740b2aa50aacb7bf7e3503862a7b436c
|
||||
# Parent 48f72b389b04cfa8d44924577a69ed59e48fbe77
|
||||
xen: Fix sedf scheduler
|
||||
|
||||
Update the sedf scheduler to be compatible with the most recent
|
||||
generic scheduler interface changes.
|
||||
|
||||
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
|
||||
|
||||
--- a/xen/common/sched_sedf.c
|
||||
+++ b/xen/common/sched_sedf.c
|
||||
@@ -331,6 +331,19 @@ static inline void __add_to_runqueue_sor
|
||||
}
|
||||
|
||||
|
||||
+static void sedf_insert_vcpu(const struct scheduler *ops, struct vcpu *v)
|
||||
+{
|
||||
+ if ( !is_idle_vcpu(v) )
|
||||
+ {
|
||||
+ extraq_check(v);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ EDOM_INFO(v)->deadl_abs = 0;
|
||||
+ EDOM_INFO(v)->status &= ~SEDF_ASLEEP;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
static void *sedf_alloc_vdata(const struct scheduler *ops, struct vcpu *v, void *dd)
|
||||
{
|
||||
struct sedf_vcpu_info *inf;
|
||||
@@ -365,16 +378,6 @@ static void *sedf_alloc_vdata(const stru
|
||||
INIT_LIST_HEAD(&(inf->list));
|
||||
INIT_LIST_HEAD(&(inf->extralist[EXTRA_PEN_Q]));
|
||||
INIT_LIST_HEAD(&(inf->extralist[EXTRA_UTIL_Q]));
|
||||
-
|
||||
- if ( !is_idle_vcpu(v) )
|
||||
- {
|
||||
- extraq_check(v);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- inf->deadl_abs = 0;
|
||||
- inf->status &= ~SEDF_ASLEEP;
|
||||
- }
|
||||
|
||||
return inf;
|
||||
}
|
||||
@@ -1498,6 +1501,8 @@ const struct scheduler sched_sedf_def =
|
||||
.init_domain = sedf_init_domain,
|
||||
.destroy_domain = sedf_destroy_domain,
|
||||
|
||||
+ .insert_vcpu = sedf_insert_vcpu,
|
||||
+
|
||||
.alloc_vdata = sedf_alloc_vdata,
|
||||
.free_vdata = sedf_free_vdata,
|
||||
.alloc_pdata = sedf_alloc_pdata,
|
@ -42,8 +42,10 @@ tests...
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/tools/libxc/xc_dom_elfloader.c
|
||||
+++ b/tools/libxc/xc_dom_elfloader.c
|
||||
Index: xen-4.1.2-testing/tools/libxc/xc_dom_elfloader.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/tools/libxc/xc_dom_elfloader.c
|
||||
+++ xen-4.1.2-testing/tools/libxc/xc_dom_elfloader.c
|
||||
@@ -286,6 +286,13 @@ static int xc_dom_parse_elf_kernel(struc
|
||||
if ( (rc = elf_xen_parse(elf, &dom->parms)) != 0 )
|
||||
return rc;
|
||||
@ -58,9 +60,11 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
/* find kernel segment */
|
||||
dom->kernel_seg.vstart = dom->parms.virt_kstart;
|
||||
dom->kernel_seg.vend = dom->parms.virt_kend;
|
||||
--- a/xen/arch/ia64/xen/domain.c
|
||||
+++ b/xen/arch/ia64/xen/domain.c
|
||||
@@ -2164,6 +2164,13 @@ int __init construct_dom0(struct domain
|
||||
Index: xen-4.1.2-testing/xen/arch/ia64/xen/domain.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/ia64/xen/domain.c
|
||||
+++ xen-4.1.2-testing/xen/arch/ia64/xen/domain.c
|
||||
@@ -2164,6 +2164,13 @@ int __init construct_dom0(struct domain
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -74,9 +78,11 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
p_start = parms.virt_base;
|
||||
pkern_start = parms.virt_kstart;
|
||||
pkern_end = parms.virt_kend;
|
||||
--- a/xen/arch/x86/domain_build.c
|
||||
+++ b/xen/arch/x86/domain_build.c
|
||||
@@ -415,6 +415,13 @@ int __init construct_dom0(
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/domain_build.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/domain_build.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/domain_build.c
|
||||
@@ -417,6 +417,13 @@ int __init construct_dom0(
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -90,8 +96,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#if defined(__x86_64__)
|
||||
if ( compat32 )
|
||||
{
|
||||
--- a/xen/common/kernel.c
|
||||
+++ b/xen/common/kernel.c
|
||||
Index: xen-4.1.2-testing/xen/common/kernel.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/kernel.c
|
||||
+++ xen-4.1.2-testing/xen/common/kernel.c
|
||||
@@ -287,6 +287,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL
|
||||
(1U << XENFEAT_auto_translated_physmap);
|
||||
if ( supervisor_mode_kernel )
|
||||
@ -101,8 +109,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#ifdef CONFIG_X86
|
||||
if ( !is_hvm_vcpu(current) )
|
||||
fi.submap |= (1U << XENFEAT_mmu_pt_update_preserve_ad) |
|
||||
--- a/xen/common/libelf/libelf-dominfo.c
|
||||
+++ b/xen/common/libelf/libelf-dominfo.c
|
||||
Index: xen-4.1.2-testing/xen/common/libelf/libelf-dominfo.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/libelf/libelf-dominfo.c
|
||||
+++ xen-4.1.2-testing/xen/common/libelf/libelf-dominfo.c
|
||||
@@ -26,7 +26,8 @@ static const char *const elf_xen_feature
|
||||
[XENFEAT_writable_descriptor_tables] = "writable_descriptor_tables",
|
||||
[XENFEAT_auto_translated_physmap] = "auto_translated_physmap",
|
||||
@ -151,8 +161,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
--- a/xen/common/libelf/libelf-tools.c
|
||||
+++ b/xen/common/libelf/libelf-tools.c
|
||||
Index: xen-4.1.2-testing/xen/common/libelf/libelf-tools.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/libelf/libelf-tools.c
|
||||
+++ xen-4.1.2-testing/xen/common/libelf/libelf-tools.c
|
||||
@@ -227,6 +227,27 @@ uint64_t elf_note_numeric(struct elf_bin
|
||||
return 0;
|
||||
}
|
||||
@ -181,8 +193,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
const elf_note *elf_note_next(struct elf_binary *elf, const elf_note * note)
|
||||
{
|
||||
int namesz = (elf_uval(elf, note, namesz) + 3) & ~3;
|
||||
--- a/xen/include/public/elfnote.h
|
||||
+++ b/xen/include/public/elfnote.h
|
||||
Index: xen-4.1.2-testing/xen/include/public/elfnote.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/public/elfnote.h
|
||||
+++ xen-4.1.2-testing/xen/include/public/elfnote.h
|
||||
@@ -179,9 +179,22 @@
|
||||
#define XEN_ELFNOTE_MOD_START_PFN 16
|
||||
|
||||
@ -207,8 +221,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
/*
|
||||
* System information exported through crash notes.
|
||||
--- a/xen/include/public/features.h
|
||||
+++ b/xen/include/public/features.h
|
||||
Index: xen-4.1.2-testing/xen/include/public/features.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/public/features.h
|
||||
+++ xen-4.1.2-testing/xen/include/public/features.h
|
||||
@@ -75,7 +75,10 @@
|
||||
#define XENFEAT_hvm_safe_pvclock 9
|
||||
|
||||
@ -221,8 +237,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
#define XENFEAT_NR_SUBMAPS 1
|
||||
|
||||
--- a/xen/include/xen/libelf.h
|
||||
+++ b/xen/include/xen/libelf.h
|
||||
Index: xen-4.1.2-testing/xen/include/xen/libelf.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/libelf.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/libelf.h
|
||||
@@ -179,6 +179,8 @@ const elf_sym *elf_sym_by_index(struct e
|
||||
const char *elf_note_name(struct elf_binary *elf, const elf_note * note);
|
||||
const void *elf_note_desc(struct elf_binary *elf, const elf_note * note);
|
||||
|
@ -1,43 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Tim Deegan <Tim.Deegan@citrix.com>
|
||||
# Date 1311608493 -3600
|
||||
# Node ID aa54b8175954bd6ffeb3bcf72e782e133896b388
|
||||
# Parent 9dbbf1631193bb6df679f5eaaee192ef4ef91fd9
|
||||
VT-d: always clean up dpci timers.
|
||||
|
||||
If a VM has all its PCI devices deassigned, need_iommu(d) becomes
|
||||
false but it might still have DPCI EOI timers that were init_timer()d
|
||||
but not yet kill_timer()d. That causes xen to crash later because the
|
||||
linked list of inactive timers gets corrupted, e.g.:
|
||||
|
||||
(XEN) Xen call trace:
|
||||
(XEN) [<ffff82c480126256>] set_timer+0x1c2/0x24f
|
||||
(XEN) [<ffff82c48011fbf8>] schedule+0x129/0x5dd
|
||||
(XEN) [<ffff82c480122c1e>] __do_softirq+0x7e/0x89
|
||||
(XEN) [<ffff82c480122c9d>] do_softirq+0x26/0x28
|
||||
(XEN) [<ffff82c480153c85>] idle_loop+0x5a/0x5c
|
||||
(XEN)
|
||||
(XEN)
|
||||
(XEN) ****************************************
|
||||
(XEN) Panic on CPU 0:
|
||||
(XEN) Assertion 'entry->next->prev == entry' failed at
|
||||
/local/scratch/tdeegan/xen-unstable.hg/xen/include:172
|
||||
(XEN) ****************************************
|
||||
|
||||
The following patch makes sure that the domain destruction path always
|
||||
clears up the DPCI state even if !needs_iommu(d).
|
||||
|
||||
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
|
||||
|
||||
--- a/xen/drivers/passthrough/pci.c
|
||||
+++ b/xen/drivers/passthrough/pci.c
|
||||
@@ -220,9 +220,6 @@ static void pci_clean_dpci_irqs(struct d
|
||||
if ( !iommu_enabled )
|
||||
return;
|
||||
|
||||
- if ( !need_iommu(d) )
|
||||
- return;
|
||||
-
|
||||
spin_lock(&d->event_lock);
|
||||
hvm_irq_dpci = domain_get_irq_dpci(d);
|
||||
if ( hvm_irq_dpci != NULL )
|
@ -14,8 +14,10 @@ doing accesses.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
+++ b/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
@@ -25,7 +25,7 @@ struct mmcfg_virt {
|
||||
static struct mmcfg_virt *pci_mmcfg_virt;
|
||||
static int __initdata mmcfg_pci_segment_shift;
|
||||
|
@ -16,8 +16,10 @@ a new physdevop hypercall).
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/physdev.c
|
||||
+++ b/xen/arch/x86/physdev.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/physdev.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/physdev.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/physdev.c
|
||||
@@ -16,6 +16,10 @@
|
||||
#include <xsm/xsm.h>
|
||||
#include <asm/p2m.h>
|
||||
@ -29,7 +31,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#ifndef COMPAT
|
||||
typedef long ret_t;
|
||||
#endif
|
||||
@@ -515,6 +519,24 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
|
||||
@@ -512,6 +516,24 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
|
||||
break;
|
||||
}
|
||||
|
||||
@ -54,8 +56,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
case PHYSDEVOP_restore_msi: {
|
||||
struct physdev_restore_msi restore_msi;
|
||||
struct pci_dev *pdev;
|
||||
--- a/xen/arch/x86/x86_64/mmconfig.h
|
||||
+++ b/xen/arch/x86/x86_64/mmconfig.h
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/x86_64/mmconfig.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/x86_64/mmconfig.h
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/x86_64/mmconfig.h
|
||||
@@ -84,6 +84,11 @@ extern int pci_mmcfg_config_num;
|
||||
extern struct acpi_mcfg_allocation *pci_mmcfg_config;
|
||||
|
||||
@ -69,8 +73,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
-void pci_mmcfg_arch_free(void);
|
||||
+int pci_mmcfg_arch_enable(unsigned int);
|
||||
+void pci_mmcfg_arch_disable(unsigned int);
|
||||
--- a/xen/arch/x86/x86_64/mmconfig-shared.c
|
||||
+++ b/xen/arch/x86/x86_64/mmconfig-shared.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/x86_64/mmconfig-shared.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/x86_64/mmconfig-shared.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/x86_64/mmconfig-shared.c
|
||||
@@ -22,10 +22,10 @@
|
||||
#include <asm/e820.h>
|
||||
#include <asm/msr.h>
|
||||
@ -176,12 +182,12 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
- /* for late to exit */
|
||||
- if (known_bridge)
|
||||
- return;
|
||||
-
|
||||
- if (pci_mmcfg_check_hostbridge())
|
||||
- known_bridge = 1;
|
||||
+ if (pci_mmcfg_check_hostbridge()) {
|
||||
+ unsigned int i;
|
||||
|
||||
- if (pci_mmcfg_check_hostbridge())
|
||||
- known_bridge = 1;
|
||||
-
|
||||
- if (!known_bridge) {
|
||||
+ pci_mmcfg_arch_init();
|
||||
+ for (i = 0; i < pci_mmcfg_config_num; ++i)
|
||||
@ -238,8 +244,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
}
|
||||
|
||||
/**
|
||||
--- a/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
+++ b/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
@@ -112,7 +112,8 @@ int pci_mmcfg_write(unsigned int seg, un
|
||||
return 0;
|
||||
}
|
||||
@ -342,8 +350,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
- xfree(pci_mmcfg_virt);
|
||||
- pci_mmcfg_virt = NULL;
|
||||
-}
|
||||
--- a/xen/arch/x86/x86_64/physdev.c
|
||||
+++ b/xen/arch/x86/x86_64/physdev.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/x86_64/physdev.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/x86_64/physdev.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/x86_64/physdev.c
|
||||
@@ -54,6 +54,10 @@
|
||||
#define physdev_get_free_pirq compat_physdev_get_free_pirq
|
||||
#define physdev_get_free_pirq_t physdev_get_free_pirq_compat_t
|
||||
@ -355,8 +365,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#define COMPAT
|
||||
#undef guest_handle_okay
|
||||
#define guest_handle_okay compat_handle_okay
|
||||
--- a/xen/include/public/physdev.h
|
||||
+++ b/xen/include/public/physdev.h
|
||||
Index: xen-4.1.2-testing/xen/include/public/physdev.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/public/physdev.h
|
||||
+++ xen-4.1.2-testing/xen/include/public/physdev.h
|
||||
@@ -255,6 +255,19 @@ struct physdev_get_free_pirq {
|
||||
typedef struct physdev_get_free_pirq physdev_get_free_pirq_t;
|
||||
DEFINE_XEN_GUEST_HANDLE(physdev_get_free_pirq_t);
|
||||
@ -377,8 +389,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
/*
|
||||
* Notify that some PIRQ-bound event channels have been unmasked.
|
||||
* ** This command is obsolete since interface version 0x00030202 and is **
|
||||
--- a/xen/include/xlat.lst
|
||||
+++ b/xen/include/xlat.lst
|
||||
Index: xen-4.1.2-testing/xen/include/xlat.lst
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xlat.lst
|
||||
+++ xen-4.1.2-testing/xen/include/xlat.lst
|
||||
@@ -60,6 +60,7 @@
|
||||
! memory_map memory.h
|
||||
! memory_reservation memory.h
|
||||
|
@ -1,72 +0,0 @@
|
||||
References: bnc#712051, CVE-2011-3131
|
||||
|
||||
# HG changeset patch
|
||||
# User Tim Deegan <Tim.Deegan@citrix.com>
|
||||
# Date 1313144964 -3600
|
||||
# Node ID 537ed3b74b3f13267cfb3eb0e1483f432f3685cd
|
||||
# Parent 1f08b380d4386cdd6714786a9163e5f51aecab5d
|
||||
Passthrough: disable bus-mastering on any card that causes an IOMMU fault.
|
||||
|
||||
This stops the card from raising back-to-back faults and live-locking
|
||||
the CPU that handles them.
|
||||
|
||||
Signed-off-by: Tim Deegan <tim@xen.org>
|
||||
Acked-by: Wei Wang2 <wei.wang2@amd.com>
|
||||
Acked-by: Allen M Kay <allen.m.kay@intel.com>
|
||||
|
||||
--- a/xen/drivers/passthrough/amd/iommu_init.c
|
||||
+++ b/xen/drivers/passthrough/amd/iommu_init.c
|
||||
@@ -462,7 +462,7 @@ static hw_irq_controller iommu_msi_type
|
||||
|
||||
static void parse_event_log_entry(u32 entry[])
|
||||
{
|
||||
- u16 domain_id, device_id;
|
||||
+ u16 domain_id, device_id, bdf, cword;
|
||||
u32 code;
|
||||
u64 *addr;
|
||||
char * event_str[] = {"ILLEGAL_DEV_TABLE_ENTRY",
|
||||
@@ -497,6 +497,18 @@ static void parse_event_log_entry(u32 en
|
||||
"%s: domain = %d, device id = 0x%04x, "
|
||||
"fault address = 0x%"PRIx64"\n",
|
||||
event_str[code-1], domain_id, device_id, *addr);
|
||||
+
|
||||
+ /* Tell the device to stop DMAing; we can't rely on the guest to
|
||||
+ * control it for us. */
|
||||
+ for ( bdf = 0; bdf < ivrs_bdf_entries; bdf++ )
|
||||
+ if ( get_dma_requestor_id(bdf) == device_id )
|
||||
+ {
|
||||
+ cword = pci_conf_read16(PCI_BUS(bdf), PCI_SLOT(bdf),
|
||||
+ PCI_FUNC(bdf), PCI_COMMAND);
|
||||
+ pci_conf_write16(PCI_BUS(bdf), PCI_SLOT(bdf),
|
||||
+ PCI_FUNC(bdf), PCI_COMMAND,
|
||||
+ cword & ~PCI_COMMAND_MASTER);
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
--- a/xen/drivers/passthrough/vtd/iommu.c
|
||||
+++ b/xen/drivers/passthrough/vtd/iommu.c
|
||||
@@ -887,7 +887,7 @@ static void iommu_page_fault(int irq, vo
|
||||
while (1)
|
||||
{
|
||||
u8 fault_reason;
|
||||
- u16 source_id;
|
||||
+ u16 source_id, cword;
|
||||
u32 data;
|
||||
u64 guest_addr;
|
||||
int type;
|
||||
@@ -920,6 +920,14 @@ static void iommu_page_fault(int irq, vo
|
||||
iommu_page_fault_do_one(iommu, type, fault_reason,
|
||||
source_id, guest_addr);
|
||||
|
||||
+ /* Tell the device to stop DMAing; we can't rely on the guest to
|
||||
+ * control it for us. */
|
||||
+ cword = pci_conf_read16(PCI_BUS(source_id), PCI_SLOT(source_id),
|
||||
+ PCI_FUNC(source_id), PCI_COMMAND);
|
||||
+ pci_conf_write16(PCI_BUS(source_id), PCI_SLOT(source_id),
|
||||
+ PCI_FUNC(source_id), PCI_COMMAND,
|
||||
+ cword & ~PCI_COMMAND_MASTER);
|
||||
+
|
||||
fault_index++;
|
||||
if ( fault_index > cap_num_fault_regs(iommu->cap) )
|
||||
fault_index = 0;
|
@ -1,55 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Jan Beulich <jbeulich@novell.com>
|
||||
# Date 1313226769 -3600
|
||||
# Node ID 8f647d409196f1d018f6284af03d1625cf8f93af
|
||||
# Parent 537ed3b74b3f13267cfb3eb0e1483f432f3685cd
|
||||
VT-d: don't reject valid DMAR/ATSR tables on systems with multiple PCI segments
|
||||
|
||||
On multi-PCI-segment systems, each segment has to be expected to have
|
||||
an include-all DRHD and an all-ports ATSR, so the firmware consistency
|
||||
check incorrectly rejects valid configurations there (which is
|
||||
particularly problematic when the firmware also pre-enabled x2apic
|
||||
mode, as the system will panic in that case due to being unable to
|
||||
enable interrupt remapping). Thus constrain the check to just segment
|
||||
0 for now; once full multi-segment support is there (which I'm working
|
||||
on), it can be revisited whether we'd want to track this per segment,
|
||||
or whether we trust the firmware of such large systems.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/drivers/passthrough/vtd/dmar.c
|
||||
+++ b/xen/drivers/passthrough/vtd/dmar.c
|
||||
@@ -427,13 +427,14 @@ acpi_parse_one_drhd(struct acpi_dmar_ent
|
||||
if ( iommu_verbose )
|
||||
dprintk(VTDPREFIX, " flags: INCLUDE_ALL\n");
|
||||
/* Only allow one INCLUDE_ALL */
|
||||
- if ( include_all )
|
||||
+ if ( drhd->segment == 0 && include_all )
|
||||
{
|
||||
dprintk(XENLOG_WARNING VTDPREFIX,
|
||||
"Only one INCLUDE_ALL device scope is allowed\n");
|
||||
ret = -EINVAL;
|
||||
}
|
||||
- include_all = 1;
|
||||
+ if ( drhd->segment == 0 )
|
||||
+ include_all = 1;
|
||||
}
|
||||
|
||||
if ( ret )
|
||||
@@ -633,13 +634,14 @@ acpi_parse_one_atsr(struct acpi_dmar_ent
|
||||
if ( iommu_verbose )
|
||||
dprintk(VTDPREFIX, " flags: ALL_PORTS\n");
|
||||
/* Only allow one ALL_PORTS */
|
||||
- if ( all_ports )
|
||||
+ if ( atsr->segment == 0 && all_ports )
|
||||
{
|
||||
dprintk(XENLOG_WARNING VTDPREFIX,
|
||||
"Only one ALL_PORTS device scope is allowed\n");
|
||||
ret = -EINVAL;
|
||||
}
|
||||
- all_ports = 1;
|
||||
+ if ( atsr->segment == 0 )
|
||||
+ all_ports = 1;
|
||||
}
|
||||
|
||||
if ( ret )
|
@ -1,29 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Andrew Cooper <andrew.cooper3@citrix.com>
|
||||
# Date 1313226868 -3600
|
||||
# Node ID 68b903bb1b01b2a6ef9c6e8ead3be3c1c2208341
|
||||
# Parent 67b883402736ef1746cd6654da4c898f70f40723
|
||||
x86: IRQ fix incorrect logic in __clear_irq_vector
|
||||
|
||||
In the old code, tmp_mask is the cpu_and of cfg->cpu_mask and
|
||||
cpu_online_map. However, in the usual case of moving an IRQ from one
|
||||
PCPU to another because the scheduler decides its a good idea,
|
||||
cfg->cpu_mask and cfg->old_cpu_mask do not intersect. This causes the
|
||||
old cpu vector_irq table to keep the irq reference when it shouldn't.
|
||||
|
||||
This leads to a resource leak if a domain is shut down wile an irq has
|
||||
a move pending, which results in Xen's create_irq() eventually failing
|
||||
with -ENOSPC when all vector_irq tables are full of stale references.
|
||||
|
||||
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/irq.c
|
||||
+++ b/xen/arch/x86/irq.c
|
||||
@@ -190,6 +190,7 @@ static void __clear_irq_vector(int irq)
|
||||
|
||||
if (likely(!cfg->move_in_progress))
|
||||
return;
|
||||
+ cpus_and(tmp_mask, cfg->old_cpu_mask, cpu_online_map);
|
||||
for_each_cpu_mask(cpu, tmp_mask) {
|
||||
for (vector = FIRST_DYNAMIC_VECTOR; vector <= LAST_DYNAMIC_VECTOR;
|
||||
vector++) {
|
@ -1,295 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Jan Beulich <jbeulich@novell.com>
|
||||
# Date 1313226898 -3600
|
||||
# Node ID 8d6edc3d26d26931f3732a2008fb4818bc7bab2d
|
||||
# Parent 68b903bb1b01b2a6ef9c6e8ead3be3c1c2208341
|
||||
x86/PCI-MSI: properly determine VF BAR values
|
||||
|
||||
As was discussed a couple of times on this list, SR-IOV virtual
|
||||
functions have their BARs read as zero - the physical function's
|
||||
SR-IOV capability structure must be consulted instead. The bogus
|
||||
warnings people complained about are being eliminated with this
|
||||
change.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/msi.c
|
||||
+++ b/xen/arch/x86/msi.c
|
||||
@@ -522,12 +522,48 @@ static int msi_capability_init(struct pc
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static u64 read_pci_mem_bar(u8 bus, u8 slot, u8 func, u8 bir)
|
||||
+static u64 read_pci_mem_bar(u8 bus, u8 slot, u8 func, u8 bir, int vf)
|
||||
{
|
||||
u8 limit;
|
||||
- u32 addr;
|
||||
+ u32 addr, base = PCI_BASE_ADDRESS_0, disp = 0;
|
||||
|
||||
- switch ( pci_conf_read8(bus, slot, func, PCI_HEADER_TYPE) & 0x7f )
|
||||
+ if ( vf >= 0 )
|
||||
+ {
|
||||
+ struct pci_dev *pdev = pci_get_pdev(bus, PCI_DEVFN(slot, func));
|
||||
+ unsigned int pos = pci_find_ext_capability(0, bus,
|
||||
+ PCI_DEVFN(slot, func),
|
||||
+ PCI_EXT_CAP_ID_SRIOV);
|
||||
+ u16 ctrl = pci_conf_read16(bus, slot, func, pos + PCI_SRIOV_CTRL);
|
||||
+ u16 num_vf = pci_conf_read16(bus, slot, func, pos + PCI_SRIOV_NUM_VF);
|
||||
+ u16 offset = pci_conf_read16(bus, slot, func,
|
||||
+ pos + PCI_SRIOV_VF_OFFSET);
|
||||
+ u16 stride = pci_conf_read16(bus, slot, func,
|
||||
+ pos + PCI_SRIOV_VF_STRIDE);
|
||||
+
|
||||
+ if ( !pdev || !pos ||
|
||||
+ !(ctrl & PCI_SRIOV_CTRL_VFE) ||
|
||||
+ !(ctrl & PCI_SRIOV_CTRL_MSE) ||
|
||||
+ !num_vf || !offset || (num_vf > 1 && !stride) ||
|
||||
+ bir >= PCI_SRIOV_NUM_BARS ||
|
||||
+ !pdev->vf_rlen[bir] )
|
||||
+ return 0;
|
||||
+ base = pos + PCI_SRIOV_BAR;
|
||||
+ vf -= PCI_BDF(bus, slot, func) + offset;
|
||||
+ if ( vf < 0 || (vf && vf % stride) )
|
||||
+ return 0;
|
||||
+ if ( stride )
|
||||
+ {
|
||||
+ if ( vf % stride )
|
||||
+ return 0;
|
||||
+ vf /= stride;
|
||||
+ }
|
||||
+ if ( vf >= num_vf )
|
||||
+ return 0;
|
||||
+ BUILD_BUG_ON(ARRAY_SIZE(pdev->vf_rlen) != PCI_SRIOV_NUM_BARS);
|
||||
+ disp = vf * pdev->vf_rlen[bir];
|
||||
+ limit = PCI_SRIOV_NUM_BARS;
|
||||
+ }
|
||||
+ else switch ( pci_conf_read8(bus, slot, func, PCI_HEADER_TYPE) & 0x7f )
|
||||
{
|
||||
case PCI_HEADER_TYPE_NORMAL:
|
||||
limit = 6;
|
||||
@@ -544,7 +580,7 @@ static u64 read_pci_mem_bar(u8 bus, u8 s
|
||||
|
||||
if ( bir >= limit )
|
||||
return 0;
|
||||
- addr = pci_conf_read32(bus, slot, func, PCI_BASE_ADDRESS_0 + bir * 4);
|
||||
+ addr = pci_conf_read32(bus, slot, func, base + bir * 4);
|
||||
if ( (addr & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO )
|
||||
return 0;
|
||||
if ( (addr & PCI_BASE_ADDRESS_MEM_TYPE_MASK) == PCI_BASE_ADDRESS_MEM_TYPE_64 )
|
||||
@@ -552,11 +588,10 @@ static u64 read_pci_mem_bar(u8 bus, u8 s
|
||||
addr &= PCI_BASE_ADDRESS_MEM_MASK;
|
||||
if ( ++bir >= limit )
|
||||
return 0;
|
||||
- return addr |
|
||||
- ((u64)pci_conf_read32(bus, slot, func,
|
||||
- PCI_BASE_ADDRESS_0 + bir * 4) << 32);
|
||||
+ return addr + disp +
|
||||
+ ((u64)pci_conf_read32(bus, slot, func, base + bir * 4) << 32);
|
||||
}
|
||||
- return addr & PCI_BASE_ADDRESS_MEM_MASK;
|
||||
+ return (addr & PCI_BASE_ADDRESS_MEM_MASK) + disp;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -629,11 +664,29 @@ static int msix_capability_init(struct p
|
||||
|
||||
if ( !dev->msix_nr_entries )
|
||||
{
|
||||
+ u8 pbus, pslot, pfunc;
|
||||
+ int vf;
|
||||
u64 pba_paddr;
|
||||
u32 pba_offset;
|
||||
|
||||
+ if ( !dev->info.is_virtfn )
|
||||
+ {
|
||||
+ pbus = bus;
|
||||
+ pslot = slot;
|
||||
+ pfunc = func;
|
||||
+ vf = -1;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ pbus = dev->info.physfn.bus;
|
||||
+ pslot = PCI_SLOT(dev->info.physfn.devfn);
|
||||
+ pfunc = PCI_FUNC(dev->info.physfn.devfn);
|
||||
+ vf = PCI_BDF2(dev->bus, dev->devfn);
|
||||
+ }
|
||||
+
|
||||
ASSERT(!dev->msix_used_entries);
|
||||
- WARN_ON(msi->table_base != read_pci_mem_bar(bus, slot, func, bir));
|
||||
+ WARN_ON(msi->table_base !=
|
||||
+ read_pci_mem_bar(pbus, pslot, pfunc, bir, vf));
|
||||
|
||||
dev->msix_nr_entries = nr_entries;
|
||||
dev->msix_table.first = PFN_DOWN(table_paddr);
|
||||
@@ -645,7 +698,7 @@ static int msix_capability_init(struct p
|
||||
pba_offset = pci_conf_read32(bus, slot, func,
|
||||
msix_pba_offset_reg(pos));
|
||||
bir = (u8)(pba_offset & PCI_MSIX_BIRMASK);
|
||||
- pba_paddr = read_pci_mem_bar(bus, slot, func, bir);
|
||||
+ pba_paddr = read_pci_mem_bar(pbus, pslot, pfunc, bir, vf);
|
||||
WARN_ON(!pba_paddr);
|
||||
pba_paddr += pba_offset & ~PCI_MSIX_BIRMASK;
|
||||
|
||||
--- a/xen/drivers/passthrough/pci.c
|
||||
+++ b/xen/drivers/passthrough/pci.c
|
||||
@@ -145,6 +145,7 @@ void pci_enable_acs(struct pci_dev *pdev
|
||||
int pci_add_device(u8 bus, u8 devfn, const struct pci_dev_info *info)
|
||||
{
|
||||
struct pci_dev *pdev;
|
||||
+ unsigned int slot = PCI_SLOT(devfn), func = PCI_FUNC(devfn);
|
||||
const char *pdev_type;
|
||||
int ret = -ENOMEM;
|
||||
|
||||
@@ -153,7 +154,14 @@ int pci_add_device(u8 bus, u8 devfn, con
|
||||
else if (info->is_extfn)
|
||||
pdev_type = "extended function";
|
||||
else if (info->is_virtfn)
|
||||
+ {
|
||||
+ spin_lock(&pcidevs_lock);
|
||||
+ pdev = pci_get_pdev(info->physfn.bus, info->physfn.devfn);
|
||||
+ spin_unlock(&pcidevs_lock);
|
||||
+ if ( !pdev )
|
||||
+ pci_add_device(info->physfn.bus, info->physfn.devfn, NULL);
|
||||
pdev_type = "virtual function";
|
||||
+ }
|
||||
else
|
||||
return -EINVAL;
|
||||
|
||||
@@ -164,6 +172,70 @@ int pci_add_device(u8 bus, u8 devfn, con
|
||||
|
||||
if ( info )
|
||||
pdev->info = *info;
|
||||
+ else if ( !pdev->vf_rlen[0] )
|
||||
+ {
|
||||
+ unsigned int pos = pci_find_ext_capability(0, bus, devfn,
|
||||
+ PCI_EXT_CAP_ID_SRIOV);
|
||||
+ u16 ctrl = pci_conf_read16(bus, slot, func, pos + PCI_SRIOV_CTRL);
|
||||
+
|
||||
+ if ( !pos )
|
||||
+ /* Nothing */;
|
||||
+ else if ( !(ctrl & (PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE)) )
|
||||
+ {
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ BUILD_BUG_ON(ARRAY_SIZE(pdev->vf_rlen) != PCI_SRIOV_NUM_BARS);
|
||||
+ for ( i = 0; i < PCI_SRIOV_NUM_BARS; ++i )
|
||||
+ {
|
||||
+ unsigned int idx = pos + PCI_SRIOV_BAR + i * 4;
|
||||
+ u32 bar = pci_conf_read32(bus, slot, func, idx);
|
||||
+ u32 hi = 0;
|
||||
+
|
||||
+ if ( (bar & PCI_BASE_ADDRESS_SPACE) ==
|
||||
+ PCI_BASE_ADDRESS_SPACE_IO )
|
||||
+ {
|
||||
+ printk(XENLOG_WARNING "SR-IOV device %02x:%02x.%x with vf"
|
||||
+ " BAR%u in IO space\n",
|
||||
+ bus, slot, func, i);
|
||||
+ continue;
|
||||
+ }
|
||||
+ pci_conf_write32(bus, slot, func, idx, ~0);
|
||||
+ if ( (bar & PCI_BASE_ADDRESS_MEM_TYPE_MASK) ==
|
||||
+ PCI_BASE_ADDRESS_MEM_TYPE_64 )
|
||||
+ {
|
||||
+ if ( i >= PCI_SRIOV_NUM_BARS )
|
||||
+ {
|
||||
+ printk(XENLOG_WARNING "SR-IOV device %02x:%02x.%x with"
|
||||
+ " 64-bit vf BAR in last slot\n",
|
||||
+ bus, slot, func);
|
||||
+ break;
|
||||
+ }
|
||||
+ hi = pci_conf_read32(bus, slot, func, idx + 4);
|
||||
+ pci_conf_write32(bus, slot, func, idx + 4, ~0);
|
||||
+ }
|
||||
+ pdev->vf_rlen[i] = pci_conf_read32(bus, slot, func, idx) &
|
||||
+ PCI_BASE_ADDRESS_MEM_MASK;
|
||||
+ if ( (bar & PCI_BASE_ADDRESS_MEM_TYPE_MASK) ==
|
||||
+ PCI_BASE_ADDRESS_MEM_TYPE_64 )
|
||||
+ {
|
||||
+ pdev->vf_rlen[i] |= (u64)pci_conf_read32(bus, slot, func,
|
||||
+ idx + 4) << 32;
|
||||
+ pci_conf_write32(bus, slot, func, idx + 4, hi);
|
||||
+ }
|
||||
+ else if ( pdev->vf_rlen[i] )
|
||||
+ pdev->vf_rlen[i] |= (u64)~0 << 32;
|
||||
+ pci_conf_write32(bus, slot, func, idx, bar);
|
||||
+ pdev->vf_rlen[i] = -pdev->vf_rlen[i];
|
||||
+ if ( (bar & PCI_BASE_ADDRESS_MEM_TYPE_MASK) ==
|
||||
+ PCI_BASE_ADDRESS_MEM_TYPE_64 )
|
||||
+ ++i;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ printk(XENLOG_WARNING "SR-IOV device %02x:%02x.%x has its virtual"
|
||||
+ " functions already enabled (%04x)\n",
|
||||
+ bus, slot, func, ctrl);
|
||||
+ }
|
||||
|
||||
ret = 0;
|
||||
if ( !pdev->domain )
|
||||
@@ -183,7 +255,7 @@ int pci_add_device(u8 bus, u8 devfn, con
|
||||
out:
|
||||
spin_unlock(&pcidevs_lock);
|
||||
printk(XENLOG_DEBUG "PCI add %s %02x:%02x.%x\n", pdev_type,
|
||||
- bus, PCI_SLOT(devfn), PCI_FUNC(devfn));
|
||||
+ bus, slot, func);
|
||||
return ret;
|
||||
}
|
||||
|
||||
--- a/xen/include/xen/pci.h
|
||||
+++ b/xen/include/xen/pci.h
|
||||
@@ -57,6 +57,7 @@ struct pci_dev {
|
||||
const u8 bus;
|
||||
const u8 devfn;
|
||||
struct pci_dev_info info;
|
||||
+ u64 vf_rlen[6];
|
||||
};
|
||||
|
||||
#define for_each_pdev(domain, pdev) \
|
||||
--- a/xen/include/xen/pci_regs.h
|
||||
+++ b/xen/include/xen/pci_regs.h
|
||||
@@ -425,7 +425,7 @@
|
||||
#define PCI_EXT_CAP_ID_ACS 13
|
||||
#define PCI_EXT_CAP_ID_ARI 14
|
||||
#define PCI_EXT_CAP_ID_ATS 15
|
||||
-#define PCI_EXT_CAP_ID_IOV 16
|
||||
+#define PCI_EXT_CAP_ID_SRIOV 16
|
||||
|
||||
/* Advanced Error Reporting */
|
||||
#define PCI_ERR_UNCOR_STATUS 4 /* Uncorrectable Error Status */
|
||||
@@ -545,4 +545,35 @@
|
||||
#define PCI_ACS_CTRL 0x06 /* ACS Control Register */
|
||||
#define PCI_ACS_EGRESS_CTL_V 0x08 /* ACS Egress Control Vector */
|
||||
|
||||
+/* Single Root I/O Virtualization */
|
||||
+#define PCI_SRIOV_CAP 0x04 /* SR-IOV Capabilities */
|
||||
+#define PCI_SRIOV_CAP_VFM 0x01 /* VF Migration Capable */
|
||||
+#define PCI_SRIOV_CAP_INTR(x) ((x) >> 21) /* Interrupt Message Number */
|
||||
+#define PCI_SRIOV_CTRL 0x08 /* SR-IOV Control */
|
||||
+#define PCI_SRIOV_CTRL_VFE 0x01 /* VF Enable */
|
||||
+#define PCI_SRIOV_CTRL_VFM 0x02 /* VF Migration Enable */
|
||||
+#define PCI_SRIOV_CTRL_INTR 0x04 /* VF Migration Interrupt Enable */
|
||||
+#define PCI_SRIOV_CTRL_MSE 0x08 /* VF Memory Space Enable */
|
||||
+#define PCI_SRIOV_CTRL_ARI 0x10 /* ARI Capable Hierarchy */
|
||||
+#define PCI_SRIOV_STATUS 0x0a /* SR-IOV Status */
|
||||
+#define PCI_SRIOV_STATUS_VFM 0x01 /* VF Migration Status */
|
||||
+#define PCI_SRIOV_INITIAL_VF 0x0c /* Initial VFs */
|
||||
+#define PCI_SRIOV_TOTAL_VF 0x0e /* Total VFs */
|
||||
+#define PCI_SRIOV_NUM_VF 0x10 /* Number of VFs */
|
||||
+#define PCI_SRIOV_FUNC_LINK 0x12 /* Function Dependency Link */
|
||||
+#define PCI_SRIOV_VF_OFFSET 0x14 /* First VF Offset */
|
||||
+#define PCI_SRIOV_VF_STRIDE 0x16 /* Following VF Stride */
|
||||
+#define PCI_SRIOV_VF_DID 0x1a /* VF Device ID */
|
||||
+#define PCI_SRIOV_SUP_PGSIZE 0x1c /* Supported Page Sizes */
|
||||
+#define PCI_SRIOV_SYS_PGSIZE 0x20 /* System Page Size */
|
||||
+#define PCI_SRIOV_BAR 0x24 /* VF BAR0 */
|
||||
+#define PCI_SRIOV_NUM_BARS 6 /* Number of VF BARs */
|
||||
+#define PCI_SRIOV_VFM 0x3c /* VF Migration State Array Offset*/
|
||||
+#define PCI_SRIOV_VFM_BIR(x) ((x) & 7) /* State BIR */
|
||||
+#define PCI_SRIOV_VFM_OFFSET(x) ((x) & ~7) /* State Offset */
|
||||
+#define PCI_SRIOV_VFM_UA 0x0 /* Inactive.Unavailable */
|
||||
+#define PCI_SRIOV_VFM_MI 0x1 /* Dormant.MigrateIn */
|
||||
+#define PCI_SRIOV_VFM_MO 0x2 /* Active.MigrateOut */
|
||||
+#define PCI_SRIOV_VFM_AV 0x3 /* Active.Available */
|
||||
+
|
||||
#endif /* LINUX_PCI_REGS_H */
|
@ -19,8 +19,10 @@ in the "raw" pass, though I haven't observed this case in practice).
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/io_apic.c
|
||||
+++ b/xen/arch/x86/io_apic.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/io_apic.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/io_apic.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/io_apic.c
|
||||
@@ -365,14 +365,12 @@ static void eoi_IO_APIC_irq(unsigned int
|
||||
spin_unlock_irqrestore(&ioapic_lock, flags);
|
||||
}
|
||||
|
@ -17,8 +17,10 @@ code.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/boot/Makefile
|
||||
+++ b/xen/arch/x86/boot/Makefile
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/boot/Makefile
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/boot/Makefile
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/boot/Makefile
|
||||
@@ -2,8 +2,8 @@ obj-y += head.o
|
||||
|
||||
head.o: reloc.S
|
||||
@ -30,8 +32,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
-reloc.S: $(BASEDIR)/include/asm-x86/config.h
|
||||
+reloc.S: head.S
|
||||
--- a/xen/arch/x86/boot/head.S
|
||||
+++ b/xen/arch/x86/boot/head.S
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/boot/head.S
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/boot/head.S
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/boot/head.S
|
||||
@@ -9,7 +9,7 @@
|
||||
.text
|
||||
.code32
|
||||
@ -59,8 +63,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
/* Copy bootstrap trampoline to low memory, below 1MB. */
|
||||
mov $sym_phys(trampoline_start),%esi
|
||||
mov $bootsym_phys(trampoline_start),%edi
|
||||
--- a/xen/arch/x86/boot/trampoline.S
|
||||
+++ b/xen/arch/x86/boot/trampoline.S
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/boot/trampoline.S
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/boot/trampoline.S
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/boot/trampoline.S
|
||||
@@ -4,6 +4,13 @@
|
||||
#undef bootsym
|
||||
#define bootsym(s) ((s)-trampoline_start)
|
||||
@ -133,8 +139,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
.code64
|
||||
start64:
|
||||
--- a/xen/arch/x86/boot/wakeup.S
|
||||
+++ b/xen/arch/x86/boot/wakeup.S
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/boot/wakeup.S
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/boot/wakeup.S
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/boot/wakeup.S
|
||||
@@ -42,15 +42,13 @@ ENTRY(wakeup_start)
|
||||
|
||||
# boot trampoline is under 1M, and shift its start into
|
||||
@ -202,8 +210,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
.code64
|
||||
wakeup_64:
|
||||
--- a/xen/arch/x86/efi/boot.c
|
||||
+++ b/xen/arch/x86/efi/boot.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/boot.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/efi/boot.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/boot.c
|
||||
@@ -599,6 +599,9 @@ static void __init relocate_image(unsign
|
||||
}
|
||||
}
|
||||
@ -281,9 +291,11 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
/* Set system registers and transfer control. */
|
||||
asm volatile("pushq $0\n\tpopfq");
|
||||
--- a/xen/arch/x86/smpboot.c
|
||||
+++ b/xen/arch/x86/smpboot.c
|
||||
@@ -49,6 +49,8 @@
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/smpboot.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/smpboot.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/smpboot.c
|
||||
@@ -48,6 +48,8 @@
|
||||
|
||||
#define setup_trampoline() (bootsym_phys(trampoline_realmode_entry))
|
||||
|
||||
@ -292,8 +304,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
/* Set if we find a B stepping CPU */
|
||||
static int smp_b_stepping;
|
||||
|
||||
--- a/xen/arch/x86/x86_32/mm.c
|
||||
+++ b/xen/arch/x86/x86_32/mm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/x86_32/mm.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/x86_32/mm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/x86_32/mm.c
|
||||
@@ -22,6 +22,7 @@
|
||||
#include <xen/lib.h>
|
||||
#include <xen/init.h>
|
||||
@ -314,8 +328,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
}
|
||||
|
||||
void __init subarch_init_memory(void)
|
||||
--- a/xen/arch/x86/x86_64/mm.c
|
||||
+++ b/xen/arch/x86/x86_64/mm.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/x86_64/mm.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/x86_64/mm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/x86_64/mm.c
|
||||
@@ -828,7 +828,7 @@ void __init zap_low_mappings(void)
|
||||
flush_local(FLUSH_TLB_GLOBAL);
|
||||
|
||||
@ -325,8 +341,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
PFN_UP(trampoline_end - trampoline_start),
|
||||
__PAGE_HYPERVISOR);
|
||||
}
|
||||
--- a/xen/arch/x86/xen.lds.S
|
||||
+++ b/xen/arch/x86/xen.lds.S
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/xen.lds.S
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/xen.lds.S
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/xen.lds.S
|
||||
@@ -103,6 +103,13 @@ SECTIONS
|
||||
*(.init.data)
|
||||
*(.init.data.rel)
|
||||
@ -341,8 +359,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
} :text
|
||||
. = ALIGN(32);
|
||||
.init.setup : {
|
||||
--- a/xen/include/asm-x86/config.h
|
||||
+++ b/xen/include/asm-x86/config.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/config.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/config.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/config.h
|
||||
@@ -95,13 +95,13 @@
|
||||
/* Primary stack is restricted to 8kB by guard pages. */
|
||||
#define PRIMARY_STACK_SIZE 8192
|
||||
|
@ -10,8 +10,10 @@ must be constructed artificially instead when booted from EFI.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/boot/edd.S
|
||||
+++ b/xen/arch/x86/boot/edd.S
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/boot/edd.S
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/boot/edd.S
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/boot/edd.S
|
||||
@@ -16,21 +16,13 @@
|
||||
* Updated and ported for Xen by Keir Fraser <keir@xensource.com> June 2007
|
||||
*/
|
||||
@ -36,8 +38,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
get_edd:
|
||||
cmpb $2, bootsym(opt_edd) # edd=off ?
|
||||
je edd_done
|
||||
--- a/xen/arch/x86/efi/boot.c
|
||||
+++ b/xen/arch/x86/efi/boot.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/efi/boot.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/efi/boot.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/efi/boot.c
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <xen/stringify.h>
|
||||
#include <xen/vga.h>
|
||||
@ -224,8 +228,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
/* XXX Collect EDID info. */
|
||||
|
||||
if ( cpuid_eax(0x80000000) > 0x80000000 )
|
||||
--- a/xen/include/asm-x86/edd.h
|
||||
+++ b/xen/include/asm-x86/edd.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/edd.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/edd.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/edd.h
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef __XEN_EDD_H__
|
||||
#define __XEN_EDD_H__
|
||||
|
@ -1,56 +0,0 @@
|
||||
# HG changeset patch
|
||||
# User Andrew Cooper <andrew.cooper3@citrix.com>
|
||||
# Date 1313744302 -3600
|
||||
# Node ID 0ddb4481f883ddf55c12a0b8d1445cf137ef0b63
|
||||
# Parent 9957bef3e7b4511f83ed8883cd5ecd49ea3ee95d
|
||||
x86/KEXEC: disable hpet legacy broadcasts earlier
|
||||
|
||||
On x2apic machines which booted in xapic mode,
|
||||
hpet_disable_legacy_broadcast() sends an event check IPI to all online
|
||||
processors. This leads to a protection fault as the genapic blindly
|
||||
pokes x2apic MSRs while the local apic is in xapic mode.
|
||||
|
||||
One option is to change genapic when we shut down the local apic, but
|
||||
there are still problems with trying to IPI processors in the online
|
||||
processor map which are actually sitting in NMI loops
|
||||
|
||||
Another option is to have each CPU take itself out of the online CPU
|
||||
map during the NMI shootdown.
|
||||
|
||||
Realistically however, disabling hpet legacy broadcasts earlier in the
|
||||
kexec path is the easiest fix to the problem.
|
||||
|
||||
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/crash.c
|
||||
+++ b/xen/arch/x86/crash.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <asm/hvm/support.h>
|
||||
#include <asm/apic.h>
|
||||
#include <asm/io_apic.h>
|
||||
+#include <asm/hpet.h>
|
||||
|
||||
static atomic_t waiting_for_crash_ipi;
|
||||
static unsigned int crashing_cpu;
|
||||
@@ -59,6 +60,9 @@ static void nmi_shootdown_cpus(void)
|
||||
|
||||
local_irq_disable();
|
||||
|
||||
+ if ( hpet_broadcast_is_available() )
|
||||
+ hpet_disable_legacy_broadcast();
|
||||
+
|
||||
crashing_cpu = smp_processor_id();
|
||||
local_irq_count(crashing_cpu) = 0;
|
||||
|
||||
--- a/xen/arch/x86/machine_kexec.c
|
||||
+++ b/xen/arch/x86/machine_kexec.c
|
||||
@@ -96,9 +96,6 @@ void machine_kexec(xen_kexec_image_t *im
|
||||
.limit = LAST_RESERVED_GDT_BYTE
|
||||
};
|
||||
|
||||
- if ( hpet_broadcast_is_available() )
|
||||
- hpet_disable_legacy_broadcast();
|
||||
-
|
||||
/*
|
||||
* compat_machine_kexec() returns to idle pagetables, which requires us
|
||||
* to be running on a static GDT mapping (idle pagetables have no GDT
|
@ -10,8 +10,10 @@ This is just another adjustment to allow systems with very many CPUs
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/ia64/linux-xen/acpi.c
|
||||
+++ b/xen/arch/ia64/linux-xen/acpi.c
|
||||
Index: xen-4.1.2-testing/xen/arch/ia64/linux-xen/acpi.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/ia64/linux-xen/acpi.c
|
||||
+++ xen-4.1.2-testing/xen/arch/ia64/linux-xen/acpi.c
|
||||
@@ -223,11 +223,14 @@ static u16 ia64_acpiid_to_sapicid[ MAX_L
|
||||
{[0 ... MAX_LOCAL_SAPIC - 1] = 0xffff };
|
||||
|
||||
@ -28,9 +30,11 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
apic_id = ia64_acpiid_to_sapicid[acpi_id];
|
||||
if ( apic_id == 0xffff )
|
||||
return -EINVAL;
|
||||
--- a/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ b/xen/arch/x86/acpi/cpu_idle.c
|
||||
@@ -871,11 +871,14 @@ static void set_cx(
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
@@ -901,11 +901,14 @@ static void set_cx(
|
||||
acpi_power->safe_state = cx;
|
||||
}
|
||||
|
||||
@ -46,7 +50,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
apic_id = x86_acpiid_to_apicid[acpi_id];
|
||||
if ( apic_id == BAD_APICID )
|
||||
return -1;
|
||||
@@ -952,7 +955,7 @@ long set_cx_pminfo(uint32_t cpu, struct
|
||||
@@ -982,7 +985,7 @@ long set_cx_pminfo(uint32_t cpu, struct
|
||||
print_cx_pminfo(cpu, power);
|
||||
|
||||
/* map from acpi_id to cpu_id */
|
||||
@ -55,8 +59,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
if ( cpu_id == -1 )
|
||||
{
|
||||
printk(XENLOG_ERR "no cpu_id for acpi_id %d\n", cpu);
|
||||
--- a/xen/include/acpi/cpufreq/processor_perf.h
|
||||
+++ b/xen/include/acpi/cpufreq/processor_perf.h
|
||||
Index: xen-4.1.2-testing/xen/include/acpi/cpufreq/processor_perf.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/acpi/cpufreq/processor_perf.h
|
||||
+++ xen-4.1.2-testing/xen/include/acpi/cpufreq/processor_perf.h
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#define XEN_PX_INIT 0x80000000
|
||||
|
@ -20,8 +20,10 @@ Based on a Linux patch from suresh.b.siddha@intel.com.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/io_apic.c
|
||||
+++ b/xen/arch/x86/io_apic.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/io_apic.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/io_apic.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/io_apic.c
|
||||
@@ -375,11 +375,46 @@ static void clear_IO_APIC_pin(unsigned i
|
||||
return;
|
||||
|
||||
|
@ -17,8 +17,10 @@ extension (which the Dom0 kernel should have no need to know about).
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/ia64/linux-xen/acpi.c
|
||||
+++ b/xen/arch/ia64/linux-xen/acpi.c
|
||||
Index: xen-4.1.2-testing/xen/arch/ia64/linux-xen/acpi.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/ia64/linux-xen/acpi.c
|
||||
+++ xen-4.1.2-testing/xen/arch/ia64/linux-xen/acpi.c
|
||||
@@ -243,6 +243,13 @@ int get_cpu_id(u32 acpi_id)
|
||||
|
||||
return -1;
|
||||
@ -33,9 +35,11 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#endif
|
||||
|
||||
static int __init
|
||||
--- a/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ b/xen/arch/x86/acpi/cpu_idle.c
|
||||
@@ -619,12 +619,6 @@ static int init_cx_pminfo(struct acpi_pr
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/acpi/cpu_idle.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
@@ -649,12 +649,6 @@ static int cpuidle_init_cpu(int cpu)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -48,8 +52,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#define MWAIT_SUBSTATE_MASK (0xf)
|
||||
#define MWAIT_SUBSTATE_SIZE (4)
|
||||
|
||||
--- a/xen/arch/x86/acpi/boot.c
|
||||
+++ b/xen/arch/x86/acpi/boot.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/acpi/boot.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/acpi/boot.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/acpi/boot.c
|
||||
@@ -1006,3 +1006,47 @@ unsigned int acpi_get_processor_id(unsig
|
||||
|
||||
return INVALID_ACPIID;
|
||||
@ -98,8 +104,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
--- a/xen/arch/x86/platform_hypercall.c
|
||||
+++ b/xen/arch/x86/platform_hypercall.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/platform_hypercall.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/platform_hypercall.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/platform_hypercall.c
|
||||
@@ -419,6 +419,15 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
@ -116,8 +124,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
default:
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
--- a/xen/drivers/acpi/pmstat.c
|
||||
+++ b/xen/drivers/acpi/pmstat.c
|
||||
Index: xen-4.1.2-testing/xen/drivers/acpi/pmstat.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/drivers/acpi/pmstat.c
|
||||
+++ xen-4.1.2-testing/xen/drivers/acpi/pmstat.c
|
||||
@@ -519,3 +519,34 @@ int do_pm_op(struct xen_sysctl_pm_op *op
|
||||
|
||||
return ret;
|
||||
@ -153,8 +163,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+
|
||||
+ return ret;
|
||||
+}
|
||||
--- a/xen/include/acpi/cpufreq/processor_perf.h
|
||||
+++ b/xen/include/acpi/cpufreq/processor_perf.h
|
||||
Index: xen-4.1.2-testing/xen/include/acpi/cpufreq/processor_perf.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/acpi/cpufreq/processor_perf.h
|
||||
+++ xen-4.1.2-testing/xen/include/acpi/cpufreq/processor_perf.h
|
||||
@@ -3,10 +3,10 @@
|
||||
|
||||
#include <public/platform.h>
|
||||
@ -167,8 +179,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
int powernow_cpufreq_init(void);
|
||||
unsigned int powernow_register_driver(void);
|
||||
unsigned int get_measured_perf(unsigned int cpu, unsigned int flag);
|
||||
--- a/xen/include/acpi/pdc_intel.h
|
||||
+++ b/xen/include/acpi/pdc_intel.h
|
||||
Index: xen-4.1.2-testing/xen/include/acpi/pdc_intel.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/acpi/pdc_intel.h
|
||||
+++ xen-4.1.2-testing/xen/include/acpi/pdc_intel.h
|
||||
@@ -4,6 +4,8 @@
|
||||
#ifndef __PDC_INTEL_H__
|
||||
#define __PDC_INTEL_H__
|
||||
@ -212,8 +226,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
+ ACPI_PDC_SMP_T_SWCOORD)
|
||||
+
|
||||
#endif /* __PDC_INTEL_H__ */
|
||||
--- a/xen/include/asm-x86/cpufeature.h
|
||||
+++ b/xen/include/asm-x86/cpufeature.h
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/cpufeature.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/cpufeature.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/cpufeature.h
|
||||
@@ -150,6 +150,10 @@
|
||||
#define boot_cpu_has(bit) test_bit(bit, boot_cpu_data.x86_capability)
|
||||
#define cpufeat_mask(idx) (1u << ((idx) & 31))
|
||||
@ -225,8 +241,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
#ifdef __i386__
|
||||
#define cpu_has_vme boot_cpu_has(X86_FEATURE_VME)
|
||||
#define cpu_has_de boot_cpu_has(X86_FEATURE_DE)
|
||||
--- a/xen/include/public/platform.h
|
||||
+++ b/xen/include/public/platform.h
|
||||
Index: xen-4.1.2-testing/xen/include/public/platform.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/public/platform.h
|
||||
+++ xen-4.1.2-testing/xen/include/public/platform.h
|
||||
@@ -304,6 +304,7 @@ DEFINE_XEN_GUEST_HANDLE(xenpf_getidletim
|
||||
#define XEN_PM_CX 0
|
||||
#define XEN_PM_PX 1
|
||||
@ -243,8 +261,10 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
} u;
|
||||
};
|
||||
typedef struct xenpf_set_processor_pminfo xenpf_set_processor_pminfo_t;
|
||||
--- a/xen/include/xen/acpi.h
|
||||
+++ b/xen/include/xen/acpi.h
|
||||
Index: xen-4.1.2-testing/xen/include/xen/acpi.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/acpi.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/acpi.h
|
||||
@@ -334,6 +334,8 @@ static inline int acpi_boot_table_init(v
|
||||
|
||||
#endif /*!CONFIG_ACPI_BOOT*/
|
||||
|
82
23795-intel-ich10-quirk.patch
Normal file
82
23795-intel-ich10-quirk.patch
Normal file
@ -0,0 +1,82 @@
|
||||
References: bnc#683580
|
||||
|
||||
# HG changeset patch
|
||||
# User Jan Beulich <jbeulich@novell.com>
|
||||
# Date 1314443678 -3600
|
||||
# Node ID e17f70940d1f57fe04dde3bf4e243f75c89f0d0e
|
||||
# Parent 4705eca37c9fac9d13867a856bdcfa8b7bad56c6
|
||||
x86: work around certain Intel BIOSes causing (transient) hangs during boot
|
||||
|
||||
They apparently leave the USB legacy emulation bits set in ICH10's
|
||||
SMI Control and Enable register, but fail to handle the resulting SMIs
|
||||
gracefully. The hangs can apparently extend indefinitely, but are
|
||||
commonly observed to last between a few seconds and a minute.
|
||||
|
||||
This assumes that only ICH10-based systems on Intel main boards with
|
||||
Intel BIOS may be affected. Until Intel comes up with a more precise
|
||||
identification of affected BIOSes, all Intel ones on Intel boards
|
||||
will get this workaround applied.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/dmi_scan.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/dmi_scan.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/dmi_scan.c
|
||||
@@ -10,6 +10,8 @@
|
||||
#include <asm/system.h>
|
||||
#include <xen/dmi.h>
|
||||
#include <xen/efi.h>
|
||||
+#include <xen/pci.h>
|
||||
+#include <xen/pci_regs.h>
|
||||
|
||||
#define bt_ioremap(b,l) ((void *)__acpi_map_table(b,l))
|
||||
#define bt_iounmap(b,l) ((void)0)
|
||||
@@ -278,6 +280,28 @@ static __init int broken_toshiba_keyboar
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int __init ich10_bios_quirk(struct dmi_system_id *d)
|
||||
+{
|
||||
+ u32 port, smictl;
|
||||
+
|
||||
+ if ( pci_conf_read16(0, 0x1f, 0, PCI_VENDOR_ID) != 0x8086 )
|
||||
+ return 0;
|
||||
+
|
||||
+ switch ( pci_conf_read16(0, 0x1f, 0, PCI_DEVICE_ID) ) {
|
||||
+ case 0x3a14:
|
||||
+ case 0x3a16:
|
||||
+ case 0x3a18:
|
||||
+ case 0x3a1a:
|
||||
+ port = (pci_conf_read16(0, 0x1f, 0, 0x40) & 0xff80) + 0x30;
|
||||
+ smictl = inl(port);
|
||||
+ /* turn off LEGACY_USB{,2}_EN if enabled */
|
||||
+ if ( smictl & 0x20008 )
|
||||
+ outl(smictl & ~0x20008, port);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
#ifdef CONFIG_ACPI_SLEEP
|
||||
static __init int reset_videomode_after_s3(struct dmi_blacklist *d)
|
||||
@@ -363,6 +387,18 @@ static __initdata struct dmi_blacklist d
|
||||
} },
|
||||
#endif
|
||||
|
||||
+ { ich10_bios_quirk, "Intel board & BIOS",
|
||||
+ /*
|
||||
+ * BIOS leaves legacy USB emulation enabled while
|
||||
+ * SMM can't properly handle it.
|
||||
+ */
|
||||
+ {
|
||||
+ MATCH(DMI_BOARD_VENDOR, "Intel Corp"),
|
||||
+ MATCH(DMI_BIOS_VENDOR, "Intel Corp"),
|
||||
+ NO_MATCH, NO_MATCH
|
||||
+ }
|
||||
+ },
|
||||
+
|
||||
#ifdef CONFIG_ACPI_BOOT
|
||||
/*
|
||||
* If your system is blacklisted here, but you find that acpi=force
|
23
23800-x86_64-guest-addr-range.patch
Normal file
23
23800-x86_64-guest-addr-range.patch
Normal file
@ -0,0 +1,23 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir@xen.org>
|
||||
# Date 1314800089 -3600
|
||||
# Node ID 72edc40e2942a3cf0ee8e0d3a330d2e5c2bdfb53
|
||||
# Parent ac9aa65050e9abc8f1c12c8603acf3b99e22cddc
|
||||
x86-64: Fix off-by-one error in __addr_ok() macro
|
||||
|
||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
Index: xen-4.1.2-testing/xen/include/asm-x86/x86_64/uaccess.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/asm-x86/x86_64/uaccess.h
|
||||
+++ xen-4.1.2-testing/xen/include/asm-x86/x86_64/uaccess.h
|
||||
@@ -21,7 +21,7 @@ void free_compat_arg_xlat(struct vcpu *v
|
||||
* non-canonical address (and thus fault) before ever reaching VIRT_START.
|
||||
*/
|
||||
#define __addr_ok(addr) \
|
||||
- (((unsigned long)(addr) < (1UL<<48)) || \
|
||||
+ (((unsigned long)(addr) < (1UL<<47)) || \
|
||||
((unsigned long)(addr) >= HYPERVISOR_VIRT_END))
|
||||
|
||||
#define access_ok(addr, size) \
|
109
23804-x86-IPI-counts.patch
Normal file
109
23804-x86-IPI-counts.patch
Normal file
@ -0,0 +1,109 @@
|
||||
# HG changeset patch
|
||||
# User Kevin Tian <kevin.tian@intel.com>
|
||||
# Date 1314800303 -3600
|
||||
# Node ID 42d76c68b2bfbedee3e5f79d32344e14bce48b0f
|
||||
# Parent 51983821efa4db4040ae1c5063a4404791597699
|
||||
x86: add irq count for IPIs
|
||||
|
||||
such count is useful to assist decision make in cpuidle governor,
|
||||
while w/o this patch only device interrupts through do_IRQ is
|
||||
currently counted.
|
||||
|
||||
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
|
||||
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/apic.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/apic.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/apic.c
|
||||
@@ -1372,6 +1372,7 @@ fastcall void smp_apic_timer_interrupt(s
|
||||
struct cpu_user_regs *old_regs = set_irq_regs(regs);
|
||||
ack_APIC_irq();
|
||||
perfc_incr(apic_timer);
|
||||
+ this_cpu(irq_count)++;
|
||||
raise_softirq(TIMER_SOFTIRQ);
|
||||
set_irq_regs(old_regs);
|
||||
}
|
||||
@@ -1393,6 +1394,7 @@ fastcall void smp_spurious_interrupt(str
|
||||
unsigned long v;
|
||||
struct cpu_user_regs *old_regs = set_irq_regs(regs);
|
||||
|
||||
+ this_cpu(irq_count)++;
|
||||
irq_enter();
|
||||
|
||||
/*
|
||||
@@ -1428,6 +1430,7 @@ fastcall void smp_error_interrupt(struct
|
||||
unsigned long v, v1;
|
||||
struct cpu_user_regs *old_regs = set_irq_regs(regs);
|
||||
|
||||
+ this_cpu(irq_count)++;
|
||||
irq_enter();
|
||||
/* First tickle the hardware, only then report what went on. -- REW */
|
||||
v = apic_read(APIC_ESR);
|
||||
@@ -1459,6 +1462,7 @@ fastcall void smp_pmu_apic_interrupt(str
|
||||
{
|
||||
struct cpu_user_regs *old_regs = set_irq_regs(regs);
|
||||
ack_APIC_irq();
|
||||
+ this_cpu(irq_count)++;
|
||||
hvm_do_pmu_interrupt(regs);
|
||||
set_irq_regs(old_regs);
|
||||
}
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/cpu/mcheck/mce_intel.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/cpu/mcheck/mce_intel.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/cpu/mcheck/mce_intel.c
|
||||
@@ -66,6 +66,7 @@ static void (*vendor_thermal_interrupt)(
|
||||
fastcall void smp_thermal_interrupt(struct cpu_user_regs *regs)
|
||||
{
|
||||
struct cpu_user_regs *old_regs = set_irq_regs(regs);
|
||||
+ this_cpu(irq_count)++;
|
||||
irq_enter();
|
||||
vendor_thermal_interrupt(regs);
|
||||
irq_exit();
|
||||
@@ -1094,6 +1095,7 @@ fastcall void smp_cmci_interrupt(struct
|
||||
struct cpu_user_regs *old_regs = set_irq_regs(regs);
|
||||
|
||||
ack_APIC_irq();
|
||||
+ this_cpu(irq_count)++;
|
||||
irq_enter();
|
||||
|
||||
mctc = mcheck_mca_logout(
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/io_apic.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/io_apic.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/io_apic.c
|
||||
@@ -434,6 +434,7 @@ fastcall void smp_irq_move_cleanup_inter
|
||||
struct cpu_user_regs *old_regs = set_irq_regs(regs);
|
||||
|
||||
ack_APIC_irq();
|
||||
+ this_cpu(irq_count)++;
|
||||
irq_enter();
|
||||
|
||||
me = smp_processor_id();
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/smp.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/smp.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/smp.c
|
||||
@@ -221,6 +221,7 @@ fastcall void smp_invalidate_interrupt(v
|
||||
{
|
||||
ack_APIC_irq();
|
||||
perfc_incr(ipis);
|
||||
+ this_cpu(irq_count)++;
|
||||
irq_enter();
|
||||
if ( !__sync_local_execstate() ||
|
||||
(flush_flags & (FLUSH_TLB_GLOBAL | FLUSH_CACHE)) )
|
||||
@@ -385,6 +386,7 @@ fastcall void smp_event_check_interrupt(
|
||||
struct cpu_user_regs *old_regs = set_irq_regs(regs);
|
||||
ack_APIC_irq();
|
||||
perfc_incr(ipis);
|
||||
+ this_cpu(irq_count)++;
|
||||
set_irq_regs(old_regs);
|
||||
}
|
||||
|
||||
@@ -421,6 +423,7 @@ fastcall void smp_call_function_interrup
|
||||
|
||||
ack_APIC_irq();
|
||||
perfc_incr(ipis);
|
||||
+ this_cpu(irq_count)++;
|
||||
__smp_call_function_interrupt();
|
||||
set_irq_regs(old_regs);
|
||||
}
|
199
23833-x86-IO-APIC-EOI.patch
Normal file
199
23833-x86-IO-APIC-EOI.patch
Normal file
@ -0,0 +1,199 @@
|
||||
# HG changeset patch
|
||||
# User Andrew Cooper <andrew.cooper3@citrix.com>
|
||||
# Date 1315906390 -3600
|
||||
# Node ID ffe8e65f6687cde49b2cb2bf991bd3f5dff9c189
|
||||
# Parent ad3b4bb097cb6308f73e597c5412395ad783ea4a
|
||||
IRQ: IO-APIC support End Of Interrupt for older IO-APICs
|
||||
|
||||
The old io_apic_eoi() function using the EOI register only works for
|
||||
IO-APICs with a version of 0x20. Older IO-APICs do not have an EOI
|
||||
register so line level interrupts have to be EOI'd by flipping the
|
||||
mode to edge and back, which clears the IRR and Delivery Status bits.
|
||||
|
||||
This patch replaces the current io_apic_eoi() function with one which
|
||||
takes into account the version of the IO-APIC and EOI's
|
||||
appropriately.
|
||||
|
||||
v2: make recursive call to __io_apic_eoi() to reduce code size.
|
||||
|
||||
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/io_apic.c
|
||||
+++ b/xen/arch/x86/io_apic.c
|
||||
@@ -66,6 +66,13 @@ int __read_mostly nr_ioapics;
|
||||
#define MAX_PLUS_SHARED_IRQS nr_irqs_gsi
|
||||
#define PIN_MAP_SIZE (MAX_PLUS_SHARED_IRQS + nr_irqs_gsi)
|
||||
|
||||
+
|
||||
+#define ioapic_has_eoi_reg(apic) (mp_ioapics[(apic)].mpc_apicver >= 0x20)
|
||||
+
|
||||
+#define io_apic_eoi_vector(apic, vector) io_apic_eoi((apic), (vector), -1)
|
||||
+#define io_apic_eoi_pin(apic, pin) io_apic_eoi((apic), -1, (pin))
|
||||
+
|
||||
+
|
||||
/*
|
||||
* This is performance-critical, we want to do it O(1)
|
||||
*
|
||||
@@ -201,6 +208,105 @@ static void ioapic_write_entry(int apic,
|
||||
spin_unlock_irqrestore(&ioapic_lock, flags);
|
||||
}
|
||||
|
||||
+/* EOI an IO-APIC entry. One of vector or pin may be -1, indicating that
|
||||
+ * it should be worked out using the other. This function expect that the
|
||||
+ * ioapic_lock is taken, and interrupts are disabled (or there is a good reason
|
||||
+ * not to), and that if both pin and vector are passed, that they refer to the
|
||||
+ * same redirection entry in the IO-APIC. */
|
||||
+static void __io_apic_eoi(unsigned int apic, unsigned int vector, unsigned int pin)
|
||||
+{
|
||||
+ /* Ensure some useful information is passed in */
|
||||
+ BUG_ON( (vector == -1 && pin == -1) );
|
||||
+
|
||||
+ /* Prefer the use of the EOI register if available */
|
||||
+ if ( ioapic_has_eoi_reg(apic) )
|
||||
+ {
|
||||
+ /* If vector is unknown, read it from the IO-APIC */
|
||||
+ if ( vector == -1 )
|
||||
+ vector = __ioapic_read_entry(apic, pin, TRUE).vector;
|
||||
+
|
||||
+ *(IO_APIC_BASE(apic)+16) = vector;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ /* Else fake an EOI by switching to edge triggered mode
|
||||
+ * and back */
|
||||
+ struct IO_APIC_route_entry entry;
|
||||
+ bool_t need_to_unmask = 0;
|
||||
+
|
||||
+ /* If pin is unknown, search for it */
|
||||
+ if ( pin == -1 )
|
||||
+ {
|
||||
+ unsigned int p;
|
||||
+ for ( p = 0; p < nr_ioapic_registers[apic]; ++p )
|
||||
+ {
|
||||
+ entry = __ioapic_read_entry(apic, p, TRUE);
|
||||
+ if ( entry.vector == vector )
|
||||
+ {
|
||||
+ pin = p;
|
||||
+ /* break; */
|
||||
+
|
||||
+ /* Here should be a break out of the loop, but at the
|
||||
+ * Xen code doesn't actually prevent multiple IO-APIC
|
||||
+ * entries being assigned the same vector, so EOI all
|
||||
+ * pins which have the correct vector.
|
||||
+ *
|
||||
+ * Remove the following code when the above assertion
|
||||
+ * is fulfilled. */
|
||||
+ __io_apic_eoi(apic, vector, p);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ /* If search fails, nothing to do */
|
||||
+
|
||||
+ /* if ( pin == -1 ) */
|
||||
+
|
||||
+ /* Because the loop wasn't broken out of (see comment above),
|
||||
+ * all relevant pins have been EOI, so we can always return.
|
||||
+ *
|
||||
+ * Re-instate the if statement above when the Xen logic has been
|
||||
+ * fixed.*/
|
||||
+
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ entry = __ioapic_read_entry(apic, pin, TRUE);
|
||||
+
|
||||
+ if ( ! entry.mask )
|
||||
+ {
|
||||
+ /* If entry is not currently masked, mask it and make
|
||||
+ * a note to unmask it later */
|
||||
+ entry.mask = 1;
|
||||
+ __ioapic_write_entry(apic, pin, TRUE, entry);
|
||||
+ need_to_unmask = 1;
|
||||
+ }
|
||||
+
|
||||
+ /* Flip the trigger mode to edge and back */
|
||||
+ entry.trigger = 0;
|
||||
+ __ioapic_write_entry(apic, pin, TRUE, entry);
|
||||
+ entry.trigger = 1;
|
||||
+ __ioapic_write_entry(apic, pin, TRUE, entry);
|
||||
+
|
||||
+ if ( need_to_unmask )
|
||||
+ {
|
||||
+ /* Unmask if neccesary */
|
||||
+ entry.mask = 0;
|
||||
+ __ioapic_write_entry(apic, pin, TRUE, entry);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/* EOI an IO-APIC entry. One of vector or pin may be -1, indicating that
|
||||
+ * it should be worked out using the other. This function disables interrupts
|
||||
+ * and takes the ioapic_lock */
|
||||
+static void io_apic_eoi(unsigned int apic, unsigned int vector, unsigned int pin)
|
||||
+{
|
||||
+ unsigned int flags;
|
||||
+ spin_lock_irqsave(&ioapic_lock, flags);
|
||||
+ __io_apic_eoi(apic, vector, pin);
|
||||
+ spin_unlock_irqrestore(&ioapic_lock, flags);
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Saves all the IO-APIC RTE's
|
||||
*/
|
||||
@@ -350,7 +456,7 @@ static void __eoi_IO_APIC_irq(unsigned i
|
||||
pin = entry->pin;
|
||||
if (pin == -1)
|
||||
break;
|
||||
- io_apic_eoi(entry->apic, vector);
|
||||
+ __io_apic_eoi(entry->apic, vector, pin);
|
||||
if (!entry->next)
|
||||
break;
|
||||
entry = irq_2_pin + entry->next;
|
||||
@@ -390,18 +496,7 @@ static void clear_IO_APIC_pin(unsigned i
|
||||
entry.trigger = 1;
|
||||
__ioapic_write_entry(apic, pin, TRUE, entry);
|
||||
}
|
||||
- if (mp_ioapics[apic].mpc_apicver >= 0x20)
|
||||
- io_apic_eoi(apic, entry.vector);
|
||||
- else {
|
||||
- /*
|
||||
- * Mechanism by which we clear remoteIRR in this case is by
|
||||
- * changing the trigger mode to edge and back to level.
|
||||
- */
|
||||
- entry.trigger = 0;
|
||||
- __ioapic_write_entry(apic, pin, TRUE, entry);
|
||||
- entry.trigger = 1;
|
||||
- __ioapic_write_entry(apic, pin, TRUE, entry);
|
||||
- }
|
||||
+ __io_apic_eoi(apic, entry.vector, pin);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1731,7 +1826,7 @@ static void end_level_ioapic_irq (unsign
|
||||
{
|
||||
int ioapic;
|
||||
for (ioapic = 0; ioapic < nr_ioapics; ioapic++)
|
||||
- io_apic_eoi(ioapic, i);
|
||||
+ io_apic_eoi_vector(ioapic, i);
|
||||
}
|
||||
|
||||
v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1));
|
||||
@@ -2604,3 +2699,4 @@ void __init init_ioapic_mappings(void)
|
||||
printk(XENLOG_INFO "IRQ limits: %u GSI, %u MSI/MSI-X\n",
|
||||
nr_irqs_gsi, nr_irqs - nr_irqs_gsi);
|
||||
}
|
||||
+
|
||||
--- a/xen/include/asm-x86/io_apic.h
|
||||
+++ b/xen/include/asm-x86/io_apic.h
|
||||
@@ -157,11 +157,6 @@ static inline void io_apic_write(unsigne
|
||||
__io_apic_write(apic, reg, value);
|
||||
}
|
||||
|
||||
-static inline void io_apic_eoi(unsigned int apic, unsigned int vector)
|
||||
-{
|
||||
- *(IO_APIC_BASE(apic)+16) = vector;
|
||||
-}
|
||||
-
|
||||
/*
|
||||
* Re-write a value: to be used for read-modify-write
|
||||
* cycles where the read already set up the index register.
|
@ -1,8 +1,8 @@
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -2926,7 +2926,7 @@ class XendDomainInfo:
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -2930,7 +2930,7 @@ class XendDomainInfo:
|
||||
|
||||
self.guest_bitsize = self.image.getBitSize()
|
||||
# Make sure there's enough RAM available for the domain
|
||||
|
@ -29,10 +29,10 @@ keycodes up and down events and make sure the intentionally added altgr keycode
|
||||
|
||||
Signed-off by Chunyan Liu (cyliu@novell.com)
|
||||
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/vnc.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/vnc.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
@@ -1308,6 +1308,9 @@ static void do_key_event(VncState *vs, i
|
||||
shift_keys = vs->modifiers_state[0x2a] | vs->modifiers_state[0x36];
|
||||
altgr_keys = vs->modifiers_state[0xb8];
|
||||
|
@ -1,10 +1,10 @@
|
||||
Subject: modify default read/write flag in bdrv_init.
|
||||
Signed-off by Chunyan Liu <cyliu@novell.com>
|
||||
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/vl.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/vl.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/vl.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/vl.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/vl.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/vl.c
|
||||
@@ -2617,6 +2617,8 @@ int drive_init(struct drive_opt *arg, in
|
||||
strncpy(drives_table[nb_drives].serial, serial, sizeof(serial));
|
||||
nb_drives++;
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/block.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/block.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/block.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/block.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/block.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/block.c
|
||||
@@ -350,7 +350,7 @@ int bdrv_file_open(BlockDriverState **pb
|
||||
|
||||
int bdrv_open(BlockDriverState *bs, const char *filename, int flags)
|
||||
@ -28,10 +28,10 @@ Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/block.c
|
||||
ret = drv->bdrv_open(bs, filename, open_flags);
|
||||
if ((ret == -EACCES || ret == -EPERM) && !(flags & BDRV_O_FILE)) {
|
||||
ret = drv->bdrv_open(bs, filename, open_flags & ~BDRV_O_RDWR);
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
@@ -551,7 +551,7 @@ USBDevice *usb_msd_init(const char *file
|
||||
s = qemu_mallocz(sizeof(MSDState));
|
||||
|
||||
@ -41,10 +41,10 @@ Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/hw/usb-msd.c
|
||||
goto fail;
|
||||
s->bs = bdrv;
|
||||
*pbs = bdrv;
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/qemu-img.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/qemu-img.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/qemu-img.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/qemu-img.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/qemu-img.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/qemu-img.c
|
||||
@@ -32,7 +32,7 @@
|
||||
#endif
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
@@ -237,6 +237,7 @@ static int open_disk(struct td_state *s,
|
||||
BlockDriver* drv;
|
||||
char* devname;
|
||||
@ -19,10 +19,10 @@ Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
fprintf(stderr, "Could not open image file %s\n", path);
|
||||
return -ENOMEM;
|
||||
}
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/xenstore.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
@@ -136,7 +136,8 @@ static void insert_media(void *opaque)
|
||||
else
|
||||
format = &bdrv_raw;
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/blktap/drivers/block-cdrom.c
|
||||
Index: xen-4.1.2-testing/tools/blktap/drivers/block-cdrom.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-4.1.1-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+++ xen-4.1.2-testing/tools/blktap/drivers/block-cdrom.c
|
||||
@@ -0,0 +1,535 @@
|
||||
+/* block-cdrom.c
|
||||
+ *
|
||||
@ -538,10 +538,10 @@ Index: xen-4.1.1-testing/tools/blktap/drivers/block-cdrom.c
|
||||
+ .td_get_parent_id = tdcdrom_get_parent_id,
|
||||
+ .td_validate_parent = tdcdrom_validate_parent
|
||||
+};
|
||||
Index: xen-4.1.1-testing/xen/include/public/io/cdromif.h
|
||||
Index: xen-4.1.2-testing/xen/include/public/io/cdromif.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-4.1.1-testing/xen/include/public/io/cdromif.h
|
||||
+++ xen-4.1.2-testing/xen/include/public/io/cdromif.h
|
||||
@@ -0,0 +1,122 @@
|
||||
+/******************************************************************************
|
||||
+ * cdromif.h
|
||||
@ -665,10 +665,10 @@ Index: xen-4.1.1-testing/xen/include/public/io/cdromif.h
|
||||
+ sizeof(struct vcd_generic_command) - sizeof(struct request_sense))
|
||||
+
|
||||
+#endif
|
||||
Index: xen-4.1.1-testing/tools/blktap/drivers/Makefile
|
||||
Index: xen-4.1.2-testing/tools/blktap/drivers/Makefile
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/blktap/drivers/Makefile
|
||||
+++ xen-4.1.1-testing/tools/blktap/drivers/Makefile
|
||||
--- xen-4.1.2-testing.orig/tools/blktap/drivers/Makefile
|
||||
+++ xen-4.1.2-testing/tools/blktap/drivers/Makefile
|
||||
@@ -28,8 +28,9 @@ CFLAGS += -DMEMSHR
|
||||
MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a
|
||||
endif
|
||||
@ -689,10 +689,10 @@ Index: xen-4.1.1-testing/tools/blktap/drivers/Makefile
|
||||
BLK-OBJS-y += aes.o
|
||||
BLK-OBJS-y += tapaio.o
|
||||
BLK-OBJS-$(CONFIG_Linux) += blk_linux.o
|
||||
Index: xen-4.1.1-testing/tools/blktap/drivers/tapdisk.h
|
||||
Index: xen-4.1.2-testing/tools/blktap/drivers/tapdisk.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/blktap/drivers/tapdisk.h
|
||||
+++ xen-4.1.1-testing/tools/blktap/drivers/tapdisk.h
|
||||
--- xen-4.1.2-testing.orig/tools/blktap/drivers/tapdisk.h
|
||||
+++ xen-4.1.2-testing/tools/blktap/drivers/tapdisk.h
|
||||
@@ -137,6 +137,9 @@ struct tap_disk {
|
||||
int (*td_get_parent_id) (struct disk_driver *dd, struct disk_id *id);
|
||||
int (*td_validate_parent)(struct disk_driver *dd,
|
||||
@ -737,10 +737,10 @@ Index: xen-4.1.1-testing/tools/blktap/drivers/tapdisk.h
|
||||
};
|
||||
|
||||
typedef struct driver_list_entry {
|
||||
Index: xen-4.1.1-testing/tools/blktap/lib/blktaplib.h
|
||||
Index: xen-4.1.2-testing/tools/blktap/lib/blktaplib.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/blktap/lib/blktaplib.h
|
||||
+++ xen-4.1.1-testing/tools/blktap/lib/blktaplib.h
|
||||
--- xen-4.1.2-testing.orig/tools/blktap/lib/blktaplib.h
|
||||
+++ xen-4.1.2-testing/tools/blktap/lib/blktaplib.h
|
||||
@@ -225,6 +225,7 @@ typedef struct msg_pid {
|
||||
#define DISK_TYPE_RAM 3
|
||||
#define DISK_TYPE_QCOW 4
|
||||
@ -749,10 +749,10 @@ Index: xen-4.1.1-testing/tools/blktap/lib/blktaplib.h
|
||||
|
||||
/* xenstore/xenbus: */
|
||||
#define DOMNAME "Domain-0"
|
||||
Index: xen-4.1.1-testing/xen/include/public/io/blkif.h
|
||||
Index: xen-4.1.2-testing/xen/include/public/io/blkif.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/include/public/io/blkif.h
|
||||
+++ xen-4.1.1-testing/xen/include/public/io/blkif.h
|
||||
--- xen-4.1.2-testing.orig/xen/include/public/io/blkif.h
|
||||
+++ xen-4.1.2-testing/xen/include/public/io/blkif.h
|
||||
@@ -80,7 +80,7 @@
|
||||
* Used in SLES sources for device specific command packet
|
||||
* contained within the request. Reserved for that purpose.
|
||||
@ -762,10 +762,10 @@ Index: xen-4.1.1-testing/xen/include/public/io/blkif.h
|
||||
/*
|
||||
* Recognised only if "feature-trim" is present in backend xenbus info.
|
||||
* The "feature-trim" node contains a boolean indicating whether trim
|
||||
Index: xen-4.1.1-testing/tools/blktap/drivers/tapdisk.c
|
||||
Index: xen-4.1.2-testing/tools/blktap/drivers/tapdisk.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/blktap/drivers/tapdisk.c
|
||||
+++ xen-4.1.1-testing/tools/blktap/drivers/tapdisk.c
|
||||
--- xen-4.1.2-testing.orig/tools/blktap/drivers/tapdisk.c
|
||||
+++ xen-4.1.2-testing/tools/blktap/drivers/tapdisk.c
|
||||
@@ -735,6 +735,22 @@ static void get_io_request(struct td_sta
|
||||
goto out;
|
||||
}
|
||||
@ -789,10 +789,10 @@ Index: xen-4.1.1-testing/tools/blktap/drivers/tapdisk.c
|
||||
default:
|
||||
DPRINTF("Unknown block operation\n");
|
||||
break;
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/server/BlktapController.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/server/BlktapController.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/server/BlktapController.py
|
||||
@@ -15,6 +15,7 @@ blktap1_disk_types = [
|
||||
'ram',
|
||||
'qcow',
|
||||
|
12
blktap.patch
12
blktap.patch
@ -1,10 +1,10 @@
|
||||
bug #239173
|
||||
bug #242953
|
||||
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -3295,7 +3295,7 @@ class XendDomainInfo:
|
||||
(fn, BOOTLOADER_LOOPBACK_DEVICE))
|
||||
|
||||
@ -14,10 +14,10 @@ Index: xen-4.1.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
'device': BOOTLOADER_LOOPBACK_DEVICE,
|
||||
}
|
||||
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/xenstore.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
@@ -447,9 +447,9 @@ void xenstore_parse_domain_config(int hv
|
||||
{
|
||||
char **e_danger = NULL;
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/blktap/drivers/tapdisk.h
|
||||
Index: xen-4.1.2-testing/tools/blktap/drivers/tapdisk.h
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/blktap/drivers/tapdisk.h
|
||||
+++ xen-4.1.1-testing/tools/blktap/drivers/tapdisk.h
|
||||
--- xen-4.1.2-testing.orig/tools/blktap/drivers/tapdisk.h
|
||||
+++ xen-4.1.2-testing/tools/blktap/drivers/tapdisk.h
|
||||
@@ -168,7 +168,7 @@ static disk_info_t aio_disk = {
|
||||
"raw image (aio)",
|
||||
"aio",
|
||||
|
10
block-npiv
10
block-npiv
@ -15,7 +15,7 @@ case "$command" in
|
||||
# single path:
|
||||
# FABRIC-VPWWPN-VPWWNN-TGTWWPN-LUN#
|
||||
# multipath:
|
||||
# {FABRIC1,FABRIC2}-{VPWWPN1,VPWWPN2,VPWWPN3}-VPWWNN-TGTWWPN-LUN#
|
||||
# {FABRIC1.FABRIC2}-{VPWWPN1.VPWWPN2.VPWWPN3}-VPWWNN-TGTWWPN-LUN#
|
||||
# arg 2 - Fabric Name
|
||||
# arg 3 - VPORT's WWPN
|
||||
# arg 4 - VPORT's WWNN
|
||||
@ -38,9 +38,9 @@ case "$command" in
|
||||
|
||||
# Ensure we compare everything using lower-case hex characters
|
||||
TGTWWPN=`echo $TGTWWPN | tr A-Z a-z`
|
||||
VPORTWWPNS=`echo $VPORTWWPNS | tr A-Z a-z |sed 's/[{,}]/ /g'`
|
||||
VPORTWWPNS=`echo $VPORTWWPNS | tr A-Z a-z |sed 's/[{.}]/ /g'`
|
||||
VPORTWWNN=`echo $VPORTWWNN | tr A-Z a-z`
|
||||
FABRICNMS=`echo $FABRICNMS | tr A-Z a-z |sed 's/[{,}]/ /g'`
|
||||
FABRICNMS=`echo $FABRICNMS | tr A-Z a-z |sed 's/[{.}]/ /g'`
|
||||
|
||||
|
||||
claim_lock "npiv"
|
||||
@ -98,8 +98,8 @@ case "$command" in
|
||||
NPIVARGS=$par;
|
||||
FABRICNMS=${NPIVARGS%%-*}; NPIVARGS=${NPIVARGS#*-}
|
||||
VPORTWWPNS=${NPIVARGS%%-*}
|
||||
VPORTWWPNS=`echo $VPORTWWPNS | tr A-Z a-z |sed 's/[{,}]/ /g'`
|
||||
FABRICNMS=`echo $FABRICNMS | tr A-Z a-z |sed 's/[{,}]/ /g'`
|
||||
VPORTWWPNS=`echo $VPORTWWPNS | tr A-Z a-z |sed 's/[{.}]/ /g'`
|
||||
FABRICNMS=`echo $FABRICNMS | tr A-Z a-z |sed 's/[{.}]/ /g'`
|
||||
for FABRICNM in $FABRICNMS; do
|
||||
for VPORTWWPN in $VPORTWWPNS; do
|
||||
find_vhost $VPORTWWPN $FABRICNM
|
||||
|
@ -14,9 +14,9 @@ find_vhost()
|
||||
if test $wwpn = $1 ; then
|
||||
# Note: makes the assumption the vport will always have an scsi_host child
|
||||
vhost=`ls -d $fchost/device/host*`
|
||||
fname=`cat $fchost/fabric_name | sed -e s/^0x//`
|
||||
if test $fname = $2 ; then
|
||||
vhost=`basename $vhost`
|
||||
vhost=`basename $vhost`
|
||||
fname=`cat /sys/class/fc_host/$vhost/fabric_name | sed -e s/^0x//`
|
||||
if test $fname = $2 ; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
@ -31,9 +31,9 @@ find_vhost()
|
||||
wwpn=`cat $fchost/port_name | sed -e s/^0x//`
|
||||
if test $wwpn = $1 ; then
|
||||
# Note: makes the assumption the vport will always have an scsi_host child
|
||||
vhost=`basename $fchost`
|
||||
fname=`cat $fchost/fabric_name | sed -e s/^0x//`
|
||||
if test $fname = $2 ; then
|
||||
vhost=`basename $fchost`
|
||||
if test $fname = $2 ; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
@ -81,14 +81,37 @@ create_vport()
|
||||
if [ -e $shost/vport_create ] ; then
|
||||
fchost=`ls -d $shost/device/fc_host*`
|
||||
# is the link up, w/ NPIV support ?
|
||||
pstate=`cat $fchost/port_state`
|
||||
ptype=`cat $fchost/port_type | cut -c 1-5`
|
||||
fname=`cat $fchost/fabric_name | sed -e s/^0x//`
|
||||
if [ $pstate = "Online" -a $ptype = "NPort" -a $fname = $1 ] ; then
|
||||
vmax=`cat $shost/max_npiv_vports`
|
||||
vinuse=`cat $shost/npiv_vports_inuse`
|
||||
avail=`expr $vmax - $vinuse`
|
||||
if [ $avail -gt 0 ] ; then
|
||||
if [ -e $fchost/port_state ] ; then
|
||||
pstate=`cat $fchost/port_state`
|
||||
ptype=`cat $fchost/port_type | cut -c 1-5`
|
||||
fname=`cat $fchost/fabric_name | sed -e s/^0x//`
|
||||
if [ $pstate = "Online" -a $ptype = "NPort" -a $fname = $1 ] ; then
|
||||
vmax=`cat $shost/max_npiv_vports`
|
||||
vinuse=`cat $shost/npiv_vports_inuse`
|
||||
avail=`expr $vmax - $vinuse`
|
||||
if [ $avail -gt 0 ] ; then
|
||||
# create the vport
|
||||
echo $2":"$3 > $shost/vport_create
|
||||
if [ $? -eq 0 ] ; then
|
||||
return 0
|
||||
fi
|
||||
# failed - so we'll just look for the next adapter
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# BFA are under adapter scsi_host
|
||||
for shost in /sys/class/scsi_host/* ; do
|
||||
if [ -e $shost/vport_create ] ; then
|
||||
fchost=`ls -d $shost/device/fc_host/*`
|
||||
# is the link up, w/ NPIV support ?
|
||||
if [ -e $fchost/port_state ] ; then
|
||||
pstate=`cat $fchost/port_state`
|
||||
ptype=`cat $fchost/port_type | cut -c 1-5`
|
||||
fname=`cat $fchost/fabric_name | sed -e s/^0x//`
|
||||
if [ $pstate = "Online" -a $ptype = "NPort" -a $fname = $1 ] ; then
|
||||
# create the vport
|
||||
echo $2":"$3 > $shost/vport_create
|
||||
if [ $? -eq 0 ] ; then
|
||||
@ -201,6 +224,18 @@ delete_vhost()
|
||||
return
|
||||
fi
|
||||
|
||||
# BFA
|
||||
if test -e /sys/class/fc_host/$1/device/../scsi_host/*/driver_name ; then
|
||||
shost=`ls -1d /sys/class/fc_host/$1/device/../scsi_host/* | sed s#.*scsi_host/##`
|
||||
vportwwpn=`cat /sys/class/fc_host/$1/port_name | sed s/^0x//`
|
||||
vportwwnn=`cat /sys/class/fc_host/$1/node_name | sed s/^0x//`
|
||||
echo "$vportwwpn:$vportwwnn" > /sys/class/scsi_host/$shost/vport_delete
|
||||
if test $? -ne 0 ; then exit 6; fi
|
||||
sleep 4
|
||||
return
|
||||
fi
|
||||
|
||||
|
||||
exit 6
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/hotplug/Linux/network-bridge
|
||||
Index: xen-4.1.2-testing/tools/hotplug/Linux/network-bridge
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/hotplug/Linux/network-bridge
|
||||
+++ xen-4.1.1-testing/tools/hotplug/Linux/network-bridge
|
||||
--- xen-4.1.2-testing.orig/tools/hotplug/Linux/network-bridge
|
||||
+++ xen-4.1.2-testing/tools/hotplug/Linux/network-bridge
|
||||
@@ -249,6 +249,9 @@ op_start () {
|
||||
|
||||
claim_lock "network-bridge"
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/hotplug/Linux/network-bridge
|
||||
Index: xen-4.1.2-testing/tools/hotplug/Linux/network-bridge
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/hotplug/Linux/network-bridge
|
||||
+++ xen-4.1.1-testing/tools/hotplug/Linux/network-bridge
|
||||
--- xen-4.1.2-testing.orig/tools/hotplug/Linux/network-bridge
|
||||
+++ xen-4.1.2-testing/tools/hotplug/Linux/network-bridge
|
||||
@@ -278,19 +278,19 @@ op_stop () {
|
||||
transfer_addrs ${bridge} ${pdev}
|
||||
if ! ifdown ${bridge}; then
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/hotplug/Linux/network-bridge
|
||||
Index: xen-4.1.2-testing/tools/hotplug/Linux/network-bridge
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/hotplug/Linux/network-bridge
|
||||
+++ xen-4.1.1-testing/tools/hotplug/Linux/network-bridge
|
||||
--- xen-4.1.2-testing.orig/tools/hotplug/Linux/network-bridge
|
||||
+++ xen-4.1.2-testing/tools/hotplug/Linux/network-bridge
|
||||
@@ -257,6 +257,11 @@ op_start () {
|
||||
|
||||
create_bridge ${tdev}
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/hotplug/Linux/network-bridge
|
||||
Index: xen-4.1.2-testing/tools/hotplug/Linux/network-bridge
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/hotplug/Linux/network-bridge
|
||||
+++ xen-4.1.1-testing/tools/hotplug/Linux/network-bridge
|
||||
--- xen-4.1.2-testing.orig/tools/hotplug/Linux/network-bridge
|
||||
+++ xen-4.1.2-testing/tools/hotplug/Linux/network-bridge
|
||||
@@ -193,6 +193,28 @@ antispoofing () {
|
||||
iptables -A FORWARD -m physdev --physdev-in ${pdev} -j ACCEPT
|
||||
}
|
||||
|
@ -15,10 +15,10 @@ Signed-off-by: Kevin Wolf <kwolf@suse.de>
|
||||
tapdisk-ioemu.c | 17 -----------------
|
||||
4 files changed, 17 insertions(+), 26 deletions(-)
|
||||
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/Makefile
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/Makefile
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/Makefile
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/Makefile
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/Makefile
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/Makefile
|
||||
@@ -46,14 +46,6 @@ $(filter %-user,$(SUBDIR_RULES)): libqem
|
||||
|
||||
recurse-all: $(SUBDIR_RULES)
|
||||
@ -56,10 +56,10 @@ Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/Makefile
|
||||
######################################################################
|
||||
# libqemu_common.a: Target independent part of system emulation. The
|
||||
# long term path is to suppress *all* target specific code in case of
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/configure
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/configure
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/configure
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/configure
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/configure
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/configure
|
||||
@@ -1511,7 +1511,7 @@ bsd)
|
||||
;;
|
||||
esac
|
||||
@ -69,10 +69,10 @@ Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/configure
|
||||
if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
|
||||
tools="qemu-img\$(EXESUF) $tools"
|
||||
if [ "$linux" = "yes" ] ; then
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/qemu-tool.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/qemu-tool.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/qemu-tool.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/qemu-tool.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/qemu-tool.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/qemu-tool.c
|
||||
@@ -68,7 +68,7 @@ void qemu_bh_delete(QEMUBH *bh)
|
||||
qemu_free(bh);
|
||||
}
|
||||
@ -82,10 +82,10 @@ Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/qemu-tool.c
|
||||
IOCanRWHandler *fd_read_poll,
|
||||
IOHandler *fd_read,
|
||||
IOHandler *fd_write,
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/tapdisk-ioemu.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/tapdisk-ioemu.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/tapdisk-ioemu.c
|
||||
@@ -12,34 +12,12 @@
|
||||
|
||||
extern void qemu_aio_init(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/vnc.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/vnc.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
@@ -1342,6 +1342,11 @@ static void do_key_event(VncState *vs, i
|
||||
}
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/server/HalDaemon.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/server/HalDaemon.py
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/server/HalDaemon.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/server/HalDaemon.py
|
||||
@@ -0,0 +1,243 @@
|
||||
+#!/usr/bin/env python
|
||||
+# -*- mode: python; -*-
|
||||
@ -246,10 +246,10 @@ Index: xen-4.1.1-testing/tools/python/xen/xend/server/HalDaemon.py
|
||||
+ print 'Falling off end'
|
||||
+
|
||||
+
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/server/Hald.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/server/Hald.py
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/server/Hald.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/server/Hald.py
|
||||
@@ -0,0 +1,125 @@
|
||||
+#============================================================================
|
||||
+# This library is free software; you can redistribute it and/or
|
||||
@ -376,10 +376,10 @@ Index: xen-4.1.1-testing/tools/python/xen/xend/server/Hald.py
|
||||
+ watcher.run()
|
||||
+ time.sleep(10)
|
||||
+ watcher.shutdown()
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/server/SrvServer.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/server/SrvServer.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/server/SrvServer.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/server/SrvServer.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/server/SrvServer.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/server/SrvServer.py
|
||||
@@ -57,6 +57,7 @@ from xen.web.SrvDir import SrvDir
|
||||
|
||||
from SrvRoot import SrvRoot
|
||||
@ -397,10 +397,10 @@ Index: xen-4.1.1-testing/tools/python/xen/xend/server/SrvServer.py
|
||||
|
||||
def create():
|
||||
root = SrvDir()
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/xenstore.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "exec-all.h"
|
||||
#include "sysemu.h"
|
||||
|
@ -2,10 +2,10 @@ Add support of change-vnc-password while vm is running.
|
||||
|
||||
Signed-off-by: Chunyan Liu <cyliu@novell.com>
|
||||
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/vl.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/vl.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/vl.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/vl.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/vl.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/vl.c
|
||||
@@ -200,7 +200,7 @@ DriveInfo drives_table[MAX_DRIVES+1];
|
||||
int nb_drives;
|
||||
enum vga_retrace_method vga_retrace_method = VGA_RETRACE_DUMB;
|
||||
@ -15,10 +15,10 @@ Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/vl.c
|
||||
int nographic;
|
||||
static int curses;
|
||||
static int sdl;
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/vnc.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/vnc.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
@@ -2591,6 +2591,7 @@ int vnc_display_password(DisplayState *d
|
||||
if (password && password[0]) {
|
||||
if (!(vs->password = qemu_strdup(password)))
|
||||
@ -27,10 +27,10 @@ Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/vnc.c
|
||||
}
|
||||
|
||||
return 0;
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/xenstore.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/xenstore.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "qemu-timer.h"
|
||||
#include "qemu-xen.h"
|
||||
@ -59,10 +59,10 @@ Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/xenstore.c
|
||||
} else if (!strncmp(command, "usb-add", len)) {
|
||||
fprintf(logfile, "dm-command: usb-add a usb device\n");
|
||||
if (pasprintf(&path,
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -1488,6 +1488,20 @@ class XendDomainInfo:
|
||||
target = max_target
|
||||
self.setMemoryTarget(target)
|
||||
@ -84,10 +84,10 @@ Index: xen-4.1.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
def setMemoryTarget(self, target):
|
||||
"""Set the memory target of this domain.
|
||||
@param target: In MiB.
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/server/XMLRPCServer.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/server/XMLRPCServer.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/server/XMLRPCServer.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/server/XMLRPCServer.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/server/XMLRPCServer.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/server/XMLRPCServer.py
|
||||
@@ -95,7 +95,7 @@ methods = ['device_create', 'device_conf
|
||||
'destroyDevice','getDeviceSxprs',
|
||||
'setMemoryTarget', 'setName', 'setVCpuCount', 'shutdown',
|
||||
@ -97,10 +97,10 @@ Index: xen-4.1.1-testing/tools/python/xen/xend/server/XMLRPCServer.py
|
||||
|
||||
exclude = ['domain_create', 'domain_restore']
|
||||
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xm/main.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xm/main.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xm/main.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xm/main.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xm/main.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xm/main.py
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
"""Grand unified management application for Xen.
|
||||
|
@ -1,8 +1,8 @@
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -3129,6 +3129,11 @@ class XendDomainInfo:
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -3130,6 +3130,11 @@ class XendDomainInfo:
|
||||
self._cleanup_phantom_devs(paths)
|
||||
self._cleanupVm()
|
||||
|
||||
|
@ -5,10 +5,10 @@ get the signal, it will wait until timeout, thus incorrect device status is
|
||||
returned. To fix this problem, we do not depend on ev.wait() result, but read
|
||||
xenstore directly to get correct device status.
|
||||
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/server/DevController.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/server/DevController.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/server/DevController.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/server/DevController.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/server/DevController.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/server/DevController.py
|
||||
@@ -149,7 +149,10 @@ class DevController:
|
||||
(status, err) = self.waitForBackend(devid)
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/XendCheckpoint.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/XendCheckpoint.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/XendCheckpoint.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendCheckpoint.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/XendCheckpoint.py
|
||||
@@ -172,7 +172,7 @@ def save(fd, dominfo, network, live, dst
|
||||
dominfo.destroy()
|
||||
dominfo.testDeviceComplete()
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -1296,8 +1296,15 @@ class XendDomainInfo:
|
||||
frontpath = self.getDeviceController(deviceClass).frontendPath(dev)
|
||||
backpath = xstransact.Read(frontpath, "backend")
|
||||
|
@ -5,10 +5,10 @@ toolstack.
|
||||
xl could be useful even when xend is running, e.g. to debug
|
||||
xend itself, so add a '-f' option to override the exit.
|
||||
|
||||
Index: xen-4.1.1-testing/tools/libxl/xl.c
|
||||
Index: xen-4.1.2-testing/tools/libxl/xl.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/libxl/xl.c
|
||||
+++ xen-4.1.1-testing/tools/libxl/xl.c
|
||||
--- xen-4.1.2-testing.orig/tools/libxl/xl.c
|
||||
+++ xen-4.1.2-testing/tools/libxl/xl.c
|
||||
@@ -88,12 +88,16 @@ int main(int argc, char **argv)
|
||||
char *config_file;
|
||||
void *config_data = 0;
|
||||
@ -50,10 +50,10 @@ Index: xen-4.1.1-testing/tools/libxl/xl.c
|
||||
|
||||
logger = xtl_createlogger_stdiostream(stderr, minmsglevel, 0);
|
||||
if (!logger) exit(1);
|
||||
Index: xen-4.1.1-testing/tools/libxl/xl_cmdimpl.c
|
||||
Index: xen-4.1.2-testing/tools/libxl/xl_cmdimpl.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/libxl/xl_cmdimpl.c
|
||||
+++ xen-4.1.1-testing/tools/libxl/xl_cmdimpl.c
|
||||
--- xen-4.1.2-testing.orig/tools/libxl/xl_cmdimpl.c
|
||||
+++ xen-4.1.2-testing/tools/libxl/xl_cmdimpl.c
|
||||
@@ -1725,7 +1725,7 @@ void help(const char *command)
|
||||
struct cmd_spec *cmd;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
|
||||
Index: xen-4.1.2-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
|
||||
+++ xen-4.1.1-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
|
||||
--- xen-4.1.2-testing.orig/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
|
||||
+++ xen-4.1.2-testing/unmodified_drivers/linux-2.6/platform-pci/platform-pci.c
|
||||
@@ -426,6 +426,11 @@ static int __devinit platform_pci_init(s
|
||||
platform_mmio = mmio_addr;
|
||||
platform_mmiolen = mmio_len;
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/xen/arch/x86/domain.c
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/domain.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/xen/arch/x86/domain.c
|
||||
+++ xen-4.1.1-testing/xen/arch/x86/domain.c
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/domain.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/domain.c
|
||||
@@ -150,15 +150,30 @@ void dump_pageframe_info(struct domain *
|
||||
|
||||
printk("Memory pages belonging to domain %u:\n", d->domain_id);
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/XendConfig.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/XendConfig.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/XendConfig.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/XendConfig.py
|
||||
@@ -1874,7 +1874,14 @@ class XendConfig(dict):
|
||||
ports = sxp.child(dev_sxp, 'port')
|
||||
for port in ports[1:]:
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/firmware/hvmloader/acpi/dsdt.asl
|
||||
Index: xen-4.1.2-testing/tools/firmware/hvmloader/acpi/dsdt.asl
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/firmware/hvmloader/acpi/dsdt.asl
|
||||
+++ xen-4.1.1-testing/tools/firmware/hvmloader/acpi/dsdt.asl
|
||||
--- xen-4.1.2-testing.orig/tools/firmware/hvmloader/acpi/dsdt.asl
|
||||
+++ xen-4.1.2-testing/tools/firmware/hvmloader/acpi/dsdt.asl
|
||||
@@ -30,21 +30,9 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2,
|
||||
/*
|
||||
* S3 (suspend-to-ram), S4 (suspend-to-disc) and S5 (power-off) type codes:
|
||||
|
@ -17,10 +17,10 @@ Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
tools/hotplug/Linux/block | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: xen-4.1.1-testing/tools/hotplug/Linux/block
|
||||
Index: xen-4.1.2-testing/tools/hotplug/Linux/block
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/hotplug/Linux/block
|
||||
+++ xen-4.1.1-testing/tools/hotplug/Linux/block
|
||||
--- xen-4.1.2-testing.orig/tools/hotplug/Linux/block
|
||||
+++ xen-4.1.2-testing/tools/hotplug/Linux/block
|
||||
@@ -280,8 +280,8 @@ mount it read-write in a guest domain."
|
||||
fi
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/XendConfig.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/XendConfig.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/XendConfig.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/XendConfig.py
|
||||
@@ -159,6 +159,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
|
||||
'nographic': int,
|
||||
'nomigrate': int,
|
||||
@ -19,10 +19,10 @@ Index: xen-4.1.1-testing/tools/python/xen/xend/XendConfig.py
|
||||
if 'viridian' not in self['platform']:
|
||||
self['platform']['viridian'] = 0
|
||||
if 'rtc_timeoffset' not in self['platform']:
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xend/image.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xend/image.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xend/image.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xend/image.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xend/image.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xend/image.py
|
||||
@@ -839,6 +839,7 @@ class HVMImageHandler(ImageHandler):
|
||||
|
||||
self.apic = int(vmConfig['platform'].get('apic', 0))
|
||||
@ -31,10 +31,10 @@ Index: xen-4.1.1-testing/tools/python/xen/xend/image.py
|
||||
self.guest_os_type = vmConfig['platform'].get('guest_os_type')
|
||||
self.memory_sharing = int(vmConfig['memory_sharing'])
|
||||
try:
|
||||
Index: xen-4.1.1-testing/tools/python/xen/xm/create.py
|
||||
Index: xen-4.1.2-testing/tools/python/xen/xm/create.py
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/python/xen/xm/create.py
|
||||
+++ xen-4.1.1-testing/tools/python/xen/xm/create.py
|
||||
--- xen-4.1.2-testing.orig/tools/python/xen/xm/create.py
|
||||
+++ xen-4.1.2-testing/tools/python/xen/xm/create.py
|
||||
@@ -242,6 +242,10 @@ gopts.var('viridian', val='VIRIDIAN',
|
||||
use="""Expose Viridian interface to x86 HVM guest?
|
||||
(Default is 0).""")
|
||||
|
@ -17,10 +17,10 @@ qcow2 image (the header is gone after three loop iterations):
|
||||
|
||||
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
|
||||
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/block-qcow2.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/block-qcow2.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/block-qcow2.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/block-qcow2.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/block-qcow2.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/block-qcow2.c
|
||||
@@ -916,7 +916,7 @@ static int alloc_cluster_link_l2(BlockDr
|
||||
goto err;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-4.1.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
Index: xen-4.1.2-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
===================================================================
|
||||
--- xen-4.1.1-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
+++ xen-4.1.1-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
--- xen-4.1.2-testing.orig/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
+++ xen-4.1.2-testing/tools/ioemu-qemu-xen/hw/xen_blktap.c
|
||||
@@ -259,8 +259,11 @@ static int open_disk(struct td_state *s,
|
||||
drv = blktap_drivers[i].drv;
|
||||
DPRINTF("%s driver specified\n", drv ? drv->format_name : "No");
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user