From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: guest PTE write emulation Date: Wed, 30 May 2007 15:25:58 +0300 Message-ID: <465D6D56.90307@qumranet.com> References: <10EA09EFD8728347A513008B6B0DA77A01841631@pdsmsx411.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: "Dong, Eddie" Return-path: In-Reply-To: <10EA09EFD8728347A513008B6B0DA77A01841631-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Dong, Eddie wrote: > Avi Kivity wrote: > >> On a pte update, npte will always be 1. On a pde update, we won't do >> anything in mmu_pte_write_new_pte because it doesn't handle >> pdes. If we >> extend it to handle pdes, then we need either to modify the >> new gpde or >> to have the update take the quadrant into account. >> > > Agree, so we either just skip npte=2 branch or polish it. > How about following changes? > Isn't it all dead code, as gpte[1] will never be used? Maybe just move the page->role.level test from mmu_pte_write_new_pte() back to kvm_mmu_pte_write(), so that it's clear that the new data isn't used for the non-pte case? -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/