* [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data
@ 2007-12-03 22:14 Hollis Blanchard
2007-12-04 4:24 ` Hollis Blanchard
0 siblings, 1 reply; 8+ messages in thread
From: Hollis Blanchard @ 2007-12-03 22:14 UTC (permalink / raw)
To: Avi Kivity
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Signed-off-by: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data
2007-12-03 22:14 [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data Hollis Blanchard
@ 2007-12-04 4:24 ` Hollis Blanchard
2007-12-04 4:39 ` [kvm-ppc-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORTaround vcpu->pio_data Zhang, Xiantao
2007-12-04 10:48 ` [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data Avi Kivity
0 siblings, 2 replies; 8+ messages in thread
From: Hollis Blanchard @ 2007-12-04 4:24 UTC (permalink / raw)
To: Avi Kivity
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
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 <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> ---
> 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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [kvm-ppc-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORTaround vcpu->pio_data
2007-12-04 4:24 ` Hollis Blanchard
@ 2007-12-04 4:39 ` Zhang, Xiantao
[not found] ` <42DFA526FC41B1429CE7279EF83C6BDCA39EA6-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-12-04 10:48 ` [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data Avi Kivity
1 sibling, 1 reply; 8+ messages in thread
From: Zhang, Xiantao @ 2007-12-04 4:39 UTC (permalink / raw)
To: Hollis Blanchard, Avi Kivity
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hollis Blanchard wrote:
> 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.
You mean ppc has ioport , but you don't use current kvm io
infrastructure to handle it ?
Xiantao
> On Mon, 2007-12-03 at 16:14 -0600, Hollis Blanchard wrote:
>> Signed-off-by: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> ---
>> 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
> _______________________________________________
> kvm-ppc-devel mailing list
> kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/kvm-ppc-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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data
2007-12-04 4:24 ` Hollis Blanchard
2007-12-04 4:39 ` [kvm-ppc-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORTaround vcpu->pio_data Zhang, Xiantao
@ 2007-12-04 10:48 ` Avi Kivity
1 sibling, 0 replies; 8+ messages in thread
From: Avi Kivity @ 2007-12-04 10:48 UTC (permalink / raw)
To: Hollis Blanchard
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Hollis Blanchard wrote:
> 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.
>
>
We can also have a CONFIG_KVM_HAS_PIO and define/not define it as
appropriate.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
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
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-12-04 10:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-03 22:14 [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data Hollis Blanchard
2007-12-04 4:24 ` Hollis Blanchard
2007-12-04 4:39 ` [kvm-ppc-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORTaround vcpu->pio_data Zhang, Xiantao
[not found] ` <42DFA526FC41B1429CE7279EF83C6BDCA39EA6-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-12-04 4:49 ` Hollis Blanchard
2007-12-04 5:04 ` [kvm-ppc-devel] [PATCH] RFC: UseCONFIG_HAS_IOPORTaround vcpu->pio_data Zhang, Xiantao
[not found] ` <42DFA526FC41B1429CE7279EF83C6BDCA39EC1-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-12-04 5:53 ` Hollis Blanchard
2007-12-04 9:24 ` [kvm-ppc-devel] [PATCH] RFC:Use CONFIG_HAS_IOPORTaround vcpu->pio_data Dong, Eddie
2007-12-04 10:48 ` [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox