|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH][Xen 4.0-testing.hg] fix small bugs of memory sharing
Hi, all:
xen/arch/x86/hvm/hvm.c | 2 ++ xen/arch/x86/mm.c | 20 ++++++++++---------- xen/arch/x86/mm/mem_sharing.c | 4 ++--
3 files changed, 14 insertions(+), 12 deletions(-)
This small patch fixes 2 problems of memory sharing for xen-4.0-testing.hg (I haven't submitted patch here, if it violates any conventional rules, I'm glad to have advices) (1) When nominating a shared page, the page_make_sharable() does not recover the type_info count if it fails to nominate the page.
(2) When building xen with debug=n, the code in ASSERT() won't get executed. Change to BUG_ON.
Besides, I don't understand why the page_make_sharable() force checking the count_info with the following way?
/* Check if the ref count is 2. The first from PGT_allocated, and the second * from get_page at the top of this function */ if(page->count_info != (PGC_allocated | (2 + expected_refcnt)))
This seems to imply that the following kind of page can never be nominated for shared pages because ci (count_info) is greater than 2 after get_page. Here, domain 3 is a 64-bit HVM with hap=1, pae=1 on 64bit Xen.
(XEN) Debug for domain=3, gfn=10, Debug page: MFN=c210ad is ci=8000000000000002, ti=0, owner_id=3
Can someone gives a hint that (1) in what kind of scenario that ci = 2 and ti=0? (2) or why not allow ci >=2 to be nominated?
Bests, Jui-Hao Chiang at CCMA, ITRI, R.O.C
xen-4.0-testing.hg.mem_sharing.patch
Description: Text Data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH][Xen 4.0-testing.hg] fix small bugs of memory sharing,
Jui-Hao Chiang <=
|
|
|
|
|