This commit is contained in:
parent
0ef5182655
commit
9c16971e0e
@ -7,10 +7,10 @@ x86: Allow batched mmu updates which preserve accessed/dirty pte bits.
|
|||||||
Signed-off-by: Bruce Rogers <brogers@novell.com>
|
Signed-off-by: Bruce Rogers <brogers@novell.com>
|
||||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/mm.c
|
Index: xen-3.2.1-testing/xen/arch/x86/mm.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/mm.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/mm.c
|
+++ xen-3.2.1-testing/xen/arch/x86/mm.c
|
||||||
@@ -1342,21 +1342,30 @@ static inline int update_intpte(intpte_t
|
@@ -1342,21 +1342,30 @@ static inline int update_intpte(intpte_t
|
||||||
intpte_t old,
|
intpte_t old,
|
||||||
intpte_t new,
|
intpte_t new,
|
||||||
@ -80,24 +80,26 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
|
|
||||||
if ( l1e_get_flags(nl1e) & _PAGE_PRESENT )
|
if ( l1e_get_flags(nl1e) & _PAGE_PRESENT )
|
||||||
{
|
{
|
||||||
@@ -1415,12 +1423,14 @@ static int mod_l1_entry(l1_pgentry_t *pl
|
@@ -1415,14 +1423,16 @@ static int mod_l1_entry(l1_pgentry_t *pl
|
||||||
|
|
||||||
/* Fast path for identical mapping, r/w and presence. */
|
|
||||||
if ( !l1e_has_changed(ol1e, nl1e, _PAGE_RW | _PAGE_PRESENT) )
|
if ( !l1e_has_changed(ol1e, nl1e, _PAGE_RW | _PAGE_PRESENT) )
|
||||||
|
{
|
||||||
|
adjust_guest_l1e(nl1e, d);
|
||||||
- return UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr);
|
- return UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr);
|
||||||
+ return UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr,
|
+ return UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr,
|
||||||
+ preserve_ad);
|
+ preserve_ad);
|
||||||
|
}
|
||||||
|
|
||||||
if ( unlikely(!get_page_from_l1e(nl1e, FOREIGNDOM)) )
|
if ( unlikely(!get_page_from_l1e(nl1e, FOREIGNDOM)) )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
adjust_guest_l1e(nl1e, d);
|
||||||
- if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr)) )
|
- if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr)) )
|
||||||
+ if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr,
|
+ if ( unlikely(!UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, curr,
|
||||||
+ preserve_ad)) )
|
+ preserve_ad)) )
|
||||||
{
|
{
|
||||||
put_page_from_l1e(nl1e, d);
|
put_page_from_l1e(nl1e, d);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1428,7 +1438,8 @@ static int mod_l1_entry(l1_pgentry_t *pl
|
@@ -1430,7 +1440,8 @@ static int mod_l1_entry(l1_pgentry_t *pl
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -107,7 +109,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1441,7 +1452,8 @@ static int mod_l1_entry(l1_pgentry_t *pl
|
@@ -1443,7 +1454,8 @@ static int mod_l1_entry(l1_pgentry_t *pl
|
||||||
static int mod_l2_entry(l2_pgentry_t *pl2e,
|
static int mod_l2_entry(l2_pgentry_t *pl2e,
|
||||||
l2_pgentry_t nl2e,
|
l2_pgentry_t nl2e,
|
||||||
unsigned long pfn,
|
unsigned long pfn,
|
||||||
@ -117,16 +119,18 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
{
|
{
|
||||||
l2_pgentry_t ol2e;
|
l2_pgentry_t ol2e;
|
||||||
struct vcpu *curr = current;
|
struct vcpu *curr = current;
|
||||||
@@ -1469,18 +1481,20 @@ static int mod_l2_entry(l2_pgentry_t *pl
|
@@ -1471,20 +1483,22 @@ static int mod_l2_entry(l2_pgentry_t *pl
|
||||||
|
if ( !l2e_has_changed(ol2e, nl2e, _PAGE_PRESENT) )
|
||||||
/* Fast path for identical mapping and presence. */
|
{
|
||||||
if ( !l2e_has_changed(ol2e, nl2e, _PAGE_PRESENT))
|
adjust_guest_l2e(nl2e, d);
|
||||||
- return UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr);
|
- return UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr);
|
||||||
+ return UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr, preserve_ad);
|
+ return UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr, preserve_ad);
|
||||||
|
}
|
||||||
|
|
||||||
if ( unlikely(!get_page_from_l2e(nl2e, pfn, d)) )
|
if ( unlikely(!get_page_from_l2e(nl2e, pfn, d)) )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
adjust_guest_l2e(nl2e, d);
|
||||||
- if ( unlikely(!UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr)) )
|
- if ( unlikely(!UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr)) )
|
||||||
+ if ( unlikely(!UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr,
|
+ if ( unlikely(!UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, curr,
|
||||||
+ preserve_ad)) )
|
+ preserve_ad)) )
|
||||||
@ -141,7 +145,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1494,7 +1508,8 @@ static int mod_l2_entry(l2_pgentry_t *pl
|
@@ -1498,7 +1512,8 @@ static int mod_l2_entry(l2_pgentry_t *pl
|
||||||
/* Update the L3 entry at pl3e to new value nl3e. pl3e is within frame pfn. */
|
/* Update the L3 entry at pl3e to new value nl3e. pl3e is within frame pfn. */
|
||||||
static int mod_l3_entry(l3_pgentry_t *pl3e,
|
static int mod_l3_entry(l3_pgentry_t *pl3e,
|
||||||
l3_pgentry_t nl3e,
|
l3_pgentry_t nl3e,
|
||||||
@ -151,16 +155,18 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
{
|
{
|
||||||
l3_pgentry_t ol3e;
|
l3_pgentry_t ol3e;
|
||||||
struct vcpu *curr = current;
|
struct vcpu *curr = current;
|
||||||
@@ -1532,18 +1547,20 @@ static int mod_l3_entry(l3_pgentry_t *pl
|
@@ -1536,20 +1551,22 @@ static int mod_l3_entry(l3_pgentry_t *pl
|
||||||
|
if ( !l3e_has_changed(ol3e, nl3e, _PAGE_PRESENT) )
|
||||||
/* Fast path for identical mapping and presence. */
|
{
|
||||||
if (!l3e_has_changed(ol3e, nl3e, _PAGE_PRESENT))
|
adjust_guest_l3e(nl3e, d);
|
||||||
- return UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr);
|
- return UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr);
|
||||||
+ return UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr, preserve_ad);
|
+ return UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr, preserve_ad);
|
||||||
|
}
|
||||||
|
|
||||||
if ( unlikely(!get_page_from_l3e(nl3e, pfn, d)) )
|
if ( unlikely(!get_page_from_l3e(nl3e, pfn, d)) )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
adjust_guest_l3e(nl3e, d);
|
||||||
- if ( unlikely(!UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr)) )
|
- if ( unlikely(!UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr)) )
|
||||||
+ if ( unlikely(!UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr,
|
+ if ( unlikely(!UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, curr,
|
||||||
+ preserve_ad)) )
|
+ preserve_ad)) )
|
||||||
@ -175,7 +181,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1564,7 +1581,8 @@ static int mod_l3_entry(l3_pgentry_t *pl
|
@@ -1570,7 +1587,8 @@ static int mod_l3_entry(l3_pgentry_t *pl
|
||||||
/* Update the L4 entry at pl4e to new value nl4e. pl4e is within frame pfn. */
|
/* Update the L4 entry at pl4e to new value nl4e. pl4e is within frame pfn. */
|
||||||
static int mod_l4_entry(l4_pgentry_t *pl4e,
|
static int mod_l4_entry(l4_pgentry_t *pl4e,
|
||||||
l4_pgentry_t nl4e,
|
l4_pgentry_t nl4e,
|
||||||
@ -185,16 +191,18 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
{
|
{
|
||||||
struct vcpu *curr = current;
|
struct vcpu *curr = current;
|
||||||
struct domain *d = curr->domain;
|
struct domain *d = curr->domain;
|
||||||
@@ -1592,18 +1610,20 @@ static int mod_l4_entry(l4_pgentry_t *pl
|
@@ -1598,20 +1616,22 @@ static int mod_l4_entry(l4_pgentry_t *pl
|
||||||
|
if ( !l4e_has_changed(ol4e, nl4e, _PAGE_PRESENT) )
|
||||||
/* Fast path for identical mapping and presence. */
|
{
|
||||||
if (!l4e_has_changed(ol4e, nl4e, _PAGE_PRESENT))
|
adjust_guest_l4e(nl4e, d);
|
||||||
- return UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr);
|
- return UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr);
|
||||||
+ return UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr, preserve_ad);
|
+ return UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr, preserve_ad);
|
||||||
|
}
|
||||||
|
|
||||||
if ( unlikely(!get_page_from_l4e(nl4e, pfn, d)) )
|
if ( unlikely(!get_page_from_l4e(nl4e, pfn, d)) )
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
adjust_guest_l4e(nl4e, d);
|
||||||
- if ( unlikely(!UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr)) )
|
- if ( unlikely(!UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr)) )
|
||||||
+ if ( unlikely(!UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr,
|
+ if ( unlikely(!UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, curr,
|
||||||
+ preserve_ad)) )
|
+ preserve_ad)) )
|
||||||
@ -209,7 +217,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1946,7 +1966,7 @@ int new_guest_cr3(unsigned long mfn)
|
@@ -1954,7 +1974,7 @@ int new_guest_cr3(unsigned long mfn)
|
||||||
l4e_from_pfn(
|
l4e_from_pfn(
|
||||||
mfn,
|
mfn,
|
||||||
(_PAGE_PRESENT|_PAGE_RW|_PAGE_USER|_PAGE_ACCESSED)),
|
(_PAGE_PRESENT|_PAGE_RW|_PAGE_USER|_PAGE_ACCESSED)),
|
||||||
@ -218,7 +226,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
if ( unlikely(!okay) )
|
if ( unlikely(!okay) )
|
||||||
{
|
{
|
||||||
MEM_LOG("Error while installing new compat baseptr %lx", mfn);
|
MEM_LOG("Error while installing new compat baseptr %lx", mfn);
|
||||||
@@ -2458,13 +2478,16 @@ int do_mmu_update(
|
@@ -2466,13 +2486,16 @@ int do_mmu_update(
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* MMU_NORMAL_PT_UPDATE: Normal update to any level of page table.
|
* MMU_NORMAL_PT_UPDATE: Normal update to any level of page table.
|
||||||
@ -236,7 +244,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
gmfn = req.ptr >> PAGE_SHIFT;
|
gmfn = req.ptr >> PAGE_SHIFT;
|
||||||
mfn = gmfn_to_mfn(d, gmfn);
|
mfn = gmfn_to_mfn(d, gmfn);
|
||||||
|
|
||||||
@@ -2501,20 +2524,23 @@ int do_mmu_update(
|
@@ -2509,20 +2532,23 @@ int do_mmu_update(
|
||||||
case PGT_l1_page_table:
|
case PGT_l1_page_table:
|
||||||
{
|
{
|
||||||
l1_pgentry_t l1e = l1e_from_intpte(req.val);
|
l1_pgentry_t l1e = l1e_from_intpte(req.val);
|
||||||
@ -263,7 +271,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@@ -2522,7 +2548,8 @@ int do_mmu_update(
|
@@ -2530,7 +2556,8 @@ int do_mmu_update(
|
||||||
case PGT_l4_page_table:
|
case PGT_l4_page_table:
|
||||||
{
|
{
|
||||||
l4_pgentry_t l4e = l4e_from_intpte(req.val);
|
l4_pgentry_t l4e = l4e_from_intpte(req.val);
|
||||||
@ -273,7 +281,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@@ -2652,7 +2679,7 @@ static int create_grant_pte_mapping(
|
@@ -2660,7 +2687,7 @@ static int create_grant_pte_mapping(
|
||||||
}
|
}
|
||||||
|
|
||||||
ol1e = *(l1_pgentry_t *)va;
|
ol1e = *(l1_pgentry_t *)va;
|
||||||
@ -282,7 +290,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
{
|
{
|
||||||
put_page_type(page);
|
put_page_type(page);
|
||||||
rc = GNTST_general_error;
|
rc = GNTST_general_error;
|
||||||
@@ -2720,9 +2747,11 @@ static int destroy_grant_pte_mapping(
|
@@ -2728,9 +2755,11 @@ static int destroy_grant_pte_mapping(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Delete pagetable entry. */
|
/* Delete pagetable entry. */
|
||||||
@ -297,7 +305,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
{
|
{
|
||||||
MEM_LOG("Cannot delete PTE entry at %p", va);
|
MEM_LOG("Cannot delete PTE entry at %p", va);
|
||||||
put_page_type(page);
|
put_page_type(page);
|
||||||
@@ -2758,7 +2787,7 @@ static int create_grant_va_mapping(
|
@@ -2766,7 +2795,7 @@ static int create_grant_va_mapping(
|
||||||
return GNTST_general_error;
|
return GNTST_general_error;
|
||||||
}
|
}
|
||||||
ol1e = *pl1e;
|
ol1e = *pl1e;
|
||||||
@ -306,7 +314,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
guest_unmap_l1e(v, pl1e);
|
guest_unmap_l1e(v, pl1e);
|
||||||
pl1e = NULL;
|
pl1e = NULL;
|
||||||
|
|
||||||
@@ -2796,7 +2825,7 @@ static int replace_grant_va_mapping(
|
@@ -2804,7 +2833,7 @@ static int replace_grant_va_mapping(
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Delete pagetable entry. */
|
/* Delete pagetable entry. */
|
||||||
@ -315,7 +323,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
{
|
{
|
||||||
MEM_LOG("Cannot delete PTE entry at %p", (unsigned long *)pl1e);
|
MEM_LOG("Cannot delete PTE entry at %p", (unsigned long *)pl1e);
|
||||||
rc = GNTST_general_error;
|
rc = GNTST_general_error;
|
||||||
@@ -2860,7 +2889,8 @@ int replace_grant_host_mapping(
|
@@ -2868,7 +2897,8 @@ int replace_grant_host_mapping(
|
||||||
}
|
}
|
||||||
ol1e = *pl1e;
|
ol1e = *pl1e;
|
||||||
|
|
||||||
@ -325,7 +333,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
{
|
{
|
||||||
MEM_LOG("Cannot delete PTE entry at %p", (unsigned long *)pl1e);
|
MEM_LOG("Cannot delete PTE entry at %p", (unsigned long *)pl1e);
|
||||||
guest_unmap_l1e(curr, pl1e);
|
guest_unmap_l1e(curr, pl1e);
|
||||||
@@ -2948,7 +2978,7 @@ int do_update_va_mapping(unsigned long v
|
@@ -2956,7 +2986,7 @@ int do_update_va_mapping(unsigned long v
|
||||||
|
|
||||||
pl1e = guest_map_l1e(v, va, &gl1mfn);
|
pl1e = guest_map_l1e(v, va, &gl1mfn);
|
||||||
|
|
||||||
@ -334,7 +342,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
|
|
||||||
if ( pl1e )
|
if ( pl1e )
|
||||||
@@ -3517,7 +3547,7 @@ static int ptwr_emulated_update(
|
@@ -3525,7 +3555,7 @@ static int ptwr_emulated_update(
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ol1e = *pl1e;
|
ol1e = *pl1e;
|
||||||
@ -343,10 +351,10 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
BUG();
|
BUG();
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/include/public/xen.h
|
Index: xen-3.2.1-testing/xen/include/public/xen.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/public/xen.h
|
--- xen-3.2.1-testing.orig/xen/include/public/xen.h
|
||||||
+++ xen-3.2-testing/xen/include/public/xen.h
|
+++ xen-3.2.1-testing/xen/include/public/xen.h
|
||||||
@@ -168,9 +168,14 @@
|
@@ -168,9 +168,14 @@
|
||||||
* ptr[:2] -- Machine address within the frame whose mapping to modify.
|
* ptr[:2] -- Machine address within the frame whose mapping to modify.
|
||||||
* The frame must belong to the FD, if one is specified.
|
* The frame must belong to the FD, if one is specified.
|
||||||
|
@ -1,31 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1200995509 0
|
|
||||||
# Node ID 6f3fb3f86b68182bb61a661e81f346f653005852
|
|
||||||
# Parent 2af5fb3e34e54e96d0c58e0e4557ee1240df9ce8
|
|
||||||
xend: On block-attach, remove device information when VmError occurs.
|
|
||||||
|
|
||||||
I tested xm block-attach command with a wrong
|
|
||||||
parameter(file:). Naturally a command error occurred. Then I retested
|
|
||||||
xm block-attach command with a correct parameter(phy:). But a command
|
|
||||||
error occurred again. The second command error occurred because Xend
|
|
||||||
did not remove device information from self.info when the first
|
|
||||||
command error occurred.
|
|
||||||
|
|
||||||
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
|
|
||||||
|
|
||||||
diff -r 2af5fb3e34e5 -r 6f3fb3f86b68 tools/python/xen/xend/XendDomainInfo.py
|
|
||||||
--- a/tools/python/xen/xend/XendDomainInfo.py Tue Jan 22 09:50:06 2008 +0000
|
|
||||||
+++ b/tools/python/xen/xend/XendDomainInfo.py Tue Jan 22 09:51:49 2008 +0000
|
|
||||||
@@ -535,6 +535,11 @@ class XendDomainInfo:
|
|
||||||
self._createDevice(dev_type, dev_config_dict)
|
|
||||||
self._waitForDevice(dev_type, devid)
|
|
||||||
except VmError, ex:
|
|
||||||
+ del self.info['devices'][dev_uuid]
|
|
||||||
+ if dev_type == 'tap':
|
|
||||||
+ self.info['vbd_refs'].remove(dev_uuid)
|
|
||||||
+ else:
|
|
||||||
+ self.info['%s_refs' % dev_type].remove(dev_uuid)
|
|
||||||
raise ex
|
|
||||||
else:
|
|
||||||
devid = None
|
|
@ -1,21 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1201096764 0
|
|
||||||
# Node ID 7f940c605893749225a5605fb8a1fa38972bdeb6
|
|
||||||
# Parent c364f80eb4b591f8ecd9dd803081923b94a8c688
|
|
||||||
x86_emulate: Fix CLTS emulation.
|
|
||||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/x86_emulate.c
|
|
||||||
+++ xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|
||||||
@@ -177,7 +177,7 @@ static uint8_t opcode_table[256] = {
|
|
||||||
|
|
||||||
static uint8_t twobyte_table[256] = {
|
|
||||||
/* 0x00 - 0x07 */
|
|
||||||
- 0, ImplicitOps|ModRM, 0, 0, 0, ImplicitOps, 0, 0,
|
|
||||||
+ 0, ImplicitOps|ModRM, 0, 0, 0, 0, ImplicitOps, 0,
|
|
||||||
/* 0x08 - 0x0F */
|
|
||||||
ImplicitOps, ImplicitOps, 0, 0, 0, ImplicitOps|ModRM, 0, 0,
|
|
||||||
/* 0x10 - 0x17 */
|
|
@ -10,10 +10,10 @@ crashed but preserved VM and renaming/restarting a crashed VM.
|
|||||||
|
|
||||||
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
|
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
|
||||||
|
|
||||||
Index: xen-3.2-testing/docs/xen-api/vm-lifecycle.tex
|
Index: xen-3.2.1-testing/docs/xen-api/vm-lifecycle.tex
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/docs/xen-api/vm-lifecycle.tex
|
--- xen-3.2.1-testing.orig/docs/xen-api/vm-lifecycle.tex
|
||||||
+++ xen-3.2-testing/docs/xen-api/vm-lifecycle.tex
|
+++ xen-3.2.1-testing/docs/xen-api/vm-lifecycle.tex
|
||||||
@@ -21,7 +21,10 @@
|
@@ -21,7 +21,10 @@
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
@ -26,10 +26,10 @@ Index: xen-3.2-testing/docs/xen-api/vm-lifecycle.tex
|
|||||||
|
|
||||||
\section{VM boot parameters}
|
\section{VM boot parameters}
|
||||||
|
|
||||||
Index: xen-3.2-testing/docs/xen-api/vm_lifecycle.dot
|
Index: xen-3.2.1-testing/docs/xen-api/vm_lifecycle.dot
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/docs/xen-api/vm_lifecycle.dot
|
--- xen-3.2.1-testing.orig/docs/xen-api/vm_lifecycle.dot
|
||||||
+++ xen-3.2-testing/docs/xen-api/vm_lifecycle.dot
|
+++ xen-3.2.1-testing/docs/xen-api/vm_lifecycle.dot
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
digraph g{
|
digraph g{
|
||||||
|
|
||||||
@ -47,10 +47,10 @@ Index: xen-3.2-testing/docs/xen-api/vm_lifecycle.dot
|
|||||||
|
|
||||||
}
|
}
|
||||||
\ No newline at end of file
|
\ No newline at end of file
|
||||||
Index: xen-3.2-testing/docs/xen-api/xenapi-datamodel.tex
|
Index: xen-3.2.1-testing/docs/xen-api/xenapi-datamodel.tex
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/docs/xen-api/xenapi-datamodel.tex
|
--- xen-3.2.1-testing.orig/docs/xen-api/xenapi-datamodel.tex
|
||||||
+++ xen-3.2-testing/docs/xen-api/xenapi-datamodel.tex
|
+++ xen-3.2.1-testing/docs/xen-api/xenapi-datamodel.tex
|
||||||
@@ -156,6 +156,7 @@ The following enumeration types are used
|
@@ -156,6 +156,7 @@ The following enumeration types are used
|
||||||
\hspace{0.5cm}{\tt Paused} & Paused \\
|
\hspace{0.5cm}{\tt Paused} & Paused \\
|
||||||
\hspace{0.5cm}{\tt Running} & Running \\
|
\hspace{0.5cm}{\tt Running} & Running \\
|
||||||
@ -59,10 +59,10 @@ Index: xen-3.2-testing/docs/xen-api/xenapi-datamodel.tex
|
|||||||
\hspace{0.5cm}{\tt Unknown} & Some other unknown state \\
|
\hspace{0.5cm}{\tt Unknown} & Some other unknown state \\
|
||||||
\hline
|
\hline
|
||||||
\end{longtable}
|
\end{longtable}
|
||||||
Index: xen-3.2-testing/tools/libxen/include/xen/api/xen_vm_power_state.h
|
Index: xen-3.2.1-testing/tools/libxen/include/xen/api/xen_vm_power_state.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/libxen/include/xen/api/xen_vm_power_state.h
|
--- xen-3.2.1-testing.orig/tools/libxen/include/xen/api/xen_vm_power_state.h
|
||||||
+++ xen-3.2-testing/tools/libxen/include/xen/api/xen_vm_power_state.h
|
+++ xen-3.2.1-testing/tools/libxen/include/xen/api/xen_vm_power_state.h
|
||||||
@@ -46,6 +46,11 @@ enum xen_vm_power_state
|
@@ -46,6 +46,11 @@ enum xen_vm_power_state
|
||||||
XEN_VM_POWER_STATE_SUSPENDED,
|
XEN_VM_POWER_STATE_SUSPENDED,
|
||||||
|
|
||||||
@ -75,10 +75,10 @@ Index: xen-3.2-testing/tools/libxen/include/xen/api/xen_vm_power_state.h
|
|||||||
* Some other unknown state
|
* Some other unknown state
|
||||||
*/
|
*/
|
||||||
XEN_VM_POWER_STATE_UNKNOWN
|
XEN_VM_POWER_STATE_UNKNOWN
|
||||||
Index: xen-3.2-testing/tools/libxen/src/xen_vm_power_state.c
|
Index: xen-3.2.1-testing/tools/libxen/src/xen_vm_power_state.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/libxen/src/xen_vm_power_state.c
|
--- xen-3.2.1-testing.orig/tools/libxen/src/xen_vm_power_state.c
|
||||||
+++ xen-3.2-testing/tools/libxen/src/xen_vm_power_state.c
|
+++ xen-3.2.1-testing/tools/libxen/src/xen_vm_power_state.c
|
||||||
@@ -32,6 +32,7 @@ static const char *lookup_table[] =
|
@@ -32,6 +32,7 @@ static const char *lookup_table[] =
|
||||||
"Paused",
|
"Paused",
|
||||||
"Running",
|
"Running",
|
||||||
@ -87,10 +87,10 @@ Index: xen-3.2-testing/tools/libxen/src/xen_vm_power_state.c
|
|||||||
"Unknown"
|
"Unknown"
|
||||||
};
|
};
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendAPIConstants.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendAPIConstants.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendAPIConstants.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendAPIConstants.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendAPIConstants.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendAPIConstants.py
|
||||||
@@ -25,6 +25,7 @@ XEN_API_VM_POWER_STATE = [
|
@@ -25,6 +25,7 @@ XEN_API_VM_POWER_STATE = [
|
||||||
'Running',
|
'Running',
|
||||||
'Suspended',
|
'Suspended',
|
||||||
@ -109,10 +109,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendAPIConstants.py
|
|||||||
|
|
||||||
XEN_API_ON_NORMAL_EXIT = [
|
XEN_API_ON_NORMAL_EXIT = [
|
||||||
'destroy',
|
'destroy',
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendConstants.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendConstants.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendConstants.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendConstants.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendConstants.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendConstants.py
|
||||||
@@ -61,6 +61,7 @@ DOM_STATES = [
|
@@ -61,6 +61,7 @@ DOM_STATES = [
|
||||||
'running',
|
'running',
|
||||||
'suspended',
|
'suspended',
|
||||||
@ -129,10 +129,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendConstants.py
|
|||||||
DOM_STATE_UNKNOWN = XEN_API_VM_POWER_STATE_UNKNOWN
|
DOM_STATE_UNKNOWN = XEN_API_VM_POWER_STATE_UNKNOWN
|
||||||
|
|
||||||
DOM_STATES_OLD = [
|
DOM_STATES_OLD = [
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomain.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomain.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomain.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomain.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomain.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomain.py
|
||||||
@@ -43,6 +43,7 @@ from xen.xend.XendConstants import XS_VM
|
@@ -43,6 +43,7 @@ from xen.xend.XendConstants import XS_VM
|
||||||
from xen.xend.XendConstants import DOM_STATE_HALTED, DOM_STATE_PAUSED
|
from xen.xend.XendConstants import DOM_STATE_HALTED, DOM_STATE_PAUSED
|
||||||
from xen.xend.XendConstants import DOM_STATE_RUNNING, DOM_STATE_SUSPENDED
|
from xen.xend.XendConstants import DOM_STATE_RUNNING, DOM_STATE_SUSPENDED
|
||||||
@ -175,10 +175,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomain.py
|
|||||||
raise VMBadState("Domain '%s' is not started" % domid,
|
raise VMBadState("Domain '%s' is not started" % domid,
|
||||||
POWER_STATE_NAMES[DOM_STATE_PAUSED],
|
POWER_STATE_NAMES[DOM_STATE_PAUSED],
|
||||||
POWER_STATE_NAMES[dominfo._stateGet()])
|
POWER_STATE_NAMES[dominfo._stateGet()])
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
@@ -414,7 +414,7 @@ class XendDomainInfo:
|
@@ -414,7 +414,7 @@ class XendDomainInfo:
|
||||||
"""
|
"""
|
||||||
from xen.xend import XendDomain
|
from xen.xend import XendDomain
|
||||||
@ -197,7 +197,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
return self.getDeviceController(deviceClass).sxprs()
|
return self.getDeviceController(deviceClass).sxprs()
|
||||||
else:
|
else:
|
||||||
sxprs = []
|
sxprs = []
|
||||||
@@ -2248,6 +2248,9 @@ class XendDomainInfo:
|
@@ -2258,6 +2258,9 @@ class XendDomainInfo:
|
||||||
return XEN_API_VM_POWER_STATE_SUSPENDED
|
return XEN_API_VM_POWER_STATE_SUSPENDED
|
||||||
else:
|
else:
|
||||||
return XEN_API_VM_POWER_STATE_HALTED
|
return XEN_API_VM_POWER_STATE_HALTED
|
||||||
|
@ -21,11 +21,11 @@ construct the restarted domain.
|
|||||||
|
|
||||||
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
|
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
@@ -1386,9 +1386,10 @@ class XendDomainInfo:
|
@@ -1391,9 +1391,10 @@ class XendDomainInfo:
|
||||||
|
|
||||||
self._writeVm('xend/previous_restart_time', str(now))
|
self._writeVm('xend/previous_restart_time', str(now))
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
else:
|
else:
|
||||||
self._unwatchVm()
|
self._unwatchVm()
|
||||||
self.destroyDomain()
|
self.destroyDomain()
|
||||||
@@ -1402,7 +1403,7 @@ class XendDomainInfo:
|
@@ -1407,7 +1408,7 @@ class XendDomainInfo:
|
||||||
new_dom = None
|
new_dom = None
|
||||||
try:
|
try:
|
||||||
new_dom = XendDomain.instance().domain_create_from_dict(
|
new_dom = XendDomain.instance().domain_create_from_dict(
|
||||||
@ -46,7 +46,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
new_dom.waitForDevices()
|
new_dom.waitForDevices()
|
||||||
new_dom.unpause()
|
new_dom.unpause()
|
||||||
rst_cnt = self._readVm('xend/restart_count')
|
rst_cnt = self._readVm('xend/restart_count')
|
||||||
@@ -1433,11 +1434,15 @@ class XendDomainInfo:
|
@@ -1438,11 +1439,15 @@ class XendDomainInfo:
|
||||||
new_name, new_uuid)
|
new_name, new_uuid)
|
||||||
self._unwatchVm()
|
self._unwatchVm()
|
||||||
self._releaseDevices()
|
self._releaseDevices()
|
||||||
|
@ -7,11 +7,11 @@ Fix leaking of /vm/<uuid> path in xenstore on various VM lifecycle events.
|
|||||||
|
|
||||||
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
|
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendCheckpoint.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendCheckpoint.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendCheckpoint.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendCheckpoint.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendCheckpoint.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendCheckpoint.py
|
||||||
@@ -125,10 +125,10 @@ def save(fd, dominfo, network, live, dst
|
@@ -128,10 +128,10 @@ def save(fd, dominfo, network, live, dst
|
||||||
if checkpoint:
|
if checkpoint:
|
||||||
dominfo.resumeDomain()
|
dominfo.resumeDomain()
|
||||||
else:
|
else:
|
||||||
@ -24,11 +24,11 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendCheckpoint.py
|
|||||||
except VmError:
|
except VmError:
|
||||||
# Ignore this. The name conflict (hopefully) arises because we
|
# Ignore this. The name conflict (hopefully) arises because we
|
||||||
# are doing localhost migration; if we are doing a suspend of a
|
# are doing localhost migration; if we are doing a suspend of a
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
@@ -1118,10 +1118,11 @@ class XendDomainInfo:
|
@@ -1120,10 +1120,11 @@ class XendDomainInfo:
|
||||||
def getDomid(self):
|
def getDomid(self):
|
||||||
return self.domid
|
return self.domid
|
||||||
|
|
||||||
@ -42,7 +42,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
|
|
||||||
def getName(self):
|
def getName(self):
|
||||||
return self.info['name_label']
|
return self.info['name_label']
|
||||||
@@ -1392,7 +1393,7 @@ class XendDomainInfo:
|
@@ -1397,7 +1398,7 @@ class XendDomainInfo:
|
||||||
new_dom_info = self._preserveForRestart()
|
new_dom_info = self._preserveForRestart()
|
||||||
else:
|
else:
|
||||||
self._unwatchVm()
|
self._unwatchVm()
|
||||||
@ -51,7 +51,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
|
|
||||||
# new_dom's VM will be the same as this domain's VM, except where
|
# new_dom's VM will be the same as this domain's VM, except where
|
||||||
# the rename flag has instructed us to call preserveForRestart.
|
# the rename flag has instructed us to call preserveForRestart.
|
||||||
@@ -1406,9 +1407,6 @@ class XendDomainInfo:
|
@@ -1411,9 +1412,6 @@ class XendDomainInfo:
|
||||||
new_dom_info)
|
new_dom_info)
|
||||||
new_dom.waitForDevices()
|
new_dom.waitForDevices()
|
||||||
new_dom.unpause()
|
new_dom.unpause()
|
||||||
@ -61,7 +61,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
new_dom._removeVm(RESTART_IN_PROGRESS)
|
new_dom._removeVm(RESTART_IN_PROGRESS)
|
||||||
except:
|
except:
|
||||||
if new_dom:
|
if new_dom:
|
||||||
@@ -1434,13 +1432,19 @@ class XendDomainInfo:
|
@@ -1439,13 +1437,19 @@ class XendDomainInfo:
|
||||||
new_name, new_uuid)
|
new_name, new_uuid)
|
||||||
self._unwatchVm()
|
self._unwatchVm()
|
||||||
self._releaseDevices()
|
self._releaseDevices()
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1201607262 0
|
|
||||||
# Node ID 128f7bc0a277375571b4817fc65bfcd14e00a7ec
|
|
||||||
# Parent 7aa2149a3b0e94eb01b39ae8cf4a41bc225be94e
|
|
||||||
x86: Fix HVM hypercall preemption causing guest crash.
|
|
||||||
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/domain.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/domain.c
|
|
||||||
+++ xen-3.2-testing/xen/arch/x86/domain.c
|
|
||||||
@@ -1507,7 +1507,12 @@ unsigned long hypercall_create_continuat
|
|
||||||
{
|
|
||||||
regs = guest_cpu_user_regs();
|
|
||||||
regs->eax = op;
|
|
||||||
- regs->eip -= 2; /* re-execute 'syscall' / 'int 0x82' */
|
|
||||||
+ /*
|
|
||||||
+ * For PV guest, we update EIP to re-execute 'syscall' / 'int 0x82';
|
|
||||||
+ * HVM does not need this since 'vmcall' / 'vmmcall' is fault-like.
|
|
||||||
+ */
|
|
||||||
+ if ( !is_hvm_vcpu(current) )
|
|
||||||
+ regs->eip -= 2; /* re-execute 'syscall' / 'int 0x82' */
|
|
||||||
|
|
||||||
#ifdef __x86_64__
|
|
||||||
if ( !is_hvm_vcpu(current) ?
|
|
@ -1,34 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1201607430 0
|
|
||||||
# Node ID 193afcdb85b211d72f940e086397490ce72f06e6
|
|
||||||
# Parent 128f7bc0a277375571b4817fc65bfcd14e00a7ec
|
|
||||||
x86: Fix shadow pinning logic (for PV live relo).
|
|
||||||
From: Tim Deegan <Tim.Deegan@citrix.com>
|
|
||||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/mm/shadow/multi.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/mm/shadow/multi.c
|
|
||||||
+++ xen-3.2-testing/xen/arch/x86/mm/shadow/multi.c
|
|
||||||
@@ -3518,8 +3518,18 @@ sh_set_toplevel_shadow(struct vcpu *v,
|
|
||||||
v->arch.shadow_table[slot] = new_entry;
|
|
||||||
|
|
||||||
/* Decrement the refcount of the old contents of this slot */
|
|
||||||
- if ( !pagetable_is_null(old_entry) )
|
|
||||||
- sh_put_ref(v, pagetable_get_mfn(old_entry), 0);
|
|
||||||
+ if ( !pagetable_is_null(old_entry) ) {
|
|
||||||
+ mfn_t old_smfn = pagetable_get_mfn(old_entry);
|
|
||||||
+ /* Need to repin the old toplevel shadow if it's been unpinned
|
|
||||||
+ * by shadow_prealloc(): in PV mode we're still running on this
|
|
||||||
+ * shadow and it's not safe to free it yet. */
|
|
||||||
+ if ( !mfn_to_shadow_page(old_smfn)->pinned && !sh_pin(v, old_smfn) )
|
|
||||||
+ {
|
|
||||||
+ SHADOW_ERROR("can't re-pin %#lx\n", mfn_x(old_smfn));
|
|
||||||
+ domain_crash(v->domain);
|
|
||||||
+ }
|
|
||||||
+ sh_put_ref(v, old_smfn, 0);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
285
16931-hvm-hap-param.patch
Normal file
285
16931-hvm-hap-param.patch
Normal file
@ -0,0 +1,285 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User Keir Fraser <keir.fraser@citrix.com>
|
||||||
|
# Date 1201614376 0
|
||||||
|
# Node ID 98c2665056ea4fe63e02c943536db686fcedc459
|
||||||
|
# Parent 193afcdb85b211d72f940e086397490ce72f06e6
|
||||||
|
x86, hvm: Add a per-domain parameter to specify shadow or hap.
|
||||||
|
Signed-off-by: Xu Dongxiao <dongxiao.xu@intel.com>
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/tools/python/xen/lowlevel/xc/xc.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c
|
||||||
|
+++ xen-3.2.1-testing/tools/python/xen/lowlevel/xc/xc.c
|
||||||
|
@@ -97,16 +97,16 @@ static PyObject *pyxc_domain_create(XcOb
|
||||||
|
PyObject *kwds)
|
||||||
|
{
|
||||||
|
uint32_t dom = 0, ssidref = 0, flags = 0;
|
||||||
|
- int ret, i, hvm = 0;
|
||||||
|
+ int ret, i;
|
||||||
|
PyObject *pyhandle = NULL;
|
||||||
|
xen_domain_handle_t handle = {
|
||||||
|
0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef,
|
||||||
|
0xde, 0xad, 0xbe, 0xef, 0xde, 0xad, 0xbe, 0xef };
|
||||||
|
|
||||||
|
- static char *kwd_list[] = { "domid", "ssidref", "handle", "hvm", NULL };
|
||||||
|
+ static char *kwd_list[] = { "domid", "ssidref", "handle", "flags", NULL };
|
||||||
|
|
||||||
|
if ( !PyArg_ParseTupleAndKeywords(args, kwds, "|iiOi", kwd_list,
|
||||||
|
- &dom, &ssidref, &pyhandle, &hvm))
|
||||||
|
+ &dom, &ssidref, &pyhandle, &flags))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
if ( pyhandle != NULL )
|
||||||
|
@@ -124,9 +124,6 @@ static PyObject *pyxc_domain_create(XcOb
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if ( hvm )
|
||||||
|
- flags |= XEN_DOMCTL_CDF_hvm_guest;
|
||||||
|
-
|
||||||
|
if ( (ret = xc_domain_create(self->xc_handle, ssidref,
|
||||||
|
handle, flags, &dom)) < 0 )
|
||||||
|
return pyxc_error_to_exception();
|
||||||
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendConfig.py
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||||
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendConfig.py
|
||||||
|
@@ -130,7 +130,7 @@ XENAPI_PLATFORM_CFG = [ 'acpi', 'apic',
|
||||||
|
'soundhw','stdvga', 'usb', 'usbdevice', 'vnc',
|
||||||
|
'vncconsole', 'vncdisplay', 'vnclisten', 'timer_mode',
|
||||||
|
'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt',
|
||||||
|
- 'guest_os_type' ]
|
||||||
|
+ 'guest_os_type', 'hap']
|
||||||
|
|
||||||
|
# Xen API console 'other_config' keys.
|
||||||
|
XENAPI_CONSOLE_OTHER_CFG = ['vncunused', 'vncdisplay', 'vnclisten',
|
||||||
|
@@ -1588,3 +1588,6 @@ class XendConfig(dict):
|
||||||
|
def image_type(self):
|
||||||
|
stored_type = self['platform'].get('image_type')
|
||||||
|
return stored_type or (self.is_hvm() and 'hvm' or 'linux')
|
||||||
|
+
|
||||||
|
+ def is_hap(self):
|
||||||
|
+ return self['platform']['hap']
|
||||||
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
@@ -1624,11 +1624,18 @@ class XendDomainInfo:
|
||||||
|
@raise: VmError on error
|
||||||
|
"""
|
||||||
|
|
||||||
|
+ hvm_bit_offset = 0
|
||||||
|
+
|
||||||
|
+ hap_bit_offset = 1
|
||||||
|
+
|
||||||
|
log.debug('XendDomainInfo.constructDomain')
|
||||||
|
|
||||||
|
self.shutdownStartTime = None
|
||||||
|
|
||||||
|
hvm = self.info.is_hvm()
|
||||||
|
+
|
||||||
|
+ hap = self.info.is_hap()
|
||||||
|
+
|
||||||
|
if hvm:
|
||||||
|
info = xc.xeninfo()
|
||||||
|
if 'hvm' not in info['xen_caps']:
|
||||||
|
@@ -1654,7 +1661,7 @@ class XendDomainInfo:
|
||||||
|
domid = 0,
|
||||||
|
ssidref = ssidref,
|
||||||
|
handle = uuid.fromString(self.info['uuid']),
|
||||||
|
- hvm = int(hvm))
|
||||||
|
+ flags = int((hvm << hvm_bit_offset) | (hap << hap_bit_offset)))
|
||||||
|
except Exception, e:
|
||||||
|
# may get here if due to ACM the operation is not permitted
|
||||||
|
if security.on():
|
||||||
|
Index: xen-3.2.1-testing/tools/python/xen/xm/create.py
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/tools/python/xen/xm/create.py
|
||||||
|
+++ xen-3.2.1-testing/tools/python/xen/xm/create.py
|
||||||
|
@@ -521,6 +521,11 @@ gopts.var('on_xend_stop', val='ignore|sh
|
||||||
|
- suspend: Domain is suspended;
|
||||||
|
""")
|
||||||
|
|
||||||
|
+gopts.var('hap', val='HAP',
|
||||||
|
+ fn=set_int, default=1,
|
||||||
|
+ use="""Hap status (0=hap is disabled;
|
||||||
|
+ 1=hap is enabled.""")
|
||||||
|
+
|
||||||
|
def err(msg):
|
||||||
|
"""Print an error to stderr and exit.
|
||||||
|
"""
|
||||||
|
@@ -724,7 +729,7 @@ def configure_hvm(config_image, vals):
|
||||||
|
'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
|
||||||
|
'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
|
||||||
|
'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci',
|
||||||
|
- 'guest_os_type']
|
||||||
|
+ 'guest_os_type', 'hap']
|
||||||
|
|
||||||
|
for a in args:
|
||||||
|
if a in vals.__dict__ and vals.__dict__[a] is not None:
|
||||||
|
Index: xen-3.2.1-testing/tools/python/xen/xm/xenapi_create.py
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/tools/python/xen/xm/xenapi_create.py
|
||||||
|
+++ xen-3.2.1-testing/tools/python/xen/xm/xenapi_create.py
|
||||||
|
@@ -818,7 +818,7 @@ class sxp2xml:
|
||||||
|
|
||||||
|
|
||||||
|
def extract_platform(self, image, document):
|
||||||
|
- platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode']
|
||||||
|
+ platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode', 'hap']
|
||||||
|
|
||||||
|
def extract_platform_key(key):
|
||||||
|
platform = document.createElement("platform")
|
||||||
|
Index: xen-3.2.1-testing/xen/arch/ia64/xen/domain.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/ia64/xen/domain.c
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/ia64/xen/domain.c
|
||||||
|
@@ -550,7 +550,7 @@ static int opt_pervcpu_vhpt = 1;
|
||||||
|
integer_param("pervcpu_vhpt", opt_pervcpu_vhpt);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-int arch_domain_create(struct domain *d)
|
||||||
|
+int arch_domain_create(struct domain *d, unsigned int domcr_flags)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/xen/arch/powerpc/domain.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/powerpc/domain.c
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/powerpc/domain.c
|
||||||
|
@@ -76,7 +76,7 @@ unsigned long hypercall_create_continuat
|
||||||
|
return XEN_MARK(op);
|
||||||
|
}
|
||||||
|
|
||||||
|
-int arch_domain_create(struct domain *d)
|
||||||
|
+int arch_domain_create(struct domain *d, unsigned int domcr_flags)
|
||||||
|
{
|
||||||
|
if (d->domain_id == IDLE_DOMAIN_ID) {
|
||||||
|
d->shared_info = (void *)alloc_xenheap_page();
|
||||||
|
Index: xen-3.2.1-testing/xen/arch/x86/domain.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/x86/domain.c
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/x86/domain.c
|
||||||
|
@@ -436,7 +436,7 @@ void vcpu_destroy(struct vcpu *v)
|
||||||
|
hvm_vcpu_destroy(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
-int arch_domain_create(struct domain *d)
|
||||||
|
+int arch_domain_create(struct domain *d, unsigned int domcr_flags)
|
||||||
|
{
|
||||||
|
#ifdef __x86_64__
|
||||||
|
struct page_info *pg;
|
||||||
|
@@ -446,6 +446,11 @@ int arch_domain_create(struct domain *d)
|
||||||
|
int vcpuid, pdpt_order, paging_initialised = 0;
|
||||||
|
int rc = -ENOMEM;
|
||||||
|
|
||||||
|
+ d->arch.hvm_domain.hap_enabled =
|
||||||
|
+ is_hvm_domain(d) &&
|
||||||
|
+ hvm_funcs.hap_supported &&
|
||||||
|
+ (domcr_flags & DOMCRF_hap);
|
||||||
|
+
|
||||||
|
d->arch.relmem = RELMEM_not_started;
|
||||||
|
INIT_LIST_HEAD(&d->arch.relmem_list);
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/xen/arch/x86/mm/paging.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm/paging.c
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/x86/mm/paging.c
|
||||||
|
@@ -28,7 +28,7 @@
|
||||||
|
#include <asm/guest_access.h>
|
||||||
|
#include <xsm/xsm.h>
|
||||||
|
|
||||||
|
-#define hap_enabled(d) (hvm_funcs.hap_supported && is_hvm_domain(d))
|
||||||
|
+#define hap_enabled(d) (is_hvm_domain(d) && (d)->arch.hvm_domain.hap_enabled)
|
||||||
|
|
||||||
|
/* Printouts */
|
||||||
|
#define PAGING_PRINTK(_f, _a...) \
|
||||||
|
Index: xen-3.2.1-testing/xen/common/domain.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/common/domain.c
|
||||||
|
+++ xen-3.2.1-testing/xen/common/domain.c
|
||||||
|
@@ -235,7 +235,7 @@ struct domain *domain_create(
|
||||||
|
init_status |= INIT_gnttab;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if ( arch_domain_create(d) != 0 )
|
||||||
|
+ if ( arch_domain_create(d, domcr_flags) != 0 )
|
||||||
|
goto fail;
|
||||||
|
init_status |= INIT_arch;
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/xen/common/domctl.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/common/domctl.c
|
||||||
|
+++ xen-3.2.1-testing/xen/common/domctl.c
|
||||||
|
@@ -325,7 +325,8 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
|
||||||
|
|
||||||
|
ret = -EINVAL;
|
||||||
|
if ( supervisor_mode_kernel ||
|
||||||
|
- (op->u.createdomain.flags & ~XEN_DOMCTL_CDF_hvm_guest) )
|
||||||
|
+ (op->u.createdomain.flags &
|
||||||
|
+ ~(XEN_DOMCTL_CDF_hvm_guest | XEN_DOMCTL_CDF_hap)) )
|
||||||
|
break;
|
||||||
|
|
||||||
|
dom = op->domain;
|
||||||
|
@@ -355,6 +356,8 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domc
|
||||||
|
domcr_flags = 0;
|
||||||
|
if ( op->u.createdomain.flags & XEN_DOMCTL_CDF_hvm_guest )
|
||||||
|
domcr_flags |= DOMCRF_hvm;
|
||||||
|
+ if ( op->u.createdomain.flags & XEN_DOMCTL_CDF_hap )
|
||||||
|
+ domcr_flags |= DOMCRF_hap;
|
||||||
|
|
||||||
|
ret = -ENOMEM;
|
||||||
|
d = domain_create(dom, domcr_flags, op->u.createdomain.ssidref);
|
||||||
|
Index: xen-3.2.1-testing/xen/include/asm-x86/hvm/domain.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/hvm/domain.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/asm-x86/hvm/domain.h
|
||||||
|
@@ -73,6 +73,8 @@ struct hvm_domain {
|
||||||
|
|
||||||
|
/* Pass-through */
|
||||||
|
struct hvm_iommu hvm_iommu;
|
||||||
|
+
|
||||||
|
+ bool_t hap_enabled;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif /* __ASM_X86_HVM_DOMAIN_H__ */
|
||||||
|
Index: xen-3.2.1-testing/xen/include/public/domctl.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/public/domctl.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/public/domctl.h
|
||||||
|
@@ -53,6 +53,9 @@ struct xen_domctl_createdomain {
|
||||||
|
/* Is this an HVM guest (as opposed to a PV guest)? */
|
||||||
|
#define _XEN_DOMCTL_CDF_hvm_guest 0
|
||||||
|
#define XEN_DOMCTL_CDF_hvm_guest (1U<<_XEN_DOMCTL_CDF_hvm_guest)
|
||||||
|
+ /* Use hardware-assisted paging if available? */
|
||||||
|
+#define _XEN_DOMCTL_CDF_hap 1
|
||||||
|
+#define XEN_DOMCTL_CDF_hap (1U<<_XEN_DOMCTL_CDF_hap)
|
||||||
|
uint32_t flags;
|
||||||
|
};
|
||||||
|
typedef struct xen_domctl_createdomain xen_domctl_createdomain_t;
|
||||||
|
Index: xen-3.2.1-testing/xen/include/xen/domain.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/xen/domain.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/xen/domain.h
|
||||||
|
@@ -40,7 +40,7 @@ void free_vcpu_struct(struct vcpu *v);
|
||||||
|
int vcpu_initialise(struct vcpu *v);
|
||||||
|
void vcpu_destroy(struct vcpu *v);
|
||||||
|
|
||||||
|
-int arch_domain_create(struct domain *d);
|
||||||
|
+int arch_domain_create(struct domain *d, unsigned int domcr_flags);
|
||||||
|
|
||||||
|
void arch_domain_destroy(struct domain *d);
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/xen/include/xen/sched.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/xen/sched.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/xen/sched.h
|
||||||
|
@@ -311,6 +311,8 @@ struct domain *domain_create(
|
||||||
|
/* DOMCRF_hvm: Create an HVM domain, as opposed to a PV domain. */
|
||||||
|
#define _DOMCRF_hvm 0
|
||||||
|
#define DOMCRF_hvm (1U<<_DOMCRF_hvm)
|
||||||
|
+#define _DOMCRF_hap 1
|
||||||
|
+#define DOMCRF_hap (1U<<_DOMCRF_hap)
|
||||||
|
|
||||||
|
int construct_dom0(
|
||||||
|
struct domain *d,
|
@ -1,87 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1201619751 0
|
|
||||||
# Node ID 04e24b9dcc1649e86d3e94a81489dab9c6ec82bc
|
|
||||||
# Parent 98c2665056ea4fe63e02c943536db686fcedc459
|
|
||||||
xend: Obey localtime config option for HVM guests as well as PV guests.
|
|
||||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/lowlevel/xc/xc.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/lowlevel/xc/xc.c
|
|
||||||
+++ xen-3.2-testing/tools/python/xen/lowlevel/xc/xc.c
|
|
||||||
@@ -1154,23 +1154,13 @@ static PyObject *pyxc_domain_iomem_permi
|
|
||||||
static PyObject *pyxc_domain_set_time_offset(XcObject *self, PyObject *args)
|
|
||||||
{
|
|
||||||
uint32_t dom;
|
|
||||||
- int32_t time_offset_seconds;
|
|
||||||
- time_t calendar_time;
|
|
||||||
- struct tm local_time;
|
|
||||||
- struct tm utc_time;
|
|
||||||
+ int32_t offset;
|
|
||||||
|
|
||||||
- if (!PyArg_ParseTuple(args, "i", &dom))
|
|
||||||
+ if (!PyArg_ParseTuple(args, "ii", &dom, &offset))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
- calendar_time = time(NULL);
|
|
||||||
- localtime_r(&calendar_time, &local_time);
|
|
||||||
- gmtime_r(&calendar_time, &utc_time);
|
|
||||||
- /* set up to get calendar time based on utc_time, with local dst setting */
|
|
||||||
- utc_time.tm_isdst = local_time.tm_isdst;
|
|
||||||
- time_offset_seconds = (int32_t)difftime(calendar_time, mktime(&utc_time));
|
|
||||||
-
|
|
||||||
- if (xc_domain_set_time_offset(self->xc_handle, dom, time_offset_seconds) != 0)
|
|
||||||
- return NULL;
|
|
||||||
+ if (xc_domain_set_time_offset(self->xc_handle, dom, offset) != 0)
|
|
||||||
+ return pyxc_error_to_exception();
|
|
||||||
|
|
||||||
Py_INCREF(zero);
|
|
||||||
return zero;
|
|
||||||
@@ -1619,6 +1609,7 @@ static PyMethodDef pyxc_methods[] = {
|
|
||||||
METH_VARARGS, "\n"
|
|
||||||
"Set a domain's time offset to Dom0's localtime\n"
|
|
||||||
" dom [int]: Domain whose time offset is being set.\n"
|
|
||||||
+ " offset [int]: Time offset from UTC in seconds.\n"
|
|
||||||
"Returns: [int] 0 on success; -1 on error.\n" },
|
|
||||||
|
|
||||||
{ "domain_send_trigger",
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|
||||||
@@ -1708,10 +1708,14 @@ class XendDomainInfo:
|
|
||||||
self._configureBootloader()
|
|
||||||
|
|
||||||
try:
|
|
||||||
- self.image = image.create(self, self.info)
|
|
||||||
-
|
|
||||||
if self.info['platform'].get('localtime', 0):
|
|
||||||
- xc.domain_set_time_offset(self.domid)
|
|
||||||
+ t = time.time()
|
|
||||||
+ loc = time.localtime(t)
|
|
||||||
+ utc = time.gmtime(t)
|
|
||||||
+ timeoffset = int(time.mktime(loc) - time.mktime(utc))
|
|
||||||
+ self.info['platform']['rtc_timeoffset'] = timeoffset
|
|
||||||
+
|
|
||||||
+ self.image = image.create(self, self.info)
|
|
||||||
|
|
||||||
xc.domain_setcpuweight(self.domid, \
|
|
||||||
self.info['vcpus_params']['weight'])
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/image.py
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/image.py
|
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/image.py
|
|
||||||
@@ -342,6 +342,12 @@ class LinuxImageHandler(ImageHandler):
|
|
||||||
flags = 0
|
|
||||||
vhpt = 0
|
|
||||||
|
|
||||||
+ def configure(self, vmConfig):
|
|
||||||
+ ImageHandler.configure(self, vmConfig)
|
|
||||||
+ rtc_timeoffset = vmConfig['platform'].get('rtc_timeoffset')
|
|
||||||
+ if rtc_timeoffset is not None:
|
|
||||||
+ xc.domain_set_time_offset(self.vm.getDomid(), rtc_timeoffset)
|
|
||||||
+
|
|
||||||
def buildDomain(self):
|
|
||||||
store_evtchn = self.vm.getStorePort()
|
|
||||||
console_evtchn = self.vm.getConsolePort()
|
|
53
16933-hvm-hap-fix.patch
Normal file
53
16933-hvm-hap-fix.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User Keir Fraser <keir.fraser@citrix.com>
|
||||||
|
# Date 1201619795 0
|
||||||
|
# Node ID 233f40973e1d689d66b25e439b2f48524dd579ea
|
||||||
|
# Parent 04e24b9dcc1649e86d3e94a81489dab9c6ec82bc
|
||||||
|
xend: Fix building PV guests after introducing new HVM-HAP config option.
|
||||||
|
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendConfig.py
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||||
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendConfig.py
|
||||||
|
@@ -1590,4 +1590,4 @@ class XendConfig(dict):
|
||||||
|
return stored_type or (self.is_hvm() and 'hvm' or 'linux')
|
||||||
|
|
||||||
|
def is_hap(self):
|
||||||
|
- return self['platform']['hap']
|
||||||
|
+ return self['platform'].get('hap', 0)
|
||||||
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
@@ -1624,19 +1624,14 @@ class XendDomainInfo:
|
||||||
|
@raise: VmError on error
|
||||||
|
"""
|
||||||
|
|
||||||
|
- hvm_bit_offset = 0
|
||||||
|
-
|
||||||
|
- hap_bit_offset = 1
|
||||||
|
-
|
||||||
|
log.debug('XendDomainInfo.constructDomain')
|
||||||
|
|
||||||
|
self.shutdownStartTime = None
|
||||||
|
|
||||||
|
+ hap = 0
|
||||||
|
hvm = self.info.is_hvm()
|
||||||
|
-
|
||||||
|
- hap = self.info.is_hap()
|
||||||
|
-
|
||||||
|
if hvm:
|
||||||
|
+ hap = self.info.is_hap()
|
||||||
|
info = xc.xeninfo()
|
||||||
|
if 'hvm' not in info['xen_caps']:
|
||||||
|
raise VmError("HVM guest support is unavailable: is VT/AMD-V "
|
||||||
|
@@ -1661,7 +1656,7 @@ class XendDomainInfo:
|
||||||
|
domid = 0,
|
||||||
|
ssidref = ssidref,
|
||||||
|
handle = uuid.fromString(self.info['uuid']),
|
||||||
|
- flags = int((hvm << hvm_bit_offset) | (hap << hap_bit_offset)))
|
||||||
|
+ flags = int((hvm << 0) | (hap << 1)))
|
||||||
|
except Exception, e:
|
||||||
|
# may get here if due to ACM the operation is not permitted
|
||||||
|
if security.on():
|
21
16939-hvm-hap-fix.patch
Normal file
21
16939-hvm-hap-fix.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User Keir Fraser <keir.fraser@citrix.com>
|
||||||
|
# Date 1201685890 0
|
||||||
|
# Node ID 47b7ec3b4055d59a09a1af26a29e8ef90e0d8d9c
|
||||||
|
# Parent 92aa029e7cb19ac32c7e3ff2a3d78bd67af047f3
|
||||||
|
xend: Small fix for hvm/hap flags.
|
||||||
|
Signed-off-by: Yosuke Iwamatsu <y-iwamatsu@ab.jp.nec.com>
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
@@ -1656,7 +1656,7 @@ class XendDomainInfo:
|
||||||
|
domid = 0,
|
||||||
|
ssidref = ssidref,
|
||||||
|
handle = uuid.fromString(self.info['uuid']),
|
||||||
|
- flags = int((hvm << 0) | (hap << 1)))
|
||||||
|
+ flags = (int(hvm) << 0) | (int(hap) << 1))
|
||||||
|
except Exception, e:
|
||||||
|
# may get here if due to ACM the operation is not permitted
|
||||||
|
if security.on():
|
@ -1,49 +0,0 @@
|
|||||||
Index: xen-3.2-testing/tools/ioemu/xenstore.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/xenstore.c
|
|
||||||
+++ xen-3.2-testing/tools/ioemu/xenstore.c
|
|
||||||
@@ -418,7 +418,7 @@ void xenstore_record_dm_state(char *stat
|
|
||||||
|
|
||||||
void xenstore_process_event(void *opaque)
|
|
||||||
{
|
|
||||||
- char **vec, *image = NULL;
|
|
||||||
+ char **vec, *offset, *bpath = NULL, *buf = NULL, *drv = NULL, *image = NULL;
|
|
||||||
unsigned int len, num, hd_index;
|
|
||||||
|
|
||||||
vec = xs_read_watch(xsh, &num);
|
|
||||||
@@ -440,8 +440,23 @@ void xenstore_process_event(void *opaque
|
|
||||||
goto out;
|
|
||||||
hd_index = vec[XS_WATCH_TOKEN][2] - 'a';
|
|
||||||
image = xs_read(xsh, XBT_NULL, vec[XS_WATCH_PATH], &len);
|
|
||||||
- if (image == NULL || !strcmp(image, bs_table[hd_index]->filename))
|
|
||||||
- goto out; /* gone or identical */
|
|
||||||
+ if (image == NULL)
|
|
||||||
+ goto out; /* gone */
|
|
||||||
+
|
|
||||||
+ /* Strip off blktap sub-type prefix */
|
|
||||||
+ bpath = strdup(vec[XS_WATCH_PATH]);
|
|
||||||
+ if (bpath == NULL)
|
|
||||||
+ goto out;
|
|
||||||
+ if ((offset = strrchr(bpath, '/')) != NULL)
|
|
||||||
+ *offset = '\0';
|
|
||||||
+ if (pasprintf(&buf, "%s/type", bpath) == -1)
|
|
||||||
+ goto out;
|
|
||||||
+ drv = xs_read(xsh, XBT_NULL, buf, &len);
|
|
||||||
+ if (drv && !strcmp(drv, "tap") && ((offset = strchr(image, ':')) != NULL))
|
|
||||||
+ memmove(image, offset+1, strlen(offset+1)+1);
|
|
||||||
+
|
|
||||||
+ if (!strcmp(image, bs_table[hd_index]->filename))
|
|
||||||
+ goto out; /* identical */
|
|
||||||
|
|
||||||
do_eject(0, vec[XS_WATCH_TOKEN]);
|
|
||||||
bs_table[hd_index]->filename[0] = 0;
|
|
||||||
@@ -456,6 +471,9 @@ void xenstore_process_event(void *opaque
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
+ free(drv);
|
|
||||||
+ free(buf);
|
|
||||||
+ free(bpath);
|
|
||||||
free(image);
|
|
||||||
free(vec);
|
|
||||||
}
|
|
@ -1,7 +1,7 @@
|
|||||||
Index: xen-3.2-testing/tools/ioemu/hw/xen_machine_fv.c
|
Index: xen-3.2.1-testing/tools/ioemu/hw/xen_machine_fv.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/hw/xen_machine_fv.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/hw/xen_machine_fv.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/hw/xen_machine_fv.c
|
+++ xen-3.2.1-testing/tools/ioemu/hw/xen_machine_fv.c
|
||||||
@@ -205,6 +205,8 @@ static void xen_init_fv(uint64_t ram_siz
|
@@ -205,6 +205,8 @@ static void xen_init_fv(uint64_t ram_siz
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -11,11 +11,11 @@ Index: xen-3.2-testing/tools/ioemu/hw/xen_machine_fv.c
|
|||||||
xc_get_hvm_param(xc_handle, domid, HVM_PARAM_IOREQ_PFN, &ioreq_pfn);
|
xc_get_hvm_param(xc_handle, domid, HVM_PARAM_IOREQ_PFN, &ioreq_pfn);
|
||||||
fprintf(logfile, "shared page at pfn %lx\n", ioreq_pfn);
|
fprintf(logfile, "shared page at pfn %lx\n", ioreq_pfn);
|
||||||
shared_page = xc_map_foreign_range(xc_handle, domid, XC_PAGE_SIZE,
|
shared_page = xc_map_foreign_range(xc_handle, domid, XC_PAGE_SIZE,
|
||||||
Index: xen-3.2-testing/tools/ioemu/vl.c
|
Index: xen-3.2.1-testing/tools/ioemu/vl.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/vl.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/vl.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/vl.c
|
+++ xen-3.2.1-testing/tools/ioemu/vl.c
|
||||||
@@ -7593,7 +7593,7 @@ int main(int argc, char **argv)
|
@@ -7613,7 +7613,7 @@ int main(int argc, char **argv)
|
||||||
#ifdef CONFIG_DM
|
#ifdef CONFIG_DM
|
||||||
bdrv_init();
|
bdrv_init();
|
||||||
xc_handle = xc_interface_open();
|
xc_handle = xc_interface_open();
|
||||||
@ -24,11 +24,11 @@ Index: xen-3.2-testing/tools/ioemu/vl.c
|
|||||||
#endif /* CONFIG_DM */
|
#endif /* CONFIG_DM */
|
||||||
|
|
||||||
#ifdef USE_KQEMU
|
#ifdef USE_KQEMU
|
||||||
Index: xen-3.2-testing/tools/ioemu/vl.h
|
Index: xen-3.2.1-testing/tools/ioemu/vl.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/vl.h
|
--- xen-3.2.1-testing.orig/tools/ioemu/vl.h
|
||||||
+++ xen-3.2-testing/tools/ioemu/vl.h
|
+++ xen-3.2.1-testing/tools/ioemu/vl.h
|
||||||
@@ -1454,6 +1454,7 @@ void readline_start(const char *prompt,
|
@@ -1456,6 +1456,7 @@ void readline_start(const char *prompt,
|
||||||
ReadLineFunc *readline_func, void *opaque);
|
ReadLineFunc *readline_func, void *opaque);
|
||||||
|
|
||||||
/* xenstore.c */
|
/* xenstore.c */
|
||||||
@ -36,10 +36,10 @@ Index: xen-3.2-testing/tools/ioemu/vl.h
|
|||||||
void xenstore_parse_domain_config(int domid);
|
void xenstore_parse_domain_config(int domid);
|
||||||
int xenstore_fd(void);
|
int xenstore_fd(void);
|
||||||
void xenstore_process_event(void *opaque);
|
void xenstore_process_event(void *opaque);
|
||||||
Index: xen-3.2-testing/tools/ioemu/xenstore.c
|
Index: xen-3.2.1-testing/tools/ioemu/xenstore.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/xenstore.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/xenstore.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/xenstore.c
|
+++ xen-3.2.1-testing/tools/ioemu/xenstore.c
|
||||||
@@ -77,6 +77,13 @@ static void waitForDevice(char *fn)
|
@@ -77,6 +77,13 @@ static void waitForDevice(char *fn)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -54,7 +54,7 @@ Index: xen-3.2-testing/tools/ioemu/xenstore.c
|
|||||||
void xenstore_parse_domain_config(int domid)
|
void xenstore_parse_domain_config(int domid)
|
||||||
{
|
{
|
||||||
char **e = NULL;
|
char **e = NULL;
|
||||||
@@ -89,12 +96,6 @@ void xenstore_parse_domain_config(int do
|
@@ -90,12 +97,6 @@ void xenstore_parse_domain_config(int do
|
||||||
for(i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++)
|
for(i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++)
|
||||||
media_filename[i] = NULL;
|
media_filename[i] = NULL;
|
||||||
|
|
||||||
|
@ -1,21 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1201864887 0
|
|
||||||
# Node ID 3787e70b2ab219de50dff7417917fd9f9ccfcc35
|
|
||||||
# Parent 396ab902b02daf14deed0f3261c1c179b7378b4d
|
|
||||||
x86 shadow: Fix cross-page write emulation failure.
|
|
||||||
Signed-off-by: Disheng Su <disheng.su@intel.com>
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/mm/shadow/multi.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/mm/shadow/multi.c
|
|
||||||
+++ xen-3.2-testing/xen/arch/x86/mm/shadow/multi.c
|
|
||||||
@@ -4076,7 +4076,7 @@ static void *emulate_map_dest(struct vcp
|
|
||||||
sh_ctxt->mfn2 = emulate_gva_to_mfn(v, (vaddr + bytes - 1) & PAGE_MASK,
|
|
||||||
sh_ctxt);
|
|
||||||
if ( !mfn_valid(sh_ctxt->mfn2) )
|
|
||||||
- return ((mfn_x(sh_ctxt->mfn1) == BAD_GVA_TO_GFN) ?
|
|
||||||
+ return ((mfn_x(sh_ctxt->mfn2) == BAD_GVA_TO_GFN) ?
|
|
||||||
MAPPING_EXCEPTION : MAPPING_UNHANDLEABLE);
|
|
||||||
|
|
||||||
/* Cross-page writes mean probably not a pagetable */
|
|
@ -1,24 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1201949604 0
|
|
||||||
# Node ID b1b93caa7d8e2414af06f06c3a9734675f715bad
|
|
||||||
# Parent 5d84464dc1fc013110c25dc0ff1f99585e699fa3
|
|
||||||
xend: Fix grow of the LEGACY_UNSUPPORTED_BY_XENAPI_CFG list each time
|
|
||||||
we instantiate a new XendConfig.
|
|
||||||
Signed-off-by: Pascal Bouchareine <pascal@gandi.net>
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendConfig.py
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendConfig.py
|
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendConfig.py
|
|
||||||
@@ -501,8 +501,8 @@ class XendConfig(dict):
|
|
||||||
int(sxp.child_value(sxp_cfg, "cpu_cap", 0))
|
|
||||||
|
|
||||||
# Only extract options we know about.
|
|
||||||
- extract_keys = LEGACY_UNSUPPORTED_BY_XENAPI_CFG
|
|
||||||
- extract_keys += XENAPI_CFG_TO_LEGACY_CFG.values()
|
|
||||||
+ extract_keys = LEGACY_UNSUPPORTED_BY_XENAPI_CFG + \
|
|
||||||
+ XENAPI_CFG_TO_LEGACY_CFG.values()
|
|
||||||
|
|
||||||
for key in extract_keys:
|
|
||||||
val = sxp.child_value(sxp_cfg, key)
|
|
@ -1,22 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1202207359 0
|
|
||||||
# Node ID 32e9c52fc6d9a6104afb2dbd84a89395b16f0e34
|
|
||||||
# Parent 99b8ffe250888d0c3fe86b726edf18f620072045
|
|
||||||
x86_emulate: Fix SAHF emulation.
|
|
||||||
Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com>
|
|
||||||
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/x86_emulate.c
|
|
||||||
+++ xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|
||||||
@@ -2176,7 +2176,7 @@ x86_emulate(
|
|
||||||
}
|
|
||||||
|
|
||||||
case 0x9e: /* sahf */
|
|
||||||
- *(uint8_t *)_regs.eflags = (((uint8_t *)&_regs.eax)[1] & 0xd7) | 0x02;
|
|
||||||
+ *(uint8_t *)&_regs.eflags = (((uint8_t *)&_regs.eax)[1] & 0xd7) | 0x02;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 0x9f: /* lahf */
|
|
@ -13,11 +13,11 @@ domains, not previous domains.
|
|||||||
|
|
||||||
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
|
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
@@ -880,6 +880,9 @@ class XendDomainInfo:
|
@@ -882,6 +882,9 @@ class XendDomainInfo:
|
||||||
def _gatherVm(self, *args):
|
def _gatherVm(self, *args):
|
||||||
return xstransact.Gather(self.vmpath, *args)
|
return xstransact.Gather(self.vmpath, *args)
|
||||||
|
|
||||||
@ -27,7 +27,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
def storeVm(self, *args):
|
def storeVm(self, *args):
|
||||||
return xstransact.Store(self.vmpath, *args)
|
return xstransact.Store(self.vmpath, *args)
|
||||||
|
|
||||||
@@ -1387,6 +1390,7 @@ class XendDomainInfo:
|
@@ -1392,6 +1395,7 @@ class XendDomainInfo:
|
||||||
|
|
||||||
self._writeVm('xend/previous_restart_time', str(now))
|
self._writeVm('xend/previous_restart_time', str(now))
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
new_dom_info = self.info
|
new_dom_info = self.info
|
||||||
try:
|
try:
|
||||||
if rename:
|
if rename:
|
||||||
@@ -1405,8 +1409,13 @@ class XendDomainInfo:
|
@@ -1410,8 +1414,13 @@ class XendDomainInfo:
|
||||||
try:
|
try:
|
||||||
new_dom = XendDomain.instance().domain_create_from_dict(
|
new_dom = XendDomain.instance().domain_create_from_dict(
|
||||||
new_dom_info)
|
new_dom_info)
|
||||||
@ -49,7 +49,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
new_dom._removeVm(RESTART_IN_PROGRESS)
|
new_dom._removeVm(RESTART_IN_PROGRESS)
|
||||||
except:
|
except:
|
||||||
if new_dom:
|
if new_dom:
|
||||||
@@ -1442,9 +1451,6 @@ class XendDomainInfo:
|
@@ -1447,9 +1456,6 @@ class XendDomainInfo:
|
||||||
self.vmpath = XS_VMROOT + new_uuid
|
self.vmpath = XS_VMROOT + new_uuid
|
||||||
# Write out new vm node to xenstore
|
# Write out new vm node to xenstore
|
||||||
self._storeVmDetails()
|
self._storeVmDetails()
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1202226659 0
|
|
||||||
# Node ID bf4a24c172d23ae9839ee564225d49ed95167de3
|
|
||||||
# Parent 92734271810aaa32d27fce777684649995fb1665
|
|
||||||
x86_emulate: fix side-effect macro call.
|
|
||||||
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/x86_emulate.c
|
|
||||||
+++ xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|
||||||
@@ -546,7 +546,8 @@ do {
|
|
||||||
|
|
||||||
#define jmp_rel(rel) \
|
|
||||||
do { \
|
|
||||||
- _regs.eip += (int)(rel); \
|
|
||||||
+ int _rel = (int)(rel); \
|
|
||||||
+ _regs.eip += _rel; \
|
|
||||||
if ( !mode_64bit() ) \
|
|
||||||
_regs.eip = ((op_bytes == 2) \
|
|
||||||
? (uint16_t)_regs.eip : (uint32_t)_regs.eip); \
|
|
||||||
@@ -2543,9 +2544,11 @@ x86_emulate(
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
- case 0xeb: /* jmp (short) */
|
|
||||||
- jmp_rel(insn_fetch_type(int8_t));
|
|
||||||
+ case 0xeb: /* jmp (short) */ {
|
|
||||||
+ int rel = insn_fetch_type(int8_t);
|
|
||||||
+ jmp_rel(rel);
|
|
||||||
break;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
case 0xf1: /* int1 (icebp) */
|
|
||||||
src.val = EXC_DB;
|
|
@ -1,62 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1202376466 0
|
|
||||||
# Node ID d04593aa1605fd337423b2c1296e275424e06656
|
|
||||||
# Parent 45b2e7d59e3a1895e903cbb7939e79c2f1f351d6
|
|
||||||
xm reboot: Fix wait option of xm reboot command
|
|
||||||
|
|
||||||
When I rebooted a domain by xm reboot command with wait option,
|
|
||||||
I saw the following message. But, rebooting the domain succeeded.
|
|
||||||
Domain vm1 destroyed for failed in rebooting
|
|
||||||
|
|
||||||
The cause why the message was shown is the domain is destroyed
|
|
||||||
temporarily by processing of xm reboot command. The domain
|
|
||||||
information is not gotten from Xend by server.xend.domains()
|
|
||||||
function till recreating the domain is completed.
|
|
||||||
This patch fixes processing of xm reboot command in Xm side.
|
|
||||||
It waits just a bit till recreating the domain is completed,
|
|
||||||
then it measures the success or failure of the reboot of the
|
|
||||||
domain.
|
|
||||||
|
|
||||||
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
|
|
||||||
|
|
||||||
diff -r 45b2e7d59e3a -r d04593aa1605 tools/python/xen/xm/shutdown.py
|
|
||||||
--- a/tools/python/xen/xm/shutdown.py Thu Feb 07 09:21:19 2008 +0000
|
|
||||||
+++ b/tools/python/xen/xm/shutdown.py Thu Feb 07 09:27:46 2008 +0000
|
|
||||||
@@ -23,6 +23,8 @@ from opts import *
|
|
||||||
from opts import *
|
|
||||||
from main import server, serverType, SERVER_XEN_API, get_single_vm
|
|
||||||
from xen.xend.XendAPIConstants import *
|
|
||||||
+
|
|
||||||
+RECREATING_TIMEOUT = 30
|
|
||||||
|
|
||||||
gopts = Opts(use="""[options] [DOM]
|
|
||||||
|
|
||||||
@@ -53,6 +55,7 @@ def wait_reboot(opts, doms, rcs):
|
|
||||||
if serverType == SERVER_XEN_API:
|
|
||||||
opts.err("Cannot wait for reboot w/ XenAPI (yet)")
|
|
||||||
|
|
||||||
+ recreating = {}
|
|
||||||
while doms:
|
|
||||||
alive = server.xend.domains(0)
|
|
||||||
reboot = []
|
|
||||||
@@ -61,9 +64,17 @@ def wait_reboot(opts, doms, rcs):
|
|
||||||
rc = server.xend.domain.getRestartCount(d)
|
|
||||||
if rc == rcs[d]: continue
|
|
||||||
reboot.append(d)
|
|
||||||
+
|
|
||||||
+ # Probably the domain is being recreated now.
|
|
||||||
+ # We have to wait just a bit for recreating the domain.
|
|
||||||
+ elif not recreating.has_key(d):
|
|
||||||
+ recreating[d] = 0
|
|
||||||
else:
|
|
||||||
- opts.info("Domain %s destroyed for failed in rebooting" % d)
|
|
||||||
- doms.remove(d)
|
|
||||||
+ recreating[d] += 1
|
|
||||||
+ if recreating[d] > RECREATING_TIMEOUT:
|
|
||||||
+ opts.info("Domain %s destroyed for failing to reboot" % d)
|
|
||||||
+ doms.remove(d)
|
|
||||||
+
|
|
||||||
for d in reboot:
|
|
||||||
opts.info("Domain %s rebooted" % d)
|
|
||||||
doms.remove(d)
|
|
@ -11,10 +11,10 @@ config files and through the xm tool as well.
|
|||||||
|
|
||||||
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
|
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
|
||||||
|
|
||||||
Index: xen-3.2-testing/docs/man/xmdomain.cfg.pod.5
|
Index: xen-3.2.1-testing/docs/man/xmdomain.cfg.pod.5
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/docs/man/xmdomain.cfg.pod.5
|
--- xen-3.2.1-testing.orig/docs/man/xmdomain.cfg.pod.5
|
||||||
+++ xen-3.2-testing/docs/man/xmdomain.cfg.pod.5
|
+++ xen-3.2.1-testing/docs/man/xmdomain.cfg.pod.5
|
||||||
@@ -298,6 +298,22 @@ it holds, so that the new one may take t
|
@@ -298,6 +298,22 @@ it holds, so that the new one may take t
|
||||||
|
|
||||||
=back
|
=back
|
||||||
@ -38,10 +38,10 @@ Index: xen-3.2-testing/docs/man/xmdomain.cfg.pod.5
|
|||||||
=head1 EXAMPLES
|
=head1 EXAMPLES
|
||||||
|
|
||||||
The following are quick examples of ways that domains might be
|
The following are quick examples of ways that domains might be
|
||||||
Index: xen-3.2-testing/tools/examples/xmexample.hvm
|
Index: xen-3.2.1-testing/tools/examples/xmexample.hvm
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/examples/xmexample.hvm
|
--- xen-3.2.1-testing.orig/tools/examples/xmexample.hvm
|
||||||
+++ xen-3.2-testing/tools/examples/xmexample.hvm
|
+++ xen-3.2.1-testing/tools/examples/xmexample.hvm
|
||||||
@@ -87,6 +87,11 @@ disk = [ 'file:/var/images/min-el3-i386.
|
@@ -87,6 +87,11 @@ disk = [ 'file:/var/images/min-el3-i386.
|
||||||
# "rename-restart", meaning that the old domain is not cleaned up, but is
|
# "rename-restart", meaning that the old domain is not cleaned up, but is
|
||||||
# renamed and a new domain started in its place.
|
# renamed and a new domain started in its place.
|
||||||
@ -54,10 +54,10 @@ Index: xen-3.2-testing/tools/examples/xmexample.hvm
|
|||||||
# The default is
|
# The default is
|
||||||
#
|
#
|
||||||
# on_poweroff = 'destroy'
|
# on_poweroff = 'destroy'
|
||||||
Index: xen-3.2-testing/tools/examples/xmexample1
|
Index: xen-3.2.1-testing/tools/examples/xmexample1
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/examples/xmexample1
|
--- xen-3.2.1-testing.orig/tools/examples/xmexample1
|
||||||
+++ xen-3.2-testing/tools/examples/xmexample1
|
+++ xen-3.2.1-testing/tools/examples/xmexample1
|
||||||
@@ -155,6 +155,11 @@ extra = "4"
|
@@ -155,6 +155,11 @@ extra = "4"
|
||||||
# "rename-restart", meaning that the old domain is not cleaned up, but is
|
# "rename-restart", meaning that the old domain is not cleaned up, but is
|
||||||
# renamed and a new domain started in its place.
|
# renamed and a new domain started in its place.
|
||||||
@ -70,10 +70,10 @@ Index: xen-3.2-testing/tools/examples/xmexample1
|
|||||||
# The default is
|
# The default is
|
||||||
#
|
#
|
||||||
# on_poweroff = 'destroy'
|
# on_poweroff = 'destroy'
|
||||||
Index: xen-3.2-testing/tools/examples/xmexample2
|
Index: xen-3.2.1-testing/tools/examples/xmexample2
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/examples/xmexample2
|
--- xen-3.2.1-testing.orig/tools/examples/xmexample2
|
||||||
+++ xen-3.2-testing/tools/examples/xmexample2
|
+++ xen-3.2.1-testing/tools/examples/xmexample2
|
||||||
@@ -191,6 +191,11 @@ extra = "4 VMID=%d usr=/dev/sda6" % vmid
|
@@ -191,6 +191,11 @@ extra = "4 VMID=%d usr=/dev/sda6" % vmid
|
||||||
# "rename-restart", meaning that the old domain is not cleaned up, but is
|
# "rename-restart", meaning that the old domain is not cleaned up, but is
|
||||||
# renamed and a new domain started in its place.
|
# renamed and a new domain started in its place.
|
||||||
@ -86,10 +86,10 @@ Index: xen-3.2-testing/tools/examples/xmexample2
|
|||||||
# The default is
|
# The default is
|
||||||
#
|
#
|
||||||
# on_poweroff = 'destroy'
|
# on_poweroff = 'destroy'
|
||||||
Index: xen-3.2-testing/tools/examples/xmexample3
|
Index: xen-3.2.1-testing/tools/examples/xmexample3
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/examples/xmexample3
|
--- xen-3.2.1-testing.orig/tools/examples/xmexample3
|
||||||
+++ xen-3.2-testing/tools/examples/xmexample3
|
+++ xen-3.2.1-testing/tools/examples/xmexample3
|
||||||
@@ -177,6 +177,11 @@ extra = "4 VMID=%d" % vmid
|
@@ -177,6 +177,11 @@ extra = "4 VMID=%d" % vmid
|
||||||
# "rename-restart", meaning that the old domain is not cleaned up, but is
|
# "rename-restart", meaning that the old domain is not cleaned up, but is
|
||||||
# renamed and a new domain started in its place.
|
# renamed and a new domain started in its place.
|
||||||
@ -102,10 +102,10 @@ Index: xen-3.2-testing/tools/examples/xmexample3
|
|||||||
# The default is
|
# The default is
|
||||||
#
|
#
|
||||||
# on_poweroff = 'destroy'
|
# on_poweroff = 'destroy'
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendAPIConstants.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendAPIConstants.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendAPIConstants.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendAPIConstants.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendAPIConstants.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendAPIConstants.py
|
||||||
@@ -51,6 +51,18 @@ XEN_API_ON_CRASH_BEHAVIOUR = [
|
@@ -51,6 +51,18 @@ XEN_API_ON_CRASH_BEHAVIOUR = [
|
||||||
'rename_restart'
|
'rename_restart'
|
||||||
]
|
]
|
||||||
@ -125,10 +125,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendAPIConstants.py
|
|||||||
XEN_API_VBD_MODE = ['RO', 'RW']
|
XEN_API_VBD_MODE = ['RO', 'RW']
|
||||||
XEN_API_VDI_TYPE = ['system', 'user', 'ephemeral']
|
XEN_API_VDI_TYPE = ['system', 'user', 'ephemeral']
|
||||||
XEN_API_VBD_TYPE = ['CD', 'Disk']
|
XEN_API_VBD_TYPE = ['CD', 'Disk']
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendConfig.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendConfig.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendConfig.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendConfig.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendConfig.py
|
||||||
@@ -241,7 +241,8 @@ LEGACY_XENSTORE_VM_PARAMS = [
|
@@ -241,7 +241,8 @@ LEGACY_XENSTORE_VM_PARAMS = [
|
||||||
## Config Choices
|
## Config Choices
|
||||||
##
|
##
|
||||||
@ -139,10 +139,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendConfig.py
|
|||||||
CONFIG_OLD_DOM_STATES = ('running', 'blocked', 'paused', 'shutdown',
|
CONFIG_OLD_DOM_STATES = ('running', 'blocked', 'paused', 'shutdown',
|
||||||
'crashed', 'dying')
|
'crashed', 'dying')
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendConstants.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendConstants.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendConstants.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendConstants.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendConstants.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendConstants.py
|
||||||
@@ -52,7 +52,9 @@ restart_modes = [
|
@@ -52,7 +52,9 @@ restart_modes = [
|
||||||
"restart",
|
"restart",
|
||||||
"destroy",
|
"destroy",
|
||||||
@ -154,11 +154,11 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendConstants.py
|
|||||||
]
|
]
|
||||||
|
|
||||||
DOM_STATES = [
|
DOM_STATES = [
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
@@ -1257,14 +1257,6 @@ class XendDomainInfo:
|
@@ -1262,14 +1262,6 @@ class XendDomainInfo:
|
||||||
self.info['name_label'], self.domid)
|
self.info['name_label'], self.domid)
|
||||||
self._writeVm(LAST_SHUTDOWN_REASON, 'crash')
|
self._writeVm(LAST_SHUTDOWN_REASON, 'crash')
|
||||||
|
|
||||||
@ -173,7 +173,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
restart_reason = 'crash'
|
restart_reason = 'crash'
|
||||||
self._stateSet(DOM_STATE_HALTED)
|
self._stateSet(DOM_STATE_HALTED)
|
||||||
|
|
||||||
@@ -1332,14 +1324,30 @@ class XendDomainInfo:
|
@@ -1337,14 +1329,30 @@ class XendDomainInfo:
|
||||||
def _clearRestart(self):
|
def _clearRestart(self):
|
||||||
self._removeDom("xend/shutdown_start_time")
|
self._removeDom("xend/shutdown_start_time")
|
||||||
|
|
||||||
@ -205,7 +205,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
|
|
||||||
action_conf = {
|
action_conf = {
|
||||||
'poweroff': 'actions_after_shutdown',
|
'poweroff': 'actions_after_shutdown',
|
||||||
@@ -2551,9 +2559,10 @@ class XendDomainInfo:
|
@@ -2559,9 +2567,10 @@ class XendDomainInfo:
|
||||||
|
|
||||||
def get_on_crash(self):
|
def get_on_crash(self):
|
||||||
after_crash = self.info.get('actions_after_crash')
|
after_crash = self.info.get('actions_after_crash')
|
||||||
@ -218,10 +218,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
|
|
||||||
def get_dev_config_by_uuid(self, dev_class, dev_uuid):
|
def get_dev_config_by_uuid(self, dev_class, dev_uuid):
|
||||||
""" Get's a device configuration either from XendConfig or
|
""" Get's a device configuration either from XendConfig or
|
||||||
Index: xen-3.2-testing/tools/python/xen/xm/create.py
|
Index: xen-3.2.1-testing/tools/python/xen/xm/create.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xm/create.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xm/create.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xm/create.py
|
+++ xen-3.2.1-testing/tools/python/xen/xm/create.py
|
||||||
@@ -260,15 +260,17 @@ gopts.var('on_reboot', val='destroy|rest
|
@@ -260,15 +260,17 @@ gopts.var('on_reboot', val='destroy|rest
|
||||||
renamed and a new domain started in its place.
|
renamed and a new domain started in its place.
|
||||||
""")
|
""")
|
||||||
|
@ -1,35 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1202407244 0
|
|
||||||
# Node ID 445edf4089a3ccaca977665423e903b5300832cb
|
|
||||||
# Parent e6cf98edf0c573d86c59863c6b861f9a4d6350c3
|
|
||||||
x86_emulate: Fix MUL emulation.
|
|
||||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/x86_emulate.c
|
|
||||||
+++ xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|
||||||
@@ -1547,11 +1547,14 @@ x86_emulate(
|
|
||||||
switch ( src.bytes )
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
+ dst.val = (uint8_t)dst.val;
|
|
||||||
dst.val *= src.val;
|
|
||||||
if ( (uint8_t)dst.val != (uint16_t)dst.val )
|
|
||||||
_regs.eflags |= EFLG_OF|EFLG_CF;
|
|
||||||
+ dst.bytes = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
+ dst.val = (uint16_t)dst.val;
|
|
||||||
dst.val *= src.val;
|
|
||||||
if ( (uint16_t)dst.val != (uint32_t)dst.val )
|
|
||||||
_regs.eflags |= EFLG_OF|EFLG_CF;
|
|
||||||
@@ -1559,6 +1562,7 @@ x86_emulate(
|
|
||||||
break;
|
|
||||||
#ifdef __x86_64__
|
|
||||||
case 4:
|
|
||||||
+ dst.val = (uint32_t)dst.val;
|
|
||||||
dst.val *= src.val;
|
|
||||||
if ( (uint32_t)dst.val != dst.val )
|
|
||||||
_regs.eflags |= EFLG_OF|EFLG_CF;
|
|
@ -1,20 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1202412636 0
|
|
||||||
# Node ID 1b750b9cf4319c076bb831d26dcdcffbd5cfb913
|
|
||||||
# Parent 8e4cd0658c4152a02576892e895e63772bd9df1c
|
|
||||||
x86_emulate: Fix IMUL r/m8 emulation.
|
|
||||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/x86_emulate.c
|
|
||||||
+++ xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|
||||||
@@ -1592,6 +1592,7 @@ x86_emulate(
|
|
||||||
(uint16_t)(int8_t)dst.val);
|
|
||||||
if ( (int8_t)dst.val != (uint16_t)dst.val )
|
|
||||||
_regs.eflags |= EFLG_OF|EFLG_CF;
|
|
||||||
+ dst.bytes = 2;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
dst.val = ((uint32_t)(int16_t)src.val *
|
|
@ -1,197 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1202723858 0
|
|
||||||
# Node ID 96b418cf047e6d869740efd3660ab175303a3148
|
|
||||||
# Parent c68ce89542c7fbba9d00fd3a7d4e190476554e55
|
|
||||||
qemu: Queue mouse clicks.
|
|
||||||
|
|
||||||
qemu doesn't enqueue mouse events, just records the latest mouse
|
|
||||||
state. This can cause some lost mouse double clicks if the events are
|
|
||||||
not processed fast enought. This patch implements a simple queue for
|
|
||||||
left mouse click events.
|
|
||||||
|
|
||||||
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
|
|
||||||
|
|
||||||
diff -r c68ce89542c7 -r 96b418cf047e tools/ioemu/hw/usb-hid.c
|
|
||||||
--- a/tools/ioemu/hw/usb-hid.c Mon Feb 11 09:47:19 2008 +0000
|
|
||||||
+++ b/tools/ioemu/hw/usb-hid.c Mon Feb 11 09:57:38 2008 +0000
|
|
||||||
@@ -224,15 +224,37 @@ static const uint8_t qemu_tablet_hid_rep
|
|
||||||
0xC0, /* End Collection */
|
|
||||||
};
|
|
||||||
|
|
||||||
+static int currentbutton = 0;
|
|
||||||
+typedef struct _mouseclick {
|
|
||||||
+ int button_state;
|
|
||||||
+ struct _mouseclick *next;
|
|
||||||
+} mouseclick;
|
|
||||||
+static mouseclick mousequeue[20];
|
|
||||||
+static mouseclick *head = mousequeue;
|
|
||||||
+static mouseclick *tail = mousequeue;
|
|
||||||
+
|
|
||||||
static void usb_mouse_event(void *opaque,
|
|
||||||
int dx1, int dy1, int dz1, int buttons_state)
|
|
||||||
{
|
|
||||||
USBMouseState *s = opaque;
|
|
||||||
+
|
|
||||||
+ if (s->status_changed == 1){
|
|
||||||
+ //A mouse event is lost
|
|
||||||
+ if (buttons_state != currentbutton && tail->next != head) {
|
|
||||||
+ //A left click event is lost: let's add it to the queue
|
|
||||||
+ //counter++;
|
|
||||||
+ tail->button_state = buttons_state;
|
|
||||||
+ tail = tail->next;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ s->buttons_state = buttons_state;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
s->dx += dx1;
|
|
||||||
s->dy += dy1;
|
|
||||||
s->dz += dz1;
|
|
||||||
- s->buttons_state = buttons_state;
|
|
||||||
+ currentbutton = buttons_state;
|
|
||||||
s->status_changed = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -240,11 +262,24 @@ static void usb_tablet_event(void *opaqu
|
|
||||||
int x, int y, int dz, int buttons_state)
|
|
||||||
{
|
|
||||||
USBMouseState *s = opaque;
|
|
||||||
+
|
|
||||||
+ if (s->status_changed == 1){
|
|
||||||
+ //A mouse event is lost
|
|
||||||
+ if (buttons_state != currentbutton && tail->next != head) {
|
|
||||||
+ //A left click event is lost: let's add it to the queue
|
|
||||||
+ //counter++;
|
|
||||||
+ tail->button_state = buttons_state;
|
|
||||||
+ tail = tail->next;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ s->buttons_state = buttons_state;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
s->x = x;
|
|
||||||
s->y = y;
|
|
||||||
s->dz += dz;
|
|
||||||
- s->buttons_state = buttons_state;
|
|
||||||
+ currentbutton = buttons_state;
|
|
||||||
s->status_changed = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -493,10 +528,17 @@ static int usb_mouse_handle_data(USBDevi
|
|
||||||
else if (s->kind == USB_TABLET)
|
|
||||||
ret = usb_tablet_poll(s, p->data, p->len);
|
|
||||||
|
|
||||||
- if (!s->status_changed)
|
|
||||||
+ if (!s->status_changed) {
|
|
||||||
ret = USB_RET_NAK;
|
|
||||||
- else
|
|
||||||
- s->status_changed = 0;
|
|
||||||
+ } else {
|
|
||||||
+ if (head != tail) {
|
|
||||||
+ s->buttons_state = head->button_state;
|
|
||||||
+ head = head->next;
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ s->status_changed = 0;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
|
|
||||||
} else {
|
|
||||||
goto fail;
|
|
||||||
@@ -567,6 +609,14 @@ USBDevice *usb_tablet_init(void)
|
|
||||||
USBDevice *usb_tablet_init(void)
|
|
||||||
{
|
|
||||||
USBMouseState *s;
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+ for (i = 0; i < 19; i++) {
|
|
||||||
+ mousequeue[i].button_state = 0;
|
|
||||||
+ mousequeue[i].next = &(mousequeue[i + 1]);
|
|
||||||
+ }
|
|
||||||
+ mousequeue[i].button_state = 0;
|
|
||||||
+ mousequeue[i].next = mousequeue;
|
|
||||||
|
|
||||||
s = qemu_mallocz(sizeof(USBMouseState));
|
|
||||||
if (!s)
|
|
||||||
@@ -591,6 +641,14 @@ USBDevice *usb_mouse_init(void)
|
|
||||||
USBDevice *usb_mouse_init(void)
|
|
||||||
{
|
|
||||||
USBMouseState *s;
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+ for (i = 0; i < 19; i++) {
|
|
||||||
+ mousequeue[i].button_state = 0;
|
|
||||||
+ mousequeue[i].next = &(mousequeue[i + 1]);
|
|
||||||
+ }
|
|
||||||
+ mousequeue[i].button_state = 0;
|
|
||||||
+ mousequeue[i].next = mousequeue;
|
|
||||||
|
|
||||||
s = qemu_mallocz(sizeof(USBMouseState));
|
|
||||||
if (!s)
|
|
||||||
diff -r c68ce89542c7 -r 96b418cf047e tools/ioemu/sdl.c
|
|
||||||
--- a/tools/ioemu/sdl.c Mon Feb 11 09:47:19 2008 +0000
|
|
||||||
+++ b/tools/ioemu/sdl.c Mon Feb 11 09:57:38 2008 +0000
|
|
||||||
@@ -259,11 +259,9 @@ static void sdl_grab_end(void)
|
|
||||||
sdl_update_caption();
|
|
||||||
}
|
|
||||||
|
|
||||||
-static void sdl_send_mouse_event(int dz)
|
|
||||||
-{
|
|
||||||
- int dx, dy, state, buttons;
|
|
||||||
- state = SDL_GetRelativeMouseState(&dx, &dy);
|
|
||||||
- buttons = 0;
|
|
||||||
+static void sdl_send_mouse_event(int dx, int dy, int dz, int state)
|
|
||||||
+{
|
|
||||||
+ int buttons = 0;
|
|
||||||
if (state & SDL_BUTTON(SDL_BUTTON_LEFT))
|
|
||||||
buttons |= MOUSE_EVENT_LBUTTON;
|
|
||||||
if (state & SDL_BUTTON(SDL_BUTTON_RIGHT))
|
|
||||||
@@ -425,11 +423,19 @@ static void sdl_refresh(DisplayState *ds
|
|
||||||
case SDL_MOUSEMOTION:
|
|
||||||
if (gui_grab || kbd_mouse_is_absolute() ||
|
|
||||||
absolute_enabled) {
|
|
||||||
- sdl_send_mouse_event(0);
|
|
||||||
+ int dx, dy, state;
|
|
||||||
+ state = SDL_GetRelativeMouseState(&dx, &dy);
|
|
||||||
+ sdl_send_mouse_event(dx, dy, 0, state);
|
|
||||||
+ }
|
|
||||||
+ break;
|
|
||||||
+ case SDL_MOUSEBUTTONUP:
|
|
||||||
+ if (gui_grab || kbd_mouse_is_absolute()) {
|
|
||||||
+ int dx, dy, state;
|
|
||||||
+ state = SDL_GetRelativeMouseState(&dx, &dy);
|
|
||||||
+ sdl_send_mouse_event(dx, dy, 0, state);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
|
||||||
- case SDL_MOUSEBUTTONUP:
|
|
||||||
{
|
|
||||||
SDL_MouseButtonEvent *bev = &ev->button;
|
|
||||||
if (!gui_grab && !kbd_mouse_is_absolute()) {
|
|
||||||
@@ -439,16 +445,19 @@ static void sdl_refresh(DisplayState *ds
|
|
||||||
sdl_grab_start();
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
- int dz;
|
|
||||||
+ int dx, dy, dz, state;
|
|
||||||
dz = 0;
|
|
||||||
+ state = SDL_GetRelativeMouseState(&dx, &dy);
|
|
||||||
#ifdef SDL_BUTTON_WHEELUP
|
|
||||||
- if (bev->button == SDL_BUTTON_WHEELUP && ev->type == SDL_MOUSEBUTTONDOWN) {
|
|
||||||
+ if (bev->button == SDL_BUTTON_WHEELUP) {
|
|
||||||
dz = -1;
|
|
||||||
- } else if (bev->button == SDL_BUTTON_WHEELDOWN && ev->type == SDL_MOUSEBUTTONDOWN) {
|
|
||||||
+ } else if (bev->button == SDL_BUTTON_WHEELDOWN) {
|
|
||||||
dz = 1;
|
|
||||||
+ } else {
|
|
||||||
+ state = bev->button | state;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
- sdl_send_mouse_event(dz);
|
|
||||||
+ sdl_send_mouse_event(dx, dy, dz, state);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
@ -13,10 +13,10 @@ timer_mode adjustments).
|
|||||||
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
|
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
|
||||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/firmware/hvmloader/acpi/build.c
|
Index: xen-3.2.1-testing/tools/firmware/hvmloader/acpi/build.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/firmware/hvmloader/acpi/build.c
|
--- xen-3.2.1-testing.orig/tools/firmware/hvmloader/acpi/build.c
|
||||||
+++ xen-3.2-testing/tools/firmware/hvmloader/acpi/build.c
|
+++ xen-3.2.1-testing/tools/firmware/hvmloader/acpi/build.c
|
||||||
@@ -62,11 +62,18 @@ static int uart_exists(uint16_t uart_bas
|
@@ -62,11 +62,18 @@ static int uart_exists(uint16_t uart_bas
|
||||||
return ((b == 0) && (c == 0xf));
|
return ((b == 0) && (c == 0xf));
|
||||||
}
|
}
|
||||||
@ -61,10 +61,10 @@ Index: xen-3.2-testing/tools/firmware/hvmloader/acpi/build.c
|
|||||||
|
|
||||||
/* Processor Object SSDT. */
|
/* Processor Object SSDT. */
|
||||||
table_ptrs[nr_tables++] = (unsigned long)&buf[offset];
|
table_ptrs[nr_tables++] = (unsigned long)&buf[offset];
|
||||||
Index: xen-3.2-testing/tools/firmware/hvmloader/acpi/dsdt.asl
|
Index: xen-3.2.1-testing/tools/firmware/hvmloader/acpi/dsdt.asl
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/firmware/hvmloader/acpi/dsdt.asl
|
--- xen-3.2.1-testing.orig/tools/firmware/hvmloader/acpi/dsdt.asl
|
||||||
+++ xen-3.2-testing/tools/firmware/hvmloader/acpi/dsdt.asl
|
+++ xen-3.2.1-testing/tools/firmware/hvmloader/acpi/dsdt.asl
|
||||||
@@ -49,6 +49,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2,
|
@@ -49,6 +49,7 @@ DefinitionBlock ("DSDT.aml", "DSDT", 2,
|
||||||
Field(BIOS, ByteAcc, NoLock, Preserve) {
|
Field(BIOS, ByteAcc, NoLock, Preserve) {
|
||||||
UAR1, 1,
|
UAR1, 1,
|
||||||
@ -87,10 +87,10 @@ Index: xen-3.2-testing/tools/firmware/hvmloader/acpi/dsdt.asl
|
|||||||
Name(_CRS, ResourceTemplate() {
|
Name(_CRS, ResourceTemplate() {
|
||||||
DWordMemory(
|
DWordMemory(
|
||||||
ResourceConsumer, PosDecode, MinFixed, MaxFixed,
|
ResourceConsumer, PosDecode, MinFixed, MaxFixed,
|
||||||
Index: xen-3.2-testing/tools/firmware/hvmloader/acpi/dsdt.c
|
Index: xen-3.2.1-testing/tools/firmware/hvmloader/acpi/dsdt.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/firmware/hvmloader/acpi/dsdt.c
|
--- xen-3.2.1-testing.orig/tools/firmware/hvmloader/acpi/dsdt.c
|
||||||
+++ xen-3.2-testing/tools/firmware/hvmloader/acpi/dsdt.c
|
+++ xen-3.2.1-testing/tools/firmware/hvmloader/acpi/dsdt.c
|
||||||
@@ -5,15 +5,15 @@
|
@@ -5,15 +5,15 @@
|
||||||
* Copyright (C) 2000 - 2006 Intel Corporation
|
* Copyright (C) 2000 - 2006 Intel Corporation
|
||||||
* Supports ACPI Specification Revision 3.0a
|
* Supports ACPI Specification Revision 3.0a
|
||||||
@ -1010,10 +1010,10 @@ Index: xen-3.2-testing/tools/firmware/hvmloader/acpi/dsdt.c
|
|||||||
+ 0x08,0x22,0x80,0x00,0x79,0x00,
|
+ 0x08,0x22,0x80,0x00,0x79,0x00,
|
||||||
};
|
};
|
||||||
int DsdtLen=sizeof(AmlCode);
|
int DsdtLen=sizeof(AmlCode);
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendConfig.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendConfig.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendConfig.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendConfig.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendConfig.py
|
||||||
@@ -127,7 +127,7 @@ LEGACY_CFG_TO_XENAPI_CFG = reverse_dict(
|
@@ -127,7 +127,7 @@ LEGACY_CFG_TO_XENAPI_CFG = reverse_dict(
|
||||||
XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'boot', 'device_model', 'display',
|
XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'boot', 'device_model', 'display',
|
||||||
'fda', 'fdb', 'keymap', 'isa', 'localtime', 'monitor',
|
'fda', 'fdb', 'keymap', 'isa', 'localtime', 'monitor',
|
||||||
@ -1022,11 +1022,11 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendConfig.py
|
|||||||
+ 'soundhw','stdvga', 'usb', 'usbdevice', 'hpet', 'vnc',
|
+ 'soundhw','stdvga', 'usb', 'usbdevice', 'hpet', 'vnc',
|
||||||
'vncconsole', 'vncdisplay', 'vnclisten', 'timer_mode',
|
'vncconsole', 'vncdisplay', 'vnclisten', 'timer_mode',
|
||||||
'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt',
|
'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt',
|
||||||
'guest_os_type' ]
|
'guest_os_type', 'hap']
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendConstants.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendConstants.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendConstants.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendConstants.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendConstants.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendConstants.py
|
||||||
@@ -47,6 +47,7 @@ HVM_PARAM_NVRAM_FD = 7
|
@@ -47,6 +47,7 @@ HVM_PARAM_NVRAM_FD = 7
|
||||||
HVM_PARAM_VHPT_SIZE = 8
|
HVM_PARAM_VHPT_SIZE = 8
|
||||||
HVM_PARAM_BUFPIOREQ_PFN = 9
|
HVM_PARAM_BUFPIOREQ_PFN = 9
|
||||||
@ -1035,13 +1035,13 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendConstants.py
|
|||||||
|
|
||||||
restart_modes = [
|
restart_modes = [
|
||||||
"restart",
|
"restart",
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
@@ -1682,6 +1682,12 @@ class XendDomainInfo:
|
@@ -1690,6 +1690,12 @@ class XendDomainInfo:
|
||||||
xc.hvm_set_param(self.domid, HVM_PARAM_TIMER_MODE,
|
xc.hvm_set_param(self.domid, HVM_PARAM_TIMER_MODE,
|
||||||
long(self.info["platform"].get("timer_mode")))
|
long(timer_mode))
|
||||||
|
|
||||||
+ # Optionally enable virtual HPET
|
+ # Optionally enable virtual HPET
|
||||||
+ hpet = self.info["platform"].get("hpet")
|
+ hpet = self.info["platform"].get("hpet")
|
||||||
@ -1052,10 +1052,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
# Set maximum number of vcpus in domain
|
# Set maximum number of vcpus in domain
|
||||||
xc.domain_max_vcpus(self.domid, int(self.info['VCPUs_max']))
|
xc.domain_max_vcpus(self.domid, int(self.info['VCPUs_max']))
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xm/create.py
|
Index: xen-3.2.1-testing/tools/python/xen/xm/create.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xm/create.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xm/create.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xm/create.py
|
+++ xen-3.2.1-testing/tools/python/xen/xm/create.py
|
||||||
@@ -194,6 +194,10 @@ gopts.var('pae', val='PAE',
|
@@ -194,6 +194,10 @@ gopts.var('pae', val='PAE',
|
||||||
fn=set_int, default=1,
|
fn=set_int, default=1,
|
||||||
use="Disable or enable PAE of HVM domain.")
|
use="Disable or enable PAE of HVM domain.")
|
||||||
@ -1067,33 +1067,33 @@ Index: xen-3.2-testing/tools/python/xen/xm/create.py
|
|||||||
gopts.var('timer_mode', val='TIMER_MODE',
|
gopts.var('timer_mode', val='TIMER_MODE',
|
||||||
fn=set_int, default=0,
|
fn=set_int, default=0,
|
||||||
use="""Timer mode (0=delay virtual time when ticks are missed;
|
use="""Timer mode (0=delay virtual time when ticks are missed;
|
||||||
@@ -725,7 +729,7 @@ def configure_hvm(config_image, vals):
|
@@ -730,7 +734,7 @@ def configure_hvm(config_image, vals):
|
||||||
'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
|
'localtime', 'serial', 'stdvga', 'isa', 'nographic', 'soundhw',
|
||||||
'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
|
'vnc', 'vncdisplay', 'vncunused', 'vncconsole', 'vnclisten',
|
||||||
'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
|
'sdl', 'display', 'xauthority', 'rtc_timeoffset', 'monitor',
|
||||||
- 'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci',
|
- 'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci',
|
||||||
+ 'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet',
|
+ 'acpi', 'apic', 'usb', 'usbdevice', 'keymap', 'pci', 'hpet',
|
||||||
'guest_os_type']
|
'guest_os_type', 'hap']
|
||||||
|
|
||||||
for a in args:
|
for a in args:
|
||||||
Index: xen-3.2-testing/tools/python/xen/xm/xenapi_create.py
|
Index: xen-3.2.1-testing/tools/python/xen/xm/xenapi_create.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xm/xenapi_create.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xm/xenapi_create.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xm/xenapi_create.py
|
+++ xen-3.2.1-testing/tools/python/xen/xm/xenapi_create.py
|
||||||
@@ -818,7 +818,8 @@ class sxp2xml:
|
@@ -818,7 +818,8 @@ class sxp2xml:
|
||||||
|
|
||||||
|
|
||||||
def extract_platform(self, image, document):
|
def extract_platform(self, image, document):
|
||||||
- platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode']
|
- platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode', 'hap']
|
||||||
+ platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode',
|
+ platform_keys = ['acpi', 'apic', 'pae', 'vhpt', 'timer_mode',
|
||||||
+ 'hap', 'hpet']
|
+ 'hap', 'hpet']
|
||||||
|
|
||||||
def extract_platform_key(key):
|
def extract_platform_key(key):
|
||||||
platform = document.createElement("platform")
|
platform = document.createElement("platform")
|
||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/hpet.c
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/hpet.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/hpet.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/hpet.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hpet.c
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/hpet.c
|
||||||
@@ -353,7 +353,8 @@ static void hpet_write(
|
@@ -353,7 +353,8 @@ static void hpet_write(
|
||||||
|
|
||||||
static int hpet_range(struct vcpu *v, unsigned long addr)
|
static int hpet_range(struct vcpu *v, unsigned long addr)
|
||||||
@ -1104,10 +1104,10 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hpet.c
|
|||||||
(addr < (HPET_BASE_ADDRESS + HPET_MMAP_SIZE)));
|
(addr < (HPET_BASE_ADDRESS + HPET_MMAP_SIZE)));
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/hvm.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/hvm.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/hvm.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/hvm.c
|
||||||
@@ -235,6 +235,8 @@ int hvm_domain_initialise(struct domain
|
@@ -235,6 +235,8 @@ int hvm_domain_initialise(struct domain
|
||||||
spin_lock_init(&d->arch.hvm_domain.irq_lock);
|
spin_lock_init(&d->arch.hvm_domain.irq_lock);
|
||||||
spin_lock_init(&d->arch.hvm_domain.uc_lock);
|
spin_lock_init(&d->arch.hvm_domain.uc_lock);
|
||||||
@ -1117,10 +1117,10 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
|||||||
hvm_init_cacheattr_region_list(d);
|
hvm_init_cacheattr_region_list(d);
|
||||||
|
|
||||||
rc = paging_enable(d, PG_refcounts|PG_translate|PG_external);
|
rc = paging_enable(d, PG_refcounts|PG_translate|PG_external);
|
||||||
Index: xen-3.2-testing/xen/include/public/hvm/params.h
|
Index: xen-3.2.1-testing/xen/include/public/hvm/params.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/public/hvm/params.h
|
--- xen-3.2.1-testing.orig/xen/include/public/hvm/params.h
|
||||||
+++ xen-3.2-testing/xen/include/public/hvm/params.h
|
+++ xen-3.2.1-testing/xen/include/public/hvm/params.h
|
||||||
@@ -81,6 +81,9 @@
|
@@ -81,6 +81,9 @@
|
||||||
#define HVMPTM_no_missed_ticks_pending 2
|
#define HVMPTM_no_missed_ticks_pending 2
|
||||||
#define HVMPTM_one_missed_tick_pending 3
|
#define HVMPTM_one_missed_tick_pending 3
|
||||||
|
@ -1,235 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1202899393 0
|
|
||||||
# Node ID 0164d924cebacfef62673a49c2f4ad395df5444b
|
|
||||||
# Parent 27314cfbcefe8ee261da3ea827eb8336c32ad987
|
|
||||||
Tools: fix save/restore of 32-bit PV guests with 64-bit tools
|
|
||||||
by removing some obvious typos, handling CR3 folding and hvirt_start
|
|
||||||
based on guest word-size, and understanding 32-bit INVALID_MFN.
|
|
||||||
|
|
||||||
Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/libxc/xc_domain_restore.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/tools/libxc/xc_domain_restore.c
|
|
||||||
+++ xen-3.2-testing/tools/libxc/xc_domain_restore.c
|
|
||||||
@@ -251,7 +251,7 @@ static xen_pfn_t *load_p2m_frame_list(
|
|
||||||
|
|
||||||
/* Now that we know the guest's word-size, can safely allocate
|
|
||||||
* the p2m frame list */
|
|
||||||
- if ( (p2m_frame_list = malloc(P2M_FL_SIZE)) == NULL )
|
|
||||||
+ if ( (p2m_frame_list = malloc(P2M_TOOLS_FL_SIZE)) == NULL )
|
|
||||||
{
|
|
||||||
ERROR("Couldn't allocate p2m_frame_list array");
|
|
||||||
return NULL;
|
|
||||||
@@ -1040,7 +1040,7 @@ int xc_domain_restore(int xc_handle, int
|
|
||||||
SET_FIELD(&ctxt, gdt_frames[j], p2m[pfn]);
|
|
||||||
}
|
|
||||||
/* Uncanonicalise the page table base pointer. */
|
|
||||||
- pfn = xen_cr3_to_pfn(GET_FIELD(&ctxt, ctrlreg[3]));
|
|
||||||
+ pfn = UNFOLD_CR3(GET_FIELD(&ctxt, ctrlreg[3]));
|
|
||||||
|
|
||||||
if ( pfn >= p2m_size )
|
|
||||||
{
|
|
||||||
@@ -1057,12 +1057,12 @@ int xc_domain_restore(int xc_handle, int
|
|
||||||
(unsigned long)pt_levels<<XEN_DOMCTL_PFINFO_LTAB_SHIFT);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
- SET_FIELD(&ctxt, ctrlreg[3], xen_pfn_to_cr3(p2m[pfn]));
|
|
||||||
+ SET_FIELD(&ctxt, ctrlreg[3], FOLD_CR3(p2m[pfn]));
|
|
||||||
|
|
||||||
/* Guest pagetable (x86/64) stored in otherwise-unused CR1. */
|
|
||||||
if ( (pt_levels == 4) && (ctxt.x64.ctrlreg[1] & 1) )
|
|
||||||
{
|
|
||||||
- pfn = xen_cr3_to_pfn(ctxt.x64.ctrlreg[1] & ~1);
|
|
||||||
+ pfn = UNFOLD_CR3(ctxt.x64.ctrlreg[1] & ~1);
|
|
||||||
if ( pfn >= p2m_size )
|
|
||||||
{
|
|
||||||
ERROR("User PT base is bad: pfn=%lu p2m_size=%lu",
|
|
||||||
@@ -1077,7 +1077,7 @@ int xc_domain_restore(int xc_handle, int
|
|
||||||
(unsigned long)pt_levels<<XEN_DOMCTL_PFINFO_LTAB_SHIFT);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
- ctxt.x64.ctrlreg[1] = xen_pfn_to_cr3(p2m[pfn]);
|
|
||||||
+ ctxt.x64.ctrlreg[1] = FOLD_CR3(p2m[pfn]);
|
|
||||||
}
|
|
||||||
domctl.cmd = XEN_DOMCTL_setvcpucontext;
|
|
||||||
domctl.domain = (domid_t)dom;
|
|
||||||
@@ -1158,7 +1158,7 @@ int xc_domain_restore(int xc_handle, int
|
|
||||||
if ( guest_width > sizeof (xen_pfn_t) )
|
|
||||||
for ( i = p2m_size - 1; i >= 0; i-- )
|
|
||||||
((uint64_t *)p2m)[i] = p2m[i];
|
|
||||||
- else if ( guest_width > sizeof (xen_pfn_t) )
|
|
||||||
+ else if ( guest_width < sizeof (xen_pfn_t) )
|
|
||||||
for ( i = 0; i < p2m_size; i++ )
|
|
||||||
((uint32_t *)p2m)[i] = p2m[i];
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/libxc/xc_domain_save.c
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/tools/libxc/xc_domain_save.c
|
|
||||||
+++ xen-3.2-testing/tools/libxc/xc_domain_save.c
|
|
||||||
@@ -61,10 +61,11 @@ unsigned int guest_width;
|
|
||||||
|
|
||||||
#define mfn_to_pfn(_mfn) (live_m2p[(_mfn)])
|
|
||||||
|
|
||||||
-#define pfn_to_mfn(_pfn) \
|
|
||||||
- ((xen_pfn_t) ((guest_width==8) \
|
|
||||||
- ? (((uint64_t *)live_p2m)[(_pfn)]) \
|
|
||||||
- : (((uint32_t *)live_p2m)[(_pfn)])))
|
|
||||||
+#define pfn_to_mfn(_pfn) \
|
|
||||||
+ ((xen_pfn_t) ((guest_width==8) \
|
|
||||||
+ ? (((uint64_t *)live_p2m)[(_pfn)]) \
|
|
||||||
+ : ((((uint32_t *)live_p2m)[(_pfn)]) == 0xffffffffU \
|
|
||||||
+ ? (-1UL) : (((uint32_t *)live_p2m)[(_pfn)]))))
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returns TRUE if the given machine frame number has a unique mapping
|
|
||||||
@@ -496,10 +497,9 @@ static int canonicalize_pagetable(unsign
|
|
||||||
xen_start = L3_PAGETABLE_ENTRIES_PAE;
|
|
||||||
|
|
||||||
/*
|
|
||||||
- ** in PAE only the L2 mapping the top 1GB contains Xen mappings.
|
|
||||||
- ** We can spot this by looking for the guest linear mapping which
|
|
||||||
- ** Xen always ensures is present in that L2. Guests must ensure
|
|
||||||
- ** that this check will fail for other L2s.
|
|
||||||
+ ** In PAE only the L2 mapping the top 1GB contains Xen mappings.
|
|
||||||
+ ** We can spot this by looking for the guest's mappingof the m2p.
|
|
||||||
+ ** Guests must ensure that this check will fail for other L2s.
|
|
||||||
*/
|
|
||||||
if ( (pt_levels == 3) && (type == XEN_DOMCTL_PFINFO_L2TAB) )
|
|
||||||
{
|
|
||||||
@@ -555,7 +555,13 @@ static int canonicalize_pagetable(unsign
|
|
||||||
/* This will happen if the type info is stale which
|
|
||||||
is quite feasible under live migration */
|
|
||||||
pfn = 0; /* zap it - we'll retransmit this page later */
|
|
||||||
- race = 1; /* inform the caller of race; fatal if !live */
|
|
||||||
+ /* XXX: We can't spot Xen mappings in compat-mode L2es
|
|
||||||
+ * from 64-bit tools, but the only thing in them is the
|
|
||||||
+ * compat m2p, so we quietly zap them. This doesn't
|
|
||||||
+ * count as a race, so don't report it. */
|
|
||||||
+ if ( !(type == XEN_DOMCTL_PFINFO_L2TAB
|
|
||||||
+ && sizeof (unsigned long) > guest_width) )
|
|
||||||
+ race = 1; /* inform the caller; fatal if !live */
|
|
||||||
}
|
|
||||||
else
|
|
||||||
pfn = mfn_to_pfn(mfn);
|
|
||||||
@@ -690,7 +696,7 @@ static xen_pfn_t *map_and_save_p2m_table
|
|
||||||
else
|
|
||||||
p2m_frame_list_list[i] = 0;
|
|
||||||
else if ( guest_width < sizeof(unsigned long) )
|
|
||||||
- for ( i = PAGE_SIZE/sizeof(unsigned long) - 1; i >= 0; i++ )
|
|
||||||
+ for ( i = PAGE_SIZE/sizeof(unsigned long) - 1; i >= 0; i-- )
|
|
||||||
p2m_frame_list_list[i] = ((uint32_t *)p2m_frame_list_list)[i];
|
|
||||||
|
|
||||||
live_p2m_frame_list =
|
|
||||||
@@ -704,19 +710,20 @@ static xen_pfn_t *map_and_save_p2m_table
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get a local copy of the live_P2M_frame_list */
|
|
||||||
- if ( !(p2m_frame_list = malloc(P2M_FL_SIZE)) )
|
|
||||||
+ if ( !(p2m_frame_list = malloc(P2M_TOOLS_FL_SIZE)) )
|
|
||||||
{
|
|
||||||
ERROR("Couldn't allocate p2m_frame_list array");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
- memcpy(p2m_frame_list, live_p2m_frame_list, P2M_FL_SIZE);
|
|
||||||
+ memset(p2m_frame_list, 0, P2M_TOOLS_FL_SIZE);
|
|
||||||
+ memcpy(p2m_frame_list, live_p2m_frame_list, P2M_GUEST_FL_SIZE);
|
|
||||||
|
|
||||||
/* Canonicalize guest's unsigned long vs ours */
|
|
||||||
if ( guest_width > sizeof(unsigned long) )
|
|
||||||
for ( i = 0; i < P2M_FL_ENTRIES; i++ )
|
|
||||||
p2m_frame_list[i] = ((uint64_t *)p2m_frame_list)[i];
|
|
||||||
else if ( guest_width < sizeof(unsigned long) )
|
|
||||||
- for ( i = P2M_FL_ENTRIES - 1; i >= 0; i++ )
|
|
||||||
+ for ( i = P2M_FL_ENTRIES - 1; i >= 0; i-- )
|
|
||||||
p2m_frame_list[i] = ((uint32_t *)p2m_frame_list)[i];
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1559,31 +1566,26 @@ int xc_domain_save(int xc_handle, int io
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Canonicalise the page table base pointer. */
|
|
||||||
- if ( !MFN_IS_IN_PSEUDOPHYS_MAP(xen_cr3_to_pfn(
|
|
||||||
- GET_FIELD(&ctxt, ctrlreg[3]))) )
|
|
||||||
+ if ( !MFN_IS_IN_PSEUDOPHYS_MAP(UNFOLD_CR3(
|
|
||||||
+ GET_FIELD(&ctxt, ctrlreg[3]))) )
|
|
||||||
{
|
|
||||||
ERROR("PT base is not in range of pseudophys map");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
SET_FIELD(&ctxt, ctrlreg[3],
|
|
||||||
- xen_pfn_to_cr3(
|
|
||||||
- mfn_to_pfn(
|
|
||||||
- xen_cr3_to_pfn(
|
|
||||||
- GET_FIELD(&ctxt, ctrlreg[3])))));
|
|
||||||
+ FOLD_CR3(mfn_to_pfn(UNFOLD_CR3(GET_FIELD(&ctxt, ctrlreg[3])))));
|
|
||||||
|
|
||||||
/* Guest pagetable (x86/64) stored in otherwise-unused CR1. */
|
|
||||||
if ( (pt_levels == 4) && ctxt.x64.ctrlreg[1] )
|
|
||||||
{
|
|
||||||
- if ( !MFN_IS_IN_PSEUDOPHYS_MAP(
|
|
||||||
- xen_cr3_to_pfn(ctxt.x64.ctrlreg[1])) )
|
|
||||||
+ if ( !MFN_IS_IN_PSEUDOPHYS_MAP(UNFOLD_CR3(ctxt.x64.ctrlreg[1])) )
|
|
||||||
{
|
|
||||||
ERROR("PT base is not in range of pseudophys map");
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
/* Least-significant bit means 'valid PFN'. */
|
|
||||||
ctxt.x64.ctrlreg[1] = 1 |
|
|
||||||
- xen_pfn_to_cr3(
|
|
||||||
- mfn_to_pfn(xen_cr3_to_pfn(ctxt.x64.ctrlreg[1])));
|
|
||||||
+ FOLD_CR3(mfn_to_pfn(UNFOLD_CR3(ctxt.x64.ctrlreg[1])));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( write_exact(io_fd, &ctxt, ((guest_width==8)
|
|
||||||
Index: xen-3.2-testing/tools/libxc/xg_private.h
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/tools/libxc/xg_private.h
|
|
||||||
+++ xen-3.2-testing/tools/libxc/xg_private.h
|
|
||||||
@@ -155,7 +155,9 @@ typedef l4_pgentry_64_t l4_pgentry_t;
|
|
||||||
#define P2M_FL_ENTRIES (((p2m_size)+FPP-1)/FPP)
|
|
||||||
|
|
||||||
/* Size in bytes of the pfn_to_mfn_frame_list */
|
|
||||||
-#define P2M_FL_SIZE ((P2M_FL_ENTRIES)*(guest_width))
|
|
||||||
+#define P2M_GUEST_FL_SIZE ((P2M_FL_ENTRIES) * (guest_width))
|
|
||||||
+#define P2M_TOOLS_FL_SIZE ((P2M_FL_ENTRIES) * \
|
|
||||||
+ MAX((sizeof (xen_pfn_t)), guest_width))
|
|
||||||
|
|
||||||
/* Masks for PTE<->PFN conversions */
|
|
||||||
#define MADDR_BITS_X86 ((guest_width == 8) ? 52 : 44)
|
|
||||||
Index: xen-3.2-testing/tools/libxc/xg_save_restore.h
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/tools/libxc/xg_save_restore.h
|
|
||||||
+++ xen-3.2-testing/tools/libxc/xg_save_restore.h
|
|
||||||
@@ -68,6 +68,13 @@ static inline int get_platform_info(int
|
|
||||||
|
|
||||||
*guest_width = domctl.u.address_size.size / 8;
|
|
||||||
|
|
||||||
+ /* 64-bit tools will see the 64-bit hvirt_start, but 32-bit guests
|
|
||||||
+ * will be using the compat one. */
|
|
||||||
+ if ( *guest_width < sizeof (unsigned long) )
|
|
||||||
+ /* XXX need to fix up a way of extracting this value from Xen if
|
|
||||||
+ * XXX it becomes variable for domU */
|
|
||||||
+ *hvirt_start = 0xf5800000;
|
|
||||||
+
|
|
||||||
if (strstr(xen_caps, "xen-3.0-x86_64"))
|
|
||||||
/* Depends on whether it's a compat 32-on-64 guest */
|
|
||||||
*pt_levels = ( (*guest_width == 8) ? 4 : 3 );
|
|
||||||
@@ -136,6 +143,16 @@ typedef union
|
|
||||||
(_p)->x32._f = (_v); \
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
+#define UNFOLD_CR3(_c) \
|
|
||||||
+ ((uint64_t)((guest_width == 8) \
|
|
||||||
+ ? ((_c) >> 12) \
|
|
||||||
+ : (((uint32_t)(_c) >> 12) | ((uint32_t)(_c) << 20))))
|
|
||||||
+
|
|
||||||
+#define FOLD_CR3(_c) \
|
|
||||||
+ ((uint64_t)((guest_width == 8) \
|
|
||||||
+ ? ((uint64_t)(_c)) << 12 \
|
|
||||||
+ : (((uint32_t)(_c) << 12) | ((uint32_t)(_c) >> 20))))
|
|
||||||
+
|
|
||||||
#define MEMCPY_FIELD(_d, _s, _f) do { \
|
|
||||||
if (guest_width == 8) \
|
|
||||||
memcpy(&(_d)->x64._f, &(_s)->x64._f,sizeof((_d)->x64._f)); \
|
|
@ -1,27 +0,0 @@
|
|||||||
# HG changeset patch
|
|
||||||
# User Keir Fraser <keir.fraser@citrix.com>
|
|
||||||
# Date 1204036539 0
|
|
||||||
# Node ID 9dd235d6174d1944caf53798a07ecf509678eead
|
|
||||||
# Parent b6323bf8dae0116a206a303b66b8fa539ba7c52d
|
|
||||||
Fix restore of saved image containing rtc_timeoffset
|
|
||||||
|
|
||||||
Saved images contain rtc_timeoffset as a string value, resulting in a
|
|
||||||
TypeError exception when calling xc.domain_set_time_offset() on
|
|
||||||
restore. Cast rtc_timeoffset to int before calling
|
|
||||||
xc.domain_set_time_offset().
|
|
||||||
|
|
||||||
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
|
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/image.py
|
|
||||||
===================================================================
|
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/image.py
|
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/image.py
|
|
||||||
@@ -346,7 +346,7 @@ class LinuxImageHandler(ImageHandler):
|
|
||||||
ImageHandler.configure(self, vmConfig)
|
|
||||||
rtc_timeoffset = vmConfig['platform'].get('rtc_timeoffset')
|
|
||||||
if rtc_timeoffset is not None:
|
|
||||||
- xc.domain_set_time_offset(self.vm.getDomid(), rtc_timeoffset)
|
|
||||||
+ xc.domain_set_time_offset(self.vm.getDomid(), int(rtc_timeoffset))
|
|
||||||
|
|
||||||
def buildDomain(self):
|
|
||||||
store_evtchn = self.vm.getStorePort()
|
|
85
17124-numa-free-memory-size.patch
Normal file
85
17124-numa-free-memory-size.patch
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User Keir Fraser <keir.fraser@citrix.com>
|
||||||
|
# Date 1204038008 0
|
||||||
|
# Node ID 6ef22eefc36056daa4f7e6c6f14873ea72658161
|
||||||
|
# Parent c8b58f82d893d821d60cb96225f94170bd7ae595
|
||||||
|
xend: Add free memory size of every node in physinfo to help user to
|
||||||
|
get usage of memory of their NUMA machine.
|
||||||
|
|
||||||
|
Signed-off-by: Duan Ronghui <ronghui.duan@intel.com>
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/tools/python/xen/lowlevel/xc/xc.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c
|
||||||
|
+++ xen-3.2.1-testing/tools/python/xen/lowlevel/xc/xc.c
|
||||||
|
@@ -780,7 +780,8 @@ static PyObject *pyxc_physinfo(XcObject
|
||||||
|
xc_physinfo_t info;
|
||||||
|
char cpu_cap[128], *p=cpu_cap, *q=cpu_cap;
|
||||||
|
int i, j, max_cpu_id;
|
||||||
|
- PyObject *ret_obj, *node_to_cpu_obj;
|
||||||
|
+ uint64_t free_heap;
|
||||||
|
+ PyObject *ret_obj, *node_to_cpu_obj, *node_to_memory_obj;
|
||||||
|
xc_cpu_to_node_t map[MAX_CPU_ID + 1];
|
||||||
|
|
||||||
|
set_xen_guest_handle(info.cpu_to_node, map);
|
||||||
|
@@ -828,7 +829,17 @@ static PyObject *pyxc_physinfo(XcObject
|
||||||
|
PyList_Append(node_to_cpu_obj, cpus);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ node_to_memory_obj = PyList_New(0);
|
||||||
|
+
|
||||||
|
+ for ( i = 0; i < info.nr_nodes; i++ )
|
||||||
|
+ {
|
||||||
|
+ xc_availheap(self->xc_handle, 0, 0, i, &free_heap);
|
||||||
|
+ PyList_Append(node_to_memory_obj,
|
||||||
|
+ PyInt_FromLong(free_heap / 1024));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
PyDict_SetItemString(ret_obj, "node_to_cpu", node_to_cpu_obj);
|
||||||
|
+ PyDict_SetItemString(ret_obj, "node_to_memory", node_to_memory_obj);
|
||||||
|
|
||||||
|
return ret_obj;
|
||||||
|
#undef MAX_CPU_ID
|
||||||
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendNode.py
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendNode.py
|
||||||
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendNode.py
|
||||||
|
@@ -573,6 +573,20 @@ class XendNode:
|
||||||
|
except:
|
||||||
|
str='none\n'
|
||||||
|
return str[:-1];
|
||||||
|
+ def format_node_to_memory(self, pinfo):
|
||||||
|
+ str=''
|
||||||
|
+ whitespace=''
|
||||||
|
+ try:
|
||||||
|
+ node_to_memory=pinfo['node_to_memory']
|
||||||
|
+ for i in range(0, pinfo['nr_nodes']):
|
||||||
|
+ str+='%snode%d:%d\n' % (whitespace,
|
||||||
|
+ i,
|
||||||
|
+ node_to_memory[i] / 1024)
|
||||||
|
+ whitespace='%25s' % ''
|
||||||
|
+ except:
|
||||||
|
+ str='none\n'
|
||||||
|
+ return str[:-1];
|
||||||
|
+
|
||||||
|
|
||||||
|
def physinfo(self):
|
||||||
|
info = self.xc.physinfo()
|
||||||
|
@@ -583,6 +597,7 @@ class XendNode:
|
||||||
|
info['total_memory'] = info['total_memory'] / 1024
|
||||||
|
info['free_memory'] = info['free_memory'] / 1024
|
||||||
|
info['node_to_cpu'] = self.format_node_to_cpu(info)
|
||||||
|
+ info['node_to_memory'] = self.format_node_to_memory(info)
|
||||||
|
|
||||||
|
ITEM_ORDER = ['nr_cpus',
|
||||||
|
'nr_nodes',
|
||||||
|
@@ -592,7 +607,8 @@ class XendNode:
|
||||||
|
'hw_caps',
|
||||||
|
'total_memory',
|
||||||
|
'free_memory',
|
||||||
|
- 'node_to_cpu'
|
||||||
|
+ 'node_to_cpu',
|
||||||
|
+ 'node_to_memory'
|
||||||
|
]
|
||||||
|
|
||||||
|
return [[k, info[k]] for k in ITEM_ORDER]
|
52
17131-numa-set-vcpu-affinity.patch
Normal file
52
17131-numa-set-vcpu-affinity.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User Keir Fraser <keir.fraser@citrix.com>
|
||||||
|
# Date 1204118269 0
|
||||||
|
# Node ID b58180cf8ab8c69def4129f7152f136daf5e1596
|
||||||
|
# Parent 2b940e46857c0ddf5ef1e255e201a42caf310df6
|
||||||
|
xend: Set default vcpu affinity for better performance in NUMA systems.
|
||||||
|
Signed-off-by: Duan Ronghui <ronghui.duan@intel.com>
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
|
@@ -1754,6 +1754,39 @@ class XendDomainInfo:
|
||||||
|
if self.info['cpus'] is not None and len(self.info['cpus']) > 0:
|
||||||
|
for v in range(0, self.info['VCPUs_max']):
|
||||||
|
xc.vcpu_setaffinity(self.domid, v, self.info['cpus'])
|
||||||
|
+ else:
|
||||||
|
+ info = xc.physinfo()
|
||||||
|
+ if info['nr_nodes'] > 1:
|
||||||
|
+ node_memory_list = info['node_to_memory']
|
||||||
|
+ needmem = self.image.getRequiredAvailableMemory(self.info['memory_dynamic_max']) / 1024
|
||||||
|
+ candidate_node_list = []
|
||||||
|
+ for i in range(0, info['nr_nodes']):
|
||||||
|
+ if node_memory_list[i] >= needmem:
|
||||||
|
+ candidate_node_list.append(i)
|
||||||
|
+ if candidate_node_list is None or len(candidate_node_list) == 1:
|
||||||
|
+ index = node_memory_list.index( max(node_memory_list) )
|
||||||
|
+ cpumask = info['node_to_cpu'][index]
|
||||||
|
+ else:
|
||||||
|
+ nodeload = [0]
|
||||||
|
+ nodeload = nodeload * info['nr_nodes']
|
||||||
|
+ from xen.xend import XendDomain
|
||||||
|
+ doms = XendDomain.instance().list('all')
|
||||||
|
+ for dom in doms:
|
||||||
|
+ cpuinfo = dom.getVCPUInfo()
|
||||||
|
+ for vcpu in sxp.children(cpuinfo, 'vcpu'):
|
||||||
|
+ def vinfo(n, t):
|
||||||
|
+ return t(sxp.child_value(vcpu, n))
|
||||||
|
+ cpumap = vinfo('cpumap', list)
|
||||||
|
+ for i in candidate_node_list:
|
||||||
|
+ node_cpumask = info['node_to_cpu'][i]
|
||||||
|
+ for j in node_cpumask:
|
||||||
|
+ if j in cpumap:
|
||||||
|
+ nodeload[i] += 1
|
||||||
|
+ break
|
||||||
|
+ index = nodeload.index( min(nodeload) )
|
||||||
|
+ cpumask = info['node_to_cpu'][index]
|
||||||
|
+ for v in range(0, self.info['VCPUs_max']):
|
||||||
|
+ xc.vcpu_setaffinity(self.domid, v, cpumask)
|
||||||
|
|
||||||
|
# Use architecture- and image-specific calculations to determine
|
||||||
|
# the various headrooms necessary, given the raw configured
|
44
17190-remove-hap-boot-param.patch
Normal file
44
17190-remove-hap-boot-param.patch
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User Keir Fraser <keir.fraser@citrix.com>
|
||||||
|
# Date 1204715792 0
|
||||||
|
# Node ID f85b379fa9436be0ecd733d7bedbebdf1838a310
|
||||||
|
# Parent 86e64b684fb2751f8d2db7e07e88da8505008255
|
||||||
|
x86 hvm: Remove global 'hap' boot parameter now that their is a
|
||||||
|
per-domain configuration option.
|
||||||
|
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||||
|
|
||||||
|
Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2-testing.orig/xen/arch/x86/hvm/hvm.c
|
||||||
|
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
||||||
|
@@ -50,16 +50,6 @@
|
||||||
|
#include <public/version.h>
|
||||||
|
#include <public/memory.h>
|
||||||
|
|
||||||
|
-/*
|
||||||
|
- * Xen command-line option to allow/disallow hardware-assisted paging.
|
||||||
|
- * Since the phys-to-machine table of AMD NPT is in host format, 32-bit Xen
|
||||||
|
- * can only support guests using NPT with up to a 4GB memory map. Therefore
|
||||||
|
- * we disallow HAP by default on PAE Xen (by default we want to support an
|
||||||
|
- * 8GB pseudophysical memory map for HVM guests on a PAE host).
|
||||||
|
- */
|
||||||
|
-static int opt_hap_permitted = (CONFIG_PAGING_LEVELS != 3);
|
||||||
|
-boolean_param("hap", opt_hap_permitted);
|
||||||
|
-
|
||||||
|
int hvm_enabled __read_mostly;
|
||||||
|
|
||||||
|
unsigned int opt_hvm_debug_level __read_mostly;
|
||||||
|
@@ -87,12 +77,7 @@ void hvm_enable(struct hvm_function_tabl
|
||||||
|
hvm_enabled = 1;
|
||||||
|
|
||||||
|
if ( hvm_funcs.hap_supported )
|
||||||
|
- {
|
||||||
|
- if ( !opt_hap_permitted )
|
||||||
|
- hvm_funcs.hap_supported = 0;
|
||||||
|
- printk("HVM: Hardware Assisted Paging detected %s.\n",
|
||||||
|
- hvm_funcs.hap_supported ? "and enabled" : "but disabled");
|
||||||
|
- }
|
||||||
|
+ printk("HVM: Hardware Assisted Paging detected.\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
void hvm_set_guest_tsc(struct vcpu *v, u64 guest_tsc)
|
22
17191-remove-hap-boot-param-doc.patch
Normal file
22
17191-remove-hap-boot-param-doc.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# User Keir Fraser <keir.fraser@citrix.com>
|
||||||
|
# Date 1204715870 0
|
||||||
|
# Node ID 1166ee0f476539a2cd5830854b7a22d5004ed291
|
||||||
|
# Parent f85b379fa9436be0ecd733d7bedbebdf1838a310
|
||||||
|
docs: Remove 'hap' boot parameter from the user manual.
|
||||||
|
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||||
|
|
||||||
|
diff -r f85b379fa943 -r 1166ee0f4765 docs/src/user.tex
|
||||||
|
--- a/docs/src/user.tex Wed Mar 05 11:16:32 2008 +0000
|
||||||
|
+++ b/docs/src/user.tex Wed Mar 05 11:17:50 2008 +0000
|
||||||
|
@@ -4209,10 +4209,6 @@ writing to the VGA console after domain
|
||||||
|
\item [ dma\_emergency\_pool=xxx ] Specify lower bound on size of DMA
|
||||||
|
pool below which ordinary allocations will fail rather than fall
|
||||||
|
back to allocating from the DMA pool.
|
||||||
|
-\item [ hap ] Instruct Xen to detect hardware-assisted paging support, such
|
||||||
|
- as AMD-V's nested paging or Intel\textregistered VT's extended paging. If
|
||||||
|
- available, Xen will use hardware-assisted paging instead of shadow paging
|
||||||
|
- for guest memory management.
|
||||||
|
\end{description}
|
||||||
|
|
||||||
|
In addition, the following options may be specified on the Xen command
|
152
17xxx-xenapi-defaults.patch
Normal file
152
17xxx-xenapi-defaults.patch
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
Index: xen-3.2-testing/tools/python/xen/xend/XendConfig.py
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||||
|
+++ xen-3.2-testing/tools/python/xen/xend/XendConfig.py
|
||||||
|
@@ -124,13 +124,41 @@ XENAPI_CFG_TO_LEGACY_CFG = {
|
||||||
|
LEGACY_CFG_TO_XENAPI_CFG = reverse_dict(XENAPI_CFG_TO_LEGACY_CFG)
|
||||||
|
|
||||||
|
# Platform configuration keys.
|
||||||
|
-XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'boot', 'device_model', 'display',
|
||||||
|
- 'fda', 'fdb', 'keymap', 'isa', 'localtime', 'monitor',
|
||||||
|
- 'nographic', 'pae', 'rtc_timeoffset', 'serial', 'sdl',
|
||||||
|
- 'soundhw','stdvga', 'usb', 'usbdevice', 'hpet', 'vnc',
|
||||||
|
- 'vncconsole', 'vncdisplay', 'vnclisten', 'timer_mode',
|
||||||
|
- 'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt',
|
||||||
|
- 'guest_os_type', 'hap']
|
||||||
|
+XENAPI_PLATFORM_CFG_TYPES = {
|
||||||
|
+ 'acpi': int,
|
||||||
|
+ 'apic': int,
|
||||||
|
+ 'boot': str,
|
||||||
|
+ 'device_model': str,
|
||||||
|
+ 'display' : str,
|
||||||
|
+ 'fda': str,
|
||||||
|
+ 'fdb': str,
|
||||||
|
+ 'keymap': str,
|
||||||
|
+ 'isa' : int,
|
||||||
|
+ 'localtime': int,
|
||||||
|
+ 'monitor': int,
|
||||||
|
+ 'nographic': int,
|
||||||
|
+ 'pae' : int,
|
||||||
|
+ 'rtc_timeoffset': int,
|
||||||
|
+ 'serial': str,
|
||||||
|
+ 'sdl': int,
|
||||||
|
+ 'soundhw': str,
|
||||||
|
+ 'stdvga': int,
|
||||||
|
+ 'usb': int,
|
||||||
|
+ 'usbdevice': str,
|
||||||
|
+ 'hpet': int,
|
||||||
|
+ 'vnc': int,
|
||||||
|
+ 'vncconsole': int,
|
||||||
|
+ 'vncdisplay': int,
|
||||||
|
+ 'vnclisten': str,
|
||||||
|
+ 'timer_mode': int,
|
||||||
|
+ 'vncpasswd': str,
|
||||||
|
+ 'vncunused': int,
|
||||||
|
+ 'xauthority': str,
|
||||||
|
+ 'pci': str,
|
||||||
|
+ 'vhpt': int,
|
||||||
|
+ 'guest_os_type': str,
|
||||||
|
+ 'hap': int,
|
||||||
|
+}
|
||||||
|
|
||||||
|
# Xen API console 'other_config' keys.
|
||||||
|
XENAPI_CONSOLE_OTHER_CFG = ['vncunused', 'vncdisplay', 'vnclisten',
|
||||||
|
@@ -397,12 +425,19 @@ class XendConfig(dict):
|
||||||
|
def _platform_sanity_check(self):
|
||||||
|
if 'keymap' not in self['platform'] and XendOptions.instance().get_keymap():
|
||||||
|
self['platform']['keymap'] = XendOptions.instance().get_keymap()
|
||||||
|
-
|
||||||
|
+
|
||||||
|
+ # XenAPI defines
|
||||||
|
if self.is_hvm() or self.has_rfb():
|
||||||
|
if 'device_model' not in self['platform']:
|
||||||
|
self['platform']['device_model'] = xen.util.auxbin.pathTo("qemu-dm")
|
||||||
|
|
||||||
|
if self.is_hvm():
|
||||||
|
+ if 'timer_mode' not in self['platform']:
|
||||||
|
+ self['platform']['timer_mode'] = 0
|
||||||
|
+ if 'rtc_timeoffset' not in self['platform']:
|
||||||
|
+ self['platform']['rtc_timeoffset'] = 0
|
||||||
|
+ if 'hpet' not in self['platform']:
|
||||||
|
+ self['platform']['hpet'] = 0
|
||||||
|
# Compatibility hack, can go away soon.
|
||||||
|
if 'soundhw' not in self['platform'] and \
|
||||||
|
self['platform'].get('enable_audio'):
|
||||||
|
@@ -523,7 +558,7 @@ class XendConfig(dict):
|
||||||
|
cfg['platform']['localtime'] = localtime
|
||||||
|
|
||||||
|
# Compatibility hack -- can go soon.
|
||||||
|
- for key in XENAPI_PLATFORM_CFG:
|
||||||
|
+ for key in XENAPI_PLATFORM_CFG_TYPES.keys():
|
||||||
|
val = sxp.child_value(sxp_cfg, "platform_" + key, None)
|
||||||
|
if val is not None:
|
||||||
|
self['platform'][key] = val
|
||||||
|
@@ -702,7 +737,7 @@ class XendConfig(dict):
|
||||||
|
self.update_with_image_sxp(image_sxp)
|
||||||
|
|
||||||
|
# Convert Legacy HVM parameters to Xen API configuration
|
||||||
|
- for key in XENAPI_PLATFORM_CFG:
|
||||||
|
+ for key in XENAPI_PLATFORM_CFG_TYPES.keys():
|
||||||
|
if key in cfg:
|
||||||
|
self['platform'][key] = cfg[key]
|
||||||
|
|
||||||
|
@@ -752,7 +787,7 @@ class XendConfig(dict):
|
||||||
|
if image_type != 'hvm' and image_type != 'linux':
|
||||||
|
self['platform']['image_type'] = image_type
|
||||||
|
|
||||||
|
- for key in XENAPI_PLATFORM_CFG:
|
||||||
|
+ for key in XENAPI_PLATFORM_CFG_TYPES.keys():
|
||||||
|
val = sxp.child_value(image_sxp, key, None)
|
||||||
|
if val is not None and val != '':
|
||||||
|
self['platform'][key] = val
|
||||||
|
@@ -836,6 +871,19 @@ class XendConfig(dict):
|
||||||
|
self[key] = type_conv(val)
|
||||||
|
else:
|
||||||
|
self[key] = val
|
||||||
|
+
|
||||||
|
+ # XenAPI defines platform as a string-string map. If platform
|
||||||
|
+ # configuration exists, convert values to appropriate type.
|
||||||
|
+ if 'platform' in xapi:
|
||||||
|
+ for key, val in xapi['platform'].items():
|
||||||
|
+ type_conv = XENAPI_PLATFORM_CFG_TYPES.get(key)
|
||||||
|
+ if type_conv is None:
|
||||||
|
+ key = key.lower()
|
||||||
|
+ type_conv = XENAPI_PLATFORM_CFG_TYPES.get(key)
|
||||||
|
+ if callable(type_conv):
|
||||||
|
+ self['platform'][key] = type_conv(val)
|
||||||
|
+ else:
|
||||||
|
+ self['platform'][key] = val
|
||||||
|
|
||||||
|
self['vcpus_params']['weight'] = \
|
||||||
|
int(self['vcpus_params'].get('weight', 256))
|
||||||
|
@@ -1265,6 +1313,12 @@ class XendConfig(dict):
|
||||||
|
target['devices'][dev_uuid] = ('vfb', dev_info)
|
||||||
|
target['console_refs'].append(dev_uuid)
|
||||||
|
|
||||||
|
+ # if console is rfb, set device_model ensuring qemu
|
||||||
|
+ # is invoked for pvfb services
|
||||||
|
+ if 'device_model' not in target['platform']:
|
||||||
|
+ target['platform']['device_model'] = \
|
||||||
|
+ xen.util.auxbin.pathTo("qemu-dm")
|
||||||
|
+
|
||||||
|
# Finally, if we are a pvfb, we need to make a vkbd
|
||||||
|
# as well that is not really exposed to Xen API
|
||||||
|
vkbd_uuid = uuid.createString()
|
||||||
|
@@ -1508,7 +1562,7 @@ class XendConfig(dict):
|
||||||
|
if self.has_key('PV_args') and self['PV_args']:
|
||||||
|
image.append(['args', self['PV_args']])
|
||||||
|
|
||||||
|
- for key in XENAPI_PLATFORM_CFG:
|
||||||
|
+ for key in XENAPI_PLATFORM_CFG_TYPES.keys():
|
||||||
|
if key in self['platform']:
|
||||||
|
image.append([key, self['platform'][key]])
|
||||||
|
|
||||||
|
@@ -1544,7 +1598,7 @@ class XendConfig(dict):
|
||||||
|
self['PV_ramdisk'] = sxp.child_value(image_sxp, 'ramdisk','')
|
||||||
|
self['PV_args'] = kernel_args
|
||||||
|
|
||||||
|
- for key in XENAPI_PLATFORM_CFG:
|
||||||
|
+ for key in XENAPI_PLATFORM_CFG_TYPES.keys():
|
||||||
|
val = sxp.child_value(image_sxp, key, None)
|
||||||
|
if val is not None and val != '':
|
||||||
|
self['platform'][key] = val
|
@ -1,8 +1,8 @@
|
|||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
@@ -1796,7 +1796,7 @@ class XendDomainInfo:
|
@@ -1837,7 +1837,7 @@ class XendDomainInfo:
|
||||||
xc.domain_setmaxmem(self.domid, maxmem)
|
xc.domain_setmaxmem(self.domid, maxmem)
|
||||||
|
|
||||||
# Make sure there's enough RAM available for the domain
|
# Make sure there's enough RAM available for the domain
|
||||||
|
20
blktap.patch
20
blktap.patch
@ -1,11 +1,11 @@
|
|||||||
bug #239173
|
bug #239173
|
||||||
bug #242953
|
bug #242953
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
@@ -2102,7 +2102,7 @@ class XendDomainInfo:
|
@@ -2143,7 +2143,7 @@ class XendDomainInfo:
|
||||||
(fn, BOOTLOADER_LOOPBACK_DEVICE))
|
(fn, BOOTLOADER_LOOPBACK_DEVICE))
|
||||||
|
|
||||||
vbd = {
|
vbd = {
|
||||||
@ -14,10 +14,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
'device': BOOTLOADER_LOOPBACK_DEVICE,
|
'device': BOOTLOADER_LOOPBACK_DEVICE,
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/ioemu/xenstore.c
|
Index: xen-3.2.1-testing/tools/ioemu/xenstore.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/xenstore.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/xenstore.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/xenstore.c
|
+++ xen-3.2.1-testing/tools/ioemu/xenstore.c
|
||||||
@@ -88,9 +88,9 @@ void xenstore_parse_domain_config(int do
|
@@ -88,9 +88,9 @@ void xenstore_parse_domain_config(int do
|
||||||
{
|
{
|
||||||
char **e = NULL;
|
char **e = NULL;
|
||||||
@ -28,9 +28,9 @@ Index: xen-3.2-testing/tools/ioemu/xenstore.c
|
|||||||
- int i, is_scsi, is_hdN = 0;
|
- int i, is_scsi, is_hdN = 0;
|
||||||
+ int i, is_scsi, is_tap, is_hdN = 0;
|
+ int i, is_scsi, is_tap, is_hdN = 0;
|
||||||
unsigned int len, num, hd_index;
|
unsigned int len, num, hd_index;
|
||||||
|
BlockDriverState *bs;
|
||||||
|
|
||||||
for(i = 0; i < MAX_DISKS + MAX_SCSI_DISKS; i++)
|
@@ -118,6 +118,14 @@ void xenstore_parse_domain_config(int do
|
||||||
@@ -117,6 +117,14 @@ void xenstore_parse_domain_config(int do
|
|
||||||
bpath = xs_read(xsh, XBT_NULL, buf, &len);
|
bpath = xs_read(xsh, XBT_NULL, buf, &len);
|
||||||
if (bpath == NULL)
|
if (bpath == NULL)
|
||||||
continue;
|
continue;
|
||||||
@ -45,7 +45,7 @@ Index: xen-3.2-testing/tools/ioemu/xenstore.c
|
|||||||
/* read the name of the device */
|
/* read the name of the device */
|
||||||
if (pasprintf(&buf, "%s/dev", bpath) == -1)
|
if (pasprintf(&buf, "%s/dev", bpath) == -1)
|
||||||
continue;
|
continue;
|
||||||
@@ -251,6 +259,7 @@ void xenstore_parse_domain_config(int do
|
@@ -252,6 +260,7 @@ void xenstore_parse_domain_config(int do
|
||||||
free(type);
|
free(type);
|
||||||
free(params);
|
free(params);
|
||||||
free(dev);
|
free(dev);
|
||||||
|
@ -180,7 +180,7 @@ Index: xen-3.2-testing/tools/examples/block
|
|||||||
|
|
||||||
- if LANG=C losetup -h 2>&1 | grep read-only >/dev/null
|
- if LANG=C losetup -h 2>&1 | grep read-only >/dev/null
|
||||||
- then
|
- then
|
||||||
- roflag="-$mode"; roflag="${roflag#-w}"
|
- roflag="-$mode"; roflag="${roflag#-w}"; roflag="${roflag#-!}"
|
||||||
- else
|
- else
|
||||||
- roflag=''
|
- roflag=''
|
||||||
- fi
|
- fi
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: xen-3.2-testing/tools/python/xen/xend/server/HalDaemon.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/server/HalDaemon.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/server/HalDaemon.py 2008-02-29 08:11:00.000000000 -0700
|
+++ xen-3.2.1-testing/tools/python/xen/xend/server/HalDaemon.py
|
||||||
@@ -0,0 +1,238 @@
|
@@ -0,0 +1,238 @@
|
||||||
+#!/usr/bin/env python
|
+#!/usr/bin/env python
|
||||||
+# -*- mode: python; -*-
|
+# -*- mode: python; -*-
|
||||||
@ -241,10 +241,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/server/HalDaemon.py
|
|||||||
+ print 'Falling off end'
|
+ print 'Falling off end'
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/server/Hald.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/server/Hald.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/server/Hald.py 2008-02-29 08:11:00.000000000 -0700
|
+++ xen-3.2.1-testing/tools/python/xen/xend/server/Hald.py
|
||||||
@@ -0,0 +1,125 @@
|
@@ -0,0 +1,125 @@
|
||||||
+#============================================================================
|
+#============================================================================
|
||||||
+# This library is free software; you can redistribute it and/or
|
+# This library is free software; you can redistribute it and/or
|
||||||
@ -371,11 +371,11 @@ Index: xen-3.2-testing/tools/python/xen/xend/server/Hald.py
|
|||||||
+ watcher.run()
|
+ watcher.run()
|
||||||
+ time.sleep(10)
|
+ time.sleep(10)
|
||||||
+ watcher.shutdown()
|
+ watcher.shutdown()
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/server/SrvServer.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/server/SrvServer.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/server/SrvServer.py 2008-01-16 13:19:05.000000000 -0700
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/server/SrvServer.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/server/SrvServer.py 2008-02-29 08:11:00.000000000 -0700
|
+++ xen-3.2.1-testing/tools/python/xen/xend/server/SrvServer.py
|
||||||
@@ -56,6 +56,7 @@
|
@@ -56,6 +56,7 @@ from xen.web.SrvDir import SrvDir
|
||||||
|
|
||||||
from SrvRoot import SrvRoot
|
from SrvRoot import SrvRoot
|
||||||
from XMLRPCServer import XMLRPCServer
|
from XMLRPCServer import XMLRPCServer
|
||||||
@ -383,7 +383,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/server/SrvServer.py
|
|||||||
|
|
||||||
xoptions = XendOptions.instance()
|
xoptions = XendOptions.instance()
|
||||||
|
|
||||||
@@ -245,6 +246,8 @@
|
@@ -245,6 +246,8 @@ def _loadConfig(servers, root, reload):
|
||||||
if xoptions.get_xend_unix_xmlrpc_server():
|
if xoptions.get_xend_unix_xmlrpc_server():
|
||||||
servers.add(XMLRPCServer(XendAPI.AUTH_PAM, False))
|
servers.add(XMLRPCServer(XendAPI.AUTH_PAM, False))
|
||||||
|
|
||||||
@ -392,12 +392,12 @@ Index: xen-3.2-testing/tools/python/xen/xend/server/SrvServer.py
|
|||||||
|
|
||||||
def create():
|
def create():
|
||||||
root = SrvDir()
|
root = SrvDir()
|
||||||
Index: xen-3.2-testing/tools/ioemu/xenstore.c
|
Index: xen-3.2.1-testing/tools/ioemu/xenstore.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/xenstore.c 2008-02-29 08:10:59.000000000 -0700
|
--- xen-3.2.1-testing.orig/tools/ioemu/xenstore.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/xenstore.c 2008-02-29 08:11:38.000000000 -0700
|
+++ xen-3.2.1-testing/tools/ioemu/xenstore.c
|
||||||
@@ -216,6 +216,13 @@
|
@@ -217,6 +217,13 @@ void xenstore_parse_domain_config(int do
|
||||||
bdrv_set_type_hint(bs_table[hd_index], BDRV_TYPE_CDROM);
|
bdrv_set_type_hint(bs, BDRV_TYPE_CDROM);
|
||||||
if (pasprintf(&buf, "%s/params", bpath) != -1)
|
if (pasprintf(&buf, "%s/params", bpath) != -1)
|
||||||
xs_watch(xsh, buf, dev);
|
xs_watch(xsh, buf, dev);
|
||||||
+ /* if pyhsical put a watch on media-present after creating it */
|
+ /* if pyhsical put a watch on media-present after creating it */
|
||||||
@ -408,9 +408,9 @@ Index: xen-3.2-testing/tools/ioemu/xenstore.c
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* open device now if media present */
|
/* open device now if media present */
|
||||||
if (params[0]) {
|
@@ -418,6 +425,50 @@ void xenstore_record_dm_state(char *stat
|
||||||
@@ -417,6 +424,50 @@
|
|
||||||
free(path);
|
free(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -461,7 +461,7 @@ Index: xen-3.2-testing/tools/ioemu/xenstore.c
|
|||||||
void xenstore_process_event(void *opaque)
|
void xenstore_process_event(void *opaque)
|
||||||
{
|
{
|
||||||
char **vec, *offset, *bpath = NULL, *buf = NULL, *drv = NULL, *image = NULL;
|
char **vec, *offset, *bpath = NULL, *buf = NULL, *drv = NULL, *image = NULL;
|
||||||
@@ -436,6 +487,11 @@
|
@@ -437,6 +488,11 @@ void xenstore_process_event(void *opaque
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -473,11 +473,11 @@ Index: xen-3.2-testing/tools/ioemu/xenstore.c
|
|||||||
if (strncmp(vec[XS_WATCH_TOKEN], "hd", 2) ||
|
if (strncmp(vec[XS_WATCH_TOKEN], "hd", 2) ||
|
||||||
strlen(vec[XS_WATCH_TOKEN]) != 3)
|
strlen(vec[XS_WATCH_TOKEN]) != 3)
|
||||||
goto out;
|
goto out;
|
||||||
Index: xen-3.2-testing/tools/ioemu/hw/ide.c
|
Index: xen-3.2.1-testing/tools/ioemu/hw/ide.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/hw/ide.c 2008-02-29 08:11:33.000000000 -0700
|
--- xen-3.2.1-testing.orig/tools/ioemu/hw/ide.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/hw/ide.c 2008-02-29 08:16:50.000000000 -0700
|
+++ xen-3.2.1-testing/tools/ioemu/hw/ide.c
|
||||||
@@ -350,6 +350,7 @@
|
@@ -350,6 +350,7 @@ typedef struct IDEState {
|
||||||
uint8_t io_buffer[MAX_MULT_SECTORS*512 + 4];
|
uint8_t io_buffer[MAX_MULT_SECTORS*512 + 4];
|
||||||
QEMUTimer *sector_write_timer; /* only used for win2k instal hack */
|
QEMUTimer *sector_write_timer; /* only used for win2k instal hack */
|
||||||
uint32_t irq_count; /* counts IRQs when using win2k install hack */
|
uint32_t irq_count; /* counts IRQs when using win2k install hack */
|
||||||
@ -485,7 +485,7 @@ Index: xen-3.2-testing/tools/ioemu/hw/ide.c
|
|||||||
} IDEState;
|
} IDEState;
|
||||||
|
|
||||||
#define BM_STATUS_DMAING 0x01
|
#define BM_STATUS_DMAING 0x01
|
||||||
@@ -1403,8 +1404,15 @@
|
@@ -1405,8 +1406,15 @@ static void ide_atapi_cmd(IDEState *s)
|
||||||
switch(s->io_buffer[0]) {
|
switch(s->io_buffer[0]) {
|
||||||
case GPCMD_TEST_UNIT_READY:
|
case GPCMD_TEST_UNIT_READY:
|
||||||
if (bdrv_is_inserted(s->bs)) {
|
if (bdrv_is_inserted(s->bs)) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: 2008-01-18/xen/arch/x86/traps.c
|
Index: xen-3.2.1-testing/xen/arch/x86/traps.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- 2008-01-18.orig/xen/arch/x86/traps.c 2008-01-17 09:25:35.000000000 +0100
|
--- xen-3.2.1-testing.orig/xen/arch/x86/traps.c
|
||||||
+++ 2008-01-18/xen/arch/x86/traps.c 2008-01-18 09:03:16.000000000 +0100
|
+++ xen-3.2.1-testing/xen/arch/x86/traps.c
|
||||||
@@ -49,6 +49,7 @@
|
@@ -49,6 +49,7 @@
|
||||||
#include <xen/trace.h>
|
#include <xen/trace.h>
|
||||||
#include <asm/paging.h>
|
#include <asm/paging.h>
|
||||||
@ -10,7 +10,7 @@ Index: 2008-01-18/xen/arch/x86/traps.c
|
|||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/atomic.h>
|
#include <asm/atomic.h>
|
||||||
#include <asm/desc.h>
|
#include <asm/desc.h>
|
||||||
@@ -2822,7 +2823,7 @@ long unregister_guest_nmi_callback(void)
|
@@ -2828,7 +2829,7 @@ long unregister_guest_nmi_callback(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,10 +19,10 @@ Index: 2008-01-18/xen/arch/x86/traps.c
|
|||||||
{
|
{
|
||||||
struct trap_info cur;
|
struct trap_info cur;
|
||||||
struct vcpu *curr = current;
|
struct vcpu *curr = current;
|
||||||
Index: 2008-01-18/xen/include/asm-x86/hypercall.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/hypercall.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- 2008-01-18.orig/xen/include/asm-x86/hypercall.h 2008-01-16 14:24:36.000000000 +0100
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/hypercall.h
|
||||||
+++ 2008-01-18/xen/include/asm-x86/hypercall.h 2008-01-18 09:03:16.000000000 +0100
|
+++ xen-3.2.1-testing/xen/include/asm-x86/hypercall.h
|
||||||
@@ -32,9 +32,10 @@ extern long
|
@@ -32,9 +32,10 @@ extern long
|
||||||
do_physdev_op_compat(
|
do_physdev_op_compat(
|
||||||
XEN_GUEST_HANDLE(physdev_op_t) uop);
|
XEN_GUEST_HANDLE(physdev_op_t) uop);
|
||||||
@ -35,10 +35,10 @@ Index: 2008-01-18/xen/include/asm-x86/hypercall.h
|
|||||||
|
|
||||||
extern int
|
extern int
|
||||||
do_mmu_update(
|
do_mmu_update(
|
||||||
Index: 2008-01-18/xen/include/public/arch-x86/xen.h
|
Index: xen-3.2.1-testing/xen/include/public/arch-x86/xen.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- 2008-01-18.orig/xen/include/public/arch-x86/xen.h 2008-01-18 09:03:15.000000000 +0100
|
--- xen-3.2.1-testing.orig/xen/include/public/arch-x86/xen.h
|
||||||
+++ 2008-01-18/xen/include/public/arch-x86/xen.h 2008-01-18 09:03:16.000000000 +0100
|
+++ xen-3.2.1-testing/xen/include/public/arch-x86/xen.h
|
||||||
@@ -98,7 +98,6 @@ struct trap_info {
|
@@ -98,7 +98,6 @@ struct trap_info {
|
||||||
unsigned long address; /* code offset */
|
unsigned long address; /* code offset */
|
||||||
};
|
};
|
||||||
|
1015
ept-novell-i386.patch
Normal file
1015
ept-novell-i386.patch
Normal file
File diff suppressed because it is too large
Load Diff
602
ept-novell-x64-2m.patch
Normal file
602
ept-novell-x64-2m.patch
Normal file
@ -0,0 +1,602 @@
|
|||||||
|
Index: xen-3.2.1-testing/tools/libxc/xc_hvm_build.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/tools/libxc/xc_hvm_build.c
|
||||||
|
+++ xen-3.2.1-testing/tools/libxc/xc_hvm_build.c
|
||||||
|
@@ -208,15 +208,39 @@ static int setup_guest(int xc_handle,
|
||||||
|
for ( i = HVM_BELOW_4G_RAM_END >> PAGE_SHIFT; i < nr_pages; i++ )
|
||||||
|
page_array[i] += HVM_BELOW_4G_MMIO_LENGTH >> PAGE_SHIFT;
|
||||||
|
|
||||||
|
- /* Allocate memory for HVM guest, skipping VGA hole 0xA0000-0xC0000. */
|
||||||
|
+ /* Allocate memory for HVM guest:
|
||||||
|
+ * 1) skip VGA hole 0xA0000-0xC0000;
|
||||||
|
+ * 2) Allocate 4K pages for the first 2M guest memory;
|
||||||
|
+ * 3) try to allocate 2M pages for the left guest memory, or use 4k pages;
|
||||||
|
+ */
|
||||||
|
rc = xc_domain_memory_populate_physmap(
|
||||||
|
xc_handle, dom, 0xa0, 0, 0, &page_array[0x00]);
|
||||||
|
if ( rc == 0 )
|
||||||
|
rc = xc_domain_memory_populate_physmap(
|
||||||
|
- xc_handle, dom, nr_pages - 0xc0, 0, 0, &page_array[0xc0]);
|
||||||
|
+ xc_handle, dom, 0x200 - 0xc0, 0, 0, &page_array[0xc0]);
|
||||||
|
if ( rc != 0 )
|
||||||
|
{
|
||||||
|
- PERROR("Could not allocate memory for HVM guest.\n");
|
||||||
|
+ PERROR("Cannot allocate memory for HVM guest 1.\n");
|
||||||
|
+ goto error_out;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* Allocate 2M pages */
|
||||||
|
+ for ( i = 0x200; (i + 0x1ff) < nr_pages; i += 0x200 )
|
||||||
|
+ {
|
||||||
|
+ rc = xc_domain_memory_populate_physmap(
|
||||||
|
+ xc_handle, dom, 1, 9, 0, &page_array[i]);
|
||||||
|
+ if ( rc != 0 )
|
||||||
|
+ {
|
||||||
|
+ PERROR("Cannot allocate more 2M pages for HVM guest.\n");
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if ( i < nr_pages )
|
||||||
|
+ rc = xc_domain_memory_populate_physmap(
|
||||||
|
+ xc_handle, dom, nr_pages - i, 0, 0, &page_array[i]);
|
||||||
|
+ if ( rc != 0 )
|
||||||
|
+ {
|
||||||
|
+ PERROR("Cannot allocate memory for HVM guest 2.\n");
|
||||||
|
goto error_out;
|
||||||
|
}
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/xen/arch/ia64/xen/mm.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/ia64/xen/mm.c
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/ia64/xen/mm.c
|
||||||
|
@@ -2416,7 +2416,7 @@ steal_page(struct domain *d, struct page
|
||||||
|
|
||||||
|
int
|
||||||
|
guest_physmap_add_page(struct domain *d, unsigned long gpfn,
|
||||||
|
- unsigned long mfn)
|
||||||
|
+ unsigned long mfn, int order)
|
||||||
|
{
|
||||||
|
BUG_ON(!mfn_valid(mfn));
|
||||||
|
BUG_ON(mfn_to_page(mfn)->count_info != (PGC_allocated | 1));
|
||||||
|
@@ -2433,7 +2433,7 @@ guest_physmap_add_page(struct domain *d,
|
||||||
|
|
||||||
|
void
|
||||||
|
guest_physmap_remove_page(struct domain *d, unsigned long gpfn,
|
||||||
|
- unsigned long mfn)
|
||||||
|
+ unsigned long mfn, int order)
|
||||||
|
{
|
||||||
|
BUG_ON(mfn == 0);//XXX
|
||||||
|
zap_domain_page_one(d, gpfn << PAGE_SHIFT, 0, mfn);
|
||||||
|
@@ -2836,7 +2836,7 @@ arch_memory_op(int op, XEN_GUEST_HANDLE(
|
||||||
|
if (prev_mfn && mfn_valid(prev_mfn)) {
|
||||||
|
if (is_xen_heap_mfn(prev_mfn))
|
||||||
|
/* Xen heap frames are simply unhooked from this phys slot. */
|
||||||
|
- guest_physmap_remove_page(d, xatp.gpfn, prev_mfn);
|
||||||
|
+ guest_physmap_remove_page(d, xatp.gpfn, prev_mfn, 0);
|
||||||
|
else
|
||||||
|
/* Normal domain memory is freed, to avoid leaking memory. */
|
||||||
|
guest_remove_page(d, xatp.gpfn);
|
||||||
|
@@ -2845,10 +2845,10 @@ arch_memory_op(int op, XEN_GUEST_HANDLE(
|
||||||
|
/* Unmap from old location, if any. */
|
||||||
|
gpfn = get_gpfn_from_mfn(mfn);
|
||||||
|
if (gpfn != INVALID_M2P_ENTRY)
|
||||||
|
- guest_physmap_remove_page(d, gpfn, mfn);
|
||||||
|
+ guest_physmap_remove_page(d, gpfn, mfn, 0);
|
||||||
|
|
||||||
|
/* Map at new location. */
|
||||||
|
- guest_physmap_add_page(d, xatp.gpfn, mfn);
|
||||||
|
+ guest_physmap_add_page(d, xatp.gpfn, mfn, 0);
|
||||||
|
|
||||||
|
out:
|
||||||
|
UNLOCK_BIGLOCK(d);
|
||||||
|
Index: xen-3.2.1-testing/xen/arch/powerpc/mm.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/powerpc/mm.c
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/powerpc/mm.c
|
||||||
|
@@ -591,7 +591,7 @@ void guest_physmap_add_page(
|
||||||
|
}
|
||||||
|
|
||||||
|
void guest_physmap_remove_page(
|
||||||
|
- struct domain *d, unsigned long gpfn, unsigned long mfn)
|
||||||
|
+ struct domain *d, unsigned long gpfn, unsigned long mfn, int order)
|
||||||
|
{
|
||||||
|
if (page_get_owner(mfn_to_page(mfn)) != d) {
|
||||||
|
printk("Won't unmap foreign MFN 0x%lx for DOM%d\n", mfn, d->domain_id);
|
||||||
|
Index: xen-3.2.1-testing/xen/arch/x86/mm.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm.c
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/x86/mm.c
|
||||||
|
@@ -3286,7 +3286,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
|
||||||
|
{
|
||||||
|
if ( is_xen_heap_mfn(prev_mfn) )
|
||||||
|
/* Xen heap frames are simply unhooked from this phys slot. */
|
||||||
|
- guest_physmap_remove_page(d, xatp.gpfn, prev_mfn);
|
||||||
|
+ guest_physmap_remove_page(d, xatp.gpfn, prev_mfn, 0);
|
||||||
|
else
|
||||||
|
/* Normal domain memory is freed, to avoid leaking memory. */
|
||||||
|
guest_remove_page(d, xatp.gpfn);
|
||||||
|
@@ -3295,10 +3295,10 @@ long arch_memory_op(int op, XEN_GUEST_HA
|
||||||
|
/* Unmap from old location, if any. */
|
||||||
|
gpfn = get_gpfn_from_mfn(mfn);
|
||||||
|
if ( gpfn != INVALID_M2P_ENTRY )
|
||||||
|
- guest_physmap_remove_page(d, gpfn, mfn);
|
||||||
|
+ guest_physmap_remove_page(d, gpfn, mfn, 0);
|
||||||
|
|
||||||
|
/* Map at new location. */
|
||||||
|
- guest_physmap_add_page(d, xatp.gpfn, mfn);
|
||||||
|
+ guest_physmap_add_page(d, xatp.gpfn, mfn, 0);
|
||||||
|
|
||||||
|
UNLOCK_BIGLOCK(d);
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/xen/arch/x86/mm/p2m-ept.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm/p2m-ept.c
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/x86/mm/p2m-ept.c
|
||||||
|
@@ -20,6 +20,7 @@
|
||||||
|
#include <xen/domain_page.h>
|
||||||
|
#include <xen/sched.h>
|
||||||
|
#include <asm/current.h>
|
||||||
|
+#include <asm/paging.h>
|
||||||
|
#include <asm/types.h>
|
||||||
|
#include <asm/domain.h>
|
||||||
|
#include <asm/hvm/vmx/vmx.h>
|
||||||
|
@@ -32,7 +33,6 @@ static int ept_next_level(struct domain
|
||||||
|
u32 index;
|
||||||
|
|
||||||
|
index = *gfn_remainder >> shift;
|
||||||
|
- *gfn_remainder &= (1UL << shift) - 1;
|
||||||
|
|
||||||
|
ept_entry = (*table) + index;
|
||||||
|
|
||||||
|
@@ -59,31 +59,52 @@ static int ept_next_level(struct domain
|
||||||
|
/* last step */
|
||||||
|
ept_entry->r = ept_entry->w = ept_entry->x = 1;
|
||||||
|
}
|
||||||
|
-
|
||||||
|
- next = map_domain_page(ept_entry->mfn);
|
||||||
|
- unmap_domain_page(*table);
|
||||||
|
- *table = next;
|
||||||
|
-
|
||||||
|
- return 1;
|
||||||
|
+ if ( !ept_entry->sp_avail )
|
||||||
|
+ {
|
||||||
|
+ *gfn_remainder &= (1UL << shift) - 1;
|
||||||
|
+ next = map_domain_page(ept_entry->mfn);
|
||||||
|
+ unmap_domain_page(*table);
|
||||||
|
+ *table = next;
|
||||||
|
+ return 1;
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#define GUEST_TABLE_SUPER_PAGE 2
|
||||||
|
static int
|
||||||
|
-ept_set_entry(struct domain *d, unsigned long gfn, mfn_t mfn, p2m_type_t p2mt)
|
||||||
|
+ept_set_entry(struct domain *d, unsigned long gfn, mfn_t mfn, int order, p2m_type_t p2mt)
|
||||||
|
{
|
||||||
|
ept_entry_t *table =
|
||||||
|
map_domain_page(mfn_x(pagetable_get_mfn(d->arch.phys_table)));
|
||||||
|
- unsigned long gfn_remainder = gfn;
|
||||||
|
+ unsigned long gfn_remainder = gfn, offset = 0;
|
||||||
|
ept_entry_t *ept_entry;
|
||||||
|
u32 index;
|
||||||
|
- int i, rv = 0;
|
||||||
|
+ int i, rv = 0, ret = 0;
|
||||||
|
+ int walk_level = order / EPT_TABLE_ORDER;
|
||||||
|
+
|
||||||
|
+ ASSERT(table != NULL);
|
||||||
|
|
||||||
|
/* should check if gfn obeys GAW here */
|
||||||
|
|
||||||
|
- for ( i = EPT_DEFAULT_GAW; i > 0; i-- )
|
||||||
|
- if ( !ept_next_level(d, 0, &table, &gfn_remainder, i * EPT_TABLE_ORDER) )
|
||||||
|
+ if ( order != 0 )
|
||||||
|
+ if ( (gfn & ((1UL << order) - 1)) )
|
||||||
|
+ return 1;
|
||||||
|
+
|
||||||
|
+ for ( i = EPT_DEFAULT_GAW; i > walk_level; i-- )
|
||||||
|
+ {
|
||||||
|
+ ret = ept_next_level(d, 0, &table,
|
||||||
|
+ &gfn_remainder, i * EPT_TABLE_ORDER);
|
||||||
|
+ if ( !ret )
|
||||||
|
goto out;
|
||||||
|
+ else if ( ret == GUEST_TABLE_SUPER_PAGE )
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ index = gfn_remainder >> ( i ? (i * EPT_TABLE_ORDER): order);
|
||||||
|
+ walk_level = ( i ? ( i * EPT_TABLE_ORDER) : order) / EPT_TABLE_ORDER;
|
||||||
|
+ offset = (gfn_remainder & ( ((1 << (i*EPT_TABLE_ORDER)) - 1)));
|
||||||
|
|
||||||
|
- index = gfn_remainder;
|
||||||
|
ept_entry = table + index;
|
||||||
|
|
||||||
|
if ( mfn_valid(mfn_x(mfn)) )
|
||||||
|
@@ -93,9 +114,20 @@ ept_set_entry(struct domain *d, unsigned
|
||||||
|
d->arch.p2m.max_mapped_pfn = gfn;
|
||||||
|
|
||||||
|
ept_entry->emt = EPT_DEFAULT_MT;
|
||||||
|
- ept_entry->sp_avail = 0;
|
||||||
|
+ ept_entry->sp_avail = walk_level ? 1 : 0;
|
||||||
|
+
|
||||||
|
+ if ( ret == 2)
|
||||||
|
+ {
|
||||||
|
+ ept_entry->mfn = mfn_x(mfn) - offset;
|
||||||
|
+ if ( ept_entry->avail1 == p2m_ram_logdirty &&
|
||||||
|
+ p2mt == p2m_ram_rw )
|
||||||
|
+ for ( i = 0; i < 512; i++ )
|
||||||
|
+ paging_mark_dirty(d, mfn_x(mfn)-offset+i);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ ept_entry->mfn = mfn_x(mfn);
|
||||||
|
+
|
||||||
|
ept_entry->avail1 = p2mt;
|
||||||
|
- ept_entry->mfn = mfn_x(mfn);
|
||||||
|
ept_entry->rsvd = 0;
|
||||||
|
ept_entry->avail2 = 0;
|
||||||
|
/* last step */
|
||||||
|
@@ -122,7 +154,7 @@ static mfn_t ept_get_entry(struct domain
|
||||||
|
unsigned long gfn_remainder = gfn;
|
||||||
|
ept_entry_t *ept_entry;
|
||||||
|
u32 index;
|
||||||
|
- int i;
|
||||||
|
+ int i, ret=0;
|
||||||
|
mfn_t mfn = _mfn(INVALID_MFN);
|
||||||
|
|
||||||
|
*t = p2m_mmio_dm;
|
||||||
|
@@ -134,18 +166,29 @@ static mfn_t ept_get_entry(struct domain
|
||||||
|
/* should check if gfn obeys GAW here */
|
||||||
|
|
||||||
|
for ( i = EPT_DEFAULT_GAW; i > 0; i-- )
|
||||||
|
- if ( !ept_next_level(d, 1, &table, &gfn_remainder, i * EPT_TABLE_ORDER) )
|
||||||
|
+ {
|
||||||
|
+ ret = ept_next_level(d, 1, &table, &gfn_remainder, i * EPT_TABLE_ORDER);
|
||||||
|
+ if ( ret == 0 )
|
||||||
|
goto out;
|
||||||
|
+ else if ( ret == 2 )
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- index = gfn_remainder;
|
||||||
|
+ index = gfn_remainder >> ( i * EPT_TABLE_ORDER);
|
||||||
|
ept_entry = table + index;
|
||||||
|
|
||||||
|
- if ( (ept_entry->epte & 0x7) == 0x7 )
|
||||||
|
+ if ( ept_entry->avail1 != p2m_invalid )
|
||||||
|
{
|
||||||
|
- if ( ept_entry->avail1 != p2m_invalid )
|
||||||
|
- {
|
||||||
|
- *t = ept_entry->avail1;
|
||||||
|
- mfn = _mfn(ept_entry->mfn);
|
||||||
|
+ *t = ept_entry->avail1;
|
||||||
|
+ mfn = _mfn(ept_entry->mfn);
|
||||||
|
+ if ( i )
|
||||||
|
+ {
|
||||||
|
+ /* we may meet super pages, and to split into 4k pages
|
||||||
|
+ * to emulate p2m table
|
||||||
|
+ */
|
||||||
|
+ unsigned long split_mfn =
|
||||||
|
+ mfn_x(mfn) + (gfn_remainder & ( ((1 << (i*EPT_TABLE_ORDER)) - 1 )));
|
||||||
|
+ mfn = _mfn(split_mfn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/xen/arch/x86/mm/p2m.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm/p2m.c
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/x86/mm/p2m.c
|
||||||
|
@@ -203,7 +203,7 @@ p2m_next_level(struct domain *d, mfn_t *
|
||||||
|
|
||||||
|
// Returns 0 on error (out of memory)
|
||||||
|
static int
|
||||||
|
-p2m_set_entry(struct domain *d, unsigned long gfn, mfn_t mfn, p2m_type_t p2mt)
|
||||||
|
+p2m_set_entry(struct domain *d, unsigned long gfn, mfn_t mfn, int order, p2m_type_t p2mt)
|
||||||
|
{
|
||||||
|
// XXX -- this might be able to be faster iff current->domain == d
|
||||||
|
mfn_t table_mfn = pagetable_get_mfn(d->arch.phys_table);
|
||||||
|
@@ -285,9 +285,9 @@ void p2m_init(struct domain *d)
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline
|
||||||
|
-int set_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn, p2m_type_t p2mt)
|
||||||
|
+int set_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn, int order, p2m_type_t p2mt)
|
||||||
|
{
|
||||||
|
- return d->arch.p2m.set_entry(d, gfn, mfn, p2mt);
|
||||||
|
+ return d->arch.p2m.set_entry(d, gfn, mfn, order, p2mt);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Allocate a new p2m table for a domain.
|
||||||
|
@@ -349,7 +349,7 @@ int p2m_alloc_table(struct domain *d,
|
||||||
|
P2M_PRINTK("populating p2m table\n");
|
||||||
|
|
||||||
|
/* Initialise physmap tables for slot zero. Other code assumes this. */
|
||||||
|
- if ( !set_p2m_entry(d, 0, _mfn(INVALID_MFN), p2m_invalid) )
|
||||||
|
+ if ( !set_p2m_entry(d, 0, _mfn(INVALID_MFN), 0, p2m_invalid) )
|
||||||
|
goto error;
|
||||||
|
|
||||||
|
/* Copy all existing mappings from the page list and m2p */
|
||||||
|
@@ -368,7 +368,7 @@ int p2m_alloc_table(struct domain *d,
|
||||||
|
(gfn != 0x55555555L)
|
||||||
|
#endif
|
||||||
|
&& gfn != INVALID_M2P_ENTRY
|
||||||
|
- && !set_p2m_entry(d, gfn, mfn, p2m_ram_rw) )
|
||||||
|
+ && !set_p2m_entry(d, gfn, mfn, 0, p2m_ram_rw) )
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -682,30 +682,31 @@ static void audit_p2m(struct domain *d)
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
-p2m_remove_page(struct domain *d, unsigned long gfn, unsigned long mfn)
|
||||||
|
+p2m_remove_page(struct domain *d, unsigned long gfn, unsigned long mfn, int order)
|
||||||
|
{
|
||||||
|
if ( !paging_mode_translate(d) )
|
||||||
|
return;
|
||||||
|
P2M_DEBUG("removing gfn=%#lx mfn=%#lx\n", gfn, mfn);
|
||||||
|
|
||||||
|
- set_p2m_entry(d, gfn, _mfn(INVALID_MFN), p2m_invalid);
|
||||||
|
+ set_p2m_entry(d, gfn, _mfn(INVALID_MFN), order, p2m_invalid);
|
||||||
|
set_gpfn_from_mfn(mfn, INVALID_M2P_ENTRY);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
guest_physmap_remove_page(struct domain *d, unsigned long gfn,
|
||||||
|
- unsigned long mfn)
|
||||||
|
+ unsigned long mfn, int order)
|
||||||
|
{
|
||||||
|
p2m_lock(d);
|
||||||
|
audit_p2m(d);
|
||||||
|
- p2m_remove_page(d, gfn, mfn);
|
||||||
|
+ for ( int i = 0; i < ( 1<< order); i++ )
|
||||||
|
+ p2m_remove_page(d, gfn+i, mfn+i, order);
|
||||||
|
audit_p2m(d);
|
||||||
|
p2m_unlock(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
guest_physmap_add_entry(struct domain *d, unsigned long gfn,
|
||||||
|
- unsigned long mfn, p2m_type_t t)
|
||||||
|
+ unsigned long mfn, int order, p2m_type_t t)
|
||||||
|
{
|
||||||
|
unsigned long ogfn;
|
||||||
|
p2m_type_t ot;
|
||||||
|
@@ -756,13 +757,13 @@ guest_physmap_add_entry(struct domain *d
|
||||||
|
P2M_DEBUG("old gfn=%#lx -> mfn %#lx\n",
|
||||||
|
ogfn , mfn_x(omfn));
|
||||||
|
if ( mfn_x(omfn) == mfn )
|
||||||
|
- p2m_remove_page(d, ogfn, mfn);
|
||||||
|
+ p2m_remove_page(d, ogfn, mfn, order);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( mfn_valid(_mfn(mfn)) )
|
||||||
|
{
|
||||||
|
- if ( !set_p2m_entry(d, gfn, _mfn(mfn), t) )
|
||||||
|
+ if ( !set_p2m_entry(d, gfn, _mfn(mfn), order, t) )
|
||||||
|
rc = -EINVAL;
|
||||||
|
set_gpfn_from_mfn(mfn, gfn);
|
||||||
|
}
|
||||||
|
@@ -770,7 +771,7 @@ guest_physmap_add_entry(struct domain *d
|
||||||
|
{
|
||||||
|
gdprintk(XENLOG_WARNING, "Adding bad mfn to p2m map (%#lx -> %#lx)\n",
|
||||||
|
gfn, mfn);
|
||||||
|
- if ( !set_p2m_entry(d, gfn, _mfn(INVALID_MFN), p2m_invalid) )
|
||||||
|
+ if ( !set_p2m_entry(d, gfn, _mfn(INVALID_MFN), order, p2m_invalid) )
|
||||||
|
rc = -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -893,7 +894,7 @@ p2m_type_t p2m_change_type(struct domain
|
||||||
|
|
||||||
|
mfn = gfn_to_mfn(d, gfn, &pt);
|
||||||
|
if ( pt == ot )
|
||||||
|
- set_p2m_entry(d, gfn, mfn, nt);
|
||||||
|
+ set_p2m_entry(d, gfn, mfn, 0, nt);
|
||||||
|
|
||||||
|
p2m_unlock(d);
|
||||||
|
|
||||||
|
@@ -917,7 +918,7 @@ set_mmio_p2m_entry(struct domain *d, uns
|
||||||
|
set_gpfn_from_mfn(mfn_x(omfn), INVALID_M2P_ENTRY);
|
||||||
|
}
|
||||||
|
|
||||||
|
- rc = set_p2m_entry(d, gfn, mfn, p2m_mmio_direct);
|
||||||
|
+ rc = set_p2m_entry(d, gfn, mfn, 0, p2m_mmio_direct);
|
||||||
|
if ( 0 == rc )
|
||||||
|
gdprintk(XENLOG_ERR,
|
||||||
|
"set_mmio_p2m_entry: set_p2m_entry failed! mfn=%08lx\n",
|
||||||
|
@@ -941,7 +942,7 @@ clear_mmio_p2m_entry(struct domain *d, u
|
||||||
|
"clear_mmio_p2m_entry: gfn_to_mfn failed! gfn=%08lx\n", gfn);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
- rc = set_p2m_entry(d, gfn, _mfn(INVALID_MFN), 0);
|
||||||
|
+ rc = set_p2m_entry(d, gfn, _mfn(INVALID_MFN), 0, 0);
|
||||||
|
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
Index: xen-3.2.1-testing/xen/common/grant_table.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/common/grant_table.c
|
||||||
|
+++ xen-3.2.1-testing/xen/common/grant_table.c
|
||||||
|
@@ -1154,7 +1154,7 @@ gnttab_transfer(
|
||||||
|
spin_lock(&e->grant_table->lock);
|
||||||
|
|
||||||
|
sha = &shared_entry(e->grant_table, gop.ref);
|
||||||
|
- guest_physmap_add_page(e, sha->frame, mfn);
|
||||||
|
+ guest_physmap_add_page(e, sha->frame, mfn, 0);
|
||||||
|
sha->frame = mfn;
|
||||||
|
wmb();
|
||||||
|
sha->flags |= GTF_transfer_completed;
|
||||||
|
Index: xen-3.2.1-testing/xen/common/memory.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/common/memory.c
|
||||||
|
+++ xen-3.2.1-testing/xen/common/memory.c
|
||||||
|
@@ -113,8 +113,11 @@ static void populate_physmap(struct memo
|
||||||
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if ( unlikely(__copy_from_guest_offset(&gpfn, a->extent_list, i, 1)) )
|
||||||
|
+ if ( unlikely(__copy_from_guest_offset(&gpfn, a->extent_list, i << a->extent_order, 1)) )
|
||||||
|
+ {
|
||||||
|
+ printk("copy_from_guest failed.\n");
|
||||||
|
goto out;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
page = __alloc_domheap_pages(d, cpu, a->extent_order, a->memflags);
|
||||||
|
if ( unlikely(page == NULL) )
|
||||||
|
@@ -129,11 +132,7 @@ static void populate_physmap(struct memo
|
||||||
|
mfn = page_to_mfn(page);
|
||||||
|
|
||||||
|
if ( unlikely(paging_mode_translate(d)) )
|
||||||
|
- {
|
||||||
|
- for ( j = 0; j < (1 << a->extent_order); j++ )
|
||||||
|
- if ( guest_physmap_add_page(d, gpfn + j, mfn + j) )
|
||||||
|
- goto out;
|
||||||
|
- }
|
||||||
|
+ guest_physmap_add_page(d, gpfn, mfn, a->extent_order);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
for ( j = 0; j < (1 << a->extent_order); j++ )
|
||||||
|
@@ -175,7 +174,7 @@ int guest_remove_page(struct domain *d,
|
||||||
|
if ( test_and_clear_bit(_PGC_allocated, &page->count_info) )
|
||||||
|
put_page(page);
|
||||||
|
|
||||||
|
- guest_physmap_remove_page(d, gmfn, mfn);
|
||||||
|
+ guest_physmap_remove_page(d, gmfn, mfn, 0);
|
||||||
|
|
||||||
|
put_page(page);
|
||||||
|
|
||||||
|
@@ -416,7 +415,7 @@ static long memory_exchange(XEN_GUEST_HA
|
||||||
|
if ( !test_and_clear_bit(_PGC_allocated, &page->count_info) )
|
||||||
|
BUG();
|
||||||
|
mfn = page_to_mfn(page);
|
||||||
|
- guest_physmap_remove_page(d, mfn_to_gmfn(d, mfn), mfn);
|
||||||
|
+ guest_physmap_remove_page(d, mfn_to_gmfn(d, mfn), mfn, 0);
|
||||||
|
put_page(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -438,8 +437,7 @@ static long memory_exchange(XEN_GUEST_HA
|
||||||
|
if ( unlikely(paging_mode_translate(d)) )
|
||||||
|
{
|
||||||
|
/* Ignore failure here. There's nothing we can do. */
|
||||||
|
- for ( k = 0; k < (1UL << exch.out.extent_order); k++ )
|
||||||
|
- (void)guest_physmap_add_page(d, gpfn + k, mfn + k);
|
||||||
|
+ (void)guest_physmap_add_page(d, gpfn, mfn, exch.out.extent_order);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Index: xen-3.2.1-testing/xen/include/asm-ia64/grant_table.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/asm-ia64/grant_table.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/asm-ia64/grant_table.h
|
||||||
|
@@ -13,7 +13,7 @@ int create_grant_host_mapping(unsigned l
|
||||||
|
int replace_grant_host_mapping(unsigned long gpaddr, unsigned long mfn, unsigned long new_gpaddr, unsigned int flags);
|
||||||
|
|
||||||
|
// for grant transfer
|
||||||
|
-int guest_physmap_add_page(struct domain *d, unsigned long gpfn, unsigned long mfn);
|
||||||
|
+int guest_physmap_add_page(struct domain *d, unsigned long gpfn, unsigned long mfn, int order);
|
||||||
|
|
||||||
|
/* XXX
|
||||||
|
* somewhere appropriate
|
||||||
|
Index: xen-3.2.1-testing/xen/include/asm-ia64/shadow.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/asm-ia64/shadow.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/asm-ia64/shadow.h
|
||||||
|
@@ -40,8 +40,10 @@
|
||||||
|
* Utilities to change relationship of gpfn->mfn for designated domain,
|
||||||
|
* which is required by gnttab transfer, balloon, device model and etc.
|
||||||
|
*/
|
||||||
|
-int guest_physmap_add_page(struct domain *d, unsigned long gpfn, unsigned long mfn);
|
||||||
|
-void guest_physmap_remove_page(struct domain *d, unsigned long gpfn, unsigned long mfn);
|
||||||
|
+int guest_physmap_add_page(struct domain *d, unsigned long gpfn,
|
||||||
|
+ unsigned long mfn, int order);
|
||||||
|
+void guest_physmap_remove_page(struct domain *d, unsigned long gpfn,
|
||||||
|
+ unsigned long mfn, int order);
|
||||||
|
|
||||||
|
static inline int
|
||||||
|
shadow_mode_enabled(struct domain *d)
|
||||||
|
Index: xen-3.2.1-testing/xen/include/asm-powerpc/mm.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/asm-powerpc/mm.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/asm-powerpc/mm.h
|
||||||
|
@@ -278,9 +278,9 @@ extern int steal_page(struct domain *d,
|
||||||
|
extern int guest_physmap_max_mem_pages(struct domain *d, unsigned long new_max);
|
||||||
|
|
||||||
|
extern void guest_physmap_add_page(
|
||||||
|
- struct domain *d, unsigned long gpfn, unsigned long mfn);
|
||||||
|
+ struct domain *d, unsigned long gpfn, unsigned long mfn, int order);
|
||||||
|
|
||||||
|
extern void guest_physmap_remove_page(
|
||||||
|
- struct domain *d, unsigned long gpfn, unsigned long mfn);
|
||||||
|
+ struct domain *d, unsigned long gpfn, unsigned long mfn, int order);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
Index: xen-3.2.1-testing/xen/include/asm-x86/domain.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/domain.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/asm-x86/domain.h
|
||||||
|
@@ -166,7 +166,7 @@ struct p2m_domain {
|
||||||
|
void (*free_page )(struct domain *d,
|
||||||
|
struct page_info *pg);
|
||||||
|
int (*set_entry )(struct domain *d, unsigned long gfn,
|
||||||
|
- mfn_t mfn, p2m_type_t p2mt);
|
||||||
|
+ mfn_t mfn, int order, p2m_type_t p2mt);
|
||||||
|
mfn_t (*get_entry )(struct domain *d, unsigned long gfn,
|
||||||
|
p2m_type_t *p2mt);
|
||||||
|
mfn_t (*get_entry_fast)(unsigned long gfn, p2m_type_t *p2mt);
|
||||||
|
Index: xen-3.2.1-testing/xen/include/asm-x86/p2m.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/p2m.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/asm-x86/p2m.h
|
||||||
|
@@ -191,21 +191,32 @@ void p2m_teardown(struct domain *d);
|
||||||
|
|
||||||
|
/* Add a page to a domain's p2m table */
|
||||||
|
int guest_physmap_add_entry(struct domain *d, unsigned long gfn,
|
||||||
|
- unsigned long mfn, p2m_type_t t);
|
||||||
|
+ unsigned long mfn, int order, p2m_type_t t);
|
||||||
|
|
||||||
|
/* Untyped version for RAM only, for compatibility
|
||||||
|
*
|
||||||
|
* Return 0 for success
|
||||||
|
*/
|
||||||
|
static inline int guest_physmap_add_page(struct domain *d, unsigned long gfn,
|
||||||
|
- unsigned long mfn)
|
||||||
|
+ unsigned long mfn, int order)
|
||||||
|
{
|
||||||
|
- return guest_physmap_add_entry(d, gfn, mfn, p2m_ram_rw);
|
||||||
|
+ int ret;
|
||||||
|
+
|
||||||
|
+ for ( int i = 0; i < (1 << order); i++ )
|
||||||
|
+ {
|
||||||
|
+ ret = guest_physmap_add_entry(d, gfn+i, mfn+i, order, p2m_ram_rw);
|
||||||
|
+ if ( ret != 0 )
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* TODO: fix exit path when failure */
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove a page from a domain's p2m table */
|
||||||
|
void guest_physmap_remove_page(struct domain *d, unsigned long gfn,
|
||||||
|
- unsigned long mfn);
|
||||||
|
+ unsigned long mfn, int order);
|
||||||
|
|
||||||
|
/* Change types across all p2m entries in a domain */
|
||||||
|
void p2m_change_type_global(struct domain *d, p2m_type_t ot, p2m_type_t nt);
|
||||||
|
Index: xen-3.2.1-testing/xen/include/xen/paging.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/xen/paging.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/xen/paging.h
|
||||||
|
@@ -18,8 +18,8 @@
|
||||||
|
#else
|
||||||
|
|
||||||
|
#define paging_mode_translate(d) (0)
|
||||||
|
-#define guest_physmap_add_page(d, p, m) (0)
|
||||||
|
-#define guest_physmap_remove_page(d, p, m) ((void)0)
|
||||||
|
+#define guest_physmap_add_page(d, p, m, order) (0)
|
||||||
|
+#define guest_physmap_remove_page(d, p, m, order) ((void)0)
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
Index: xen-3.2-testing/tools/libxc/xc_hvm_build.c
|
Index: xen-3.2.1-testing/tools/libxc/xc_hvm_build.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/libxc/xc_hvm_build.c
|
--- xen-3.2.1-testing.orig/tools/libxc/xc_hvm_build.c
|
||||||
+++ xen-3.2-testing/tools/libxc/xc_hvm_build.c
|
+++ xen-3.2.1-testing/tools/libxc/xc_hvm_build.c
|
||||||
@@ -20,6 +20,7 @@
|
@@ -20,6 +20,7 @@
|
||||||
#include <xen/libelf.h>
|
#include <xen/libelf.h>
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ Index: xen-3.2-testing/tools/libxc/xc_hvm_build.c
|
|||||||
|
|
||||||
static void build_e820map(void *e820_page, unsigned long long mem_size)
|
static void build_e820map(void *e820_page, unsigned long long mem_size)
|
||||||
{
|
{
|
||||||
@@ -154,6 +155,7 @@ static int setup_guest(int xc_handle,
|
@@ -160,6 +161,7 @@ static int setup_guest(int xc_handle,
|
||||||
struct xen_add_to_physmap xatp;
|
struct xen_add_to_physmap xatp;
|
||||||
struct shared_info *shared_info;
|
struct shared_info *shared_info;
|
||||||
void *e820_page;
|
void *e820_page;
|
||||||
@ -18,7 +18,7 @@ Index: xen-3.2-testing/tools/libxc/xc_hvm_build.c
|
|||||||
struct elf_binary elf;
|
struct elf_binary elf;
|
||||||
uint64_t v_start, v_end;
|
uint64_t v_start, v_end;
|
||||||
int rc;
|
int rc;
|
||||||
@@ -254,6 +256,18 @@ static int setup_guest(int xc_handle,
|
@@ -269,6 +271,18 @@ static int setup_guest(int xc_handle,
|
||||||
xc_set_hvm_param(xc_handle, dom, HVM_PARAM_BUFIOREQ_PFN, shared_page_nr-2);
|
xc_set_hvm_param(xc_handle, dom, HVM_PARAM_BUFIOREQ_PFN, shared_page_nr-2);
|
||||||
xc_set_hvm_param(xc_handle, dom, HVM_PARAM_IOREQ_PFN, shared_page_nr);
|
xc_set_hvm_param(xc_handle, dom, HVM_PARAM_IOREQ_PFN, shared_page_nr);
|
||||||
|
|
||||||
@ -37,11 +37,11 @@ Index: xen-3.2-testing/tools/libxc/xc_hvm_build.c
|
|||||||
/* Insert JMP <rel32> instruction at address 0x0 to reach entry point. */
|
/* Insert JMP <rel32> instruction at address 0x0 to reach entry point. */
|
||||||
entry_eip = elf_uval(&elf, elf.ehdr, e_entry);
|
entry_eip = elf_uval(&elf, elf.ehdr, e_entry);
|
||||||
if ( entry_eip != 0 )
|
if ( entry_eip != 0 )
|
||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/hvm.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/hvm.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/hvm.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/hvm.c
|
||||||
@@ -1969,6 +1969,10 @@ long do_hvm_op(unsigned long op, XEN_GUE
|
@@ -2011,6 +2011,10 @@ long do_hvm_op(unsigned long op, XEN_GUE
|
||||||
}
|
}
|
||||||
d->arch.hvm_domain.params[a.index] = a.value;
|
d->arch.hvm_domain.params[a.index] = a.value;
|
||||||
rc = 0;
|
rc = 0;
|
||||||
@ -52,10 +52,10 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmcs.c
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/vmx/vmcs.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/vmx/vmcs.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/vmx/vmcs.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/vmx/vmcs.c
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/vmx/vmcs.c
|
||||||
@@ -105,11 +105,23 @@ static void vmx_init_vmcs_config(void)
|
@@ -105,11 +105,23 @@ static void vmx_init_vmcs_config(void)
|
||||||
|
|
||||||
if ( _vmx_cpu_based_exec_control & CPU_BASED_ACTIVATE_SECONDARY_CONTROLS )
|
if ( _vmx_cpu_based_exec_control & CPU_BASED_ACTIVATE_SECONDARY_CONTROLS )
|
||||||
@ -169,11 +169,11 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmcs.c
|
|||||||
|
|
||||||
vmx_vmcs_exit(v);
|
vmx_vmcs_exit(v);
|
||||||
}
|
}
|
||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||||
@@ -90,6 +90,8 @@ static int vmx_vcpu_initialise(struct vc
|
@@ -91,6 +91,8 @@ static int vmx_vcpu_initialise(struct vc
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
vmx_install_vlapic_mapping(v);
|
vmx_install_vlapic_mapping(v);
|
||||||
|
|
||||||
#ifndef VMXASSIST
|
#ifndef VMXASSIST
|
||||||
@@ -530,20 +532,23 @@ static int vmx_restore_cr0_cr3(
|
@@ -531,20 +533,23 @@ static int vmx_restore_cr0_cr3(
|
||||||
unsigned long mfn = 0;
|
unsigned long mfn = 0;
|
||||||
p2m_type_t p2mt;
|
p2m_type_t p2mt;
|
||||||
|
|
||||||
@ -215,7 +215,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
|
|
||||||
v->arch.hvm_vcpu.guest_cr[0] = cr0 | X86_CR0_ET;
|
v->arch.hvm_vcpu.guest_cr[0] = cr0 | X86_CR0_ET;
|
||||||
v->arch.hvm_vcpu.guest_cr[3] = cr3;
|
v->arch.hvm_vcpu.guest_cr[3] = cr3;
|
||||||
@@ -1014,6 +1019,45 @@ static enum hvm_intblk vmx_interrupt_blo
|
@@ -1020,6 +1025,45 @@ static enum hvm_intblk vmx_interrupt_blo
|
||||||
return hvm_intblk_none;
|
return hvm_intblk_none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,9 +261,9 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
static void vmx_update_host_cr3(struct vcpu *v)
|
static void vmx_update_host_cr3(struct vcpu *v)
|
||||||
{
|
{
|
||||||
ASSERT((v == current) || !vcpu_runnable(v));
|
ASSERT((v == current) || !vcpu_runnable(v));
|
||||||
@@ -1039,21 +1083,57 @@ static void vmx_update_guest_cr(struct v
|
@@ -1051,21 +1095,57 @@ static void vmx_update_guest_cr(struct v
|
||||||
__vm_clear_bit(EXCEPTION_BITMAP, TRAP_no_device);
|
v->arch.hvm_vmx.vmxemul |= VMXEMUL_REALMODE;
|
||||||
}
|
#endif
|
||||||
|
|
||||||
+ if ( paging_mode_hap(v->domain) )
|
+ if ( paging_mode_hap(v->domain) )
|
||||||
+ {
|
+ {
|
||||||
@ -322,7 +322,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
__vmwrite(GUEST_CR4, v->arch.hvm_vcpu.hw_cr[4]);
|
__vmwrite(GUEST_CR4, v->arch.hvm_vcpu.hw_cr[4]);
|
||||||
__vmwrite(CR4_READ_SHADOW, v->arch.hvm_vcpu.guest_cr[4]);
|
__vmwrite(CR4_READ_SHADOW, v->arch.hvm_vcpu.guest_cr[4]);
|
||||||
break;
|
break;
|
||||||
@@ -1121,6 +1201,7 @@ static int vmx_event_pending(struct vcpu
|
@@ -1133,6 +1213,7 @@ static int vmx_event_pending(struct vcpu
|
||||||
|
|
||||||
static struct hvm_function_table vmx_function_table = {
|
static struct hvm_function_table vmx_function_table = {
|
||||||
.name = "VMX",
|
.name = "VMX",
|
||||||
@ -330,7 +330,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
.domain_initialise = vmx_domain_initialise,
|
.domain_initialise = vmx_domain_initialise,
|
||||||
.domain_destroy = vmx_domain_destroy,
|
.domain_destroy = vmx_domain_destroy,
|
||||||
.vcpu_initialise = vmx_vcpu_initialise,
|
.vcpu_initialise = vmx_vcpu_initialise,
|
||||||
@@ -1178,6 +1259,12 @@ void start_vmx(void)
|
@@ -1190,6 +1271,12 @@ void start_vmx(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -343,7 +343,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
setup_vmcs_dump();
|
setup_vmcs_dump();
|
||||||
|
|
||||||
hvm_enable(&vmx_function_table);
|
hvm_enable(&vmx_function_table);
|
||||||
@@ -2690,6 +2777,18 @@ void vmx_wbinvd_intercept(void)
|
@@ -2701,6 +2788,18 @@ void vmx_wbinvd_intercept(void)
|
||||||
wbinvd();
|
wbinvd();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
static void vmx_failed_vmentry(unsigned int exit_reason,
|
static void vmx_failed_vmentry(unsigned int exit_reason,
|
||||||
struct cpu_user_regs *regs)
|
struct cpu_user_regs *regs)
|
||||||
{
|
{
|
||||||
@@ -2729,6 +2828,15 @@ asmlinkage void vmx_vmexit_handler(struc
|
@@ -2740,6 +2839,15 @@ asmlinkage void vmx_vmexit_handler(struc
|
||||||
unsigned long exit_qualification, inst_len = 0;
|
unsigned long exit_qualification, inst_len = 0;
|
||||||
struct vcpu *v = current;
|
struct vcpu *v = current;
|
||||||
|
|
||||||
@ -378,7 +378,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
exit_reason = __vmread(VM_EXIT_REASON);
|
exit_reason = __vmread(VM_EXIT_REASON);
|
||||||
|
|
||||||
hvmtrace_vmexit(v, regs->eip, exit_reason);
|
hvmtrace_vmexit(v, regs->eip, exit_reason);
|
||||||
@@ -2969,6 +3077,21 @@ asmlinkage void vmx_vmexit_handler(struc
|
@@ -2980,6 +3088,21 @@ asmlinkage void vmx_vmexit_handler(struc
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -400,19 +400,19 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
default:
|
default:
|
||||||
exit_and_crash:
|
exit_and_crash:
|
||||||
gdprintk(XENLOG_ERR, "Bad vmexit (reason %x)\n", exit_reason);
|
gdprintk(XENLOG_ERR, "Bad vmexit (reason %x)\n", exit_reason);
|
||||||
Index: xen-3.2-testing/xen/arch/x86/mm/Makefile
|
Index: xen-3.2.1-testing/xen/arch/x86/mm/Makefile
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/mm/Makefile
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm/Makefile
|
||||||
+++ xen-3.2-testing/xen/arch/x86/mm/Makefile
|
+++ xen-3.2.1-testing/xen/arch/x86/mm/Makefile
|
||||||
@@ -3,3 +3,4 @@ subdir-y += hap
|
@@ -3,3 +3,4 @@ subdir-y += hap
|
||||||
|
|
||||||
obj-y += paging.o
|
obj-y += paging.o
|
||||||
obj-y += p2m.o
|
obj-y += p2m.o
|
||||||
+obj-y += p2m-ept.o
|
+obj-y += p2m-ept.o
|
||||||
Index: xen-3.2-testing/xen/arch/x86/mm/p2m-ept.c
|
Index: xen-3.2.1-testing/xen/arch/x86/mm/p2m-ept.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ xen-3.2-testing/xen/arch/x86/mm/p2m-ept.c
|
+++ xen-3.2.1-testing/xen/arch/x86/mm/p2m-ept.c
|
||||||
@@ -0,0 +1,177 @@
|
@@ -0,0 +1,177 @@
|
||||||
+/*
|
+/*
|
||||||
+ * ept-p2m.c: use the EPT page table as p2m
|
+ * ept-p2m.c: use the EPT page table as p2m
|
||||||
@ -591,10 +591,10 @@ Index: xen-3.2-testing/xen/arch/x86/mm/p2m-ept.c
|
|||||||
+ * indent-tabs-mode: nil
|
+ * indent-tabs-mode: nil
|
||||||
+ * End:
|
+ * End:
|
||||||
+ */
|
+ */
|
||||||
Index: xen-3.2-testing/xen/arch/x86/mm/p2m.c
|
Index: xen-3.2.1-testing/xen/arch/x86/mm/p2m.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/mm/p2m.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm/p2m.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/mm/p2m.c
|
+++ xen-3.2.1-testing/xen/arch/x86/mm/p2m.c
|
||||||
@@ -28,6 +28,7 @@
|
@@ -28,6 +28,7 @@
|
||||||
#include <asm/paging.h>
|
#include <asm/paging.h>
|
||||||
#include <asm/p2m.h>
|
#include <asm/p2m.h>
|
||||||
@ -652,10 +652,10 @@ Index: xen-3.2-testing/xen/arch/x86/mm/p2m.c
|
|||||||
/* Read another domain's p2m entries */
|
/* Read another domain's p2m entries */
|
||||||
{
|
{
|
||||||
mfn_t mfn;
|
mfn_t mfn;
|
||||||
Index: xen-3.2-testing/xen/include/asm-x86/domain.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/domain.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/asm-x86/domain.h
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/domain.h
|
||||||
+++ xen-3.2-testing/xen/include/asm-x86/domain.h
|
+++ xen-3.2.1-testing/xen/include/asm-x86/domain.h
|
||||||
@@ -131,6 +131,27 @@ struct hap_domain {
|
@@ -131,6 +131,27 @@ struct hap_domain {
|
||||||
/************************************************/
|
/************************************************/
|
||||||
/* p2m handling */
|
/* p2m handling */
|
||||||
@ -696,10 +696,10 @@ Index: xen-3.2-testing/xen/include/asm-x86/domain.h
|
|||||||
|
|
||||||
/* Highest guest frame that's ever been mapped in the p2m */
|
/* Highest guest frame that's ever been mapped in the p2m */
|
||||||
unsigned long max_mapped_pfn;
|
unsigned long max_mapped_pfn;
|
||||||
Index: xen-3.2-testing/xen/include/asm-x86/hvm/hvm.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/hvm/hvm.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/asm-x86/hvm/hvm.h
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/hvm/hvm.h
|
||||||
+++ xen-3.2-testing/xen/include/asm-x86/hvm/hvm.h
|
+++ xen-3.2.1-testing/xen/include/asm-x86/hvm/hvm.h
|
||||||
@@ -60,6 +60,9 @@ struct hvm_function_table {
|
@@ -60,6 +60,9 @@ struct hvm_function_table {
|
||||||
/* Support Hardware-Assisted Paging? */
|
/* Support Hardware-Assisted Paging? */
|
||||||
int hap_supported;
|
int hap_supported;
|
||||||
@ -723,11 +723,11 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/hvm.h
|
|||||||
int hvm_domain_initialise(struct domain *d);
|
int hvm_domain_initialise(struct domain *d);
|
||||||
void hvm_domain_relinquish_resources(struct domain *d);
|
void hvm_domain_relinquish_resources(struct domain *d);
|
||||||
void hvm_domain_destroy(struct domain *d);
|
void hvm_domain_destroy(struct domain *d);
|
||||||
Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmcs.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/hvm/vmx/vmcs.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/asm-x86/hvm/vmx/vmcs.h
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/hvm/vmx/vmcs.h
|
||||||
+++ xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmcs.h
|
+++ xen-3.2.1-testing/xen/include/asm-x86/hvm/vmx/vmcs.h
|
||||||
@@ -57,6 +57,9 @@ struct vmx_msr_state {
|
@@ -56,6 +56,9 @@ struct vmx_msr_state {
|
||||||
unsigned long msrs[VMX_MSR_COUNT];
|
unsigned long msrs[VMX_MSR_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -737,7 +737,7 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmcs.h
|
|||||||
struct arch_vmx_struct {
|
struct arch_vmx_struct {
|
||||||
/* Virtual address of VMCS. */
|
/* Virtual address of VMCS. */
|
||||||
struct vmcs_struct *vmcs;
|
struct vmcs_struct *vmcs;
|
||||||
@@ -73,8 +76,19 @@ struct arch_vmx_struct {
|
@@ -72,8 +75,19 @@ struct arch_vmx_struct {
|
||||||
int active_cpu;
|
int active_cpu;
|
||||||
int launched;
|
int launched;
|
||||||
|
|
||||||
@ -757,7 +757,7 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmcs.h
|
|||||||
|
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
struct vmx_msr_state msr_state;
|
struct vmx_msr_state msr_state;
|
||||||
@@ -111,6 +125,8 @@ void vmx_vmcs_exit(struct vcpu *v);
|
@@ -120,6 +134,8 @@ void vmx_vmcs_exit(struct vcpu *v);
|
||||||
#define CPU_BASED_MWAIT_EXITING 0x00000400
|
#define CPU_BASED_MWAIT_EXITING 0x00000400
|
||||||
#define CPU_BASED_RDPMC_EXITING 0x00000800
|
#define CPU_BASED_RDPMC_EXITING 0x00000800
|
||||||
#define CPU_BASED_RDTSC_EXITING 0x00001000
|
#define CPU_BASED_RDTSC_EXITING 0x00001000
|
||||||
@ -766,7 +766,7 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmcs.h
|
|||||||
#define CPU_BASED_CR8_LOAD_EXITING 0x00080000
|
#define CPU_BASED_CR8_LOAD_EXITING 0x00080000
|
||||||
#define CPU_BASED_CR8_STORE_EXITING 0x00100000
|
#define CPU_BASED_CR8_STORE_EXITING 0x00100000
|
||||||
#define CPU_BASED_TPR_SHADOW 0x00200000
|
#define CPU_BASED_TPR_SHADOW 0x00200000
|
||||||
@@ -139,6 +155,7 @@ extern u32 vmx_vmexit_control;
|
@@ -148,6 +164,7 @@ extern u32 vmx_vmexit_control;
|
||||||
extern u32 vmx_vmentry_control;
|
extern u32 vmx_vmentry_control;
|
||||||
|
|
||||||
#define SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES 0x00000001
|
#define SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES 0x00000001
|
||||||
@ -774,7 +774,7 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmcs.h
|
|||||||
#define SECONDARY_EXEC_WBINVD_EXITING 0x00000040
|
#define SECONDARY_EXEC_WBINVD_EXITING 0x00000040
|
||||||
extern u32 vmx_secondary_exec_control;
|
extern u32 vmx_secondary_exec_control;
|
||||||
|
|
||||||
@@ -154,6 +171,10 @@ extern bool_t cpu_has_vmx_ins_outs_instr
|
@@ -163,6 +180,10 @@ extern bool_t cpu_has_vmx_ins_outs_instr
|
||||||
(vmx_pin_based_exec_control & PIN_BASED_VIRTUAL_NMIS)
|
(vmx_pin_based_exec_control & PIN_BASED_VIRTUAL_NMIS)
|
||||||
#define cpu_has_vmx_msr_bitmap \
|
#define cpu_has_vmx_msr_bitmap \
|
||||||
(vmx_cpu_based_exec_control & CPU_BASED_ACTIVATE_MSR_BITMAP)
|
(vmx_cpu_based_exec_control & CPU_BASED_ACTIVATE_MSR_BITMAP)
|
||||||
@ -785,7 +785,7 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmcs.h
|
|||||||
|
|
||||||
/* GUEST_INTERRUPTIBILITY_INFO flags. */
|
/* GUEST_INTERRUPTIBILITY_INFO flags. */
|
||||||
#define VMX_INTR_SHADOW_STI 0x00000001
|
#define VMX_INTR_SHADOW_STI 0x00000001
|
||||||
@@ -195,11 +216,23 @@ enum vmcs_field {
|
@@ -204,11 +225,23 @@ enum vmcs_field {
|
||||||
VIRTUAL_APIC_PAGE_ADDR = 0x00002012,
|
VIRTUAL_APIC_PAGE_ADDR = 0x00002012,
|
||||||
VIRTUAL_APIC_PAGE_ADDR_HIGH = 0x00002013,
|
VIRTUAL_APIC_PAGE_ADDR_HIGH = 0x00002013,
|
||||||
APIC_ACCESS_ADDR = 0x00002014,
|
APIC_ACCESS_ADDR = 0x00002014,
|
||||||
@ -810,10 +810,10 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmcs.h
|
|||||||
PIN_BASED_VM_EXEC_CONTROL = 0x00004000,
|
PIN_BASED_VM_EXEC_CONTROL = 0x00004000,
|
||||||
CPU_BASED_VM_EXEC_CONTROL = 0x00004002,
|
CPU_BASED_VM_EXEC_CONTROL = 0x00004002,
|
||||||
EXCEPTION_BITMAP = 0x00004004,
|
EXCEPTION_BITMAP = 0x00004004,
|
||||||
Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/asm-x86/hvm/vmx/vmx.h
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||||
+++ xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
+++ xen-3.2.1-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||||
@@ -23,9 +23,27 @@
|
@@ -23,9 +23,27 @@
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
#include <asm/regs.h>
|
#include <asm/regs.h>
|
||||||
@ -843,7 +843,7 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
|||||||
|
|
||||||
void vmx_asm_vmexit_handler(struct cpu_user_regs);
|
void vmx_asm_vmexit_handler(struct cpu_user_regs);
|
||||||
void vmx_asm_do_vmentry(void);
|
void vmx_asm_do_vmentry(void);
|
||||||
@@ -85,6 +103,8 @@ int vmx_realmode_io_complete(void);
|
@@ -88,6 +106,8 @@ int vmx_realmode_io_complete(void);
|
||||||
#define EXIT_REASON_MACHINE_CHECK 41
|
#define EXIT_REASON_MACHINE_CHECK 41
|
||||||
#define EXIT_REASON_TPR_BELOW_THRESHOLD 43
|
#define EXIT_REASON_TPR_BELOW_THRESHOLD 43
|
||||||
#define EXIT_REASON_APIC_ACCESS 44
|
#define EXIT_REASON_APIC_ACCESS 44
|
||||||
@ -852,7 +852,7 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
|||||||
#define EXIT_REASON_WBINVD 54
|
#define EXIT_REASON_WBINVD 54
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -151,12 +171,14 @@ int vmx_realmode_io_complete(void);
|
@@ -154,12 +174,14 @@ int vmx_realmode_io_complete(void);
|
||||||
#define VMREAD_OPCODE ".byte 0x0f,0x78\n"
|
#define VMREAD_OPCODE ".byte 0x0f,0x78\n"
|
||||||
#define VMRESUME_OPCODE ".byte 0x0f,0x01,0xc3\n"
|
#define VMRESUME_OPCODE ".byte 0x0f,0x01,0xc3\n"
|
||||||
#define VMWRITE_OPCODE ".byte 0x0f,0x79\n"
|
#define VMWRITE_OPCODE ".byte 0x0f,0x79\n"
|
||||||
@ -868,7 +868,7 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
|||||||
|
|
||||||
static inline void __vmptrld(u64 addr)
|
static inline void __vmptrld(u64 addr)
|
||||||
{
|
{
|
||||||
@@ -240,6 +262,21 @@ static inline void __vm_clear_bit(unsign
|
@@ -243,6 +265,21 @@ static inline void __vm_clear_bit(unsign
|
||||||
__vmwrite(field, __vmread(field) & ~(1UL << bit));
|
__vmwrite(field, __vmread(field) & ~(1UL << bit));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -890,7 +890,7 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
|||||||
static inline void __vmxoff(void)
|
static inline void __vmxoff(void)
|
||||||
{
|
{
|
||||||
asm volatile (
|
asm volatile (
|
||||||
@@ -269,6 +306,29 @@ static inline int __vmxon(u64 addr)
|
@@ -272,6 +309,29 @@ static inline int __vmxon(u64 addr)
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -920,17 +920,17 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
|||||||
static inline void __vmx_inject_exception(
|
static inline void __vmx_inject_exception(
|
||||||
struct vcpu *v, int trap, int type, int error_code)
|
struct vcpu *v, int trap, int type, int error_code)
|
||||||
{
|
{
|
||||||
@@ -314,4 +374,6 @@ static inline void vmx_inject_nmi(struct
|
@@ -317,4 +377,6 @@ static inline void vmx_inject_nmi(struct
|
||||||
HVM_DELIVER_NO_ERROR_CODE);
|
HVM_DELIVER_NO_ERROR_CODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
+void ept_p2m_init(struct domain *d);
|
+void ept_p2m_init(struct domain *d);
|
||||||
+
|
+
|
||||||
#endif /* __ASM_X86_HVM_VMX_VMX_H__ */
|
#endif /* __ASM_X86_HVM_VMX_VMX_H__ */
|
||||||
Index: xen-3.2-testing/xen/include/asm-x86/p2m.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/p2m.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/asm-x86/p2m.h
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/p2m.h
|
||||||
+++ xen-3.2-testing/xen/include/asm-x86/p2m.h
|
+++ xen-3.2.1-testing/xen/include/asm-x86/p2m.h
|
||||||
@@ -43,27 +43,6 @@
|
@@ -43,27 +43,6 @@
|
||||||
*/
|
*/
|
||||||
#define phys_to_machine_mapping ((l1_pgentry_t *)RO_MPT_VIRT_START)
|
#define phys_to_machine_mapping ((l1_pgentry_t *)RO_MPT_VIRT_START)
|
||||||
@ -999,23 +999,17 @@ Index: xen-3.2-testing/xen/include/asm-x86/p2m.h
|
|||||||
return gfn_to_mfn_foreign(d, gfn, t);
|
return gfn_to_mfn_foreign(d, gfn, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/include/public/hvm/params.h
|
Index: xen-3.2.1-testing/xen/include/public/hvm/params.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/public/hvm/params.h
|
--- xen-3.2.1-testing.orig/xen/include/public/hvm/params.h
|
||||||
+++ xen-3.2-testing/xen/include/public/hvm/params.h
|
+++ xen-3.2.1-testing/xen/include/public/hvm/params.h
|
||||||
@@ -76,6 +76,7 @@
|
@@ -87,6 +87,8 @@
|
||||||
* Guest time always tracks wallclock (i.e., real) time.
|
|
||||||
*/
|
|
||||||
#define HVM_PARAM_TIMER_MODE 10
|
|
||||||
+#define HVM_PARAM_IDENT_PT 12
|
|
||||||
#define HVMPTM_delay_for_missed_ticks 0
|
|
||||||
#define HVMPTM_no_delay_for_missed_ticks 1
|
|
||||||
#define HVMPTM_no_missed_ticks_pending 2
|
|
||||||
@@ -84,6 +85,6 @@
|
|
||||||
/* Boolean: Enable virtual HPET (high-precision event timer)? (x86-only) */
|
/* Boolean: Enable virtual HPET (high-precision event timer)? (x86-only) */
|
||||||
#define HVM_PARAM_HPET_ENABLED 11
|
#define HVM_PARAM_HPET_ENABLED 12
|
||||||
|
|
||||||
-#define HVM_NR_PARAMS 12
|
-#define HVM_NR_PARAMS 13
|
||||||
+#define HVM_NR_PARAMS 13
|
+#define HVM_PARAM_IDENT_PT 13
|
||||||
|
+
|
||||||
|
+#define HVM_NR_PARAMS 14
|
||||||
|
|
||||||
#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
|
#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||||
@@ -50,6 +50,7 @@
|
@@ -50,6 +50,7 @@
|
||||||
#include <asm/hvm/vpt.h>
|
|
||||||
#include <public/hvm/save.h>
|
#include <public/hvm/save.h>
|
||||||
#include <asm/hvm/trace.h>
|
#include <asm/hvm/trace.h>
|
||||||
|
#include <asm/hvm/hvm_extensions.h>
|
||||||
+#include <asm/hap.h>
|
+#include <asm/hap.h>
|
||||||
|
|
||||||
enum handler_return { HNDL_done, HNDL_unhandled, HNDL_exception_raised };
|
enum handler_return { HNDL_done, HNDL_unhandled, HNDL_exception_raised };
|
||||||
|
|
||||||
@@ -2854,9 +2855,44 @@ void vmx_wbinvd_intercept(void)
|
@@ -2865,9 +2866,44 @@ void vmx_wbinvd_intercept(void)
|
||||||
|
|
||||||
static void ept_handle_violation(unsigned long qualification, paddr_t gpa)
|
static void ept_handle_violation(unsigned long qualification, paddr_t gpa)
|
||||||
{
|
{
|
||||||
@ -57,10 +57,10 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/mm/hap/hap.c
|
Index: xen-3.2.1-testing/xen/arch/x86/mm/hap/hap.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/mm/hap/hap.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm/hap/hap.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/mm/hap/hap.c
|
+++ xen-3.2.1-testing/xen/arch/x86/mm/hap/hap.c
|
||||||
@@ -61,7 +61,7 @@ int hap_enable_log_dirty(struct domain *
|
@@ -61,7 +61,7 @@ int hap_enable_log_dirty(struct domain *
|
||||||
hap_unlock(d);
|
hap_unlock(d);
|
||||||
|
|
||||||
@ -87,11 +87,11 @@ Index: xen-3.2-testing/xen/arch/x86/mm/hap/hap.c
|
|||||||
flush_tlb_mask(d->domain_dirty_cpumask);
|
flush_tlb_mask(d->domain_dirty_cpumask);
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/mm/p2m-ept.c
|
Index: xen-3.2.1-testing/xen/arch/x86/mm/p2m-ept.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/mm/p2m-ept.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm/p2m-ept.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/mm/p2m-ept.c
|
+++ xen-3.2.1-testing/xen/arch/x86/mm/p2m-ept.c
|
||||||
@@ -23,6 +23,27 @@
|
@@ -24,6 +24,27 @@
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
#include <asm/domain.h>
|
#include <asm/domain.h>
|
||||||
#include <asm/hvm/vmx/vmx.h>
|
#include <asm/hvm/vmx/vmx.h>
|
||||||
@ -119,7 +119,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm/p2m-ept.c
|
|||||||
|
|
||||||
static int ept_next_level(struct domain *d, bool_t read_only,
|
static int ept_next_level(struct domain *d, bool_t read_only,
|
||||||
ept_entry_t **table, unsigned long *gfn_remainder,
|
ept_entry_t **table, unsigned long *gfn_remainder,
|
||||||
@@ -100,6 +121,7 @@ ept_set_entry(struct domain *d, unsigned
|
@@ -132,6 +153,7 @@ ept_set_entry(struct domain *d, unsigned
|
||||||
ept_entry->avail2 = 0;
|
ept_entry->avail2 = 0;
|
||||||
/* last step */
|
/* last step */
|
||||||
ept_entry->r = ept_entry->w = ept_entry->x = 1;
|
ept_entry->r = ept_entry->w = ept_entry->x = 1;
|
||||||
@ -127,24 +127,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm/p2m-ept.c
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
ept_entry->epte = 0;
|
ept_entry->epte = 0;
|
||||||
@@ -140,13 +162,10 @@ static mfn_t ept_get_entry(struct domain
|
@@ -202,11 +224,94 @@ static mfn_t ept_get_entry_fast(unsigned
|
||||||
index = gfn_remainder;
|
|
||||||
ept_entry = table + index;
|
|
||||||
|
|
||||||
- if ( (ept_entry->epte & 0x7) == 0x7 )
|
|
||||||
+ if ( ept_entry->avail1 != p2m_invalid )
|
|
||||||
{
|
|
||||||
- if ( ept_entry->avail1 != p2m_invalid )
|
|
||||||
- {
|
|
||||||
- *t = ept_entry->avail1;
|
|
||||||
- mfn = _mfn(ept_entry->mfn);
|
|
||||||
- }
|
|
||||||
+ *t = ept_entry->avail1;
|
|
||||||
+ mfn = _mfn(ept_entry->mfn);
|
|
||||||
}
|
|
||||||
|
|
||||||
out:
|
|
||||||
@@ -159,11 +178,64 @@ static mfn_t ept_get_entry_fast(unsigned
|
|
||||||
return ept_get_entry(current->domain, gfn, t);
|
return ept_get_entry(current->domain, gfn, t);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,50 +137,80 @@ Index: xen-3.2-testing/xen/arch/x86/mm/p2m-ept.c
|
|||||||
+
|
+
|
||||||
+static void ept_change_entry_type_global(struct domain *d, p2m_type_t ot, p2m_type_t nt)
|
+static void ept_change_entry_type_global(struct domain *d, p2m_type_t ot, p2m_type_t nt)
|
||||||
+{
|
+{
|
||||||
+ if ( pagetable_get_pfn(d->arch.phys_table) == 0 )
|
+ if ( pagetable_get_pfn(d->arch.phys_table) == 0 )
|
||||||
+ return;
|
+ return;
|
||||||
+
|
+
|
||||||
+ if ( EPT_DEFAULT_GAW == 3 )
|
+ if ( EPT_DEFAULT_GAW == 3 )
|
||||||
+ {
|
+ {
|
||||||
+ ept_entry_t *l4e, *l3e, *l2e, *l1e;
|
+ ept_entry_t *l4e, *l3e, *l2e, *l1e;
|
||||||
+ int i4, i3, i2, i1;
|
+ int i4, i3, i2, i1;
|
||||||
+
|
+
|
||||||
+ l4e = map_domain_page(mfn_x(pagetable_get_mfn(d->arch.phys_table)));
|
+ l4e = map_domain_page(mfn_x(pagetable_get_mfn(d->arch.phys_table)));
|
||||||
+ for (i4 = 0; i4 < EPT_PAGETABLE_ENTRIES; i4++ )
|
+ for (i4 = 0; i4 < EPT_PAGETABLE_ENTRIES; i4++ )
|
||||||
+ {
|
+ {
|
||||||
+ if ( !(l4e+i4)->epte || (l4e+i4)->sp_avail)
|
+ if ( !(l4e+i4)->epte )
|
||||||
+ continue;
|
+ continue;
|
||||||
+ l3e = map_domain_page((l4e+i4)->mfn);
|
+ if ( !(l4e+i4)->sp_avail )
|
||||||
+ for ( i3 = 0; i3 < EPT_PAGETABLE_ENTRIES; i3++ )
|
+ {
|
||||||
+ {
|
+ l3e = map_domain_page((l4e+i4)->mfn);
|
||||||
+ if ( !(l3e+i3)->epte || (l3e+i3)->sp_avail )
|
+ for ( i3 = 0; i3 < EPT_PAGETABLE_ENTRIES; i3++ )
|
||||||
+ continue;
|
+ {
|
||||||
+ l2e = map_domain_page((l3e+i3)->mfn);
|
+ if ( !(l3e+i3)->epte )
|
||||||
+ for ( i2 = 0; i2 < EPT_PAGETABLE_ENTRIES; i2++ )
|
+ continue;
|
||||||
+ {
|
+ if ( !(l3e+i3)->sp_avail )
|
||||||
+ if ( !(l2e+i2)->epte || (l2e+i2)->sp_avail )
|
+ {
|
||||||
+ continue;
|
+ l2e = map_domain_page((l3e+i3)->mfn);
|
||||||
+ l1e = map_domain_page((l2e+i2)->mfn);
|
+ for ( i2 = 0; i2 < EPT_PAGETABLE_ENTRIES; i2++ )
|
||||||
+ for ( i1 = 0; i1 < EPT_PAGETABLE_ENTRIES; i1++ )
|
+ {
|
||||||
+ {
|
+ if ( !(l2e+i2)->epte )
|
||||||
+ if ( !(l1e+i1)->epte )
|
+ continue;
|
||||||
+ continue;
|
+ if ( !(l2e+i2)->sp_avail )
|
||||||
+ if ( (l1e+i1)->avail1 != ot )
|
+ {
|
||||||
+ continue;
|
+ l1e = map_domain_page((l2e+i2)->mfn);
|
||||||
+ (l1e+i1)->avail1 = nt;
|
+ for ( i1 = 0; i1 < EPT_PAGETABLE_ENTRIES; i1++ )
|
||||||
+ ept_p2m_type_to_flags(l1e+i1, nt);
|
+ {
|
||||||
+ }
|
+ if ( !(l1e+i1)->epte )
|
||||||
+ unmap_domain_page(l1e);
|
+ continue;
|
||||||
+ }
|
+ if ( (l1e+i1)->avail1 != ot )
|
||||||
+ unmap_domain_page(l2e);
|
+ continue;
|
||||||
+ }
|
+ (l1e+i1)->avail1 = nt;
|
||||||
+ unmap_domain_page(l3e);
|
+ ept_p2m_type_to_flags(l1e+i1, nt);
|
||||||
+ }
|
+ }
|
||||||
+ unmap_domain_page(l4e);
|
+ unmap_domain_page(l1e);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ if ( (l2e+i2)->avail1 != ot )
|
||||||
|
+ continue;
|
||||||
|
+ (l2e+i2)->avail1 = nt;
|
||||||
|
+ ept_p2m_type_to_flags(l2e+i2, nt);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ unmap_domain_page(l2e);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ if ( (l3e+i3)->avail1 != ot )
|
||||||
|
+ continue;
|
||||||
|
+ (l3e+i3)->avail1 = nt;
|
||||||
|
+ ept_p2m_type_to_flags(l3e+i3, nt);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ unmap_domain_page(l3e);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ if ( (l4e+i4)->avail1 != ot )
|
||||||
|
+ continue;
|
||||||
|
+ (l4e+i4)->avail1 = nt;
|
||||||
|
+ ept_p2m_type_to_flags(l4e+i4, nt);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ unmap_domain_page(l4e);
|
||||||
+
|
+
|
||||||
+ if ( d->vcpu[0] )
|
+ if ( d->vcpu[0] )
|
||||||
+ ept_sync_domain(d->vcpu[0]);
|
+ ept_sync_domain(d->vcpu[0]);
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
void ept_p2m_init(struct domain *d)
|
void ept_p2m_init(struct domain *d)
|
||||||
@ -209,10 +222,10 @@ Index: xen-3.2-testing/xen/arch/x86/mm/p2m-ept.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Index: xen-3.2-testing/xen/arch/x86/mm/p2m.c
|
Index: xen-3.2.1-testing/xen/arch/x86/mm/p2m.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/mm/p2m.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm/p2m.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/mm/p2m.c
|
+++ xen-3.2.1-testing/xen/arch/x86/mm/p2m.c
|
||||||
@@ -279,11 +279,19 @@ void p2m_init(struct domain *d)
|
@@ -279,11 +279,19 @@ void p2m_init(struct domain *d)
|
||||||
d->arch.p2m.set_entry = p2m_set_entry;
|
d->arch.p2m.set_entry = p2m_set_entry;
|
||||||
d->arch.p2m.get_entry = p2m_gfn_to_mfn;
|
d->arch.p2m.get_entry = p2m_gfn_to_mfn;
|
||||||
@ -231,9 +244,9 @@ Index: xen-3.2-testing/xen/arch/x86/mm/p2m.c
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
static inline
|
static inline
|
||||||
int set_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn, p2m_type_t p2mt)
|
int set_p2m_entry(struct domain *d, unsigned long gfn, mfn_t mfn, int order, p2m_type_t p2mt)
|
||||||
{
|
{
|
||||||
@@ -806,8 +814,6 @@ void p2m_change_type_global(struct domai
|
@@ -807,8 +815,6 @@ void p2m_change_type_global(struct domai
|
||||||
if ( pagetable_get_pfn(d->arch.phys_table) == 0 )
|
if ( pagetable_get_pfn(d->arch.phys_table) == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -242,7 +255,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm/p2m.c
|
|||||||
#if CONFIG_PAGING_LEVELS == 4
|
#if CONFIG_PAGING_LEVELS == 4
|
||||||
l4e = map_domain_page(mfn_x(pagetable_get_mfn(d->arch.phys_table)));
|
l4e = map_domain_page(mfn_x(pagetable_get_mfn(d->arch.phys_table)));
|
||||||
#elif CONFIG_PAGING_LEVELS == 3
|
#elif CONFIG_PAGING_LEVELS == 3
|
||||||
@@ -878,7 +884,6 @@ void p2m_change_type_global(struct domai
|
@@ -879,7 +885,6 @@ void p2m_change_type_global(struct domai
|
||||||
unmap_domain_page(l2e);
|
unmap_domain_page(l2e);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -250,10 +263,10 @@ Index: xen-3.2-testing/xen/arch/x86/mm/p2m.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Modify the p2m type of a single gfn from ot to nt, returning the
|
/* Modify the p2m type of a single gfn from ot to nt, returning the
|
||||||
Index: xen-3.2-testing/xen/include/asm-x86/domain.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/domain.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/asm-x86/domain.h
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/domain.h
|
||||||
+++ xen-3.2-testing/xen/include/asm-x86/domain.h
|
+++ xen-3.2.1-testing/xen/include/asm-x86/domain.h
|
||||||
@@ -171,6 +171,8 @@ struct p2m_domain {
|
@@ -171,6 +171,8 @@ struct p2m_domain {
|
||||||
p2m_type_t *p2mt);
|
p2m_type_t *p2mt);
|
||||||
mfn_t (*get_entry_fast)(unsigned long gfn, p2m_type_t *p2mt);
|
mfn_t (*get_entry_fast)(unsigned long gfn, p2m_type_t *p2mt);
|
||||||
@ -263,10 +276,10 @@ Index: xen-3.2-testing/xen/include/asm-x86/domain.h
|
|||||||
/* Highest guest frame that's ever been mapped in the p2m */
|
/* Highest guest frame that's ever been mapped in the p2m */
|
||||||
unsigned long max_mapped_pfn;
|
unsigned long max_mapped_pfn;
|
||||||
};
|
};
|
||||||
Index: xen-3.2-testing/xen/include/asm-x86/hap.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/hap.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/asm-x86/hap.h
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/hap.h
|
||||||
+++ xen-3.2-testing/xen/include/asm-x86/hap.h
|
+++ xen-3.2.1-testing/xen/include/asm-x86/hap.h
|
||||||
@@ -97,6 +97,49 @@ extern struct paging_mode hap_paging_pro
|
@@ -97,6 +97,49 @@ extern struct paging_mode hap_paging_pro
|
||||||
extern struct paging_mode hap_paging_pae_mode;
|
extern struct paging_mode hap_paging_pae_mode;
|
||||||
extern struct paging_mode hap_paging_long_mode;
|
extern struct paging_mode hap_paging_long_mode;
|
||||||
@ -317,11 +330,11 @@ Index: xen-3.2-testing/xen/include/asm-x86/hap.h
|
|||||||
#endif /* XEN_HAP_H */
|
#endif /* XEN_HAP_H */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Index: xen-3.2-testing/xen/include/asm-x86/p2m.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/p2m.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/asm-x86/p2m.h
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/p2m.h
|
||||||
+++ xen-3.2-testing/xen/include/asm-x86/p2m.h
|
+++ xen-3.2.1-testing/xen/include/asm-x86/p2m.h
|
||||||
@@ -209,6 +209,7 @@ void guest_physmap_remove_page(struct do
|
@@ -220,6 +220,7 @@ void guest_physmap_remove_page(struct do
|
||||||
|
|
||||||
/* Change types across all p2m entries in a domain */
|
/* Change types across all p2m entries in a domain */
|
||||||
void p2m_change_type_global(struct domain *d, p2m_type_t ot, p2m_type_t nt);
|
void p2m_change_type_global(struct domain *d, p2m_type_t ot, p2m_type_t nt);
|
16
migration-cpl-init.patch
Normal file
16
migration-cpl-init.patch
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
Signed-off-by: Robert Plillips <rphillips@xxxxxxxxxxxxxxx>
|
||||||
|
Signed-off-by: Ben Guthro <bguthro@xxxxxxxxxxxxxxxx>
|
||||||
|
|
||||||
|
Index: xen-3.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||||
|
+++ xen-3.2-testing/xen/arch/x86/hvm/svm/svm.c
|
||||||
|
@@ -642,7 +642,7 @@ static void svm_set_segment_register(str
|
||||||
|
break;
|
||||||
|
case x86_seg_ss:
|
||||||
|
memcpy(&vmcb->ss, reg, sizeof(*reg));
|
||||||
|
- vmcb->cpl = vmcb->ss.attr.fields.dpl;
|
||||||
|
+ vmcb->cpl = vmcb->cs.attr.fields.dpl;
|
||||||
|
break;
|
||||||
|
case x86_seg_tr:
|
||||||
|
memcpy(&vmcb->tr, reg, sizeof(*reg));
|
@ -1,8 +1,8 @@
|
|||||||
Index: xen-3.2-testing/tools/python/xen/lowlevel/xc/xc.c
|
Index: xen-3.2.1-testing/tools/python/xen/lowlevel/xc/xc.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/lowlevel/xc/xc.c
|
--- xen-3.2.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c
|
||||||
+++ xen-3.2-testing/tools/python/xen/lowlevel/xc/xc.c
|
+++ xen-3.2.1-testing/tools/python/xen/lowlevel/xc/xc.c
|
||||||
@@ -632,14 +632,14 @@ static PyObject *pyxc_hvm_build(XcObject
|
@@ -638,14 +638,14 @@ static PyObject *pyxc_hvm_build(XcObject
|
||||||
int i;
|
int i;
|
||||||
#endif
|
#endif
|
||||||
char *image;
|
char *image;
|
||||||
@ -21,7 +21,7 @@ Index: xen-3.2-testing/tools/python/xen/lowlevel/xc/xc.c
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if ( xc_hvm_build(self->xc_handle, dom, memsize, image) != 0 )
|
if ( xc_hvm_build(self->xc_handle, dom, memsize, image) != 0 )
|
||||||
@@ -664,6 +664,7 @@ static PyObject *pyxc_hvm_build(XcObject
|
@@ -670,6 +670,7 @@ static PyObject *pyxc_hvm_build(XcObject
|
||||||
va_hvm->checksum = -sum;
|
va_hvm->checksum = -sum;
|
||||||
munmap(va_map, XC_PAGE_SIZE);
|
munmap(va_map, XC_PAGE_SIZE);
|
||||||
#endif
|
#endif
|
||||||
@ -29,24 +29,23 @@ Index: xen-3.2-testing/tools/python/xen/lowlevel/xc/xc.c
|
|||||||
|
|
||||||
return Py_BuildValue("{}");
|
return Py_BuildValue("{}");
|
||||||
}
|
}
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendConfig.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendConfig.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendConfig.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendConfig.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendConfig.py
|
||||||
@@ -126,7 +126,7 @@ LEGACY_CFG_TO_XENAPI_CFG = reverse_dict(
|
@@ -138,6 +138,7 @@ XENAPI_PLATFORM_CFG_TYPES = {
|
||||||
# Platform configuration keys.
|
'monitor': int,
|
||||||
XENAPI_PLATFORM_CFG = [ 'acpi', 'apic', 'boot', 'device_model', 'display',
|
'nographic': int,
|
||||||
'fda', 'fdb', 'keymap', 'isa', 'localtime', 'monitor',
|
'pae' : int,
|
||||||
- 'nographic', 'pae', 'rtc_timeoffset', 'serial', 'sdl',
|
+ 'extid' : int,
|
||||||
+ 'nographic', 'pae', 'extid', 'rtc_timeoffset', 'serial', 'sdl',
|
'rtc_timeoffset': int,
|
||||||
'soundhw','stdvga', 'usb', 'usbdevice', 'hpet', 'vnc',
|
'serial': str,
|
||||||
'vncconsole', 'vncdisplay', 'vnclisten', 'timer_mode',
|
'sdl': int,
|
||||||
'vncpasswd', 'vncunused', 'xauthority', 'pci', 'vhpt',
|
Index: xen-3.2.1-testing/tools/python/xen/xend/image.py
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/image.py
|
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/image.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/image.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/image.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/image.py
|
||||||
@@ -432,6 +432,7 @@ class HVMImageHandler(ImageHandler):
|
@@ -438,6 +438,7 @@ class HVMImageHandler(ImageHandler):
|
||||||
|
|
||||||
self.apic = int(vmConfig['platform'].get('apic', 0))
|
self.apic = int(vmConfig['platform'].get('apic', 0))
|
||||||
self.acpi = int(vmConfig['platform'].get('acpi', 0))
|
self.acpi = int(vmConfig['platform'].get('acpi', 0))
|
||||||
@ -54,7 +53,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/image.py
|
|||||||
self.guest_os_type = vmConfig['platform'].get('guest_os_type')
|
self.guest_os_type = vmConfig['platform'].get('guest_os_type')
|
||||||
|
|
||||||
# Return a list of cmd line args to the device models based on the
|
# Return a list of cmd line args to the device models based on the
|
||||||
@@ -522,6 +523,7 @@ class HVMImageHandler(ImageHandler):
|
@@ -528,6 +529,7 @@ class HVMImageHandler(ImageHandler):
|
||||||
log.debug("store_evtchn = %d", store_evtchn)
|
log.debug("store_evtchn = %d", store_evtchn)
|
||||||
log.debug("memsize = %d", mem_mb)
|
log.debug("memsize = %d", mem_mb)
|
||||||
log.debug("vcpus = %d", self.vm.getVCpuCount())
|
log.debug("vcpus = %d", self.vm.getVCpuCount())
|
||||||
@ -62,7 +61,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/image.py
|
|||||||
log.debug("acpi = %d", self.acpi)
|
log.debug("acpi = %d", self.acpi)
|
||||||
log.debug("apic = %d", self.apic)
|
log.debug("apic = %d", self.apic)
|
||||||
|
|
||||||
@@ -529,6 +531,7 @@ class HVMImageHandler(ImageHandler):
|
@@ -535,6 +537,7 @@ class HVMImageHandler(ImageHandler):
|
||||||
image = self.kernel,
|
image = self.kernel,
|
||||||
memsize = mem_mb,
|
memsize = mem_mb,
|
||||||
vcpus = self.vm.getVCpuCount(),
|
vcpus = self.vm.getVCpuCount(),
|
||||||
@ -70,10 +69,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/image.py
|
|||||||
acpi = self.acpi,
|
acpi = self.acpi,
|
||||||
apic = self.apic)
|
apic = self.apic)
|
||||||
rc['notes'] = { 'SUSPEND_CANCEL': 1 }
|
rc['notes'] = { 'SUSPEND_CANCEL': 1 }
|
||||||
Index: xen-3.2-testing/tools/python/xen/xm/create.py
|
Index: xen-3.2.1-testing/tools/python/xen/xm/create.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xm/create.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xm/create.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xm/create.py
|
+++ xen-3.2.1-testing/tools/python/xen/xm/create.py
|
||||||
@@ -203,6 +203,10 @@ gopts.var('timer_mode', val='TIMER_MODE'
|
@@ -203,6 +203,10 @@ gopts.var('timer_mode', val='TIMER_MODE'
|
||||||
use="""Timer mode (0=delay virtual time when ticks are missed;
|
use="""Timer mode (0=delay virtual time when ticks are missed;
|
||||||
1=virtual time is always wallclock time.""")
|
1=virtual time is always wallclock time.""")
|
||||||
@ -85,7 +84,7 @@ Index: xen-3.2-testing/tools/python/xen/xm/create.py
|
|||||||
gopts.var('acpi', val='ACPI',
|
gopts.var('acpi', val='ACPI',
|
||||||
fn=set_int, default=1,
|
fn=set_int, default=1,
|
||||||
use="Disable or enable ACPI of HVM domain.")
|
use="Disable or enable ACPI of HVM domain.")
|
||||||
@@ -729,7 +733,7 @@ def configure_vifs(config_devs, vals):
|
@@ -734,7 +738,7 @@ def configure_vifs(config_devs, vals):
|
||||||
def configure_hvm(config_image, vals):
|
def configure_hvm(config_image, vals):
|
||||||
"""Create the config for HVM devices.
|
"""Create the config for HVM devices.
|
||||||
"""
|
"""
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
%patch
|
%patch
|
||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/svm/svm.c
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/svm/svm.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/svm/svm.c
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/svm/svm.c
|
||||||
@@ -50,6 +50,7 @@
|
@@ -50,6 +50,7 @@
|
||||||
#include <asm/hvm/vpt.h>
|
#include <asm/hvm/vpt.h>
|
||||||
#include <asm/hvm/trace.h>
|
#include <asm/hvm/trace.h>
|
||||||
@ -28,7 +28,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/svm/svm.c
|
|||||||
};
|
};
|
||||||
|
|
||||||
int start_svm(struct cpuinfo_x86 *c)
|
int start_svm(struct cpuinfo_x86 *c)
|
||||||
@@ -1044,6 +1046,7 @@ static void svm_vmexit_do_cpuid(struct v
|
@@ -1033,6 +1035,7 @@ static void svm_vmexit_do_cpuid(struct v
|
||||||
HVMTRACE_3D(CPUID, v, input,
|
HVMTRACE_3D(CPUID, v, input,
|
||||||
((uint64_t)eax << 32) | ebx, ((uint64_t)ecx << 32) | edx);
|
((uint64_t)eax << 32) | ebx, ((uint64_t)ecx << 32) | edx);
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/svm/svm.c
|
|||||||
inst_len = __get_instruction_length(v, INSTR_CPUID, NULL);
|
inst_len = __get_instruction_length(v, INSTR_CPUID, NULL);
|
||||||
__update_guest_eip(regs, inst_len);
|
__update_guest_eip(regs, inst_len);
|
||||||
}
|
}
|
||||||
@@ -1739,6 +1742,11 @@ static void svm_do_msr_access(
|
@@ -1728,6 +1731,11 @@ static void svm_do_msr_access(
|
||||||
/* is it a read? */
|
/* is it a read? */
|
||||||
if (vmcb->exitinfo1 == 0)
|
if (vmcb->exitinfo1 == 0)
|
||||||
{
|
{
|
||||||
@ -48,7 +48,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/svm/svm.c
|
|||||||
switch (ecx) {
|
switch (ecx) {
|
||||||
case MSR_IA32_TSC:
|
case MSR_IA32_TSC:
|
||||||
msr_content = hvm_get_guest_time(v);
|
msr_content = hvm_get_guest_time(v);
|
||||||
@@ -1829,6 +1837,11 @@ static void svm_do_msr_access(
|
@@ -1818,6 +1826,11 @@ static void svm_do_msr_access(
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -60,7 +60,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/svm/svm.c
|
|||||||
msr_content = (u32)regs->eax | ((u64)regs->edx << 32);
|
msr_content = (u32)regs->eax | ((u64)regs->edx << 32);
|
||||||
|
|
||||||
hvmtrace_msr_write(v, ecx, msr_content);
|
hvmtrace_msr_write(v, ecx, msr_content);
|
||||||
@@ -1889,6 +1902,7 @@ static void svm_do_msr_access(
|
@@ -1878,6 +1891,7 @@ static void svm_do_msr_access(
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -68,27 +68,27 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/svm/svm.c
|
|||||||
|
|
||||||
inst_len = __get_instruction_length(v, INSTR_WRMSR, NULL);
|
inst_len = __get_instruction_length(v, INSTR_WRMSR, NULL);
|
||||||
}
|
}
|
||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||||
@@ -50,6 +50,7 @@
|
@@ -49,6 +49,7 @@
|
||||||
#include <asm/hvm/vpt.h>
|
#include <asm/hvm/vpt.h>
|
||||||
#include <public/hvm/save.h>
|
#include <public/hvm/save.h>
|
||||||
#include <asm/hvm/trace.h>
|
#include <asm/hvm/trace.h>
|
||||||
+#include <asm/hvm/hvm_extensions.h>
|
+#include <asm/hvm/hvm_extensions.h>
|
||||||
#include <asm/hap.h>
|
|
||||||
|
|
||||||
enum handler_return { HNDL_done, HNDL_unhandled, HNDL_exception_raised };
|
enum handler_return { HNDL_done, HNDL_unhandled, HNDL_exception_raised };
|
||||||
@@ -65,6 +66,7 @@ static void vmx_install_vlapic_mapping(s
|
|
||||||
|
@@ -61,6 +62,7 @@ static void vmx_install_vlapic_mapping(s
|
||||||
static void vmx_update_guest_cr(struct vcpu *v, unsigned int cr);
|
static void vmx_update_guest_cr(struct vcpu *v, unsigned int cr);
|
||||||
static void vmx_update_guest_efer(struct vcpu *v);
|
static void vmx_update_guest_efer(struct vcpu *v);
|
||||||
|
|
||||||
+
|
+
|
||||||
static int vmx_domain_initialise(struct domain *d)
|
static int vmx_domain_initialise(struct domain *d)
|
||||||
{
|
{
|
||||||
if ( vmx_alloc_vpid(d) == 0 )
|
return vmx_alloc_vlapic_mapping(d);
|
||||||
@@ -1362,7 +1364,8 @@ void vmx_cpuid_intercept(
|
@@ -1248,7 +1250,8 @@ void vmx_cpuid_intercept(
|
||||||
unsigned int count = *ecx;
|
unsigned int count = *ecx;
|
||||||
|
|
||||||
#ifdef VMXASSIST
|
#ifdef VMXASSIST
|
||||||
@ -98,7 +98,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* NB. Unsupported interface for private use of VMXASSIST only.
|
* NB. Unsupported interface for private use of VMXASSIST only.
|
||||||
@@ -1443,12 +1446,13 @@ void vmx_cpuid_intercept(
|
@@ -1319,12 +1322,13 @@ void vmx_cpuid_intercept(
|
||||||
|
|
||||||
static void vmx_do_cpuid(struct cpu_user_regs *regs)
|
static void vmx_do_cpuid(struct cpu_user_regs *regs)
|
||||||
{
|
{
|
||||||
@ -113,7 +113,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
|
|
||||||
vmx_cpuid_intercept(&eax, &ebx, &ecx, &edx);
|
vmx_cpuid_intercept(&eax, &ebx, &ecx, &edx);
|
||||||
|
|
||||||
@@ -1456,6 +1460,7 @@ static void vmx_do_cpuid(struct cpu_user
|
@@ -1332,6 +1336,7 @@ static void vmx_do_cpuid(struct cpu_user
|
||||||
regs->ebx = ebx;
|
regs->ebx = ebx;
|
||||||
regs->ecx = ecx;
|
regs->ecx = ecx;
|
||||||
regs->edx = edx;
|
regs->edx = edx;
|
||||||
@ -121,7 +121,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define CASE_GET_REG_P(REG, reg) \
|
#define CASE_GET_REG_P(REG, reg) \
|
||||||
@@ -2440,6 +2445,9 @@ static int vmx_do_msr_read(struct cpu_us
|
@@ -2316,6 +2321,9 @@ int vmx_msr_read_intercept(struct cpu_us
|
||||||
|
|
||||||
HVM_DBG_LOG(DBG_LEVEL_1, "ecx=%x", ecx);
|
HVM_DBG_LOG(DBG_LEVEL_1, "ecx=%x", ecx);
|
||||||
|
|
||||||
@ -131,7 +131,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
switch ( ecx )
|
switch ( ecx )
|
||||||
{
|
{
|
||||||
case MSR_IA32_TSC:
|
case MSR_IA32_TSC:
|
||||||
@@ -2662,6 +2670,9 @@ static int vmx_do_msr_write(struct cpu_u
|
@@ -2499,6 +2507,9 @@ int vmx_msr_write_intercept(struct cpu_u
|
||||||
HVM_DBG_LOG(DBG_LEVEL_1, "ecx=%x, eax=%x, edx=%x",
|
HVM_DBG_LOG(DBG_LEVEL_1, "ecx=%x, eax=%x, edx=%x",
|
||||||
ecx, (u32)regs->eax, (u32)regs->edx);
|
ecx, (u32)regs->eax, (u32)regs->edx);
|
||||||
|
|
||||||
@ -141,25 +141,25 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/vmx.c
|
|||||||
msr_content = (u32)regs->eax | ((u64)regs->edx << 32);
|
msr_content = (u32)regs->eax | ((u64)regs->edx << 32);
|
||||||
|
|
||||||
hvmtrace_msr_write(v, ecx, msr_content);
|
hvmtrace_msr_write(v, ecx, msr_content);
|
||||||
Index: xen-3.2-testing/xen/include/asm-x86/hvm/domain.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/hvm/domain.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/asm-x86/hvm/domain.h
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/hvm/domain.h
|
||||||
+++ xen-3.2-testing/xen/include/asm-x86/hvm/domain.h
|
+++ xen-3.2.1-testing/xen/include/asm-x86/hvm/domain.h
|
||||||
@@ -74,6 +74,10 @@ struct hvm_domain {
|
@@ -74,6 +74,10 @@ struct hvm_domain {
|
||||||
|
|
||||||
/* Pass-through */
|
/* Pass-through */
|
||||||
struct hvm_iommu hvm_iommu;
|
struct hvm_iommu hvm_iommu;
|
||||||
|
|
||||||
+ /* Hvm extension handle */
|
+ /* Hvm extension handle */
|
||||||
+ void *ext_handle; /* will be NULL on creation (memset)*/
|
+ void *ext_handle; /* will be NULL on creation (memset)*/
|
||||||
+ struct extension_intercept_vector *ext_vector;
|
+ struct extension_intercept_vector *ext_vector;
|
||||||
+
|
+
|
||||||
|
bool_t hap_enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* __ASM_X86_HVM_DOMAIN_H__ */
|
Index: xen-3.2.1-testing/xen/include/public/hvm/params.h
|
||||||
Index: xen-3.2-testing/xen/include/public/hvm/params.h
|
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/public/hvm/params.h
|
--- xen-3.2.1-testing.orig/xen/include/public/hvm/params.h
|
||||||
+++ xen-3.2-testing/xen/include/public/hvm/params.h
|
+++ xen-3.2.1-testing/xen/include/public/hvm/params.h
|
||||||
@@ -50,10 +50,12 @@
|
@@ -50,10 +50,12 @@
|
||||||
|
|
||||||
#define HVM_PARAM_BUFIOREQ_PFN 6
|
#define HVM_PARAM_BUFIOREQ_PFN 6
|
||||||
@ -176,31 +176,52 @@ Index: xen-3.2-testing/xen/include/public/hvm/params.h
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -75,7 +77,8 @@
|
@@ -75,15 +77,16 @@
|
||||||
* Missed interrupts are collapsed together and delivered as one 'late tick'.
|
* Missed interrupts are collapsed together and delivered as one 'late tick'.
|
||||||
* Guest time always tracks wallclock (i.e., real) time.
|
* Guest time always tracks wallclock (i.e., real) time.
|
||||||
*/
|
*/
|
||||||
-#define HVM_PARAM_TIMER_MODE 10
|
-#define HVM_PARAM_TIMER_MODE 10
|
||||||
+//KYS Check the modifications done to this file
|
+//KYS Check the modifications done to this file
|
||||||
+#define HVM_PARAM_TIMER_MODE 11
|
+#define HVM_PARAM_TIMER_MODE 11
|
||||||
#define HVM_PARAM_IDENT_PT 12
|
|
||||||
#define HVMPTM_delay_for_missed_ticks 0
|
#define HVMPTM_delay_for_missed_ticks 0
|
||||||
#define HVMPTM_no_delay_for_missed_ticks 1
|
#define HVMPTM_no_delay_for_missed_ticks 1
|
||||||
@@ -83,8 +86,8 @@
|
#define HVMPTM_no_missed_ticks_pending 2
|
||||||
#define HVMPTM_one_missed_tick_pending 3
|
#define HVMPTM_one_missed_tick_pending 3
|
||||||
|
|
||||||
/* Boolean: Enable virtual HPET (high-precision event timer)? (x86-only) */
|
/* Boolean: Enable virtual HPET (high-precision event timer)? (x86-only) */
|
||||||
-#define HVM_PARAM_HPET_ENABLED 11
|
-#define HVM_PARAM_HPET_ENABLED 11
|
||||||
+#define HVM_PARAM_HPET_ENABLED 12
|
+#define HVM_PARAM_HPET_ENABLED 12
|
||||||
|
|
||||||
-#define HVM_NR_PARAMS 13
|
-#define HVM_NR_PARAMS 12
|
||||||
+#define HVM_NR_PARAMS 14
|
+#define HVM_NR_PARAMS 13
|
||||||
|
|
||||||
#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
|
#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */
|
||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/Makefile
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendConstants.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/Makefile
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendConstants.py
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/Makefile
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendConstants.py
|
||||||
|
@@ -43,11 +43,12 @@ HVM_PARAM_STORE_EVTCHN = 2
|
||||||
|
HVM_PARAM_PAE_ENABLED = 4
|
||||||
|
HVM_PARAM_IOREQ_PFN = 5
|
||||||
|
HVM_PARAM_BUFIOREQ_PFN = 6
|
||||||
|
-HVM_PARAM_NVRAM_FD = 7
|
||||||
|
-HVM_PARAM_VHPT_SIZE = 8
|
||||||
|
-HVM_PARAM_BUFPIOREQ_PFN = 9
|
||||||
|
-HVM_PARAM_TIMER_MODE = 10
|
||||||
|
-HVM_PARAM_HPET_ENABLED = 11
|
||||||
|
+HVM_PARAM_EXTEND_HYPERVISOR = 7
|
||||||
|
+HVM_PARAM_NVRAM_FD = 8
|
||||||
|
+HVM_PARAM_VHPT_SIZE = 9
|
||||||
|
+HVM_PARAM_BUFPIOREQ_PFN = 10
|
||||||
|
+HVM_PARAM_TIMER_MODE = 11
|
||||||
|
+HVM_PARAM_HPET_ENABLED = 12
|
||||||
|
|
||||||
|
restart_modes = [
|
||||||
|
"restart",
|
||||||
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/Makefile
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/Makefile
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
subdir-y += svm
|
subdir-y += svm
|
||||||
subdir-y += vmx
|
subdir-y += vmx
|
||||||
@ -208,10 +229,10 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/Makefile
|
|||||||
|
|
||||||
obj-y += hvm.o
|
obj-y += hvm.o
|
||||||
obj-y += i8254.o
|
obj-y += i8254.o
|
||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/hvm.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/hvm.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/hvm.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/hvm.c
|
||||||
@@ -42,6 +42,7 @@
|
@@ -42,6 +42,7 @@
|
||||||
#include <asm/mc146818rtc.h>
|
#include <asm/mc146818rtc.h>
|
||||||
#include <asm/spinlock.h>
|
#include <asm/spinlock.h>
|
||||||
@ -220,7 +241,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
|||||||
#include <asm/hvm/vpt.h>
|
#include <asm/hvm/vpt.h>
|
||||||
#include <asm/hvm/support.h>
|
#include <asm/hvm/support.h>
|
||||||
#include <asm/hvm/cacheattr.h>
|
#include <asm/hvm/cacheattr.h>
|
||||||
@@ -118,6 +119,7 @@ void hvm_migrate_timers(struct vcpu *v)
|
@@ -103,6 +104,7 @@ void hvm_migrate_timers(struct vcpu *v)
|
||||||
rtc_migrate_timers(v);
|
rtc_migrate_timers(v);
|
||||||
hpet_migrate_timers(v);
|
hpet_migrate_timers(v);
|
||||||
pt_migrate(v);
|
pt_migrate(v);
|
||||||
@ -228,7 +249,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
void hvm_do_resume(struct vcpu *v)
|
void hvm_do_resume(struct vcpu *v)
|
||||||
@@ -281,6 +283,7 @@ void hvm_domain_relinquish_resources(str
|
@@ -266,6 +268,7 @@ void hvm_domain_relinquish_resources(str
|
||||||
|
|
||||||
void hvm_domain_destroy(struct domain *d)
|
void hvm_domain_destroy(struct domain *d)
|
||||||
{
|
{
|
||||||
@ -236,7 +257,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
|||||||
hvm_funcs.domain_destroy(d);
|
hvm_funcs.domain_destroy(d);
|
||||||
vioapic_deinit(d);
|
vioapic_deinit(d);
|
||||||
hvm_destroy_cacheattr_region_list(d);
|
hvm_destroy_cacheattr_region_list(d);
|
||||||
@@ -449,8 +452,14 @@ int hvm_vcpu_initialise(struct vcpu *v)
|
@@ -434,8 +437,14 @@ int hvm_vcpu_initialise(struct vcpu *v)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
@ -251,7 +272,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
|||||||
|
|
||||||
if ( (rc = hvm_funcs.vcpu_initialise(v)) != 0 )
|
if ( (rc = hvm_funcs.vcpu_initialise(v)) != 0 )
|
||||||
goto fail2;
|
goto fail2;
|
||||||
@@ -498,12 +507,14 @@ int hvm_vcpu_initialise(struct vcpu *v)
|
@@ -483,12 +492,14 @@ int hvm_vcpu_initialise(struct vcpu *v)
|
||||||
hvm_funcs.vcpu_destroy(v);
|
hvm_funcs.vcpu_destroy(v);
|
||||||
fail2:
|
fail2:
|
||||||
vlapic_destroy(v);
|
vlapic_destroy(v);
|
||||||
@ -266,7 +287,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
|||||||
vlapic_destroy(v);
|
vlapic_destroy(v);
|
||||||
hvm_funcs.vcpu_destroy(v);
|
hvm_funcs.vcpu_destroy(v);
|
||||||
|
|
||||||
@@ -1575,6 +1586,10 @@ int hvm_do_hypercall(struct cpu_user_reg
|
@@ -1598,6 +1609,10 @@ int hvm_do_hypercall(struct cpu_user_reg
|
||||||
case 0:
|
case 0:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -277,7 +298,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
|||||||
|
|
||||||
if ( (eax >= NR_hypercalls) || !hvm_hypercall32_table[eax] )
|
if ( (eax >= NR_hypercalls) || !hvm_hypercall32_table[eax] )
|
||||||
{
|
{
|
||||||
@@ -1729,6 +1744,7 @@ int hvm_bringup_ap(int vcpuid, int tramp
|
@@ -1752,6 +1767,7 @@ int hvm_bringup_ap(int vcpuid, int tramp
|
||||||
vcpu_wake(v);
|
vcpu_wake(v);
|
||||||
|
|
||||||
gdprintk(XENLOG_INFO, "AP %d bringup succeeded.\n", vcpuid);
|
gdprintk(XENLOG_INFO, "AP %d bringup succeeded.\n", vcpuid);
|
||||||
@ -285,7 +306,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1966,6 +1982,9 @@ long do_hvm_op(unsigned long op, XEN_GUE
|
@@ -1989,6 +2005,9 @@ long do_hvm_op(unsigned long op, XEN_GUE
|
||||||
if ( a.value > HVMPTM_one_missed_tick_pending )
|
if ( a.value > HVMPTM_one_missed_tick_pending )
|
||||||
goto param_fail;
|
goto param_fail;
|
||||||
break;
|
break;
|
||||||
@ -295,11 +316,11 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm.c
|
|||||||
}
|
}
|
||||||
d->arch.hvm_domain.params[a.index] = a.value;
|
d->arch.hvm_domain.params[a.index] = a.value;
|
||||||
rc = 0;
|
rc = 0;
|
||||||
Index: xen-3.2-testing/xen/arch/x86/x86_64/asm-offsets.c
|
Index: xen-3.2.1-testing/xen/arch/x86/x86_64/asm-offsets.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/x86_64/asm-offsets.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/x86_64/asm-offsets.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/x86_64/asm-offsets.c
|
+++ xen-3.2.1-testing/xen/arch/x86/x86_64/asm-offsets.c
|
||||||
@@ -146,4 +146,7 @@ void __dummy__(void)
|
@@ -148,4 +148,7 @@ void __dummy__(void)
|
||||||
BLANK();
|
BLANK();
|
||||||
|
|
||||||
OFFSET(CPUINFO_ext_features, struct cpuinfo_x86, x86_capability[1]);
|
OFFSET(CPUINFO_ext_features, struct cpuinfo_x86, x86_capability[1]);
|
||||||
@ -307,10 +328,10 @@ Index: xen-3.2-testing/xen/arch/x86/x86_64/asm-offsets.c
|
|||||||
+
|
+
|
||||||
+ OFFSET(DOM_ext_vector, struct domain, arch.hvm_domain.ext_vector);
|
+ OFFSET(DOM_ext_vector, struct domain, arch.hvm_domain.ext_vector);
|
||||||
}
|
}
|
||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/x86_64/exits.S
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/vmx/x86_64/exits.S
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/vmx/x86_64/exits.S
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/vmx/x86_64/exits.S
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/vmx/x86_64/exits.S
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/vmx/x86_64/exits.S
|
||||||
@@ -112,6 +112,14 @@ vmx_process_softirqs:
|
@@ -112,6 +112,14 @@ vmx_process_softirqs:
|
||||||
ALIGN
|
ALIGN
|
||||||
ENTRY(vmx_asm_do_vmentry)
|
ENTRY(vmx_asm_do_vmentry)
|
||||||
@ -326,10 +347,10 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/vmx/x86_64/exits.S
|
|||||||
cli # tests must not race interrupts
|
cli # tests must not race interrupts
|
||||||
|
|
||||||
movl VCPU_processor(%rbx),%eax
|
movl VCPU_processor(%rbx),%eax
|
||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/svm/x86_64/exits.S
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/svm/x86_64/exits.S
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/svm/x86_64/exits.S
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/svm/x86_64/exits.S
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/svm/x86_64/exits.S
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/svm/x86_64/exits.S
|
||||||
@@ -37,6 +37,14 @@
|
@@ -37,6 +37,14 @@
|
||||||
|
|
||||||
ENTRY(svm_asm_do_resume)
|
ENTRY(svm_asm_do_resume)
|
||||||
@ -345,10 +366,10 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/svm/x86_64/exits.S
|
|||||||
CLGI
|
CLGI
|
||||||
|
|
||||||
movl VCPU_processor(%rbx),%eax
|
movl VCPU_processor(%rbx),%eax
|
||||||
Index: xen-3.2-testing/xen/arch/x86/hvm/save.c
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/save.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/hvm/save.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/save.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/hvm/save.c
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/save.c
|
||||||
@@ -23,6 +23,8 @@
|
@@ -23,6 +23,8 @@
|
||||||
|
|
||||||
#include <asm/hvm/support.h>
|
#include <asm/hvm/support.h>
|
||||||
@ -378,10 +399,10 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/save.c
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Index: xen-3.2-testing/xen/include/public/arch-x86/hvm/save.h
|
Index: xen-3.2.1-testing/xen/include/public/arch-x86/hvm/save.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/public/arch-x86/hvm/save.h
|
--- xen-3.2.1-testing.orig/xen/include/public/arch-x86/hvm/save.h
|
||||||
+++ xen-3.2-testing/xen/include/public/arch-x86/hvm/save.h
|
+++ xen-3.2.1-testing/xen/include/public/arch-x86/hvm/save.h
|
||||||
@@ -38,7 +38,7 @@ struct hvm_save_header {
|
@@ -38,7 +38,7 @@ struct hvm_save_header {
|
||||||
uint32_t version; /* File format version */
|
uint32_t version; /* File format version */
|
||||||
uint64_t changeset; /* Version of Xen that saved this file */
|
uint64_t changeset; /* Version of Xen that saved this file */
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: xen-3.2-testing/tools/ioemu/block.c
|
Index: xen-3.2.1-testing/tools/ioemu/block.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/block.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/block.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/block.c
|
+++ xen-3.2.1-testing/tools/ioemu/block.c
|
||||||
@@ -558,6 +558,9 @@ int bdrv_write(BlockDriverState *bs, int
|
@@ -583,6 +583,9 @@ int bdrv_write(BlockDriverState *bs, int
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
@ -12,10 +12,10 @@ Index: xen-3.2-testing/tools/ioemu/block.c
|
|||||||
return drv->bdrv_write(bs, sector_num, buf, nb_sectors);
|
return drv->bdrv_write(bs, sector_num, buf, nb_sectors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Index: xen-3.2-testing/tools/ioemu/hw/cirrus_vga.c
|
Index: xen-3.2.1-testing/tools/ioemu/hw/cirrus_vga.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/hw/cirrus_vga.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/hw/cirrus_vga.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/hw/cirrus_vga.c
|
+++ xen-3.2.1-testing/tools/ioemu/hw/cirrus_vga.c
|
||||||
@@ -220,6 +220,20 @@
|
@@ -220,6 +220,20 @@
|
||||||
#define CIRRUS_HOOK_NOT_HANDLED 0
|
#define CIRRUS_HOOK_NOT_HANDLED 0
|
||||||
#define CIRRUS_HOOK_HANDLED 1
|
#define CIRRUS_HOOK_HANDLED 1
|
||||||
@ -143,10 +143,10 @@ Index: xen-3.2-testing/tools/ioemu/hw/cirrus_vga.c
|
|||||||
for (x = 0; x < 8; x++) {
|
for (x = 0; x < 8; x++) {
|
||||||
if (val & 0x80) {
|
if (val & 0x80) {
|
||||||
*dst = s->cirrus_shadow_gr1;
|
*dst = s->cirrus_shadow_gr1;
|
||||||
Index: xen-3.2-testing/tools/ioemu/hw/cirrus_vga_rop.h
|
Index: xen-3.2.1-testing/tools/ioemu/hw/cirrus_vga_rop.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/hw/cirrus_vga_rop.h
|
--- xen-3.2.1-testing.orig/tools/ioemu/hw/cirrus_vga_rop.h
|
||||||
+++ xen-3.2-testing/tools/ioemu/hw/cirrus_vga_rop.h
|
+++ xen-3.2.1-testing/tools/ioemu/hw/cirrus_vga_rop.h
|
||||||
@@ -49,6 +49,12 @@ glue(cirrus_bitblt_rop_fwd_, ROP_NAME)(C
|
@@ -49,6 +49,12 @@ glue(cirrus_bitblt_rop_fwd_, ROP_NAME)(C
|
||||||
src = src_ - src_base;
|
src = src_ - src_base;
|
||||||
dstpitch -= bltwidth;
|
dstpitch -= bltwidth;
|
||||||
@ -160,10 +160,10 @@ Index: xen-3.2-testing/tools/ioemu/hw/cirrus_vga_rop.h
|
|||||||
for (y = 0; y < bltheight; y++) {
|
for (y = 0; y < bltheight; y++) {
|
||||||
for (x = 0; x < bltwidth; x++) {
|
for (x = 0; x < bltwidth; x++) {
|
||||||
ROP_OP(*(dst_base + m(dst)), *(src_base + m(src)));
|
ROP_OP(*(dst_base + m(dst)), *(src_base + m(src)));
|
||||||
Index: xen-3.2-testing/tools/ioemu/hw/i8259.c
|
Index: xen-3.2.1-testing/tools/ioemu/hw/i8259.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/hw/i8259.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/hw/i8259.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/hw/i8259.c
|
+++ xen-3.2.1-testing/tools/ioemu/hw/i8259.c
|
||||||
@@ -299,9 +299,11 @@ static void pic_ioport_write(void *opaqu
|
@@ -299,9 +299,11 @@ static void pic_ioport_write(void *opaqu
|
||||||
s->init_state = 1;
|
s->init_state = 1;
|
||||||
s->init4 = val & 1;
|
s->init4 = val & 1;
|
||||||
@ -178,10 +178,10 @@ Index: xen-3.2-testing/tools/ioemu/hw/i8259.c
|
|||||||
} else if (val & 0x08) {
|
} else if (val & 0x08) {
|
||||||
if (val & 0x04)
|
if (val & 0x04)
|
||||||
s->poll = 1;
|
s->poll = 1;
|
||||||
Index: xen-3.2-testing/tools/ioemu/hw/ne2000.c
|
Index: xen-3.2.1-testing/tools/ioemu/hw/ne2000.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/hw/ne2000.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/hw/ne2000.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/hw/ne2000.c
|
+++ xen-3.2.1-testing/tools/ioemu/hw/ne2000.c
|
||||||
@@ -221,7 +221,7 @@ static int ne2000_can_receive(void *opaq
|
@@ -221,7 +221,7 @@ static int ne2000_can_receive(void *opaq
|
||||||
NE2000State *s = opaque;
|
NE2000State *s = opaque;
|
||||||
|
|
||||||
@ -191,10 +191,10 @@ Index: xen-3.2-testing/tools/ioemu/hw/ne2000.c
|
|||||||
return !ne2000_buffer_full(s);
|
return !ne2000_buffer_full(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/ioemu/hw/pc.c
|
Index: xen-3.2.1-testing/tools/ioemu/hw/pc.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/hw/pc.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/hw/pc.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/hw/pc.c
|
+++ xen-3.2.1-testing/tools/ioemu/hw/pc.c
|
||||||
@@ -315,7 +315,8 @@ void bochs_bios_write(void *opaque, uint
|
@@ -315,7 +315,8 @@ void bochs_bios_write(void *opaque, uint
|
||||||
case 0x400:
|
case 0x400:
|
||||||
case 0x401:
|
case 0x401:
|
||||||
@ -216,10 +216,10 @@ Index: xen-3.2-testing/tools/ioemu/hw/pc.c
|
|||||||
case 0x500:
|
case 0x500:
|
||||||
case 0x503:
|
case 0x503:
|
||||||
#ifdef DEBUG_BIOS
|
#ifdef DEBUG_BIOS
|
||||||
Index: xen-3.2-testing/tools/ioemu/target-i386/translate.c
|
Index: xen-3.2.1-testing/tools/ioemu/target-i386/translate.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/target-i386/translate.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/target-i386/translate.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/target-i386/translate.c
|
+++ xen-3.2.1-testing/tools/ioemu/target-i386/translate.c
|
||||||
@@ -5326,7 +5326,12 @@ static target_ulong disas_insn(DisasCont
|
@@ -5326,7 +5326,12 @@ static target_ulong disas_insn(DisasCont
|
||||||
if (CODE64(s))
|
if (CODE64(s))
|
||||||
goto illegal_op;
|
goto illegal_op;
|
||||||
@ -250,11 +250,11 @@ Index: xen-3.2-testing/tools/ioemu/target-i386/translate.c
|
|||||||
case 0xfa: /* cli */
|
case 0xfa: /* cli */
|
||||||
if (!s->vm86) {
|
if (!s->vm86) {
|
||||||
if (s->cpl <= s->iopl) {
|
if (s->cpl <= s->iopl) {
|
||||||
Index: xen-3.2-testing/tools/ioemu/vl.c
|
Index: xen-3.2.1-testing/tools/ioemu/vl.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/vl.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/vl.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/vl.c
|
+++ xen-3.2.1-testing/tools/ioemu/vl.c
|
||||||
@@ -3582,8 +3582,8 @@ typedef struct NetSocketState {
|
@@ -3602,8 +3602,8 @@ typedef struct NetSocketState {
|
||||||
VLANClientState *vc;
|
VLANClientState *vc;
|
||||||
int fd;
|
int fd;
|
||||||
int state; /* 0 = getting length, 1 = getting data */
|
int state; /* 0 = getting length, 1 = getting data */
|
||||||
@ -265,7 +265,7 @@ Index: xen-3.2-testing/tools/ioemu/vl.c
|
|||||||
uint8_t buf[4096];
|
uint8_t buf[4096];
|
||||||
struct sockaddr_in dgram_dst; /* contains inet host and port destination iff connectionless (SOCK_DGRAM) */
|
struct sockaddr_in dgram_dst; /* contains inet host and port destination iff connectionless (SOCK_DGRAM) */
|
||||||
} NetSocketState;
|
} NetSocketState;
|
||||||
@@ -3614,7 +3614,8 @@ static void net_socket_receive_dgram(voi
|
@@ -3634,7 +3634,8 @@ static void net_socket_receive_dgram(voi
|
||||||
static void net_socket_send(void *opaque)
|
static void net_socket_send(void *opaque)
|
||||||
{
|
{
|
||||||
NetSocketState *s = opaque;
|
NetSocketState *s = opaque;
|
||||||
@ -275,7 +275,7 @@ Index: xen-3.2-testing/tools/ioemu/vl.c
|
|||||||
uint8_t buf1[4096];
|
uint8_t buf1[4096];
|
||||||
const uint8_t *buf;
|
const uint8_t *buf;
|
||||||
|
|
||||||
@@ -3653,7 +3654,15 @@ static void net_socket_send(void *opaque
|
@@ -3673,7 +3674,15 @@ static void net_socket_send(void *opaque
|
||||||
l = s->packet_len - s->index;
|
l = s->packet_len - s->index;
|
||||||
if (l > size)
|
if (l > size)
|
||||||
l = size;
|
l = size;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: xen-3.2-testing/tools/ioemu/sdl_keysym.h
|
Index: xen-3.2.1-testing/tools/ioemu/sdl_keysym.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/sdl_keysym.h
|
--- xen-3.2.1-testing.orig/tools/ioemu/sdl_keysym.h
|
||||||
+++ xen-3.2-testing/tools/ioemu/sdl_keysym.h
|
+++ xen-3.2.1-testing/tools/ioemu/sdl_keysym.h
|
||||||
@@ -274,5 +274,27 @@ static name2keysym_t name2keysym[]={
|
@@ -274,5 +274,27 @@ static name2keysym_t name2keysym[]={
|
||||||
{"Pause", SDLK_PAUSE},
|
{"Pause", SDLK_PAUSE},
|
||||||
{"Escape", SDLK_ESCAPE},
|
{"Escape", SDLK_ESCAPE},
|
||||||
@ -30,10 +30,10 @@ Index: xen-3.2-testing/tools/ioemu/sdl_keysym.h
|
|||||||
{0,0},
|
{0,0},
|
||||||
};
|
};
|
||||||
+
|
+
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendOptions.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendOptions.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendOptions.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendOptions.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendOptions.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendOptions.py
|
||||||
@@ -315,6 +315,9 @@ class XendOptions:
|
@@ -315,6 +315,9 @@ class XendOptions:
|
||||||
return self.get_config_string('vnc-x509-verify', self.xend_vnc_x509_verify)
|
return self.get_config_string('vnc-x509-verify', self.xend_vnc_x509_verify)
|
||||||
|
|
||||||
@ -44,11 +44,11 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendOptions.py
|
|||||||
class XendOptionsFile(XendOptions):
|
class XendOptionsFile(XendOptions):
|
||||||
|
|
||||||
"""Default path to the config file."""
|
"""Default path to the config file."""
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
@@ -1556,6 +1556,9 @@ class XendDomainInfo:
|
@@ -1561,6 +1561,9 @@ class XendDomainInfo:
|
||||||
if devclass in XendDevices.valid_devices():
|
if devclass in XendDevices.valid_devices():
|
||||||
log.info("createDevice: %s : %s" % (devclass, scrub_password(config)))
|
log.info("createDevice: %s : %s" % (devclass, scrub_password(config)))
|
||||||
dev_uuid = config.get('uuid')
|
dev_uuid = config.get('uuid')
|
||||||
|
342
vpid-novell-x64.patch
Normal file
342
vpid-novell-x64.patch
Normal file
@ -0,0 +1,342 @@
|
|||||||
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/vmx/vmcs.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/vmx/vmcs.c
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/vmx/vmcs.c
|
||||||
|
@@ -38,6 +38,9 @@
|
||||||
|
#include <asm/shadow.h>
|
||||||
|
#include <asm/tboot.h>
|
||||||
|
|
||||||
|
+static int opt_vpid_enabled = 1;
|
||||||
|
+boolean_param("vpid", opt_vpid_enabled);
|
||||||
|
+
|
||||||
|
/* Dynamic (run-time adjusted) execution control flags. */
|
||||||
|
u32 vmx_pin_based_exec_control __read_mostly;
|
||||||
|
u32 vmx_cpu_based_exec_control __read_mostly;
|
||||||
|
@@ -110,6 +113,8 @@ static void vmx_init_vmcs_config(void)
|
||||||
|
opt2 = SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES |
|
||||||
|
SECONDARY_EXEC_WBINVD_EXITING |
|
||||||
|
SECONDARY_EXEC_ENABLE_EPT;
|
||||||
|
+ if ( opt_vpid_enabled )
|
||||||
|
+ opt2 |= SECONDARY_EXEC_ENABLE_VPID;
|
||||||
|
_vmx_secondary_exec_control = adjust_vmx_controls(
|
||||||
|
min2, opt2, MSR_IA32_VMX_PROCBASED_CTLS2);
|
||||||
|
|
||||||
|
@@ -315,6 +320,8 @@ int vmx_cpu_up(void)
|
||||||
|
|
||||||
|
ept_sync_all();
|
||||||
|
|
||||||
|
+ vpid_sync_all();
|
||||||
|
+
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -628,6 +635,13 @@ static int construct_vmcs(struct vcpu *v
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if ( cpu_has_vmx_vpid )
|
||||||
|
+ {
|
||||||
|
+ v->arch.hvm_vmx.vpid = v->vcpu_id +
|
||||||
|
+ v->domain->arch.hvm_domain.vmx_vpid_base;
|
||||||
|
+ __vmwrite(VIRTUAL_PROCESSOR_ID, v->arch.hvm_vmx.vpid);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
vmx_vmcs_exit(v);
|
||||||
|
|
||||||
|
paging_update_paging_modes(v); /* will update HOST & GUEST_CR3 as reqd */
|
||||||
|
@@ -821,6 +835,7 @@ void vmx_do_resume(struct vcpu *v)
|
||||||
|
vmx_load_vmcs(v);
|
||||||
|
hvm_migrate_timers(v);
|
||||||
|
vmx_set_host_env(v);
|
||||||
|
+ vpid_sync_vcpu_all(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
debug_state = v->domain->debugger_attached;
|
||||||
|
@@ -975,6 +990,8 @@ void vmcs_dump_vcpu(struct vcpu *v)
|
||||||
|
(uint32_t)vmr(TPR_THRESHOLD));
|
||||||
|
printk("EPT pointer = 0x%08x%08x\n",
|
||||||
|
(uint32_t)vmr(EPT_POINTER_HIGH), (uint32_t)vmr(EPT_POINTER));
|
||||||
|
+ printk("virtual processor ID = 0x%04x\n",
|
||||||
|
+ (uint32_t)vmr(VIRTUAL_PROCESSOR_ID));
|
||||||
|
|
||||||
|
vmx_vmcs_exit(v);
|
||||||
|
}
|
||||||
|
Index: xen-3.2.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||||
|
@@ -58,6 +58,8 @@ static void vmx_ctxt_switch_to(struct vc
|
||||||
|
|
||||||
|
static int vmx_alloc_vlapic_mapping(struct domain *d);
|
||||||
|
static void vmx_free_vlapic_mapping(struct domain *d);
|
||||||
|
+static int vmx_alloc_vpid(struct domain *d);
|
||||||
|
+static void vmx_free_vpid(struct domain *d);
|
||||||
|
static void vmx_install_vlapic_mapping(struct vcpu *v);
|
||||||
|
static void vmx_update_guest_cr(struct vcpu *v, unsigned int cr);
|
||||||
|
static void vmx_update_guest_efer(struct vcpu *v);
|
||||||
|
@@ -65,12 +67,15 @@ static void vmx_update_guest_efer(struct
|
||||||
|
|
||||||
|
static int vmx_domain_initialise(struct domain *d)
|
||||||
|
{
|
||||||
|
- return vmx_alloc_vlapic_mapping(d);
|
||||||
|
+ if ( vmx_alloc_vpid(d) == 0 )
|
||||||
|
+ return vmx_alloc_vlapic_mapping(d);
|
||||||
|
+ return -EBUSY;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void vmx_domain_destroy(struct domain *d)
|
||||||
|
{
|
||||||
|
vmx_free_vlapic_mapping(d);
|
||||||
|
+ vmx_free_vpid(d);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int vmx_vcpu_initialise(struct vcpu *v)
|
||||||
|
@@ -1134,6 +1139,7 @@ static void vmx_update_guest_cr(struct v
|
||||||
|
vmx_load_pdptrs(v);
|
||||||
|
}
|
||||||
|
__vmwrite(GUEST_CR3, v->arch.hvm_vcpu.hw_cr[3]);
|
||||||
|
+ vpid_sync_vcpu_all(v);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
v->arch.hvm_vcpu.hw_cr[4] = HVM_CR4_HOST_MASK;
|
||||||
|
@@ -1182,9 +1188,14 @@ static void vmx_update_guest_efer(struct
|
||||||
|
|
||||||
|
static void vmx_flush_guest_tlbs(void)
|
||||||
|
{
|
||||||
|
- /* No tagged TLB support on VMX yet. The fact that we're in Xen
|
||||||
|
- * at all means any guest will have a clean TLB when it's next run,
|
||||||
|
- * because VMRESUME will flush it for us. */
|
||||||
|
+ /* If VPID (i.e. tagged TLB support) is not enabled, the fact that
|
||||||
|
+ * we're in Xen at all means any guest will have a clean TLB when
|
||||||
|
+ * it's next run, because VMRESUME will flush it for us.
|
||||||
|
+ *
|
||||||
|
+ * If enabled, we invalidate all translations associated with all
|
||||||
|
+ * VPID values */
|
||||||
|
+ if (0)
|
||||||
|
+ vpid_sync_all();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void vmx_inject_exception(
|
||||||
|
@@ -1238,6 +1249,11 @@ static struct hvm_function_table vmx_fun
|
||||||
|
.cpu_down = vmx_cpu_down,
|
||||||
|
};
|
||||||
|
|
||||||
|
+static int vpid_bitmap_size;
|
||||||
|
+static int vpid_bitmap_bytes;
|
||||||
|
+static void *vpid_bitmap;
|
||||||
|
+static spinlock_t vpid_lock;
|
||||||
|
+
|
||||||
|
void start_vmx(void)
|
||||||
|
{
|
||||||
|
static int bootstrapped;
|
||||||
|
@@ -1277,6 +1293,26 @@ void start_vmx(void)
|
||||||
|
vmx_function_table.hap_supported = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if ( cpu_has_vmx_vpid )
|
||||||
|
+ {
|
||||||
|
+ printk("VMX: VPID is available.\n");
|
||||||
|
+
|
||||||
|
+ vpid_bitmap_size = (1 << VMCS_VPID_WIDTH) / MAX_VIRT_CPUS;
|
||||||
|
+ vpid_bitmap_bytes = vpid_bitmap_size / (BITS_PER_LONG / BYTES_PER_LONG);
|
||||||
|
+ vpid_bitmap = xmalloc_bytes(vpid_bitmap_bytes);
|
||||||
|
+ memset(vpid_bitmap, 0, vpid_bitmap_bytes);
|
||||||
|
+ if ( vpid_bitmap == NULL )
|
||||||
|
+ {
|
||||||
|
+ printk("VMX: failed to allocate VPID bitmap.\n");
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /* vpid 0 is used by hypervisor itself */
|
||||||
|
+ set_bit(0, vpid_bitmap);
|
||||||
|
+
|
||||||
|
+ spin_lock_init(&vpid_lock);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
setup_vmcs_dump();
|
||||||
|
|
||||||
|
hvm_enable(&vmx_function_table);
|
||||||
|
@@ -2542,6 +2578,45 @@ static void vmx_free_vlapic_mapping(stru
|
||||||
|
free_xenheap_page(mfn_to_virt(mfn));
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int vmx_alloc_vpid(struct domain *d)
|
||||||
|
+{
|
||||||
|
+ int vpid;
|
||||||
|
+
|
||||||
|
+ if ( !cpu_has_vmx_vpid )
|
||||||
|
+ return 0;
|
||||||
|
+
|
||||||
|
+ spin_lock(&vpid_lock);
|
||||||
|
+
|
||||||
|
+ vpid = find_first_zero_bit(vpid_bitmap, vpid_bitmap_size);
|
||||||
|
+ if ( vpid >= vpid_bitmap_size )
|
||||||
|
+ {
|
||||||
|
+ spin_unlock(&vpid_lock);
|
||||||
|
+ printk("VPID is used up.\n");
|
||||||
|
+ return -EBUSY;
|
||||||
|
+ }
|
||||||
|
+ if ( test_and_set_bit(vpid, vpid_bitmap) )
|
||||||
|
+ {
|
||||||
|
+ spin_unlock(&vpid_lock);
|
||||||
|
+ printk("VPID allocation bug, fix your code!\n");
|
||||||
|
+ return -EBUSY;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ spin_unlock(&vpid_lock);
|
||||||
|
+
|
||||||
|
+ d->arch.hvm_domain.vmx_vpid_base = vpid * MAX_VIRT_CPUS;
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static void vmx_free_vpid(struct domain *d)
|
||||||
|
+{
|
||||||
|
+ if ( !cpu_has_vmx_vpid )
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ spin_lock(&vpid_lock);
|
||||||
|
+ clear_bit(d->arch.hvm_domain.vmx_vpid_base / MAX_VIRT_CPUS, vpid_bitmap);
|
||||||
|
+ spin_unlock(&vpid_lock);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static void vmx_install_vlapic_mapping(struct vcpu *v)
|
||||||
|
{
|
||||||
|
paddr_t virt_page_ma, apic_page_ma;
|
||||||
|
Index: xen-3.2.1-testing/xen/arch/x86/mm/shadow/multi.c
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm/shadow/multi.c
|
||||||
|
+++ xen-3.2.1-testing/xen/arch/x86/mm/shadow/multi.c
|
||||||
|
@@ -35,6 +35,7 @@
|
||||||
|
#include <asm/hvm/hvm.h>
|
||||||
|
#include <asm/hvm/cacheattr.h>
|
||||||
|
#include <asm/mtrr.h>
|
||||||
|
+#include <asm/hvm/vmx/vmx.h>
|
||||||
|
#include "private.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
@@ -3102,6 +3103,7 @@ sh_invlpg(struct vcpu *v, unsigned long
|
||||||
|
== SH_type_fl1_shadow )
|
||||||
|
{
|
||||||
|
flush_tlb_local();
|
||||||
|
+ vpid_sync_vcpu_all(v);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
Index: xen-3.2.1-testing/xen/include/asm-x86/hvm/domain.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/hvm/domain.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/asm-x86/hvm/domain.h
|
||||||
|
@@ -61,6 +61,7 @@ struct hvm_domain {
|
||||||
|
uint64_t params[HVM_NR_PARAMS];
|
||||||
|
|
||||||
|
unsigned long vmx_apic_access_mfn;
|
||||||
|
+ unsigned long vmx_vpid_base;
|
||||||
|
|
||||||
|
/* Memory ranges with pinned cache attributes. */
|
||||||
|
struct list_head pinned_cacheattr_ranges;
|
||||||
|
Index: xen-3.2.1-testing/xen/include/asm-x86/hvm/vmx/vmcs.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/hvm/vmx/vmcs.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/asm-x86/hvm/vmx/vmcs.h
|
||||||
|
@@ -89,6 +89,8 @@ struct arch_vmx_struct {
|
||||||
|
u32 exec_control;
|
||||||
|
u32 secondary_exec_control;
|
||||||
|
|
||||||
|
+ u16 vpid;
|
||||||
|
+
|
||||||
|
#ifdef __x86_64__
|
||||||
|
struct vmx_msr_state msr_state;
|
||||||
|
unsigned long shadow_gs;
|
||||||
|
@@ -165,6 +167,7 @@ extern u32 vmx_vmentry_control;
|
||||||
|
|
||||||
|
#define SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES 0x00000001
|
||||||
|
#define SECONDARY_EXEC_ENABLE_EPT 0x00000002
|
||||||
|
+#define SECONDARY_EXEC_ENABLE_VPID 0x00000020
|
||||||
|
#define SECONDARY_EXEC_WBINVD_EXITING 0x00000040
|
||||||
|
extern u32 vmx_secondary_exec_control;
|
||||||
|
|
||||||
|
@@ -184,6 +187,8 @@ extern bool_t cpu_has_vmx_ins_outs_instr
|
||||||
|
(vmx_cpu_based_exec_control & CPU_BASED_ACTIVATE_SECONDARY_CONTROLS)
|
||||||
|
#define cpu_has_vmx_ept \
|
||||||
|
(vmx_secondary_exec_control & SECONDARY_EXEC_ENABLE_EPT)
|
||||||
|
+#define cpu_has_vmx_vpid \
|
||||||
|
+ (vmx_secondary_exec_control & SECONDARY_EXEC_ENABLE_VPID)
|
||||||
|
|
||||||
|
/* GUEST_INTERRUPTIBILITY_INFO flags. */
|
||||||
|
#define VMX_INTR_SHADOW_STI 0x00000001
|
||||||
|
@@ -193,6 +198,7 @@ extern bool_t cpu_has_vmx_ins_outs_instr
|
||||||
|
|
||||||
|
/* VMCS field encodings. */
|
||||||
|
enum vmcs_field {
|
||||||
|
+ VIRTUAL_PROCESSOR_ID = 0x00000000,
|
||||||
|
GUEST_ES_SELECTOR = 0x00000800,
|
||||||
|
GUEST_CS_SELECTOR = 0x00000802,
|
||||||
|
GUEST_SS_SELECTOR = 0x00000804,
|
||||||
|
@@ -332,6 +338,8 @@ enum vmcs_field {
|
||||||
|
HOST_RIP = 0x00006c16,
|
||||||
|
};
|
||||||
|
|
||||||
|
+#define VMCS_VPID_WIDTH (16)
|
||||||
|
+
|
||||||
|
void vmx_disable_intercept_for_msr(struct vcpu *v, u32 msr);
|
||||||
|
int vmx_read_guest_msr(struct vcpu *v, u32 msr, u64 *val);
|
||||||
|
int vmx_write_guest_msr(struct vcpu *v, u32 msr, u64 val);
|
||||||
|
Index: xen-3.2.1-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||||
|
===================================================================
|
||||||
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||||
|
+++ xen-3.2.1-testing/xen/include/asm-x86/hvm/vmx/vmx.h
|
||||||
|
@@ -175,6 +175,7 @@ int vmx_realmode_io_complete(void);
|
||||||
|
#define VMRESUME_OPCODE ".byte 0x0f,0x01,0xc3\n"
|
||||||
|
#define VMWRITE_OPCODE ".byte 0x0f,0x79\n"
|
||||||
|
#define INVEPT_OPCODE ".byte 0x66,0x0f,0x38,0x80\n" /* m128,r64/32 */
|
||||||
|
+#define INVVPID_OPCODE ".byte 0x66,0x0f,0x38,0x81\n" /* m128,r64/32 */
|
||||||
|
#define VMXOFF_OPCODE ".byte 0x0f,0x01,0xc4\n"
|
||||||
|
#define VMXON_OPCODE ".byte 0xf3,0x0f,0xc7\n"
|
||||||
|
|
||||||
|
@@ -280,6 +281,23 @@ static inline void __invept(int ext, u64
|
||||||
|
: "memory");
|
||||||
|
}
|
||||||
|
|
||||||
|
+static inline void __invvpid(int ext, u16 vpid, u64 gva)
|
||||||
|
+{
|
||||||
|
+ struct {
|
||||||
|
+ u64 vpid:16;
|
||||||
|
+ u64 rsvd:48;
|
||||||
|
+ u64 gva;
|
||||||
|
+ } __attribute__ ((packed)) operand = {vpid, 0, gva};
|
||||||
|
+
|
||||||
|
+ __asm__ __volatile__ ( INVVPID_OPCODE
|
||||||
|
+ MODRM_EAX_08
|
||||||
|
+ /* CF==1 or ZF==1 --> rc = -1 */
|
||||||
|
+ "ja 1f ; ud2 ; 1:\n"
|
||||||
|
+ :
|
||||||
|
+ : "a" (&operand), "c" (ext)
|
||||||
|
+ : "memory");
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static inline void __vmxoff(void)
|
||||||
|
{
|
||||||
|
asm volatile (
|
||||||
|
@@ -332,6 +350,22 @@ static inline void ept_sync_all(void)
|
||||||
|
__invept(2, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static inline void vpid_sync_vcpu_all(struct vcpu *v)
|
||||||
|
+{
|
||||||
|
+ if ( !cpu_has_vmx_vpid )
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ __invvpid(1, v->arch.hvm_vmx.vpid, 0);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static inline void vpid_sync_all(void)
|
||||||
|
+{
|
||||||
|
+ if ( !cpu_has_vmx_vpid )
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ __invvpid(2, 0, 0);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static inline void __vmx_inject_exception(
|
||||||
|
struct vcpu *v, int trap, int type, int error_code)
|
||||||
|
{
|
@ -1,8 +1,8 @@
|
|||||||
Index: xen-3.2-testing/xen/arch/x86/mm.c
|
Index: xen-3.2.1-testing/xen/arch/x86/mm.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/mm.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/mm.c
|
+++ xen-3.2.1-testing/xen/arch/x86/mm.c
|
||||||
@@ -3586,6 +3586,7 @@ static int ptwr_emulated_cmpxchg(
|
@@ -3594,6 +3594,7 @@ static int ptwr_emulated_cmpxchg(
|
||||||
container_of(ctxt, struct ptwr_emulate_ctxt, ctxt));
|
container_of(ctxt, struct ptwr_emulate_ctxt, ctxt));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
static int ptwr_emulated_cmpxchg8b(
|
static int ptwr_emulated_cmpxchg8b(
|
||||||
enum x86_segment seg,
|
enum x86_segment seg,
|
||||||
unsigned long offset,
|
unsigned long offset,
|
||||||
@@ -3601,13 +3602,16 @@ static int ptwr_emulated_cmpxchg8b(
|
@@ -3609,13 +3610,16 @@ static int ptwr_emulated_cmpxchg8b(
|
||||||
offset, ((u64)old_hi << 32) | old, ((u64)new_hi << 32) | new, 8, 1,
|
offset, ((u64)old_hi << 32) | old, ((u64)new_hi << 32) | new, 8, 1,
|
||||||
container_of(ctxt, struct ptwr_emulate_ctxt, ctxt));
|
container_of(ctxt, struct ptwr_emulate_ctxt, ctxt));
|
||||||
}
|
}
|
||||||
@ -28,11 +28,11 @@ Index: xen-3.2-testing/xen/arch/x86/mm.c
|
|||||||
};
|
};
|
||||||
|
|
||||||
/* Write page fault handler: check if guest is trying to modify a PTE. */
|
/* Write page fault handler: check if guest is trying to modify a PTE. */
|
||||||
Index: xen-3.2-testing/xen/arch/x86/mm/shadow/common.c
|
Index: xen-3.2.1-testing/xen/arch/x86/mm/shadow/common.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/mm/shadow/common.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm/shadow/common.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/mm/shadow/common.c
|
+++ xen-3.2.1-testing/xen/arch/x86/mm/shadow/common.c
|
||||||
@@ -251,6 +251,7 @@ hvm_emulate_cmpxchg(enum x86_segment seg
|
@@ -261,6 +261,7 @@ hvm_emulate_cmpxchg(enum x86_segment seg
|
||||||
v, addr, old, new, bytes, sh_ctxt);
|
v, addr, old, new, bytes, sh_ctxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm/shadow/common.c
|
|||||||
static int
|
static int
|
||||||
hvm_emulate_cmpxchg8b(enum x86_segment seg,
|
hvm_emulate_cmpxchg8b(enum x86_segment seg,
|
||||||
unsigned long offset,
|
unsigned long offset,
|
||||||
@@ -274,13 +275,16 @@ hvm_emulate_cmpxchg8b(enum x86_segment s
|
@@ -287,13 +288,16 @@ hvm_emulate_cmpxchg8b(enum x86_segment s
|
||||||
return v->arch.paging.mode->shadow.x86_emulate_cmpxchg8b(
|
return v->arch.paging.mode->shadow.x86_emulate_cmpxchg8b(
|
||||||
v, addr, old_lo, old_hi, new_lo, new_hi, sh_ctxt);
|
v, addr, old_lo, old_hi, new_lo, new_hi, sh_ctxt);
|
||||||
}
|
}
|
||||||
@ -58,7 +58,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm/shadow/common.c
|
|||||||
};
|
};
|
||||||
|
|
||||||
static int
|
static int
|
||||||
@@ -331,6 +335,7 @@ pv_emulate_cmpxchg(enum x86_segment seg,
|
@@ -351,6 +355,7 @@ pv_emulate_cmpxchg(enum x86_segment seg,
|
||||||
v, offset, old, new, bytes, sh_ctxt);
|
v, offset, old, new, bytes, sh_ctxt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm/shadow/common.c
|
|||||||
static int
|
static int
|
||||||
pv_emulate_cmpxchg8b(enum x86_segment seg,
|
pv_emulate_cmpxchg8b(enum x86_segment seg,
|
||||||
unsigned long offset,
|
unsigned long offset,
|
||||||
@@ -346,13 +351,16 @@ pv_emulate_cmpxchg8b(enum x86_segment se
|
@@ -368,13 +373,16 @@ pv_emulate_cmpxchg8b(enum x86_segment se
|
||||||
return v->arch.paging.mode->shadow.x86_emulate_cmpxchg8b(
|
return v->arch.paging.mode->shadow.x86_emulate_cmpxchg8b(
|
||||||
v, offset, old_lo, old_hi, new_lo, new_hi, sh_ctxt);
|
v, offset, old_lo, old_hi, new_lo, new_hi, sh_ctxt);
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm/shadow/common.c
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct x86_emulate_ops *shadow_init_emulation(
|
struct x86_emulate_ops *shadow_init_emulation(
|
||||||
@@ -366,7 +374,12 @@ struct x86_emulate_ops *shadow_init_emul
|
@@ -388,7 +396,12 @@ struct x86_emulate_ops *shadow_init_emul
|
||||||
|
|
||||||
if ( !is_hvm_vcpu(v) )
|
if ( !is_hvm_vcpu(v) )
|
||||||
{
|
{
|
||||||
@ -97,11 +97,11 @@ Index: xen-3.2-testing/xen/arch/x86/mm/shadow/common.c
|
|||||||
return &pv_shadow_emulator_ops;
|
return &pv_shadow_emulator_ops;
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: xen-3.2-testing/xen/arch/x86/mm/shadow/multi.c
|
Index: xen-3.2.1-testing/xen/arch/x86/mm/shadow/multi.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/mm/shadow/multi.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/mm/shadow/multi.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/mm/shadow/multi.c
|
+++ xen-3.2.1-testing/xen/arch/x86/mm/shadow/multi.c
|
||||||
@@ -4254,7 +4254,8 @@ sh_x86_emulate_cmpxchg(struct vcpu *v, u
|
@@ -4244,7 +4244,8 @@ sh_x86_emulate_cmpxchg(struct vcpu *v, u
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm/shadow/multi.c
|
|||||||
sh_x86_emulate_cmpxchg8b(struct vcpu *v, unsigned long vaddr,
|
sh_x86_emulate_cmpxchg8b(struct vcpu *v, unsigned long vaddr,
|
||||||
unsigned long old_lo, unsigned long old_hi,
|
unsigned long old_lo, unsigned long old_hi,
|
||||||
unsigned long new_lo, unsigned long new_hi,
|
unsigned long new_lo, unsigned long new_hi,
|
||||||
@@ -4290,6 +4291,7 @@ sh_x86_emulate_cmpxchg8b(struct vcpu *v,
|
@@ -4280,6 +4281,7 @@ sh_x86_emulate_cmpxchg8b(struct vcpu *v,
|
||||||
shadow_unlock(v->domain);
|
shadow_unlock(v->domain);
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
@ -119,7 +119,7 @@ Index: xen-3.2-testing/xen/arch/x86/mm/shadow/multi.c
|
|||||||
|
|
||||||
|
|
||||||
/**************************************************************************/
|
/**************************************************************************/
|
||||||
@@ -4576,7 +4578,9 @@ struct paging_mode sh_paging_mode = {
|
@@ -4566,7 +4568,9 @@ struct paging_mode sh_paging_mode = {
|
||||||
.shadow.detach_old_tables = sh_detach_old_tables,
|
.shadow.detach_old_tables = sh_detach_old_tables,
|
||||||
.shadow.x86_emulate_write = sh_x86_emulate_write,
|
.shadow.x86_emulate_write = sh_x86_emulate_write,
|
||||||
.shadow.x86_emulate_cmpxchg = sh_x86_emulate_cmpxchg,
|
.shadow.x86_emulate_cmpxchg = sh_x86_emulate_cmpxchg,
|
||||||
@ -129,10 +129,10 @@ Index: xen-3.2-testing/xen/arch/x86/mm/shadow/multi.c
|
|||||||
.shadow.make_monitor_table = sh_make_monitor_table,
|
.shadow.make_monitor_table = sh_make_monitor_table,
|
||||||
.shadow.destroy_monitor_table = sh_destroy_monitor_table,
|
.shadow.destroy_monitor_table = sh_destroy_monitor_table,
|
||||||
#if SHADOW_OPTIMIZATIONS & SHOPT_WRITABLE_HEURISTIC
|
#if SHADOW_OPTIMIZATIONS & SHOPT_WRITABLE_HEURISTIC
|
||||||
Index: xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
Index: xen-3.2.1-testing/xen/arch/x86/x86_emulate.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/arch/x86/x86_emulate.c
|
--- xen-3.2.1-testing.orig/xen/arch/x86/x86_emulate.c
|
||||||
+++ xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
+++ xen-3.2.1-testing/xen/arch/x86/x86_emulate.c
|
||||||
@@ -30,7 +30,10 @@
|
@@ -30,7 +30,10 @@
|
||||||
#include <xen/types.h>
|
#include <xen/types.h>
|
||||||
#include <xen/lib.h>
|
#include <xen/lib.h>
|
||||||
@ -144,7 +144,7 @@ Index: xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|||||||
#endif
|
#endif
|
||||||
#include <asm-x86/x86_emulate.h>
|
#include <asm-x86/x86_emulate.h>
|
||||||
|
|
||||||
@@ -2986,60 +2989,64 @@ x86_emulate(
|
@@ -3306,60 +3309,64 @@ x86_emulate(
|
||||||
src.val = x86_seg_gs;
|
src.val = x86_seg_gs;
|
||||||
goto pop_seg;
|
goto pop_seg;
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ Index: xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|||||||
|
|
||||||
case 0xc8 ... 0xcf: /* bswap */
|
case 0xc8 ... 0xcf: /* bswap */
|
||||||
dst.type = OP_REG;
|
dst.type = OP_REG;
|
||||||
@@ -3049,7 +3056,7 @@ x86_emulate(
|
@@ -3369,7 +3376,7 @@ x86_emulate(
|
||||||
{
|
{
|
||||||
default: /* case 2: */
|
default: /* case 2: */
|
||||||
/* Undefined behaviour. Writes zero on all tested CPUs. */
|
/* Undefined behaviour. Writes zero on all tested CPUs. */
|
||||||
@ -262,10 +262,10 @@ Index: xen-3.2-testing/xen/arch/x86/x86_emulate.c
|
|||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
#ifdef __x86_64__
|
#ifdef __x86_64__
|
||||||
Index: xen-3.2-testing/xen/include/asm-x86/cpufeature.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/cpufeature.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/asm-x86/cpufeature.h
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/cpufeature.h
|
||||||
+++ xen-3.2-testing/xen/include/asm-x86/cpufeature.h
|
+++ xen-3.2.1-testing/xen/include/asm-x86/cpufeature.h
|
||||||
@@ -145,6 +145,7 @@
|
@@ -145,6 +145,7 @@
|
||||||
#define cpu_has_cyrix_arr boot_cpu_has(X86_FEATURE_CYRIX_ARR)
|
#define cpu_has_cyrix_arr boot_cpu_has(X86_FEATURE_CYRIX_ARR)
|
||||||
#define cpu_has_centaur_mcr boot_cpu_has(X86_FEATURE_CENTAUR_MCR)
|
#define cpu_has_centaur_mcr boot_cpu_has(X86_FEATURE_CENTAUR_MCR)
|
||||||
@ -282,11 +282,11 @@ Index: xen-3.2-testing/xen/include/asm-x86/cpufeature.h
|
|||||||
#define cpu_has_page1gb boot_cpu_has(X86_FEATURE_PAGE1GB)
|
#define cpu_has_page1gb boot_cpu_has(X86_FEATURE_PAGE1GB)
|
||||||
#define cpu_has_efer 1
|
#define cpu_has_efer 1
|
||||||
#endif
|
#endif
|
||||||
Index: xen-3.2-testing/xen/include/asm-x86/x86_emulate.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/x86_emulate.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/asm-x86/x86_emulate.h
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/x86_emulate.h
|
||||||
+++ xen-3.2-testing/xen/include/asm-x86/x86_emulate.h
|
+++ xen-3.2.1-testing/xen/include/asm-x86/x86_emulate.h
|
||||||
@@ -95,8 +95,9 @@ struct segment_register {
|
@@ -104,8 +104,9 @@ struct segment_register {
|
||||||
* some out-of-band mechanism, unknown to the emulator. The memop signals
|
* some out-of-band mechanism, unknown to the emulator. The memop signals
|
||||||
* failure by returning X86EMUL_EXCEPTION to the emulator, which will
|
* failure by returning X86EMUL_EXCEPTION to the emulator, which will
|
||||||
* then immediately bail.
|
* then immediately bail.
|
||||||
@ -298,7 +298,7 @@ Index: xen-3.2-testing/xen/include/asm-x86/x86_emulate.h
|
|||||||
* 3. The emulator cannot handle 64-bit mode emulation on an x86/32 system.
|
* 3. The emulator cannot handle 64-bit mode emulation on an x86/32 system.
|
||||||
*/
|
*/
|
||||||
struct x86_emulate_ops
|
struct x86_emulate_ops
|
||||||
@@ -156,16 +157,17 @@ struct x86_emulate_ops
|
@@ -165,16 +166,17 @@ struct x86_emulate_ops
|
||||||
struct x86_emulate_ctxt *ctxt);
|
struct x86_emulate_ctxt *ctxt);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -321,10 +321,10 @@ Index: xen-3.2-testing/xen/include/asm-x86/x86_emulate.h
|
|||||||
enum x86_segment seg,
|
enum x86_segment seg,
|
||||||
unsigned long offset,
|
unsigned long offset,
|
||||||
unsigned long old_lo,
|
unsigned long old_lo,
|
||||||
Index: xen-3.2-testing/xen/include/asm-x86/paging.h
|
Index: xen-3.2.1-testing/xen/include/asm-x86/paging.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/xen/include/asm-x86/paging.h
|
--- xen-3.2.1-testing.orig/xen/include/asm-x86/paging.h
|
||||||
+++ xen-3.2-testing/xen/include/asm-x86/paging.h
|
+++ xen-3.2.1-testing/xen/include/asm-x86/paging.h
|
||||||
@@ -83,12 +83,14 @@ struct shadow_paging_mode {
|
@@ -83,12 +83,14 @@ struct shadow_paging_mode {
|
||||||
unsigned long new,
|
unsigned long new,
|
||||||
unsigned int bytes,
|
unsigned int bytes,
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:8861bb05830342cad2424e1c1d26ce002fbbbaffbb5c7bfcc08ffd6f52dbccfb
|
|
||||||
size 5460134
|
|
3
xen-3.2.1-testing-src.tar.bz2
Normal file
3
xen-3.2.1-testing-src.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:53d07207f8907ba02d152852ff216695c07be2e97b53bac025ac991542aef08f
|
||||||
|
size 5467794
|
@ -1,7 +1,7 @@
|
|||||||
Index: xen-3.2-testing/tools/python/xen/util/blkif.py
|
Index: xen-3.2.1-testing/tools/python/xen/util/blkif.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/util/blkif.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/util/blkif.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/util/blkif.py
|
+++ xen-3.2.1-testing/tools/python/xen/util/blkif.py
|
||||||
@@ -66,23 +66,24 @@ def blkdev_segment(name):
|
@@ -66,23 +66,24 @@ def blkdev_segment(name):
|
||||||
'type' : 'Disk' }
|
'type' : 'Disk' }
|
||||||
return val
|
return val
|
||||||
@ -32,11 +32,11 @@ Index: xen-3.2-testing/tools/python/xen/util/blkif.py
|
|||||||
|
|
||||||
def mount_mode(name):
|
def mount_mode(name):
|
||||||
mode = None
|
mode = None
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/server/DevController.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/server/DevController.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/server/DevController.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/server/DevController.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/server/DevController.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/server/DevController.py
|
||||||
@@ -561,6 +561,31 @@ class DevController:
|
@@ -562,6 +562,31 @@ class DevController:
|
||||||
return result['status']
|
return result['status']
|
||||||
|
|
||||||
|
|
||||||
@ -68,10 +68,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/server/DevController.py
|
|||||||
def backendPath(self, backdom, devid):
|
def backendPath(self, backdom, devid):
|
||||||
"""Construct backend path given the backend domain and device id.
|
"""Construct backend path given the backend domain and device id.
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendBootloader.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendBootloader.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendBootloader.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendBootloader.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendBootloader.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendBootloader.py
|
||||||
@@ -12,8 +12,9 @@
|
@@ -12,8 +12,9 @@
|
||||||
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
#
|
#
|
||||||
@ -126,10 +126,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendBootloader.py
|
|||||||
+ if m:
|
+ if m:
|
||||||
+ return vdisk == m.group(1) or vdisk == m.group(2)
|
+ return vdisk == m.group(1) or vdisk == m.group(2)
|
||||||
+ return True
|
+ return True
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
@@ -35,14 +35,14 @@ from types import StringTypes
|
@@ -35,14 +35,14 @@ from types import StringTypes
|
||||||
|
|
||||||
import xen.lowlevel.xc
|
import xen.lowlevel.xc
|
||||||
@ -147,7 +147,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
from xen.xend.XendError import XendError, VmError
|
from xen.xend.XendError import XendError, VmError
|
||||||
from xen.xend.XendDevices import XendDevices
|
from xen.xend.XendDevices import XendDevices
|
||||||
from xen.xend.XendTask import XendTask
|
from xen.xend.XendTask import XendTask
|
||||||
@@ -1512,6 +1512,10 @@ class XendDomainInfo:
|
@@ -1517,6 +1517,10 @@ class XendDomainInfo:
|
||||||
deviceClass, config = self.info['devices'].get(dev_uuid)
|
deviceClass, config = self.info['devices'].get(dev_uuid)
|
||||||
self._waitForDevice(deviceClass, config['devid'])
|
self._waitForDevice(deviceClass, config['devid'])
|
||||||
|
|
||||||
@ -158,7 +158,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
def _waitForDevice_destroy(self, deviceClass, devid, backpath):
|
def _waitForDevice_destroy(self, deviceClass, devid, backpath):
|
||||||
return self.getDeviceController(deviceClass).waitForDevice_destroy(
|
return self.getDeviceController(deviceClass).waitForDevice_destroy(
|
||||||
devid, backpath)
|
devid, backpath)
|
||||||
@@ -2050,8 +2054,11 @@ class XendDomainInfo:
|
@@ -2091,8 +2095,11 @@ class XendDomainInfo:
|
||||||
blexec = osdep.pygrub_path
|
blexec = osdep.pygrub_path
|
||||||
|
|
||||||
blcfg = None
|
blcfg = None
|
||||||
@ -172,7 +172,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
|
|
||||||
if not disks:
|
if not disks:
|
||||||
msg = "Had a bootloader specified, but no disks are bootable"
|
msg = "Had a bootloader specified, but no disks are bootable"
|
||||||
@@ -2062,13 +2069,10 @@ class XendDomainInfo:
|
@@ -2103,13 +2110,10 @@ class XendDomainInfo:
|
||||||
devtype = devinfo[0]
|
devtype = devinfo[0]
|
||||||
disk = devinfo[1]['uname']
|
disk = devinfo[1]['uname']
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
|
|
||||||
log.info("Mounting %s on %s." %
|
log.info("Mounting %s on %s." %
|
||||||
(fn, BOOTLOADER_LOOPBACK_DEVICE))
|
(fn, BOOTLOADER_LOOPBACK_DEVICE))
|
||||||
@@ -2080,7 +2084,9 @@ class XendDomainInfo:
|
@@ -2121,7 +2125,9 @@ class XendDomainInfo:
|
||||||
|
|
||||||
from xen.xend import XendDomain
|
from xen.xend import XendDomain
|
||||||
dom0 = XendDomain.instance().privilegedDomain()
|
dom0 = XendDomain.instance().privilegedDomain()
|
||||||
@ -200,7 +200,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
|||||||
fn = BOOTLOADER_LOOPBACK_DEVICE
|
fn = BOOTLOADER_LOOPBACK_DEVICE
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -2091,7 +2097,7 @@ class XendDomainInfo:
|
@@ -2132,7 +2138,7 @@ class XendDomainInfo:
|
||||||
log.info("Unmounting %s from %s." %
|
log.info("Unmounting %s from %s." %
|
||||||
(fn, BOOTLOADER_LOOPBACK_DEVICE))
|
(fn, BOOTLOADER_LOOPBACK_DEVICE))
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ Index: xen-3.2-testing/tools/python/xen/xm/create.py
|
|||||||
gopts.var('sdl', val='',
|
gopts.var('sdl', val='',
|
||||||
fn=set_value, default=None,
|
fn=set_value, default=None,
|
||||||
use="""Should the device model use SDL?""")
|
use="""Should the device model use SDL?""")
|
||||||
@@ -626,7 +630,7 @@ def configure_vfbs(config_devs, vals):
|
@@ -631,7 +635,7 @@ def configure_vfbs(config_devs, vals):
|
||||||
d['type'] = 'sdl'
|
d['type'] = 'sdl'
|
||||||
for (k,v) in d.iteritems():
|
for (k,v) in d.iteritems():
|
||||||
if not k in [ 'vnclisten', 'vncunused', 'vncdisplay', 'display',
|
if not k in [ 'vnclisten', 'vncunused', 'vncdisplay', 'display',
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: xen-3.2-testing/tools/examples/xend-config.sxp
|
Index: xen-3.2.1-testing/tools/examples/xend-config.sxp
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/examples/xend-config.sxp
|
--- xen-3.2.1-testing.orig/tools/examples/xend-config.sxp
|
||||||
+++ xen-3.2-testing/tools/examples/xend-config.sxp
|
+++ xen-3.2.1-testing/tools/examples/xend-config.sxp
|
||||||
@@ -130,7 +130,8 @@
|
@@ -130,7 +130,8 @@
|
||||||
#
|
#
|
||||||
# (network-script 'network-bridge netdev=eth1')
|
# (network-script 'network-bridge netdev=eth1')
|
||||||
@ -12,10 +12,10 @@ Index: xen-3.2-testing/tools/examples/xend-config.sxp
|
|||||||
#
|
#
|
||||||
# (network-script 'network-bridge bridge=<name>')
|
# (network-script 'network-bridge bridge=<name>')
|
||||||
#
|
#
|
||||||
Index: xen-3.2-testing/tools/ioemu/vl.c
|
Index: xen-3.2.1-testing/tools/ioemu/vl.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/vl.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/vl.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/vl.c
|
+++ xen-3.2.1-testing/tools/ioemu/vl.c
|
||||||
@@ -102,8 +102,6 @@
|
@@ -102,8 +102,6 @@
|
||||||
#define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup"
|
#define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup"
|
||||||
#ifdef _BSD
|
#ifdef _BSD
|
||||||
@ -25,7 +25,7 @@ Index: xen-3.2-testing/tools/ioemu/vl.c
|
|||||||
#endif
|
#endif
|
||||||
#ifdef __sun__
|
#ifdef __sun__
|
||||||
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
|
#define SMBD_COMMAND "/usr/sfw/sbin/smbd"
|
||||||
@@ -4129,10 +4127,10 @@ static int net_client_init(const char *s
|
@@ -4149,10 +4147,10 @@ static int net_client_init(const char *s
|
||||||
if (get_param_value(setup_script, sizeof(setup_script), "script", p) == 0) {
|
if (get_param_value(setup_script, sizeof(setup_script), "script", p) == 0) {
|
||||||
pstrcpy(setup_script, sizeof(setup_script), DEFAULT_NETWORK_SCRIPT);
|
pstrcpy(setup_script, sizeof(setup_script), DEFAULT_NETWORK_SCRIPT);
|
||||||
}
|
}
|
||||||
@ -40,11 +40,11 @@ Index: xen-3.2-testing/tools/ioemu/vl.c
|
|||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/image.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/image.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/image.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/image.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/image.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/image.py
|
||||||
@@ -491,13 +491,16 @@ class HVMImageHandler(ImageHandler):
|
@@ -497,13 +497,16 @@ class HVMImageHandler(ImageHandler):
|
||||||
mac = devinfo.get('mac')
|
mac = devinfo.get('mac')
|
||||||
if mac is None:
|
if mac is None:
|
||||||
raise VmError("MAC address not specified or generated.")
|
raise VmError("MAC address not specified or generated.")
|
||||||
@ -63,10 +63,10 @@ Index: xen-3.2-testing/tools/python/xen/xend/image.py
|
|||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/ioemu/target-i386-dm/qemu-ifup
|
Index: xen-3.2.1-testing/tools/ioemu/target-i386-dm/qemu-ifup
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/target-i386-dm/qemu-ifup
|
--- xen-3.2.1-testing.orig/tools/ioemu/target-i386-dm/qemu-ifup
|
||||||
+++ xen-3.2-testing/tools/ioemu/target-i386-dm/qemu-ifup
|
+++ xen-3.2.1-testing/tools/ioemu/target-i386-dm/qemu-ifup
|
||||||
@@ -1,11 +1,11 @@
|
@@ -1,11 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
PAE must be on for 64-on-64 to work at all.
|
PAE must be on for 64-on-64 to work at all.
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/image.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/image.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/image.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/image.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/image.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/image.py
|
||||||
@@ -586,7 +586,7 @@ class X86_HVM_ImageHandler(HVMImageHandl
|
@@ -592,7 +592,7 @@ class X86_HVM_ImageHandler(HVMImageHandl
|
||||||
|
|
||||||
def configure(self, vmConfig):
|
def configure(self, vmConfig):
|
||||||
HVMImageHandler.configure(self, vmConfig)
|
HVMImageHandler.configure(self, vmConfig)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
Index: xen-3.2-testing/tools/ioemu/hw/ide.c
|
Index: xen-3.2.1-testing/tools/ioemu/hw/ide.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/hw/ide.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/hw/ide.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/hw/ide.c
|
+++ xen-3.2.1-testing/tools/ioemu/hw/ide.c
|
||||||
@@ -395,6 +395,9 @@ typedef struct PCIIDEState {
|
@@ -395,6 +395,9 @@ typedef struct PCIIDEState {
|
||||||
int type; /* see IDE_TYPE_xxx */
|
int type; /* see IDE_TYPE_xxx */
|
||||||
} PCIIDEState;
|
} PCIIDEState;
|
||||||
@ -12,7 +12,7 @@ Index: xen-3.2-testing/tools/ioemu/hw/ide.c
|
|||||||
#if defined(__ia64__)
|
#if defined(__ia64__)
|
||||||
#include <xen/hvm/ioreq.h>
|
#include <xen/hvm/ioreq.h>
|
||||||
|
|
||||||
@@ -2245,6 +2248,27 @@ static void ide_reset(IDEState *s)
|
@@ -2248,6 +2251,27 @@ static void ide_reset(IDEState *s)
|
||||||
ide_dummy_transfer_stop(s);
|
ide_dummy_transfer_stop(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ Index: xen-3.2-testing/tools/ioemu/hw/ide.c
|
|||||||
struct partition {
|
struct partition {
|
||||||
uint8_t boot_ind; /* 0x80 - active */
|
uint8_t boot_ind; /* 0x80 - active */
|
||||||
uint8_t head; /* starting head */
|
uint8_t head; /* starting head */
|
||||||
@@ -2646,6 +2670,9 @@ void pci_cmd646_ide_init(PCIBus *bus, Bl
|
@@ -2649,6 +2673,9 @@ void pci_cmd646_ide_init(PCIBus *bus, Bl
|
||||||
sizeof(PCIIDEState),
|
sizeof(PCIIDEState),
|
||||||
-1,
|
-1,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
@ -50,7 +50,7 @@ Index: xen-3.2-testing/tools/ioemu/hw/ide.c
|
|||||||
d->type = IDE_TYPE_CMD646;
|
d->type = IDE_TYPE_CMD646;
|
||||||
pci_conf = d->dev.config;
|
pci_conf = d->dev.config;
|
||||||
pci_conf[0x00] = 0x95; // CMD646
|
pci_conf[0x00] = 0x95; // CMD646
|
||||||
@@ -2820,6 +2847,9 @@ void pci_piix_ide_init(PCIBus *bus, Bloc
|
@@ -2823,6 +2850,9 @@ void pci_piix_ide_init(PCIBus *bus, Bloc
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
d->type = IDE_TYPE_PIIX3;
|
d->type = IDE_TYPE_PIIX3;
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ Index: xen-3.2-testing/tools/ioemu/hw/ide.c
|
|||||||
pci_conf = d->dev.config;
|
pci_conf = d->dev.config;
|
||||||
pci_conf[0x00] = 0x86; // Intel
|
pci_conf[0x00] = 0x86; // Intel
|
||||||
pci_conf[0x01] = 0x80;
|
pci_conf[0x01] = 0x80;
|
||||||
@@ -2866,6 +2896,9 @@ void pci_piix3_ide_init(PCIBus *bus, Blo
|
@@ -2869,6 +2899,9 @@ void pci_piix3_ide_init(PCIBus *bus, Blo
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
d->type = IDE_TYPE_PIIX3;
|
d->type = IDE_TYPE_PIIX3;
|
||||||
|
|
||||||
@ -70,10 +70,10 @@ Index: xen-3.2-testing/tools/ioemu/hw/ide.c
|
|||||||
pci_conf = d->dev.config;
|
pci_conf = d->dev.config;
|
||||||
pci_conf[0x00] = 0x86; // Intel
|
pci_conf[0x00] = 0x86; // Intel
|
||||||
pci_conf[0x01] = 0x80;
|
pci_conf[0x01] = 0x80;
|
||||||
Index: xen-3.2-testing/tools/ioemu/hw/pci.c
|
Index: xen-3.2.1-testing/tools/ioemu/hw/pci.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/hw/pci.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/hw/pci.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/hw/pci.c
|
+++ xen-3.2.1-testing/tools/ioemu/hw/pci.c
|
||||||
@@ -573,6 +573,28 @@ void pci_nic_init(PCIBus *bus, NICInfo *
|
@@ -573,6 +573,28 @@ void pci_nic_init(PCIBus *bus, NICInfo *
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,10 +103,10 @@ Index: xen-3.2-testing/tools/ioemu/hw/pci.c
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
PCIDevice dev;
|
PCIDevice dev;
|
||||||
PCIBus *bus;
|
PCIBus *bus;
|
||||||
Index: xen-3.2-testing/tools/ioemu/hw/xen_platform.c
|
Index: xen-3.2.1-testing/tools/ioemu/hw/xen_platform.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/hw/xen_platform.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/hw/xen_platform.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/hw/xen_platform.c
|
+++ xen-3.2.1-testing/tools/ioemu/hw/xen_platform.c
|
||||||
@@ -23,15 +23,53 @@
|
@@ -23,15 +23,53 @@
|
||||||
* THE SOFTWARE.
|
* THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
@ -162,10 +162,10 @@ Index: xen-3.2-testing/tools/ioemu/hw/xen_platform.c
|
|||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t platform_mmio_read(void *opaque, target_phys_addr_t addr)
|
static uint32_t platform_mmio_read(void *opaque, target_phys_addr_t addr)
|
||||||
Index: xen-3.2-testing/tools/ioemu/vl.c
|
Index: xen-3.2.1-testing/tools/ioemu/vl.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/vl.c
|
--- xen-3.2.1-testing.orig/tools/ioemu/vl.c
|
||||||
+++ xen-3.2-testing/tools/ioemu/vl.c
|
+++ xen-3.2.1-testing/tools/ioemu/vl.c
|
||||||
@@ -197,6 +197,20 @@ int xc_handle;
|
@@ -197,6 +197,20 @@ int xc_handle;
|
||||||
char domain_name[64] = "Xen-no-name";
|
char domain_name[64] = "Xen-no-name";
|
||||||
extern int domid;
|
extern int domid;
|
||||||
@ -187,7 +187,7 @@ Index: xen-3.2-testing/tools/ioemu/vl.c
|
|||||||
/***********************************************************/
|
/***********************************************************/
|
||||||
/* x86 ISA bus support */
|
/* x86 ISA bus support */
|
||||||
|
|
||||||
@@ -3404,6 +3418,7 @@ void net_slirp_smb(const char *exported_
|
@@ -3424,6 +3438,7 @@ void net_slirp_smb(const char *exported_
|
||||||
typedef struct TAPState {
|
typedef struct TAPState {
|
||||||
VLANClientState *vc;
|
VLANClientState *vc;
|
||||||
int fd;
|
int fd;
|
||||||
@ -195,7 +195,7 @@ Index: xen-3.2-testing/tools/ioemu/vl.c
|
|||||||
} TAPState;
|
} TAPState;
|
||||||
|
|
||||||
static void tap_receive(void *opaque, const uint8_t *buf, int size)
|
static void tap_receive(void *opaque, const uint8_t *buf, int size)
|
||||||
@@ -3431,6 +3446,36 @@ static void tap_send(void *opaque)
|
@@ -3451,6 +3466,36 @@ static void tap_send(void *opaque)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ Index: xen-3.2-testing/tools/ioemu/vl.c
|
|||||||
/* fd support */
|
/* fd support */
|
||||||
|
|
||||||
static TAPState *net_tap_fd_init(VLANState *vlan, int fd)
|
static TAPState *net_tap_fd_init(VLANState *vlan, int fd)
|
||||||
@@ -3442,6 +3487,8 @@ static TAPState *net_tap_fd_init(VLANSta
|
@@ -3462,6 +3507,8 @@ static TAPState *net_tap_fd_init(VLANSta
|
||||||
return NULL;
|
return NULL;
|
||||||
s->fd = fd;
|
s->fd = fd;
|
||||||
s->vc = qemu_new_vlan_client(vlan, tap_receive, NULL, s);
|
s->vc = qemu_new_vlan_client(vlan, tap_receive, NULL, s);
|
||||||
@ -241,7 +241,7 @@ Index: xen-3.2-testing/tools/ioemu/vl.c
|
|||||||
qemu_set_fd_handler(s->fd, tap_send, NULL, s);
|
qemu_set_fd_handler(s->fd, tap_send, NULL, s);
|
||||||
snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd);
|
snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd);
|
||||||
return s;
|
return s;
|
||||||
@@ -4412,20 +4459,6 @@ void dumb_display_init(DisplayState *ds)
|
@@ -4432,20 +4479,6 @@ void dumb_display_init(DisplayState *ds)
|
||||||
|
|
||||||
#define MAX_IO_HANDLERS 64
|
#define MAX_IO_HANDLERS 64
|
||||||
|
|
||||||
@ -262,11 +262,11 @@ Index: xen-3.2-testing/tools/ioemu/vl.c
|
|||||||
/* XXX: fd_read_poll should be suppressed, but an API change is
|
/* XXX: fd_read_poll should be suppressed, but an API change is
|
||||||
necessary in the character devices to suppress fd_can_read(). */
|
necessary in the character devices to suppress fd_can_read(). */
|
||||||
int qemu_set_fd_handler2(int fd,
|
int qemu_set_fd_handler2(int fd,
|
||||||
Index: xen-3.2-testing/tools/ioemu/vl.h
|
Index: xen-3.2.1-testing/tools/ioemu/vl.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/ioemu/vl.h
|
--- xen-3.2.1-testing.orig/tools/ioemu/vl.h
|
||||||
+++ xen-3.2-testing/tools/ioemu/vl.h
|
+++ xen-3.2.1-testing/tools/ioemu/vl.h
|
||||||
@@ -1497,6 +1497,8 @@ void kqemu_record_dump(void);
|
@@ -1499,6 +1499,8 @@ void kqemu_record_dump(void);
|
||||||
extern char domain_name[];
|
extern char domain_name[];
|
||||||
|
|
||||||
void destroy_hvm_domain(void);
|
void destroy_hvm_domain(void);
|
||||||
|
@ -2,7 +2,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendNode.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendNode.py
|
--- xen-3.2-testing.orig/tools/python/xen/xend/XendNode.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendNode.py
|
+++ xen-3.2-testing/tools/python/xen/xend/XendNode.py
|
||||||
@@ -579,10 +579,34 @@ class XendNode:
|
@@ -593,11 +593,35 @@ class XendNode:
|
||||||
|
|
||||||
info['cpu_mhz'] = info['cpu_khz'] / 1000
|
info['cpu_mhz'] = info['cpu_khz'] / 1000
|
||||||
|
|
||||||
@ -10,6 +10,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendNode.py
|
|||||||
- info['total_memory'] = info['total_memory'] / 1024
|
- info['total_memory'] = info['total_memory'] / 1024
|
||||||
- info['free_memory'] = info['free_memory'] / 1024
|
- info['free_memory'] = info['free_memory'] / 1024
|
||||||
- info['node_to_cpu'] = self.format_node_to_cpu(info)
|
- info['node_to_cpu'] = self.format_node_to_cpu(info)
|
||||||
|
- info['node_to_memory'] = self.format_node_to_memory(info)
|
||||||
+ configured_floor = xendoptions().get_dom0_min_mem() * 1024
|
+ configured_floor = xendoptions().get_dom0_min_mem() * 1024
|
||||||
+ from xen.xend import balloon
|
+ from xen.xend import balloon
|
||||||
+ try:
|
+ try:
|
||||||
@ -29,6 +30,7 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendNode.py
|
|||||||
+ info['free_memory'] = info['free_memory'] / 1024
|
+ info['free_memory'] = info['free_memory'] / 1024
|
||||||
+ info['max_free_memory'] = info['max_free_memory'] / 1024
|
+ info['max_free_memory'] = info['max_free_memory'] / 1024
|
||||||
+ info['node_to_cpu'] = self.format_node_to_cpu(info)
|
+ info['node_to_cpu'] = self.format_node_to_cpu(info)
|
||||||
|
+ info['node_to_memory'] = self.format_node_to_memory(info)
|
||||||
+
|
+
|
||||||
+ # FIXME: These are hard-coded to be the inverse of the getXenMemory
|
+ # FIXME: These are hard-coded to be the inverse of the getXenMemory
|
||||||
+ # functions in image.py. Find a cleaner way.
|
+ # functions in image.py. Find a cleaner way.
|
||||||
@ -41,16 +43,16 @@ Index: xen-3.2-testing/tools/python/xen/xend/XendNode.py
|
|||||||
|
|
||||||
ITEM_ORDER = ['nr_cpus',
|
ITEM_ORDER = ['nr_cpus',
|
||||||
'nr_nodes',
|
'nr_nodes',
|
||||||
@@ -592,6 +616,9 @@ class XendNode:
|
@@ -607,6 +631,9 @@ class XendNode:
|
||||||
'hw_caps',
|
'hw_caps',
|
||||||
'total_memory',
|
'total_memory',
|
||||||
'free_memory',
|
'free_memory',
|
||||||
+ 'max_free_memory',
|
+ 'max_free_memory',
|
||||||
+ 'max_para_memory',
|
+ 'max_para_memory',
|
||||||
+ 'max_hvm_memory',
|
+ 'max_hvm_memory',
|
||||||
'node_to_cpu'
|
'node_to_cpu',
|
||||||
|
'node_to_memory'
|
||||||
]
|
]
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xend/balloon.py
|
Index: xen-3.2-testing/tools/python/xen/xend/balloon.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/balloon.py
|
--- xen-3.2-testing.orig/tools/python/xen/xend/balloon.py
|
||||||
|
@ -2,7 +2,7 @@ Index: xen-3.2-testing/tools/python/xen/xm/create.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xm/create.py
|
--- xen-3.2-testing.orig/tools/python/xen/xm/create.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xm/create.py
|
+++ xen-3.2-testing/tools/python/xen/xm/create.py
|
||||||
@@ -892,9 +892,8 @@ def preprocess_access_control(vals):
|
@@ -897,9 +897,8 @@ def preprocess_access_control(vals):
|
||||||
|
|
||||||
def preprocess_ip(vals):
|
def preprocess_ip(vals):
|
||||||
if vals.ip or vals.dhcp != 'off':
|
if vals.ip or vals.dhcp != 'off':
|
||||||
|
@ -2,7 +2,7 @@ Index: xen-3.2-testing/tools/python/xen/xm/create.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xm/create.py
|
--- xen-3.2-testing.orig/tools/python/xen/xm/create.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xm/create.py
|
+++ xen-3.2-testing/tools/python/xen/xm/create.py
|
||||||
@@ -986,8 +986,7 @@ def spawn_vnc(display):
|
@@ -991,8 +991,7 @@ def spawn_vnc(display):
|
||||||
returns the port that the vncviewer is listening on and sets the global
|
returns the port that the vncviewer is listening on and sets the global
|
||||||
vncpid. On failure, returns 0. Note that vncviewer is daemonized.
|
vncpid. On failure, returns 0. Note that vncviewer is daemonized.
|
||||||
"""
|
"""
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
From: Charles Coffing <ccoffing@novell.com>
|
From: Charles Coffing <ccoffing@novell.com>
|
||||||
Upstream: no
|
Upstream: no
|
||||||
|
|
||||||
Index: xen-3.2-testing/tools/python/xen/xm/main.py
|
Index: xen-3.2.1-testing/tools/python/xen/xm/main.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xm/main.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xm/main.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xm/main.py
|
+++ xen-3.2.1-testing/tools/python/xen/xm/main.py
|
||||||
@@ -1833,6 +1833,10 @@ def xm_debug_keys(args):
|
@@ -1830,6 +1830,10 @@ def xm_debug_keys(args):
|
||||||
def xm_top(args):
|
def xm_top(args):
|
||||||
arg_check(args, "top", 0)
|
arg_check(args, "top", 0)
|
||||||
|
|
||||||
|
34
xen.changes
34
xen.changes
@ -1,8 +1,42 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 14 16:58:04 CET 2008 - carnold@novell.com
|
||||||
|
|
||||||
|
- Update to Xen 3.2.1 changeset 16805.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Mar 14 11:20:22 CET 2008 - coolo@suse.de
|
Fri Mar 14 11:20:22 CET 2008 - coolo@suse.de
|
||||||
|
|
||||||
- ipcalc does not exist - and breaks pattern
|
- ipcalc does not exist - and breaks pattern
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 12 12:28:34 MDT 2008 - jfehlig@novell.com
|
||||||
|
|
||||||
|
- Increased dom0-min-mem value to 512Mb in xend-config.sxp
|
||||||
|
bnc#370007
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 10 16:38:47 MDT 2008 - jfehlig@novell.com
|
||||||
|
|
||||||
|
- Fixed initialization of default VM config values when creating
|
||||||
|
VMs through Xen API. bnc#368273
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Mar 10 14:11:52 MDT 2008 - jfehlig@novell.com
|
||||||
|
|
||||||
|
- Removed unused/untested xend-relocation script.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 7 15:44:36 MST 2008 - jfehlig@novell.com
|
||||||
|
|
||||||
|
- Set device model when creating pvfb consoles via XenAPI.
|
||||||
|
bnc#367851
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 7 09:28:58 MST 2008 - jfehlig@novell.com
|
||||||
|
|
||||||
|
- Ensure dhcpcd is activated, if appropriate, on bridges created
|
||||||
|
by network-multinet. bnc#364633
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Feb 29 09:58:06 MST 2008 - carnold@novell.com
|
Fri Feb 29 09:58:06 MST 2008 - carnold@novell.com
|
||||||
|
|
||||||
|
116
xen.spec
116
xen.spec
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package xen (Version 3.2.0_16718_06)
|
# spec file for package xen (Version 3.2.1_16805_01)
|
||||||
#
|
#
|
||||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||||
# This file and all modifications and additions to the pristine
|
# This file and all modifications and additions to the pristine
|
||||||
@ -15,7 +15,7 @@ Name: xen
|
|||||||
%define xvers 3.2
|
%define xvers 3.2
|
||||||
%define xvermaj 3
|
%define xvermaj 3
|
||||||
%define changeset 16718
|
%define changeset 16718
|
||||||
%define xen_build_dir xen-3.2-testing
|
%define xen_build_dir xen-3.2.1-testing
|
||||||
%if %sles_version
|
%if %sles_version
|
||||||
%define with_kmp 1
|
%define with_kmp 1
|
||||||
%else
|
%else
|
||||||
@ -33,14 +33,14 @@ BuildRequires: glibc-32bit glibc-devel-32bit
|
|||||||
%if %{?with_kmp}0
|
%if %{?with_kmp}0
|
||||||
BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11
|
BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11
|
||||||
%endif
|
%endif
|
||||||
Version: 3.2.0_16718_06
|
Version: 3.2.1_16805_01
|
||||||
Release: 4
|
Release: 1
|
||||||
License: GPL v2 only
|
License: GPL v2 only
|
||||||
Group: System/Kernel
|
Group: System/Kernel
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
PreReq: %insserv_prereq %fillup_prereq
|
PreReq: %insserv_prereq %fillup_prereq
|
||||||
Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel)
|
Summary: Xen Virtualization: Hypervisor (aka VMM aka Microkernel)
|
||||||
Source0: xen-3.2-testing-src.tar.bz2
|
Source0: xen-3.2.1-testing-src.tar.bz2
|
||||||
Source2: README.SuSE
|
Source2: README.SuSE
|
||||||
Source3: boot.xen
|
Source3: boot.xen
|
||||||
Source4: boot.local.xenU
|
Source4: boot.local.xenU
|
||||||
@ -68,33 +68,25 @@ Source24: xenapiusers
|
|||||||
Patch0: 16716-xend-version.patch
|
Patch0: 16716-xend-version.patch
|
||||||
Patch1: 16718-batched-mmu-updates.patch
|
Patch1: 16718-batched-mmu-updates.patch
|
||||||
Patch2: 16769-pci-high-memory-resource.patch
|
Patch2: 16769-pci-high-memory-resource.patch
|
||||||
Patch3: 16777-xend-block-attach.patch
|
Patch3: 16873-net-nat.patch
|
||||||
Patch4: 16859-x86_emulate-clts-fix.patch
|
Patch4: 16877-blktap.patch
|
||||||
Patch5: 16873-net-nat.patch
|
Patch5: 16883-xend-crashed-state.patch
|
||||||
Patch6: 16877-blktap.patch
|
Patch6: 16884-xend-rename-restart.patch
|
||||||
Patch7: 16883-xend-crashed-state.patch
|
Patch7: 16885-xend-config-comments.patch
|
||||||
Patch8: 16884-xend-rename-restart.patch
|
Patch8: 16886-xenstore-leak.patch
|
||||||
Patch9: 16885-xend-config-comments.patch
|
Patch9: 16890-xenapi-version.patch
|
||||||
Patch10: 16886-xenstore-leak.patch
|
Patch10: 16931-hvm-hap-param.patch
|
||||||
Patch11: 16890-xenapi-version.patch
|
Patch11: 16933-hvm-hap-fix.patch
|
||||||
Patch12: 16929-hvm-guest-crash-fix.patch
|
Patch12: 16939-hvm-hap-fix.patch
|
||||||
Patch13: 16930-shadow-pinning-logic-fix.patch
|
Patch13: 16947-fvmachine-xenstore.patch
|
||||||
Patch14: 16932-xend-hvm-localtime.patch
|
Patch14: 16977-xend-restart-count.patch
|
||||||
Patch15: 16945-blktap-strip.patch
|
Patch15: 16989-xend-coredump.patch
|
||||||
Patch16: 16947-fvmachine-xenstore.patch
|
Patch16: 17017-hpet-configuration.patch
|
||||||
Patch17: 16962-cross-page-write-failure.patch
|
Patch17: 17124-numa-free-memory-size.patch
|
||||||
Patch18: 16965-xend-leak.patch
|
Patch18: 17131-numa-set-vcpu-affinity.patch
|
||||||
Patch19: 16976-x86_emulate-sahf-fix.patch
|
Patch19: 17190-remove-hap-boot-param.patch
|
||||||
Patch20: 16977-xend-restart-count.patch
|
Patch20: 17191-remove-hap-boot-param-doc.patch
|
||||||
Patch21: 16980-x86_emulate-macro-fix.patch
|
Patch21: 17xxx-xenapi-defaults.patch
|
||||||
Patch22: 16988-xm-reboot.patch
|
|
||||||
Patch23: 16989-xend-coredump.patch
|
|
||||||
Patch24: 16995-x86_emulate-mul-fix.patch
|
|
||||||
Patch25: 16998-x86_emulate-imul-fix.patch
|
|
||||||
Patch26: 17003-qemu-queue-mouse.patch
|
|
||||||
Patch27: 17017-hpet-configuration.patch
|
|
||||||
Patch28: 17036-mismatched-save-rest-fix.patch
|
|
||||||
Patch29: 17113-xend-restore.patch
|
|
||||||
# Our patches
|
# Our patches
|
||||||
Patch100: xen-config.diff
|
Patch100: xen-config.diff
|
||||||
Patch101: xend-config.diff
|
Patch101: xend-config.diff
|
||||||
@ -142,6 +134,7 @@ Patch158: xen-qcow-realpath-buffer-overflow.patch
|
|||||||
Patch159: xen-api-auth.patch
|
Patch159: xen-api-auth.patch
|
||||||
Patch160: pv_32_16_color_trans.patch
|
Patch160: pv_32_16_color_trans.patch
|
||||||
Patch161: hvm-ide-flush-o_direct.patch
|
Patch161: hvm-ide-flush-o_direct.patch
|
||||||
|
Patch162: migration-cpl-init.patch
|
||||||
# Patches from Jan
|
# Patches from Jan
|
||||||
Patch240: xenctx.patch
|
Patch240: xenctx.patch
|
||||||
Patch241: const-callback-arg.patch
|
Patch241: const-callback-arg.patch
|
||||||
@ -155,17 +148,18 @@ Patch247: 32on64-extra-mem.patch
|
|||||||
Patch350: pv-driver-build.patch
|
Patch350: pv-driver-build.patch
|
||||||
Patch351: xen-ioemu-hvm-pv-support.diff
|
Patch351: xen-ioemu-hvm-pv-support.diff
|
||||||
Patch352: pvdrv_emulation_control.patch
|
Patch352: pvdrv_emulation_control.patch
|
||||||
# Intel EPT / VPID patches
|
|
||||||
Patch400: ept-novell-x64.patch
|
|
||||||
Patch401: vpid-novell.patch
|
|
||||||
Patch402: livemig-ept-novell-x64.patch
|
|
||||||
Patch403: livemig-ept-novell-i386.patch
|
|
||||||
%ifarch x86_64
|
|
||||||
# novell_shim patches
|
# novell_shim patches
|
||||||
Patch500: ns_tools.patch
|
Patch400: ns_tools.patch
|
||||||
Patch501: ns_xen_base.patch
|
Patch401: ns_xen_base.patch
|
||||||
Patch502: ns_xen_extension.patch
|
Patch402: ns_xen_extension.patch
|
||||||
%endif
|
# Intel EPT / VPID patches
|
||||||
|
Patch500: ept-novell-x64.patch
|
||||||
|
Patch501: vpid-novell-x64.patch
|
||||||
|
Patch502: ept-novell-x64-2m.patch
|
||||||
|
Patch503: ept-with-livemgr-2m.diff
|
||||||
|
Patch504: ept-novell-i386.patch
|
||||||
|
Patch505: vpid-novell-i386.patch
|
||||||
|
Patch506: livemig-ept-novell-i386.patch
|
||||||
Url: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/
|
Url: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%define pysite %(python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib()")
|
%define pysite %(python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib()")
|
||||||
@ -511,14 +505,6 @@ Authors:
|
|||||||
%patch19 -p1
|
%patch19 -p1
|
||||||
%patch20 -p1
|
%patch20 -p1
|
||||||
%patch21 -p1
|
%patch21 -p1
|
||||||
%patch22 -p1
|
|
||||||
%patch23 -p1
|
|
||||||
%patch24 -p1
|
|
||||||
%patch25 -p1
|
|
||||||
%patch26 -p1
|
|
||||||
%patch27 -p1
|
|
||||||
%patch28 -p1
|
|
||||||
%patch29 -p1
|
|
||||||
%patch100 -p1
|
%patch100 -p1
|
||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
%patch102 -p1
|
%patch102 -p1
|
||||||
@ -564,7 +550,8 @@ Authors:
|
|||||||
%patch158 -p1
|
%patch158 -p1
|
||||||
%patch159 -p1
|
%patch159 -p1
|
||||||
%patch160 -p1
|
%patch160 -p1
|
||||||
%patch161 -p1
|
#%patch161 -p1
|
||||||
|
#%patch162 -p1
|
||||||
%patch240 -p1
|
%patch240 -p1
|
||||||
%patch241 -p1
|
%patch241 -p1
|
||||||
%patch242 -p1
|
%patch242 -p1
|
||||||
@ -576,17 +563,18 @@ Authors:
|
|||||||
%patch350 -p1
|
%patch350 -p1
|
||||||
%patch351 -p1
|
%patch351 -p1
|
||||||
%patch352 -p1
|
%patch352 -p1
|
||||||
|
%ifarch x86_64
|
||||||
%patch400 -p1
|
%patch400 -p1
|
||||||
%patch401 -p1
|
%patch401 -p1
|
||||||
%ifarch x86_64
|
|
||||||
%patch402 -p1
|
%patch402 -p1
|
||||||
%else
|
|
||||||
%patch403 -p1
|
|
||||||
%endif
|
|
||||||
%ifarch x86_64
|
|
||||||
%patch500 -p1
|
%patch500 -p1
|
||||||
%patch501 -p1
|
%patch501 -p1
|
||||||
%patch502 -p1
|
%patch502 -p1
|
||||||
|
%patch503 -p1
|
||||||
|
%else
|
||||||
|
%patch504 -p1
|
||||||
|
%patch505 -p1
|
||||||
|
%patch506 -p1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -907,8 +895,24 @@ rm -f $RPM_BUILD_ROOT/%pysite/*.egg-info
|
|||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Mar 14 2008 carnold@novell.com
|
||||||
|
- Update to Xen 3.2.1 changeset 16805.
|
||||||
* Fri Mar 14 2008 coolo@suse.de
|
* Fri Mar 14 2008 coolo@suse.de
|
||||||
- ipcalc does not exist - and breaks pattern
|
- ipcalc does not exist - and breaks pattern
|
||||||
|
* Wed Mar 12 2008 jfehlig@novell.com
|
||||||
|
- Increased dom0-min-mem value to 512Mb in xend-config.sxp
|
||||||
|
bnc#370007
|
||||||
|
* Tue Mar 11 2008 jfehlig@novell.com
|
||||||
|
- Fixed initialization of default VM config values when creating
|
||||||
|
VMs through Xen API. bnc#368273
|
||||||
|
* Mon Mar 10 2008 jfehlig@novell.com
|
||||||
|
- Removed unused/untested xend-relocation script.
|
||||||
|
* Sat Mar 08 2008 jfehlig@novell.com
|
||||||
|
- Set device model when creating pvfb consoles via XenAPI.
|
||||||
|
bnc#367851
|
||||||
|
* Fri Mar 07 2008 jfehlig@novell.com
|
||||||
|
- Ensure dhcpcd is activated, if appropriate, on bridges created
|
||||||
|
by network-multinet. bnc#364633
|
||||||
* Fri Feb 29 2008 carnold@novell.com
|
* Fri Feb 29 2008 carnold@novell.com
|
||||||
- bnc#357966 - VT-D dosen't work for HVM guest.
|
- bnc#357966 - VT-D dosen't work for HVM guest.
|
||||||
* Fri Feb 29 2008 plc@novell.com
|
* Fri Feb 29 2008 plc@novell.com
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
@@ -2732,6 +2732,14 @@ class XendDomainInfo:
|
@@ -2773,6 +2773,14 @@ class XendDomainInfo:
|
||||||
if not config.has_key('backend'):
|
if not config.has_key('backend'):
|
||||||
config['backend'] = "00000000-0000-0000-0000-000000000000"
|
config['backend'] = "00000000-0000-0000-0000-000000000000"
|
||||||
|
|
||||||
|
@ -111,3 +111,12 @@ Index: xen-3.2-testing/tools/examples/xend-config.sxp
|
|||||||
|
|
||||||
# The script used to control virtual interfaces. This can be overridden on a
|
# The script used to control virtual interfaces. This can be overridden on a
|
||||||
# per-vif basis when creating a domain or a configuring a new vif. The
|
# per-vif basis when creating a domain or a configuring a new vif. The
|
||||||
|
@@ -169,7 +219,7 @@
|
||||||
|
# Dom0 will balloon out when needed to free memory for domU.
|
||||||
|
# dom0-min-mem is the lowest memory level (in MB) dom0 will get down to.
|
||||||
|
# If dom0-min-mem=0, dom0 will never balloon out.
|
||||||
|
-(dom0-min-mem 196)
|
||||||
|
+(dom0-min-mem 512)
|
||||||
|
|
||||||
|
# In SMP system, dom0 will use dom0-cpus # of CPUS
|
||||||
|
# If dom0-cpus = 0, dom0 will take all cpus available
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
Index: xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- xen-3.2-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
--- xen-3.2.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||||
+++ xen-3.2-testing/tools/python/xen/xend/XendDomainInfo.py
|
+++ xen-3.2.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||||
@@ -1504,7 +1504,7 @@ class XendDomainInfo:
|
@@ -1509,7 +1509,7 @@ class XendDomainInfo:
|
||||||
try:
|
try:
|
||||||
if not corefile:
|
if not corefile:
|
||||||
this_time = time.strftime("%Y-%m%d-%H%M.%S", time.localtime())
|
this_time = time.strftime("%Y-%m%d-%H%M.%S", time.localtime())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user