[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Handle PoD case in hvm_hap_nested_page_fault()
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1262781923 0 # Node ID cba56c13ca3eba67a3b56e78256418fd62445a95 # Parent a1d0a575b4bace0a79ecfb48704b24fc9ae7866b Handle PoD case in hvm_hap_nested_page_fault() The new combined nested page fault handling doesn't consider the case where the gfn_to_mfn() translation caused the page to be transparently populated. Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx> Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx> --- xen/arch/x86/hvm/hvm.c | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-) diff -r a1d0a575b4ba -r cba56c13ca3e xen/arch/x86/hvm/hvm.c --- a/xen/arch/x86/hvm/hvm.c Wed Jan 06 10:13:55 2010 +0000 +++ b/xen/arch/x86/hvm/hvm.c Wed Jan 06 12:45:23 2010 +0000 @@ -951,22 +951,21 @@ bool_t hvm_hap_nested_page_fault(unsigne if ( p2m_is_paged(p2mt) || (p2mt == p2m_ram_paging_out) ) p2m_mem_paging_populate(current->domain, gfn); - /* Log-dirty: mark the page dirty and let the guest write it again */ - if ( paging_mode_log_dirty(current->domain) - && p2m_is_ram(p2mt) && (p2mt != p2m_ram_ro) ) + /* Mem sharing: unshare the page and try again */ + if ( p2mt == p2m_ram_shared ) + { + mem_sharing_unshare_page(current->domain, gfn, 0); + return 1; + } + + /* Spurious fault? PoD and log-dirty also take this path. */ + if ( p2m_is_ram(p2mt) ) { paging_mark_dirty(current->domain, mfn_x(mfn)); p2m_change_type(current->domain, gfn, p2m_ram_logdirty, p2m_ram_rw); return 1; } - /* Mem sharing: unshare the page and try again */ - if ( p2mt == p2m_ram_shared ) - { - mem_sharing_unshare_page(current->domain, gfn, 0); - return 1; - } - /* Shouldn't happen: Maybe the guest was writing to a r/o grant mapping? */ if ( p2mt == p2m_grant_map_ro ) { _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |