Skip to content

target/i386: Restrict system-specific features from user emulation

Philippe Mathieu-Daudé kvm qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest6 patches 3 repliesIn review
  2. v43 patches 6 repliesSuperseded
  3. v31 patch 2 repliesSuperseded

Changes in v5 from the cover letter

- Addressed Paolo's suggestions (clearly better)

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6target/i386: Check kvm_hyperv_expand_features() return valuetarget/i386/cpu.c+2 -20 replies
2/6target/i386: Drop accel_uses_host_cpuid before x86_cpu_get_supported_cpuidtarget/i386/cpu.c+4 -60 replies
3/6target/i386: Call accel-agnostic x86_cpu_get_supported_cpuid()target/i386/cpu.c+16 -162 replies
4/6target/i386: Move x86_cpu_get_migratable_flags() aroundtarget/i386/cpu.c+23 -230 replies
5/6target/i386: Restrict system-specific code from user emulationtarget/i386/cpu.c+38 -30 replies
6/6target/i386: Prohibit target specific KVM prototypes on user emulationtarget/i386/cpu.c target/i386/kvm/kvm_i386.h+6 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH v5 0/6] target/i386: Restrict system-specific features from user emulation

Since v4:
- Addressed Paolo's suggestions (clearly better)

Too many system-specific code (and in particular KVM related) is pulled in user-only build. This led to adding unjustified stubs as kludge to unagressive linker non-optimizations.

This series restrict x86 system-specific features to sysemu, so we don't require any stub, and remove all x86 KVM declarations from user emulation code (to trigger compile failure instead of link one).

Philippe Mathieu-Daudé (6):
target/i386: Check kvm_hyperv_expand_features() return value target/i386: Drop accel_uses_host_cpuid before
x86_cpu_get_supported_cpuid
target/i386: Call accel-agnostic x86_cpu_get_supported_cpuid() target/i386: Move x86_cpu_get_migratable_flags() around RFC target/i386: Restrict system-specific code from user emulation target/i386: Prohibit target specific KVM prototypes on user emulation

 target/i386/kvm/kvm_i386.h |   4 ++
 target/i386/cpu.c          | 134 +++++++++++++++++++++++--------------
 2 files changed, 88 insertions(+), 50 deletions(-)
Signature · 1 line
2.41.0