From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, kvm <kvm@vger.kernel.org>,
"Daniel Henrique Barboza" <dbarboza@ventanamicro.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Michael Tokarev" <mjt@tls.msk.ru>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Marcelo Tosatti" <mtosatti@redhat.com>,
"Daniel P . Berrangé" <berrange@redhat.com>
Subject: Re: [PATCH v4 0/3] target/i386: Restrict system-specific features from user emulation
Date: Wed, 13 Sep 2023 11:26:23 +0200 [thread overview]
Message-ID: <6cee629b-c1f6-7466-7881-4cc5296f497d@linaro.org> (raw)
In-Reply-To: <CABgObfaz+Tdb6YzwbAeRH=zdXtzVK7VLFv2Lc-MxQMAxbhwnfg@mail.gmail.com>
On 12/9/23 19:25, Paolo Bonzini wrote:
> > However, the dependency of user-mode emulation on KVM is really an
> > implementation detail of QEMU. It's very much baked into
> linux-user and
> > hard to remove, but I'm not sure it's a good idea to add more #ifdef
> > CONFIG_USER_ONLY around KVM code.
>
> Do you rather v3 then?
>
> https://lore.kernel.org/qemu-devel/20230911142729.25548-1-philmd@linaro.org/ <https://lore.kernel.org/qemu-devel/20230911142729.25548-1-philmd@linaro.org/>
>
>
> No, if we want a small patch it is better to replace kvm_enabled() with
> CONFIG_KVM, and also follow Kevin's suggestion to make it fail at
> compile time.
For target common code (shared between user/system), CONFIG_KVM is not
a replacement for !CONFIG_USER_ONLY, since it can be always enabled;
which is why we defer to runtime check with kvm_enabled().
> Having stub prototypes was done because we expected the compiler to
> remove the dead code.
>
> Paolo
prev parent reply other threads:[~2023-09-13 9:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-11 21:13 [PATCH v4 0/3] target/i386: Restrict system-specific features from user emulation Philippe Mathieu-Daudé
2023-09-11 21:13 ` [PATCH v4 1/3] target/i386: Check kvm_hyperv_expand_features() return value Philippe Mathieu-Daudé
2023-09-11 21:13 ` [RFC PATCH v4 2/3] target/i386: Restrict system-specific features from user emulation Philippe Mathieu-Daudé
2023-09-12 14:05 ` Paolo Bonzini
2023-09-13 9:02 ` Philippe Mathieu-Daudé
2023-09-11 21:13 ` [PATCH v4 3/3] target/i386: Prohibit target specific KVM prototypes on " Philippe Mathieu-Daudé
2023-09-12 14:07 ` [PATCH v4 0/3] target/i386: Restrict system-specific features from " Paolo Bonzini
2023-09-12 16:44 ` Philippe Mathieu-Daudé
2023-09-12 17:25 ` Paolo Bonzini
2023-09-13 9:26 ` Philippe Mathieu-Daudé [this message]
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=6cee629b-c1f6-7466-7881-4cc5296f497d@linaro.org \
--to=philmd@linaro.org \
--cc=berrange@redhat.com \
--cc=dbarboza@ventanamicro.com \
--cc=kvm@vger.kernel.org \
--cc=mjt@tls.msk.ru \
--cc=mtosatti@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@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;
as well as URLs for NNTP newsgroup(s).