From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hollis Blanchard Subject: Re: [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data Date: Mon, 03 Dec 2007 22:24:04 -0600 Message-ID: <1196742244.23391.4.camel@basalt> References: Reply-To: Hollis Blanchard Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org To: Avi Kivity Return-path: In-Reply-To: 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 Actually, (now that I try to build with it :) this doesn't work for PowerPC, which defines (or rather, doesn't not define) CONFIG_HAS_IOPORT. So I guess a callout to arch code will do. I'll send a patch sometime. -- Hollis Blanchard IBM Linux Technology Center On Mon, 2007-12-03 at 16:14 -0600, Hollis Blanchard wrote: > Signed-off-by: Hollis Blanchard > --- > pio_data is obviously arch-specific, but we might be able to get by with an > ifdef in kvm_vcpu_nopage() rather than needing an arch hook. Thoughts? > > 1 file changed, 2 insertions(+) > drivers/kvm/kvm_main.c | 2 ++ > > > diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c > --- a/drivers/kvm/kvm_main.c > +++ b/drivers/kvm/kvm_main.c > @@ -674,8 +674,10 @@ static struct page *kvm_vcpu_nopage(stru > pgoff = ((address - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff; > if (pgoff == 0) > page = virt_to_page(vcpu->run); > +#ifdef CONFIG_HAS_IOPORT > else if (pgoff == KVM_PIO_PAGE_OFFSET) > page = virt_to_page(vcpu->pio_data); > +#endif /* CONFIG_HAS_IOPORT */ > else > return NOPAGE_SIGBUS; > get_page(page); > > ------------------------------------------------------------------------- > 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 > _______________________________________________ > kvm-devel mailing list > kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org > https://lists.sourceforge.net/lists/listinfo/kvm-devel ------------------------------------------------------------------------- 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