From mboxrd@z Thu Jan 1 00:00:00 1970 From: AnhNN Subject: Question about MMU update on HVM guest Date: Fri, 13 May 2016 06:11:55 +0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4789554863885699948==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============4789554863885699948== Content-Type: multipart/alternative; boundary=001a1142d222d1c4c30532ad4840 --001a1142d222d1c4c30532ad4840 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi, I have some questions about MMU update operation. I add some logging in function *do_mmu_update* (in file /xen/arch/x86/mm.c), and start Windows 7 32 bit HVM guest. After guest started, I look at log and see that MMU update has been called with every page of guest, with *pt_ower =3D 0* and *pg_owner =3D 1*. And wi= th every page, MMU update called 2 times. The first time, * page->count_info = =3D 0x8000000000000002* after MMU update, but after that it decrease to *0x8000000000000001* in a different function. At the second time, *page->count_info =3D 0x8000000000000002* after MMU update, and keep that value forever. So the question is, why domain 0 have a reference to every pages of HVM guest ? And why in the second time of MMU update, count_info doesn't decrease to *0x8000000000000001* ? Thanks & Best Regards. --=20 Nguy=E1=BB=85n Ng=E1=BB=8Dc Anh Student - Course 53 Department of Computer Engineering - School of Information and Communication Technology Hanoi University Of Science And Technology. Mobile: 0973402195 Email: ngocanh198@gmail.com Y!M: pancuro Skype: ngocanh19890 --001a1142d222d1c4c30532ad4840 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi,

I have some questions about MMU update operation.
I add some logging in function do_mmu_update (in file /xen/arch/x86/= mm.c), and start Windows 7 32 bit HVM guest.
After guest started, I look at log and see that MMU update has been=20 called with every page of guest, with pt_ower =3D 0 and pg_owner = =3D 1. And with every page, MMU update called 2 times. The first time, = page->count_info =3D 0x8000000000000002 after MMU update, but after= =20 that it decrease to 0x8000000000000001 in a different function. At t= he second time, page->count_info =3D 0x8000000000000002 after MMU update, = and=20 keep that value forever.

So the question is, why domain 0 have a reference to every pages of = HVM guest ?
And why in the second time of MMU update, count_info doesn't decrease t= o 0x8000000000000001 ?

Thanks & Best Regards.


--
Nguy=E1=BB=85n Ng= =E1=BB=8Dc Anh
Student - Course 53
Departme= nt of Computer Engineering - School of Information and Communication Techno= logy=C2=A0
Hanoi University Of Science And Technology.
Mobile: 0973402195
Email:=C2=A0ngocanh198@gmail.com=
Y!M: pancuro
Skype: ngocanh19890
--001a1142d222d1c4c30532ad4840-- --===============4789554863885699948== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwOi8vbGlzdHMueGVuLm9y Zy94ZW4tZGV2ZWwK --===============4789554863885699948==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: Question about MMU update on HVM guest Date: Wed, 18 May 2016 12:39:51 +0100 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: AnhNN Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org T24gRnJpLCBNYXkgMTMsIDIwMTYgYXQgMTI6MTEgQU0sIEFuaE5OIDxuZ29jYW5oMTk4QGdtYWls LmNvbT4gd3JvdGU6Cj4gSGksCj4KPiBJIGhhdmUgc29tZSBxdWVzdGlvbnMgYWJvdXQgTU1VIHVw ZGF0ZSBvcGVyYXRpb24uCj4gSSBhZGQgc29tZSBsb2dnaW5nIGluIGZ1bmN0aW9uIGRvX21tdV91 cGRhdGUgKGluIGZpbGUgL3hlbi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