Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3445647ybi; Sun, 26 May 2019 23:40:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqz88EwcdU0J0EPnJDxenZji+xM6qDm+f01UWLPsQ+ukedIQNj4Rb9pCFGlknA17qrB/LTWM X-Received: by 2002:a17:902:5c5:: with SMTP id f63mr124514323plf.327.1558939255296; Sun, 26 May 2019 23:40:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558939255; cv=none; d=google.com; s=arc-20160816; b=BG5icA4C16pa9uJ1F5jYdVu71VQpkBnEfn1ng3KLzwVf6ScLR1fFO9g0gK4mlWVvoj W/XaGbczni77Wdkq1GJ6xA6ClpRKAUYcwt1r6xlesMPwwoqNjqPoeomlQJpw8uMuNaTc tax4K3TbAHNRTq5vv+Qy0zcXUXihomvJ1iNBzXxLJXsRhn/bNPiY+OxaeMuGqwch9Og1 UXMEmBIgLsosLa1DuhkUnjzTYUTd6DMeAaniMUZ5wyVYkd+Gue0aMvwuJDO/TdJUzUgX UCE87oh2CLxIKd16GNHPhIgOfGYkhv2fURpHXTRFvHfhg8P1EXpkRbwKuotaoVl7XN4f cYcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:message-id:cc:to:subject:from; bh=PCUqpklRBqXmWld+TlGTgSLMiOZw6DESO08jTv7kXwM=; b=P6/kOHI9c6FM2Sid3FvV+KtZFRXWZ/N+Nd4Dk0jXs77CdsMhAiEmRW5LF/qMCnOWVQ BWqOQ26WA4bM2ggHJjf8IrT7VAMGAKOqfsikONPLSqMXBlA8Y/5XxPXGIE1Sp9KInmM/ oKrAJMWnPaOj5DNm274Z0pFgUsa+G06EqmHN+Kbka+1uWhGmnw6e/ZGdEkl+Dfdfc5R1 6PA3GzpEeycpRoDMGOO7hiRuYwpmWiycVWFMRiCDTVO+vmRbZr/JlFtLfYIpFqMknF6U JLurzD3B3qM3VK0h3YaYU6gVr2inNM3a1rit40T2MqRwdoIj9mOKw5CiC622Ct7OqfL1 dfVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 36si16705308pgw.281.2019.05.26.23.40.39; Sun, 26 May 2019 23:40:55 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726243AbfE0Gia (ORCPT + 99 others); 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.21.0