亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? multi.c

?? xen虛擬機源代碼安裝包
?? C
?? 第 1 頁 / 共 5 頁
字號:
/****************************************************************************** * arch/x86/mm/shadow/multi.c * * Simple, mostly-synchronous shadow page tables.  * Parts of this code are Copyright (c) 2006 by XenSource Inc. * Parts of this code are Copyright (c) 2006 by Michael A Fetterman * Parts based on earlier work by Michael A Fetterman, Ian Pratt et al. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */#include <xen/config.h>#include <xen/types.h>#include <xen/mm.h>#include <xen/trace.h>#include <xen/sched.h>#include <xen/perfc.h>#include <xen/domain_page.h>#include <asm/page.h>#include <asm/current.h>#include <asm/shadow.h>#include <asm/flushtlb.h>#include <asm/hvm/hvm.h>#include <asm/hvm/cacheattr.h>#include <asm/mtrr.h>#include "private.h"#include "types.h"/* THINGS TO DO LATER: *  * TEARDOWN HEURISTICS * Also: have a heuristic for when to destroy a previous paging-mode's  * shadows.  When a guest is done with its start-of-day 32-bit tables * and reuses the memory we want to drop those shadows.  Start with  * shadows in a page in two modes as a hint, but beware of clever tricks  * like reusing a pagetable for both PAE and 64-bit during boot... * * PAE LINEAR MAPS * Rework shadow_get_l*e() to have the option of using map_domain_page() * instead of linear maps.  Add appropriate unmap_l*e calls in the users.  * Then we can test the speed difference made by linear maps.  If the  * map_domain_page() version is OK on PAE, we could maybe allow a lightweight  * l3-and-l2h-only shadow mode for PAE PV guests that would allow them  * to share l2h pages again.  * * PSE disabled / PSE36 * We don't support any modes other than PSE enabled, PSE36 disabled. * Neither of those would be hard to change, but we'd need to be able to  * deal with shadows made in one mode and used in another. */#define FETCH_TYPE_PREFETCH 1#define FETCH_TYPE_DEMAND   2#define FETCH_TYPE_WRITE    4typedef enum {    ft_prefetch     = FETCH_TYPE_PREFETCH,    ft_demand_read  = FETCH_TYPE_DEMAND,    ft_demand_write = FETCH_TYPE_DEMAND | FETCH_TYPE_WRITE,} fetch_type_t;#ifdef DEBUG_TRACE_DUMPstatic char *fetch_type_names[] = {    [ft_prefetch]     "prefetch",    [ft_demand_read]  "demand read",    [ft_demand_write] "demand write",};#endif/**************************************************************************//* Hash table mapping from guest pagetables to shadows * * Normal case: maps the mfn of a guest page to the mfn of its shadow page. * FL1's:       maps the *gfn* of the start of a superpage to the mfn of a *              shadow L1 which maps its "splinters". */static inline mfn_t get_fl1_shadow_status(struct vcpu *v, gfn_t gfn)/* Look for FL1 shadows in the hash table */{    mfn_t smfn = shadow_hash_lookup(v, gfn_x(gfn), SH_type_fl1_shadow);    return smfn;}static inline mfn_t get_shadow_status(struct vcpu *v, mfn_t gmfn, u32 shadow_type)/* Look for shadows in the hash table */{    mfn_t smfn = shadow_hash_lookup(v, mfn_x(gmfn), shadow_type);    perfc_incr(shadow_get_shadow_status);    return smfn;}static inline void set_fl1_shadow_status(struct vcpu *v, gfn_t gfn, mfn_t smfn)/* Put an FL1 shadow into the hash table */{    SHADOW_PRINTK("gfn=%"SH_PRI_gfn", type=%08x, smfn=%05lx\n",                   gfn_x(gfn), SH_type_fl1_shadow, mfn_x(smfn));    shadow_hash_insert(v, gfn_x(gfn), SH_type_fl1_shadow, smfn);}static inline void set_shadow_status(struct vcpu *v, mfn_t gmfn, u32 shadow_type, mfn_t smfn)/* Put a shadow into the hash table */{    struct domain *d = v->domain;    int res;    SHADOW_PRINTK("d=%d, v=%d, gmfn=%05lx, type=%08x, smfn=%05lx\n",                   d->domain_id, v->vcpu_id, mfn_x(gmfn),                   shadow_type, mfn_x(smfn));    /* 32-on-64 PV guests don't own their l4 pages so can't get_page them */    if ( !is_pv_32on64_vcpu(v) || shadow_type != SH_type_l4_64_shadow )    {        res = get_page(mfn_to_page(gmfn), d);        ASSERT(res == 1);    }    shadow_hash_insert(v, mfn_x(gmfn), shadow_type, smfn);}static inline void delete_fl1_shadow_status(struct vcpu *v, gfn_t gfn, mfn_t smfn)/* Remove a shadow from the hash table */{    SHADOW_PRINTK("gfn=%"SH_PRI_gfn", type=%08x, smfn=%05lx\n",                   gfn_x(gfn), SH_type_fl1_shadow, mfn_x(smfn));    shadow_hash_delete(v, gfn_x(gfn), SH_type_fl1_shadow, smfn);}static inline void delete_shadow_status(struct vcpu *v, mfn_t gmfn, u32 shadow_type, mfn_t smfn)/* Remove a shadow from the hash table */{    SHADOW_PRINTK("d=%d, v=%d, gmfn=%05lx, type=%08x, smfn=%05lx\n",                   v->domain->domain_id, v->vcpu_id,                   mfn_x(gmfn), shadow_type, mfn_x(smfn));    shadow_hash_delete(v, mfn_x(gmfn), shadow_type, smfn);    /* 32-on-64 PV guests don't own their l4 pages; see set_shadow_status */    if ( !is_pv_32on64_vcpu(v) || shadow_type != SH_type_l4_64_shadow )        put_page(mfn_to_page(gmfn));}/**************************************************************************//* CPU feature support querying */static inline intguest_supports_superpages(struct vcpu *v){    /* The _PAGE_PSE bit must be honoured in HVM guests, whenever     * CR4.PSE is set or the guest is in PAE or long mode.      * It's also used in the dummy PT for vcpus with CR4.PG cleared. */    return (is_hvm_vcpu(v) &&             (GUEST_PAGING_LEVELS != 2              || !hvm_paging_enabled(v)             || (v->arch.hvm_vcpu.guest_cr[4] & X86_CR4_PSE)));}static inline intguest_supports_nx(struct vcpu *v){    if ( GUEST_PAGING_LEVELS == 2 || !cpu_has_nx )        return 0;    if ( !is_hvm_vcpu(v) )        return cpu_has_nx;    return hvm_nx_enabled(v);}/**************************************************************************//* Functions for walking the guest page tables *//* Flags that are needed in a pagetable entry, with the sense of NX inverted */static uint32_t mandatory_flags(struct vcpu *v, uint32_t pfec) {    static uint32_t flags[] = {        /* I/F -  Usr Wr */        /* 0   0   0   0 */ _PAGE_PRESENT,         /* 0   0   0   1 */ _PAGE_PRESENT|_PAGE_RW,        /* 0   0   1   0 */ _PAGE_PRESENT|_PAGE_USER,        /* 0   0   1   1 */ _PAGE_PRESENT|_PAGE_RW|_PAGE_USER,        /* 0   1   0   0 */ _PAGE_PRESENT,         /* 0   1   0   1 */ _PAGE_PRESENT|_PAGE_RW,        /* 0   1   1   0 */ _PAGE_PRESENT|_PAGE_USER,        /* 0   1   1   1 */ _PAGE_PRESENT|_PAGE_RW|_PAGE_USER,        /* 1   0   0   0 */ _PAGE_PRESENT|_PAGE_NX_BIT,         /* 1   0   0   1 */ _PAGE_PRESENT|_PAGE_RW|_PAGE_NX_BIT,        /* 1   0   1   0 */ _PAGE_PRESENT|_PAGE_USER|_PAGE_NX_BIT,        /* 1   0   1   1 */ _PAGE_PRESENT|_PAGE_RW|_PAGE_USER|_PAGE_NX_BIT,        /* 1   1   0   0 */ _PAGE_PRESENT|_PAGE_NX_BIT,         /* 1   1   0   1 */ _PAGE_PRESENT|_PAGE_RW|_PAGE_NX_BIT,        /* 1   1   1   0 */ _PAGE_PRESENT|_PAGE_USER|_PAGE_NX_BIT,        /* 1   1   1   1 */ _PAGE_PRESENT|_PAGE_RW|_PAGE_USER|_PAGE_NX_BIT,    };    /* Don't demand not-NX if the CPU wouldn't enforce it. */    if ( !guest_supports_nx(v) )        pfec &= ~PFEC_insn_fetch;    /* Don't demand R/W if the CPU wouldn't enforce it. */    if ( is_hvm_vcpu(v) && unlikely(!hvm_wp_enabled(v))          && !(pfec & PFEC_user_mode) )        pfec &= ~PFEC_write_access;    return flags[(pfec & 0x1f) >> 1];}/* Modify a guest pagetable entry to set the Accessed and Dirty bits. * Returns non-zero if it actually writes to guest memory. */static uint32_t set_ad_bits(void *guest_p, void *walk_p, int set_dirty){    guest_intpte_t old, new;    old = *(guest_intpte_t *)walk_p;    new = old | _PAGE_ACCESSED | (set_dirty ? _PAGE_DIRTY : 0);    if ( old != new )     {        /* Write the new entry into the walk, and try to write it back         * into the guest table as well.  If the guest table has changed         * under out feet then leave it alone. */        *(guest_intpte_t *)walk_p = new;        if ( cmpxchg(((guest_intpte_t *)guest_p), old, new) == old )             return 1;    }    return 0;}/* This validation is called with lock held, and after write permission * removal. Then check is atomic and no more inconsistent content can * be observed before lock is released * * Return 1 to indicate success and 0 for inconsistency */static inline uint32_tshadow_check_gwalk(struct vcpu *v, unsigned long va, walk_t *gw){    struct domain *d = v->domain;    guest_l1e_t *l1p;    guest_l2e_t *l2p;#if GUEST_PAGING_LEVELS >= 4    guest_l3e_t *l3p;    guest_l4e_t *l4p;#endif    int mismatch = 0;    ASSERT(shadow_locked_by_me(d));    if ( gw->version ==         atomic_read(&d->arch.paging.shadow.gtable_dirty_version) )        return 1;    /* We may consider caching guest page mapping from last     * guest table walk. However considering this check happens     * relatively less-frequent, and a bit burden here to     * remap guest page is better than caching mapping in each     * guest table walk.     *     * Also when inconsistency occurs, simply return to trigger     * another fault instead of re-validate new path to make     * logic simple.     */    perfc_incr(shadow_check_gwalk);#if GUEST_PAGING_LEVELS >= 3 /* PAE or 64... */#if GUEST_PAGING_LEVELS >= 4 /* 64-bit only... */    l4p = (guest_l4e_t *)v->arch.paging.shadow.guest_vtable;    mismatch |= (gw->l4e.l4 != l4p[guest_l4_table_offset(va)].l4);    l3p = sh_map_domain_page(gw->l3mfn);    mismatch |= (gw->l3e.l3 != l3p[guest_l3_table_offset(va)].l3);    sh_unmap_domain_page(l3p);#else    mismatch |= (gw->l3e.l3 !=                 v->arch.paging.shadow.gl3e[guest_l3_table_offset(va)].l3);#endif    l2p = sh_map_domain_page(gw->l2mfn);    mismatch |= (gw->l2e.l2 != l2p[guest_l2_table_offset(va)].l2);    sh_unmap_domain_page(l2p);#else    l2p = (guest_l2e_t *)v->arch.paging.shadow.guest_vtable;    mismatch |= (gw->l2e.l2 != l2p[guest_l2_table_offset(va)].l2);#endif    if ( !(guest_supports_superpages(v) &&           (guest_l2e_get_flags(gw->l2e) & _PAGE_PSE)) )    {        l1p = sh_map_domain_page(gw->l1mfn);        mismatch |= (gw->l1e.l1 != l1p[guest_l1_table_offset(va)].l1);        sh_unmap_domain_page(l1p);    }    return !mismatch;}/* Remove write access permissions from a gwalk_t in a batch, and * return OR-ed result for TLB flush hint and need to rewalk the guest * pages. * * Syncing pages will remove write access to that page; but it may * also give write access to other pages in the path. If we resync any * pages, re-walk from the beginning. */#define GW_RMWR_FLUSHTLB 1#define GW_RMWR_REWALK   2static inline uint32_tgw_remove_write_accesses(struct vcpu *v, unsigned long va, walk_t *gw){    uint32_t rc = 0;#if GUEST_PAGING_LEVELS >= 3 /* PAE or 64... */#if GUEST_PAGING_LEVELS >= 4 /* 64-bit only... */#if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC)    if ( mfn_is_out_of_sync(gw->l3mfn) )    {        sh_resync(v, gw->l3mfn);        rc = GW_RMWR_REWALK;    }    else#endif /* OOS */     if ( sh_remove_write_access(v, gw->l3mfn, 3, va) )         rc = GW_RMWR_FLUSHTLB;#endif /* GUEST_PAGING_LEVELS >= 4 */#if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC)    if ( mfn_is_out_of_sync(gw->l2mfn) )    {        sh_resync(v, gw->l2mfn);        rc |= GW_RMWR_REWALK;    }    else#endif /* OOS */    if ( sh_remove_write_access(v, gw->l2mfn, 2, va) )        rc |= GW_RMWR_FLUSHTLB;#endif /* GUEST_PAGING_LEVELS >= 3 */    if ( !(guest_supports_superpages(v) &&           (guest_l2e_get_flags(gw->l2e) & _PAGE_PSE))#if (SHADOW_OPTIMIZATIONS & SHOPT_OUT_OF_SYNC)         && !mfn_is_out_of_sync(gw->l1mfn)#endif /* OOS */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品影院一区二区久久久| 亚洲精品老司机| 久久99精品国产.久久久久久| 欧美精品99久久久**| 日韩激情在线观看| 精品国产污网站| 岛国精品一区二区| 亚洲三级小视频| 欧美日本韩国一区| 精品在线亚洲视频| 国产精品久久久久久久岛一牛影视| 91丝袜美腿高跟国产极品老师 | √…a在线天堂一区| 色综合久久天天综合网| 亚洲国产中文字幕| 久久在线观看免费| 色综合天天综合狠狠| 偷拍亚洲欧洲综合| 国产日韩欧美电影| 欧美亚洲国产bt| 国产美女精品人人做人人爽| 17c精品麻豆一区二区免费| 欧美日韩国产综合视频在线观看 | 色欧美日韩亚洲| 一区二区三区高清| 精品久久久久久久久久久久包黑料| 成人动漫中文字幕| 婷婷激情综合网| 中文字幕欧美三区| 在线观看91精品国产麻豆| 国产精品一二一区| 亚洲午夜免费电影| 久久老女人爱爱| 欧美嫩在线观看| 成人在线视频一区| 日韩va亚洲va欧美va久久| 国产日韩亚洲欧美综合| 欧美欧美欧美欧美首页| av中文一区二区三区| 麻豆精品国产91久久久久久| 亚洲美女淫视频| 久久九九全国免费| 欧美日韩电影在线| 色偷偷成人一区二区三区91| 国产精品一二三| 天堂蜜桃91精品| 亚洲欧美日韩久久| 国产视频一区在线观看| 日韩一区二区在线免费观看| 一本色道a无线码一区v| 国产精品1区二区.| 蜜桃视频一区二区三区| 亚洲一区二区不卡免费| 中文字幕在线不卡国产视频| 2021久久国产精品不只是精品| 在线观看免费一区| 92精品国产成人观看免费| 国产精品亚洲第一区在线暖暖韩国 | 久久99精品久久久久| 亚洲午夜久久久久中文字幕久| 国产精品初高中害羞小美女文| 精品国产青草久久久久福利| 制服丝袜亚洲色图| 欧美日韩一级片在线观看| 91亚洲精品久久久蜜桃网站| 国产99一区视频免费| 精品亚洲成a人| 久久av老司机精品网站导航| 麻豆成人久久精品二区三区小说| 亚洲一区二区三区国产| 亚洲欧美另类久久久精品2019| 国产精品日韩精品欧美在线| 国产女主播在线一区二区| 2021久久国产精品不只是精品 | 久久久久久久一区| 精品成人a区在线观看| 日韩欧美国产一区二区三区| 欧美一个色资源| 欧美一卡2卡3卡4卡| 欧美一区二区精品| 日韩一区二区三区在线| 欧美一区二区在线免费播放| 欧美精品久久一区| 国产精品全国免费观看高清 | 日韩一区二区不卡| 日韩一区二区免费高清| 欧美大片在线观看一区二区| 精品欧美久久久| 久久久久久久电影| 中文字幕av一区 二区| 国产精品麻豆欧美日韩ww| 综合自拍亚洲综合图不卡区| 亚洲综合一二区| 五月天久久比比资源色| 久久电影国产免费久久电影| 高清av一区二区| 91丨porny丨在线| 欧美日韩久久一区二区| 欧美xingq一区二区| 欧美国产视频在线| 亚洲男人天堂一区| 日韩激情一二三区| 久久精品国产99国产精品| 国产乱码精品一区二区三区av | 精品制服美女丁香| 懂色av中文一区二区三区| 色视频一区二区| 日韩精品一区二区三区视频在线观看| 337p粉嫩大胆噜噜噜噜噜91av| 中文字幕av一区二区三区免费看| 亚洲主播在线观看| 精品一区二区三区免费毛片爱| 国产成人在线视频播放| 日本韩国欧美一区二区三区| 日韩欧美123| 一区免费观看视频| 日韩国产欧美在线播放| 大尺度一区二区| 制服丝袜av成人在线看| 国产亚洲一二三区| 午夜视频在线观看一区二区三区| 精品一区二区在线视频| 91视频在线看| 欧美mv和日韩mv国产网站| 亚洲欧洲成人精品av97| 麻豆精品国产传媒mv男同| 色婷婷久久久久swag精品| 欧美精品一区二区三区在线播放 | 亚洲午夜精品网| 国产福利精品导航| 欧美精品色综合| 亚洲视频精选在线| 国产综合色产在线精品| 欧美亚一区二区| 中文字幕精品在线不卡| 毛片av一区二区| 欧美视频在线一区| 亚洲视频免费在线| 国产成人精品免费在线| 日韩视频免费观看高清完整版在线观看| 中文字幕电影一区| 国内国产精品久久| 日韩欧美国产电影| 夜夜精品视频一区二区| 91亚洲国产成人精品一区二区三| 2020国产成人综合网| 日韩精品一卡二卡三卡四卡无卡| 色偷偷久久人人79超碰人人澡| 国产人成亚洲第一网站在线播放| 日本特黄久久久高潮| 欧美又粗又大又爽| 国产一区二区三区视频在线播放| 日韩一区二区三区电影在线观看 | 免费在线欧美视频| 欧美日本在线视频| 亚洲第一成年网| 在线一区二区三区做爰视频网站| 亚洲国产岛国毛片在线| 国产一区二区h| 精品成人佐山爱一区二区| 五月天欧美精品| 制服丝袜亚洲色图| 日韩成人一级大片| 欧美一三区三区四区免费在线看 | 亚洲女爱视频在线| 91免费国产在线| 亚洲区小说区图片区qvod| av中文字幕亚洲| 亚洲另类色综合网站| 在线影院国内精品| 五月天激情综合| 777色狠狠一区二区三区| 欧美a级理论片| 欧美成人在线直播| 国产另类ts人妖一区二区| 精品第一国产综合精品aⅴ| 国产伦精品一区二区三区免费迷| 久久久久免费观看| 成人高清av在线| 亚洲免费观看高清完整版在线 | 97精品国产露脸对白| 日韩美女久久久| 欧美亚洲日本国产| 日韩影院精彩在线| 精品少妇一区二区| 国产99精品国产| 亚洲精品成人天堂一二三| 欧美日韩一区中文字幕| 日本成人在线一区| 国产色综合久久| eeuss鲁一区二区三区| 亚洲资源中文字幕| 精品国产污污免费网站入口 | 在线精品视频一区二区三四| 日韩精品久久久久久| 久久综合色综合88| 91日韩精品一区| 日韩av一级电影| 欧美激情中文不卡| 欧洲日韩一区二区三区|