[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201022052647.6a4d7e0b.pasic@linux.ibm.com>
Date: Thu, 22 Oct 2020 05:26:47 +0200
From: Halil Pasic <pasic@...ux.ibm.com>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: Dave Hansen <dave.hansen@...ux.intel.com>,
Andy Lutomirski <luto@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
David Rientjes <rientjes@...gle.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Kees Cook <keescook@...omium.org>,
Will Drewry <wad@...omium.org>,
"Edgecombe, Rick P" <rick.p.edgecombe@...el.com>,
"Kleen, Andi" <andi.kleen@...el.com>,
Liran Alon <liran.alon@...cle.com>,
Mike Rapoport <rppt@...nel.org>, x86@...nel.org,
kvm@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: Re: [RFCv2 14/16] KVM: Handle protected memory in
__kvm_map_gfn()/__kvm_unmap_gfn()
On Tue, 20 Oct 2020 09:18:57 +0300
"Kirill A. Shutemov" <kirill@...temov.name> wrote:
> We cannot access protected pages directly. Use ioremap() to
> create a temporary mapping of the page. The mapping is destroyed
> on __kvm_unmap_gfn().
>
> The new interface gfn_to_pfn_memslot_protected() is used to detect if
> the page is protected.
>
> ioremap_cache_force() is a hack to bypass IORES_MAP_SYSTEM_RAM check in
> the x86 ioremap code. We need a better solution.
>
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> ---
> arch/powerpc/kvm/book3s_64_mmu_hv.c | 2 +-
> arch/powerpc/kvm/book3s_64_mmu_radix.c | 2 +-
> arch/x86/include/asm/io.h | 2 +
> arch/x86/include/asm/pgtable_types.h | 1 +
> arch/x86/kvm/mmu/mmu.c | 6 ++-
> arch/x86/mm/ioremap.c | 16 ++++++--
> include/linux/kvm_host.h | 3 +-
> include/linux/kvm_types.h | 1 +
> virt/kvm/kvm_main.c | 52 +++++++++++++++++++-------
> 9 files changed, 63 insertions(+), 22 deletions(-)
>
You declare ioremap_cache_force() arch/x86/include/asm/io.h in and
define it in arch/x86/mm/ioremap.c which is architecture specific code,
but use it in __kvm_map_gfn() in virt/kvm/kvm_main.c which is common
code.
Thus your series breaks the build for the s390 architecture. Have you
tried to (cross) compile for s390?
Regards,
Halil
Powered by blists - more mailing lists