From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC][PATCH]Memory mapped TPR shadow featureenabling Date: Fri, 28 Sep 2007 16:41:12 +0200 Message-ID: <46FD1288.9030507@qumranet.com> References: <46F8C84F.7090605@qumranet.com> <10EA09EFD8728347A513008B6B0DA77A022AE787@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: <10EA09EFD8728347A513008B6B0DA77A022AE787-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: >>> diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index >>> cecdb1b..0ebae4c 100644 --- a/drivers/kvm/kvm_main.c +++ >>> b/drivers/kvm/kvm_main.c @@ -1080,14 +1080,19 @@ static int >>> emulator_read_emulated(unsigned long addr, memcpy(val, >>> vcpu->mmio_data, bytes); vcpu->mmio_read_completed = 0; return >>> X86EMUL_CONTINUE; - } else if (emulator_read_std(addr, val, bytes, >>> vcpu) - == X86EMUL_CONTINUE) - return X86EMUL_CONTINUE; + } gpa = >>> vcpu->mmu.gva_to_gpa(vcpu, addr); + if ((gpa & PAGE_MASK) == >>> 0xfee00000) + goto mmio; + >>> >> The guest can change the apic base address. Different vcpus can have >> different addresses. >> >> > > In theory yes. But we didn't observe this so far. Xen with this feature > with same assumption > works for quit a long time. > Also given that we are using global shadow page table, so probably we > have to > take this assumption :-) > We can workaround this by disabling the optimization when a guest has different addresses for the lapic. But I agree there's no need to do that now. -- Any sufficiently difficult bug is indistinguishable from a feature. ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/