From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Subject: Re: [PATCH 0 of 2] A couple ifdefs Date: Wed, 16 Jan 2008 10:24:59 +0100 Message-ID: <478DCD6B.7020904@linux.vnet.ibm.com> References: <478DBA4D.7060408@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Hollis Blanchard To: Avi Kivity Return-path: In-Reply-To: <478DBA4D.7060408-atKUWr5tajBWk0Htik3J/w@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 Avi Kivity wrote: > Hollis Blanchard wrote: >> These small ifdefs are necessary for integration of the PowerPC port. >> >> = > = > Only patch 2 of 2 made it. > = As Hollis should be sleeping right now I resend 1/2 as it arrived on kvm-po= werpc-devel (I hope my mail-app keeps the format this time) -- = Gr=FCsse / regards, = Christian Ehrhardt IBM Linux Technology Center, Open Virtualization original mail --- # HG changeset patch # User Hollis Blanchard # Date 1200434310 21600 # Node ID 7fa5947a2da8c0c7424ebdcfaebcae624d6cf015 # Parent ee0c227fe3f6632f4b1b5fde3f7e05c8ea0a4378 Signed-off-by: Hollis Blanchard Signed-off-by: Christian Ehrhardt --- 2 files changed, 7 insertions(+) arch/x86/kvm/Kconfig | 5 +++++ virt/kvm/kvm_main.c | 2 ++ diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -33,9 +33,13 @@ config KVM If unsure, say N. +config KVM_HAS_PIO + bool + config KVM_INTEL tristate "KVM for Intel processors support" depends on KVM + select KVM_HAS_PIO ---help--- Provides support for KVM on Intel processors equipped with the VT extensions. @@ -43,6 +47,7 @@ config KVM_AMD config KVM_AMD tristate "KVM for AMD processors support" depends on KVM + select KVM_HAS_PIO ---help--- Provides support for KVM on AMD processors equipped with the AMD-V (SVM) extensions. diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -677,8 +677,10 @@ static int kvm_vcpu_fault(struct vm_area if (vmf->pgoff =3D=3D 0) page =3D virt_to_page(vcpu->run); +#ifdef CONFIG_KVM_HAS_PIO else if (vmf->pgoff =3D=3D KVM_PIO_PAGE_OFFSET) page =3D virt_to_page(vcpu->arch.pio_data); +#endif /* CONFIG_KVM_HAS_PIO */ else return VM_FAULT_SIGBUS; get_page(page); ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/