From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kenji Kaneshige Subject: Re: [PATCH 1/2] seabios: Add Local APIC NMI Structure to ACPI MADT Date: Fri, 28 Oct 2011 21:08:18 +0900 Message-ID: <4EAA9B32.10706@jp.fujitsu.com> References: <20110913093835.GB4265@localhost.localdomain> <20110914093441.e2bb305c.kamezawa.hiroyu@jp.fujitsu.com> <4E705BC3.5000508@cn.fujitsu.com> <20110915164704.9cacd407.kamezawa.hiroyu@jp.fujitsu.com> <4E71B28F.7030201@cn.fujitsu.com> <4E72F3BA.2000603@jp.fujitsu.com> <4E73200A.7040908@jp.fujitsu.com> <4E76C6AA.9080403@cn.fujitsu.com> <4E7B04DC.1030407@cn.fujitsu.com> <4E7B4B8F.507@siemens.com> <4E7C51E4.2000503@cn.fujitsu.com> <4E7F3585.40108@redhat.com> <4E7F635E.6080009@web.de> <4E8035F9.9080908@redhat.com> <4E928B59.2060906@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit Cc: Lai Jiangshan , KAMEZAWA Hiroyuki , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" , seabios@seabios.org, kevin@koconnor.net, gleb@redhat.com To: Avi Kivity , Jan Kiszka Return-path: Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:35937 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932428Ab1J1MJ1 (ORCPT ); Fri, 28 Oct 2011 08:09:27 -0400 Received: from m1.gw.fujitsu.co.jp (unknown [10.0.50.71]) by fgwmail6.fujitsu.co.jp (Postfix) with ESMTP id 2B3033EE0BB for ; Fri, 28 Oct 2011 21:09:26 +0900 (JST) Received: from smail (m1 [127.0.0.1]) by outgoing.m1.gw.fujitsu.co.jp (Postfix) with ESMTP id 0C1B345DE58 for ; Fri, 28 Oct 2011 21:09:26 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (s1.gw.fujitsu.co.jp [10.0.50.91]) by m1.gw.fujitsu.co.jp (Postfix) with ESMTP id DEFC645DE56 for ; Fri, 28 Oct 2011 21:09:25 +0900 (JST) Received: from s1.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id CEE7F1DB8044 for ; Fri, 28 Oct 2011 21:09:25 +0900 (JST) Received: from ml13.s.css.fujitsu.com (ml13.s.css.fujitsu.com [10.240.81.133]) by s1.gw.fujitsu.co.jp (Postfix) with ESMTP id 8D4F41DB804B for ; Fri, 28 Oct 2011 21:09:25 +0900 (JST) In-Reply-To: <4E928B59.2060906@cn.fujitsu.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi, Jan, Could you comment on these patches? Inject-NMI doesn't work on Windows guest without these patches. Windows seems to setup LVT based on ACPI NMI structure information which is missing in current seabios. LVT LINT1 are never unmasked by Windows guest without the patches. Those patches were already reviewed by seabios people, but need ack from qemu/kvm side. Regards, Kenji Kaneshige (2011/10/10 15:06), Lai Jiangshan wrote: > From: Kenji Kaneshige > > ACPI NMI Structure describes LINT pin (LINT0 or LINT1) information to > which NMI is connected, and it is needed by OS to initialize local APIC. > > Signed-off-by: Kenji Kaneshige > Reviewed-by: Lai Jiangshan > --- > src/acpi.c | 22 ++++++++++++++++++++-- > 1 file changed, 20 insertions(+), 2 deletions(-) > > Index: seabios/src/acpi.c > =================================================================== > --- seabios.orig/src/acpi.c > +++ seabios/src/acpi.c > @@ -134,6 +134,14 @@ struct madt_intsrcovr { > u16 flags; > } PACKED; > > +struct madt_local_nmi { > + ACPI_SUB_HEADER_DEF > + u8 processor_id; /* ACPI processor id */ > + u16 flags; /* MPS INTI flags */ > + u8 lint; /* Local APIC LINT# */ > +} PACKED; > + > + > /* > * ACPI 2.0 Generic Address Space definition. > */ > @@ -288,7 +296,9 @@ build_madt(void) > int madt_size = (sizeof(struct multiple_apic_table) > + sizeof(struct madt_processor_apic) * MaxCountCPUs > + sizeof(struct madt_io_apic) > - + sizeof(struct madt_intsrcovr) * 16); > + + sizeof(struct madt_intsrcovr) * 16 > + + sizeof(struct madt_local_nmi)); > + > struct multiple_apic_table *madt = malloc_high(madt_size); > if (!madt) { > warn_noalloc(); > @@ -340,7 +350,15 @@ build_madt(void) > intsrcovr++; > } > > - build_header((void*)madt, APIC_SIGNATURE, (void*)intsrcovr - (void*)madt, 1); > + struct madt_local_nmi *local_nmi = (void*)intsrcovr; > + local_nmi->type = APIC_LOCAL_NMI; > + local_nmi->length = sizeof(*local_nmi); > + local_nmi->processor_id = 0xff; /* all processors */ > + local_nmi->flags = 0; > + local_nmi->lint = 1; /* LINT1 */ > + local_nmi++; > + > + build_header((void*)madt, APIC_SIGNATURE, (void*)local_nmi - (void*)madt, 1); > return madt; > } > > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > >