RE: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-30 Thread Bhushan Bharat-R65777
: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages On Fri, 2013-07-26 at 15:03 +, Bhushan Bharat-R65777 wrote: Will not searching the Linux PTE is a overkill? That's the best approach. Also we are searching it already to resolve the page fault. That does mean we search twice

Re: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-30 Thread Scott Wood
On 07/30/2013 11:22:54 AM, Bhushan Bharat-R65777 wrote: diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c index 5cbdc8f..a48c13f 100644 --- a/arch/powerpc/kvm/e500_mmu_host.c +++ b/arch/powerpc/kvm/e500_mmu_host.c @@ -40,6 +40,84 @@ static struct

RE: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-30 Thread Bhushan Bharat-R65777
: powerpc: set cache coherency only for RAM pages On 07/30/2013 11:22:54 AM, Bhushan Bharat-R65777 wrote: diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c index 5cbdc8f..a48c13f 100644 --- a/arch/powerpc/kvm/e500_mmu_host.c +++ b/arch/powerpc/kvm

Re: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Benjamin Herrenschmidt
On Fri, 2013-07-26 at 11:16 +0530, Bharat Bhushan wrote: If the page is RAM then map this as cacheable and coherent (set M bit) otherwise this page is treated as I/O and map this as cache inhibited and guarded (set I + G) This helps setting proper MMU mapping for direct assigned device.

Re: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Alexander Graf
On 26.07.2013, at 10:26, Benjamin Herrenschmidt wrote: On Fri, 2013-07-26 at 11:16 +0530, Bharat Bhushan wrote: If the page is RAM then map this as cacheable and coherent (set M bit) otherwise this page is treated as I/O and map this as cache inhibited and guarded (set I + G) This helps

RE: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Bhushan Bharat-R65777
-R65777 Subject: Re: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages On Fri, 2013-07-26 at 11:16 +0530, Bharat Bhushan wrote: If the page is RAM then map this as cacheable and coherent (set M bit) otherwise this page is treated as I/O and map this as cache inhibited and guarded

RE: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Bhushan Bharat-R65777
@lists.ozlabs.org; Wood Scott-B07421; Bhushan Bharat-R65777 Subject: Re: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages On 26.07.2013, at 10:26, Benjamin Herrenschmidt wrote: On Fri, 2013-07-26 at 11:16 +0530, Bharat Bhushan wrote: If the page is RAM then map this as cacheable

RE: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-26 Thread Bhushan Bharat-R65777
@lists.ozlabs.org; Wood Scott-B07421; Bhushan Bharat-R65777 Subject: Re: [PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages On 26.07.2013, at 10:26, Benjamin Herrenschmidt wrote: On Fri, 2013-07-26 at 11:16 +0530, Bharat Bhushan wrote: If the page is RAM then map this as cacheable

[PATCH 4/4] kvm: powerpc: set cache coherency only for RAM pages

2013-07-25 Thread Bharat Bhushan
If the page is RAM then map this as cacheable and coherent (set M bit) otherwise this page is treated as I/O and map this as cache inhibited and guarded (set I + G) This helps setting proper MMU mapping for direct assigned device. NOTE: There can be devices that require cacheable mapping, which