Re: [PATCH] powerpc/e500: move qemu machine spec together with the rest

2015-09-14 Thread Laurentiu Tudor
On 09/10/2015 02:01 AM, Scott Wood wrote:
> On Fri, 2015-09-04 at 15:46 +0300, Laurentiu Tudor wrote:
>> This way we get rid of an entire file with mostly
>> duplicated code plus a Kconfig option that you always
>> had to take care to check it in order for kvm to work.
>>
>> Signed-off-by: Laurentiu Tudor 
>> ---
>>  arch/powerpc/platforms/85xx/Kconfig   | 15 -
>>  arch/powerpc/platforms/85xx/Makefile  |  1 -
>>  arch/powerpc/platforms/85xx/corenet_generic.c |  1 +
>>  arch/powerpc/platforms/85xx/qemu_e500.c   | 85 
> 
> 
> qemu_e500 is not only for corenet chips.  

That's too bad. :-(
I remember discussions on dropping the e500v2 support at some point in time?

> We can add it to the defconfig (in fact I've been meaning to do so).

Or maybe just drop de KConfig option and
wrap the file in an #ifdef CONFIG_KVM or something along these lines?
 
>> -static void __init qemu_e500_setup_arch(void)
>> -{
>> - ppc_md.progress("qemu_e500_setup_arch()", 0);
>> -
>> - fsl_pci_assign_primary();
>> - swiotlb_detect_4g();
> 
> Where is fsl_pci_assign_primary() in corenet_generic.c?  

This commit claims it's not needed and drops it:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7d4d595dad30328bc6153e235d90f54c918fc127

> At one point this 
> was needed for QEMU's PCI implementation -- have you tested QEMU PCI without 
> it?

Well, somehow i've (embarrassingly) messed up my initial tests.
I've retested after seeing your comment and indeed this breaks pci under qemu.
Adding to the confusion, the commit above made me think that the removal was 
safe.
Why pci qemu doesn't work without the call to fsl_pci_assign_primary() is
an interesting subject.

---
Best Regards, Laurentiu


--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] powerpc/e500: move qemu machine spec together with the rest

2015-09-14 Thread Alexander Graf


> Am 14.09.2015 um 15:17 schrieb Laurentiu Tudor :
> 
>> On 09/10/2015 02:01 AM, Scott Wood wrote:
>>> On Fri, 2015-09-04 at 15:46 +0300, Laurentiu Tudor wrote:
>>> This way we get rid of an entire file with mostly
>>> duplicated code plus a Kconfig option that you always
>>> had to take care to check it in order for kvm to work.
>>> 
>>> Signed-off-by: Laurentiu Tudor 
>>> ---
>>> arch/powerpc/platforms/85xx/Kconfig   | 15 -
>>> arch/powerpc/platforms/85xx/Makefile  |  1 -
>>> arch/powerpc/platforms/85xx/corenet_generic.c |  1 +
>>> arch/powerpc/platforms/85xx/qemu_e500.c   | 85 
>> 
>> 
>> qemu_e500 is not only for corenet chips.  
> 
> That's too bad. :-(
> I remember discussions on dropping the e500v2 support at some point in time?
> 
>> We can add it to the defconfig (in fact I've been meaning to do so).
> 
> Or maybe just drop de KConfig option and
> wrap the file in an #ifdef CONFIG_KVM or something along these lines?

CONFIG_KVM is for host support though. This is for the guest kernel.

Alex

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] powerpc/e500: move qemu machine spec together with the rest

2015-09-14 Thread Scott Wood
On Mon, 2015-09-14 at 16:17 +0300, Laurentiu Tudor wrote:
> On 09/10/2015 02:01 AM, Scott Wood wrote:
> > On Fri, 2015-09-04 at 15:46 +0300, Laurentiu Tudor wrote:
> > > This way we get rid of an entire file with mostly
> > > duplicated code plus a Kconfig option that you always
> > > had to take care to check it in order for kvm to work.
> > > 
> > > Signed-off-by: Laurentiu Tudor 
> > > ---
> > >  arch/powerpc/platforms/85xx/Kconfig   | 15 -
> > >  arch/powerpc/platforms/85xx/Makefile  |  1 -
> > >  arch/powerpc/platforms/85xx/corenet_generic.c |  1 +
> > >  arch/powerpc/platforms/85xx/qemu_e500.c   | 85 
> > > 
> > 
> > 
> > qemu_e500 is not only for corenet chips.  
> 
> That's too bad. :-(
> I remember discussions on dropping the e500v2 support at some point in time?
> 
> > We can add it to the defconfig (in fact I've been meaning to do so).
> 
> Or maybe just drop de KConfig option and
> wrap the file in an #ifdef CONFIG_KVM or something along these lines?
>  
> > > -static void __init qemu_e500_setup_arch(void)
> > > -{
> > > - ppc_md.progress("qemu_e500_setup_arch()", 0);
> > > -
> > > - fsl_pci_assign_primary();
> > > - swiotlb_detect_4g();
> > 
> > Where is fsl_pci_assign_primary() in corenet_generic.c?  
> 
> This commit claims it's not needed and drops it:
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7d4d595dad30328bc6153e235d90f54c918fc127

That commit has nothing to do with QEMU.

> > At one point this 
> > was needed for QEMU's PCI implementation -- have you tested QEMU PCI 
> > without 
> > it?
> 
> Well, somehow i've (embarrassingly) messed up my initial tests.
> I've retested after seeing your comment and indeed this breaks pci under 
> qemu.
> Adding to the confusion, the commit above made me think that the removal 
> was safe.
> Why pci qemu doesn't work without the call to fsl_pci_assign_primary() is
> an interesting subject.

IIRC it has to do with QEMU not liking a BAR set to zero.

-Scott


--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] powerpc/e500: move qemu machine spec together with the rest

2015-09-14 Thread Scott Wood
On Mon, 2015-09-14 at 16:14 +0200, Alexander Graf wrote:
> > Am 14.09.2015 um 15:17 schrieb Laurentiu Tudor :
> > 
> > > On 09/10/2015 02:01 AM, Scott Wood wrote:
> > > > On Fri, 2015-09-04 at 15:46 +0300, Laurentiu Tudor wrote:
> > > > This way we get rid of an entire file with mostly
> > > > duplicated code plus a Kconfig option that you always
> > > > had to take care to check it in order for kvm to work.
> > > > 
> > > > Signed-off-by: Laurentiu Tudor 
> > > > ---
> > > > arch/powerpc/platforms/85xx/Kconfig   | 15 -
> > > > arch/powerpc/platforms/85xx/Makefile  |  1 -
> > > > arch/powerpc/platforms/85xx/corenet_generic.c |  1 +
> > > > arch/powerpc/platforms/85xx/qemu_e500.c   | 85 ---
> > > > -
> > > 
> > > 
> > > qemu_e500 is not only for corenet chips.  
> > 
> > That's too bad. :-(
> > I remember discussions on dropping the e500v2 support at some point in 
> > time?
> > 
> > > We can add it to the defconfig (in fact I've been meaning to do so).
> > 
> > Or maybe just drop de KConfig option and
> > wrap the file in an #ifdef CONFIG_KVM or something along these lines?
> 
> CONFIG_KVM is for host support though. This is for the guest kernel.

CONFIG_QEMU_E500 can also be used with TCG -- it's not KVM-specific.

-Scott

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] powerpc/e500: move qemu machine spec together with the rest

2015-09-09 Thread Scott Wood
On Fri, 2015-09-04 at 15:46 +0300, Laurentiu Tudor wrote:
> This way we get rid of an entire file with mostly
> duplicated code plus a Kconfig option that you always
> had to take care to check it in order for kvm to work.
> 
> Signed-off-by: Laurentiu Tudor 
> ---
>  arch/powerpc/platforms/85xx/Kconfig   | 15 -
>  arch/powerpc/platforms/85xx/Makefile  |  1 -
>  arch/powerpc/platforms/85xx/corenet_generic.c |  1 +
>  arch/powerpc/platforms/85xx/qemu_e500.c   | 85 


qemu_e500 is not only for corenet chips.  We can add it to the defconfig (in 
fact I've been meaning to do so).

> -static void __init qemu_e500_setup_arch(void)
> -{
> - ppc_md.progress("qemu_e500_setup_arch()", 0);
> -
> - fsl_pci_assign_primary();
> - swiotlb_detect_4g();

Where is fsl_pci_assign_primary() in corenet_generic.c?  At one point this 
was needed for QEMU's PCI implementation -- have you tested QEMU PCI without 
it?

-Scott

--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html