Re: [PATCH] Fix writing back APIC reset to inkernel APIC

Dong, Eddie
2007-11-02T03:07:24Z

[-- Attachment #1.1: Type: text/plain, Size: 2742 bytes --]

Yes, when reseting, we need to reset both APIC/PIC/IOAPIC and pv
driver in future, and also VCPU.

But isn't apic_reset a pure user level APIC thing?

BTW

I posted a patch to support kernel device reset which is still pending.
And I think Avi has some idea to support too and is working on:-)
Eddie

________________________________

From: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Dor Laor
Sent: 2007年11月2日 7:02
To: Markus Rechberger
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org; Joerg.Roedel-5C7GfCeVMHo@public.gmane.org
Subject: Re: [kvm-devel] [PATCH] Fix writing back APIC reset to inkernel APIC

Markus Rechberger wrote:

This patch synchronises the APIC reset with the inkernel implementation which fixes the reboot issues which can be seen with Linux and Windows.

Signed-off-by: Joerg Roedel <joerg.roedel-5C7GfCeVMHo@public.gmane.org> <mailto:joerg.roedel-5C7GfCeVMHo@public.gmane.org>
Signed-off-by: Markus Rechberger <markus.rechberger-5C7GfCeVMHo@public.gmane.org> <mailto:markus.rechberger-5C7GfCeVMHo@public.gmane.org>

________________________________

diff --git a/qemu/hw/apic.c b/qemu/hw/apic.c
index 2011247..60d31fa 100644
--- a/qemu/hw/apic.c
+++ b/qemu/hw/apic.c
@@ -930,6 +930,13 @@ static void apic_reset(void *opaque)
* processor when local APIC is enabled.
*/
s->lvt[APIC_LVT_LINT0] = 0x700;
+#ifdef USE_KVM
+#ifdef KVM_CAP_IRQCHIP
+ if (kvm_allowed && kvm_irqchip_in_kernel(kvm_context)) {
+ kvm_kernel_lapic_load_from_user(s);
+ }
+#endif
+#endif
}

In general your approach might work but there are some inconsistencies - there is kvm_apic_reset
in the kernel too. We can either drop it and use your load method or add an apic-reset ioctl.
Eddie/Avi which approach do you think is better?
There is also the ioapic who should get reset too.
Thanks,
Dor.

static CPUReadMemoryFunc *apic_mem_read[3] = {

-------------------------------------------------------------------------
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/

________________________________

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

[-- Attachment #1.2: Type: text/html, Size: 5592 bytes --]

[-- Attachment #2: Type: text/plain, Size: 314 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 #3: Type: text/plain, Size: 186 bytes --]