8547e28bd5
23233-hvm-cr-access.patch 23234-svm-decode-assist-base.patch 23235-svm-decode-assist-crs.patch 23236-svm-decode-assist-invlpg.patch 23238-svm-decode-assist-insn-fetch.patch 23303-cpufreq-misc.patch 23304-amd-oprofile-strings.patch 23305-amd-fam15-xenoprof.patch 23306-amd-fam15-vpmu.patch 23334-amd-fam12+14-vpmu.patch 23338-vtd-force-intremap.patch - fate#310957 - Update to Xen 4.1.1-rc1 c/s 23064 - xentrace: dynamic tracebuffer allocation xen-unstable.xentrace.dynamic_tbuf.patch xen-unstable.xentrace.empty_t_info_pages.patch xen-unstable.xentrace.verbose.patch xen-unstable.xentrace.no_gdprintk.patch xen-unstable.xentrace.comments.patch xen-unstable.xentrace.printk_prefix.patch xen-unstable.xentrace.remove_debug_printk.patch xen-unstable.xentrace.t_info_pages-formula.patch xen-unstable.xentrace.register_cpu_notifier-boot_time.patch xen-unstable.xentrace.t_info_page-overflow.patch xen-unstable.xentrace.t_info_first_offset.patch xen-unstable.xentrace.data_size__read_mostly.patch xen-unstable.xentrace.__insert_record-dst-type.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=124
117 lines
3.8 KiB
Diff
117 lines
3.8 KiB
Diff
References: bnc#675363
|
|
|
|
# HG changeset patch
|
|
# User Jan Beulich <jbeulich@novell.com>
|
|
# Date 1299687409 0
|
|
# Node ID 82b5f8d12903e140f957ae8d13d66e44be076b05
|
|
# Parent e9fab50d7b61d151d51a4b1088930c9e1ca2da47
|
|
x86: make mod_l1_entry() return a proper error code
|
|
|
|
... again is so that the guest can actually know the reason for the
|
|
(hypercall) failure.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
|
|
|
Index: xen-4.1.1-testing/xen/arch/x86/mm.c
|
|
===================================================================
|
|
--- xen-4.1.1-testing.orig/xen/arch/x86/mm.c
|
|
+++ xen-4.1.1-testing/xen/arch/x86/mm.c
|
|
@@ -1765,15 +1765,16 @@ static int mod_l1_entry(l1_pgentry_t *pl
|
|
struct domain *pt_dom = pt_vcpu->domain;
|
|
unsigned long mfn;
|
|
p2m_type_t p2mt;
|
|
- int rc = 1;
|
|
+ int rc = 0;
|
|
|
|
if ( unlikely(__copy_from_user(&ol1e, pl1e, sizeof(ol1e)) != 0) )
|
|
- return 0;
|
|
+ return -EFAULT;
|
|
|
|
if ( unlikely(paging_mode_refcounts(pt_dom)) )
|
|
{
|
|
- rc = UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, pt_vcpu, preserve_ad);
|
|
- return rc;
|
|
+ if ( UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, pt_vcpu, preserve_ad) )
|
|
+ return 0;
|
|
+ return -EBUSY;
|
|
}
|
|
|
|
if ( l1e_get_flags(nl1e) & _PAGE_PRESENT )
|
|
@@ -1782,7 +1783,7 @@ static int mod_l1_entry(l1_pgentry_t *pl
|
|
mfn = mfn_x(gfn_to_mfn(p2m_get_hostp2m(pg_dom),
|
|
l1e_get_pfn(nl1e), &p2mt));
|
|
if ( !p2m_is_ram(p2mt) || unlikely(mfn == INVALID_MFN) )
|
|
- return 0;
|
|
+ return -EINVAL;
|
|
ASSERT((mfn & ~(PADDR_MASK >> PAGE_SHIFT)) == 0);
|
|
nl1e = l1e_from_pfn(mfn, l1e_get_flags(nl1e));
|
|
|
|
@@ -1790,22 +1791,23 @@ static int mod_l1_entry(l1_pgentry_t *pl
|
|
{
|
|
MEM_LOG("Bad L1 flags %x",
|
|
l1e_get_flags(nl1e) & l1_disallow_mask(pt_dom));
|
|
- return 0;
|
|
+ return -EINVAL;
|
|
}
|
|
|
|
/* Fast path for identical mapping, r/w and presence. */
|
|
if ( !l1e_has_changed(ol1e, nl1e, _PAGE_RW | _PAGE_PRESENT) )
|
|
{
|
|
adjust_guest_l1e(nl1e, pt_dom);
|
|
- rc = UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, pt_vcpu,
|
|
- preserve_ad);
|
|
- return rc;
|
|
+ if ( UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, pt_vcpu,
|
|
+ preserve_ad) )
|
|
+ return 0;
|
|
+ return -EBUSY;
|
|
}
|
|
|
|
switch ( rc = get_page_from_l1e(nl1e, pt_dom, pg_dom) )
|
|
{
|
|
default:
|
|
- return 0;
|
|
+ return rc;
|
|
case 0:
|
|
break;
|
|
case 1:
|
|
@@ -1818,13 +1820,13 @@ static int mod_l1_entry(l1_pgentry_t *pl
|
|
preserve_ad)) )
|
|
{
|
|
ol1e = nl1e;
|
|
- rc = 0;
|
|
+ rc = -EBUSY;
|
|
}
|
|
}
|
|
else if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, pt_vcpu,
|
|
preserve_ad)) )
|
|
{
|
|
- return 0;
|
|
+ return -EBUSY;
|
|
}
|
|
|
|
put_page_from_l1e(ol1e, pt_dom);
|
|
@@ -3516,9 +3518,10 @@ int do_mmu_update(
|
|
}
|
|
#endif
|
|
|
|
- okay = mod_l1_entry(va, l1e, mfn,
|
|
- cmd == MMU_PT_UPDATE_PRESERVE_AD, v,
|
|
- pg_owner);
|
|
+ rc = mod_l1_entry(va, l1e, mfn,
|
|
+ cmd == MMU_PT_UPDATE_PRESERVE_AD, v,
|
|
+ pg_owner);
|
|
+ okay = !rc;
|
|
}
|
|
break;
|
|
case PGT_l2_page_table:
|
|
@@ -4300,7 +4303,7 @@ static int __do_update_va_mapping(
|
|
goto out;
|
|
}
|
|
|
|
- rc = mod_l1_entry(pl1e, val, gl1mfn, 0, v, pg_owner) ? 0 : -EINVAL;
|
|
+ rc = mod_l1_entry(pl1e, val, gl1mfn, 0, v, pg_owner);
|
|
|
|
page_unlock(gl1pg);
|
|
put_page(gl1pg);
|