Re: [PATCH][lapic5] kvm: qemu: prevent set wrong cr8 whenusing irqchip

He, Qing
2007-08-17T06:49:56Z

[-- Attachment #1: Type: text/plain, Size: 2031 bytes --]

I'm updating this patch, by doing this, UP booting of 32bit ACPI MP HAL Windows is fixed.

Signed-off-by: Qing He <qing.he-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

qemu/qemu-kvm.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index 3fc32f7..d07af9f 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -516,10 +516,11 @@ static int pre_kvm_run(void *opaque, int vcpu)
usleep(1000);
pthread_mutex_lock(&qemu_mutex);
}
-
- kvm_set_cr8(kvm_context, vcpu, cpu_get_apic_tpr(env));
- if (env->interrupt_request & CPU_INTERRUPT_EXIT)
- return 1;
+ if (!kvm_irqchip) {
+ kvm_set_cr8(kvm_context, vcpu, cpu_get_apic_tpr(env));
+ if (env->interrupt_request & CPU_INTERRUPT_EXIT)
+ return 1;
+ }
pthread_mutex_unlock(&qemu_mutex);
return 0;
}

>-----Original Message-----
>From: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>[mailto:kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Yang, Sheng
>Sent: 2007年8月16日 22:13
>To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
>Subject: [kvm-devel] [PATCH][lapic5] kvm: qemu: prevent set wrong cr8 whenusing
>irqchip
>
>this allows running 64-bit Windows.
>
>Signed-off-by: Sheng Yang <sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
>---
> qemu/qemu-kvm.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
>index 3fc32f7..af7b1d8 100644
>--- a/qemu/qemu-kvm.c
>+++ b/qemu/qemu-kvm.c
>@@ -516,8 +516,8 @@ static int pre_kvm_run(void *opaque, int vcpu)
> usleep(1000);
> pthread_mutex_lock(&qemu_mutex);
> }
>-
>- kvm_set_cr8(kvm_context, vcpu, cpu_get_apic_tpr(env));
>+ if (!kvm_irqchip)
>+ kvm_set_cr8(kvm_context, vcpu, cpu_get_apic_tpr(env));
> if (env->interrupt_request & CPU_INTERRUPT_EXIT)
> return 1;
> pthread_mutex_unlock(&qemu_mutex);
>--
>1.5.2

[-- Attachment #2: kvm-qemu-irqchip-checking.patch --]
[-- Type: application/octet-stream, Size: 679 bytes --]

qemu/qemu-kvm.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c
index 3fc32f7..d07af9f 100644
--- a/qemu/qemu-kvm.c
+++ b/qemu/qemu-kvm.c
@@ -516,10 +516,11 @@ static int pre_kvm_run(void *opaque, int vcpu)
usleep(1000);
pthread_mutex_lock(&qemu_mutex);
}
-
- kvm_set_cr8(kvm_context, vcpu, cpu_get_apic_tpr(env));
- if (env->interrupt_request & CPU_INTERRUPT_EXIT)
- return 1;
+ if (!kvm_irqchip) {
+ kvm_set_cr8(kvm_context, vcpu, cpu_get_apic_tpr(env));
+ if (env->interrupt_request & CPU_INTERRUPT_EXIT)
+ return 1;
+ }
pthread_mutex_unlock(&qemu_mutex);
return 0;
}

[-- Attachment #3: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]