<?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 VMFailInvalid returned by VMXON in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/VMFailInvalid-returned-by-VMXON/m-p/883119#M9535</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am trying to use VMX ona 2xCPU Intel Xeon 5130 @ 2.00GHz machine. After I issue the VMXON instruction, I find that CF is set, which I understand is the indication of a VMfailInvalid result [1]. Here are the setup steps I have taken:&lt;BR /&gt;&lt;BR /&gt;I have verified that the CPU supports VMX by checking ECX.VMX after issuing CPUID.1;&lt;BR /&gt;I have checked that CR4.VMXE is cleared (i.e., nothing else has entered VMX operation);&lt;BR /&gt;I have set CR4.VMXE;&lt;BR /&gt;I have checked that CR0 and CR4 comply with the IA32_VMX_CR*_FIXED* MSRs&lt;BR /&gt;I have read size from IA32_VMX_BASIC[bits 44:32] (On my system, 2048 bytes)&lt;BR /&gt;I have secured the required 2048 bytes of page-aligned memory (e.g., starting at 0xd0519000)&lt;BR /&gt;I have written revid from IA32_VMX_BASIC[bits 31:0] to my VMXON region&lt;BR /&gt;I have passed the physical address of my VMXON region to the VMXON instruction&lt;BR /&gt;&lt;BR /&gt;I don't know how to check, but based on the what I have read about A20M#, I highly doubt it is a factor--is that a good assumption? I wonder if I am correctly passing in the m64 operand of the VMXON instruction using gcc inline assembly. Can someone provide an example of the correct inline assembly for this? Or, better yet, tell me something I am doing wrong? My output is duplicated below for ease of diagnosis.&lt;BR /&gt;&lt;BR /&gt;Thanks..&lt;BR /&gt; -M.&lt;BR /&gt;&lt;BR /&gt;Footnotes:&lt;BR /&gt;1. Developer's Manual vol. 2B, sec. 5.2 - Conventions&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;VMX capable&lt;BR /&gt;Feature control checks&lt;BR /&gt;IA32_FEATURE_CONTROL.lock[bit 0] = 1: yes&lt;BR /&gt;IA32_FEATURE_CONTROL.VMXINSMX[bit 1] = 0&lt;BR /&gt;IA32_FEATURE_CONTROL.VMXOUTSIDESMX[bit 2] = 1: yes&lt;BR /&gt;Linux KVM check: IA32_FEATURE_CONTROL &amp;amp; 5 == 5&lt;BR /&gt;CR4.VMXE set successfully&lt;BR /&gt;CR0 checks:&lt;BR /&gt;CR0.NE = 1: yes&lt;BR /&gt;CR0.PE = 1: yes&lt;BR /&gt;CR0.PG = 1: yes&lt;BR /&gt;CR0 valid for VMXON&lt;BR /&gt;CR4 checks:&lt;BR /&gt;CR4.SMXE = 0: yes&lt;BR /&gt;CR4.VMXE = 1: yes&lt;BR /&gt;CR4 valid for VMXON&lt;BR /&gt;Other conditions worth noting:&lt;BR /&gt;CR4.PAE = 0&lt;BR /&gt;IA32_VMX_BASIC.REVID[bits 31:0] = 0xb (11)&lt;BR /&gt;IA32_VMX_BASIC.VMXONBYTES[bits 44:32] = 2048 bytes&lt;BR /&gt;IA32_VMX_BASIC.WIDTH32[bit 48] = 0&lt;BR /&gt;VMXON region address width limited only to the physical address width&lt;BR /&gt;Physical address width: 38 bits&lt;BR /&gt;Preparing VMXON region&lt;BR /&gt;vmxon_region = 0xee96f000&lt;BR /&gt;vmxon_pa = 0x00 0xf0 0x96 0x2e 0x00 0x00 0x00 0x00 &lt;BR /&gt;VMXON returned VMFailInvalid&lt;/P&gt;</description>
    <pubDate>Tue, 17 Nov 2009 06:33:09 GMT</pubDate>
    <dc:creator>strictlymike</dc:creator>
    <dc:date>2009-11-17T06:33:09Z</dc:date>
    <item>
      <title>VMFailInvalid returned by VMXON</title>
      <link>https://community.intel.com/t5/Software-Archive/VMFailInvalid-returned-by-VMXON/m-p/883119#M9535</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am trying to use VMX ona 2xCPU Intel Xeon 5130 @ 2.00GHz machine. After I issue the VMXON instruction, I find that CF is set, which I understand is the indication of a VMfailInvalid result [1]. Here are the setup steps I have taken:&lt;BR /&gt;&lt;BR /&gt;I have verified that the CPU supports VMX by checking ECX.VMX after issuing CPUID.1;&lt;BR /&gt;I have checked that CR4.VMXE is cleared (i.e., nothing else has entered VMX operation);&lt;BR /&gt;I have set CR4.VMXE;&lt;BR /&gt;I have checked that CR0 and CR4 comply with the IA32_VMX_CR*_FIXED* MSRs&lt;BR /&gt;I have read size from IA32_VMX_BASIC[bits 44:32] (On my system, 2048 bytes)&lt;BR /&gt;I have secured the required 2048 bytes of page-aligned memory (e.g., starting at 0xd0519000)&lt;BR /&gt;I have written revid from IA32_VMX_BASIC[bits 31:0] to my VMXON region&lt;BR /&gt;I have passed the physical address of my VMXON region to the VMXON instruction&lt;BR /&gt;&lt;BR /&gt;I don't know how to check, but based on the what I have read about A20M#, I highly doubt it is a factor--is that a good assumption? I wonder if I am correctly passing in the m64 operand of the VMXON instruction using gcc inline assembly. Can someone provide an example of the correct inline assembly for this? Or, better yet, tell me something I am doing wrong? My output is duplicated below for ease of diagnosis.&lt;BR /&gt;&lt;BR /&gt;Thanks..&lt;BR /&gt; -M.&lt;BR /&gt;&lt;BR /&gt;Footnotes:&lt;BR /&gt;1. Developer's Manual vol. 2B, sec. 5.2 - Conventions&lt;BR /&gt;&lt;BR /&gt;Output:&lt;BR /&gt;VMX capable&lt;BR /&gt;Feature control checks&lt;BR /&gt;IA32_FEATURE_CONTROL.lock[bit 0] = 1: yes&lt;BR /&gt;IA32_FEATURE_CONTROL.VMXINSMX[bit 1] = 0&lt;BR /&gt;IA32_FEATURE_CONTROL.VMXOUTSIDESMX[bit 2] = 1: yes&lt;BR /&gt;Linux KVM check: IA32_FEATURE_CONTROL &amp;amp; 5 == 5&lt;BR /&gt;CR4.VMXE set successfully&lt;BR /&gt;CR0 checks:&lt;BR /&gt;CR0.NE = 1: yes&lt;BR /&gt;CR0.PE = 1: yes&lt;BR /&gt;CR0.PG = 1: yes&lt;BR /&gt;CR0 valid for VMXON&lt;BR /&gt;CR4 checks:&lt;BR /&gt;CR4.SMXE = 0: yes&lt;BR /&gt;CR4.VMXE = 1: yes&lt;BR /&gt;CR4 valid for VMXON&lt;BR /&gt;Other conditions worth noting:&lt;BR /&gt;CR4.PAE = 0&lt;BR /&gt;IA32_VMX_BASIC.REVID[bits 31:0] = 0xb (11)&lt;BR /&gt;IA32_VMX_BASIC.VMXONBYTES[bits 44:32] = 2048 bytes&lt;BR /&gt;IA32_VMX_BASIC.WIDTH32[bit 48] = 0&lt;BR /&gt;VMXON region address width limited only to the physical address width&lt;BR /&gt;Physical address width: 38 bits&lt;BR /&gt;Preparing VMXON region&lt;BR /&gt;vmxon_region = 0xee96f000&lt;BR /&gt;vmxon_pa = 0x00 0xf0 0x96 0x2e 0x00 0x00 0x00 0x00 &lt;BR /&gt;VMXON returned VMFailInvalid&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2009 06:33:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/VMFailInvalid-returned-by-VMXON/m-p/883119#M9535</guid>
      <dc:creator>strictlymike</dc:creator>
      <dc:date>2009-11-17T06:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: VMFailInvalid returned by VMXON</title>
      <link>https://community.intel.com/t5/Software-Archive/VMFailInvalid-returned-by-VMXON/m-p/883120#M9536</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;The result of VMXON may be checked incorrectly.&lt;BR /&gt;&lt;BR /&gt; vmxon_pa = __pa(vmxon_region);&lt;BR /&gt; ...&lt;BR /&gt; /* VMXON */&lt;BR /&gt; asm volatile (&lt;BR /&gt; "clcnt"			// Clear CF&lt;BR /&gt; "vmxon (%%eax)nt"  // VMXON does not affect EAX. EAX == vmxon_pa after its execution. It is not zero.&lt;BR /&gt; "jnc endnt"&lt;BR /&gt; "movl $1, %%eaxnt"		// Err if CF set&lt;BR /&gt; // Nothing changed: EAX is not zero at all&lt;BR /&gt; "end:nt"&lt;BR /&gt; : "=a" (err)&lt;BR /&gt; : "a" (&amp;amp;vmxon_pa), "m" (vmxon_pa)&lt;BR /&gt; : "memory", "cc"&lt;BR /&gt; );&lt;BR /&gt; ...&lt;BR /&gt; // err is always != 0 here&lt;BR /&gt; return err;&lt;BR /&gt; &lt;BR /&gt;Good examples of VMX initialization code can be found in Xen (http://xen.org) and KVM (http://www.linux-kvm.org) sources.&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Nov 2009 13:35:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/VMFailInvalid-returned-by-VMXON/m-p/883120#M9536</guid>
      <dc:creator>hellfire</dc:creator>
      <dc:date>2009-11-17T13:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: VMFailInvalid returned by VMXON</title>
      <link>https://community.intel.com/t5/Software-Archive/VMFailInvalid-returned-by-VMXON/m-p/883121#M9537</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;DIV style="margin:0px;"&gt;Thank you for your keen eyes! After fixing that omission and taking into account multiple cores, VMXON succeeds on both cores. Subsequent VMXOFF instructions (per core) execute withoutany #UD, further confirming that VMX operation was engaged on each.&lt;BR /&gt;&lt;BR /&gt;Thanks again!&lt;BR /&gt;&lt;BR /&gt; -M.&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Nov 2009 22:48:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/VMFailInvalid-returned-by-VMXON/m-p/883121#M9537</guid>
      <dc:creator>strictlymike</dc:creator>
      <dc:date>2009-11-17T22:48:06Z</dc:date>
    </item>
  </channel>
</rss>

