<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic NMIs During Exit Processing in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/NMIs-During-Exit-Processing/m-p/1146904#M78478</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have written a simple VMM that executes a small program under VTx. Everything is working fine with the exception of one item, if I receive an NMI while running the code that executes after the vmexit, the system crashes (this is on Windows). The issue is that before calling vmlaunch/vmresume I perform some modifications to the host state such as setting IA32_LSTAR msr to facilitate the code running under VTx as well as restoring register state, etc for the code to continue executing.&lt;/P&gt;

&lt;P&gt;I am guessing the issue is that I have not fully restored the host to a state where the NMI can be processed and my code returned to successfully. So my question is how do I ensure that I can successfully perform all the necessary changes to get the host back to a working state before I receive an NMI?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Pete&lt;/P&gt;</description>
    <pubDate>Wed, 25 Oct 2017 17:59:42 GMT</pubDate>
    <dc:creator>Peter_S_1</dc:creator>
    <dc:date>2017-10-25T17:59:42Z</dc:date>
    <item>
      <title>NMIs During Exit Processing</title>
      <link>https://community.intel.com/t5/Software-Archive/NMIs-During-Exit-Processing/m-p/1146904#M78478</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have written a simple VMM that executes a small program under VTx. Everything is working fine with the exception of one item, if I receive an NMI while running the code that executes after the vmexit, the system crashes (this is on Windows). The issue is that before calling vmlaunch/vmresume I perform some modifications to the host state such as setting IA32_LSTAR msr to facilitate the code running under VTx as well as restoring register state, etc for the code to continue executing.&lt;/P&gt;

&lt;P&gt;I am guessing the issue is that I have not fully restored the host to a state where the NMI can be processed and my code returned to successfully. So my question is how do I ensure that I can successfully perform all the necessary changes to get the host back to a working state before I receive an NMI?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Pete&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 17:59:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/NMIs-During-Exit-Processing/m-p/1146904#M78478</guid>
      <dc:creator>Peter_S_1</dc:creator>
      <dc:date>2017-10-25T17:59:42Z</dc:date>
    </item>
    <item>
      <title>Found a couple of links</title>
      <link>https://community.intel.com/t5/Software-Archive/NMIs-During-Exit-Processing/m-p/1146905#M78479</link>
      <description>&lt;P&gt;Found a couple of links related to VM entry and exit that may provide some hints for you:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://compas.cs.stonybrook.edu/~nhonarmand/courses/fa14/cse506.2/slides/VMs-Zhen_and_Heyi.pdf" rel="nofollow"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="https://compas.cs.stonybrook.edu/~nhonarmand/courses/fa14/cse506.2/slides/VMs-Zhen_and_Heyi.pdf" target="_blank"&gt;https://compas.cs.stonybrook.edu/~nhonarmand/courses/fa14/cse506.2/slides/VMs-Zhen_and_Heyi.pdf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://www.codeproject.com/Articles/215458/Virtualization-for-System-Programmers" rel="nofollow"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="https://www.codeproject.com/Articles/215458/Virtualization-for-System-Programmers" target="_blank"&gt;https://www.codeproject.com/Articles/215458/Virtualization-for-System-Programmers&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.cs.nthu.edu.tw/~ychung/slides/Virtualization/Intel%20VT.pptx" rel="nofollow"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="http://www.cs.nthu.edu.tw/~ychung/slides/Virtualization/Intel%20VT.pptx" target="_blank"&gt;http://www.cs.nthu.edu.tw/~ychung/slides/Virtualization/Intel%20VT.pptx&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://01.org/blogs/2014/virtualization-advances-performance-efficiency-and-data-protection" rel="nofollow"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;A href="https://01.org/blogs/2014/virtualization-advances-performance-efficiency-and-data-protection" target="_blank"&gt;https://01.org/blogs/2014/virtualization-advances-performance-efficiency-and-data-protection&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;-Thai&lt;/P&gt;</description>
      <pubDate>Wed, 21 Mar 2018 21:06:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/NMIs-During-Exit-Processing/m-p/1146905#M78479</guid>
      <dc:creator>Quoc-Thai_L_Intel</dc:creator>
      <dc:date>2018-03-21T21:06:10Z</dc:date>
    </item>
    <item>
      <title>One thing to consider is that</title>
      <link>https://community.intel.com/t5/Software-Archive/NMIs-During-Exit-Processing/m-p/1146906#M78480</link>
      <description>&lt;P&gt;One thing to consider is that you shouldn't be thinking about it like "how should i get back to the host state before i receive an NMI" it should be "how should I handle the NMI i receive when in various states".&amp;nbsp;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If you have a full OS running in the VM and you don't care to emulate anything / capture any information from the NMI, you may just not want to exit for the NMI.&amp;nbsp; If you don't you'll have to exit and let the Host OS handle the NMI - see "24.6.1 Pin-Based VM-Execution Controls", specifically for the&amp;nbsp;NMI exiting control bit.&lt;/P&gt;

&lt;P&gt;Then you'll need to handle the VM Exit appropriately from there.&amp;nbsp; Edit: If the error is in this state (VMX Root operation), and you've created a bad host state for NMI processing, make sure your IRQ levels are correct and that you're restoring host state correctly *during VM exit* (not manually after the exit occurs).&lt;/P&gt;

&lt;P&gt;Don't manually change MSR's the host requires for proper execution, there is a VMCS areas for doing this ([Entry|Exit] [Host|Guest] [Save|Load] MSR areas).&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Apr 2018 16:01:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/NMIs-During-Exit-Processing/m-p/1146906#M78480</guid>
      <dc:creator>Gregory</dc:creator>
      <dc:date>2018-04-06T16:01:00Z</dc:date>
    </item>
    <item>
      <title>Good Idea.</title>
      <link>https://community.intel.com/t5/Software-Archive/NMIs-During-Exit-Processing/m-p/1146907#M78481</link>
      <description>&lt;P&gt;Good Idea.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Apr 2018 09:42:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/NMIs-During-Exit-Processing/m-p/1146907#M78481</guid>
      <dc:creator>hood__ryan</dc:creator>
      <dc:date>2018-04-09T09:42:51Z</dc:date>
    </item>
  </channel>
</rss>

