From patchwork Mon May 27 06:38:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kubecek X-Patchwork-Id: 10962163 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CACAF14C0 for ; Mon, 27 May 2019 06:38:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7AE028A5F for ; Mon, 27 May 2019 06:38:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A867628ADD; Mon, 27 May 2019 06:38:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A1E4428A5F for ; Mon, 27 May 2019 06:38:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726094AbfE0Gia (ORCPT ); Mon, 27 May 2019 02:38:30 -0400 Received: from mx2.suse.de ([195.135.220.15]:41140 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725943AbfE0Gi3 (ORCPT ); Mon, 27 May 2019 02:38:29 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id ACB3AAE07; Mon, 27 May 2019 06:38:28 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 3F883E00A9; Mon, 27 May 2019 08:38:28 +0200 (CEST) From: Michal Kubecek Subject: [PATCH] kvm: memunmap() also needs HAS_IOMEM To: kvm@vger.kernel.org Cc: Paolo Bonzini , "Radim Krcmar" , KarimAllah Ahmed , linux-kernel@vger.kernel.org Message-Id: <20190527063828.3F883E00A9@unicorn.suse.cz> Date: Mon, 27 May 2019 08:38:28 +0200 (CEST) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit d30b214d1d0a ("kvm: fix compilation on s390") addresses link error (undefined reference to memremap) without HAS_IOMEM but memunmap() is also only available with HAS_IOMEM enabled so that we need similar fix in kvm_vcpu_unmap(). Fixes: e45adf665a53 ("KVM: Introduce a new guest mapping API") Signed-off-by: Michal Kubecek --- virt/kvm/kvm_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 134ec0283a8a..301089a462c4 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -1795,8 +1795,10 @@ void kvm_vcpu_unmap(struct kvm_vcpu *vcpu, struct kvm_host_map *map, if (map->page) kunmap(map->page); +#ifdef CONFIG_HAS_IOMEM else memunmap(map->hva); +#endif if (dirty) { kvm_vcpu_mark_page_dirty(vcpu, map->gfn);