<?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 Intel VT-x: Configuring debug registers to debug from host in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Intel-VT-x-Configuring-debug-registers-to-debug-from-host/m-p/1177152#M79533</link>
    <description>&lt;P&gt;I am trying to configure the debug registers in the host so that I can monitor an address of a guest running on Intel VT-x. For this I have called KVM_SET_GUEST_DEBUG IOCTL.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp; class-name:dark;"&gt;    struct kvm_guest_debug guest_debug;
    guest_debug.control = KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_HW_BP;
    guest_debug.arch.debugreg[0] = addr; // DR0
    guest_debug.arch.debugreg[7] = encode_dr7(0, len, bpType);
    if (ioctl(vcpu_fd, KVM_SET_GUEST_DEBUG, &amp;amp;guest_debug) &amp;lt; 0)
        return false;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;It successfully sets up the debug register. But upon debug register read/write, it causes VM_EXIT with EXIT_REASON_EXCEPTION_NMI. Although I am expecting to have EXIT_REASON_DR_ACCESS. What is the reason that causes an nmi exit instead of DR_ACCESS exit? Did I set the registers right?&lt;/P&gt;</description>
    <pubDate>Tue, 28 Aug 2018 18:03:11 GMT</pubDate>
    <dc:creator>proy4</dc:creator>
    <dc:date>2018-08-28T18:03:11Z</dc:date>
    <item>
      <title>Intel VT-x: Configuring debug registers to debug from host</title>
      <link>https://community.intel.com/t5/Software-Archive/Intel-VT-x-Configuring-debug-registers-to-debug-from-host/m-p/1177152#M79533</link>
      <description>&lt;P&gt;I am trying to configure the debug registers in the host so that I can monitor an address of a guest running on Intel VT-x. For this I have called KVM_SET_GUEST_DEBUG IOCTL.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp; class-name:dark;"&gt;    struct kvm_guest_debug guest_debug;
    guest_debug.control = KVM_GUESTDBG_ENABLE | KVM_GUESTDBG_USE_HW_BP;
    guest_debug.arch.debugreg[0] = addr; // DR0
    guest_debug.arch.debugreg[7] = encode_dr7(0, len, bpType);
    if (ioctl(vcpu_fd, KVM_SET_GUEST_DEBUG, &amp;amp;guest_debug) &amp;lt; 0)
        return false;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;It successfully sets up the debug register. But upon debug register read/write, it causes VM_EXIT with EXIT_REASON_EXCEPTION_NMI. Although I am expecting to have EXIT_REASON_DR_ACCESS. What is the reason that causes an nmi exit instead of DR_ACCESS exit? Did I set the registers right?&lt;/P&gt;</description>
      <pubDate>Tue, 28 Aug 2018 18:03:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Intel-VT-x-Configuring-debug-registers-to-debug-from-host/m-p/1177152#M79533</guid>
      <dc:creator>proy4</dc:creator>
      <dc:date>2018-08-28T18:03:11Z</dc:date>
    </item>
  </channel>
</rss>

