From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: question about mmu. Date: Mon, 30 Aug 2010 14:51:27 +0800 Message-ID: <4C7B54EF.2040209@cn.fujitsu.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: kvm To: cs-jerry** Return-path: Received: from cn.fujitsu.com ([222.73.24.84]:49231 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1752543Ab0H3GrR convert rfc822-to-8bit (ORCPT ); Mon, 30 Aug 2010 02:47:17 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 08/30/2010 02:07 PM, cs-jerry** wrote: > hi all, > if gpte in guest table was set write protection , the correspond= ing spte in shadow will set be write protection. so any operation in gu= est trying to > modify guest page will generate page fault to stop the opetation exce= pt on condition that the guest set wp bit in cr0. so my question is, = how to make sure the guest is not able to modify specified page,consi= dering the condition that wp bit in cr0 will be set to 0?=20 > thanks.N=E2=80=B9=C2=A7=C2=B2=C3=A6=C3=ACr=C2=B8=E2=80=BAy=C3=BA=C3=A8= =C5=A1=C3=98b=C2=B2X=C2=AC=C2=B6=C3=87=C2=A7v=C3=98^=E2=80=93)=C3=9E=C2= =BA{.n=C3=87+=E2=80=B0=C2=B7=C2=A4=C2=BEh=C2=A7=C2=B6=17=E2=80=BA=C2=A1= =C3=9C=C2=A8}=C2=A9=C5=BE=C2=B2=C3=86 z=C3=9A&j:+v=E2=80=B0=C2=A8=C2=BE= =07=C2=AB=E2=80=98=C3=AA=C3=A7zZ+=E2=82=AC=C3=8A+zf=C2=A3=C2=A2=C2=B7h=C5= =A1=CB=86=C2=A7~=E2=80=A0=C2=AD=E2=80=A0=C3=9Bi=C3=BF=C3=BB=C3=A0z=C2=B9= =1E=C2=AEw=C2=A5=C2=A2=C2=B8?=E2=84=A2=C2=A8=C3=A8=C2=AD=C3=9A&=C2=A2)=C3= =9F=C2=A2=1Bfl=3D=3D=3D See commit: e52d8d2d5dffbaee5176a0460f3e9883fb686ac0 1: if it's write #PF, we set spte.w but remove spte.u, then 2: if user access, if will cause read #PF, it will set spte.w =3D 0 and= spte.u =3D 1