<?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 How to invalidate cache with EPT after modifying memory? in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/How-to-invalidate-cache-with-EPT-after-modifying-memory/m-p/994677#M3455</link>
    <description>&lt;P&gt;I'm trying to narrow down some odd behavior.&amp;nbsp; I configured our hypervisor to catch 0xb faults for disabled interrupts. Then enable the interrupt, but mark the EPT page the IDT vector points at as unreadable.&amp;nbsp; I resume execution which clears the interrupt stack and then throws an ept violation. I then flip the state disabling the interrupt i'm trying and finally&amp;nbsp;re-enable the ept page of the vector and resume execution.&amp;nbsp;&amp;nbsp; Everything works well in bochs.&lt;/P&gt;
&lt;P&gt;However, when I go to test on our Nehalem processor it loops through the hypervisor randomly&amp;nbsp;multiple times, successfully!&amp;nbsp;Sometimes it&amp;nbsp;loops through just once, as it should, other times it runs the code 10-12 times.&amp;nbsp;&amp;nbsp;Unfortunately each loop through increments a counter skewing our results.&amp;nbsp; It appears as if the instruction&amp;nbsp;has been cached in some way and doesn't use the current version in memory until an update several&amp;nbsp;into the cache. &amp;nbsp;I am wondering&amp;nbsp;if I have mis-configured the cache and it's running off an old version of memory. I've tried to issue and WBINVD, CPUID, read CR3, and disabled caching of the EPT pages and structures.&amp;nbsp;&amp;nbsp;&amp;nbsp; Have i missed something?&lt;/P&gt;
&lt;P&gt;To put the question specifically: what operations do I have to do to invalidate cached mappings (that I might have missed above) to clear the cache when the hypervisor modifies a&amp;nbsp;guest's memory via its ept pages?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Sep 2012 15:15:19 GMT</pubDate>
    <dc:creator>steven765</dc:creator>
    <dc:date>2012-09-26T15:15:19Z</dc:date>
    <item>
      <title>How to invalidate cache with EPT after modifying memory?</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/How-to-invalidate-cache-with-EPT-after-modifying-memory/m-p/994677#M3455</link>
      <description>&lt;P&gt;I'm trying to narrow down some odd behavior.&amp;nbsp; I configured our hypervisor to catch 0xb faults for disabled interrupts. Then enable the interrupt, but mark the EPT page the IDT vector points at as unreadable.&amp;nbsp; I resume execution which clears the interrupt stack and then throws an ept violation. I then flip the state disabling the interrupt i'm trying and finally&amp;nbsp;re-enable the ept page of the vector and resume execution.&amp;nbsp;&amp;nbsp; Everything works well in bochs.&lt;/P&gt;
&lt;P&gt;However, when I go to test on our Nehalem processor it loops through the hypervisor randomly&amp;nbsp;multiple times, successfully!&amp;nbsp;Sometimes it&amp;nbsp;loops through just once, as it should, other times it runs the code 10-12 times.&amp;nbsp;&amp;nbsp;Unfortunately each loop through increments a counter skewing our results.&amp;nbsp; It appears as if the instruction&amp;nbsp;has been cached in some way and doesn't use the current version in memory until an update several&amp;nbsp;into the cache. &amp;nbsp;I am wondering&amp;nbsp;if I have mis-configured the cache and it's running off an old version of memory. I've tried to issue and WBINVD, CPUID, read CR3, and disabled caching of the EPT pages and structures.&amp;nbsp;&amp;nbsp;&amp;nbsp; Have i missed something?&lt;/P&gt;
&lt;P&gt;To put the question specifically: what operations do I have to do to invalidate cached mappings (that I might have missed above) to clear the cache when the hypervisor modifies a&amp;nbsp;guest's memory via its ept pages?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2012 15:15:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/How-to-invalidate-cache-with-EPT-after-modifying-memory/m-p/994677#M3455</guid>
      <dc:creator>steven765</dc:creator>
      <dc:date>2012-09-26T15:15:19Z</dc:date>
    </item>
  </channel>
</rss>

