[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 10 of 14] Prevent the hypervisor from BUGging if xc_hvm_modified_memory is called on a shared page
xen/arch/x86/hvm/hvm.c | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx> Signed-off-by: Adin Scannell <adin@xxxxxxxxxxx> diff -r 76802e649c2c -r 667e53a7ad34 xen/arch/x86/hvm/hvm.c --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -3755,7 +3755,7 @@ long do_hvm_op(unsigned long op, XEN_GUE for ( pfn = a.first_pfn; pfn < a.first_pfn + a.nr; pfn++ ) { p2m_type_t t; - mfn_t mfn = get_gfn(d, pfn, &t); + mfn_t mfn = get_gfn_unshare(d, pfn, &t); if ( p2m_is_paging(t) ) { p2m_mem_paging_populate(d, pfn); @@ -3764,8 +3764,16 @@ long do_hvm_op(unsigned long op, XEN_GUE goto param_fail3; } if( p2m_is_shared(t) ) + { + /* If it insists on not unsharing itself, crash the domain + * rather than crashing the host down in mark dirty */ gdprintk(XENLOG_WARNING, "shared pfn 0x%lx modified?\n", pfn); + domain_crash(d); + put_gfn(d, pfn); + rc = -EINVAL; + goto param_fail3; + } if ( mfn_x(mfn) != INVALID_MFN ) { _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |