From c47215274f825952cde1bce700e719a316640fdad19f293608f3f99abf969e66 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Wed, 4 Jul 2007 23:35:39 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xen?expand=0&rev=20 --- 15173-32on64-runstate.patch | 31 ++ 15183-32on64-multicall.patch | 82 +++++ 15189-pmtimer.patch | 93 +++++ 15190-clocksource-opt.patch | 74 ++++ 15389-32on64-memop-error-path.patch | 33 ++ 15390-32on64-setup-error-path.patch | 76 ++++ 15391-32on64-setup-pgtable.patch | 20 ++ 15416-x86_64-failsafe.patch | 80 +++++ 15433-pae-ptwr-check.patch | 33 ++ 15444-vmxassist-p2r.patch | 158 +++++++++ cross-build-fix.diff | 14 +- edd.patch | 327 ++++++------------ edid.patch | 103 +++--- guest-copy.patch | 60 ++-- hvm-efer.patch | 22 +- hvm-hypercall-context.patch | 18 +- init.xendomains | 41 ++- intpte_t-cast.patch | 8 +- ptwr-sanity.patch | 16 +- vmx-check-descr.patch | 4 +- vnc-i18n-keys.diff | 2 +- x86-emul-rf.patch | 36 +- x86-extra-trap-info.patch | 12 +- x86-machine-check.patch | 180 +++++----- x86-nmi-inject.patch | 26 +- x86-page-cacheability.patch | 76 ++-- ...nel.patch => x86_64-syscall-clear-df.patch | 6 +- x86_emulate.patch | 46 +-- xen-domUloader.diff | 2 +- xen-max-free-mem.diff | 2 +- xen-xmexample.diff | 38 +- xen.changes | 10 + xen.spec | 122 ++++--- xenapi-console-protocol.patch | 2 +- 34 files changed, 1240 insertions(+), 613 deletions(-) create mode 100644 15173-32on64-runstate.patch create mode 100644 15183-32on64-multicall.patch create mode 100644 15189-pmtimer.patch create mode 100644 15190-clocksource-opt.patch create mode 100644 15389-32on64-memop-error-path.patch create mode 100644 15390-32on64-setup-error-path.patch create mode 100644 15391-32on64-setup-pgtable.patch create mode 100644 15416-x86_64-failsafe.patch create mode 100644 15433-pae-ptwr-check.patch create mode 100644 15444-vmxassist-p2r.patch rename clear_DF_for_kernel.patch => x86_64-syscall-clear-df.patch (61%) diff --git a/15173-32on64-runstate.patch b/15173-32on64-runstate.patch new file mode 100644 index 0000000..869061f --- /dev/null +++ b/15173-32on64-runstate.patch @@ -0,0 +1,31 @@ +# HG changeset 15173 patch +# User Ian Campbell +# Node ID 88e41a91301c109b99443db3a4bf3c8e6bbad042 +# Parent f2d2d5f18543de04191c1f5e22471e74d8767147 +Correct 32on64 handling of VCPUOP_register_runstate_memory_area. We +were copying too many bytes from the guest so the test for +area.addr.h.c != area.addr.p was failing. + +Added a WARN_ON to the kernel to catch this case. It would be a BUG_ON +but this would break the new kernel on older hypervisors and the only +real problem is that stolen time is not updated, which we can live +with. + +Signed-off-by: Ian Campbell + +Index: 2007-05-14/xen/arch/x86/x86_64/domain.c +=================================================================== +--- 2007-05-14.orig/xen/arch/x86/x86_64/domain.c 2007-04-23 10:01:42.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/x86_64/domain.c 2007-07-02 10:47:40.000000000 +0200 +@@ -22,8 +22,10 @@ arch_compat_vcpu_op( + struct compat_vcpu_register_runstate_memory_area area; + struct compat_vcpu_runstate_info info; + ++ area.addr.p = 0; ++ + rc = -EFAULT; +- if ( copy_from_guest(&area, arg, 1) ) ++ if ( copy_from_guest(&area.addr.h, arg, 1) ) + break; + + if ( area.addr.h.c != area.addr.p || diff --git a/15183-32on64-multicall.patch b/15183-32on64-multicall.patch new file mode 100644 index 0000000..59f9b2d --- /dev/null +++ b/15183-32on64-multicall.patch @@ -0,0 +1,82 @@ +# HG changeset 15183 patch +# User Ian Campbell +# Node ID 63211a8027fa994290e23be17f4de9ba3b3e953e +# Parent c4f62fe631e4a5f7ff20ec7bab0a81cd97a14974 +Fix preemption of multicalls in compat mode. + +mcs->call (struct multicall_entry) always needs to be translated into +mcs->compat_call (struct compat_multicall_entry) when a multicall is +preempted in compat mode. Previously this translation only occured for +those hypercalls which explicitly called hypercall_xlat_continuation() +which doesn't cover all hypercalls which could potentially be +preempted. + +Change hypercall_xlat_continuation() to only translate only the +hypercall arguments themselves and not the multicall_entry +layout. Translate the layout for all hypercalls in in +compat_multicall() instead. + +Signed-off-by: Ian Campbell + +Index: 2007-05-14/xen/arch/x86/domain.c +=================================================================== +--- 2007-05-14.orig/xen/arch/x86/domain.c 2007-07-02 10:38:54.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/domain.c 2007-07-02 10:47:47.000000000 +0200 +@@ -1341,13 +1341,12 @@ int hypercall_xlat_continuation(unsigned + id = NULL; + } + if ( (mask & 1) && mcs->call.args[i] == nval ) +- ++rc; +- else + { +- cval = mcs->call.args[i]; +- BUG_ON(mcs->call.args[i] != cval); ++ mcs->call.args[i] = cval; ++ ++rc; + } +- mcs->compat_call.args[i] = cval; ++ else ++ BUG_ON(mcs->call.args[i] != (unsigned int)mcs->call.args[i]); + } + } + else +Index: 2007-05-14/xen/common/compat/multicall.c +=================================================================== +--- 2007-05-14.orig/xen/common/compat/multicall.c 2007-04-23 10:01:43.000000000 +0200 ++++ 2007-05-14/xen/common/compat/multicall.c 2007-07-02 10:47:47.000000000 +0200 +@@ -10,6 +10,13 @@ + typedef int ret_t; + #undef do_multicall_call + ++static inline void xlat_multicall_entry(struct mc_state *mcs) ++{ ++ int i; ++ for (i=0; i<6; i++) ++ mcs->compat_call.args[i] = mcs->call.args[i]; ++} ++ + DEFINE_XEN_GUEST_HANDLE(multicall_entry_compat_t); + #define multicall_entry compat_multicall_entry + #define multicall_entry_t multicall_entry_compat_t +Index: 2007-05-14/xen/common/multicall.c +=================================================================== +--- 2007-05-14.orig/xen/common/multicall.c 2007-04-23 10:01:43.000000000 +0200 ++++ 2007-05-14/xen/common/multicall.c 2007-07-02 10:47:47.000000000 +0200 +@@ -17,6 +17,7 @@ + #ifndef COMPAT + DEFINE_PER_CPU(struct mc_state, mc_state); + typedef long ret_t; ++#define xlat_multicall_entry(mcs) + #endif + + ret_t +@@ -62,6 +63,9 @@ do_multicall( + + if ( test_bit(_MCSF_call_preempted, &mcs->flags) ) + { ++ /* Translate sub-call continuation to guest layout */ ++ xlat_multicall_entry(mcs); ++ + /* Copy the sub-call continuation. */ + (void)__copy_to_guest(call_list, &mcs->call, 1); + goto preempted; diff --git a/15189-pmtimer.patch b/15189-pmtimer.patch new file mode 100644 index 0000000..9f3c486 --- /dev/null +++ b/15189-pmtimer.patch @@ -0,0 +1,93 @@ +# HG changeset 15189 patch +# User kfraser@localhost.localdomain +# Node ID 2d7d33ac982a0720408d841b13c3b97a2190eae4 +# Parent ae073ca6eb76f75a73063ba6e0f944b47b8f8954 +Add support for ACPI PM Timer as platform clock source. +Signed-off-by: Keir Fraser + +Index: 2007-05-14/xen/arch/x86/time.c +=================================================================== +--- 2007-05-14.orig/xen/arch/x86/time.c 2007-04-23 10:01:42.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/time.c 2007-07-02 10:47:59.000000000 +0200 +@@ -511,6 +511,60 @@ static int init_cyclone(void) + } + + /************************************************************ ++ * PLATFORM TIMER 4: ACPI PM TIMER ++ */ ++ ++u32 pmtmr_ioport; ++ ++/* Protected by platform_timer_lock. */ ++static u64 pmtimer_counter64; ++static u32 pmtimer_stamp; ++static struct timer pmtimer_overflow_timer; ++ ++/* ACPI PM timer ticks at 3.579545 MHz. */ ++#define ACPI_PM_FREQUENCY 3579545 ++ ++/* Deltas are 24-bit unsigned values, as counter may be only 24 bits wide. */ ++#define pmtimer_delta(c) ((u32)(((c) - pmtimer_stamp) & ((1U<<24)-1))) ++ ++static void pmtimer_overflow(void *unused) ++{ ++ u32 counter; ++ ++ spin_lock_irq(&platform_timer_lock); ++ counter = inl(pmtmr_ioport); ++ pmtimer_counter64 += pmtimer_delta(counter); ++ pmtimer_stamp = counter; ++ spin_unlock_irq(&platform_timer_lock); ++ ++ /* Trigger overflow avoidance roughly when counter increments 2^23. */ ++ set_timer(&pmtimer_overflow_timer, NOW() + MILLISECS(2000)); ++} ++ ++static u64 read_pmtimer_count(void) ++{ ++ return pmtimer_counter64 + pmtimer_delta(inl(pmtmr_ioport)); ++} ++ ++static int init_pmtimer(void) ++{ ++ if ( pmtmr_ioport == 0 ) ++ return 0; ++ ++ read_platform_count = read_pmtimer_count; ++ ++ init_timer(&pmtimer_overflow_timer, pmtimer_overflow, NULL, 0); ++ pmtimer_overflow(NULL); ++ platform_timer_stamp = pmtimer_counter64; ++ set_time_scale(&platform_timer_scale, ACPI_PM_FREQUENCY); ++ ++ printk("Platform timer is %s ACPI PM Timer\n", ++ freq_string(ACPI_PM_FREQUENCY)); ++ ++ return 1; ++} ++ ++/************************************************************ + * GENERIC PLATFORM TIMER INFRASTRUCTURE + */ + +@@ -549,7 +603,7 @@ static void platform_time_calibration(vo + + static void init_platform_timer(void) + { +- if ( !init_cyclone() && !init_hpet() ) ++ if ( !init_cyclone() && !init_hpet() && !init_pmtimer() ) + init_pit(); + } + +Index: 2007-05-14/xen/include/asm-x86/config.h +=================================================================== +--- 2007-05-14.orig/xen/include/asm-x86/config.h 2007-04-23 10:01:46.000000000 +0200 ++++ 2007-05-14/xen/include/asm-x86/config.h 2007-07-02 10:47:59.000000000 +0200 +@@ -22,6 +22,7 @@ + #define CONFIG_X86_LOCAL_APIC 1 + #define CONFIG_X86_GOOD_APIC 1 + #define CONFIG_X86_IO_APIC 1 ++#define CONFIG_X86_PM_TIMER 1 + #define CONFIG_HPET_TIMER 1 + #define CONFIG_X86_MCE_P4THERMAL 1 + #define CONFIG_ACPI_NUMA 1 diff --git a/15190-clocksource-opt.patch b/15190-clocksource-opt.patch new file mode 100644 index 0000000..35a1625 --- /dev/null +++ b/15190-clocksource-opt.patch @@ -0,0 +1,74 @@ +# HG changeset 15190 patch +# User kfraser@localhost.localdomain +# Node ID c9d66baad22b6f4cfd644b1272a8506372bb2947 +# Parent 2d7d33ac982a0720408d841b13c3b97a2190eae4 +Remove 'hpet_force' option. Replace with 'clocksource' option to allow +forced selection of platform clocksource, overriding the default +priority ordering. + +Usage: clocksource={pit,hpet,cyclone,acpi} + +Signed-off-by: Keir Fraser + +Index: 2007-05-14/xen/arch/x86/time.c +=================================================================== +--- 2007-05-14.orig/xen/arch/x86/time.c 2007-07-02 10:47:59.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/time.c 2007-07-02 10:48:03.000000000 +0200 +@@ -31,10 +31,9 @@ + #include + #include + +-/* opt_hpet_force: If true, force HPET configuration via PCI space. */ +-/* NB. This is a gross hack. Mainly useful for HPET testing. */ +-static int opt_hpet_force = 0; +-boolean_param("hpet_force", opt_hpet_force); ++/* opt_clocksource: Force clocksource to one of: pit, hpet, cyclone, acpi. */ ++static char opt_clocksource[10]; ++string_param("clocksource", opt_clocksource); + + #define EPOCH MILLISECS(1000) + +@@ -357,15 +356,6 @@ static int init_hpet(void) + u32 hpet_id, hpet_period, cfg; + int i; + +- if ( (hpet_address == 0) && opt_hpet_force ) +- { +- outl(0x800038a0, 0xcf8); +- outl(0xff000001, 0xcfc); +- outl(0x800038a0, 0xcf8); +- hpet_address = inl(0xcfc) & 0xfffffffe; +- printk("WARNING: Forcibly enabled HPET at %#lx.\n", hpet_address); +- } +- + if ( hpet_address == 0 ) + return 0; + +@@ -603,6 +593,27 @@ static void platform_time_calibration(vo + + static void init_platform_timer(void) + { ++ if ( opt_clocksource[0] != '\0' ) ++ { ++ int rc = -1; ++ ++ if ( !strcmp(opt_clocksource, "pit") ) ++ rc = (init_pit(), 1); ++ else if ( !strcmp(opt_clocksource, "hpet") ) ++ rc = init_hpet(); ++ else if ( !strcmp(opt_clocksource, "cyclone") ) ++ rc = init_cyclone(); ++ else if ( !strcmp(opt_clocksource, "acpi") ) ++ rc = init_pmtimer(); ++ ++ if ( rc == 1 ) ++ return; ++ ++ printk("WARNING: %s clocksource '%s'.\n", ++ (rc == 0) ? "Could not initialise" : "Unrecognised", ++ opt_clocksource); ++ } ++ + if ( !init_cyclone() && !init_hpet() && !init_pmtimer() ) + init_pit(); + } diff --git a/15389-32on64-memop-error-path.patch b/15389-32on64-memop-error-path.patch new file mode 100644 index 0000000..93af06d --- /dev/null +++ b/15389-32on64-memop-error-path.patch @@ -0,0 +1,33 @@ +# HG changeset 15389 patch +# User kfraser@localhost.localdomain +# Date 1182343102 -3600 +# Node ID 07be0266f6d88f2a8343b54f36301f3adac88d18 +# Parent 50358c4b37f4fcaac1061f1c84a865932401c1be +32-on-64: Fix error path from memory_op() hypercall. +Signed-off-by: Keir Fraser + +Index: 2007-05-14/xen/common/compat/memory.c +=================================================================== +--- 2007-05-14.orig/xen/common/compat/memory.c 2007-04-23 10:01:43.000000000 +0200 ++++ 2007-05-14/xen/common/compat/memory.c 2007-07-02 10:48:06.000000000 +0200 +@@ -258,7 +258,8 @@ int compat_memory_op(unsigned int cmd, X + compat_pfn_t pfn = nat.rsrv->extent_start.p[start_extent]; + + BUG_ON(pfn != nat.rsrv->extent_start.p[start_extent]); +- if ( __copy_to_compat_offset(cmp.rsrv.extent_start, start_extent, &pfn, 1) ) ++ if ( __copy_to_compat_offset(cmp.rsrv.extent_start, ++ start_extent, &pfn, 1) ) + { + if ( split >= 0 ) + { +@@ -275,6 +276,10 @@ int compat_memory_op(unsigned int cmd, X + break; + } + } ++ ++ /* Bail if there was an error. */ ++ if ( (split >= 0) && (end_extent != nat.rsrv->nr_extents) ) ++ split = 0; + } + else + start_extent = end_extent; diff --git a/15390-32on64-setup-error-path.patch b/15390-32on64-setup-error-path.patch new file mode 100644 index 0000000..513710a --- /dev/null +++ b/15390-32on64-setup-error-path.patch @@ -0,0 +1,76 @@ +# HG changeset 15390 patch +# User kfraser@localhost.localdomain +# Date 1182343128 -3600 +# Node ID 69658f935cc737c46d33404ccb5e9aff9842e5cb +# Parent 07be0266f6d88f2a8343b54f36301f3adac88d18 +32-on-64: Fix error path where we fail to successfully switch a guest +into compat mode. +Signed-off-by: Keir Fraser + +Index: 2007-05-14/xen/arch/x86/domain.c +=================================================================== +--- 2007-05-14.orig/xen/arch/x86/domain.c 2007-07-02 10:47:47.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/domain.c 2007-07-02 10:48:10.000000000 +0200 +@@ -227,7 +227,7 @@ static int setup_compat_l4(struct vcpu * + l4_pgentry_t *l4tab; + int rc; + +- if ( !pg ) ++ if ( pg == NULL ) + return -ENOMEM; + + /* This page needs to look like a pagetable so that it can be shadowed */ +@@ -239,8 +239,6 @@ static int setup_compat_l4(struct vcpu * + l4tab[l4_table_offset(PERDOMAIN_VIRT_START)] = + l4e_from_paddr(__pa(v->domain->arch.mm_perdomain_l3), + __PAGE_HYPERVISOR); +- v->arch.guest_table = pagetable_from_page(pg); +- v->arch.guest_table_user = v->arch.guest_table; + + if ( (rc = setup_arg_xlat_area(v, l4tab)) < 0 ) + { +@@ -248,6 +246,9 @@ static int setup_compat_l4(struct vcpu * + return rc; + } + ++ v->arch.guest_table = pagetable_from_page(pg); ++ v->arch.guest_table_user = v->arch.guest_table; ++ + return 0; + } + +@@ -313,11 +314,11 @@ int switch_compat(struct domain *d) + gdt_l1e = l1e_from_page(virt_to_page(compat_gdt_table), PAGE_HYPERVISOR); + for ( vcpuid = 0; vcpuid < MAX_VIRT_CPUS; vcpuid++ ) + { ++ if ( (d->vcpu[vcpuid] != NULL) && ++ (setup_compat_l4(d->vcpu[vcpuid]) != 0) ) ++ goto undo_and_fail; + d->arch.mm_perdomain_pt[((vcpuid << GDT_LDT_VCPU_SHIFT) + + FIRST_RESERVED_GDT_PAGE)] = gdt_l1e; +- if (d->vcpu[vcpuid] +- && setup_compat_l4(d->vcpu[vcpuid]) != 0) +- return -ENOMEM; + } + + d->arch.physaddr_bitsize = +@@ -325,6 +326,19 @@ int switch_compat(struct domain *d) + + (PAGE_SIZE - 2); + + return 0; ++ ++ undo_and_fail: ++ d->arch.is_32bit_pv = d->arch.has_32bit_shinfo = 0; ++ release_arg_xlat_area(d); ++ gdt_l1e = l1e_from_page(virt_to_page(gdt_table), PAGE_HYPERVISOR); ++ while ( vcpuid-- != 0 ) ++ { ++ if ( d->vcpu[vcpuid] != NULL ) ++ release_compat_l4(d->vcpu[vcpuid]); ++ d->arch.mm_perdomain_pt[((vcpuid << GDT_LDT_VCPU_SHIFT) + ++ FIRST_RESERVED_GDT_PAGE)] = gdt_l1e; ++ } ++ return -ENOMEM; + } + + #else diff --git a/15391-32on64-setup-pgtable.patch b/15391-32on64-setup-pgtable.patch new file mode 100644 index 0000000..b16adea --- /dev/null +++ b/15391-32on64-setup-pgtable.patch @@ -0,0 +1,20 @@ +# HG changeset 15391 patch +# User kfraser@localhost.localdomain +# Date 1182343194 -3600 +# Node ID fe3df33e27615a9732f0ae73d65dae0f23afbb4d +# Parent 69658f935cc737c46d33404ccb5e9aff9842e5cb +32-on-64: First slot of hidden L4 page directory must start life as zero. +Signed-off-by: Keir Fraser + +Index: 2007-05-14/xen/arch/x86/domain.c +=================================================================== +--- 2007-05-14.orig/xen/arch/x86/domain.c 2007-07-02 10:48:10.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/domain.c 2007-07-02 10:48:13.000000000 +0200 +@@ -234,6 +234,7 @@ static int setup_compat_l4(struct vcpu * + pg->u.inuse.type_info = PGT_l4_page_table|PGT_validated; + + l4tab = copy_page(page_to_virt(pg), idle_pg_table); ++ l4tab[0] = l4e_empty(); + l4tab[l4_table_offset(LINEAR_PT_VIRT_START)] = + l4e_from_page(pg, __PAGE_HYPERVISOR); + l4tab[l4_table_offset(PERDOMAIN_VIRT_START)] = diff --git a/15416-x86_64-failsafe.patch b/15416-x86_64-failsafe.patch new file mode 100644 index 0000000..9c4e601 --- /dev/null +++ b/15416-x86_64-failsafe.patch @@ -0,0 +1,80 @@ +# HG changeset 15416 patch +# User kfraser@localhost.localdomain +# Date 1182445370 -3600 +# Node ID b35b8053012e6b1720a392964bc7114ba30de420 +# Parent 04d4b7b6f5b752a4375cbb58f6ce3efc207f708a +Fix x86/64 failsafe callback handling. +Signed-off-by: Keir Fraser + +Index: 2007-05-14/xen/arch/x86/x86_64/compat/entry.S +=================================================================== +--- 2007-05-14.orig/xen/arch/x86/x86_64/compat/entry.S 2007-07-02 10:37:50.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/x86_64/compat/entry.S 2007-07-02 10:48:18.000000000 +0200 +@@ -143,12 +143,12 @@ compat_restore_all_guest: + .Lft0: iretq + + .section .fixup,"ax" +-.Lfx0: popq -15*8-8(%rsp) # error_code/entry_vector +- SAVE_ALL # 15*8 bytes pushed +- movq -8(%rsp),%rsi # error_code/entry_vector +- sti # after stack abuse (-1024(%rsp)) ++.Lfx0: sti ++ SAVE_ALL ++ movq UREGS_error_code(%rsp),%rsi ++ movq %rsp,%rax ++ andq $~0xf,%rsp + pushq $__HYPERVISOR_DS # SS +- leaq 8(%rsp),%rax + pushq %rax # RSP + pushfq # RFLAGS + pushq $__HYPERVISOR_CS # CS +Index: 2007-05-14/xen/arch/x86/x86_64/entry.S +=================================================================== +--- 2007-05-14.orig/xen/arch/x86/x86_64/entry.S 2007-07-02 10:37:49.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/x86_64/entry.S 2007-07-02 10:48:18.000000000 +0200 +@@ -57,23 +57,23 @@ restore_all_guest: + /* No special register assumptions. */ + iret_exit_to_guest: + addq $8,%rsp +-.Lft1: iretq ++.Lft0: iretq + + .section .fixup,"ax" +-.Lfx1: popq -15*8-8(%rsp) # error_code/entry_vector +- SAVE_ALL # 15*8 bytes pushed +- movq -8(%rsp),%rsi # error_code/entry_vector +- sti # after stack abuse (-1024(%rsp)) ++.Lfx0: sti ++ SAVE_ALL ++ movq UREGS_error_code(%rsp),%rsi ++ movq %rsp,%rax ++ andq $~0xf,%rsp + pushq $__HYPERVISOR_DS # SS +- leaq 8(%rsp),%rax + pushq %rax # RSP +- pushf # RFLAGS ++ pushfq # RFLAGS + pushq $__HYPERVISOR_CS # CS +- leaq .Ldf1(%rip),%rax ++ leaq .Ldf0(%rip),%rax + pushq %rax # RIP + pushq %rsi # error_code/entry_vector + jmp handle_exception +-.Ldf1: GET_CURRENT(%rbx) ++.Ldf0: GET_CURRENT(%rbx) + jmp test_all_events + failsafe_callback: + GET_CURRENT(%rbx) +@@ -88,10 +88,10 @@ failsafe_callback: + jmp test_all_events + .previous + .section __pre_ex_table,"a" +- .quad .Lft1,.Lfx1 ++ .quad .Lft0,.Lfx0 + .previous + .section __ex_table,"a" +- .quad .Ldf1,failsafe_callback ++ .quad .Ldf0,failsafe_callback + .previous + + ALIGN diff --git a/15433-pae-ptwr-check.patch b/15433-pae-ptwr-check.patch new file mode 100644 index 0000000..0f9a5fb --- /dev/null +++ b/15433-pae-ptwr-check.patch @@ -0,0 +1,33 @@ +# HG changeset 15433 patch +# User Ian Campbell +# Date 1183052420 -3600 +# Node ID a5360bf1866892498f4fda9fb86f96035143221d +# Parent d0608ecb56bc9dd77740096fd734332c46c737bd +Fix fixup of invalid PTE writes, broken by 13392:0fd65225e4c6. + +By the time we test if addr is the upper word it has already been +aligned to the 8 byte pte size. + +Signed-off-by: Ian Campbell + +Index: 2007-05-14/xen/arch/x86/mm.c +=================================================================== +--- 2007-05-14.orig/xen/arch/x86/mm.c 2007-07-02 10:39:23.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/mm.c 2007-07-02 10:51:13.000000000 +0200 +@@ -3196,6 +3196,7 @@ static int ptwr_emulated_update( + struct ptwr_emulate_ctxt *ptwr_ctxt) + { + unsigned long mfn; ++ unsigned long unaligned_addr = addr; + struct page_info *page; + l1_pgentry_t pte, ol1e, nl1e, *pl1e; + struct vcpu *v = current; +@@ -3249,7 +3250,7 @@ static int ptwr_emulated_update( + if ( unlikely(!get_page_from_l1e(gl1e_to_ml1e(d, nl1e), d)) ) + { + if ( (CONFIG_PAGING_LEVELS >= 3) && is_pv_32bit_domain(d) && +- (bytes == 4) && (addr & 4) && !do_cmpxchg && ++ (bytes == 4) && (unaligned_addr & 4) && !do_cmpxchg && + (l1e_get_flags(nl1e) & _PAGE_PRESENT) ) + { + /* diff --git a/15444-vmxassist-p2r.patch b/15444-vmxassist-p2r.patch new file mode 100644 index 0000000..7bc4849 --- /dev/null +++ b/15444-vmxassist-p2r.patch @@ -0,0 +1,158 @@ +# HG changeset 15444 patch +# User Keir Fraser +# Date 1183332299 -3600 +# Node ID 93b9161fc92095241b4566f510aeb34ffff27f55 +# Parent 5d7160564381eedda0853cf003b3097da0173893 +Use 32bit operand and address during VMXAssist protected to real. +Signed-off-by: Xin Li + +Index: 2007-05-14/tools/firmware/vmxassist/setup.c +=================================================================== +--- 2007-05-14.orig/tools/firmware/vmxassist/setup.c 2007-04-23 10:01:14.000000000 +0200 ++++ 2007-05-14/tools/firmware/vmxassist/setup.c 2007-07-02 10:51:33.000000000 +0200 +@@ -241,9 +241,10 @@ enter_real_mode(struct regs *regs) + } + + /* go from protected to real mode */ +- regs->eflags |= EFLAGS_VM; + set_mode(regs, VM86_PROTECTED_TO_REAL); + emulate(regs); ++ if (mode != VM86_REAL) ++ panic("failed to emulate between clear PE and long jump.\n"); + } + + /* +Index: 2007-05-14/tools/firmware/vmxassist/vm86.c +=================================================================== +--- 2007-05-14.orig/tools/firmware/vmxassist/vm86.c 2007-04-23 10:01:14.000000000 +0200 ++++ 2007-05-14/tools/firmware/vmxassist/vm86.c 2007-07-02 10:51:33.000000000 +0200 +@@ -584,8 +584,13 @@ movr(struct regs *regs, unsigned prefix, + unsigned addr = operand(prefix, regs, modrm); + unsigned val, r = (modrm >> 3) & 7; + +- if ((modrm & 0xC0) == 0xC0) /* no registers */ +- return 0; ++ if ((modrm & 0xC0) == 0xC0) { ++ /* ++ * Emulate all guest instructions in protected to real mode. ++ */ ++ if (mode != VM86_PROTECTED_TO_REAL) ++ return 0; ++ } + + switch (opc) { + case 0x88: /* addr32 mov r8, r/m8 */ +@@ -818,8 +823,13 @@ mov_to_seg(struct regs *regs, unsigned p + { + unsigned modrm = fetch8(regs); + +- /* Only need to emulate segment loads in real->protected mode. */ +- if (mode != VM86_REAL_TO_PROTECTED) ++ /* ++ * Emulate segment loads in: ++ * 1) real->protected mode. ++ * 2) protected->real mode. ++ */ ++ if ((mode != VM86_REAL_TO_PROTECTED) && ++ (mode != VM86_PROTECTED_TO_REAL)) + return 0; + + /* Register source only. */ +@@ -829,6 +839,8 @@ mov_to_seg(struct regs *regs, unsigned p + switch ((modrm & 0x38) >> 3) { + case 0: /* es */ + regs->ves = getreg16(regs, modrm); ++ if (mode == VM86_PROTECTED_TO_REAL) ++ return 1; + saved_rm_regs.ves = 0; + oldctx.es_sel = regs->ves; + return 1; +@@ -837,21 +849,29 @@ mov_to_seg(struct regs *regs, unsigned p + + case 2: /* ss */ + regs->uss = getreg16(regs, modrm); ++ if (mode == VM86_PROTECTED_TO_REAL) ++ return 1; + saved_rm_regs.uss = 0; + oldctx.ss_sel = regs->uss; + return 1; + case 3: /* ds */ + regs->vds = getreg16(regs, modrm); ++ if (mode == VM86_PROTECTED_TO_REAL) ++ return 1; + saved_rm_regs.vds = 0; + oldctx.ds_sel = regs->vds; + return 1; + case 4: /* fs */ + regs->vfs = getreg16(regs, modrm); ++ if (mode == VM86_PROTECTED_TO_REAL) ++ return 1; + saved_rm_regs.vfs = 0; + oldctx.fs_sel = regs->vfs; + return 1; + case 5: /* gs */ + regs->vgs = getreg16(regs, modrm); ++ if (mode == VM86_PROTECTED_TO_REAL) ++ return 1; + saved_rm_regs.vgs = 0; + oldctx.gs_sel = regs->vgs; + return 1; +@@ -1063,7 +1083,8 @@ set_mode(struct regs *regs, enum vm86_mo + } + + mode = newmode; +- TRACE((regs, 0, states[mode])); ++ if (mode != VM86_PROTECTED) ++ TRACE((regs, 0, states[mode])); + } + + static void +@@ -1275,6 +1296,12 @@ opcode(struct regs *regs) + unsigned opc, modrm, disp; + unsigned prefix = 0; + ++ if (mode == VM86_PROTECTED_TO_REAL && ++ oldctx.cs_arbytes.fields.default_ops_size) { ++ prefix |= DATA32; ++ prefix |= ADDR32; ++ } ++ + for (;;) { + switch ((opc = fetch8(regs))) { + case 0x07: /* pop %es */ +@@ -1385,17 +1412,29 @@ opcode(struct regs *regs) + continue; + + case 0x66: +- TRACE((regs, regs->eip - eip, "data32")); +- prefix |= DATA32; ++ if (mode == VM86_PROTECTED_TO_REAL && ++ oldctx.cs_arbytes.fields.default_ops_size) { ++ TRACE((regs, regs->eip - eip, "data16")); ++ prefix &= ~DATA32; ++ } else { ++ TRACE((regs, regs->eip - eip, "data32")); ++ prefix |= DATA32; ++ } + continue; + + case 0x67: +- TRACE((regs, regs->eip - eip, "addr32")); +- prefix |= ADDR32; ++ if (mode == VM86_PROTECTED_TO_REAL && ++ oldctx.cs_arbytes.fields.default_ops_size) { ++ TRACE((regs, regs->eip - eip, "addr16")); ++ prefix &= ~ADDR32; ++ } else { ++ TRACE((regs, regs->eip - eip, "addr32")); ++ prefix |= ADDR32; ++ } + continue; + +- case 0x88: /* addr32 mov r8, r/m8 */ +- case 0x8A: /* addr32 mov r/m8, r8 */ ++ case 0x88: /* mov r8, r/m8 */ ++ case 0x8A: /* mov r/m8, r8 */ + if (mode != VM86_REAL && mode != VM86_REAL_TO_PROTECTED) + goto invalid; + if ((prefix & ADDR32) == 0) diff --git a/cross-build-fix.diff b/cross-build-fix.diff index f5d5bd5..845aca8 100644 --- a/cross-build-fix.diff +++ b/cross-build-fix.diff @@ -13,10 +13,10 @@ Signed-off-by: Gerd Hoffmann tools/Makefile | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) -Index: xen-unstable/config/x86_32.mk +Index: xen-3.1-testing/config/x86_32.mk =================================================================== ---- xen-unstable.orig/config/x86_32.mk -+++ xen-unstable/config/x86_32.mk +--- xen-3.1-testing.orig/config/x86_32.mk ++++ xen-3.1-testing/config/x86_32.mk @@ -7,8 +7,10 @@ CONFIG_MIGRATE := y CONFIG_XCUTILS := y CONFIG_IOEMU := y @@ -30,11 +30,11 @@ Index: xen-unstable/config/x86_32.mk # Use only if calling $(LD) directly. ifeq ($(XEN_OS),OpenBSD) -Index: xen-unstable/tools/Makefile +Index: xen-3.1-testing/tools/Makefile =================================================================== ---- xen-unstable.orig/tools/Makefile -+++ xen-unstable/tools/Makefile -@@ -63,7 +63,7 @@ check_clean: +--- xen-3.1-testing.orig/tools/Makefile ++++ xen-3.1-testing/tools/Makefile +@@ -62,7 +62,7 @@ check_clean: $(MAKE) -C check clean .PHONY: ioemu ioemuinstall ioemuclean diff --git a/edd.patch b/edd.patch index f3b1e50..5431357 100644 --- a/edd.patch +++ b/edd.patch @@ -1,7 +1,7 @@ -Index: 2007-03-19/xen/arch/x86/Makefile +Index: 2007-05-14/xen/arch/x86/Makefile =================================================================== ---- 2007-03-19.orig/xen/arch/x86/Makefile 2007-03-19 14:07:06.000000000 +0100 -+++ 2007-03-19/xen/arch/x86/Makefile 2007-03-19 14:07:47.000000000 +0100 +--- 2007-05-14.orig/xen/arch/x86/Makefile 2007-07-02 12:05:34.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/Makefile 2007-07-02 11:55:01.000000000 +0200 @@ -78,7 +78,7 @@ xen.lds: $(TARGET_SUBARCH)/xen.lds.S $(H boot/mkelf32: boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< @@ -11,10 +11,10 @@ Index: 2007-03-19/xen/arch/x86/Makefile .PHONY: clean clean:: -Index: 2007-03-19/xen/arch/x86/boot/edd.S +Index: 2007-05-14/xen/arch/x86/boot/edd.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ 2007-03-19/xen/arch/x86/boot/edd.S 2007-03-19 14:07:47.000000000 +0100 ++++ 2007-05-14/xen/arch/x86/boot/edd.S 2007-07-02 12:05:50.000000000 +0200 @@ -0,0 +1,217 @@ +/* + * BIOS Enhanced Disk Drive support @@ -30,7 +30,7 @@ Index: 2007-03-19/xen/arch/x86/boot/edd.S + * Xen adoption by Jan Beulich , February 2007 + */ + -+#include ++#include + +# It is assumed that %ds == INITSEG here + @@ -233,10 +233,10 @@ Index: 2007-03-19/xen/arch/x86/boot/edd.S + jb edd_check_ext # keep looping + +edd_done: -Index: 2007-03-19/xen/arch/x86/boot/realmode.S +Index: 2007-05-14/xen/arch/x86/boot/realmode.S =================================================================== ---- 2007-03-19.orig/xen/arch/x86/boot/realmode.S 2007-03-21 14:34:55.000000000 +0100 -+++ 2007-03-19/xen/arch/x86/boot/realmode.S 2007-03-21 14:35:06.000000000 +0100 +--- 2007-05-14.orig/xen/arch/x86/boot/realmode.S 2007-07-02 12:05:34.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/boot/realmode.S 2007-07-02 11:55:01.000000000 +0200 @@ -120,3 +120,26 @@ cmd_line_ptr: .long 0 .Lgdt: .skip 2+4 .Lidt: .skip 2+4 @@ -264,10 +264,10 @@ Index: 2007-03-19/xen/arch/x86/boot/realmode.S +eddnr: .skip 1 +edd_mbr_sig_nr_buf: .skip 1 + .previous -Index: 2007-03-19/xen/arch/x86/boot/x86_32.S +Index: 2007-05-14/xen/arch/x86/boot/x86_32.S =================================================================== ---- 2007-03-19.orig/xen/arch/x86/boot/x86_32.S 2007-03-19 14:07:06.000000000 +0100 -+++ 2007-03-19/xen/arch/x86/boot/x86_32.S 2007-03-19 14:07:47.000000000 +0100 +--- 2007-05-14.orig/xen/arch/x86/boot/x86_32.S 2007-07-02 12:05:34.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/boot/x86_32.S 2007-07-02 11:55:01.000000000 +0200 @@ -90,6 +90,9 @@ __start: lea __PAGE_OFFSET(%ebx),%eax push %eax @@ -278,10 +278,10 @@ Index: 2007-03-19/xen/arch/x86/boot/x86_32.S #ifdef CONFIG_X86_PAE /* Initialize low and high mappings of all memory with 2MB pages */ mov $SYM_PHYS(idle_pg_table_l2),%edi -Index: 2007-03-19/xen/arch/x86/boot/x86_64.S +Index: 2007-05-14/xen/arch/x86/boot/x86_64.S =================================================================== ---- 2007-03-19.orig/xen/arch/x86/boot/x86_64.S 2007-03-19 14:07:06.000000000 +0100 -+++ 2007-03-19/xen/arch/x86/boot/x86_64.S 2007-03-19 14:07:47.000000000 +0100 +--- 2007-05-14.orig/xen/arch/x86/boot/x86_64.S 2007-07-02 12:05:34.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/boot/x86_64.S 2007-07-02 11:55:01.000000000 +0200 @@ -73,6 +73,8 @@ __start: mov %ebx,SYM_PHYS(multiboot_ptr) @@ -291,19 +291,18 @@ Index: 2007-03-19/xen/arch/x86/boot/x86_64.S /* We begin by interrogating the CPU for the presence of long mode. */ mov $0x80000000,%eax -Index: 2007-03-19/xen/arch/x86/platform_hypercall.c +Index: 2007-05-14/xen/arch/x86/platform_hypercall.c =================================================================== ---- 2007-03-19.orig/xen/arch/x86/platform_hypercall.c 2007-03-21 14:32:46.000000000 +0100 -+++ 2007-03-19/xen/arch/x86/platform_hypercall.c 2007-03-19 14:07:47.000000000 +0100 -@@ -17,6 +17,7 @@ - #include - #include - #include -+#include +--- 2007-05-14.orig/xen/arch/x86/platform_hypercall.c 2007-07-02 12:05:34.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/platform_hypercall.c 2007-07-02 11:55:16.000000000 +0200 +@@ -20,14 +20,21 @@ #include #include #include -@@ -26,8 +27,14 @@ ++#include + #include + #include "cpu/mtrr/mtrr.h" + #ifndef COMPAT typedef long ret_t; DEFINE_SPINLOCK(xenpf_lock); @@ -318,70 +317,63 @@ Index: 2007-03-19/xen/arch/x86/platform_hypercall.c #endif ret_t do_platform_op(XEN_GUEST_HANDLE(xen_platform_op_t) u_xenpf_op) -@@ -151,6 +158,73 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -151,6 +158,66 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe } break; + case XENPF_firmware_info: + switch ( op->u.firmware_info.type ) + { -+ case XEN_FW_DISK_INFO: -+ if ( op->u.firmware_info.index < edd.edd_info_nr ) -+ { -+ const struct edd_info *info = edd.edd_info + op->u.firmware_info.index; ++ case XEN_FW_DISK_INFO: { ++ const struct edd_info *info; ++ u16 length; + -+ op->u.firmware_info.u.disk_info.max_cylinder = info->legacy_max_cylinder; -+ op->u.firmware_info.u.disk_info.max_head = info->legacy_max_head; -+ op->u.firmware_info.u.disk_info.sectors_per_track = info->legacy_sectors_per_track; -+ if ( copy_field_to_guest(u_xenpf_op, op, u.firmware_info.u.disk_info) ) -+ ret = -EFAULT; -+ } -+ else -+ ret = -ESRCH; -+ break; -+ case XEN_FW_EDD_INFO: -+ if ( op->u.firmware_info.index < edd.edd_info_nr ) -+ { -+ const struct edd_info *info = edd.edd_info + op->u.firmware_info.index; ++ ret = -ESRCH; ++ if ( op->u.firmware_info.index >= edd.edd_info_nr ) ++ break; + -+ op->u.firmware_info.u.edd_info.device = info->device; -+ op->u.firmware_info.u.edd_info.version = info->version; -+ op->u.firmware_info.u.edd_info.interface = info->interface_support; -+ if ( copy_field_to_guest(u_xenpf_op, op, u.firmware_info.u.edd_info) ) -+ ret = -EFAULT; -+ } -+ else -+ ret = -ESRCH; -+ break; -+ case XEN_FW_EDD_PARAMS: -+ if ( op->u.firmware_info.index < edd.edd_info_nr ) -+ { -+ u16 length; ++ info = edd.edd_info + op->u.firmware_info.index; + -+ if ( copy_from_compat(&length, op->u.firmware_info.u.edd_params, 1) == 0 ) -+ { -+ if ( length > edd.edd_info[op->u.firmware_info.index].params.length ) -+ length = edd.edd_info[op->u.firmware_info.index].params.length; -+ if ( copy_to_compat(op->u.firmware_info.u.edd_params, -+ (u8*)&edd.edd_info[op->u.firmware_info.index].params, -+ length) ) -+ ret = -EFAULT; -+ } -+ else -+ ret = -EFAULT; -+ } -+ else -+ ret = -ESRCH; ++ /* Transfer the EDD info block. */ ++ ret = -EFAULT; ++ if ( copy_from_compat(&length, op->u.firmware_info.u. ++ disk_info.edd_params, 1) ) ++ break; ++ if ( length > info->edd_device_params.length ) ++ length = info->edd_device_params.length; ++ if ( copy_to_compat(op->u.firmware_info.u.disk_info.edd_params, ++ (u8 *)&info->edd_device_params, ++ length) ) ++ break; ++ ++ /* Transfer miscellaneous other information values. */ ++#define C(x) op->u.firmware_info.u.disk_info.x = info->x ++ C(device); ++ C(version); ++ C(interface_support); ++ C(legacy_max_cylinder); ++ C(legacy_max_head); ++ C(legacy_sectors_per_track); ++#undef C ++ ++ ret = (copy_field_to_guest(u_xenpf_op, op, ++ u.firmware_info.u.disk_info) ++ ? -EFAULT : 0); + break; -+ case XEN_FW_MBR_SIGNATURE: -+ if ( op->u.firmware_info.index < edd.mbr_signature_nr ) -+ { -+ op->u.firmware_info.u.mbr_signature = edd.mbr_signature[op->u.firmware_info.index]; -+ if ( copy_field_to_guest(u_xenpf_op, op, u.firmware_info.u.mbr_signature) ) -+ ret = -EFAULT; -+ } -+ else -+ ret = -ESRCH; ++ } ++ case XEN_FW_DISK_MBR_SIGNATURE: ++ ret = -ESRCH; ++ if ( op->u.firmware_info.index >= edd.mbr_signature_nr ) ++ break; ++ ++ op->u.firmware_info.u.disk_mbr_signature.device = ++ 0x80 + op->u.firmware_info.index; ++ op->u.firmware_info.u.disk_mbr_signature.mbr_signature = ++ edd.mbr_signature[op->u.firmware_info.index]; ++ ++ ret = (copy_field_to_guest(u_xenpf_op, op, ++ u.firmware_info.u.disk_mbr_signature) ++ ? -EFAULT : 0); + break; + default: + ret = -EINVAL; @@ -392,7 +384,7 @@ Index: 2007-03-19/xen/arch/x86/platform_hypercall.c default: ret = -ENOSYS; break; -@@ -161,6 +235,19 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -161,6 +228,19 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe return ret; } @@ -412,19 +404,17 @@ Index: 2007-03-19/xen/arch/x86/platform_hypercall.c /* * Local variables: * mode: C -Index: 2007-03-19/xen/include/public/platform.h +Index: 2007-05-14/xen/include/public/platform.h =================================================================== ---- 2007-03-19.orig/xen/include/public/platform.h 2007-03-21 14:32:46.000000000 +0100 -+++ 2007-03-19/xen/include/public/platform.h 2007-03-19 14:07:47.000000000 +0100 -@@ -114,6 +114,35 @@ struct xenpf_platform_quirk { +--- 2007-05-14.orig/xen/include/public/platform.h 2007-07-02 12:05:34.000000000 +0200 ++++ 2007-05-14/xen/include/public/platform.h 2007-07-02 11:55:01.000000000 +0200 +@@ -114,6 +114,37 @@ struct xenpf_platform_quirk { typedef struct xenpf_platform_quirk xenpf_platform_quirk_t; DEFINE_XEN_GUEST_HANDLE(xenpf_platform_quirk_t); +#define XENPF_firmware_info 50 -+#define XEN_FW_DISK_INFO 1 /* from int 13 AH=08 */ -+#define XEN_FW_EDD_INFO 2 /* from int 13 AH=41 */ -+#define XEN_FW_EDD_PARAMS 3 /* from int 13 AH=48 */ -+#define XEN_FW_MBR_SIGNATURE 4 ++#define XEN_FW_DISK_INFO 1 /* from int 13 AH=08/41/48 */ ++#define XEN_FW_DISK_MBR_SIGNATURE 2 /* from MBR offset 0x1b8 */ +struct xenpf_firmware_info { + /* IN variables. */ + uint32_t type; @@ -432,18 +422,22 @@ Index: 2007-03-19/xen/include/public/platform.h + /* OUT variables. */ + union { + struct { -+ uint16_t max_cylinder; -+ uint8_t max_head; -+ uint8_t sectors_per_track; -+ } disk_info; ++ /* Int13, Fn48: Check Extensions Present. */ ++ uint8_t device; /* %dl: bios device number */ ++ uint8_t version; /* %ah: major version */ ++ uint16_t interface_support; /* %cx: support bitmap */ ++ /* Int13, Fn08: Legacy Get Device Parameters. */ ++ uint16_t legacy_max_cylinder; /* %cl[7:6]:%ch: max cyl # */ ++ uint8_t legacy_max_head; /* %dh: max head # */ ++ uint8_t legacy_sectors_per_track; /* %cl[5:0]: max sector # */ ++ /* Int13, Fn41: Get Device Parameters (as filled into %ds:%esi). */ ++ /* NB. First uint16_t of buffer must be set to buffer size. */ ++ XEN_GUEST_HANDLE(void) edd_params; ++ } disk_info; /* XEN_FW_DISK_INFO */ + struct { -+ uint8_t device; -+ uint8_t version; -+ uint16_t interface; -+ } edd_info; -+ /* first uint16_t of buffer must be set to buffer size */ -+ XEN_GUEST_HANDLE(void) edd_params; -+ uint32_t mbr_signature; ++ uint8_t device; /* bios device number */ ++ uint32_t mbr_signature; /* offset 0x1b8 in mbr */ ++ } disk_mbr_signature; /* XEN_FW_DISK_MBR_SIGNATURE */ + } u; +}; +typedef struct xenpf_firmware_info xenpf_firmware_info_t; @@ -452,7 +446,7 @@ Index: 2007-03-19/xen/include/public/platform.h struct xen_platform_op { uint32_t cmd; uint32_t interface_version; /* XENPF_INTERFACE_VERSION */ -@@ -124,6 +153,7 @@ struct xen_platform_op { +@@ -124,6 +155,7 @@ struct xen_platform_op { struct xenpf_read_memtype read_memtype; struct xenpf_microcode_update microcode; struct xenpf_platform_quirk platform_quirk; @@ -460,11 +454,11 @@ Index: 2007-03-19/xen/include/public/platform.h uint8_t pad[128]; } u; }; -Index: 2007-03-19/xen/include/xen/edd.h +Index: 2007-05-14/xen/include/asm-x86/edd.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ 2007-03-19/xen/include/xen/edd.h 2007-03-19 14:07:47.000000000 +0100 -@@ -0,0 +1,193 @@ ++++ 2007-05-14/xen/include/asm-x86/edd.h 2007-07-02 11:27:08.000000000 +0200 +@@ -0,0 +1,90 @@ +/* + * xen/include/linux/edd.h + * Copyright (C) 2002, 2003, 2004 Dell Inc. @@ -478,14 +472,6 @@ Index: 2007-03-19/xen/include/xen/edd.h + * available at http://www.t13.org/docs2002/d1572r0.pdf. It is + * very similar to D1484 Revision 3 http://www.t13.org/docs2002/d1484r3.pdf + * -+ * In a nutshell, arch/{i386,x86_64}/boot/setup.S populates a scratch -+ * table in the boot_params that contains a list of BIOS-enumerated -+ * boot devices. -+ * In arch/{i386,x86_64}/kernel/setup.c, this information is -+ * transferred into the edd structure, and in drivers/firmware/edd.c, that -+ * information is used to identify BIOS boot disk. The code in setup.S -+ * is very sensitive to the size of these structures. -+ * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License v2.0 as published by + * the Free Software Foundation @@ -533,115 +519,20 @@ Index: 2007-03-19/xen/include/xen/edd.h +#define EDD_INFO_NO_MEDIA_PRESENT (1 << 6) +#define EDD_INFO_USE_INT13_FN50 (1 << 7) + -+struct edd_device_params { -+ u16 length; -+ u16 info_flags; -+ u32 num_default_cylinders; -+ u32 num_default_heads; -+ u32 sectors_per_track; -+ u64 number_of_sectors; -+ u16 bytes_per_sector; -+ u32 dpte_ptr; /* 0xFFFFFFFF for our purposes */ -+ u16 key; /* = 0xBEDD */ -+ u8 device_path_info_length; /* = 44 */ -+ u8 reserved2; -+ u16 reserved3; -+ u8 host_bus_type[4]; -+ u8 interface_type[8]; -+ union { -+ struct { -+ u16 base_address; -+ u16 reserved1; -+ u32 reserved2; -+ } __attribute__ ((packed)) isa; -+ struct { -+ u8 bus; -+ u8 slot; -+ u8 function; -+ u8 channel; -+ u32 reserved; -+ } __attribute__ ((packed)) pci; -+ /* pcix is same as pci */ -+ struct { -+ u64 reserved; -+ } __attribute__ ((packed)) ibnd; -+ struct { -+ u64 reserved; -+ } __attribute__ ((packed)) xprs; -+ struct { -+ u64 reserved; -+ } __attribute__ ((packed)) htpt; -+ struct { -+ u64 reserved; -+ } __attribute__ ((packed)) unknown; -+ } interface_path; -+ union { -+ struct { -+ u8 device; -+ u8 reserved1; -+ u16 reserved2; -+ u32 reserved3; -+ u64 reserved4; -+ } __attribute__ ((packed)) ata; -+ struct { -+ u8 device; -+ u8 lun; -+ u8 reserved1; -+ u8 reserved2; -+ u32 reserved3; -+ u64 reserved4; -+ } __attribute__ ((packed)) atapi; -+ struct { -+ u16 id; -+ u64 lun; -+ u16 reserved1; -+ u32 reserved2; -+ } __attribute__ ((packed)) scsi; -+ struct { -+ u64 serial_number; -+ u64 reserved; -+ } __attribute__ ((packed)) usb; -+ struct { -+ u64 eui; -+ u64 reserved; -+ } __attribute__ ((packed)) i1394; -+ struct { -+ u64 wwid; -+ u64 lun; -+ } __attribute__ ((packed)) fibre; -+ struct { -+ u64 identity_tag; -+ u64 reserved; -+ } __attribute__ ((packed)) i2o; -+ struct { -+ u32 array_number; -+ u32 reserved1; -+ u64 reserved2; -+ } __attribute__ ((packed)) raid; -+ struct { -+ u8 device; -+ u8 reserved1; -+ u16 reserved2; -+ u32 reserved3; -+ u64 reserved4; -+ } __attribute__ ((packed)) sata; -+ struct { -+ u64 reserved1; -+ u64 reserved2; -+ } __attribute__ ((packed)) unknown; -+ } device_path; -+ u8 reserved4; -+ u8 checksum; -+} __attribute__ ((packed)); -+ +struct edd_info { -+ u8 device; -+ u8 version; -+ u16 interface_support; -+ u16 legacy_max_cylinder; -+ u8 legacy_max_head; -+ u8 legacy_sectors_per_track; -+ struct edd_device_params params; ++ /* Int13, Fn48: Check Extensions Present. */ ++ u8 device; /* %dl: device */ ++ u8 version; /* %ah: major version */ ++ u16 interface_support; /* %cx: interface support bitmap */ ++ /* Int13, Fn08: Legacy Get Device Parameters. */ ++ u16 legacy_max_cylinder; /* %cl[7:6]:%ch: maximum cylinder number */ ++ u8 legacy_max_head; /* %dh: maximum head number */ ++ u8 legacy_sectors_per_track; /* %cl[5:0]: maximum sector number */ ++ /* Int13, Fn41: Get Device Parameters (as filled into %ds:%esi). */ ++ struct { ++ u16 length; ++ u8 data[72]; ++ } edd_device_params; +} __attribute__ ((packed)); + +struct edd { diff --git a/edid.patch b/edid.patch index 2cd1416..e1951b1 100644 --- a/edid.patch +++ b/edid.patch @@ -1,7 +1,7 @@ -Index: 2007-03-19/xen/arch/x86/Makefile +Index: 2007-05-14/xen/arch/x86/Makefile =================================================================== ---- 2007-03-19.orig/xen/arch/x86/Makefile 2007-03-19 14:07:47.000000000 +0100 -+++ 2007-03-19/xen/arch/x86/Makefile 2007-03-19 14:07:50.000000000 +0100 +--- 2007-05-14.orig/xen/arch/x86/Makefile 2007-07-02 12:09:34.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/Makefile 2007-03-19 14:07:50.000000000 +0100 @@ -78,7 +78,7 @@ xen.lds: $(TARGET_SUBARCH)/xen.lds.S $(H boot/mkelf32: boot/mkelf32.c $(HOSTCC) $(HOSTCFLAGS) -o $@ $< @@ -11,10 +11,10 @@ Index: 2007-03-19/xen/arch/x86/Makefile .PHONY: clean clean:: -Index: 2007-03-19/xen/arch/x86/boot/realmode.S +Index: 2007-05-14/xen/arch/x86/boot/realmode.S =================================================================== ---- 2007-03-19.orig/xen/arch/x86/boot/realmode.S 2007-03-21 14:35:06.000000000 +0100 -+++ 2007-03-19/xen/arch/x86/boot/realmode.S 2007-03-21 14:35:14.000000000 +0100 +--- 2007-05-14.orig/xen/arch/x86/boot/realmode.S 2007-07-02 12:09:34.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/boot/realmode.S 2007-03-21 14:35:14.000000000 +0100 @@ -142,4 +142,11 @@ eddbuf: .skip EDDMAXNR * (EDDEXTSIZE + edd_mbr_sig_buf: .skip EDD_MBR_SIG_MAX * 4 eddnr: .skip 1 @@ -27,10 +27,10 @@ Index: 2007-03-19/xen/arch/x86/boot/realmode.S .previous + +#include "video.S" -Index: 2007-03-19/xen/arch/x86/boot/video.S +Index: 2007-05-14/xen/arch/x86/boot/video.S =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ 2007-03-19/xen/arch/x86/boot/video.S 2007-03-19 14:07:50.000000000 +0100 ++++ 2007-05-14/xen/arch/x86/boot/video.S 2007-03-19 14:07:50.000000000 +0100 @@ -0,0 +1,35 @@ +store_edid: + movl $0x13131313, %eax # memset block with 0x13 @@ -67,10 +67,10 @@ Index: 2007-03-19/xen/arch/x86/boot/video.S + +no_edid: + ret -Index: 2007-03-19/xen/arch/x86/boot/x86_32.S +Index: 2007-05-14/xen/arch/x86/boot/x86_32.S =================================================================== ---- 2007-03-19.orig/xen/arch/x86/boot/x86_32.S 2007-03-19 14:07:47.000000000 +0100 -+++ 2007-03-19/xen/arch/x86/boot/x86_32.S 2007-03-19 14:07:50.000000000 +0100 +--- 2007-05-14.orig/xen/arch/x86/boot/x86_32.S 2007-07-02 12:09:34.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/boot/x86_32.S 2007-03-19 14:07:50.000000000 +0100 @@ -92,6 +92,8 @@ __start: pushl $SYM_PHYS(edd) @@ -80,10 +80,10 @@ Index: 2007-03-19/xen/arch/x86/boot/x86_32.S #ifdef CONFIG_X86_PAE /* Initialize low and high mappings of all memory with 2MB pages */ -Index: 2007-03-19/xen/arch/x86/boot/x86_64.S +Index: 2007-05-14/xen/arch/x86/boot/x86_64.S =================================================================== ---- 2007-03-19.orig/xen/arch/x86/boot/x86_64.S 2007-03-19 14:07:47.000000000 +0100 -+++ 2007-03-19/xen/arch/x86/boot/x86_64.S 2007-03-19 14:07:50.000000000 +0100 +--- 2007-05-14.orig/xen/arch/x86/boot/x86_64.S 2007-07-02 12:09:34.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/boot/x86_64.S 2007-03-19 14:07:50.000000000 +0100 @@ -75,6 +75,8 @@ __start: lss SYM_PHYS(.Lstack_start),%esp pushl $SYM_PHYS(edd) @@ -93,10 +93,10 @@ Index: 2007-03-19/xen/arch/x86/boot/x86_64.S /* We begin by interrogating the CPU for the presence of long mode. */ mov $0x80000000,%eax -Index: 2007-03-19/xen/arch/x86/platform_hypercall.c +Index: 2007-05-14/xen/arch/x86/platform_hypercall.c =================================================================== ---- 2007-03-19.orig/xen/arch/x86/platform_hypercall.c 2007-03-19 14:07:47.000000000 +0100 -+++ 2007-03-19/xen/arch/x86/platform_hypercall.c 2007-03-19 14:07:50.000000000 +0100 +--- 2007-05-14.orig/xen/arch/x86/platform_hypercall.c 2007-07-02 12:09:34.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/platform_hypercall.c 2007-07-02 12:09:50.000000000 +0200 @@ -24,10 +24,15 @@ #include #include "cpu/mtrr/mtrr.h" @@ -121,29 +121,35 @@ Index: 2007-03-19/xen/arch/x86/platform_hypercall.c #endif ret_t do_platform_op(XEN_GUEST_HANDLE(xen_platform_op_t) u_xenpf_op) -@@ -219,6 +225,21 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe - else - ret = -ESRCH; +@@ -212,6 +218,27 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe + u.firmware_info.u.disk_mbr_signature) + ? -EFAULT : 0); break; -+ case XEN_FW_DDC_INFO: -+ if ( op->u.firmware_info.index == 0 ) -+ { -+ op->u.firmware_info.u.ddc_info.capabilities = ddc.capabilities; -+ op->u.firmware_info.u.ddc_info.edid_transfer_time = ddc.edid_transfer_time; -+ if ( copy_field_to_guest(u_xenpf_op, op, u.firmware_info.u.ddc_info.capabilities) || -+ copy_field_to_guest(u_xenpf_op, op, u.firmware_info.u.ddc_info.edid_transfer_time) || -+ copy_to_compat(op->u.firmware_info.u.ddc_info.edid, -+ ddc.edid, -+ ARRAY_SIZE(ddc.edid)) ) -+ ret = -EFAULT; -+ } -+ else -+ ret = -ESRCH; ++ case XEN_FW_VBEDDC_INFO: ++ ret = -ESRCH; ++ if ( op->u.firmware_info.index != 0 ) ++ break; ++ if ( *(u32 *)ddc.edid == 0x13131313 ) ++ break; ++ ++ op->u.firmware_info.u.vbeddc_info.capabilities = ++ ddc.capabilities; ++ op->u.firmware_info.u.vbeddc_info.edid_transfer_time = ++ ddc.edid_transfer_time; ++ ++ ret = 0; ++ if ( copy_field_to_guest(u_xenpf_op, op, u.firmware_info. ++ u.vbeddc_info.capabilities) || ++ copy_field_to_guest(u_xenpf_op, op, u.firmware_info. ++ u.vbeddc_info.edid_transfer_time) || ++ copy_to_compat(op->u.firmware_info.u.vbeddc_info.edid, ++ ddc.edid, ARRAY_SIZE(ddc.edid)) ) ++ ret = -EFAULT; + break; default: ret = -EINVAL; break; -@@ -238,11 +259,17 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe +@@ -231,11 +258,17 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe #ifndef COMPAT static int __init firmware_init(void) { @@ -161,28 +167,29 @@ Index: 2007-03-19/xen/arch/x86/platform_hypercall.c return 0; } __initcall(firmware_init); -Index: 2007-03-19/xen/include/public/platform.h +Index: 2007-05-14/xen/include/public/platform.h =================================================================== ---- 2007-03-19.orig/xen/include/public/platform.h 2007-03-19 14:07:47.000000000 +0100 -+++ 2007-03-19/xen/include/public/platform.h 2007-03-19 14:07:50.000000000 +0100 -@@ -119,6 +119,7 @@ DEFINE_XEN_GUEST_HANDLE(xenpf_platform_q - #define XEN_FW_EDD_INFO 2 /* from int 13 AH=41 */ - #define XEN_FW_EDD_PARAMS 3 /* from int 13 AH=48 */ - #define XEN_FW_MBR_SIGNATURE 4 -+#define XEN_FW_DDC_INFO 5 /* from int 10 AX=4f15 */ +--- 2007-05-14.orig/xen/include/public/platform.h 2007-07-02 12:09:34.000000000 +0200 ++++ 2007-05-14/xen/include/public/platform.h 2007-07-02 11:49:06.000000000 +0200 +@@ -117,6 +117,7 @@ DEFINE_XEN_GUEST_HANDLE(xenpf_platform_q + #define XENPF_firmware_info 50 + #define XEN_FW_DISK_INFO 1 /* from int 13 AH=08/41/48 */ + #define XEN_FW_DISK_MBR_SIGNATURE 2 /* from MBR offset 0x1b8 */ ++#define XEN_FW_VBEDDC_INFO 3 /* from int 10 AX=4f15 */ struct xenpf_firmware_info { /* IN variables. */ uint32_t type; -@@ -138,6 +139,12 @@ struct xenpf_firmware_info { - /* first uint16_t of buffer must be set to buffer size */ - XEN_GUEST_HANDLE(void) edd_params; - uint32_t mbr_signature; +@@ -140,6 +141,13 @@ struct xenpf_firmware_info { + uint8_t device; /* bios device number */ + uint32_t mbr_signature; /* offset 0x1b8 in mbr */ + } disk_mbr_signature; /* XEN_FW_DISK_MBR_SIGNATURE */ + struct { ++ /* Int10, AX=4F15: Get EDID info. */ + uint8_t capabilities; + uint8_t edid_transfer_time; + /* must refer to 128-byte buffer */ + XEN_GUEST_HANDLE(uint8_t) edid; -+ } ddc_info; ++ } vbeddc_info; /* XEN_FW_VBEDDC_INFO */ } u; }; typedef struct xenpf_firmware_info xenpf_firmware_info_t; diff --git a/guest-copy.patch b/guest-copy.patch index 5477a13..b065cb7 100644 --- a/guest-copy.patch +++ b/guest-copy.patch @@ -1,7 +1,7 @@ -Index: 2007-05-14/xen/arch/x86/mm.c +Index: xen-3.1-testing/xen/arch/x86/mm.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/mm.c 2007-05-15 12:07:55.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/mm.c 2007-05-14 14:33:33.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/mm.c ++++ xen-3.1-testing/xen/arch/x86/mm.c @@ -2896,7 +2896,7 @@ long do_set_gdt(XEN_GUEST_HANDLE(ulong) if ( entries > FIRST_RESERVED_GDT_ENTRY ) return -EINVAL; @@ -47,10 +47,10 @@ Index: 2007-05-14/xen/arch/x86/mm.c .v_start = MACH2PHYS_VIRT_START, .v_end = MACH2PHYS_VIRT_END, .max_mfn = MACH2PHYS_NR_ENTRIES - 1 -Index: 2007-05-14/xen/arch/x86/traps.c +Index: xen-3.1-testing/xen/arch/x86/traps.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/traps.c 2007-05-15 12:07:55.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/traps.c 2007-05-14 14:33:33.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/traps.c ++++ xen-3.1-testing/xen/arch/x86/traps.c @@ -1117,7 +1117,7 @@ static inline int guest_io_okay( * read as 0xff (no access allowed). */ @@ -60,10 +60,10 @@ Index: 2007-05-14/xen/arch/x86/traps.c port>>3, 2) ) { default: x.bytes[0] = ~0; -Index: 2007-05-14/xen/common/domctl.c +Index: xen-3.1-testing/xen/common/domctl.c =================================================================== ---- 2007-05-14.orig/xen/common/domctl.c 2007-05-15 12:07:55.000000000 +0200 -+++ 2007-05-14/xen/common/domctl.c 2007-05-14 14:33:33.000000000 +0200 +--- xen-3.1-testing.orig/xen/common/domctl.c ++++ xen-3.1-testing/xen/common/domctl.c @@ -43,7 +43,7 @@ void cpumask_to_xenctl_cpumap( bitmap_long_to_byte(bytemap, cpus_addr(*cpumask), NR_CPUS); @@ -82,10 +82,10 @@ Index: 2007-05-14/xen/common/domctl.c bitmap_byte_to_long(cpus_addr(*cpumask), bytemap, NR_CPUS); } -Index: 2007-05-14/xen/common/kernel.c +Index: xen-3.1-testing/xen/common/kernel.c =================================================================== ---- 2007-05-14.orig/xen/common/kernel.c 2007-05-15 12:07:55.000000000 +0200 -+++ 2007-05-14/xen/common/kernel.c 2007-05-14 14:33:33.000000000 +0200 +--- xen-3.1-testing.orig/xen/common/kernel.c ++++ xen-3.1-testing/xen/common/kernel.c @@ -142,7 +142,7 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL { xen_extraversion_t extraversion; @@ -124,10 +124,10 @@ Index: 2007-05-14/xen/common/kernel.c return -EFAULT; return 0; } -Index: 2007-05-14/xen/common/perfc.c +Index: xen-3.1-testing/xen/common/perfc.c =================================================================== ---- 2007-05-14.orig/xen/common/perfc.c 2007-05-15 12:07:55.000000000 +0200 -+++ 2007-05-14/xen/common/perfc.c 2007-05-14 14:33:33.000000000 +0200 +--- xen-3.1-testing.orig/xen/common/perfc.c ++++ xen-3.1-testing/xen/common/perfc.c @@ -227,7 +227,7 @@ static int perfc_copy_info(XEN_GUEST_HAN } BUG_ON(v != perfc_nbr_vals); @@ -137,10 +137,10 @@ Index: 2007-05-14/xen/common/perfc.c return -EFAULT; if ( copy_to_guest(val, perfc_vals, perfc_nbr_vals) ) return -EFAULT; -Index: 2007-05-14/xen/drivers/char/console.c +Index: xen-3.1-testing/xen/drivers/char/console.c =================================================================== ---- 2007-05-14.orig/xen/drivers/char/console.c 2007-05-15 12:07:55.000000000 +0200 -+++ 2007-05-14/xen/drivers/char/console.c 2007-05-14 14:33:33.000000000 +0200 +--- xen-3.1-testing.orig/xen/drivers/char/console.c ++++ xen-3.1-testing/xen/drivers/char/console.c @@ -326,7 +326,7 @@ static long guest_console_write(XEN_GUES CONSOLEIO_write, count, buffer); @@ -150,10 +150,10 @@ Index: 2007-05-14/xen/drivers/char/console.c return -EFAULT; kbuf[kcount] = '\0'; -Index: 2007-05-14/xen/include/asm-ia64/guest_access.h +Index: xen-3.1-testing/xen/include/asm-ia64/guest_access.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-ia64/guest_access.h 2007-05-15 12:07:55.000000000 +0200 -+++ 2007-05-14/xen/include/asm-ia64/guest_access.h 2007-05-15 12:23:53.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-ia64/guest_access.h ++++ xen-3.1-testing/xen/include/asm-ia64/guest_access.h @@ -76,28 +76,31 @@ extern int xencomm_handle_is_null(void * __copy_field_from_guest(ptr, hnd, field) @@ -197,10 +197,10 @@ Index: 2007-05-14/xen/include/asm-ia64/guest_access.h xencomm_copy_from_guest(_d, _s, sizeof(*_d), _off); \ }) -Index: 2007-05-14/xen/include/asm-x86/guest_access.h +Index: xen-3.1-testing/xen/include/asm-x86/guest_access.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/guest_access.h 2007-05-15 12:07:55.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/guest_access.h 2007-05-15 12:15:25.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/guest_access.h ++++ xen-3.1-testing/xen/include/asm-x86/guest_access.h @@ -32,11 +32,12 @@ * specifying an offset into the guest array. */ @@ -315,10 +315,10 @@ Index: 2007-05-14/xen/include/asm-x86/guest_access.h }) #endif /* __ASM_X86_GUEST_ACCESS_H__ */ -Index: 2007-05-14/xen/include/xen/compat.h +Index: xen-3.1-testing/xen/include/xen/compat.h =================================================================== ---- 2007-05-14.orig/xen/include/xen/compat.h 2007-05-15 12:07:55.000000000 +0200 -+++ 2007-05-14/xen/include/xen/compat.h 2007-05-15 12:18:41.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/xen/compat.h ++++ xen-3.1-testing/xen/include/xen/compat.h @@ -44,9 +44,10 @@ * specifying an offset into the guest array. */ @@ -416,10 +416,10 @@ Index: 2007-05-14/xen/include/xen/compat.h }) -Index: 2007-05-14/xen/include/xen/xencomm.h +Index: xen-3.1-testing/xen/include/xen/xencomm.h =================================================================== ---- 2007-05-14.orig/xen/include/xen/xencomm.h 2007-05-15 12:07:55.000000000 +0200 -+++ 2007-05-14/xen/include/xen/xencomm.h 2007-05-15 12:25:21.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/xen/xencomm.h ++++ xen-3.1-testing/xen/include/xen/xencomm.h @@ -87,29 +87,32 @@ static inline unsigned long xencomm_inli __copy_field_from_guest(ptr, hnd, field) diff --git a/hvm-efer.patch b/hvm-efer.patch index 903f90b..d0b5a57 100644 --- a/hvm-efer.patch +++ b/hvm-efer.patch @@ -1,7 +1,7 @@ Index: 2007-05-14/xen/arch/x86/domain.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/domain.c 2007-05-14 14:27:23.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/domain.c 2007-05-14 14:31:12.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/domain.c 2007-07-02 11:19:12.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/domain.c 2007-07-02 11:19:31.000000000 +0200 @@ -47,6 +47,7 @@ #endif @@ -10,7 +10,7 @@ Index: 2007-05-14/xen/arch/x86/domain.c static void paravirt_ctxt_switch_from(struct vcpu *v); static void paravirt_ctxt_switch_to(struct vcpu *v); -@@ -1138,21 +1139,18 @@ void context_switch(struct vcpu *prev, s +@@ -1150,21 +1151,18 @@ void context_switch(struct vcpu *prev, s __context_switch(); #ifdef CONFIG_COMPAT @@ -126,7 +126,7 @@ Index: 2007-05-14/xen/arch/x86/hvm/svm/svm.c Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmcs.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/hvm/vmx/vmcs.c 2007-05-03 09:45:09.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/hvm/vmx/vmcs.c 2007-07-02 10:37:53.000000000 +0200 +++ 2007-05-14/xen/arch/x86/hvm/vmx/vmcs.c 2007-05-14 14:28:19.000000000 +0200 @@ -285,11 +285,6 @@ static void construct_vmcs(struct vcpu * @@ -482,7 +482,7 @@ Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c __vmwrite(VM_ENTRY_CONTROLS, vm_entry_value); Index: 2007-05-14/xen/arch/x86/mm/shadow/multi.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/mm/shadow/multi.c 2007-05-03 09:45:09.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/mm/shadow/multi.c 2007-07-02 10:37:53.000000000 +0200 +++ 2007-05-14/xen/arch/x86/mm/shadow/multi.c 2007-05-14 14:28:19.000000000 +0200 @@ -181,11 +181,11 @@ guest_supports_superpages(struct vcpu *v static inline int @@ -502,7 +502,7 @@ Index: 2007-05-14/xen/arch/x86/mm/shadow/multi.c Index: 2007-05-14/xen/include/asm-x86/cpufeature.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/cpufeature.h 2007-04-23 10:01:46.000000000 +0200 +--- 2007-05-14.orig/xen/include/asm-x86/cpufeature.h 2007-07-02 10:37:53.000000000 +0200 +++ 2007-05-14/xen/include/asm-x86/cpufeature.h 2007-05-14 14:28:19.000000000 +0200 @@ -114,6 +114,7 @@ #define cpu_has_xmm2 boot_cpu_has(X86_FEATURE_XMM2) @@ -522,7 +522,7 @@ Index: 2007-05-14/xen/include/asm-x86/cpufeature.h #define cpu_has_k6_mtrr 0 Index: 2007-05-14/xen/include/asm-x86/hvm/hvm.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/hvm/hvm.h 2007-04-23 10:01:46.000000000 +0200 +--- 2007-05-14.orig/xen/include/asm-x86/hvm/hvm.h 2007-07-02 10:37:53.000000000 +0200 +++ 2007-05-14/xen/include/asm-x86/hvm/hvm.h 2007-05-14 14:28:19.000000000 +0200 @@ -93,14 +93,17 @@ struct hvm_function_table { * 1) determine whether paging is enabled, @@ -561,7 +561,7 @@ Index: 2007-05-14/xen/include/asm-x86/hvm/hvm.h return hvm_funcs.guest_x86_mode(v); Index: 2007-05-14/xen/include/asm-x86/hvm/svm/svm.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/hvm/svm/svm.h 2007-04-23 10:01:46.000000000 +0200 +--- 2007-05-14.orig/xen/include/asm-x86/hvm/svm/svm.h 2007-07-02 10:37:53.000000000 +0200 +++ 2007-05-14/xen/include/asm-x86/hvm/svm/svm.h 2007-05-14 14:28:19.000000000 +0200 @@ -62,6 +62,11 @@ static inline int svm_pae_enabled(struct return svm_paging_enabled(v) && (guest_cr4 & X86_CR4_PAE); @@ -577,7 +577,7 @@ Index: 2007-05-14/xen/include/asm-x86/hvm/svm/svm.h return v->arch.hvm_svm.cpu_shadow_cr0 & X86_CR0_PG; Index: 2007-05-14/xen/include/asm-x86/hvm/vmx/vmcs.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/hvm/vmx/vmcs.h 2007-05-03 09:45:09.000000000 +0200 +--- 2007-05-14.orig/xen/include/asm-x86/hvm/vmx/vmcs.h 2007-07-02 10:37:53.000000000 +0200 +++ 2007-05-14/xen/include/asm-x86/hvm/vmx/vmcs.h 2007-05-14 14:28:19.000000000 +0200 @@ -39,7 +39,6 @@ enum { VMX_INDEX_MSR_STAR, @@ -609,7 +609,7 @@ Index: 2007-05-14/xen/include/asm-x86/hvm/vmx/vmcs.h Index: 2007-05-14/xen/include/asm-x86/hvm/vmx/vmx.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/hvm/vmx/vmx.h 2007-04-23 10:01:46.000000000 +0200 +--- 2007-05-14.orig/xen/include/asm-x86/hvm/vmx/vmx.h 2007-07-02 10:37:53.000000000 +0200 +++ 2007-05-14/xen/include/asm-x86/hvm/vmx/vmx.h 2007-05-14 14:28:19.000000000 +0200 @@ -261,14 +261,12 @@ static inline int vmx_paging_enabled(str @@ -630,7 +630,7 @@ Index: 2007-05-14/xen/include/asm-x86/hvm/vmx/vmx.h static inline int vmx_pgbit_test(struct vcpu *v) Index: 2007-05-14/xen/include/asm-x86/msr.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/msr.h 2007-04-23 10:01:46.000000000 +0200 +--- 2007-05-14.orig/xen/include/asm-x86/msr.h 2007-07-02 10:37:53.000000000 +0200 +++ 2007-05-14/xen/include/asm-x86/msr.h 2007-05-14 14:28:19.000000000 +0200 @@ -3,6 +3,9 @@ diff --git a/hvm-hypercall-context.patch b/hvm-hypercall-context.patch index 17dfedb..e51fa50 100644 --- a/hvm-hypercall-context.patch +++ b/hvm-hypercall-context.patch @@ -1,7 +1,7 @@ Index: 2007-05-14/xen/arch/x86/domain.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/domain.c 2007-05-14 13:43:44.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/domain.c 2007-05-14 14:27:23.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/domain.c 2007-07-02 10:48:13.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/domain.c 2007-07-02 11:19:12.000000000 +0200 @@ -38,6 +38,7 @@ #include #include @@ -10,7 +10,7 @@ Index: 2007-05-14/xen/arch/x86/domain.c #include #include #include -@@ -1234,6 +1235,8 @@ void sync_vcpu_execstate(struct vcpu *v) +@@ -1246,6 +1247,8 @@ void sync_vcpu_execstate(struct vcpu *v) __arg; \ }) @@ -19,7 +19,7 @@ Index: 2007-05-14/xen/arch/x86/domain.c unsigned long hypercall_create_continuation( unsigned int op, const char *format, ...) { -@@ -1265,7 +1268,9 @@ unsigned long hypercall_create_continuat +@@ -1277,7 +1280,9 @@ unsigned long hypercall_create_continuat regs->eip -= 2; /* re-execute 'syscall' / 'int 0x82' */ #ifdef __x86_64__ @@ -30,7 +30,7 @@ Index: 2007-05-14/xen/arch/x86/domain.c { for ( i = 0; *p != '\0'; i++ ) { -@@ -1301,6 +1306,8 @@ unsigned long hypercall_create_continuat +@@ -1313,6 +1318,8 @@ unsigned long hypercall_create_continuat } } } @@ -193,7 +193,7 @@ Index: 2007-05-14/xen/arch/x86/hvm/hvm.c Index: 2007-05-14/xen/arch/x86/hvm/platform.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/hvm/platform.c 2007-04-23 10:01:41.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/hvm/platform.c 2007-07-02 10:37:54.000000000 +0200 +++ 2007-05-14/xen/arch/x86/hvm/platform.c 2007-05-14 13:47:25.000000000 +0200 @@ -1037,6 +1037,9 @@ void handle_mmio(unsigned long gpa) df = regs->eflags & X86_EFLAGS_DF ? 1 : 0; @@ -207,7 +207,7 @@ Index: 2007-05-14/xen/arch/x86/hvm/platform.c if ( inst_len <= 0 ) Index: 2007-05-14/xen/arch/x86/hvm/svm/svm.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/hvm/svm/svm.c 2007-05-03 09:45:09.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/hvm/svm/svm.c 2007-07-02 10:37:54.000000000 +0200 +++ 2007-05-14/xen/arch/x86/hvm/svm/svm.c 2007-05-14 13:47:25.000000000 +0200 @@ -563,14 +563,6 @@ static inline void svm_restore_dr(struct } @@ -246,7 +246,7 @@ Index: 2007-05-14/xen/arch/x86/hvm/svm/svm.c void svm_update_host_cr3(struct vcpu *v) Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/hvm/vmx/vmx.c 2007-05-03 09:45:09.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/hvm/vmx/vmx.c 2007-07-02 10:37:54.000000000 +0200 +++ 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c 2007-05-14 13:47:25.000000000 +0200 @@ -995,31 +995,20 @@ static void vmx_init_hypercall_page(stru *(u16 *)(hypercall_page + (__HYPERVISOR_iret * 32)) = 0x0b0f; /* ud2 */ @@ -289,7 +289,7 @@ Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c static int vmx_pae_enabled(struct vcpu *v) Index: 2007-05-14/xen/include/asm-x86/hypercall.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/hypercall.h 2007-04-23 10:01:46.000000000 +0200 +--- 2007-05-14.orig/xen/include/asm-x86/hypercall.h 2007-07-02 10:37:54.000000000 +0200 +++ 2007-05-14/xen/include/asm-x86/hypercall.h 2007-05-14 14:26:36.000000000 +0200 @@ -15,6 +15,15 @@ */ diff --git a/init.xendomains b/init.xendomains index 35ef0f0..625b018 100644 --- a/init.xendomains +++ b/init.xendomains @@ -411,28 +411,35 @@ check_domain_up() check_all_domains_up() { - if ! dir_contains_something "$XENDOMAINS_AUTO" && - ! dir_contains_something "$XENDOMAINS_SAVE"; then + any_auto=0 + any_save=0 + dir_contains_something "$XENDOMAINS_AUTO" && any_auto=1 + dir_contains_something "$XENDOMAINS_SAVE" && any_save=1 + if [ $any_auto -eq 0 ] && [ $any_save -eq 0 ]; then rc_reset rc_status -v return fi echo - for nm in "$XENDOMAINS_AUTO"/*; do - get_name_from_cfg "$nm" - echo -n " $nm: " - if check_domain_up "$NM"; then - rc_reset - else - rc_failed 2 - fi - rc_status -v - done - for nm in "$XENDOMAINS_SAVE"/*; do - echo -n " $nm: " - rc_failed 3 - rc_status -v - done + if [ $any_auto -ne 0 ]; then + for nm in "$XENDOMAINS_AUTO"/*; do + get_name_from_cfg "$nm" + echo -n " $nm: " + if check_domain_up "$NM"; then + rc_reset + else + rc_failed 2 + fi + rc_status -v + done + fi + if [ $any_save -ne 0 ]; then + for nm in "$XENDOMAINS_SAVE"/*; do + echo -n " $nm: " + rc_failed 3 + rc_status -v + done + fi } # This does NOT necessarily restart all running domains: instead it diff --git a/intpte_t-cast.patch b/intpte_t-cast.patch index 708032a..f904eaa 100644 --- a/intpte_t-cast.patch +++ b/intpte_t-cast.patch @@ -1,7 +1,7 @@ -Index: 2007-05-14/xen/arch/x86/mm.c +Index: xen-3.1-testing/xen/arch/x86/mm.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/mm.c 2007-05-14 08:40:14.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/mm.c 2007-05-14 08:40:20.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/mm.c ++++ xen-3.1-testing/xen/arch/x86/mm.c @@ -1017,7 +1017,7 @@ static void pae_flush_pgd( l3tab_ptr = &cache->table[cache->inuse_idx][idx]; _ol3e = l3e_get_intpte(*l3tab_ptr); @@ -29,7 +29,7 @@ Index: 2007-05-14/xen/arch/x86/mm.c { put_page_type(page); rc = GNTST_general_error; -@@ -3278,7 +3278,7 @@ static int ptwr_emulated_update( +@@ -3279,7 +3279,7 @@ static int ptwr_emulated_update( intpte_t t = old; ol1e = l1e_from_intpte(old); diff --git a/ptwr-sanity.patch b/ptwr-sanity.patch index b7d7aab..6e9abc0 100644 --- a/ptwr-sanity.patch +++ b/ptwr-sanity.patch @@ -1,8 +1,8 @@ -Index: 2007-05-14/xen/arch/x86/mm.c +Index: xen-3.1-testing/xen/arch/x86/mm.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/mm.c 2007-05-14 13:43:50.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/mm.c 2007-05-14 13:44:25.000000000 +0200 -@@ -3238,13 +3238,14 @@ static int ptwr_emulated_update( +--- xen-3.1-testing.orig/xen/arch/x86/mm.c ++++ xen-3.1-testing/xen/arch/x86/mm.c +@@ -3239,13 +3239,14 @@ static int ptwr_emulated_update( /* We are looking only for read-only mappings of p.t. pages. */ ASSERT((l1e_get_flags(pte) & (_PAGE_RW|_PAGE_PRESENT)) == _PAGE_PRESENT); @@ -17,8 +17,8 @@ Index: 2007-05-14/xen/arch/x86/mm.c + if ( unlikely(!get_page_from_l1e(nl1e, d)) ) { if ( (CONFIG_PAGING_LEVELS >= 3) && is_pv_32bit_domain(d) && - (bytes == 4) && (addr & 4) && !do_cmpxchg && -@@ -3270,7 +3271,7 @@ static int ptwr_emulated_update( + (bytes == 4) && (unaligned_addr & 4) && !do_cmpxchg && +@@ -3271,7 +3272,7 @@ static int ptwr_emulated_update( adjust_guest_l1e(nl1e, d); /* Checked successfully: do the update (write or cmpxchg). */ @@ -27,7 +27,7 @@ Index: 2007-05-14/xen/arch/x86/mm.c pl1e = (l1_pgentry_t *)((unsigned long)pl1e + (addr & ~PAGE_MASK)); if ( do_cmpxchg ) { -@@ -3285,21 +3286,21 @@ static int ptwr_emulated_update( +@@ -3286,21 +3287,21 @@ static int ptwr_emulated_update( if ( !okay ) { unmap_domain_page(pl1e); @@ -52,7 +52,7 @@ Index: 2007-05-14/xen/arch/x86/mm.c return X86EMUL_OKAY; } -@@ -3365,17 +3366,13 @@ int ptwr_do_page_fault(struct vcpu *v, u +@@ -3366,17 +3367,13 @@ int ptwr_do_page_fault(struct vcpu *v, u LOCK_BIGLOCK(d); diff --git a/vmx-check-descr.patch b/vmx-check-descr.patch index aaaae17..8fd79a5 100644 --- a/vmx-check-descr.patch +++ b/vmx-check-descr.patch @@ -1,7 +1,7 @@ Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/hvm/vmx/vmx.c 2007-05-22 13:36:08.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c 2007-05-22 13:51:26.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/hvm/vmx/vmx.c 2007-07-02 12:03:02.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c 2007-07-02 12:03:13.000000000 +0200 @@ -1521,15 +1521,15 @@ static int vmx_check_descriptor(int long limit_field = GUEST_FS_LIMIT; break; diff --git a/vnc-i18n-keys.diff b/vnc-i18n-keys.diff index 5f57ddf..cde4597 100644 --- a/vnc-i18n-keys.diff +++ b/vnc-i18n-keys.diff @@ -121,7 +121,7 @@ Index: xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -1336,6 +1336,9 @@ class XendDomainInfo: +@@ -1333,6 +1333,9 @@ class XendDomainInfo: if devclass in XendDevices.valid_devices(): log.info("createDevice: %s : %s" % (devclass, scrub_password(config))) dev_uuid = config.get('uuid') diff --git a/x86-emul-rf.patch b/x86-emul-rf.patch index e24ddfc..dd1843f 100644 --- a/x86-emul-rf.patch +++ b/x86-emul-rf.patch @@ -1,7 +1,7 @@ -Index: 2007-05-14/xen/arch/x86/hvm/io.c +Index: xen-3.1-testing/xen/arch/x86/hvm/io.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/hvm/io.c 2007-05-14 14:40:19.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/hvm/io.c 2007-05-22 13:27:31.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/hvm/io.c ++++ xen-3.1-testing/xen/arch/x86/hvm/io.c @@ -858,6 +858,7 @@ void hvm_io_assist(void) } @@ -10,10 +10,10 @@ Index: 2007-05-14/xen/arch/x86/hvm/io.c hvm_load_cpu_guest_regs(v, regs); memcpy(guest_cpu_user_regs(), regs, HVM_CONTEXT_STACK_BYTES); -Index: 2007-05-14/xen/arch/x86/hvm/platform.c +Index: xen-3.1-testing/xen/arch/x86/hvm/platform.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/hvm/platform.c 2007-05-14 14:40:20.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/hvm/platform.c 2007-05-22 13:13:10.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/hvm/platform.c ++++ xen-3.1-testing/xen/arch/x86/hvm/platform.c @@ -1065,6 +1065,7 @@ void handle_mmio(unsigned long gpa) } @@ -38,10 +38,10 @@ Index: 2007-05-14/xen/arch/x86/hvm/platform.c /* Must set CR2 at the failing address */ addr += size - rv; gdprintk(XENLOG_DEBUG, "Pagefault on non-io side of a " -Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c +Index: xen-3.1-testing/xen/arch/x86/hvm/vmx/vmx.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/hvm/vmx/vmx.c 2007-05-15 17:56:59.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c 2007-05-22 13:36:08.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/hvm/vmx/vmx.c ++++ xen-3.1-testing/xen/arch/x86/hvm/vmx/vmx.c @@ -1281,10 +1281,13 @@ static int __get_instruction_length(void static void inline __update_guest_eip(unsigned long inst_len) @@ -85,10 +85,10 @@ Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c HVM_DBG_LOG(DBG_LEVEL_1, "Restoring to %%eip 0x%lx", eip); return 0; /* do not update eip! */ -Index: 2007-05-14/xen/arch/x86/traps.c +Index: xen-3.1-testing/xen/arch/x86/traps.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/traps.c 2007-05-15 15:52:58.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/traps.c 2007-05-22 13:05:28.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/traps.c ++++ xen-3.1-testing/xen/arch/x86/traps.c @@ -608,6 +608,7 @@ static int emulate_forced_invalid_op(str regs->ecx = c; regs->edx = d; @@ -105,10 +105,10 @@ Index: 2007-05-14/xen/arch/x86/traps.c return EXCRET_fault_fixed; fail: -Index: 2007-05-14/xen/arch/x86/x86_emulate.c +Index: xen-3.1-testing/xen/arch/x86/x86_emulate.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_emulate.c 2007-05-14 14:40:43.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/x86_emulate.c 2007-05-22 13:04:05.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/x86_emulate.c ++++ xen-3.1-testing/xen/arch/x86/x86_emulate.c @@ -1631,6 +1631,7 @@ x86_emulate( } @@ -117,10 +117,10 @@ Index: 2007-05-14/xen/arch/x86/x86_emulate.c *ctxt->regs = _regs; done: -Index: 2007-05-14/xen/include/asm-x86/hvm/svm/emulate.h +Index: xen-3.1-testing/xen/include/asm-x86/hvm/svm/emulate.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/hvm/svm/emulate.h 2007-04-23 10:01:46.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/hvm/svm/emulate.h 2007-05-22 13:45:43.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/hvm/svm/emulate.h ++++ xen-3.1-testing/xen/include/asm-x86/hvm/svm/emulate.h @@ -138,6 +138,7 @@ static void inline __update_guest_eip( { ASSERT(inst_len > 0); diff --git a/x86-extra-trap-info.patch b/x86-extra-trap-info.patch index 2992a14..c61f4e0 100644 --- a/x86-extra-trap-info.patch +++ b/x86-extra-trap-info.patch @@ -1,7 +1,7 @@ -Index: 2007-04-27/xen/arch/x86/x86_32/entry.S +Index: 2007-05-14/xen/arch/x86/x86_32/entry.S =================================================================== ---- 2007-04-27.orig/xen/arch/x86/x86_32/entry.S 2007-04-27 09:50:12.000000000 +0200 -+++ 2007-04-27/xen/arch/x86/x86_32/entry.S 2007-04-27 09:57:47.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/x86_32/entry.S 2007-05-14 14:40:35.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/x86_32/entry.S 2007-04-27 09:57:47.000000000 +0200 @@ -387,21 +387,33 @@ ring1: /* obtain ss/esp from oldss/olde movl %eax,UREGS_eip+4(%esp) ret @@ -46,10 +46,10 @@ Index: 2007-04-27/xen/arch/x86/x86_32/entry.S domain_crash_synchronous: pushl $domain_crash_synchronous_string call printk -Index: 2007-04-27/xen/arch/x86/x86_64/entry.S +Index: 2007-05-14/xen/arch/x86/x86_64/entry.S =================================================================== ---- 2007-04-27.orig/xen/arch/x86/x86_64/entry.S 2007-04-27 09:31:40.000000000 +0200 -+++ 2007-04-27/xen/arch/x86/x86_64/entry.S 2007-04-27 09:57:47.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/x86_64/entry.S 2007-07-02 10:48:18.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/x86_64/entry.S 2007-07-02 11:57:21.000000000 +0200 @@ -338,17 +338,30 @@ create_bounce_frame: movq %rax,UREGS_rip+8(%rsp) ret diff --git a/x86-machine-check.patch b/x86-machine-check.patch index bdab357..09dfc70 100644 --- a/x86-machine-check.patch +++ b/x86-machine-check.patch @@ -1,7 +1,7 @@ -Index: 2007-05-14/xen/arch/x86/cpu/mcheck/k7.c +Index: xen-3.1-testing/xen/arch/x86/cpu/mcheck/k7.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/cpu/mcheck/k7.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/cpu/mcheck/k7.c 2007-05-15 15:56:00.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/cpu/mcheck/k7.c ++++ xen-3.1-testing/xen/arch/x86/cpu/mcheck/k7.c @@ -16,7 +16,7 @@ #include "mce.h" @@ -11,10 +11,10 @@ Index: 2007-05-14/xen/arch/x86/cpu/mcheck/k7.c { int recover=1; u32 alow, ahigh, high, low; -Index: 2007-05-14/xen/arch/x86/cpu/mcheck/mce.c +Index: xen-3.1-testing/xen/arch/x86/cpu/mcheck/mce.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/cpu/mcheck/mce.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/cpu/mcheck/mce.c 2007-05-15 15:56:16.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/cpu/mcheck/mce.c ++++ xen-3.1-testing/xen/arch/x86/cpu/mcheck/mce.c @@ -18,13 +18,13 @@ int mce_disabled = 0; int nr_mce_banks; @@ -31,10 +31,10 @@ Index: 2007-05-14/xen/arch/x86/cpu/mcheck/mce.c /* This has to be run for each processor */ void mcheck_init(struct cpuinfo_x86 *c) -Index: 2007-05-14/xen/arch/x86/cpu/mcheck/mce.h +Index: xen-3.1-testing/xen/arch/x86/cpu/mcheck/mce.h =================================================================== ---- 2007-05-14.orig/xen/arch/x86/cpu/mcheck/mce.h 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/cpu/mcheck/mce.h 2007-05-15 17:34:43.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/cpu/mcheck/mce.h ++++ xen-3.1-testing/xen/arch/x86/cpu/mcheck/mce.h @@ -1,4 +1,5 @@ #include +#include @@ -51,10 +51,10 @@ Index: 2007-05-14/xen/arch/x86/cpu/mcheck/mce.h extern int mce_disabled __initdata; extern int nr_mce_banks; -Index: 2007-05-14/xen/arch/x86/cpu/mcheck/p4.c +Index: xen-3.1-testing/xen/arch/x86/cpu/mcheck/p4.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/cpu/mcheck/p4.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/cpu/mcheck/p4.c 2007-05-15 15:56:31.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/cpu/mcheck/p4.c ++++ xen-3.1-testing/xen/arch/x86/cpu/mcheck/p4.c @@ -158,7 +158,7 @@ done: return mce_num_extended_msrs; } @@ -64,10 +64,10 @@ Index: 2007-05-14/xen/arch/x86/cpu/mcheck/p4.c { int recover=1; u32 alow, ahigh, high, low; -Index: 2007-05-14/xen/arch/x86/cpu/mcheck/p5.c +Index: xen-3.1-testing/xen/arch/x86/cpu/mcheck/p5.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/cpu/mcheck/p5.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/cpu/mcheck/p5.c 2007-05-15 15:56:39.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/cpu/mcheck/p5.c ++++ xen-3.1-testing/xen/arch/x86/cpu/mcheck/p5.c @@ -15,7 +15,7 @@ #include "mce.h" @@ -77,10 +77,10 @@ Index: 2007-05-14/xen/arch/x86/cpu/mcheck/p5.c { u32 loaddr, hi, lotype; rdmsr(MSR_IA32_P5_MC_ADDR, loaddr, hi); -Index: 2007-05-14/xen/arch/x86/cpu/mcheck/p6.c +Index: xen-3.1-testing/xen/arch/x86/cpu/mcheck/p6.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/cpu/mcheck/p6.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/cpu/mcheck/p6.c 2007-05-15 15:56:43.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/cpu/mcheck/p6.c ++++ xen-3.1-testing/xen/arch/x86/cpu/mcheck/p6.c @@ -15,7 +15,7 @@ #include "mce.h" @@ -90,10 +90,10 @@ Index: 2007-05-14/xen/arch/x86/cpu/mcheck/p6.c { int recover=1; u32 alow, ahigh, high, low; -Index: 2007-05-14/xen/arch/x86/cpu/mcheck/winchip.c +Index: xen-3.1-testing/xen/arch/x86/cpu/mcheck/winchip.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/cpu/mcheck/winchip.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/cpu/mcheck/winchip.c 2007-05-15 15:56:48.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/cpu/mcheck/winchip.c ++++ xen-3.1-testing/xen/arch/x86/cpu/mcheck/winchip.c @@ -16,7 +16,7 @@ #include "mce.h" @@ -103,10 +103,10 @@ Index: 2007-05-14/xen/arch/x86/cpu/mcheck/winchip.c { printk(KERN_EMERG "CPU0: Machine Check Exception.\n"); add_taint(TAINT_MACHINE_CHECK); -Index: 2007-05-14/xen/arch/x86/hvm/svm/svm.c +Index: xen-3.1-testing/xen/arch/x86/hvm/svm/svm.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/hvm/svm/svm.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/hvm/svm/svm.c 2007-05-15 17:57:20.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/hvm/svm/svm.c ++++ xen-3.1-testing/xen/arch/x86/hvm/svm/svm.c @@ -407,7 +407,7 @@ int svm_vmcb_restore(struct vcpu *v, str } @@ -130,11 +130,11 @@ Index: 2007-05-14/xen/arch/x86/hvm/svm/svm.c break; case 4: /* CR4 */ -+ if ( value & ~mmu_cr4_features ) ++ if ( value & HVM_CR4_GUEST_RESERVED_BITS ) + { -+ HVM_DBG_LOG(DBG_LEVEL_1, "Guest attempts to enable unsupported " -+ "CR4 features %lx (host %lx)", -+ value, mmu_cr4_features); ++ HVM_DBG_LOG(DBG_LEVEL_1, ++ "Guest attempts to set reserved bit in CR4: %lx", ++ value); + svm_inject_exception(v, TRAP_gp_fault, 1, 0); + break; + } @@ -185,10 +185,10 @@ Index: 2007-05-14/xen/arch/x86/hvm/svm/svm.c case VMEXIT_VINTR: vmcb->vintr.fields.irq = 0; vmcb->general1_intercepts &= ~GENERAL1_INTERCEPT_VINTR; -Index: 2007-05-14/xen/arch/x86/hvm/svm/vmcb.c +Index: xen-3.1-testing/xen/arch/x86/hvm/svm/vmcb.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/hvm/svm/vmcb.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/hvm/svm/vmcb.c 2007-05-15 17:28:40.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/hvm/svm/vmcb.c ++++ xen-3.1-testing/xen/arch/x86/hvm/svm/vmcb.c @@ -225,7 +225,7 @@ static int construct_vmcb(struct vcpu *v /* Guest CR4. */ arch_svm->cpu_shadow_cr4 = @@ -214,10 +214,10 @@ Index: 2007-05-14/xen/arch/x86/hvm/svm/vmcb.c } return 0; -Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmcs.c +Index: xen-3.1-testing/xen/arch/x86/hvm/vmx/vmcs.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/hvm/vmx/vmcs.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/hvm/vmx/vmcs.c 2007-05-15 17:28:58.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/hvm/vmx/vmcs.c ++++ xen-3.1-testing/xen/arch/x86/hvm/vmx/vmcs.c @@ -400,7 +400,7 @@ static void construct_vmcs(struct vcpu * __vmwrite(VMCS_LINK_POINTER_HIGH, ~0UL); #endif @@ -227,10 +227,10 @@ Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmcs.c /* Guest CR0. */ cr0 = read_cr0(); -Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c +Index: xen-3.1-testing/xen/arch/x86/hvm/vmx/vmx.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/hvm/vmx/vmx.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c 2007-05-15 17:56:59.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/hvm/vmx/vmx.c ++++ xen-3.1-testing/xen/arch/x86/hvm/vmx/vmx.c @@ -600,7 +600,7 @@ int vmx_vmcs_restore(struct vcpu *v, str } #endif @@ -249,22 +249,23 @@ Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c v->arch.hvm_vmx.cpu_shadow_cr4 = c->cr4; __vmwrite(CR4_READ_SHADOW, v->arch.hvm_vmx.cpu_shadow_cr4); -@@ -2275,6 +2275,14 @@ static int mov_to_cr(int gp, int cr, str +@@ -2275,6 +2275,15 @@ static int mov_to_cr(int gp, int cr, str case 4: /* CR4 */ old_cr = v->arch.hvm_vmx.cpu_shadow_cr4; -+ if ( value & ~mmu_cr4_features ) ++ if ( value & HVM_CR4_GUEST_RESERVED_BITS ) + { -+ HVM_DBG_LOG(DBG_LEVEL_1, "Guest attempts to enable unsupported " -+ "CR4 features %lx (host %lx)", -+ value, mmu_cr4_features); ++ HVM_DBG_LOG(DBG_LEVEL_1, ++ "Guest attempts to set reserved bit in CR4: %lx", ++ value); + vmx_inject_hw_exception(v, TRAP_gp_fault, 0); + break; + } ++ if ( (value & X86_CR4_PAE) && !(old_cr & X86_CR4_PAE) ) { if ( vmx_pgbit_test(v) ) -@@ -2315,7 +2323,7 @@ static int mov_to_cr(int gp, int cr, str +@@ -2315,7 +2324,7 @@ static int mov_to_cr(int gp, int cr, str } } @@ -273,7 +274,7 @@ Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c v->arch.hvm_vmx.cpu_shadow_cr4 = value; __vmwrite(CR4_READ_SHADOW, v->arch.hvm_vmx.cpu_shadow_cr4); -@@ -2623,7 +2631,8 @@ static void vmx_reflect_exception(struct +@@ -2623,7 +2632,8 @@ static void vmx_reflect_exception(struct } } @@ -283,7 +284,7 @@ Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c { unsigned int failed_vmentry_reason = (uint16_t)exit_reason; unsigned long exit_qualification; -@@ -2640,6 +2649,9 @@ static void vmx_failed_vmentry(unsigned +@@ -2640,6 +2650,9 @@ static void vmx_failed_vmentry(unsigned break; case EXIT_REASON_MACHINE_CHECK: printk("caused by machine check.\n"); @@ -293,7 +294,7 @@ Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c break; default: printk("reason not known yet!"); -@@ -2665,11 +2677,12 @@ asmlinkage void vmx_vmexit_handler(struc +@@ -2665,11 +2678,12 @@ asmlinkage void vmx_vmexit_handler(struc perfc_incra(vmexits, exit_reason); @@ -310,7 +311,7 @@ Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c switch ( exit_reason ) { -@@ -2689,6 +2702,9 @@ asmlinkage void vmx_vmexit_handler(struc +@@ -2689,6 +2703,9 @@ asmlinkage void vmx_vmexit_handler(struc perfc_incra(cause_vector, vector); @@ -320,7 +321,7 @@ Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c switch ( vector ) { case TRAP_debug: -@@ -2726,6 +2742,11 @@ asmlinkage void vmx_vmexit_handler(struc +@@ -2726,6 +2743,11 @@ asmlinkage void vmx_vmexit_handler(struc else vmx_reflect_exception(v); break; @@ -332,10 +333,10 @@ Index: 2007-05-14/xen/arch/x86/hvm/vmx/vmx.c default: goto exit_and_crash; } -Index: 2007-05-14/xen/arch/x86/traps.c +Index: xen-3.1-testing/xen/arch/x86/traps.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/traps.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/traps.c 2007-05-15 15:52:58.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/traps.c ++++ xen-3.1-testing/xen/arch/x86/traps.c @@ -707,12 +707,6 @@ asmlinkage int do_int3(struct cpu_user_r return do_guest_trap(TRAP_int3, regs, 0); } @@ -349,10 +350,10 @@ Index: 2007-05-14/xen/arch/x86/traps.c void propagate_page_fault(unsigned long addr, u16 error_code) { struct trap_info *ti; -Index: 2007-05-14/xen/arch/x86/x86_32/entry.S +Index: xen-3.1-testing/xen/arch/x86/x86_32/entry.S =================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_32/entry.S 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/x86_32/entry.S 2007-05-21 12:45:09.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/x86_32/entry.S ++++ xen-3.1-testing/xen/arch/x86/x86_32/entry.S @@ -77,14 +77,29 @@ restore_all_guest: ASSERT_INTERRUPTS_DISABLED @@ -587,10 +588,10 @@ Index: 2007-05-14/xen/arch/x86/x86_32/entry.S .long do_simd_coprocessor_error ENTRY(hypercall_table) -Index: 2007-05-14/xen/arch/x86/x86_32/traps.c +Index: xen-3.1-testing/xen/arch/x86/x86_32/traps.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_32/traps.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/x86_32/traps.c 2007-05-21 09:00:10.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/x86_32/traps.c ++++ xen-3.1-testing/xen/arch/x86/x86_32/traps.c @@ -235,15 +235,6 @@ unsigned long do_iret(void) return 0; } @@ -616,10 +617,10 @@ Index: 2007-05-14/xen/arch/x86/x86_32/traps.c /* * Make a separate task for double faults. This will get us debug output if * we blow the kernel stack. -Index: 2007-05-14/xen/arch/x86/x86_64/entry.S +Index: xen-3.1-testing/xen/arch/x86/x86_64/entry.S =================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_64/entry.S 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/x86_64/entry.S 2007-05-21 11:24:15.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/x86_64/entry.S ++++ xen-3.1-testing/xen/arch/x86/x86_64/entry.S @@ -518,11 +518,6 @@ ENTRY(page_fault) movl $TRAP_page_fault,4(%rsp) jmp handle_exception @@ -665,10 +666,10 @@ Index: 2007-05-14/xen/arch/x86/x86_64/entry.S .quad do_simd_coprocessor_error ENTRY(hypercall_table) -Index: 2007-05-14/xen/arch/x86/x86_64/traps.c +Index: xen-3.1-testing/xen/arch/x86/x86_64/traps.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_64/traps.c 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/x86_64/traps.c 2007-05-15 15:46:51.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/x86_64/traps.c ++++ xen-3.1-testing/xen/arch/x86/x86_64/traps.c @@ -260,6 +260,7 @@ void __init percpu_traps_init(void) set_intr_gate(TRAP_double_fault, &double_fault); idt_table[TRAP_double_fault].a |= 1UL << 32; /* IST1 */ @@ -689,26 +690,33 @@ Index: 2007-05-14/xen/arch/x86/x86_64/traps.c init_tss[cpu].ist[0] = (unsigned long)&stack[2048]; /* NMI handler has its own per-CPU 1kB stack. */ -Index: 2007-05-14/xen/include/asm-x86/hvm/hvm.h +Index: xen-3.1-testing/xen/include/asm-x86/hvm/hvm.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/hvm/hvm.h 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/hvm/hvm.h 2007-05-15 17:29:10.000000000 +0200 -@@ -277,4 +277,11 @@ static inline int hvm_event_injection_fa +--- xen-3.1-testing.orig/xen/include/asm-x86/hvm/hvm.h ++++ xen-3.1-testing/xen/include/asm-x86/hvm/hvm.h +@@ -277,4 +277,18 @@ static inline int hvm_event_injection_fa return hvm_funcs.event_injection_faulted(v); } -+/* These bits in the CR4 are owned by the host */ ++/* These bits in CR4 are owned by the host. */ +#define HVM_CR4_HOST_MASK (mmu_cr4_features & \ + (X86_CR4_VMXE | X86_CR4_PAE | X86_CR4_MCE)) + ++/* These bits in CR4 cannot be set by the guest. */ ++#define HVM_CR4_GUEST_RESERVED_BITS \ ++ ~(X86_CR4_VME | X86_CR4_PVI | X86_CR4_TSD | \ ++ X86_CR4_DE | X86_CR4_PSE | X86_CR4_PAE | \ ++ X86_CR4_MCE | X86_CR4_PGE | X86_CR4_PCE | \ ++ X86_CR4_OSFXSR | X86_CR4_OSXMMEXCPT) ++ +/* These exceptions must always be intercepted. */ +#define HVM_TRAP_MASK (1U << TRAP_machine_check) + #endif /* __ASM_X86_HVM_HVM_H__ */ -Index: 2007-05-14/xen/include/asm-x86/hvm/svm/vmcb.h +Index: xen-3.1-testing/xen/include/asm-x86/hvm/svm/vmcb.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/hvm/svm/vmcb.h 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/hvm/svm/vmcb.h 2007-05-15 17:07:57.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/hvm/svm/vmcb.h ++++ xen-3.1-testing/xen/include/asm-x86/hvm/svm/vmcb.h @@ -465,14 +465,6 @@ void svm_destroy_vmcb(struct vcpu *v); void setup_vmcb_dump(void); @@ -724,10 +732,10 @@ Index: 2007-05-14/xen/include/asm-x86/hvm/svm/vmcb.h #endif /* ASM_X86_HVM_SVM_VMCS_H__ */ /* -Index: 2007-05-14/xen/include/asm-x86/hvm/trace.h +Index: xen-3.1-testing/xen/include/asm-x86/hvm/trace.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/hvm/trace.h 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/hvm/trace.h 2007-05-15 17:30:42.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/hvm/trace.h ++++ xen-3.1-testing/xen/include/asm-x86/hvm/trace.h @@ -21,6 +21,7 @@ #define DO_TRC_HVM_CPUID 1 #define DO_TRC_HVM_INTR 1 @@ -736,10 +744,10 @@ Index: 2007-05-14/xen/include/asm-x86/hvm/trace.h #define DO_TRC_HVM_SMI 1 #define DO_TRC_HVM_VMMCALL 1 #define DO_TRC_HVM_HLT 1 -Index: 2007-05-14/xen/include/asm-x86/hvm/vmx/vmx.h +Index: xen-3.1-testing/xen/include/asm-x86/hvm/vmx/vmx.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/hvm/vmx/vmx.h 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/hvm/vmx/vmx.h 2007-05-15 17:08:05.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/hvm/vmx/vmx.h ++++ xen-3.1-testing/xen/include/asm-x86/hvm/vmx/vmx.h @@ -128,13 +128,6 @@ void set_guest_time(struct vcpu *v, u64 #define TYPE_MOV_FROM_DR (1 << 4) #define DEBUG_REG_ACCESS_REG 0xf00 /* 11:8, general purpose register */ @@ -754,10 +762,10 @@ Index: 2007-05-14/xen/include/asm-x86/hvm/vmx/vmx.h #define VMCALL_OPCODE ".byte 0x0f,0x01,0xc1\n" #define VMCLEAR_OPCODE ".byte 0x66,0x0f,0xc7\n" /* reg/opcode: /6 */ #define VMLAUNCH_OPCODE ".byte 0x0f,0x01,0xc2\n" -Index: 2007-05-14/xen/include/asm-x86/processor.h +Index: xen-3.1-testing/xen/include/asm-x86/processor.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/processor.h 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/processor.h 2007-05-16 12:30:05.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/processor.h ++++ xen-3.1-testing/xen/include/asm-x86/processor.h @@ -104,7 +104,6 @@ #define TRAP_alignment_check 17 #define TRAP_machine_check 18 @@ -774,10 +782,10 @@ Index: 2007-05-14/xen/include/asm-x86/processor.h int cpuid_hypervisor_leaves( uint32_t idx, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx); -Index: 2007-05-14/xen/include/asm-x86/x86_32/asm_defns.h +Index: xen-3.1-testing/xen/include/asm-x86/x86_32/asm_defns.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/x86_32/asm_defns.h 2007-04-23 10:01:46.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/x86_32/asm_defns.h 2007-05-21 12:44:12.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/x86_32/asm_defns.h ++++ xen-3.1-testing/xen/include/asm-x86/x86_32/asm_defns.h @@ -22,7 +22,7 @@ #define ASSERT_INTERRUPTS_ENABLED ASSERT_INTERRUPT_STATUS(nz) #define ASSERT_INTERRUPTS_DISABLED ASSERT_INTERRUPT_STATUS(z) @@ -859,10 +867,10 @@ Index: 2007-05-14/xen/include/asm-x86/x86_32/asm_defns.h "pushl %eax\n\t" \ "call " STR(do_IRQ) "\n\t" \ "addl $4,%esp\n\t" \ -Index: 2007-05-14/xen/include/public/trace.h +Index: xen-3.1-testing/xen/include/public/trace.h =================================================================== ---- 2007-05-14.orig/xen/include/public/trace.h 2007-05-21 08:58:02.000000000 +0200 -+++ 2007-05-14/xen/include/public/trace.h 2007-05-15 17:55:19.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/public/trace.h ++++ xen-3.1-testing/xen/include/public/trace.h @@ -88,6 +88,7 @@ #define TRC_HVM_VMMCALL (TRC_HVM_HANDLER + 0x12) #define TRC_HVM_HLT (TRC_HVM_HANDLER + 0x13) diff --git a/x86-nmi-inject.patch b/x86-nmi-inject.patch index 4bda242..7bdf150 100644 --- a/x86-nmi-inject.patch +++ b/x86-nmi-inject.patch @@ -1,6 +1,6 @@ Index: 2007-05-14/xen/arch/x86/physdev.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/physdev.c 2007-04-23 10:01:42.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/physdev.c 2007-07-02 10:37:50.000000000 +0200 +++ 2007-05-14/xen/arch/x86/physdev.c 2007-05-14 14:40:35.000000000 +0200 @@ -143,6 +143,56 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H break; @@ -61,7 +61,7 @@ Index: 2007-05-14/xen/arch/x86/physdev.c break; Index: 2007-05-14/xen/arch/x86/traps.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/traps.c 2007-05-14 14:40:32.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/traps.c 2007-05-14 14:40:03.000000000 +0200 +++ 2007-05-14/xen/arch/x86/traps.c 2007-05-14 14:40:35.000000000 +0200 @@ -2517,6 +2517,12 @@ long do_set_trap_table(XEN_GUEST_HANDLE( if ( cur.address == 0 ) @@ -78,7 +78,7 @@ Index: 2007-05-14/xen/arch/x86/traps.c memcpy(&dst[cur.vector], &cur, sizeof(cur)); Index: 2007-05-14/xen/arch/x86/x86_32/asm-offsets.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_32/asm-offsets.c 2007-05-14 14:40:29.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/x86_32/asm-offsets.c 2007-04-27 09:31:25.000000000 +0200 +++ 2007-05-14/xen/arch/x86/x86_32/asm-offsets.c 2007-05-14 14:40:35.000000000 +0200 @@ -68,6 +68,7 @@ void __dummy__(void) OFFSET(VCPU_guest_context_flags, struct vcpu, arch.guest_context.flags); @@ -90,7 +90,7 @@ Index: 2007-05-14/xen/arch/x86/x86_32/asm-offsets.c DEFINE(_VGCF_failsafe_disables_events, _VGCF_failsafe_disables_events); Index: 2007-05-14/xen/arch/x86/x86_32/entry.S =================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_32/entry.S 2007-05-03 09:45:09.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/x86_32/entry.S 2007-07-02 10:48:50.000000000 +0200 +++ 2007-05-14/xen/arch/x86/x86_32/entry.S 2007-05-14 14:40:35.000000000 +0200 @@ -263,14 +263,15 @@ process_nmi: testb $1,VCPU_nmi_masked(%ebx) @@ -113,7 +113,7 @@ Index: 2007-05-14/xen/arch/x86/x86_32/entry.S jmp test_all_events Index: 2007-05-14/xen/arch/x86/x86_64/asm-offsets.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_64/asm-offsets.c 2007-05-14 14:40:29.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/x86_64/asm-offsets.c 2007-04-27 09:31:25.000000000 +0200 +++ 2007-05-14/xen/arch/x86/x86_64/asm-offsets.c 2007-05-14 14:40:35.000000000 +0200 @@ -77,6 +77,7 @@ void __dummy__(void) OFFSET(VCPU_guest_context_flags, struct vcpu, arch.guest_context.flags); @@ -125,8 +125,8 @@ Index: 2007-05-14/xen/arch/x86/x86_64/asm-offsets.c DEFINE(_VGCF_failsafe_disables_events, _VGCF_failsafe_disables_events); Index: 2007-05-14/xen/arch/x86/x86_64/compat/entry.S =================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_64/compat/entry.S 2007-05-03 09:45:09.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/x86_64/compat/entry.S 2007-05-14 14:40:35.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/x86_64/compat/entry.S 2007-07-02 10:48:18.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/x86_64/compat/entry.S 2007-07-02 11:56:42.000000000 +0200 @@ -119,14 +119,15 @@ compat_process_nmi: testb $1,VCPU_nmi_masked(%rbx) jnz compat_test_guest_events @@ -148,7 +148,7 @@ Index: 2007-05-14/xen/arch/x86/x86_64/compat/entry.S jmp compat_test_all_events Index: 2007-05-14/xen/arch/x86/x86_64/compat/traps.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_64/compat/traps.c 2007-04-23 10:01:42.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/x86_64/compat/traps.c 2007-07-02 10:37:50.000000000 +0200 +++ 2007-05-14/xen/arch/x86/x86_64/compat/traps.c 2007-05-14 14:40:35.000000000 +0200 @@ -288,6 +288,12 @@ int compat_set_trap_table(XEN_GUEST_HAND if ( cur.address == 0 ) @@ -165,7 +165,7 @@ Index: 2007-05-14/xen/arch/x86/x86_64/compat/traps.c XLAT_trap_info(dst + cur.vector, &cur); Index: 2007-05-14/xen/arch/x86/x86_64/physdev.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_64/physdev.c 2007-04-23 10:01:43.000000000 +0200 +--- 2007-05-14.orig/xen/arch/x86/x86_64/physdev.c 2007-07-02 10:37:50.000000000 +0200 +++ 2007-05-14/xen/arch/x86/x86_64/physdev.c 2007-05-14 14:40:35.000000000 +0200 @@ -30,6 +30,10 @@ #define physdev_irq_status_query compat_physdev_irq_status_query @@ -180,7 +180,7 @@ Index: 2007-05-14/xen/arch/x86/x86_64/physdev.c #define guest_handle_okay compat_handle_okay Index: 2007-05-14/xen/common/kernel.c =================================================================== ---- 2007-05-14.orig/xen/common/kernel.c 2007-05-14 14:40:27.000000000 +0200 +--- 2007-05-14.orig/xen/common/kernel.c 2007-05-14 14:33:33.000000000 +0200 +++ 2007-05-14/xen/common/kernel.c 2007-05-14 14:40:35.000000000 +0200 @@ -246,16 +246,20 @@ long register_guest_nmi_callback(unsigne struct vcpu *v = current; @@ -221,7 +221,7 @@ Index: 2007-05-14/xen/common/kernel.c return 0; Index: 2007-05-14/xen/include/public/physdev.h =================================================================== ---- 2007-05-14.orig/xen/include/public/physdev.h 2007-04-23 10:01:47.000000000 +0200 +--- 2007-05-14.orig/xen/include/public/physdev.h 2007-07-02 10:37:50.000000000 +0200 +++ 2007-05-14/xen/include/public/physdev.h 2007-05-14 14:40:35.000000000 +0200 @@ -119,6 +119,22 @@ typedef struct physdev_irq physdev_irq_t DEFINE_XEN_GUEST_HANDLE(physdev_irq_t); @@ -248,7 +248,7 @@ Index: 2007-05-14/xen/include/public/physdev.h */ Index: 2007-05-14/xen/include/xen/sched.h =================================================================== ---- 2007-05-14.orig/xen/include/xen/sched.h 2007-05-03 09:45:09.000000000 +0200 +--- 2007-05-14.orig/xen/include/xen/sched.h 2007-07-02 10:37:50.000000000 +0200 +++ 2007-05-14/xen/include/xen/sched.h 2007-05-14 14:40:35.000000000 +0200 @@ -128,7 +128,11 @@ struct vcpu /* Bitmask of CPUs on which this VCPU may run. */ @@ -264,7 +264,7 @@ Index: 2007-05-14/xen/include/xen/sched.h cpumask_t vcpu_dirty_cpumask; Index: 2007-05-14/xen/include/xlat.lst =================================================================== ---- 2007-05-14.orig/xen/include/xlat.lst 2007-05-03 09:45:09.000000000 +0200 +--- 2007-05-14.orig/xen/include/xlat.lst 2007-07-02 10:37:50.000000000 +0200 +++ 2007-05-14/xen/include/xlat.lst 2007-05-14 14:40:35.000000000 +0200 @@ -35,6 +35,7 @@ ! memory_map memory.h diff --git a/x86-page-cacheability.patch b/x86-page-cacheability.patch index e6bb248..925000c 100644 --- a/x86-page-cacheability.patch +++ b/x86-page-cacheability.patch @@ -1,7 +1,7 @@ -Index: 2007-05-14/xen/arch/x86/cpu/common.c +Index: xen-3.1-testing/xen/arch/x86/cpu/common.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/cpu/common.c 2007-05-15 10:29:20.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/cpu/common.c 2007-05-15 10:22:03.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/cpu/common.c ++++ xen-3.1-testing/xen/arch/x86/cpu/common.c @@ -229,7 +229,6 @@ static void __init early_cpu_detect(void void __devinit generic_identify(struct cpuinfo_x86 * c) { @@ -38,10 +38,10 @@ Index: 2007-05-14/xen/arch/x86/cpu/common.c memset(&c->x86_capability, 0, sizeof c->x86_capability); if (!have_cpuid_p()) { -Index: 2007-05-14/xen/arch/x86/mm.c +Index: xen-3.1-testing/xen/arch/x86/mm.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/mm.c 2007-05-15 10:29:20.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/mm.c 2007-05-15 10:29:55.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/mm.c ++++ xen-3.1-testing/xen/arch/x86/mm.c @@ -147,6 +147,14 @@ struct page_info *frame_table; unsigned long max_page; unsigned long total_pages; @@ -336,7 +336,7 @@ Index: 2007-05-14/xen/arch/x86/mm.c { perfc_incr(need_flush_tlb_flush); flush_tlb_mask(mask); -@@ -3243,8 +3398,30 @@ static int ptwr_emulated_update( +@@ -3244,8 +3399,30 @@ static int ptwr_emulated_update( ASSERT((page->u.inuse.type_info & PGT_count_mask) != 0); ASSERT(page_get_owner(page) == d); @@ -367,7 +367,7 @@ Index: 2007-05-14/xen/arch/x86/mm.c if ( unlikely(!get_page_from_l1e(nl1e, d)) ) { if ( (CONFIG_PAGING_LEVELS >= 3) && is_pv_32bit_domain(d) && -@@ -3263,21 +3440,17 @@ static int ptwr_emulated_update( +@@ -3264,21 +3441,17 @@ static int ptwr_emulated_update( } else { @@ -390,7 +390,7 @@ Index: 2007-05-14/xen/arch/x86/mm.c okay = paging_cmpxchg_guest_entry(v, &l1e_get_intpte(*pl1e), &t, val, _mfn(mfn)); -@@ -3290,12 +3463,8 @@ static int ptwr_emulated_update( +@@ -3291,12 +3464,8 @@ static int ptwr_emulated_update( return X86EMUL_CMPXCHG_FAILED; } } @@ -405,7 +405,7 @@ Index: 2007-05-14/xen/arch/x86/mm.c unmap_domain_page(pl1e); -@@ -3397,11 +3566,27 @@ int ptwr_do_page_fault(struct vcpu *v, u +@@ -3398,11 +3567,27 @@ int ptwr_do_page_fault(struct vcpu *v, u return 0; } @@ -434,7 +434,7 @@ Index: 2007-05-14/xen/arch/x86/mm.c { l2_pgentry_t *pl2e, ol2e; l1_pgentry_t *pl1e, ol1e; -@@ -3420,11 +3605,14 @@ int map_pages_to_xen( +@@ -3421,11 +3606,14 @@ int map_pages_to_xen( { /* Super-page mapping. */ ol2e = *pl2e; @@ -450,7 +450,7 @@ Index: 2007-05-14/xen/arch/x86/mm.c if ( !(l2e_get_flags(ol2e) & _PAGE_PSE) ) free_xen_pagetable(mfn_to_virt(l2e_get_pfn(ol2e))); } -@@ -3439,6 +3627,8 @@ int map_pages_to_xen( +@@ -3440,6 +3628,8 @@ int map_pages_to_xen( if ( !(l2e_get_flags(*pl2e) & _PAGE_PRESENT) ) { pl1e = alloc_xen_pagetable(); @@ -459,7 +459,7 @@ Index: 2007-05-14/xen/arch/x86/mm.c clear_page(pl1e); l2e_write(pl2e, l2e_from_pfn(virt_to_mfn(pl1e), __PAGE_HYPERVISOR)); -@@ -3446,10 +3636,12 @@ int map_pages_to_xen( +@@ -3447,10 +3637,12 @@ int map_pages_to_xen( else if ( l2e_get_flags(*pl2e) & _PAGE_PSE ) { pl1e = alloc_xen_pagetable(); @@ -473,7 +473,7 @@ Index: 2007-05-14/xen/arch/x86/mm.c l2e_write_atomic(pl2e, l2e_from_pfn(virt_to_mfn(pl1e), __PAGE_HYPERVISOR)); local_flush_tlb_pge(); -@@ -3459,11 +3651,47 @@ int map_pages_to_xen( +@@ -3460,11 +3652,47 @@ int map_pages_to_xen( ol1e = *pl1e; l1e_write_atomic(pl1e, l1e_from_pfn(mfn, flags)); if ( (l1e_get_flags(ol1e) & _PAGE_PRESENT) ) @@ -521,10 +521,10 @@ Index: 2007-05-14/xen/arch/x86/mm.c } } -Index: 2007-05-14/xen/arch/x86/mm/shadow/common.c +Index: xen-3.1-testing/xen/arch/x86/mm/shadow/common.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/mm/shadow/common.c 2007-05-15 10:29:20.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/mm/shadow/common.c 2007-05-14 14:35:02.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/mm/shadow/common.c ++++ xen-3.1-testing/xen/arch/x86/mm/shadow/common.c @@ -1320,7 +1320,7 @@ static void sh_hash_audit_bucket(struct /* Bad shadow flags on guest page? */ BUG_ON( !(gpg->shadow_flags & (1<type)) ); @@ -534,10 +534,10 @@ Index: 2007-05-14/xen/arch/x86/mm/shadow/common.c && (gpg->u.inuse.type_info & PGT_count_mask) != 0 ) { SHADOW_ERROR("MFN %#lx shadowed (by %#"PRI_mfn")" -Index: 2007-05-14/xen/arch/x86/mm/shadow/multi.c +Index: xen-3.1-testing/xen/arch/x86/mm/shadow/multi.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/mm/shadow/multi.c 2007-05-15 10:29:20.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/mm/shadow/multi.c 2007-05-14 14:35:02.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/mm/shadow/multi.c ++++ xen-3.1-testing/xen/arch/x86/mm/shadow/multi.c @@ -4128,8 +4128,7 @@ audit_gfn_to_mfn(struct vcpu *v, gfn_t g if ( !shadow_mode_translate(v->domain) ) return _mfn(gfn_x(gfn)); @@ -548,10 +548,10 @@ Index: 2007-05-14/xen/arch/x86/mm/shadow/multi.c return _mfn(gfn_x(gfn)); /* This is a paging-disabled shadow */ else return gfn_to_mfn(v->domain, gfn_x(gfn)); -Index: 2007-05-14/xen/include/asm-x86/mm.h +Index: xen-3.1-testing/xen/include/asm-x86/mm.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/mm.h 2007-05-15 10:29:20.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/mm.h 2007-05-14 14:35:02.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/mm.h ++++ xen-3.1-testing/xen/include/asm-x86/mm.h @@ -64,24 +64,35 @@ struct page_info }; @@ -608,10 +608,10 @@ Index: 2007-05-14/xen/include/asm-x86/mm.h void free_page_type(struct page_info *page, unsigned long type); int _shadow_mode_refcounts(struct domain *d); -Index: 2007-05-14/xen/include/asm-x86/page.h +Index: xen-3.1-testing/xen/include/asm-x86/page.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/page.h 2007-05-15 10:29:20.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/page.h 2007-05-15 08:53:37.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/page.h ++++ xen-3.1-testing/xen/include/asm-x86/page.h @@ -368,13 +368,13 @@ void free_xen_pagetable(void *v); l2_pgentry_t *virt_to_xen_l2e(unsigned long v); @@ -628,10 +628,10 @@ Index: 2007-05-14/xen/include/asm-x86/page.h #endif /* !__ASSEMBLY__ */ -Index: 2007-05-14/xen/include/asm-x86/processor.h +Index: xen-3.1-testing/xen/include/asm-x86/processor.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/processor.h 2007-05-15 10:29:20.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/processor.h 2007-05-15 10:24:15.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/processor.h ++++ xen-3.1-testing/xen/include/asm-x86/processor.h @@ -175,6 +175,7 @@ struct cpuinfo_x86 { unsigned char x86_max_cores; /* cpuid returned max cores value */ unsigned char booted_cores; /* number of cores as seen by OS */ @@ -640,10 +640,10 @@ Index: 2007-05-14/xen/include/asm-x86/processor.h } __cacheline_aligned; /* -Index: 2007-05-14/xen/include/asm-x86/x86_32/page-3level.h +Index: xen-3.1-testing/xen/include/asm-x86/x86_32/page-3level.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/x86_32/page-3level.h 2007-05-15 10:29:20.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/x86_32/page-3level.h 2007-05-14 14:35:02.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/x86_32/page-3level.h ++++ xen-3.1-testing/xen/include/asm-x86/x86_32/page-3level.h @@ -85,6 +85,6 @@ typedef l3_pgentry_t root_pgentry_t; #define get_pte_flags(x) (((int)((x) >> 32) & ~0xFFF) | ((int)(x) & 0xFFF)) #define put_pte_flags(x) (((intpte_t)((x) & ~0xFFF) << 32) | ((x) & 0xFFF)) @@ -652,10 +652,10 @@ Index: 2007-05-14/xen/include/asm-x86/x86_32/page-3level.h +#define L3_DISALLOW_MASK 0xFFFFF1FEU /* must-be-zero */ #endif /* __X86_32_PAGE_3LEVEL_H__ */ -Index: 2007-05-14/xen/include/asm-x86/x86_32/page.h +Index: xen-3.1-testing/xen/include/asm-x86/x86_32/page.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/x86_32/page.h 2007-05-15 10:29:20.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/x86_32/page.h 2007-05-14 14:35:02.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/x86_32/page.h ++++ xen-3.1-testing/xen/include/asm-x86/x86_32/page.h @@ -29,13 +29,13 @@ extern unsigned int PAGE_HYPERVISOR_NOCA (_PAGE_PRESENT|_PAGE_ACCESSED|_PAGE_DIRTY|_PAGE_GNTTAB) @@ -672,10 +672,10 @@ Index: 2007-05-14/xen/include/asm-x86/x86_32/page.h #endif /* __X86_32_PAGE_H__ */ -Index: 2007-05-14/xen/include/asm-x86/x86_64/page.h +Index: xen-3.1-testing/xen/include/asm-x86/x86_64/page.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/x86_64/page.h 2007-05-15 10:29:20.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/x86_64/page.h 2007-05-14 14:35:02.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/x86_64/page.h ++++ xen-3.1-testing/xen/include/asm-x86/x86_64/page.h @@ -87,18 +87,18 @@ typedef l4_pgentry_t root_pgentry_t; #define _PAGE_NX (cpu_has_nx ? _PAGE_NX_BIT : 0U) diff --git a/clear_DF_for_kernel.patch b/x86_64-syscall-clear-df.patch similarity index 61% rename from clear_DF_for_kernel.patch rename to x86_64-syscall-clear-df.patch index 8be3189..1b2cdfd 100644 --- a/clear_DF_for_kernel.patch +++ b/x86_64-syscall-clear-df.patch @@ -1,7 +1,7 @@ -Index: xen-3.1-testing/xen/arch/x86/x86_64/entry.S +Index: 2007-05-14/xen/arch/x86/x86_64/entry.S =================================================================== ---- xen-3.1-testing.orig/xen/arch/x86/x86_64/entry.S -+++ xen-3.1-testing/xen/arch/x86/x86_64/entry.S +--- 2007-05-14.orig/xen/arch/x86/x86_64/entry.S 2007-07-02 11:58:14.000000000 +0200 ++++ 2007-05-14/xen/arch/x86/x86_64/entry.S 2007-07-02 12:03:27.000000000 +0200 @@ -34,6 +34,7 @@ switch_to_kernel: jnc 1f movb $TBF_INTERRUPT,TRAPBOUNCE_flags(%rdx) diff --git a/x86_emulate.patch b/x86_emulate.patch index 4a9e9e1..76528ca 100644 --- a/x86_emulate.patch +++ b/x86_emulate.patch @@ -1,8 +1,8 @@ -Index: 2007-05-14/xen/arch/x86/mm.c +Index: xen-3.1-testing/xen/arch/x86/mm.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/mm.c 2007-05-15 10:29:55.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/mm.c 2007-05-15 10:31:42.000000000 +0200 -@@ -3499,6 +3499,7 @@ static int ptwr_emulated_cmpxchg( +--- xen-3.1-testing.orig/xen/arch/x86/mm.c ++++ xen-3.1-testing/xen/arch/x86/mm.c +@@ -3500,6 +3500,7 @@ static int ptwr_emulated_cmpxchg( container_of(ctxt, struct ptwr_emulate_ctxt, ctxt)); } @@ -10,7 +10,7 @@ Index: 2007-05-14/xen/arch/x86/mm.c static int ptwr_emulated_cmpxchg8b( enum x86_segment seg, unsigned long offset, -@@ -3514,13 +3515,16 @@ static int ptwr_emulated_cmpxchg8b( +@@ -3515,13 +3516,16 @@ static int ptwr_emulated_cmpxchg8b( offset, ((u64)old_hi << 32) | old, ((u64)new_hi << 32) | new, 8, 1, container_of(ctxt, struct ptwr_emulate_ctxt, ctxt)); } @@ -28,10 +28,10 @@ Index: 2007-05-14/xen/arch/x86/mm.c }; /* Write page fault handler: check if guest is trying to modify a PTE. */ -Index: 2007-05-14/xen/arch/x86/mm/shadow/common.c +Index: xen-3.1-testing/xen/arch/x86/mm/shadow/common.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/mm/shadow/common.c 2007-05-14 14:35:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/mm/shadow/common.c 2007-05-14 14:40:43.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/mm/shadow/common.c ++++ xen-3.1-testing/xen/arch/x86/mm/shadow/common.c @@ -310,6 +310,7 @@ hvm_emulate_cmpxchg(enum x86_segment seg v, addr, old, new, bytes, sh_ctxt); } @@ -97,10 +97,10 @@ Index: 2007-05-14/xen/arch/x86/mm/shadow/common.c return &pv_shadow_emulator_ops; } -Index: 2007-05-14/xen/arch/x86/mm/shadow/multi.c +Index: xen-3.1-testing/xen/arch/x86/mm/shadow/multi.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/mm/shadow/multi.c 2007-05-14 14:35:02.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/mm/shadow/multi.c 2007-05-14 14:40:43.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/mm/shadow/multi.c ++++ xen-3.1-testing/xen/arch/x86/mm/shadow/multi.c @@ -4025,7 +4025,8 @@ sh_x86_emulate_cmpxchg(struct vcpu *v, u return rv; } @@ -129,10 +129,10 @@ Index: 2007-05-14/xen/arch/x86/mm/shadow/multi.c .shadow.make_monitor_table = sh_make_monitor_table, .shadow.destroy_monitor_table = sh_destroy_monitor_table, #if SHADOW_OPTIMIZATIONS & SHOPT_WRITABLE_HEURISTIC -Index: 2007-05-14/xen/arch/x86/x86_emulate.c +Index: xen-3.1-testing/xen/arch/x86/x86_emulate.c =================================================================== ---- 2007-05-14.orig/xen/arch/x86/x86_emulate.c 2007-05-15 10:29:19.000000000 +0200 -+++ 2007-05-14/xen/arch/x86/x86_emulate.c 2007-05-14 14:40:43.000000000 +0200 +--- xen-3.1-testing.orig/xen/arch/x86/x86_emulate.c ++++ xen-3.1-testing/xen/arch/x86/x86_emulate.c @@ -30,6 +30,7 @@ #include #include @@ -257,10 +257,10 @@ Index: 2007-05-14/xen/arch/x86/x86_emulate.c break; case 4: #ifdef __x86_64__ -Index: 2007-05-14/xen/include/asm-x86/cpufeature.h +Index: xen-3.1-testing/xen/include/asm-x86/cpufeature.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/cpufeature.h 2007-05-15 10:29:19.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/cpufeature.h 2007-05-14 14:40:43.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/cpufeature.h ++++ xen-3.1-testing/xen/include/asm-x86/cpufeature.h @@ -121,6 +121,7 @@ #define cpu_has_cyrix_arr boot_cpu_has(X86_FEATURE_CYRIX_ARR) #define cpu_has_centaur_mcr boot_cpu_has(X86_FEATURE_CENTAUR_MCR) @@ -277,10 +277,10 @@ Index: 2007-05-14/xen/include/asm-x86/cpufeature.h #endif #endif /* __ASM_I386_CPUFEATURE_H */ -Index: 2007-05-14/xen/include/asm-x86/x86_emulate.h +Index: xen-3.1-testing/xen/include/asm-x86/x86_emulate.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/x86_emulate.h 2007-05-15 10:29:19.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/x86_emulate.h 2007-05-14 14:40:43.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/x86_emulate.h ++++ xen-3.1-testing/xen/include/asm-x86/x86_emulate.h @@ -68,8 +68,9 @@ enum x86_segment { * some out-of-band mechanism, unknown to the emulator. The memop signals * failure by returning X86EMUL_EXCEPTION to the emulator, which will @@ -316,10 +316,10 @@ Index: 2007-05-14/xen/include/asm-x86/x86_emulate.h enum x86_segment seg, unsigned long offset, unsigned long old_lo, -Index: 2007-05-14/xen/include/asm-x86/paging.h +Index: xen-3.1-testing/xen/include/asm-x86/paging.h =================================================================== ---- 2007-05-14.orig/xen/include/asm-x86/paging.h 2007-05-15 10:29:19.000000000 +0200 -+++ 2007-05-14/xen/include/asm-x86/paging.h 2007-05-14 14:40:43.000000000 +0200 +--- xen-3.1-testing.orig/xen/include/asm-x86/paging.h ++++ xen-3.1-testing/xen/include/asm-x86/paging.h @@ -93,12 +93,14 @@ struct shadow_paging_mode { unsigned long new, unsigned int bytes, diff --git a/xen-domUloader.diff b/xen-domUloader.diff index afe5d75..c5e2e88 100644 --- a/xen-domUloader.diff +++ b/xen-domUloader.diff @@ -38,7 +38,7 @@ Index: xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py from xen.xend.XendError import XendError, VmError from xen.xend.XendDevices import XendDevices from xen.xend.XendTask import XendTask -@@ -1783,8 +1783,11 @@ class XendDomainInfo: +@@ -1781,8 +1781,11 @@ class XendDomainInfo: blexec = osdep.pygrub_path blcfg = None diff --git a/xen-max-free-mem.diff b/xen-max-free-mem.diff index 69df1fe..e4f3184 100644 --- a/xen-max-free-mem.diff +++ b/xen-max-free-mem.diff @@ -90,7 +90,7 @@ Index: xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -573,6 +573,27 @@ class XendDomainInfo: +@@ -570,6 +570,27 @@ class XendDomainInfo: return sxprs diff --git a/xen-xmexample.diff b/xen-xmexample.diff index 6cbc3a1..6aa955c 100644 --- a/xen-xmexample.diff +++ b/xen-xmexample.diff @@ -1,9 +1,9 @@ Change various example paths in the config files to match SUSE. -Index: xen-unstable/tools/examples/xmexample1 +Index: xen-3.1-testing/tools/examples/xmexample1 =================================================================== ---- xen-unstable.orig/tools/examples/xmexample1 -+++ xen-unstable/tools/examples/xmexample1 +--- xen-3.1-testing.orig/tools/examples/xmexample1 ++++ xen-3.1-testing/tools/examples/xmexample1 @@ -7,11 +7,13 @@ #============================================================================ @@ -43,10 +43,10 @@ Index: xen-unstable/tools/examples/xmexample1 #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' -Index: xen-unstable/tools/examples/xmexample2 +Index: xen-3.1-testing/tools/examples/xmexample2 =================================================================== ---- xen-unstable.orig/tools/examples/xmexample2 -+++ xen-unstable/tools/examples/xmexample2 +--- xen-3.1-testing.orig/tools/examples/xmexample2 ++++ xen-3.1-testing/tools/examples/xmexample2 @@ -35,11 +35,13 @@ xm_vars.var('vmid', xm_vars.check() @@ -86,10 +86,10 @@ Index: xen-unstable/tools/examples/xmexample2 #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' -Index: xen-unstable/tools/examples/xmexample3 +Index: xen-3.1-testing/tools/examples/xmexample3 =================================================================== ---- xen-unstable.orig/tools/examples/xmexample3 -+++ xen-unstable/tools/examples/xmexample3 +--- xen-3.1-testing.orig/tools/examples/xmexample3 ++++ xen-3.1-testing/tools/examples/xmexample3 @@ -35,11 +35,13 @@ xm_vars.var('vmid', xm_vars.check() @@ -109,10 +109,10 @@ Index: xen-unstable/tools/examples/xmexample3 # The domain build function. Default is 'linux'. #builder='linux' -Index: xen-unstable/tools/examples/xmexample.hvm +Index: xen-3.1-testing/tools/examples/xmexample.hvm =================================================================== ---- xen-unstable.orig/tools/examples/xmexample.hvm -+++ xen-unstable/tools/examples/xmexample.hvm +--- xen-3.1-testing.orig/tools/examples/xmexample.hvm ++++ xen-3.1-testing/tools/examples/xmexample.hvm @@ -71,7 +71,7 @@ vif = [ 'type=ioemu, bridge=xenbr0' ] # and MODE is r for read-only, w for read-write. @@ -122,10 +122,10 @@ Index: xen-unstable/tools/examples/xmexample.hvm #---------------------------------------------------------------------------- # Configure the behaviour when a domain exits. There are three 'reasons' -Index: xen-unstable/docs/man/xmdomain.cfg.pod.5 +Index: xen-3.1-testing/docs/man/xmdomain.cfg.pod.5 =================================================================== ---- xen-unstable.orig/docs/man/xmdomain.cfg.pod.5 -+++ xen-unstable/docs/man/xmdomain.cfg.pod.5 +--- xen-3.1-testing.orig/docs/man/xmdomain.cfg.pod.5 ++++ xen-3.1-testing/docs/man/xmdomain.cfg.pod.5 @@ -38,13 +38,13 @@ file. The kernel image for the domain. The format of the parameter is the @@ -161,11 +161,11 @@ Index: xen-unstable/docs/man/xmdomain.cfg.pod.5 at hda1, which is the root filesystem. =item I -Index: xen-unstable/docs/man/xm.pod.1 +Index: xen-3.1-testing/docs/man/xm.pod.1 =================================================================== ---- xen-unstable.orig/docs/man/xm.pod.1 -+++ xen-unstable/docs/man/xm.pod.1 -@@ -102,8 +102,8 @@ soon as it is run. +--- xen-3.1-testing.orig/docs/man/xm.pod.1 ++++ xen-3.1-testing/docs/man/xm.pod.1 +@@ -106,8 +106,8 @@ soon as it is run. =item I diff --git a/xen.changes b/xen.changes index 08b72cc..3953fc2 100644 --- a/xen.changes +++ b/xen.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Jul 3 15:15:28 MDT 2007 - ccoffing@novell.com + +- #285929: Bad "xendomains status" output w/ empty XENDOMAINS_SAVE + +------------------------------------------------------------------- +Tue Jul 3 13:39:35 MDT 2007 - carnold@novell.com + +- Changes necessary to support EDD and EDID from Jan. + ------------------------------------------------------------------- Wed Jun 20 17:48:18 MDT 2007 - jfehlig@novell.com diff --git a/xen.spec b/xen.spec index 5130c12..d1b62a2 100644 --- a/xen.spec +++ b/xen.spec @@ -34,8 +34,8 @@ BuildRequires: glibc-32bit glibc-devel-32bit BuildRequires: kernel-source kernel-syms xorg-x11 %endif Version: 3.1.0_15042 -Release: 5 -License: GNU General Public License (GPL) +Release: 7 +License: GPL v2 or later Group: System/Kernel Autoreqprov: on PreReq: %insserv_prereq %fillup_prereq @@ -59,12 +59,22 @@ Source18: network-multi # Upstream patches Patch0: 15048-localtime.diff Patch1: 15157_xend_device_destroy.patch -Patch2: 15250_xend_device_destroy.patch -Patch3: 15273_libxenapi.patch -Patch4: 15274_xenapi.patch -Patch5: 15275_xenapi.patch -Patch6: 15410-domain-restore.patch -Patch7: man-page.diff +Patch2: 15173-32on64-runstate.patch +Patch3: 15183-32on64-multicall.patch +Patch4: 15189-pmtimer.patch +Patch5: 15190-clocksource-opt.patch +Patch6: 15250_xend_device_destroy.patch +Patch7: 15273_libxenapi.patch +Patch8: 15274_xenapi.patch +Patch9: 15275_xenapi.patch +Patch10: 15389-32on64-memop-error-path.patch +Patch11: 15390-32on64-setup-error-path.patch +Patch12: 15391-32on64-setup-pgtable.patch +Patch13: 15410-domain-restore.patch +Patch14: 15416-x86_64-failsafe.patch +Patch15: 15433-pae-ptwr-check.patch +Patch16: 15444-vmxassist-p2r.patch +Patch17: man-page.diff # Our patches Patch100: xen-config.diff Patch101: xend-config.diff @@ -111,37 +121,37 @@ Patch142: netfront_mac.patch Patch143: vnc-i18n-keys.diff Patch144: rpmlint.diff # Patches from Jan -Patch170: inval-sh-ldt.patch -Patch171: 32on64-cpuid.patch -Patch172: 32on64-ioemu.patch -Patch173: check-libvncserver.patch -Patch174: check-xenapi.patch -Patch175: kill-sh_mapcache.patch -Patch176: intpte_t-cast.patch -Patch177: ptwr-sanity.patch -Patch178: hvm-pio-read.patch -Patch179: hvm-shared-info-size.patch -Patch180: hvm-hypercall-context.patch -Patch181: hvm-efer.patch -Patch182: hvm-hypercall-debug.patch -Patch183: svm-reg-save.patch -Patch184: vmx-no-cstar.patch -Patch185: hvm-debug-msg.patch -Patch186: guest-copy.patch -Patch187: x86-page-cacheability.patch -Patch188: realmode.patch -Patch189: edd.patch -Patch190: edid.patch -Patch191: 32on64-call-gates.patch -Patch192: x86-nmi-inject.patch -Patch193: x86_emulate.patch -Patch194: vgacon-keep.patch -Patch195: vgacon-50-lines.patch -Patch196: x86-extra-trap-info.patch -Patch197: x86-machine-check.patch -Patch198: x86-emul-rf.patch -Patch199: vmx-check-descr.patch -Patch200: clear_DF_for_kernel.patch +Patch180: inval-sh-ldt.patch +Patch181: 32on64-cpuid.patch +Patch182: 32on64-ioemu.patch +Patch183: check-libvncserver.patch +Patch184: check-xenapi.patch +Patch185: kill-sh_mapcache.patch +Patch186: intpte_t-cast.patch +Patch187: ptwr-sanity.patch +Patch188: hvm-pio-read.patch +Patch189: hvm-shared-info-size.patch +Patch190: hvm-hypercall-context.patch +Patch191: hvm-efer.patch +Patch192: hvm-hypercall-debug.patch +Patch193: svm-reg-save.patch +Patch194: vmx-no-cstar.patch +Patch195: hvm-debug-msg.patch +Patch196: guest-copy.patch +Patch197: x86-page-cacheability.patch +Patch198: realmode.patch +Patch199: edd.patch +Patch200: edid.patch +Patch201: 32on64-call-gates.patch +Patch202: x86-nmi-inject.patch +Patch203: x86_emulate.patch +Patch204: vgacon-keep.patch +Patch205: vgacon-50-lines.patch +Patch206: x86-extra-trap-info.patch +Patch207: x86-machine-check.patch +Patch208: x86-emul-rf.patch +Patch209: vmx-check-descr.patch +Patch210: x86_64-syscall-clear-df.patch Patch300: xen-enable-hvm-debug.diff URL: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/ BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -523,6 +533,16 @@ Authors: %patch5 -p1 %patch6 -p1 %patch7 -p1 +%patch8 -p1 +%patch9 -p1 +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 %patch100 -p1 %patch101 -p1 %patch102 -p1 @@ -567,16 +587,6 @@ Authors: %patch142 -p1 %patch143 -p1 %patch144 -p1 -%patch170 -p1 -%patch171 -p1 -%patch172 -p1 -%patch173 -p1 -%patch174 -p1 -%patch175 -p1 -%patch176 -p1 -%patch177 -p1 -%patch178 -p1 -%patch179 -p1 %patch180 -p1 %patch181 -p1 %patch182 -p1 @@ -598,6 +608,16 @@ Authors: %patch198 -p1 %patch199 -p1 %patch200 -p1 +%patch201 -p1 +%patch202 -p1 +%patch203 -p1 +%patch204 -p1 +%patch205 -p1 +%patch206 -p1 +%patch207 -p1 +%patch208 -p1 +%patch209 -p1 +%patch210 -p1 XEN_EXTRAVERSION=%version-%release XEN_EXTRAVERSION=${XEN_EXTRAVERSION#%{xvers}} sed -i "s/XEN_EXTRAVERSION[\t ]*.=.*\$/XEN_EXTRAVERSION = $XEN_EXTRAVERSION/" xen/Makefile @@ -909,6 +929,10 @@ rm -f $RPM_BUILD_ROOT/%pysite/*.egg-info /sbin/ldconfig %changelog +* Tue Jul 03 2007 - ccoffing@novell.com +- #285929: Bad "xendomains status" output w/ empty XENDOMAINS_SAVE +* Tue Jul 03 2007 - carnold@novell.com +- Changes necessary to support EDD and EDID from Jan. * Wed Jun 20 2007 - jfehlig@novell.com - Added upstream changesets 15273, 15274, and 15275. - Removed the modified 15157 patch. This patch was actually a diff --git a/xenapi-console-protocol.patch b/xenapi-console-protocol.patch index 1ff9534..9b431ad 100644 --- a/xenapi-console-protocol.patch +++ b/xenapi-console-protocol.patch @@ -2,7 +2,7 @@ Index: xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py =================================================================== --- xen-3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py +++ xen-3.1-testing/tools/python/xen/xend/XendDomainInfo.py -@@ -2351,6 +2351,14 @@ class XendDomainInfo: +@@ -2349,6 +2349,14 @@ class XendDomainInfo: if not config.has_key('backend'): config['backend'] = "00000000-0000-0000-0000-000000000000"