Skip to content

x86/emul: Use struct cpuid_policy for feature checks

Andrew Cooper xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6tools: Move the typesafe min/max helpers into xen-tools/libs.htools/include/xen-tools/libs.h tools/libxc/xc_private.h tools/libxl/libxl_internal.h+38 -321 reply
2/6libx86: Split x86_cpuid_policy_fill_native() out of calculate_raw_policy()xen/arch/x86/cpuid.c xen/include/asm-x86/processor.h xen/include/xen/lib/x86/cpuid.h +1 more+127 -1103 replies
2/6libx86: Split x86_cpuid_policy_fill_native() out of calculate_raw_policy()+0 -01 reply
3/6tools/x86emul: Use struct cpuid_policy in the userspace test harnessestools/fuzz/x86_instruction_emulator/Makefile tools/tests/x86_emulator/Makefile tools/tests/x86_emulator/x86-emulate.c +1 more+58 -1871 reply
4/6x86/emul: Pass a full cpuid_policy into x86_emulate()tools/fuzz/x86_instruction_emulator/fuzz-emul.c tools/tests/x86_emulator/test_x86_emulator.c xen/arch/x86/hvm/emulate.c +5 more+12 -101 reply
5/6x86/emul: Don't use the ->cpuid() hook for feature checksxen/arch/x86/x86_emulate/x86_emulate.c+52 -881 reply
6/6x86/emul: dedup hvmemul_cpuid() and pv_emul_cpuid()xen/arch/x86/hvm/emulate.c xen/arch/x86/mm/shadow/hvm.c xen/arch/x86/pv/emul-priv-op.c +5 more+13 -289 replies

Reviews trailers per patch

6 of 7 patches have a Reviewed-by or Acked-by.

PatchWei LiuJan BeulichRoger Pau Monné
1/6A-b
2/6A-b R-b
2/6A-b R-b
3/6A-b
4/6R-b
5/6R-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/6] x86/emul: Use struct cpuid_policy for feature checks

Prompted by Jan's "x86emul: consolidate CR4 handling", I've cleaned up this series and posted it. The end purpose is the substantial reduction in compiled volume of x86_emulate().

Andrew Cooper (6):
tools: Move the typesafe min/max helpers into xen-tools/libs.h
libx86: Split x86_cpuid_policy_fill_native() out of calculate_raw_policy() tools/x86emul: Use struct cpuid_policy in the userspace test harnesses x86/emul: Pass a full cpuid_policy into x86_emulate() x86/emul: Don't use the ->cpuid() hook for feature checks x86/emul: dedup hvmemul_cpuid() and pv_emul_cpuid()

 tools/fuzz/x86_instruction_emulator/Makefile    |   9 +-
 tools/fuzz/x86_instruction_emulator/fuzz-emul.c |   1 +
 tools/include/xen-tools/libs.h                  |  38 +++++
 tools/libxc/xc_private.h                        |  16 --
 tools/libxl/libxl_internal.h                    |  16 --
 tools/tests/x86_emulator/Makefile               |   7 +-
 tools/tests/x86_emulator/test_x86_emulator.c    |   2 +-
 tools/tests/x86_emulator/x86-emulate.c          |  12 ++
 tools/tests/x86_emulator/x86-emulate.h          | 217 ++++--------------------
 xen/arch/x86/cpuid.c                            | 105 +-----------
 xen/arch/x86/hvm/emulate.c                      |  15 +-
 xen/arch/x86/mm/shadow/common.c                 |   2 +-
 xen/arch/x86/mm/shadow/hvm.c                    |   1 -
 xen/arch/x86/pv/emul-priv-op.c                  |  12 +-
 xen/arch/x86/pv/ro-page-fault.c                 |   5 +-
 xen/arch/x86/x86_emulate.c                      |   8 +
 xen/arch/x86/x86_emulate/x86_emulate.c          | 147 ++++++----------
 xen/arch/x86/x86_emulate/x86_emulate.h          |   6 +-
 xen/include/asm-x86/hvm/emulate.h               |   2 -
 xen/include/asm-x86/mm.h                        |   2 -
 xen/include/asm-x86/processor.h                 |   6 -
 xen/include/xen/lib/x86/cpuid.h                 |  18 ++
 xen/lib/x86/cpuid.c                             | 108 ++++++++++++
 23 files changed, 300 insertions(+), 455 deletions(-)
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel