From: Greg Kroah-Hartman Date: Tue, 11 Dec 2007 22:52:36 +0000 (-0800) Subject: 2.6.23 patches X-Git-Tag: v2.6.23.10~18 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=36a3fb9403d397660d3cf49907cd1fe99eca3e54;p=thirdparty%2Fkernel%2Fstable-queue.git 2.6.23 patches --- diff --git a/queue-2.6.23/kvm-fix-hang-on-uniprocessor.patch b/queue-2.6.23/kvm-fix-hang-on-uniprocessor.patch new file mode 100644 index 00000000000..5b623d6ada8 --- /dev/null +++ b/queue-2.6.23/kvm-fix-hang-on-uniprocessor.patch @@ -0,0 +1,40 @@ +From stable-bounces@linux.kernel.org Sun Dec 2 03:18:56 2007 +From: Marko Kohtala +Date: Sun, 2 Dec 2007 13:18:43 +0200 +Subject: KVM: Fix hang on uniprocessor +To: stable@kernel.org +Cc: kvm-devel@lists.sourceforge.net, Marko Kohtala , linux-kernel@vger.kernel.org, Avi Kivity +Message-ID: <1196594327723-git-send-email-avi@qumranet.com> + + +From: Marko Kohtala + +This is not in mainline, as it was fixed differently in that tree. + +first_cpu(cpus) returns the only CPU when NR_CPUS is 1 regardless of +the cpus mask. Therefore we avoid a kernel hang in +KVM_SET_MEMORY_REGION ioctl on uniprocessor by not entering the loop at +all. + +Signed-off-by: Marko Kohtala +Signed-off-by: Avi Kivity +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/kvm/kvm_main.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/drivers/kvm/kvm_main.c ++++ b/drivers/kvm/kvm_main.c +@@ -273,6 +273,11 @@ void kvm_flush_remote_tlbs(struct kvm *k + } + } + ++ /* Uniprocessor kernel does not respect cpus in first_cpu. So ++ * do not go there if we have nothing to do. */ ++ if (cpus_empty(cpus)) ++ return; ++ + /* + * We really want smp_call_function_mask() here. But that's not + * available, so ipi all cpus in parallel and wait for them diff --git a/queue-2.6.23/kvm-skip-pio-instruction-when-it-is-emulated-not-executed.patch b/queue-2.6.23/kvm-skip-pio-instruction-when-it-is-emulated-not-executed.patch new file mode 100644 index 00000000000..5077cf89ea8 --- /dev/null +++ b/queue-2.6.23/kvm-skip-pio-instruction-when-it-is-emulated-not-executed.patch @@ -0,0 +1,55 @@ +From stable-bounces@linux.kernel.org Sun Dec 2 03:19:00 2007 +From: Avi Kivity +Date: Sun, 2 Dec 2007 13:18:45 +0200 +Subject: KVM: Skip pio instruction when it is emulated, not executed +To: stable@kernel.org +Cc: kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Avi Kivity +Message-ID: <11965943273087-git-send-email-avi@qumranet.com> + +From: Avi Kivity + +patch 0967b7bf1c22b55777aba46ff616547feed0b141 in mainline. + +If we defer updating rip until pio instructions are executed, we have a +problem with reset: a pio reset updates rip, and when the instruction +completes we skip the emulated instruction, pointing rip somewhere completely +unrelated. + +Fix by updating rip when we see decode the instruction, not after emulation. + +Signed-off-by: Avi Kivity +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/kvm/kvm_main.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/drivers/kvm/kvm_main.c ++++ b/drivers/kvm/kvm_main.c +@@ -1757,8 +1757,6 @@ static int complete_pio(struct kvm_vcpu + io->count -= io->cur_count; + io->cur_count = 0; + +- if (!io->count) +- kvm_arch_ops->skip_emulated_instruction(vcpu); + return 0; + } + +@@ -1804,6 +1802,7 @@ int kvm_setup_pio(struct kvm_vcpu *vcpu, + + pio_dev = vcpu_find_pio_dev(vcpu, port); + if (!string) { ++ kvm_arch_ops->skip_emulated_instruction(vcpu); + kvm_arch_ops->cache_regs(vcpu); + memcpy(vcpu->pio_data, &vcpu->regs[VCPU_REGS_RAX], 4); + kvm_arch_ops->decache_regs(vcpu); +@@ -1850,6 +1849,9 @@ int kvm_setup_pio(struct kvm_vcpu *vcpu, + vcpu->run->io.count = now; + vcpu->pio.cur_count = now; + ++ if (now == count) ++ kvm_arch_ops->skip_emulated_instruction(vcpu); ++ + for (i = 0; i < nr_pages; ++i) { + spin_lock(&vcpu->kvm->lock); + page = gva_to_page(vcpu, address + i * PAGE_SIZE); diff --git a/queue-2.6.23/kvm-svm-fix-fpu-leak-while-emulating-clts.patch b/queue-2.6.23/kvm-svm-fix-fpu-leak-while-emulating-clts.patch new file mode 100644 index 00000000000..aa308d0a23d --- /dev/null +++ b/queue-2.6.23/kvm-svm-fix-fpu-leak-while-emulating-clts.patch @@ -0,0 +1,39 @@ +From stable-bounces@linux.kernel.org Sun Dec 2 03:19:08 2007 +From: Amit Shah +Date: Sun, 2 Dec 2007 13:18:44 +0200 +Subject: KVM: SVM: Fix FPU leak while emulating clts +To: stable@kernel.org +Cc: kvm-devel@lists.sourceforge.net, Amit Shah , linux-kernel@vger.kernel.org, Avi Kivity +Message-ID: <11965943273853-git-send-email-avi@qumranet.com> + +From: Amit Shah + +patch 404fb881b82cf0cf6981832f8d31a7484e4dee81 in mainline. + +The clts code didn't use set_cr0 properly, so our lazy FPU +processing wasn't being done by the clts instruction at all. + +(this isn't called on Intel as the hardware does the decode for us) + +Signed-off-by: Amit Shah +Signed-off-by: Avi Kivity +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/kvm/kvm_main.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +--- a/drivers/kvm/kvm_main.c ++++ b/drivers/kvm/kvm_main.c +@@ -1163,10 +1163,7 @@ int emulate_invlpg(struct kvm_vcpu *vcpu + + int emulate_clts(struct kvm_vcpu *vcpu) + { +- unsigned long cr0; +- +- cr0 = vcpu->cr0 & ~CR0_TS_MASK; +- kvm_arch_ops->set_cr0(vcpu, cr0); ++ kvm_arch_ops->set_cr0(vcpu, vcpu->cr0 & ~X86_CR0_TS); + return X86EMUL_CONTINUE; + } + diff --git a/queue-2.6.23/kvm-svm-intercept-the-invd-and-wbinvd-instructions.patch b/queue-2.6.23/kvm-svm-intercept-the-invd-and-wbinvd-instructions.patch new file mode 100644 index 00000000000..ab5bf989267 --- /dev/null +++ b/queue-2.6.23/kvm-svm-intercept-the-invd-and-wbinvd-instructions.patch @@ -0,0 +1,58 @@ +From stable-bounces@linux.kernel.org Sun Dec 2 03:18:34 2007 +From: Avi Kivity +Date: Sun, 2 Dec 2007 13:18:41 +0200 +Subject: KVM: SVM: Intercept the 'invd' and 'wbinvd' instructions +To: stable@kernel.org +Cc: kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Avi Kivity +Message-ID: <11965943273317-git-send-email-avi@qumranet.com> + +From: Avi Kivity + +patch cf5a94d1331b411b84414c13e43f578260942d6b in mainline. + +'invd' can destroy host data, and 'wbinvd' allows the guest to induce +long (milliseconds) latencies. + +Noted by Ben Serebrin. + +Signed-off-by: Avi Kivity +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/kvm/svm.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/kvm/svm.c ++++ b/drivers/kvm/svm.c +@@ -506,6 +506,7 @@ static void init_vmcb(struct vmcb *vmcb) + */ + /* (1ULL << INTERCEPT_SELECTIVE_CR0) | */ + (1ULL << INTERCEPT_CPUID) | ++ (1ULL << INTERCEPT_INVD) | + (1ULL << INTERCEPT_HLT) | + (1ULL << INTERCEPT_INVLPGA) | + (1ULL << INTERCEPT_IOIO_PROT) | +@@ -519,6 +520,7 @@ static void init_vmcb(struct vmcb *vmcb) + (1ULL << INTERCEPT_STGI) | + (1ULL << INTERCEPT_CLGI) | + (1ULL << INTERCEPT_SKINIT) | ++ (1ULL << INTERCEPT_WBINVD) | + (1ULL << INTERCEPT_MONITOR) | + (1ULL << INTERCEPT_MWAIT); + +@@ -1319,6 +1321,7 @@ static int (*svm_exit_handlers[])(struct + [SVM_EXIT_VINTR] = interrupt_window_interception, + /* [SVM_EXIT_CR0_SEL_WRITE] = emulate_on_interception, */ + [SVM_EXIT_CPUID] = cpuid_interception, ++ [SVM_EXIT_INVD] = emulate_on_interception, + [SVM_EXIT_HLT] = halt_interception, + [SVM_EXIT_INVLPG] = emulate_on_interception, + [SVM_EXIT_INVLPGA] = invalid_op_interception, +@@ -1333,6 +1336,7 @@ static int (*svm_exit_handlers[])(struct + [SVM_EXIT_STGI] = invalid_op_interception, + [SVM_EXIT_CLGI] = invalid_op_interception, + [SVM_EXIT_SKINIT] = invalid_op_interception, ++ [SVM_EXIT_WBINVD] = emulate_on_interception, + [SVM_EXIT_MONITOR] = invalid_op_interception, + [SVM_EXIT_MWAIT] = invalid_op_interception, + }; diff --git a/queue-2.6.23/kvm-vmx-force-vm86-mode-if-setting-flags-during-real-mode.patch b/queue-2.6.23/kvm-vmx-force-vm86-mode-if-setting-flags-during-real-mode.patch new file mode 100644 index 00000000000..e25fe7c1ab5 --- /dev/null +++ b/queue-2.6.23/kvm-vmx-force-vm86-mode-if-setting-flags-during-real-mode.patch @@ -0,0 +1,33 @@ +From stable-bounces@linux.kernel.org Sun Dec 2 03:19:26 2007 +From: Avi Kivity +Date: Sun, 2 Dec 2007 13:18:46 +0200 +Subject: KVM: VMX: Force vm86 mode if setting flags during real mode +To: stable@kernel.org +Cc: kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Avi Kivity +Message-ID: <11965943271441-git-send-email-avi@qumranet.com> + +From: Avi Kivity + +patch 78f7826868da8e27d097802139a3fec39f47f3b8 in mainline. + +When resetting from userspace, we need to handle the flags being cleared +even after we are in real mode. + +Signed-off-by: Avi Kivity +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/kvm/vmx.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/kvm/vmx.c ++++ b/drivers/kvm/vmx.c +@@ -463,6 +463,8 @@ static unsigned long vmx_get_rflags(stru + + static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags) + { ++ if (vcpu->rmode.active) ++ rflags |= IOPL_MASK | X86_EFLAGS_VM; + vmcs_writel(GUEST_RFLAGS, rflags); + } + diff --git a/queue-2.6.23/kvm-vmx-reset-mmu-context-when-entering-real-mode.patch b/queue-2.6.23/kvm-vmx-reset-mmu-context-when-entering-real-mode.patch new file mode 100644 index 00000000000..ab4cf2962a3 --- /dev/null +++ b/queue-2.6.23/kvm-vmx-reset-mmu-context-when-entering-real-mode.patch @@ -0,0 +1,50 @@ +From stable-bounces@linux.kernel.org Sun Dec 2 03:19:18 2007 +From: Eddie Dong +Date: Sun, 2 Dec 2007 13:18:47 +0200 +Subject: KVM: VMX: Reset mmu context when entering real mode +To: stable@kernel.org +Cc: kvm-devel@lists.sourceforge.net, Avi Kivity , Eddie Dong , linux-kernel@vger.kernel.org, Qing He +Message-ID: <11965943271835-git-send-email-avi@qumranet.com> + + +From: Eddie Dong + +patch 8668a3c468ed55d19514117a5a959d91d3d03823 in mainline. + +Resetting an SMP guest will force AP enter real mode (RESET) with +paging enabled in protected mode. While current enter_rmode() can +only handle mode switch from nonpaging mode to real mode which leads +to SMP reboot failure. + +Fix by reloading the mmu context on entering real mode. + +Signed-off-by: Yaozu (Eddie) Dong +Signed-off-by: Qing He +Signed-off-by: Avi Kivity +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/kvm/mmu.c | 1 + + drivers/kvm/vmx.c | 1 + + 2 files changed, 2 insertions(+) + +--- a/drivers/kvm/mmu.c ++++ b/drivers/kvm/mmu.c +@@ -1066,6 +1066,7 @@ int kvm_mmu_reset_context(struct kvm_vcp + destroy_kvm_mmu(vcpu); + return init_kvm_mmu(vcpu); + } ++EXPORT_SYMBOL_GPL(kvm_mmu_reset_context); + + int kvm_mmu_load(struct kvm_vcpu *vcpu) + { +--- a/drivers/kvm/vmx.c ++++ b/drivers/kvm/vmx.c +@@ -957,6 +957,7 @@ static void enter_rmode(struct kvm_vcpu + fix_rmode_seg(VCPU_SREG_GS, &vcpu->rmode.gs); + fix_rmode_seg(VCPU_SREG_FS, &vcpu->rmode.fs); + ++ kvm_mmu_reset_context(vcpu); + init_rmode_tss(vcpu->kvm); + } + diff --git a/queue-2.6.23/kvm-x86-emulator-fix-access-registers-for-instructions-with-modr-m-byte-and-mod-3.patch b/queue-2.6.23/kvm-x86-emulator-fix-access-registers-for-instructions-with-modr-m-byte-and-mod-3.patch new file mode 100644 index 00000000000..1812ab8c729 --- /dev/null +++ b/queue-2.6.23/kvm-x86-emulator-fix-access-registers-for-instructions-with-modr-m-byte-and-mod-3.patch @@ -0,0 +1,61 @@ +From stable-bounces@linux.kernel.org Sun Dec 2 03:18:28 2007 +From: Aurelien Jarno +Date: Sun, 2 Dec 2007 13:18:39 +0200 +Subject: KVM: x86 emulator: fix access registers for instructions with ModR/M byte and Mod = 3 +To: stable@kernel.org +Cc: kvm-devel@lists.sourceforge.net, Avi Kivity , linux-kernel@vger.kernel.org, Aurelien Jarno +Message-ID: <11965943274184-git-send-email-avi@qumranet.com> + + +From: Aurelien Jarno + +patch 4e62417bf317504c0b85e0d7abd236f334f54eaf in mainline. + +The patch belows changes the access type to register from memory for +instructions that are declared as SrcMem or DstMem, but have a +ModR/M byte with Mod = 3. + +It fixes (at least) the lmsw and smsw instructions on an AMD64 CPU, +which are needed for FreeBSD. + +Signed-off-by: Aurelien Jarno +Signed-off-by: Avi Kivity +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/kvm/x86_emulate.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) + +--- a/drivers/kvm/x86_emulate.c ++++ b/drivers/kvm/x86_emulate.c +@@ -773,6 +773,14 @@ done_prefixes: + case SrcMem: + src.bytes = (d & ByteOp) ? 1 : op_bytes; + srcmem_common: ++ /* ++ * For instructions with a ModR/M byte, switch to register ++ * access if Mod = 3. ++ */ ++ if ((d & ModRM) && modrm_mod == 3) { ++ src.type = OP_REG; ++ break; ++ } + src.type = OP_MEM; + src.ptr = (unsigned long *)cr2; + if ((rc = ops->read_emulated((unsigned long)src.ptr, +@@ -839,6 +847,15 @@ done_prefixes: + dst.type = OP_MEM; + dst.ptr = (unsigned long *)cr2; + dst.bytes = (d & ByteOp) ? 1 : op_bytes; ++ dst.val = 0; ++ /* ++ * For instructions with a ModR/M byte, switch to register ++ * access if Mod = 3. ++ */ ++ if ((d & ModRM) && modrm_mod == 3) { ++ dst.type = OP_REG; ++ break; ++ } + if (d & BitOp) { + unsigned long mask = ~(dst.bytes * 8 - 1); + diff --git a/queue-2.6.23/kvm-x86-emulator-implement-movnti-mem-reg.patch b/queue-2.6.23/kvm-x86-emulator-implement-movnti-mem-reg.patch new file mode 100644 index 00000000000..b1c0692b3ee --- /dev/null +++ b/queue-2.6.23/kvm-x86-emulator-implement-movnti-mem-reg.patch @@ -0,0 +1,50 @@ +From stable-bounces@linux.kernel.org Sun Dec 2 03:18:46 2007 +From: Sheng Yang +Date: Sun, 2 Dec 2007 13:18:38 +0200 +Subject: KVM: x86 emulator: implement 'movnti mem, reg' +To: stable@kernel.org +Cc: kvm-devel@lists.sourceforge.net, Sheng Yang , linux-kernel@vger.kernel.org, Avi Kivity +Message-ID: <11965943273722-git-send-email-avi@qumranet.com> + + +From: Sheng Yang + +patch a012e65aee48379a7a87eadafa74f878b61522b9 in mainline. + +Implement emulation of instruction: + movnti m32/m64, r32/r64 + opcode: 0x0f 0xc3 + +Needed to support Linux 2.6.16 as guest (used for mmio). + +Signed-off-by: Sheng Yang +Signed-off-by: Avi Kivity +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/kvm/x86_emulate.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/kvm/x86_emulate.c ++++ b/drivers/kvm/x86_emulate.c +@@ -198,7 +198,8 @@ static u16 twobyte_table[256] = { + 0, 0, ByteOp | DstReg | SrcMem | ModRM | Mov, + DstReg | SrcMem16 | ModRM | Mov, + /* 0xC0 - 0xCF */ +- 0, 0, 0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0, 0, 0, 0, 0, 0, 0, ++ 0, 0, 0, DstMem | SrcReg | ModRM | Mov, 0, 0, 0, ImplicitOps | ModRM, ++ 0, 0, 0, 0, 0, 0, 0, 0, + /* 0xD0 - 0xDF */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + /* 0xE0 - 0xEF */ +@@ -1324,6 +1325,10 @@ twobyte_insn: + dst.bytes = op_bytes; + dst.val = (d & ByteOp) ? (s8) src.val : (s16) src.val; + break; ++ case 0xc3: /* movnti */ ++ dst.bytes = op_bytes; ++ dst.val = (op_bytes == 4) ? (u32) src.val : (u64) src.val; ++ break; + } + goto writeback; + diff --git a/queue-2.6.23/kvm-x86-emulator-invd-instruction.patch b/queue-2.6.23/kvm-x86-emulator-invd-instruction.patch new file mode 100644 index 00000000000..50de63af785 --- /dev/null +++ b/queue-2.6.23/kvm-x86-emulator-invd-instruction.patch @@ -0,0 +1,41 @@ +From stable-bounces@linux.kernel.org Sun Dec 2 03:18:46 2007 +From: Avi Kivity +Date: Sun, 2 Dec 2007 13:18:40 +0200 +Subject: [stable] [PATCH 03/10] KVM: x86 emulator: invd instruction +To: stable@kernel.org +Cc: kvm-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, Avi Kivity +Message-ID: <1196594327589-git-send-email-avi@qumranet.com> + +From: Avi Kivity + +patch 651a3e29b3d19418d7a8a9787906061f9be7cc5f in mainline. + +Emulate the 'invd' instruction (opcode 0f 08). + +Signed-off-by: Avi Kivity +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/kvm/x86_emulate.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/kvm/x86_emulate.c ++++ b/drivers/kvm/x86_emulate.c +@@ -156,7 +156,7 @@ static u8 opcode_table[256] = { + static u16 twobyte_table[256] = { + /* 0x00 - 0x0F */ + 0, SrcMem | ModRM | DstReg, 0, 0, 0, 0, ImplicitOps, 0, +- 0, ImplicitOps, 0, 0, 0, ImplicitOps | ModRM, 0, 0, ++ ImplicitOps, ImplicitOps, 0, 0, 0, ImplicitOps | ModRM, 0, 0, + /* 0x10 - 0x1F */ + 0, 0, 0, 0, 0, 0, 0, 0, ImplicitOps | ModRM, 0, 0, 0, 0, 0, 0, 0, + /* 0x20 - 0x2F */ +@@ -1353,6 +1353,8 @@ twobyte_special_insn: + /* Disable writeback. */ + no_wb = 1; + switch (b) { ++ case 0x08: /* invd */ ++ break; + case 0x09: /* wbinvd */ + break; + case 0x0d: /* GrpP (prefetch) */ diff --git a/queue-2.6.23/kvm-x86-emulator-use-emulator_write_emulated-and-not-emulator_write_std.patch b/queue-2.6.23/kvm-x86-emulator-use-emulator_write_emulated-and-not-emulator_write_std.patch new file mode 100644 index 00000000000..7a185fbdc4a --- /dev/null +++ b/queue-2.6.23/kvm-x86-emulator-use-emulator_write_emulated-and-not-emulator_write_std.patch @@ -0,0 +1,37 @@ +From stable-bounces@linux.kernel.org Sun Dec 2 03:19:13 2007 +From: Amit Shah +Date: Sun, 2 Dec 2007 13:18:42 +0200 +Subject: KVM: x86 emulator: Use emulator_write_emulated and not emulator_write_std +To: stable@kernel.org +Cc: kvm-devel@lists.sourceforge.net, Amit Shah , linux-kernel@vger.kernel.org, Avi Kivity +Message-ID: <11965943272386-git-send-email-avi@qumranet.com> + + +From: Amit Shah + +patch 00b2ef475d4728ca53a2bc788c7978042907e354 in mainline. + +emulator_write_std() is not implemented, and calling write_emulated should +work just as well in place of write_std. + +Fixes emulator failures with the push r/m instruction. + +Signed-off-by: Amit Shah +Signed-off-by: Avi Kivity +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/kvm/x86_emulate.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/kvm/x86_emulate.c ++++ b/drivers/kvm/x86_emulate.c +@@ -1066,7 +1066,7 @@ done_prefixes: + } + register_address_increment(_regs[VCPU_REGS_RSP], + -dst.bytes); +- if ((rc = ops->write_std( ++ if ((rc = ops->write_emulated( + register_address(ctxt->ss_base, + _regs[VCPU_REGS_RSP]), + &dst.val, dst.bytes, ctxt)) != 0) diff --git a/queue-2.6.23/series b/queue-2.6.23/series index f60ca3a2e2c..7353d4bd089 100644 --- a/queue-2.6.23/series +++ b/queue-2.6.23/series @@ -14,3 +14,14 @@ i4l-fix-isdn_ioctl-memory-overrun-vulnerability.patch forcedeth-new-mcp79-pci-ids.patch forcedeth-boot-delay-fix.patch hrtimers-avoid-overflow-for-large-relative-timeouts.patch +kvm-x86-emulator-implement-movnti-mem-reg.patch +kvm-x86-emulator-fix-access-registers-for-instructions-with-modr-m-byte-and-mod-3.patch +kvm-x86-emulator-invd-instruction.patch +kvm-svm-intercept-the-invd-and-wbinvd-instructions.patch +kvm-x86-emulator-use-emulator_write_emulated-and-not-emulator_write_std.patch +kvm-fix-hang-on-uniprocessor.patch +kvm-svm-fix-fpu-leak-while-emulating-clts.patch +kvm-skip-pio-instruction-when-it-is-emulated-not-executed.patch +kvm-vmx-force-vm86-mode-if-setting-flags-during-real-mode.patch +kvm-vmx-reset-mmu-context-when-entering-real-mode.patch +x86-setup-add-a-near-jump-to-serialize-cr0-on-386-486.patch diff --git a/queue-2.6.23/x86-setup-add-a-near-jump-to-serialize-cr0-on-386-486.patch b/queue-2.6.23/x86-setup-add-a-near-jump-to-serialize-cr0-on-386-486.patch new file mode 100644 index 00000000000..50444f7968b --- /dev/null +++ b/queue-2.6.23/x86-setup-add-a-near-jump-to-serialize-cr0-on-386-486.patch @@ -0,0 +1,41 @@ +From 7ed192906a2144ebc8ca2925a85d27b9c5355668 Mon Sep 17 00:00:00 2001 +From: H. Peter Anvin +Date: Sun, 4 Nov 2007 17:50:12 -0800 +To: Michael Tokarev +Cc: linux-kernel@vger.kernel.org, stable@kernel.org +Subject: x86 setup: add a near jump to serialize %cr0 on 386/486 +Message-ID: <4750519C.2000907@zytor.com> + +From: H. Peter Anvin + +patch 7ed192906a2144ebc8ca2925a85d27b9c5355668 in mainline. + +The 386 and 486 needs a jump immediately after setting %cr0 in order +to serialize the pipeline. + +Signed-off-by: H. Peter Anvin +Signed-off-by: Greg Kroah-Hartman + +--- + arch/i386/boot/pmjump.S | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/arch/i386/boot/pmjump.S ++++ b/arch/i386/boot/pmjump.S +@@ -31,14 +31,14 @@ protected_mode_jump: + xorl %ebx, %ebx # Flag to indicate this is a boot + movl %edx, %esi # Pointer to boot_params table + movl %eax, 2f # Patch ljmpl instruction +- jmp 1f # Short jump to flush instruction q. + +-1: + movw $__BOOT_DS, %cx + + movl %cr0, %edx + orb $1, %dl # Protected mode (PE) bit + movl %edx, %cr0 ++ jmp 1f # Short jump to serialize on 386/486 ++1: + + movw %cx, %ds + movw %cx, %es