Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Alexey Kardashevskiy
On 07/10/2013 03:32 AM, Alexander Graf wrote: On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated in

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Alexander Graf
On 11.07.2013, at 10:57, Alexey Kardashevskiy wrote: On 07/10/2013 03:32 AM, Alexander Graf wrote: On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off)

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Benjamin Herrenschmidt
On Thu, 2013-07-11 at 11:52 +0200, Alexander Graf wrote: Where exactly (it is rather SPAPR_TCE_IOMMU but does not really matter)? Select it on KVM_BOOK3S_64? CONFIG_KVM_BOOK3S_64_HV? CONFIG_KVM_BOOK3S_64_PR? PPC_BOOK3S_64? I'd say the most logical choice would be to check the Makefile

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Alexander Graf
On 11.07.2013, at 14:37, Benjamin Herrenschmidt wrote: On Thu, 2013-07-11 at 11:52 +0200, Alexander Graf wrote: Where exactly (it is rather SPAPR_TCE_IOMMU but does not really matter)? Select it on KVM_BOOK3S_64? CONFIG_KVM_BOOK3S_64_HV? CONFIG_KVM_BOOK3S_64_PR? PPC_BOOK3S_64? I'd say

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Benjamin Herrenschmidt
On Thu, 2013-07-11 at 14:50 +0200, Alexander Graf wrote: Not really no. But that would do. You could have give a more useful answer in the first place though rather than stringing him along. Sorry, I figured it was obvious. It wasn't no, because of the mess with modules and the nasty

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread chandrashekar shastri
Hi All, I complied the latest kernel 3.10.0+ pulled from the git on top of 3.10.0-rc5+ by enabling the new Virtualiztaion features. The compliation was sucessfull, when I rebooted the machine it fails to boot with error as systemd [1] : Failed to mount /dev : no such device. Is it problem

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Alexander Graf
On 11.07.2013, at 15:41, chandrashekar shastri wrote: Hi All, I complied the latest kernel 3.10.0+ pulled from the git on top of 3.10.0-rc5+ by enabling the new Virtualiztaion features. The compliation was sucessfull, when I rebooted the machine it fails to boot with error as systemd

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Alexey Kardashevskiy
On 07/11/2013 11:41 PM, chandrashekar shastri wrote: Hi All, I complied the latest kernel 3.10.0+ pulled from the git on top of 3.10.0-rc5+ by enabling the new Virtualiztaion features. The compliation was sucessfull, when I rebooted the machine it fails to boot with error as systemd [1] :

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Alexey Kardashevskiy
On 07/10/2013 03:32 AM, Alexander Graf wrote: On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated in

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Benjamin Herrenschmidt
On Thu, 2013-07-11 at 11:52 +0200, Alexander Graf wrote: Where exactly (it is rather SPAPR_TCE_IOMMU but does not really matter)? Select it on KVM_BOOK3S_64? CONFIG_KVM_BOOK3S_64_HV? CONFIG_KVM_BOOK3S_64_PR? PPC_BOOK3S_64? I'd say the most logical choice would be to check the Makefile

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Alexander Graf
On 11.07.2013, at 14:37, Benjamin Herrenschmidt wrote: On Thu, 2013-07-11 at 11:52 +0200, Alexander Graf wrote: Where exactly (it is rather SPAPR_TCE_IOMMU but does not really matter)? Select it on KVM_BOOK3S_64? CONFIG_KVM_BOOK3S_64_HV? CONFIG_KVM_BOOK3S_64_PR? PPC_BOOK3S_64? I'd say

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Benjamin Herrenschmidt
On Thu, 2013-07-11 at 14:50 +0200, Alexander Graf wrote: Not really no. But that would do. You could have give a more useful answer in the first place though rather than stringing him along. Sorry, I figured it was obvious. It wasn't no, because of the mess with modules and the nasty

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread chandrashekar shastri
Hi All, I complied the latest kernel 3.10.0+ pulled from the git on top of 3.10.0-rc5+ by enabling the new Virtualiztaion features. The compliation was sucessfull, when I rebooted the machine it fails to boot with error as systemd [1] : Failed to mount /dev : no such device. Is it problem

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Alexander Graf
On 11.07.2013, at 15:41, chandrashekar shastri wrote: Hi All, I complied the latest kernel 3.10.0+ pulled from the git on top of 3.10.0-rc5+ by enabling the new Virtualiztaion features. The compliation was sucessfull, when I rebooted the machine it fails to boot with error as systemd

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-11 Thread Alexey Kardashevskiy
On 07/11/2013 11:41 PM, chandrashekar shastri wrote: Hi All, I complied the latest kernel 3.10.0+ pulled from the git on top of 3.10.0-rc5+ by enabling the new Virtualiztaion features. The compliation was sucessfull, when I rebooted the machine it fails to boot with error as systemd [1] :

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-10 Thread Alexander Graf
On 10.07.2013, at 01:29, Alexey Kardashevskiy wrote: On 07/10/2013 03:32 AM, Alexander Graf wrote: On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off)

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-10 Thread Benjamin Herrenschmidt
On Wed, 2013-07-10 at 12:33 +0200, Alexander Graf wrote: It's not exactly obvious that you're calling it with writing == 1 :). Can you create a new local variable is_write in the calling function, set that to 1 before the call to get_user_pages_fast and pass it in instead of the 1? The

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-10 Thread Alexander Graf
On 10.07.2013, at 12:39, Benjamin Herrenschmidt wrote: On Wed, 2013-07-10 at 12:33 +0200, Alexander Graf wrote: It's not exactly obvious that you're calling it with writing == 1 :). Can you create a new local variable is_write in the calling function, set that to 1 before the call to

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-10 Thread Alexander Graf
On 10.07.2013, at 12:40, Alexander Graf wrote: On 10.07.2013, at 12:39, Benjamin Herrenschmidt wrote: On Wed, 2013-07-10 at 12:33 +0200, Alexander Graf wrote: It's not exactly obvious that you're calling it with writing == 1 :). Can you create a new local variable is_write in the

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-10 Thread Benjamin Herrenschmidt
On Wed, 2013-07-10 at 12:33 +0200, Alexander Graf wrote: It's not exactly obvious that you're calling it with writing == 1 :). Can you create a new local variable is_write in the calling function, set that to 1 before the call to get_user_pages_fast and pass it in instead of the 1? The

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-10 Thread Alexander Graf
On 10.07.2013, at 12:39, Benjamin Herrenschmidt wrote: On Wed, 2013-07-10 at 12:33 +0200, Alexander Graf wrote: It's not exactly obvious that you're calling it with writing == 1 :). Can you create a new local variable is_write in the calling function, set that to 1 before the call to

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-10 Thread Alexander Graf
On 10.07.2013, at 12:40, Alexander Graf wrote: On 10.07.2013, at 12:39, Benjamin Herrenschmidt wrote: On Wed, 2013-07-10 at 12:33 +0200, Alexander Graf wrote: It's not exactly obvious that you're calling it with writing == 1 :). Can you create a new local variable is_write in the

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-09 Thread Alexander Graf
On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated in virtual mode and get_page is called just once per

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-09 Thread Alexey Kardashevskiy
On 07/10/2013 03:32 AM, Alexander Graf wrote: On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated in

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-09 Thread Alexander Graf
On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated in virtual mode and get_page is called just once per

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-09 Thread Alexey Kardashevskiy
On 07/10/2013 03:32 AM, Alexander Graf wrote: On 07/06/2013 05:07 PM, Alexey Kardashevskiy wrote: This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated in

[PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-06 Thread Alexey Kardashevskiy
This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated in virtual mode and get_page is called just once per a huge page. Real mode handlers check if the

[PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-07-06 Thread Alexey Kardashevskiy
This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated in virtual mode and get_page is called just once per a huge page. Real mode handlers check if the

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-06-27 Thread Scott Wood
On 06/27/2013 12:02:36 AM, Alexey Kardashevskiy wrote: +/* + * The KVM guest can be backed with 16MB pages. + * In this case, we cannot do page counting from the real mode + * as the compound pages are used - they are linked in a list + * with pointers as virtual addresses which are inaccessible

Re: [PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-06-27 Thread Scott Wood
On 06/27/2013 12:02:36 AM, Alexey Kardashevskiy wrote: +/* + * The KVM guest can be backed with 16MB pages. + * In this case, we cannot do page counting from the real mode + * as the compound pages are used - they are linked in a list + * with pointers as virtual addresses which are inaccessible

[PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-06-26 Thread Alexey Kardashevskiy
This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated in virtual mode and get_page is called just once per a huge page. Real mode handlers check if the

[PATCH 8/8] KVM: PPC: Add hugepage support for IOMMU in-kernel handling

2013-06-26 Thread Alexey Kardashevskiy
This adds special support for huge pages (16MB). The reference counting cannot be easily done for such pages in real mode (when MMU is off) so we added a list of huge pages. It is populated in virtual mode and get_page is called just once per a huge page. Real mode handlers check if the