From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 0/7] Rework irq injection infrastructure Date: Thu, 06 Dec 2007 16:19:16 +0200 Message-ID: <475804E4.3030705@qumranet.com> References: <11967614542283-git-send-email-avi@qumranet.com><10EA09EFD8728347A513008B6B0DA77A0279CC10@pdsmsx411.ccr.corp.intel.com><4757B2C3.3000402@qumranet.com><10EA09EFD8728347A513008B6B0DA77A0279CCE0@pdsmsx411.ccr.corp.intel.com><4757CA93.1090704@qumranet.com> <10EA09EFD8728347A513008B6B0DA77A0279CCF2@pdsmsx411.ccr.corp.intel.com> <10EA09EFD8728347A513008B6B0DA77A0279CD1C@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: <10EA09EFD8728347A513008B6B0DA77A0279CD1C-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: >> What I mean is we pre-load 2 pages where the stack are in, the >> logic may >> be: >> >> If (real mode) >> get 2 pages. >> enter critical path >> .... >> VM Resume. >> put these 2 pages. >> handle VM Exit normally. >> >> >> > With 2nd thinking, We can cache these 2 pages. Something like: > if (real mode) > cache_2_pages (ss:esp) > enter critical path. > > In cache_2_pages, old cache can be invalidated (put to user pages), new > pages are loaded (get user page) to avoid SW irq injection page fault. > When switch from real mode to protect mode, invalidate the page cache. > > I prefer the first one. Indefinitely holding on to pages is not good, we may want to remove those pages for swapping or page migration. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4