Shan, Haitao
2007-Jun-20 10:47 UTC
[Xen-devel] [Patch] Add NMI Injection and Pending Support in VMX
Currently, Xen does not support injecting an NMI to HVM guest OS. Adding this feature is necessary for those softwares which depend on NMI to function correctly, such as KDB and oprofile. The attached patch allows NMI to be injected to guest OS in NMIP capable platforms. It also enables to queue an NMI and then inject it as soon as possible. Signed-off-by: Haitao Shan <haitao.shan@intel.com> Signed-off-by: Eddie Dong <eddie.dong@intel.com> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> Please refer to the latest Intel SDM 3B (published in May, 2007): http://www.intel.com/products/processor/manuals/index.htm Best Regards Haitao Shan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Jun-20 11:47 UTC
[Xen-devel] Re: [Patch] Add NMI Injection and Pending Support in VMX
Please sync with 15388:50358c4b37f4, which adds NMI support (but doesn''t support the new Intel virtual-NMIs feature). -- Keir On 20/6/07 11:47, "Shan, Haitao" <haitao.shan@intel.com> wrote:> Currently, Xen does not support injecting an NMI to HVM guest OS. Adding > this > feature is necessary for those softwares which depend on NMI to function > correctly, > such as KDB and oprofile. > > The attached patch allows NMI to be injected to guest OS in NMIP capable > platforms. > It also enables to queue an NMI and then inject it as soon as possible. > > Signed-off-by: Haitao Shan <haitao.shan@intel.com> > Signed-off-by: Eddie Dong <eddie.dong@intel.com> > Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> > > Please refer to the latest Intel SDM 3B (published in May, 2007): > http://www.intel.com/products/processor/manuals/index.htm > > > Best Regards > Haitao Shan >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Shan, Haitao
2007-Jun-22 09:59 UTC
[Xen-devel] RE: [Patch] Add NMI Injection and Pending Support in VMX
Keir, The attached is the synced patch. Best Regards Haitao Shan -----Original Message----- From: Keir Fraser [mailto:keir@xensource.com] Sent: 2007年6月20日 19:48 To: Shan, Haitao; xen-devel@lists.xensource.com Cc: Dong, Eddie; Cui, Dexuan Subject: Re: [Patch] Add NMI Injection and Pending Support in VMX Please sync with 15388:50358c4b37f4, which adds NMI support (but doesn''t support the new Intel virtual-NMIs feature). -- Keir On 20/6/07 11:47, "Shan, Haitao" <haitao.shan@intel.com> wrote:> Currently, Xen does not support injecting an NMI to HVM guest OS. Adding > this > feature is necessary for those softwares which depend on NMI to function > correctly, > such as KDB and oprofile. > > The attached patch allows NMI to be injected to guest OS in NMIP capable > platforms. > It also enables to queue an NMI and then inject it as soon as possible. > > Signed-off-by: Haitao Shan <haitao.shan@intel.com> > Signed-off-by: Eddie Dong <eddie.dong@intel.com> > Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> > > Please refer to the latest Intel SDM 3B (published in May, 2007): > http://www.intel.com/products/processor/manuals/index.htm > > > Best Regards > Haitao Shan >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Jun-23 15:01 UTC
Re: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support in VMX
Thanks. It might take me a while to review this one since I''m travelling for the next week. On 22/6/07 10:59, "Shan, Haitao" <haitao.shan@intel.com> wrote:> Keir, > > The attached is the synced patch. > > Best Regards > Haitao Shan > > -----Original Message----- > From: Keir Fraser [mailto:keir@xensource.com] > Sent: 2007年6月20日 19:48 > To: Shan, Haitao; xen-devel@lists.xensource.com > Cc: Dong, Eddie; Cui, Dexuan > Subject: Re: [Patch] Add NMI Injection and Pending Support in VMX > > Please sync with 15388:50358c4b37f4, which adds NMI support (but doesn''t > support the new Intel virtual-NMIs feature). > > -- Keir > > On 20/6/07 11:47, "Shan, Haitao" <haitao.shan@intel.com> wrote: > >> Currently, Xen does not support injecting an NMI to HVM guest OS. Adding >> this >> feature is necessary for those softwares which depend on NMI to function >> correctly, >> such as KDB and oprofile. >> >> The attached patch allows NMI to be injected to guest OS in NMIP capable >> platforms. >> It also enables to queue an NMI and then inject it as soon as possible. >> >> Signed-off-by: Haitao Shan <haitao.shan@intel.com> >> Signed-off-by: Eddie Dong <eddie.dong@intel.com> >> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> >> >> Please refer to the latest Intel SDM 3B (published in May, 2007): >> http://www.intel.com/products/processor/manuals/index.htm >> >> >> Best Regards >> Haitao Shan >> > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Shan, Haitao
2007-Jul-03 14:35 UTC
RE: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support in VMX
Hi, Keir, I have modified my NMIP patch to follow your approach. Please review the attached patch. Thanks! Best Regards Haitao Shan -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Shan, Haitao Sent: 2007年6月22日 17:59 To: Keir Fraser; xen-devel@lists.xensource.com Cc: Dong, Eddie; Cui, Dexuan Subject: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support in VMX Keir, The attached is the synced patch. Best Regards Haitao Shan -----Original Message----- From: Keir Fraser [mailto:keir@xensource.com] Sent: 2007年6月20日 19:48 To: Shan, Haitao; xen-devel@lists.xensource.com Cc: Dong, Eddie; Cui, Dexuan Subject: Re: [Patch] Add NMI Injection and Pending Support in VMX Please sync with 15388:50358c4b37f4, which adds NMI support (but doesn''t support the new Intel virtual-NMIs feature). -- Keir On 20/6/07 11:47, "Shan, Haitao" <haitao.shan@intel.com> wrote:> Currently, Xen does not support injecting an NMI to HVM guest OS. Adding > this > feature is necessary for those softwares which depend on NMI to function > correctly, > such as KDB and oprofile. > > The attached patch allows NMI to be injected to guest OS in NMIP capable > platforms. > It also enables to queue an NMI and then inject it as soon as possible. > > Signed-off-by: Haitao Shan <haitao.shan@intel.com> > Signed-off-by: Eddie Dong <eddie.dong@intel.com> > Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> > > Please refer to the latest Intel SDM 3B (published in May, 2007): > http://www.intel.com/products/processor/manuals/index.htm > > > Best Regards > Haitao Shan >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Jul-03 17:48 UTC
Re: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support in VMX
Hi Haiato, Checked in as 15466:e6d5e4709466 (see http://xenbits.xensource.com/staging/xen-unstable.hg). But I ''fixed it'' in a number of ways. :-) So please take a look and see if you think I missed anything important. I particularly didn''t like your restructuring inside vmx_intr_assist() so I stripped that out. -- Keir On 3/7/07 15:35, "Shan, Haitao" <haitao.shan@intel.com> wrote:> Hi, Keir, > > I have modified my NMIP patch to follow your approach. > Please review the attached patch. Thanks! > > Best Regards > Haitao Shan > > -----Original Message----- > From: xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Shan, Haitao > Sent: 2007年6月22日 17:59 > To: Keir Fraser; xen-devel@lists.xensource.com > Cc: Dong, Eddie; Cui, Dexuan > Subject: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support in VMX > > Keir, > > The attached is the synced patch. > > Best Regards > Haitao Shan > > -----Original Message----- > From: Keir Fraser [mailto:keir@xensource.com] > Sent: 2007年6月20日 19:48 > To: Shan, Haitao; xen-devel@lists.xensource.com > Cc: Dong, Eddie; Cui, Dexuan > Subject: Re: [Patch] Add NMI Injection and Pending Support in VMX > > Please sync with 15388:50358c4b37f4, which adds NMI support (but doesn''t > support the new Intel virtual-NMIs feature). > > -- Keir > > On 20/6/07 11:47, "Shan, Haitao" <haitao.shan@intel.com> wrote: > >> Currently, Xen does not support injecting an NMI to HVM guest OS. Adding >> this >> feature is necessary for those softwares which depend on NMI to function >> correctly, >> such as KDB and oprofile. >> >> The attached patch allows NMI to be injected to guest OS in NMIP capable >> platforms. >> It also enables to queue an NMI and then inject it as soon as possible. >> >> Signed-off-by: Haitao Shan <haitao.shan@intel.com> >> Signed-off-by: Eddie Dong <eddie.dong@intel.com> >> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> >> >> Please refer to the latest Intel SDM 3B (published in May, 2007): >> http://www.intel.com/products/processor/manuals/index.htm >> >> >> Best Regards >> Haitao Shan >> > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Shan, Haitao
2007-Jul-04 02:42 UTC
RE: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support in VMX
Hi, Keir Thanks! The patch is much more clean. But I have a little questions. 1> If we do have IDT vectoring occurs, and at the same time, a NMI or irq is pending, should we better do a check to enable_intr_window instead of just return? if ( (idtv_info_field&INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI ) __vmwrite(GUEST_INTERRUPTIBILITY_INFO, __vmread(GUEST_INTERRUPTIBILITY_INFO) & ~VMX_INTR_SHADOW_NMI); HVM_DBG_LOG(DBG_LEVEL_1, "idtv_info_field=%x", idtv_info_field); return; Best Regards Haitao Shan -----Original Message----- From: Keir Fraser [mailto:keir@xensource.com] Sent: 2007年7月4日 1:49 To: Shan, Haitao; xen-devel@lists.xensource.com Cc: Li, Susie; Li, Xin B; Dong, Eddie; Cui, Dexuan Subject: Re: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support in VMX Hi Haiato, Checked in as 15466:e6d5e4709466 (see http://xenbits.xensource.com/staging/xen-unstable.hg). But I ''fixed it'' in a number of ways. :-) So please take a look and see if you think I missed anything important. I particularly didn''t like your restructuring inside vmx_intr_assist() so I stripped that out. -- Keir On 3/7/07 15:35, "Shan, Haitao" <haitao.shan@intel.com> wrote:> Hi, Keir, > > I have modified my NMIP patch to follow your approach. > Please review the attached patch. Thanks! > > Best Regards > Haitao Shan > > -----Original Message----- > From: xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Shan, Haitao > Sent: 2007年6月22日 17:59 > To: Keir Fraser; xen-devel@lists.xensource.com > Cc: Dong, Eddie; Cui, Dexuan > Subject: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support in VMX > > Keir, > > The attached is the synced patch. > > Best Regards > Haitao Shan > > -----Original Message----- > From: Keir Fraser [mailto:keir@xensource.com] > Sent: 2007年6月20日 19:48 > To: Shan, Haitao; xen-devel@lists.xensource.com > Cc: Dong, Eddie; Cui, Dexuan > Subject: Re: [Patch] Add NMI Injection and Pending Support in VMX > > Please sync with 15388:50358c4b37f4, which adds NMI support (but doesn''t > support the new Intel virtual-NMIs feature). > > -- Keir > > On 20/6/07 11:47, "Shan, Haitao" <haitao.shan@intel.com> wrote: > >> Currently, Xen does not support injecting an NMI to HVM guest OS. Adding >> this >> feature is necessary for those softwares which depend on NMI to function >> correctly, >> such as KDB and oprofile. >> >> The attached patch allows NMI to be injected to guest OS in NMIP capable >> platforms. >> It also enables to queue an NMI and then inject it as soon as possible. >> >> Signed-off-by: Haitao Shan <haitao.shan@intel.com> >> Signed-off-by: Eddie Dong <eddie.dong@intel.com> >> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> >> >> Please refer to the latest Intel SDM 3B (published in May, 2007): >> http://www.intel.com/products/processor/manuals/index.htm >> >> >> Best Regards >> Haitao Shan >> > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Shan, Haitao
2007-Jul-04 04:44 UTC
RE: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support inVMX
Sorry, I missed one question. See blow. Best Regards Haitao Shan -----Original Message----- From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Shan, Haitao Sent: 2007年7月4日 10:42 To: Keir Fraser; xen-devel@lists.xensource.com Cc: Dong, Eddie; Li, Susie; Li, Xin B; Cui, Dexuan Subject: RE: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support inVMX Hi, Keir Thanks! The patch is much more clean. But I have a little questions. 1> If we do have IDT vectoring occurs, and at the same time, a NMI or irq is pending, should we better do a check to enable_intr_window instead of just return? if ( (idtv_info_field&INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI ) __vmwrite(GUEST_INTERRUPTIBILITY_INFO, __vmread(GUEST_INTERRUPTIBILITY_INFO) & ~VMX_INTR_SHADOW_NMI); HVM_DBG_LOG(DBG_LEVEL_1, "idtv_info_field=%x", idtv_info_field); return; -----------------------------The second question is here---------------- 2> In enable_intr_window, if it is an NMI, then change intr_shadow from blocking_by_sti to blocking_by_movss if there is such case. But the intr_shadow is not written back to VMCS. Why should we do so? Best Regards Haitao Shan -----Original Message----- From: Keir Fraser [mailto:keir@xensource.com] Sent: 2007年7月4日 1:49 To: Shan, Haitao; xen-devel@lists.xensource.com Cc: Li, Susie; Li, Xin B; Dong, Eddie; Cui, Dexuan Subject: Re: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support in VMX Hi Haiato, Checked in as 15466:e6d5e4709466 (see http://xenbits.xensource.com/staging/xen-unstable.hg). But I ''fixed it'' in a number of ways. :-) So please take a look and see if you think I missed anything important. I particularly didn''t like your restructuring inside vmx_intr_assist() so I stripped that out. -- Keir On 3/7/07 15:35, "Shan, Haitao" <haitao.shan@intel.com> wrote:> Hi, Keir, > > I have modified my NMIP patch to follow your approach. > Please review the attached patch. Thanks! > > Best Regards > Haitao Shan > > -----Original Message----- > From: xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of Shan, Haitao > Sent: 2007年6月22日 17:59 > To: Keir Fraser; xen-devel@lists.xensource.com > Cc: Dong, Eddie; Cui, Dexuan > Subject: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support in VMX > > Keir, > > The attached is the synced patch. > > Best Regards > Haitao Shan > > -----Original Message----- > From: Keir Fraser [mailto:keir@xensource.com] > Sent: 2007年6月20日 19:48 > To: Shan, Haitao; xen-devel@lists.xensource.com > Cc: Dong, Eddie; Cui, Dexuan > Subject: Re: [Patch] Add NMI Injection and Pending Support in VMX > > Please sync with 15388:50358c4b37f4, which adds NMI support (but doesn''t > support the new Intel virtual-NMIs feature). > > -- Keir > > On 20/6/07 11:47, "Shan, Haitao" <haitao.shan@intel.com> wrote: > >> Currently, Xen does not support injecting an NMI to HVM guest OS. Adding >> this >> feature is necessary for those softwares which depend on NMI to function >> correctly, >> such as KDB and oprofile. >> >> The attached patch allows NMI to be injected to guest OS in NMIP capable >> platforms. >> It also enables to queue an NMI and then inject it as soon as possible. >> >> Signed-off-by: Haitao Shan <haitao.shan@intel.com> >> Signed-off-by: Eddie Dong <eddie.dong@intel.com> >> Signed-off-by: Dexuan Cui <dexuan.cui@intel.com> >> >> Please refer to the latest Intel SDM 3B (published in May, 2007): >> http://www.intel.com/products/processor/manuals/index.htm >> >> >> Best Regards >> Haitao Shan >> > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Jul-04 09:32 UTC
Re: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support inVMX
On 4/7/07 05:44, "Shan, Haitao" <haitao.shan@intel.com> wrote:> 1> If we do have IDT vectoring occurs, and at the same time, a NMI or irq is > pending, should we better do a check to enable_intr_window instead of just > return? > if ( (idtv_info_field&INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI ) > __vmwrite(GUEST_INTERRUPTIBILITY_INFO, > __vmread(GUEST_INTERRUPTIBILITY_INFO) & > ~VMX_INTR_SHADOW_NMI); > HVM_DBG_LOG(DBG_LEVEL_1, "idtv_info_field=%x", idtv_info_field); > return;That case does include a call to enable_intr_window(), immediately before the code you quote. Did you miss that?> -----------------------------The second question is here---------------- > 2> In enable_intr_window, if it is an NMI, then change intr_shadow from > blocking_by_sti to blocking_by_movss if there is such case. But the > intr_shadow is not written back to VMCS. Why should we do so?This is a stupid mistake on my part. I''ll fix it. Thanks, Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Shan, Haitao
2007-Jul-04 09:39 UTC
RE: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support inVMX
Keir, thanks! It is my fault that I did not notice that piece of code. Best Regards Haitao Shan -----Original Message----- From: Keir Fraser [mailto:keir@xensource.com] Sent: 2007年7月4日 17:32 To: Shan, Haitao; xen-devel@lists.xensource.com Cc: Li, Xin B; Li, Susie; Dong, Eddie; Cui, Dexuan Subject: Re: [Xen-devel] RE: [Patch] Add NMI Injection and Pending Support inVMX On 4/7/07 05:44, "Shan, Haitao" <haitao.shan@intel.com> wrote:> 1> If we do have IDT vectoring occurs, and at the same time, a NMI or irq is > pending, should we better do a check to enable_intr_window instead of just > return? > if ( (idtv_info_field&INTR_INFO_INTR_TYPE_MASK) == INTR_TYPE_NMI ) > __vmwrite(GUEST_INTERRUPTIBILITY_INFO, > __vmread(GUEST_INTERRUPTIBILITY_INFO) & > ~VMX_INTR_SHADOW_NMI); > HVM_DBG_LOG(DBG_LEVEL_1, "idtv_info_field=%x", idtv_info_field); > return;That case does include a call to enable_intr_window(), immediately before the code you quote. Did you miss that?> -----------------------------The second question is here---------------- > 2> In enable_intr_window, if it is an NMI, then change intr_shadow from > blocking_by_sti to blocking_by_movss if there is such case. But the > intr_shadow is not written back to VMCS. Why should we do so?This is a stupid mistake on my part. I''ll fix it. Thanks, Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Reasonably Related Threads
- [PATCH] Dom0-kernel: Fix buggy mask_base in saving/restoring MSI-X table during S3
- [PATCH] Add MSI-X support to HVM domain
- [PATCH 1/4] CPU online/offline support in Xen
- [PATCH] Enable Core 2 Duo Performance Counters in HVM guest
- [PATCH][RFC]Move PCI Configuration Spaces from Dom0 to Xen