From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH][10/22] kvm: Portability : Moving pio_data, pio, mmio_fault_cr2 to arch. Date: Fri, 14 Dec 2007 12:30:50 +0200 Message-ID: <47625B5A.5040209@qumranet.com> References: <42DFA526FC41B1429CE7279EF83C6BDCAD0206@pdsmsx415.ccr.corp.intel.com> <47625A9B.5090509@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, "Zhang, Xiantao" To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org Return-path: In-Reply-To: <47625A9B.5090509-tA70FqPdS9bQT0dZR+AlfA@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 Carsten Otte wrote: > Zhang, Xiantao wrote: >> diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c >> index 530c391..2d2ff55 100644 >> --- a/drivers/kvm/kvm_main.c >> +++ b/drivers/kvm/kvm_main.c >> @@ -670,7 +670,7 @@ static int kvm_vcpu_fault(struct vm_area_struct >> *vma, struct vm_fault *vmf) >> if (vmf->pgoff == 0) >> page = virt_to_page(vcpu->run); >> else if (vmf->pgoff == KVM_PIO_PAGE_OFFSET) >> - page = virt_to_page(vcpu->pio_data); >> + page = virt_to_page(vcpu->arch.pio_data); >> else >> return VM_FAULT_SIGBUS; >> get_page(page); > Nothing that needs to be dealt with in this patch, just a thing that I > ran into when reading this patch: The fact that we're accessing > vcpu->arch here in kvm_main.c indicates that kvm_vcpu_fault() needs to > go to arch. In fact, we'll be using the regular userspace fault path > for guest pages on s390. > kvm_vcpu_fault() isn't for mapping guest pages, but for mapping the kernel/userspace vcpu communication area. Moving that snippet to an arch hook should be enough. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace