* [kvm-ppc-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORT around
@ 2007-12-03 22:14 ` Hollis Blanchard
0 siblings, 0 replies; 17+ 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@us.ibm.com>
---
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-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data
@ 2007-12-03 22:14 ` Hollis Blanchard
0 siblings, 0 replies; 17+ 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] 17+ messages in thread
* Re: [kvm-ppc-devel] [kvm-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORT
2007-12-03 22:14 ` [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data Hollis Blanchard
@ 2007-12-04 4:24 ` Hollis Blanchard
-1 siblings, 0 replies; 17+ 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@us.ibm.com>
> ---
> 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@lists.sourceforge.net
> 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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data
@ 2007-12-04 4:24 ` Hollis Blanchard
0 siblings, 0 replies; 17+ 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] 17+ messages in thread
* Re: [kvm-ppc-devel] [kvm-devel] [PATCH] RFC: Use
2007-12-04 4:24 ` [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data Hollis Blanchard
@ 2007-12-04 4:39 ` Zhang, Xiantao
-1 siblings, 0 replies; 17+ 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@us.ibm.com> ---
>> 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@lists.sourceforge.net
>> 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@lists.sourceforge.net
> 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
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [kvm-ppc-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORTaround vcpu->pio_data
@ 2007-12-04 4:39 ` Zhang, Xiantao
0 siblings, 0 replies; 17+ 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] 17+ messages in thread
[parent not found: <42DFA526FC41B1429CE7279EF83C6BDCA39EA6-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>]
* Re: [kvm-ppc-devel] [kvm-devel] [PATCH] RFC:
[not found] ` <42DFA526FC41B1429CE7279EF83C6BDCA39EA6-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-12-04 4:49 ` Hollis Blanchard
0 siblings, 0 replies; 17+ messages in thread
From: Hollis Blanchard @ 2007-12-04 4:49 UTC (permalink / raw)
To: Zhang, Xiantao
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity
On Tue, 2007-12-04 at 12:39 +0800, Zhang, Xiantao wrote:
> 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 ?
It's a matter of perspective. :)
The PowerPC architecture has no "IO" instructions; therefore all IO
accesses are MMIO.
However, you can place devices with IO ports in a PowerPC system. In
this case, the bridges are configured to translate MMIO accesses coming
from the processor into IO port accesses on the bus. It is quite common
to find standard x86 ISA devices, such as a SuperIO chip, in PowerPC
systems.
In Linux, CONFIG_HAS_IOPORT doesn't really mean "does the architecture
use IO ports," which is what I thought it meant. Instead, it means
"should we track IO resources as well as MMIO resources," and that's
true on PowerPC because we need manage the ISA bus as mentioned above.
(The only current user of the symbol is lib/devres.c.)
In summary, it's an inappropriate ifdef for this situation.
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------------------------
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [kvm-ppc-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORTaround vcpu->pio_data
@ 2007-12-04 4:49 ` Hollis Blanchard
0 siblings, 0 replies; 17+ messages in thread
From: Hollis Blanchard @ 2007-12-04 4:49 UTC (permalink / raw)
To: Zhang, Xiantao
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity
On Tue, 2007-12-04 at 12:39 +0800, Zhang, Xiantao wrote:
> 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 ?
It's a matter of perspective. :)
The PowerPC architecture has no "IO" instructions; therefore all IO
accesses are MMIO.
However, you can place devices with IO ports in a PowerPC system. In
this case, the bridges are configured to translate MMIO accesses coming
from the processor into IO port accesses on the bus. It is quite common
to find standard x86 ISA devices, such as a SuperIO chip, in PowerPC
systems.
In Linux, CONFIG_HAS_IOPORT doesn't really mean "does the architecture
use IO ports," which is what I thought it meant. Instead, it means
"should we track IO resources as well as MMIO resources," and that's
true on PowerPC because we need manage the ISA bus as mentioned above.
(The only current user of the symbol is lib/devres.c.)
In summary, it's an inappropriate ifdef for this situation.
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------------------------
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] 17+ messages in thread
* Re: [kvm-ppc-devel] [kvm-devel] [PATCH] RFC:
2007-12-04 4:49 ` [kvm-ppc-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORTaround vcpu->pio_data Hollis Blanchard
@ 2007-12-04 5:04 ` Zhang, Xiantao
-1 siblings, 0 replies; 17+ messages in thread
From: Zhang, Xiantao @ 2007-12-04 5:04 UTC (permalink / raw)
To: Hollis Blanchard
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity
Hollis Blanchard wrote:
> On Tue, 2007-12-04 at 12:39 +0800, Zhang, Xiantao wrote:
>> 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 ?
>
> It's a matter of perspective. :)
>
> The PowerPC architecture has no "IO" instructions; therefore all IO
> accesses are MMIO.
> However, you can place devices with IO ports in a PowerPC system. In
> this case, the bridges are configured to translate MMIO accesses
> coming from the processor into IO port accesses on the bus. It is
> quite common to find standard x86 ISA devices, such as a SuperIO
Thank you for your elaboration.
So, bridge emulation in qemu will take over the responsibility of the
translation for ppc?
> In Linux, CONFIG_HAS_IOPORT doesn't really mean "does the architecture
> use IO ports," which is what I thought it meant. Instead, it means
> "should we track IO resources as well as MMIO resources," and that's
> true on PowerPC because we need manage the ISA bus as mentioned above.
> (The only current user of the symbol is lib/devres.c.)
>
> In summary, it's an inappropriate ifdef for this situation.
Agree.
-------------------------------------------------------------------------
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [kvm-ppc-devel] [PATCH] RFC: UseCONFIG_HAS_IOPORTaround vcpu->pio_data
@ 2007-12-04 5:04 ` Zhang, Xiantao
0 siblings, 0 replies; 17+ messages in thread
From: Zhang, Xiantao @ 2007-12-04 5:04 UTC (permalink / raw)
To: Hollis Blanchard
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity
Hollis Blanchard wrote:
> On Tue, 2007-12-04 at 12:39 +0800, Zhang, Xiantao wrote:
>> 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 ?
>
> It's a matter of perspective. :)
>
> The PowerPC architecture has no "IO" instructions; therefore all IO
> accesses are MMIO.
> However, you can place devices with IO ports in a PowerPC system. In
> this case, the bridges are configured to translate MMIO accesses
> coming from the processor into IO port accesses on the bus. It is
> quite common to find standard x86 ISA devices, such as a SuperIO
Thank you for your elaboration.
So, bridge emulation in qemu will take over the responsibility of the
translation for ppc?
> In Linux, CONFIG_HAS_IOPORT doesn't really mean "does the architecture
> use IO ports," which is what I thought it meant. Instead, it means
> "should we track IO resources as well as MMIO resources," and that's
> true on PowerPC because we need manage the ISA bus as mentioned above.
> (The only current user of the symbol is lib/devres.c.)
>
> In summary, it's an inappropriate ifdef for this situation.
Agree.
-------------------------------------------------------------------------
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] 17+ messages in thread
[parent not found: <42DFA526FC41B1429CE7279EF83C6BDCA39EC1-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>]
* Re: [kvm-ppc-devel] [kvm-devel] [PATCH]
[not found] ` <42DFA526FC41B1429CE7279EF83C6BDCA39EC1-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2007-12-04 5:53 ` Hollis Blanchard
0 siblings, 0 replies; 17+ messages in thread
From: Hollis Blanchard @ 2007-12-04 5:53 UTC (permalink / raw)
To: Zhang, Xiantao
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity
On Tue, 2007-12-04 at 13:04 +0800, Zhang, Xiantao wrote:
>
> Hollis Blanchard wrote:
> > On Tue, 2007-12-04 at 12:39 +0800, Zhang, Xiantao wrote:
> >> 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 ?
> >
> > It's a matter of perspective. :)
> >
> > The PowerPC architecture has no "IO" instructions; therefore all IO
> > accesses are MMIO.
> > However, you can place devices with IO ports in a PowerPC system. In
> > this case, the bridges are configured to translate MMIO accesses
> > coming from the processor into IO port accesses on the bus. It is
> > quite common to find standard x86 ISA devices, such as a SuperIO
>
> Thank you for your elaboration.
> So, bridge emulation in qemu will take over the responsibility of the
> translation for ppc?
Yup.
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------------------------
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [kvm-ppc-devel] [PATCH] RFC: UseCONFIG_HAS_IOPORTaround vcpu->pio_data
@ 2007-12-04 5:53 ` Hollis Blanchard
0 siblings, 0 replies; 17+ messages in thread
From: Hollis Blanchard @ 2007-12-04 5:53 UTC (permalink / raw)
To: Zhang, Xiantao
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity
On Tue, 2007-12-04 at 13:04 +0800, Zhang, Xiantao wrote:
>
> Hollis Blanchard wrote:
> > On Tue, 2007-12-04 at 12:39 +0800, Zhang, Xiantao wrote:
> >> 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 ?
> >
> > It's a matter of perspective. :)
> >
> > The PowerPC architecture has no "IO" instructions; therefore all IO
> > accesses are MMIO.
> > However, you can place devices with IO ports in a PowerPC system. In
> > this case, the bridges are configured to translate MMIO accesses
> > coming from the processor into IO port accesses on the bus. It is
> > quite common to find standard x86 ISA devices, such as a SuperIO
>
> Thank you for your elaboration.
> So, bridge emulation in qemu will take over the responsibility of the
> translation for ppc?
Yup.
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------------------------
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] 17+ messages in thread
* Re: [kvm-ppc-devel] [kvm-devel] [PATCH]
2007-12-04 4:49 ` [kvm-ppc-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORTaround vcpu->pio_data Hollis Blanchard
@ 2007-12-04 9:24 ` Dong, Eddie
-1 siblings, 0 replies; 17+ messages in thread
From: Dong, Eddie @ 2007-12-04 9:24 UTC (permalink / raw)
To: Hollis Blanchard, Zhang, Xiantao
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity
>It's a matter of perspective. :)
>
>The PowerPC architecture has no "IO" instructions; therefore all IO
>accesses are MMIO.
>
>However, you can place devices with IO ports in a PowerPC system. In
>this case, the bridges are configured to translate MMIO accesses coming
>from the processor into IO port accesses on the bus. It is quite common
>to find standard x86 ISA devices, such as a SuperIO chip, in PowerPC
>systems.
>
That is exactly what IA64 architecture takes.
I guess PIO is X86 historic issue when there as only 16 bits bus 20
years ago.
And it is probably due to 8085 which is for embedded system.
All other archs may support PIO due to plenty of X86 devices, but do
emulating PIO
in chipset/bridge like PPC/IA64.
Of course except S390 which is really different and doesn't want to take
"open" devices:(
Eddie.
-------------------------------------------------------------------------
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [kvm-ppc-devel] [PATCH] RFC:Use CONFIG_HAS_IOPORTaround vcpu->pio_data
@ 2007-12-04 9:24 ` Dong, Eddie
0 siblings, 0 replies; 17+ messages in thread
From: Dong, Eddie @ 2007-12-04 9:24 UTC (permalink / raw)
To: Hollis Blanchard, Zhang, Xiantao
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity
>It's a matter of perspective. :)
>
>The PowerPC architecture has no "IO" instructions; therefore all IO
>accesses are MMIO.
>
>However, you can place devices with IO ports in a PowerPC system. In
>this case, the bridges are configured to translate MMIO accesses coming
>from the processor into IO port accesses on the bus. It is quite common
>to find standard x86 ISA devices, such as a SuperIO chip, in PowerPC
>systems.
>
That is exactly what IA64 architecture takes.
I guess PIO is X86 historic issue when there as only 16 bits bus 20
years ago.
And it is probably due to 8085 which is for embedded system.
All other archs may support PIO due to plenty of X86 devices, but do
emulating PIO
in chipset/bridge like PPC/IA64.
Of course except S390 which is really different and doesn't want to take
"open" devices:(
Eddie.
-------------------------------------------------------------------------
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] 17+ messages in thread
* Re: [kvm-ppc-devel] [kvm-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORT
2007-12-04 4:24 ` [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data Hollis Blanchard
@ 2007-12-04 10:48 ` Avi Kivity
-1 siblings, 0 replies; 17+ 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
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data
@ 2007-12-04 10:48 ` Avi Kivity
0 siblings, 0 replies; 17+ 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] 17+ messages in thread
* [kvm-ppc-devel] [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct
@ 2008-01-28 23:42 Hollis Blanchard
2008-01-29 23:22 ` [kvm-ppc-devel] [kvm-devel] [PATCH] Use Chris Lalancette
0 siblings, 1 reply; 17+ messages in thread
From: Hollis Blanchard @ 2008-01-28 23:42 UTC (permalink / raw)
To: Avi Kivity
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
# HG changeset patch
# User Hollis Blanchard <hollisb@us.ibm.com>
# Date 1201563731 21600
# Node ID 6a2f4869cf5da00fa0ccacc9188ea493459ce4cb
# Parent a6dd6b5a597903a069cb9711f73ea1b5c4f0b764
This allows kvm_host.h to be #included even when struct preempt_notifier is
undefined. This is needed to build asm-offsets.h.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
---
1 file changed, 2 insertions(+)
include/linux/kvm_host.h | 2 ++
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -67,7 +67,9 @@ void kvm_io_bus_register_dev(struct kvm_
struct kvm_vcpu {
struct kvm *kvm;
+#ifdef CONFIG_PREEMPT_NOTIFIERS
struct preempt_notifier preempt_notifier;
+#endif
int vcpu_id;
struct mutex mutex;
int cpu;
-------------------------------------------------------------------------
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/
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [kvm-ppc-devel] [kvm-devel] [PATCH] Use
2008-01-28 23:42 [kvm-ppc-devel] [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct Hollis Blanchard
@ 2008-01-29 23:22 ` Chris Lalancette
[not found] ` <479FB535.5080302-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 17+ messages in thread
From: Chris Lalancette @ 2008-01-29 23:22 UTC (permalink / raw)
To: Hollis Blanchard
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
kvm-ppc-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Avi Kivity
Hollis Blanchard wrote:
> diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
> --- a/include/linux/kvm_host.h
> +++ b/include/linux/kvm_host.h
> @@ -67,7 +67,9 @@ void kvm_io_bus_register_dev(struct kvm_
>
> struct kvm_vcpu {
> struct kvm *kvm;
> +#ifdef CONFIG_PREEMPT_NOTIFIERS
> struct preempt_notifier preempt_notifier;
> +#endif
> int vcpu_id;
> struct mutex mutex;
> int cpu;
Hm, this causes my build to fail on x86_64:
make -C /lib/modules/2.6.23.8-63.fc8/build M=`pwd` "$@"
make[2]: Entering directory `/usr/src/kernels/2.6.23.8-63.fc8-x86_64'
LD /tmp/kvm-userspace/kernel/built-in.o
CC [M] /tmp/kvm-userspace/kernel/svm.o
CC [M] /tmp/kvm-userspace/kernel/vmx.o
CC [M] /tmp/kvm-userspace/kernel/vmx-debug.o
CC [M] /tmp/kvm-userspace/kernel/kvm_main.o
/tmp/kvm-userspace/kernel/kvm_main.c: In function ‘vcpu_load’:
/tmp/kvm-userspace/kernel/kvm_main.c:82: error: ‘struct kvm_vcpu’ has no member
named ‘preempt_notifier’
/tmp/kvm-userspace/kernel/kvm_main.c: In function ‘vcpu_put’:
/tmp/kvm-userspace/kernel/kvm_main.c:91: error: ‘struct kvm_vcpu’ has no member
named ‘preempt_notifier’
/tmp/kvm-userspace/kernel/kvm_main.c: In function ‘kvm_vm_ioctl_create_vcpu’:
/tmp/kvm-userspace/kernel/kvm_main.c:749: error: ‘struct kvm_vcpu’ has no member
named ‘preempt_notifier’
/tmp/kvm-userspace/kernel/kvm_main.c: In function ‘preempt_notifier_to_vcpu’:
/tmp/kvm-userspace/kernel/kvm_main.c:1284: error: ‘struct kvm_vcpu’ has no
member named ‘preempt_notifier’
/tmp/kvm-userspace/kernel/kvm_main.c:1284: warning: type defaults to ‘int’ in
declaration of ‘__mptr’
/tmp/kvm-userspace/kernel/kvm_main.c:1284: warning: initialization from
incompatible pointer type
/tmp/kvm-userspace/kernel/kvm_main.c:1284: error: ‘struct kvm_vcpu’ has no
member named ‘preempt_notifier’
make[3]: *** [/tmp/kvm-userspace/kernel/kvm_main.o] Error 1
make[2]: *** [_module_/tmp/kvm-userspace/kernel] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.23.8-63.fc8-x86_64'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/kvm-userspace/kernel'
make: *** [kernel] Error 2
Reverting this patch makes the build succeed again.
Chris Lalancette
-------------------------------------------------------------------------
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/
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2008-01-29 23:41 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-03 22:14 [kvm-ppc-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORT around Hollis Blanchard
2007-12-03 22:14 ` [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data Hollis Blanchard
2007-12-04 4:24 ` [kvm-ppc-devel] [kvm-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORT Hollis Blanchard
2007-12-04 4:24 ` [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data Hollis Blanchard
2007-12-04 4:39 ` [kvm-ppc-devel] [kvm-devel] [PATCH] RFC: Use Zhang, Xiantao
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 ` [kvm-ppc-devel] [kvm-devel] [PATCH] RFC: Hollis Blanchard
2007-12-04 4:49 ` [kvm-ppc-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORTaround vcpu->pio_data Hollis Blanchard
2007-12-04 5:04 ` [kvm-ppc-devel] [kvm-devel] [PATCH] RFC: Zhang, Xiantao
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 ` [kvm-ppc-devel] [kvm-devel] [PATCH] Hollis Blanchard
2007-12-04 5:53 ` [kvm-ppc-devel] [PATCH] RFC: UseCONFIG_HAS_IOPORTaround vcpu->pio_data Hollis Blanchard
2007-12-04 9:24 ` [kvm-ppc-devel] [kvm-devel] [PATCH] Dong, Eddie
2007-12-04 9:24 ` [kvm-ppc-devel] [PATCH] RFC:Use CONFIG_HAS_IOPORTaround vcpu->pio_data Dong, Eddie
2007-12-04 10:48 ` [kvm-ppc-devel] [kvm-devel] [PATCH] RFC: Use CONFIG_HAS_IOPORT Avi Kivity
2007-12-04 10:48 ` [PATCH] RFC: Use CONFIG_HAS_IOPORT around vcpu->pio_data Avi Kivity
-- strict thread matches above, loose matches on Subject: below --
2008-01-28 23:42 [kvm-ppc-devel] [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct Hollis Blanchard
2008-01-29 23:22 ` [kvm-ppc-devel] [kvm-devel] [PATCH] Use Chris Lalancette
[not found] ` <479FB535.5080302-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2008-01-29 23:41 ` [kvm-ppc-devel] [kvm-devel] [PATCH] Hollis Blanchard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.