From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: Shadow page table questions Date: Thu, 11 Mar 2010 08:39:49 +0200 Message-ID: <4B989035.4050109@redhat.com> References: <4B9726A7.7000800@csail.mit.edu> <4B976AA8.9030904@redhat.com> <4B9833EE.1070705@csail.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Marek Olszewski Return-path: Received: from mx1.redhat.com ([209.132.183.28]:1025 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752002Ab0CKGjy (ORCPT ); Thu, 11 Mar 2010 01:39:54 -0500 In-Reply-To: <4B9833EE.1070705@csail.mit.edu> Sender: kvm-owner@vger.kernel.org List-ID: On 03/11/2010 02:06 AM, Marek Olszewski wrote: > Thanks for the response. I've looked through the code some more and > think I have figured it out now. I finally see that the root_hpa > variable gets switched before entering the guest in mmu_alloc_roots, > to correspond with the new cr3. Thanks again. > > Perhaps you can help me with one more question. I was hoping to try > out a certain change for a research project. I would like to > "privatize" kvm_mmu_page's and their spe's for each guest thread > running in certain designated guest processes. The goal is to give > each thread its own shadow page table graphs that map the same guest > logical addresses to guest physical addresses (with some changes to be > introduced later). Are there any assumptions that KVM makes that > will break if I do something like this? I understand that I will have > to add some code throughout the mmu to make sure that these structures > are synchronized when a guest thread makes a change, but I'm wondering > if there is anything else. Does the reverse mapping data structure > you have assume that there is only one shadow page per guest page? It doesn't, and there are often multiple shadow pages per guest page, distinguished by their sp->role field. -- error compiling committee.c: too many arguments to function