From f7b496f8ad7ed706f8344f3ca3dff6b490b6fa47 Mon Sep 17 00:00:00 2001 From: Eduardo Habkost <ehabkost@redhat.com> Date: Mon, 9 Mar 2009 14:44:44 -0300 Subject: [PATCH 2/2] TPR patching: instruction_is_ok(): fix virtual address checking The check for the RIP on instruction_is_ok() has been broken by commit 406b88a0d537c28b65a9ff015b4e0e91c5425a27 ("set pci mem to start at 0xc100000 and vesa to 0xc000000"). The BIOS changes shouldn't influence the virtual address mapings on Windows, so I am simply restoring exactly the line that was used before the PCI hole patch. Bugzilla: 483494 Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Gleb Natapov <gleb@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> --- qemu/kvm-tpr-opt.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu/kvm-tpr-opt.c b/qemu/kvm-tpr-opt.c index bbdeefb..b3d26aa 100644 --- a/qemu/kvm-tpr-opt.c +++ b/qemu/kvm-tpr-opt.c @@ -142,7 +142,7 @@ static int instruction_is_ok(CPUState *env, uint64_t rip, int is_write) uint32_t addr; uint64_t p; - if ((rip & 0xc1000000) != 0x80000000 && (rip & 0xc1000000) != 0xc0000000) + if ((rip & 0xf0000000) != 0x80000000 && (rip & 0xf0000000) != 0xe0000000) return 0; if (kvm_rsp_read(env) == 0) return 0; -- 1.6.1