|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] x86/mm: handle HVMOP_modified_memory on shared pages
# HG changeset patch
# User Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
# Date 1322152474 0
# Node ID a94fc613ab8c88815e3bfc1335493301ace1b38a
# Parent e6100a0832cebe6a66005c2fa2c994a0784e8e93
x86/mm: handle HVMOP_modified_memory on shared pages
Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
Signed-off-by: Adin Scannell <adin@xxxxxxxxxxx>
Acked-by: Tim Deegan <tim@xxxxxxx>
Committed-by: Tim Deegan <tim@xxxxxxx>
---
diff -r e6100a0832ce -r a94fc613ab8c xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c Thu Nov 24 16:34:34 2011 +0000
+++ b/xen/arch/x86/hvm/hvm.c Thu Nov 24 16:34:34 2011 +0000
@@ -3755,7 +3755,7 @@
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 @@
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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |