
#ifndef __X86_REGS_H__
#define __X86_REGS_H__

#ifdef __x86_64__
#include <asm/x86_64/regs.h>
#else
#include <asm/x86_32/regs.h>
#endif

enum EFLAGS {
    EF_CF   = 0x00000001,
    EF_PF   = 0x00000004,
    EF_AF   = 0x00000010,
    EF_ZF   = 0x00000040,
    EF_SF   = 0x00000080,
    EF_TF   = 0x00000100,
    EF_IE   = 0x00000200,
    EF_DF   = 0x00000400,
    EF_OF   = 0x00000800,
    EF_IOPL = 0x00003000,
    EF_IOPL_RING0 = 0x00000000,
    EF_IOPL_RING1 = 0x00001000,
    EF_IOPL_RING2 = 0x00002000,
    EF_NT   = 0x00004000,   /* nested task */
    EF_RF   = 0x00010000,   /* resume */
    EF_VM   = 0x00020000,   /* virtual mode */
    EF_AC   = 0x00040000,   /* alignment */
    EF_VIF  = 0x00080000,   /* virtual interrupt */
    EF_VIP  = 0x00100000,   /* virtual interrupt pending */
    EF_ID   = 0x00200000,   /* id */
};

#define guest_mode(r)                                                         \
({                                                                            \
    unsigned long diff = (char *)guest_cpu_user_regs() - (char *)(r);         \
    /* Frame pointer must point into current CPU stack. */                    \
    ASSERT(diff < STACK_SIZE);                                                \
    /* If a guest frame, it must be have guest privs (unless HVM guest).   */ \
    /* We permit CS==0 which can come from an uninitialised trap entry. */    \
    ASSERT((diff != 0) || vm86_mode(r) || ((r->cs&3) >= GUEST_KERNEL_RPL) ||  \
           (r->cs == 0) || hvm_guest(current));                              \
    /* If not a guest frame, it must be a hypervisor frame. */                \
    ASSERT((diff == 0) || (!vm86_mode(r) && (r->cs == __HYPERVISOR_CS)));     \
    /* Return TRUE if it's a guest frame. */                                  \
    (diff == 0);                                                              \
})

#endif /* __X86_REGS_H__ */
c/js/components/ContentView/DownloadContentButton.jsx?id=55719a6942e49ffe82d1fcce7d837a8e5068d904'>commit</a><a href='/cgit/cloud-email/mitmproxy/diff/web/src/js/components/ContentView/DownloadContentButton.jsx?id=55719a6942e49ffe82d1fcce7d837a8e5068d904'>diff</a><a href='/cgit/cloud-email/mitmproxy/stats/web/src/js/components/ContentView/DownloadContentButton.jsx'>stats</a></td><td class='form'><form class='right' method='get' action='/cgit/cloud-email/mitmproxy/log/web/src/js/components/ContentView/DownloadContentButton.jsx'>
<input type='hidden' name='id' value='55719a6942e49ffe82d1fcce7d837a8e5068d904'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit/cloud-email/mitmproxy/tree/?id=55719a6942e49ffe82d1fcce7d837a8e5068d904'>root</a>/<a href='/cgit/cloud-email/mitmproxy/tree/web?id=55719a6942e49ffe82d1fcce7d837a8e5068d904'>web</a>/<a href='/cgit/cloud-email/mitmproxy/tree/web/src?id=55719a6942e49ffe82d1fcce7d837a8e5068d904'>src</a>/<a href='/cgit/cloud-email/mitmproxy/tree/web/src/js?id=55719a6942e49ffe82d1fcce7d837a8e5068d904'>js</a>/<a href='/cgit/cloud-email/mitmproxy/tree/web/src/js/components?id=55719a6942e49ffe82d1fcce7d837a8e5068d904'>components</a>/<a href='/cgit/cloud-email/mitmproxy/tree/web/src/js/components/ContentView?id=55719a6942e49ffe82d1fcce7d837a8e5068d904'>ContentView</a>/<a href='/cgit/cloud-email/mitmproxy/tree/web/src/js/components/ContentView/DownloadContentButton.jsx?id=55719a6942e49ffe82d1fcce7d837a8e5068d904'>DownloadContentButton.jsx</a></div><div class='content'>blob: f32a19ca469121ae1e193e0bbbad8a530e469063 (<a href='/cgit/cloud-email/mitmproxy/plain/web/src/js/components/ContentView/DownloadContentButton.jsx?id=55719a6942e49ffe82d1fcce7d837a8e5068d904'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
<a id='n9' href='#n9'>9</a>
<a id='n10' href='#n10'>10</a>
<a id='n11' href='#n11'>11</a>
<a id='n12' href='#n12'>12</a>
<a id='n13' href='#n13'>13</a>
<a id='n14' href='#n14'>14</a>
<a id='n15' href='#n15'>15</a>
<a id='n16' href='#n16'>16</a>
<a id='n17' href='#n17'>17</a>
<a id='n18' href='#n18'>18</a>
<a id='n19' href='#n19'>19</a>
</pre></td>
<td class='lines'><pre><code></code></pre></td></tr></table>
</div> <!-- class=content -->
<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.3</a> (<a href='https://git-scm.com/'>git 2.25.1</a>) at 2026-02-02 23:44:17 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>
