Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp904450ybi; Fri, 24 May 2019 13:27:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqwy3ZzY9uvolcale5eWf+HjUcAxWs4jsdeNLPCIayjuifdA5VVmzjfXCeoyNTqq2DXC6p3k X-Received: by 2002:a17:90a:cb89:: with SMTP id a9mr11854535pju.67.1558729644795; Fri, 24 May 2019 13:27:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558729644; cv=none; d=google.com; s=arc-20160816; b=rddAMwBor9Vz3GZWHW33oR6iKF7oJh1KpYQ4CxhK+EP7m8+osepBwoawmxvGq76Bx7 thYBVq0/+cyVJpl4fjUClj4Qv+Y3i4zrVNcBG9HxoKV6scTiJ4/ftDKDmShK8XG13RPf H13qI+nnVS7AfS/Jo7b4wQ+DUNLwOTf/oJhIEyka1728vO5njvcjIdH1nyeIqzw8zs/5 99mHMO6ItDQeqKpIFhLdnKozNoLvSCs0lSuydNuMMHQV/7iAc4+OZ1VxIKzESY8XDakx n9y3e1+K02mBlnVFCAjImNKcVKWb8AVbD44UzfQYDG0U2M63ZbkAM+pUYgAimmQy/yq0 zD7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=o2m8lBhiOUZQRcGj4WE6O84cqGq0Sh7+T4PdSNTo3jI=; b=pbXYKy+rCrRMVtFQQhbwohnG9+h4jI3XH+RSVfjK7VG5z6SmrPeDrVkotWwFJBhyJT UriwGHpMRaF+Ih7dA1qESTAqPxwlNgzYrZFttdOwtd7XlcaxtufzCnAJ18AlOsQDJSxG gjI+3TQ0H9k1rCnXE/eHYnIbGF+D5BIItSiyJB5xmw2/Ijue031wz6KvsUFHTCjmXtpj PeslKIrBi2sEWZD7WTtjqYvZcMCFJvsog9sZkEMhv9sRuiB0hleJ3QYulR3D7Y8bYO4v qLAPK3mxBXUKa3AVprpqvP0pBHozNOQcuSbI9jn1oOB6bq2PtVyGI37An5mRfpjUeoBd dSqg== 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 f17si6311986pfq.237.2019.05.24.13.27.09; Fri, 24 May 2019 13:27:24 -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 S2404199AbfEXUYk (ORCPT + 99 others); Fri, 24 May 2019 16:24:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:45278 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2403762AbfEXUYk (ORCPT ); Fri, 24 May 2019 16:24:40 -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 DD832AD47; Fri, 24 May 2019 20:24:38 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 7C4A6E00A9; Fri, 24 May 2019 22:24:38 +0200 (CEST) Date: Fri, 24 May 2019 22:24:38 +0200 From: Michal Kubecek To: Paolo Bonzini Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org Subject: Re: [PATCH] kvm: fix compilation on s390 Message-ID: <20190524202438.GE30439@unicorn.suse.cz> References: <1558725957-22998-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1558725957-22998-1-git-send-email-pbonzini@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 24, 2019 at 09:25:57PM +0200, Paolo Bonzini wrote: > s390 does not have memremap, even though in this particular case it > would be useful. This is not completely true: memremap() is built when HAS_IOMEM is defined which on s390 depends on CONFIG_PCI. So for "normal" configs HAS_IOMEM would be enabled and memremap() would be available. We only encountered the build error with a special minimal config for zfcpdump. > Signed-off-by: Paolo Bonzini > --- > 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 1fadfb9cf36e..134ec0283a8a 100644 > --- a/virt/kvm/kvm_main.c > +++ b/virt/kvm/kvm_main.c > @@ -1761,8 +1761,10 @@ static int __kvm_map_gfn(struct kvm_memory_slot *slot, gfn_t gfn, > if (pfn_valid(pfn)) { > page = pfn_to_page(pfn); > hva = kmap(page); > +#ifdef CONFIG_HAS_IOMEM > } else { > hva = memremap(pfn_to_hpa(pfn), PAGE_SIZE, MEMREMAP_WB); > +#endif > } > > if (!hva) > -- > 1.8.3.1 I would have to run a test build to be sure but IMHO you will also need to handle the memunmap() call in kvm_vcpu_unmap(). Michal Kubecek