<?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 &amp;gt;&amp;gt;&amp;gt;Perhaps there is a bug in in Intel® ISA Extensions</title>
    <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957489#M4276</link>
    <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;Perhaps there is a bug in ACPI.sys that is returning an incorrect access method for this particular CPU&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;Why ACPI.sys? your code is accessing directly MSR register.&lt;/P&gt;</description>
    <pubDate>Sun, 03 Mar 2013 08:45:36 GMT</pubDate>
    <dc:creator>Bernard</dc:creator>
    <dc:date>2013-03-03T08:45:36Z</dc:date>
    <item>
      <title>IA32_PERF_CTL  on X64 error</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957475#M4262</link>
      <description>&lt;P&gt;I have a problem using wrmsr IA32_PERF_CTL,&amp;nbsp; in kernel space I get a STATUS_PRIVILEGED_INSTRUCTION exception and Windbg, which has&amp;nbsp;a wrmsr function, reports "no such msr".&amp;nbsp; This is on an i5-2410M&amp;nbsp; CPU.&lt;/P&gt;
&lt;P&gt;The same code and Windbg do not generate errors on another test platform.&amp;nbsp; What could be the cause of this?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way rdmsr IA32_PERF_STS&amp;nbsp; works OK on both platforms.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2013 16:56:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957475#M4262</guid>
      <dc:creator>Matt_S_3</dc:creator>
      <dc:date>2013-02-28T16:56:17Z</dc:date>
    </item>
    <item>
      <title>Hi Matt</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957476#M4263</link>
      <description>&lt;P&gt;Hi Matt&lt;/P&gt;
&lt;P&gt;Try to access that MSR register by passing its address in ecx.Try to locate this MSR register address and access it with the help of windbg.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2013 17:25:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957476#M4263</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-02-28T17:25:00Z</dc:date>
    </item>
    <item>
      <title>The address of IA_PERF_CTL is</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957477#M4264</link>
      <description>&lt;P&gt;The address of IA_PERF_CTL is 0x199.Try to access this register by its address.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2013 17:46:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957477#M4264</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-02-28T17:46:25Z</dc:date>
    </item>
    <item>
      <title>Obviously IA_PERF_CTRL is a</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957478#M4265</link>
      <description>&lt;P&gt;Obviously IA_PERF_CTRL is a define and has the value 0x199 and obviously this value is passed in ecx otherwise it wouldnt have worked on the other platform.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2013 08:29:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957478#M4265</guid>
      <dc:creator>Matt_S_3</dc:creator>
      <dc:date>2013-03-01T08:29:00Z</dc:date>
    </item>
    <item>
      <title>Can you access this register</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957479#M4266</link>
      <description>&lt;P&gt;Can you access&amp;nbsp;other MSR&amp;nbsp;registers from within Windbg?STATUS_PRIVILEDGED_INSTRUCTION exception should not be returned unless your code is not executing in ring0.Can you issue an breakpoint on 0x199 MSR access?There is also a possibility to debug debugger.I do not know if this can be achieved with kernel mode debugger but this is very often done with the user mode debugger with the command .dbgdbg.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2013 09:30:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957479#M4266</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-03-01T09:30:00Z</dc:date>
    </item>
    <item>
      <title>Yes, the rdmsr 198 call works</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957480#M4267</link>
      <description>&lt;P&gt;Yes, the rdmsr 198 call works, both in my code and in windbg. I havent tried writing to any other MSRs with windbg, but it is an interesting suggestion.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;This code is in a driver and thus is running at ring0, and dont forget on a different CPU (32 bit) it workes perfectly OK, &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;As for debugging the exception is thrown when the instruction wrmsr is run, and as stated the exception thrown is&amp;nbsp; STATUS_PRIVILEGED_INSTRUCTION.&lt;/P&gt;
&lt;P&gt;I was really hoping someone from Intel could enlighten me on this. &amp;nbsp;(By the wa the XPSS method fails to evaluate even though it enumertes as a child and _PCT does not return 64 bit address size which indicates to me that XPSS is not supported. &amp;nbsp;Could someone verify that?)&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2013 15:14:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957480#M4267</guid>
      <dc:creator>Matt_S_3</dc:creator>
      <dc:date>2013-03-01T15:14:31Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;&gt;This code is in a driver</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957481#M4268</link>
      <description>&amp;gt;&amp;gt;&amp;gt;This code is in a driver and thus is running at ring0, and dont forget on a different CPU (32 bit) it workes perfectly OK,&amp;gt;&amp;gt;&amp;gt;
Yes it is obvious.Is your driver signed?You  mentioned that on 32-bit machine everything works fine.Because it is not obvious from your post I would like to ask you can you trigger the priviledged instruction exception from within your code.If it is possible you can with the help of kernel debugger walk the stack and locate the culprit.</description>
      <pubDate>Sat, 02 Mar 2013 05:33:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957481#M4268</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-03-02T05:33:14Z</dc:date>
    </item>
    <item>
      <title>No, the driver is not signed,</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957482#M4269</link>
      <description>&lt;P&gt;No, the driver is not signed, but it is installed because I turned of driver signing checking.&amp;nbsp; And yes, I am triggering the exception form within an asembly language fundtion in my driver code.&amp;nbsp; Analysing in windbg shows the exception to have occured at wrmsr, which is what I stated in my original post.&lt;/P&gt;
&lt;P&gt;I do note though that enum children and evaluate methods does return SPSS Package data.&amp;nbsp; Does this mean that power management is controled through the values returned in these structures and the method via IO?&amp;nbsp;&amp;nbsp; Any Intel experts here who can answer?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 02 Mar 2013 10:28:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957482#M4269</guid>
      <dc:creator>Matt_S_3</dc:creator>
      <dc:date>2013-03-02T10:28:55Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;&gt;Analysing in windbg shows</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957483#M4270</link>
      <description>&amp;gt;&amp;gt;&amp;gt;Analysing in windbg shows the exception to have occured at wrms&amp;gt;&amp;gt;&amp;gt;

STATUS_PRIVILEDGED_INSTRUCTION is a hardware generated exception which is handled by the OS.It is very strange behaviour because you are able to access other MSR registers from within the same code.It can point to the faulty or incorrect processor behaviour when the wrmsr is compared to the current priviledge level.Can you post the call stack?I was thinking about the disabling the handler if one exists in IDT for priviledged instruction exception,but it probably will not help because of source of the exception could be a processor itself.</description>
      <pubDate>Sat, 02 Mar 2013 13:27:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957483#M4270</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-03-02T13:27:32Z</dc:date>
    </item>
    <item>
      <title>&gt; STATUS_PRIVILEDGED</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957484#M4271</link>
      <description>&lt;P&gt;&amp;gt; STATUS_PRIVILEDGED_INSTRUCTION is a hardware generated exception which is handled by the OS.&lt;/P&gt;
&lt;P&gt;Well on win 7 I get an exception, ie BSOD. &amp;nbsp;I can exception handle it in the driver and get the exception code, which is better, but I would like to know why it throws an exception.&lt;/P&gt;
&lt;P&gt;&amp;gt;It is very strange behaviour because you are able to access other MSR registers from within the same code&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Only with a rdmsr &amp;nbsp;0x198, I havent tried writing any other MSRs , I dont want to mess the chip up since these are powerfull commands.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;gt;Can you post the call stack&lt;/P&gt;
&lt;P&gt;Well it is litterally:&lt;/P&gt;
&lt;P&gt;WrMsr64 &amp;nbsp; &amp;lt;-- my driver func with assembler in it&lt;/P&gt;
&lt;P&gt;wrmsr &amp;nbsp; &amp;lt;-- exception happens here&lt;/P&gt;
&lt;P&gt;&amp;gt;source of the exception could be a processor itself.&lt;/P&gt;
&lt;P&gt;Deffinitely. &amp;nbsp;It IS the CPU causing it. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Mar 2013 14:41:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957484#M4271</guid>
      <dc:creator>Matt_S_3</dc:creator>
      <dc:date>2013-03-02T14:41:03Z</dc:date>
    </item>
    <item>
      <title>Matt, Did you look at</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957485#M4272</link>
      <description>Matt, Did you look at

&lt;STRONG&gt;Intel® 64 and IA-32 Architectures Software Developer’s Manual&lt;/STRONG&gt; Volume 2 (2A, 2B &amp;amp; 2C):
&lt;STRONG&gt;Instruction Set Reference&lt;/STRONG&gt;, A-Z ( Order Number: 325383-044US August 2012 )?

Here is a quote from Page 1043:
...
This instruction &lt;STRONG&gt;must be executed at privilege level 0&lt;/STRONG&gt; or in real-address mode; otherwise, a general protection
exception #GP(0) is generated. Specifying a reserved or unimplemented MSR address in ECX will also cause a
general protection exception. The processor will also generate a general protection exception if software attempts
to write to bits in a reserved MSR.
...</description>
      <pubDate>Sat, 02 Mar 2013 20:47:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957485#M4272</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-03-02T20:47:24Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;&gt;Specifying a reserved or</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957486#M4273</link>
      <description>&amp;gt;&amp;gt;&amp;gt;Specifying a reserved or unimplemented MSR address in ECX will also cause a
general protection exception. The processor will also generate a general protection exception if software attempts
to write to bits in a reserved MSR.&amp;gt;&amp;gt;&amp;gt;

Very interesting information possibly could explain the priviledged instruction exception on that processor.</description>
      <pubDate>Sat, 02 Mar 2013 21:10:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957486#M4273</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-03-02T21:10:23Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;&gt;Well on win 7 I get an</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957487#M4274</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;Well on win 7 I get an exception, ie BSOD&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;Can you search for installed exception handlers with the&amp;nbsp; kernel mode command &lt;STRONG&gt;idt -a&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2013 08:28:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957487#M4274</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-03-03T08:28:00Z</dc:date>
    </item>
    <item>
      <title>Hi Sergey</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957488#M4275</link>
      <description>&lt;P&gt;Hi Sergey&lt;/P&gt;
&lt;P&gt;&amp;gt;This instruction must be executed at privilege level 0&lt;/P&gt;
&lt;P&gt;I am calling wrmsr from a kernel mode driver so it is at ring 0. &amp;nbsp; Dont forget this code works perfectly OK on another platform.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;In respect of "Specifying a reserved or unimplemented MSR address in ECX will also cause a&lt;BR /&gt;&amp;nbsp;general protection exception" the thing is that &amp;nbsp;ACPI _PSS says to use Functionally Fixed Hardware as the mode to control CPU power, which means using the IA32_PERF_CTL MSR in wrmsr.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps there is a bug in ACPI.sys that is returning an incorrect access method for this particular CPU.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2013 08:37:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957488#M4275</guid>
      <dc:creator>Matt_S_3</dc:creator>
      <dc:date>2013-03-03T08:37:00Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;&gt;Perhaps there is a bug in</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957489#M4276</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;gt;Perhaps there is a bug in ACPI.sys that is returning an incorrect access method for this particular CPU&amp;gt;&amp;gt;&amp;gt;&lt;/P&gt;
&lt;P&gt;Why ACPI.sys? your code is accessing directly MSR register.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2013 08:45:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957489#M4276</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-03-03T08:45:36Z</dc:date>
    </item>
    <item>
      <title>&gt;Why ACPI.sys? </title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957490#M4277</link>
      <description>&lt;P&gt;&amp;gt;Why ACPI.sys?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Because my driver is a lower filter to the CPU driver thus it sits above the APCI.sys PDO. &amp;nbsp;It uses the ENUM_CHILDREN and EVALUATE_METHOD IOCTLs to get ACPI information. &amp;nbsp;In this case &amp;nbsp; _PCT and _PSS indicate that CPU power is controled via FFHW, ie, the IA32_PERF_CTL register.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2013 08:48:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957490#M4277</guid>
      <dc:creator>Matt_S_3</dc:creator>
      <dc:date>2013-03-03T08:48:50Z</dc:date>
    </item>
    <item>
      <title>Thanks for providing clearer</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957491#M4278</link>
      <description>&lt;P&gt;Thanks for providing clearer picture of the driver's environment.&lt;/P&gt;
&lt;P&gt;Afaik for debugging ACPI.sys(If you are interested in it) driver there is need to instal checked build version of that driver.&lt;/P&gt;
&lt;P&gt;Can you create simple driver not to be bound to some driver stack and try to access 0x199 MSR?&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2013 08:57:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957491#M4278</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-03-03T08:57:35Z</dc:date>
    </item>
    <item>
      <title>In fact the device object</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957492#M4279</link>
      <description>&lt;P&gt;In fact the device object wrmsr is called from is not on the PDO enumerated by ACPI.sys (there are two device objects in the driver, one is the filter, the other provides a symbolic link so an application can communicate with the driver).&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2013 09:01:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957492#M4279</guid>
      <dc:creator>Matt_S_3</dc:creator>
      <dc:date>2013-03-03T09:01:55Z</dc:date>
    </item>
    <item>
      <title>It seems that it is processor</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957493#M4280</link>
      <description>&lt;P&gt;It seems that it is processor bug.Probably some of the flags in physical representation of the 0x199 MSR were set and thus trigerring general protection exception.&lt;/P&gt;</description>
      <pubDate>Sun, 03 Mar 2013 09:23:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957493#M4280</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-03-03T09:23:00Z</dc:date>
    </item>
    <item>
      <title>I have discovered that if edx</title>
      <link>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957494#M4281</link>
      <description>&lt;P&gt;I have discovered that if edx is set to zero the exception does not occur.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course doing so is contrary to all that I have read where the usual procedure would be to do a rdmsr 198h, then change eax to the required value follwed by&amp;nbsp;wrmsr 199h.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2013 17:06:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-ISA-Extensions/IA32-PERF-CTL-on-X64-error/m-p/957494#M4281</guid>
      <dc:creator>Matt_S_3</dc:creator>
      <dc:date>2013-03-04T17:06:10Z</dc:date>
    </item>
  </channel>
</rss>

