From: Michal Kubecek <mkubecek@suse.cz>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, Radim Krcmar <rkrcmar@redhat.com>,
KarimAllah Ahmed <karahmed@amazon.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND] kvm: make kvm_vcpu_(un)map dependency on CONFIG_HAS_IOMEM explicit
Date: Tue, 21 May 2019 07:53:27 +0200 [thread overview]
Message-ID: <20190521055327.GD25473@unicorn.suse.cz> (raw)
In-Reply-To: <41adfaf7-90e8-b011-2716-ea5dc464ae5a@redhat.com>
On Mon, May 20, 2019 at 07:23:43PM +0200, Paolo Bonzini wrote:
> On 20/05/19 18:44, Michal Kubecek wrote:
> > Recently introduced functions kvm_vcpu_map() and kvm_vcpu_unmap() call
> > memremap() and memunmap() which are only available if HAS_IOMEM is enabled
> > but this dependency is not explicit, so that the build fails with HAS_IOMEM
> > disabled.
> >
> > As both function are only used on x86 where HAS_IOMEM is always enabled,
> > the easiest fix seems to be to only provide them when HAS_IOMEM is enabled.
> >
> > Fixes: e45adf665a53 ("KVM: Introduce a new guest mapping API")
> > Signed-off-by: Michal Kubecek <mkubecek@suse.cz>
> > ---
>
> Thank you very much. However, it's better if only the memremap part is
> hidden behind CONFIG_HAS_IOMEM. I'll send a patch tomorrow and have it
> reach Linus at most on Wednesday.
That sounds like a better solution. As I'm not familiar with the code,
I didn't want to risk and suggested the easiest way around.
Michal
> There is actually nothing specific to CONFIG_HAS_IOMEM in them,
> basically the functionality we want is remap_pfn_range but without a
> VMA. However, it's for a niche use case where KVM guest memory is
> mmap-ed from /dev/mem and it's okay if for now that part remains
> disabled on s390.
>
> Paolo
next prev parent reply other threads:[~2019-05-21 5:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-20 16:44 [PATCH RESEND] kvm: make kvm_vcpu_(un)map dependency on CONFIG_HAS_IOMEM explicit Michal Kubecek
2019-05-20 17:23 ` Paolo Bonzini
2019-05-21 5:53 ` Michal Kubecek [this message]
2019-05-20 22:45 ` Bjorn Andersson
2019-05-21 5:51 ` Michal Kubecek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190521055327.GD25473@unicorn.suse.cz \
--to=mkubecek@suse.cz \
--cc=karahmed@amazon.de \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox