mbox series

[PULL,00/50] target/i386 translate cleanups

Message ID 20210519183050.875453-1-richard.henderson@linaro.org
Headers show
Series target/i386 translate cleanups | expand

Message

Richard Henderson May 19, 2021, 6:30 p.m. UTC
The following changes since commit c313e52e6459de2e9064767083a0c949c476e32b:

  Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging (2021-05-18 16:17:22 +0100)

are available in the Git repository at:

  https://gitlab.com/rth7680/qemu.git tags/pull-x86-20210519

for you to fetch changes up to 7fb7c42394c032eeaa419c869ff3b50491f6379d:

  target/i386: Remove user-only i/o stubs (2021-05-19 12:17:23 -0500)

----------------------------------------------------------------
Eliminate user-only helper stubs for privledged insns.

----------------------------------------------------------------
Richard Henderson (50):
      target/i386: Split out gen_exception_gpf
      target/i386: Split out check_cpl0
      target/i386: Unify code paths for IRET
      target/i386: Split out check_vm86_iopl
      target/i386: Split out check_iopl
      target/i386: Assert PE is set for user-only
      target/i386: Assert CPL is 3 for user-only
      target/i386: Assert IOPL is 0 for user-only
      target/i386: Assert !VM86 for x86_64 user-only
      target/i386: Assert CODE32 for x86_64 user-only
      target/i386: Assert SS32 for x86_64 user-only
      target/i386: Assert CODE64 for x86_64 user-only
      target/i386: Assert LMA for x86_64 user-only
      target/i386: Assert !ADDSEG for x86_64 user-only
      target/i386: Introduce REX_PREFIX
      target/i386: Tidy REX_B, REX_X definition
      target/i386: Move rex_r into DisasContext
      target/i386: Move rex_w into DisasContext
      target/i386: Remove DisasContext.f_st as unused
      target/i386: Reduce DisasContext.flags to uint32_t
      target/i386: Reduce DisasContext.override to int8_t
      target/i386: Reduce DisasContext.prefix to uint8_t
      target/i386: Reduce DisasContext.vex_[lv] to uint8_t
      target/i386: Reduce DisasContext popl_esp_hack and rip_offset to uint8_t
      target/i386: Leave TF in DisasContext.flags
      target/i386: Reduce DisasContext jmp_opt, repz_opt to bool
      target/i386: Fix the comment for repz_opt
      target/i386: Reorder DisasContext members
      target/i386: Add stub generator for helper_set_dr
      target/i386: Assert !SVME for user-only
      target/i386: Assert !GUEST for user-only
      target/i386: Implement skinit in translate.c
      target/i386: Eliminate SVM helpers for user-only
      target/i386: Mark some helpers as noreturn
      target/i386: Simplify gen_debug usage
      target/i386: Tidy svm_check_intercept from tcg
      target/i386: Remove pc_start argument to gen_svm_check_intercept
      target/i386: Remove user stub for cpu_vmexit
      target/i386: Cleanup read_crN, write_crN, lmsw
      target/i386: Pass env to do_pause and do_hlt
      target/i386: Move invlpg, hlt, monitor, mwait to sysemu
      target/i386: Unify invlpg, invlpga
      target/i386: Inline user cpu_svm_check_intercept_param
      target/i386: Eliminate user stubs for read/write_crN, rd/wrmsr
      target/i386: Exit tb after wrmsr
      target/i386: Tidy gen_check_io
      target/i386: Pass in port to gen_check_io
      target/i386: Create helper_check_io
      target/i386: Move helper_check_io to sysemu
      target/i386: Remove user-only i/o stubs

 target/i386/cpu.h                    |   8 +
 target/i386/helper.h                 |  43 +-
 target/i386/tcg/helper-tcg.h         |   5 +-
 target/i386/tcg/bpt_helper.c         |   2 +-
 target/i386/tcg/excp_helper.c        |  18 +-
 target/i386/tcg/misc_helper.c        |  79 +---
 target/i386/tcg/seg_helper.c         |  43 --
 target/i386/tcg/sysemu/misc_helper.c |  52 ++-
 target/i386/tcg/sysemu/seg_helper.c  |  29 ++
 target/i386/tcg/sysemu/svm_helper.c  |  30 +-
 target/i386/tcg/translate.c          | 883 ++++++++++++++++++-----------------
 target/i386/tcg/user/misc_stubs.c    |  75 ---
 target/i386/tcg/user/svm_stubs.c     |  76 ---
 target/i386/tcg/user/meson.build     |   2 -
 14 files changed, 592 insertions(+), 753 deletions(-)
 delete mode 100644 target/i386/tcg/user/misc_stubs.c
 delete mode 100644 target/i386/tcg/user/svm_stubs.c

Comments

no-reply@patchew.org May 19, 2021, 7:15 p.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20210519183050.875453-1-richard.henderson@linaro.org/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Type: series
Message-id: 20210519183050.875453-1-richard.henderson@linaro.org
Subject: [PULL 00/50] target/i386 translate cleanups

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20210519183050.875453-1-richard.henderson@linaro.org -> patchew/20210519183050.875453-1-richard.henderson@linaro.org
Switched to a new branch 'test'
abf6334 target/i386: Remove user-only i/o stubs
9045c95 target/i386: Move helper_check_io to sysemu
578c29d target/i386: Create helper_check_io
ed19bea target/i386: Pass in port to gen_check_io
3a9e000 target/i386: Tidy gen_check_io
f36dd73 target/i386: Exit tb after wrmsr
626dfc0 target/i386: Eliminate user stubs for read/write_crN, rd/wrmsr
ae6c1c9 target/i386: Inline user cpu_svm_check_intercept_param
ca65732 target/i386: Unify invlpg, invlpga
e2afd3e target/i386: Move invlpg, hlt, monitor, mwait to sysemu
c4e49d3 target/i386: Pass env to do_pause and do_hlt
8f74495 target/i386: Cleanup read_crN, write_crN, lmsw
c8c44f0 target/i386: Remove user stub for cpu_vmexit
11953a3 target/i386: Remove pc_start argument to gen_svm_check_intercept
bbc7a14 target/i386: Tidy svm_check_intercept from tcg
af21629 target/i386: Simplify gen_debug usage
160f12f target/i386: Mark some helpers as noreturn
f7bab6d target/i386: Eliminate SVM helpers for user-only
d39bd9a target/i386: Implement skinit in translate.c
1745634 target/i386: Assert !GUEST for user-only
c03c32a target/i386: Assert !SVME for user-only
95a1f38 target/i386: Add stub generator for helper_set_dr
8b1e45d target/i386: Reorder DisasContext members
1c9f72d target/i386: Fix the comment for repz_opt
abbf72b target/i386: Reduce DisasContext jmp_opt, repz_opt to bool
1910135 target/i386: Leave TF in DisasContext.flags
1065bb3 target/i386: Reduce DisasContext popl_esp_hack and rip_offset to uint8_t
87dca6f target/i386: Reduce DisasContext.vex_[lv] to uint8_t
5493abc target/i386: Reduce DisasContext.prefix to uint8_t
55de5ed target/i386: Reduce DisasContext.override to int8_t
4bbf71d target/i386: Reduce DisasContext.flags to uint32_t
4ef214d target/i386: Remove DisasContext.f_st as unused
f5601c2 target/i386: Move rex_w into DisasContext
36c8ee7 target/i386: Move rex_r into DisasContext
7ae1ad1 target/i386: Tidy REX_B, REX_X definition
a4685a0 target/i386: Introduce REX_PREFIX
0c41c1a target/i386: Assert !ADDSEG for x86_64 user-only
3a881f9 target/i386: Assert LMA for x86_64 user-only
e3c8501 target/i386: Assert CODE64 for x86_64 user-only
26aade5 target/i386: Assert SS32 for x86_64 user-only
eab31ff target/i386: Assert CODE32 for x86_64 user-only
b0830d2 target/i386: Assert !VM86 for x86_64 user-only
80074f9 target/i386: Assert IOPL is 0 for user-only
b947f60 target/i386: Assert CPL is 3 for user-only
ed63707 target/i386: Assert PE is set for user-only
11ab4fe target/i386: Split out check_iopl
64fee2f target/i386: Split out check_vm86_iopl
cdf45b3 target/i386: Unify code paths for IRET
5214245 target/i386: Split out check_cpl0
73ea276 target/i386: Split out gen_exception_gpf

=== OUTPUT BEGIN ===
1/50 Checking commit 73ea27618b04 (target/i386: Split out gen_exception_gpf)
2/50 Checking commit 521424569b57 (target/i386: Split out check_cpl0)
3/50 Checking commit cdf45b3a47d4 (target/i386: Unify code paths for IRET)
4/50 Checking commit 64fee2f669f4 (target/i386: Split out check_vm86_iopl)
5/50 Checking commit 11ab4fe1f9d7 (target/i386: Split out check_iopl)
6/50 Checking commit ed63707b4a2a (target/i386: Assert PE is set for user-only)
ERROR: braces {} are necessary for all arms of this statement
#130: FILE: target/i386/tcg/translate.c:7310:
+            if (!PE(s) || s->vm86)
[...]

ERROR: braces {} are necessary for all arms of this statement
#148: FILE: target/i386/tcg/translate.c:7329:
+            if (!PE(s) || s->vm86)
[...]

ERROR: braces {} are necessary for all arms of this statement
#166: FILE: target/i386/tcg/translate.c:7349:
+            if (!PE(s) || s->vm86)
[...]

ERROR: braces {} are necessary for all arms of this statement
#238: FILE: target/i386/tcg/translate.c:7720:
+            if (!PE(s) || s->vm86)
[...]

ERROR: braces {} are necessary for all arms of this statement
#247: FILE: target/i386/tcg/translate.c:7768:
+            if (!PE(s) || s->vm86)
[...]

total: 5 errors, 0 warnings, 244 lines checked

Patch 6/50 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

7/50 Checking commit b947f600e4de (target/i386: Assert CPL is 3 for user-only)
8/50 Checking commit 80074f926033 (target/i386: Assert IOPL is 0 for user-only)
9/50 Checking commit b0830d2e9af8 (target/i386: Assert !VM86 for x86_64 user-only)
ERROR: braces {} are necessary for all arms of this statement
#132: FILE: target/i386/tcg/translate.c:7322:
+            if (!PE(s) || VM86(s))
[...]

ERROR: braces {} are necessary for all arms of this statement
#150: FILE: target/i386/tcg/translate.c:7341:
+            if (!PE(s) || VM86(s))
[...]

ERROR: braces {} are necessary for all arms of this statement
#168: FILE: target/i386/tcg/translate.c:7361:
+            if (!PE(s) || VM86(s))
[...]

ERROR: braces {} are necessary for all arms of this statement
#177: FILE: target/i386/tcg/translate.c:7732:
+            if (!PE(s) || VM86(s))
[...]

ERROR: braces {} are necessary for all arms of this statement
#186: FILE: target/i386/tcg/translate.c:7780:
+            if (!PE(s) || VM86(s))
[...]

total: 5 errors, 0 warnings, 159 lines checked

Patch 9/50 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

10/50 Checking commit eab31ff36987 (target/i386: Assert CODE32 for x86_64 user-only)
11/50 Checking commit 26aade524ee6 (target/i386: Assert SS32 for x86_64 user-only)
12/50 Checking commit e3c8501720b1 (target/i386: Assert CODE64 for x86_64 user-only)
13/50 Checking commit 3a881f973efd (target/i386: Assert LMA for x86_64 user-only)
14/50 Checking commit 0c41c1a4f71a (target/i386: Assert !ADDSEG for x86_64 user-only)
15/50 Checking commit a4685a0df8c6 (target/i386: Introduce REX_PREFIX)
16/50 Checking commit 7ae1ad1b884a (target/i386: Tidy REX_B, REX_X definition)
17/50 Checking commit 36c8ee7bff80 (target/i386: Move rex_r into DisasContext)
18/50 Checking commit f5601c25c1ff (target/i386: Move rex_w into DisasContext)
19/50 Checking commit 4ef214d9d728 (target/i386: Remove DisasContext.f_st as unused)
20/50 Checking commit 4bbf71dc30f3 (target/i386: Reduce DisasContext.flags to uint32_t)
21/50 Checking commit 55de5ed701c0 (target/i386: Reduce DisasContext.override to int8_t)
22/50 Checking commit 5493abc9b739 (target/i386: Reduce DisasContext.prefix to uint8_t)
23/50 Checking commit 87dca6f2ed3a (target/i386: Reduce DisasContext.vex_[lv] to uint8_t)
24/50 Checking commit 1065bb36c788 (target/i386: Reduce DisasContext popl_esp_hack and rip_offset to uint8_t)
25/50 Checking commit 1910135c4220 (target/i386: Leave TF in DisasContext.flags)
26/50 Checking commit abbf72bea738 (target/i386: Reduce DisasContext jmp_opt, repz_opt to bool)
27/50 Checking commit 1c9f72d49afe (target/i386: Fix the comment for repz_opt)
28/50 Checking commit 8b1e45d1b248 (target/i386: Reorder DisasContext members)
29/50 Checking commit 95a1f3800743 (target/i386: Add stub generator for helper_set_dr)
30/50 Checking commit c03c32a5601e (target/i386: Assert !SVME for user-only)
31/50 Checking commit 17456341c62b (target/i386: Assert !GUEST for user-only)
32/50 Checking commit d39bd9a91587 (target/i386: Implement skinit in translate.c)
33/50 Checking commit f7bab6d8d04b (target/i386: Eliminate SVM helpers for user-only)
34/50 Checking commit 160f12f94b62 (target/i386: Mark some helpers as noreturn)
35/50 Checking commit af21629c77e3 (target/i386: Simplify gen_debug usage)
36/50 Checking commit bbc7a149f3ac (target/i386: Tidy svm_check_intercept from tcg)
37/50 Checking commit 11953a37a9e2 (target/i386: Remove pc_start argument to gen_svm_check_intercept)
WARNING: line over 80 characters
#180: FILE: target/i386/tcg/translate.c:7718:
+            gen_svm_check_intercept(s, (b & 2) ? SVM_EXIT_INVD : SVM_EXIT_WBINVD);

total: 0 errors, 1 warnings, 176 lines checked

Patch 37/50 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
38/50 Checking commit c8c44f0db374 (target/i386: Remove user stub for cpu_vmexit)
39/50 Checking commit 8f74495241e3 (target/i386: Cleanup read_crN, write_crN, lmsw)
40/50 Checking commit c4e49d3262ef (target/i386: Pass env to do_pause and do_hlt)
41/50 Checking commit e2afd3eb2b21 (target/i386: Move invlpg, hlt, monitor, mwait to sysemu)
42/50 Checking commit ca657321b751 (target/i386: Unify invlpg, invlpga)
43/50 Checking commit ae6c1c9943fa (target/i386: Inline user cpu_svm_check_intercept_param)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#53: 
deleted file mode 100644

total: 0 errors, 1 warnings, 22 lines checked

Patch 43/50 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
44/50 Checking commit 626dfc0fe042 (target/i386: Eliminate user stubs for read/write_crN, rd/wrmsr)
45/50 Checking commit f36dd73dbcfc (target/i386: Exit tb after wrmsr)
46/50 Checking commit 3a9e000e33db (target/i386: Tidy gen_check_io)
47/50 Checking commit ed19beacc000 (target/i386: Pass in port to gen_check_io)
48/50 Checking commit 578c29d7aede (target/i386: Create helper_check_io)
49/50 Checking commit 9045c95dffdb (target/i386: Move helper_check_io to sysemu)
50/50 Checking commit abf6334a2d63 (target/i386: Remove user-only i/o stubs)
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#72: 
deleted file mode 100644

total: 0 errors, 1 warnings, 34 lines checked

Patch 50/50 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20210519183050.875453-1-richard.henderson@linaro.org/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
Peter Maydell May 20, 2021, 1:19 p.m. UTC | #2
On Wed, 19 May 2021 at 19:30, Richard Henderson
<richard.henderson@linaro.org> wrote:
>

> The following changes since commit c313e52e6459de2e9064767083a0c949c476e32b:

>

>   Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging (2021-05-18 16:17:22 +0100)

>

> are available in the Git repository at:

>

>   https://gitlab.com/rth7680/qemu.git tags/pull-x86-20210519

>

> for you to fetch changes up to 7fb7c42394c032eeaa419c869ff3b50491f6379d:

>

>   target/i386: Remove user-only i/o stubs (2021-05-19 12:17:23 -0500)

>

> ----------------------------------------------------------------

> Eliminate user-only helper stubs for privledged insns.

>

> ----------------------------------------------------------------



Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/6.1
for any user-visible changes.

-- PMM