From: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: "Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>;
Hollis Blanchard
<hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>; Jerone Young
<jyoung5-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>; Carsten
Otte" <cotte-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>,
Hollis Blanchard
<hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
Christian Ehrhardt
<ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Subject: [PATCH][RESEND] portability: add CONFIG_KVM_HAS_PIO around pio_data
Date: Thu, 17 Jan 2008 17:04:30 +0100 [thread overview]
Message-ID: <1200585870402-git-send-email-ehrhardt@linux.vnet.ibm.com> (raw)
Carsten asked for the same on s390 which brings me to resend ppc patches
neither rejected, commented nor accepted yet
Subject: [PATCH][RESEND] portability: add CONFIG_KVM_HAS_PIO around pio_data
From: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Define and use CONFIG_KVM_HAS_PIO so that non-x86 don't need pio_data
in kvm_arch_vcpu.
Signed-off-by: Christian Ehrhardt <ehrhardt-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Signed-off-by: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Acked-by: Carsten Otte <cotte-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
arch/x86/kvm/Kconfig | 5 +++++
virt/kvm/kvm_main.c | 2 ++
2 files changed, 7 insertions(+)
diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig
index 4086080..e31ac6e 100644
--- 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_INTEL
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
index 4295623..f6e4232 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -677,8 +677,10 @@ static int kvm_vcpu_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
if (vmf->pgoff == 0)
page = virt_to_page(vcpu->run);
+#ifdef CONFIG_KVM_HAS_PIO
else if (vmf->pgoff == KVM_PIO_PAGE_OFFSET)
page = 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/
reply other threads:[~2008-01-17 16:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1200585870402-git-send-email-ehrhardt@linux.vnet.ibm.com \
--to=ehrhardt-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
--cc=cotte-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox