s390x and misc patches
The following changes since commit 1e62a82574fc28e64deca589a23cf55ada2e1a7d:
Merge tag 'm68k-for-7.1-pull-request' of https://github.com/vivier/qemu-m68k into staging (2022-06-02 06:30:24 -0700)
are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2022-06-03
for you to fetch changes up to 707d93d4abc6485c638e2aecd93fbd904f2f6b3e:
ui: Remove deprecated options "-sdl" and "-curses" (2022-06-03 08:03:28 +0200)
----------------------------------------------------------------
* s390x storage key improvements for KVM
* Some cosmetics for s390x
* Update MAINTAINERS entries
* Improve some spots wrt memory handling in the qtests
* Clean up the "-display sdl" parameter parsing
----------------------------------------------------------------
Alex Bennée (1):
tests/qtest: use g_autofree for test_server_create_chr
Dr. David Alan Gilbert (1):
s390: Typo fix FLOATING_POINT_SUPPPORT_ENH
Eric Farman (1):
MAINTAINERS: Update s390 vhost entries
Gautam Agrawal (1):
tests/tcg: Test overflow conditions
Hailiang Zhang (1):
MAINTAINERS: Change my email address
Janis Schoetterl-Glausch (1):
target/s390x: kvm: Honor storage keys during emulation
Miaoqian Lin (1):
qtest/npcm7xx_pwm-test: Fix memory leak in mft_qom_set
Thomas Huth (4):
hw/s390x/s390-virtio-ccw: Improve the machine description string
ui: Remove deprecated parameters of the "-display sdl" option
ui: Switch "-display sdl" to use the QAPI parser
ui: Remove deprecated options "-sdl" and "-curses"
Wenchao Wang (1):
MAINTAINERS: Update maintainers for Guest x86 HAXM CPUs
docs/about/deprecated.rst | 26 -------- docs/about/removed-features.rst | 27 ++++++++ qapi/ui.json | 26 +++++++- include/sysemu/sysemu.h | 2 - target/s390x/cpu_features_def.h.inc | 2 +- hw/s390x/s390-virtio-ccw.c | 2 +- softmmu/globals.c | 2 - softmmu/vl.c | 128 +----------------------------------- target/s390x/gen-features.c | 6 +- target/s390x/kvm/kvm.c | 9 +++ target/s390x/tcg/translate.c | 8 +-- tests/qtest/npcm7xx_pwm-test.c | 3 + tests/qtest/vhost-user-test.c | 7 +- tests/tcg/multiarch/overflow.c | 58 ++++++++++++++++ ui/sdl2.c | 10 +++ MAINTAINERS | 6 +- qemu-options.hx | 56 ++-------------- 17 files changed, 151 insertions(+), 227 deletions(-) create mode 100644 tests/tcg/multiarch/overflow.c
[PULL 01/12] s390: Typo fix FLOATING_POINT_SUPPPORT_ENH
From: "Dr. David Alan Gilbert" <[email protected]>
One less P needed.
Message-Id: <[email protected]>
--- target/s390x/cpu_features_def.h.inc | 2 +- target/s390x/gen-features.c | 6 +++--- target/s390x/tcg/translate.c | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-)
target/s390x/cpu_features_def.h.inc +1 -1
@@ -58,7 +58,7 @@ DEF_FEAT(ENHANCED_MONITOR, "emon", STFL, 36, "Enhanced-monitor facility") DEF_FEAT(FLOATING_POINT_EXT, "fpe", STFL, 37, "Floating-point extension facility") DEF_FEAT(ORDER_PRESERVING_COMPRESSION, "opc", STFL, 38, "Order Preserving Compression facility") DEF_FEAT(SET_PROGRAM_PARAMETERS, "sprogp", STFL, 40, "Set-program-parameters facility") -DEF_FEAT(FLOATING_POINT_SUPPPORT_ENH, "fpseh", STFL, 41, "Floating-point-support-enhancement facilities") +DEF_FEAT(FLOATING_POINT_SUPPORT_ENH, "fpseh", STFL, 41, "Floating-point-support-enhancement facilities") DEF_FEAT(DFP, "dfp", STFL, 42, "DFP (decimal-floating-point) facility") DEF_FEAT(DFP_FAST, "dfphp", STFL, 43, "DFP (decimal-floating-point) facility has high performance") DEF_FEAT(PFPO, "pfpo", STFL, 44, "PFPO instruction")
target/s390x/gen-features.c +3 -3
@@ -374,7 +374,7 @@ static uint16_t base_GEN10_GA1[] = {S390_FEAT_COMPARE_AND_SWAP_AND_STORE_2 ,S390_FEAT_GENERAL_INSTRUCTIONS_EXT ,S390_FEAT_EXECUTE_EXT , -S390_FEAT_FLOATING_POINT_SUPPPORT_ENH , +S390_FEAT_FLOATING_POINT_SUPPORT_ENH ,S390_FEAT_DFP ,S390_FEAT_DFP_FAST , S390_FEAT_PFPO,
@@ -476,7 +476,7 @@ static uint16_t full_GEN9_GA2[] = {S390_FEAT_MOVE_WITH_OPTIONAL_SPEC ,S390_FEAT_EXTRACT_CPU_TIME ,S390_FEAT_COMPARE_AND_SWAP_AND_STORE , -S390_FEAT_FLOATING_POINT_SUPPPORT_ENH , +S390_FEAT_FLOATING_POINT_SUPPORT_ENH , S390_FEAT_DFP, };
@@ -700,7 +700,7 @@ static uint16_t qemu_V3_1[] = {S390_FEAT_GENERAL_INSTRUCTIONS_EXT ,S390_FEAT_EXECUTE_EXT ,S390_FEAT_SET_PROGRAM_PARAMETERS , -S390_FEAT_FLOATING_POINT_SUPPPORT_ENH , +S390_FEAT_FLOATING_POINT_SUPPORT_ENH ,S390_FEAT_STFLE_45 ,S390_FEAT_STFLE_49 , S390_FEAT_LOCAL_TLB_CLEARING,
target/s390x/tcg/translate.c +4 -4
@@ -6185,17 +6185,17 @@ enum DisasInsnEnum {#define FAC_Z S390_FEAT_ZARCH#define FAC_CASS S390_FEAT_COMPARE_AND_SWAP_AND_STORE#define FAC_DFP S390_FEAT_DFP -#define FAC_DFPR S390_FEAT_FLOATING_POINT_SUPPPORT_ENH/* DFP-rounding */ +#define FAC_DFPR S390_FEAT_FLOATING_POINT_SUPPORT_ENH/* DFP-rounding */ #define FAC_DO S390_FEAT_STFLE_45/* distinct-operands */ #define FAC_EE S390_FEAT_EXECUTE_EXT#define FAC_EI S390_FEAT_EXTENDED_IMMEDIATE#define FAC_FPE S390_FEAT_FLOATING_POINT_EXT -#define FAC_FPSSH S390_FEAT_FLOATING_POINT_SUPPPORT_ENH/* FPS-sign-handling */ -#define FAC_FPRGR S390_FEAT_FLOATING_POINT_SUPPPORT_ENH/* FPR-GR-transfer */ +#define FAC_FPSSH S390_FEAT_FLOATING_POINT_SUPPORT_ENH/* FPS-sign-handling */ +#define FAC_FPRGR S390_FEAT_FLOATING_POINT_SUPPORT_ENH/* FPR-GR-transfer */ #define FAC_GIE S390_FEAT_GENERAL_INSTRUCTIONS_EXT#define FAC_HFP_MA S390_FEAT_HFP_MADDSUB#define FAC_HW S390_FEAT_STFLE_45/* high-word */ -#define FAC_IEEEE_SIM S390_FEAT_FLOATING_POINT_SUPPPORT_ENH/* IEEE-exception-simulation */ +#define FAC_IEEEE_SIM S390_FEAT_FLOATING_POINT_SUPPORT_ENH/* IEEE-exception-simulation */ #define FAC_MIE S390_FEAT_STFLE_49/* misc-instruction-extensions */ #define FAC_LAT S390_FEAT_STFLE_49/* load-and-trap */ #define FAC_LOC S390_FEAT_STFLE_45/* load/store on condition 1 */
Signature · 1 line
2.31.1
[PULL 09/12] tests/qtest: use g_autofree for test_server_create_chr
In reply to Thomas HuthFrom: Alex Bennée <[email protected]>
Message-Id: <[email protected]>
--- tests/qtest/vhost-user-test.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
tests/qtest/vhost-user-test.c +3 -4
@@ -524,14 +524,13 @@ static void chr_event(void *opaque, QEMUChrEvent event)static void test_server_create_chr (TestServer *server,const gchar *opt) { -gchar *chr_path; + g_autofree gchar *chr_path = g_strdup_printf("unix:%s%s", + server->socket_path, opt);Chardev *chr; - chr_path =g_strdup_printf ("unix:%s%s" , server->socket_path, opt); chr =qemu_chr_new (server->chr_name, chr_path, server->context); -g_free (chr_path); +g_assert (chr); -g_assert_nonnull (chr);qemu_chr_fe_init (&server->chr, chr, &error_abort);qemu_chr_fe_set_handlers (&server->chr, chr_can_read, chr_read, chr_event,NULL , server, server->context, true);
Signature · 1 line
2.31.1
[PULL 05/12] tests/tcg: Test overflow conditions
In reply to Thomas HuthFrom: Gautam Agrawal <[email protected]>
Add a test to check for overflow conditions in s390x. This patch is based on the following patches :
* https://git.qemu.org/?p=qemu.git;a=commitdiff;h=5a2e67a691501
* https://git.qemu.org/?p=qemu.git;a=commitdiff;h=fc6e0d0f2db51
Message-Id: <[email protected]>
--- tests/tcg/multiarch/overflow.c | 58 ++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 tests/tcg/multiarch/overflow.c
tests/tcg/multiarch/overflow.c new file +58 -0
@@ -0,0 +1,58 @@ +#include <stdio.h> + +int overflow_add_32 (int x,int y) +{ +int res; +return __builtin_add_overflow (x, y, &res); +} + +int overflow_add_64 (long long x,long long y) +{ +long long res; +return __builtin_add_overflow (x, y, &res); +} + +int overflow_sub_32 (int x,int y) +{ +int res; +return __builtin_sub_overflow (x, y, &res); +} + +int overflow_sub_64 (long long x,long long y) +{ +long long res; +return __builtin_sub_overflow (x, y, &res); +} + +int a1_add =-2147483648 ; +int b1_add =-2147483648 ; +long long a2_add =-9223372036854775808ULL ; +long long b2_add =-9223372036854775808ULL ; + +int a1_sub; +int b1_sub =-2147483648 ; +long long a2_sub =0L ; +long long b2_sub =-9223372036854775808ULL ; + +int main () +{ +int ret =0 ; + +if (!overflow_add_32 (a1_add, b1_add)) { +fprintf (stderr,"data overflow while adding 32 bits\n" ); + ret =1 ; + } +if (!overflow_add_64 (a2_add, b2_add)) { +fprintf (stderr,"data overflow while adding 64 bits\n" ); + ret =1 ; + } +if (!overflow_sub_32 (a1_sub, b1_sub)) { +fprintf (stderr,"data overflow while subtracting 32 bits\n" ); + ret =1 ; + } +if (!overflow_sub_64 (a2_sub, b2_sub)) { +fprintf (stderr,"data overflow while subtracting 64 bits\n" ); + ret =1 ; + } +return ret; +}
Signature · 1 line
2.31.1
[PULL 03/12] target/s390x: kvm: Honor storage keys during emulation
In reply to Thomas HuthFrom: Janis Schoetterl-Glausch <[email protected]>
Storage key controlled protection is currently not honored when emulating instructions.
If available, enable key protection for the MEM_OP ioctl, thereby enabling it for the s390_cpu_virt_mem_* functions, when using kvm. As a result, the emulation of the following instructions honors storage keys:
* CLP
The Synch I/O CLP command would need special handling in order to support storage keys, but is currently not supported.
* CHSC
Performing commands asynchronously would require special handling, but commands are currently always synchronous.
* STSI
* TSCH
Must (and does) not change channel if terminated due to protection.
* MSCH
Suppressed on protection, works because fetching instruction.
* SSCH
Suppressed on protection, works because fetching instruction.
* STSCH
* STCRW
Suppressed on protection, this works because no partial store is possible, because the operand cannot span multiple pages.
* PCISTB
* MPCIFC
* STPCIFC
Message-Id: <[email protected]>
--- target/s390x/kvm/kvm.c | 9 +++++++++ 1 file changed, 9 insertions(+)
target/s390x/kvm/kvm.c +9 -0
@@ -151,12 +151,15 @@ const KVMCapabilityInfo kvm_arch_required_capabilities[] = {static int cap_sync_regs;static int cap_async_pf;static int cap_mem_op; +static int cap_mem_op_extension;static int cap_s390_irq;static int cap_ri;static int cap_hpage_1m;static int cap_vcpu_resets;static int cap_protected; +static bool mem_op_storage_key_support; +static int active_cmma;static int kvm_s390_query_mem_limit (uint64_t *memory_limit)
@@ -354,6 +357,8 @@ int kvm_arch_init(MachineState *ms, KVMState *s) cap_sync_regs =kvm_check_extension (s,KVM_CAP_SYNC_REGS ); cap_async_pf =kvm_check_extension (s,KVM_CAP_ASYNC_PF ); cap_mem_op =kvm_check_extension (s,KVM_CAP_S390_MEM_OP ); + cap_mem_op_extension =kvm_check_extension (s,KVM_CAP_S390_MEM_OP_EXTENSION ); + mem_op_storage_key_support = cap_mem_op_extension >0 ; cap_s390_irq =kvm_check_extension (s,KVM_CAP_S390_INJECT_IRQ ); cap_vcpu_resets =kvm_check_extension (s,KVM_CAP_S390_VCPU_RESETS ); cap_protected =kvm_check_extension (s,KVM_CAP_S390_PROTECTED );
@@ -842,6 +847,7 @@ int kvm_s390_mem_op(S390CPU *cpu, vaddr addr, uint8_t ar, void *hostbuf, : KVM_S390_MEMOP_LOGICAL_READ, .buf = (uint64_t)hostbuf, .ar = ar, + .key = (cpu->env.psw.mask & PSW_MASK_KEY) >> PSW_SHIFT_KEY, };int ret;
@@ -851,6 +857,9 @@ int kvm_s390_mem_op(S390CPU *cpu, vaddr addr, uint8_t ar, void *hostbuf,if (!hostbuf) { mem_op.flags |=KVM_S390_MEMOP_F_CHECK_ONLY ; } +if (mem_op_storage_key_support) { + mem_op.flags |=KVM_S390_MEMOP_F_SKEY_PROTECTION ; + } ret =kvm_vcpu_ioctl (CPU (cpu),KVM_S390_MEM_OP , &mem_op);if (ret <0 ) {
Signature · 1 line
2.31.1
[PULL 12/12] ui: Remove deprecated options "-sdl" and "-curses"
In reply to Thomas HuthWe have "-sdl" and "-curses", but no "-gtk" and no "-cocoa" ... these old-style options are rather confusing than helpful nowadays. Now that the deprecation period is over, let's remove them, so we get a cleaner interface (where "-display" is the only way to select the user interface).
Message-Id: <[email protected]>
--- docs/about/deprecated.rst | 10 ---------- docs/about/removed-features.rst | 10 ++++++++++ softmmu/vl.c | 19 ------------------- qemu-options.hx | 24 ++---------------------- 4 files changed, 12 insertions(+), 51 deletions(-)
docs/about/deprecated.rst +0 -10
@@ -81,16 +81,6 @@ the process listing. This is replaced by the new ``password-secret`` option which lets the password be securely provided on the command line using a ``secret`` object instance. -``-sdl`` (since 6.2) -'''''''''''''''''''' - -Use ``-display sdl`` instead. - -``-curses`` (since 6.2) -''''''''''''''''''''''' - -Use ``-display curses`` instead. - ``-watchdog`` (since 6.2) '''''''''''''''''''''''''
docs/about/removed-features.rst +10 -0
@@ -386,6 +386,16 @@ Use ``-display sdl,grab-mod=lshift-lctrl-lalt`` instead. Use ``-display sdl,grab-mod=rctrl`` instead. +``-sdl`` (removed in 7.1) +''''''''''''''''''''''''' + +Use ``-display sdl`` instead. + +``-curses`` (removed in 7.1) +'''''''''''''''''''''''''''' + +Use ``-display curses`` instead. + QEMU Machine Protocol (QMP) commands ------------------------------------
softmmu/vl.c +0 -19
@@ -2800,16 +2800,6 @@ void qemu_init(int argc, char **argv, char **envp) nographic = true; dpy.type =DISPLAY_TYPE_NONE ;break ; -case QEMU_OPTION_curses: -warn_report ("-curses is deprecated, " -"use -display curses instead." ); -#ifdef CONFIG_CURSES - dpy.type =DISPLAY_TYPE_CURSES ; -#else -error_report ("curses or iconv support is disabled" ); -exit (1 ); -#endif -break ;case QEMU_OPTION_portrait: graphic_rotate =90 ;break ;
@@ -3176,15 +3166,6 @@ void qemu_init(int argc, char **argv, char **envp) dpy.has_full_screen = true; dpy.full_screen = true;break ; -case QEMU_OPTION_sdl: -warn_report ("-sdl is deprecated, use -display sdl instead." ); -#ifdef CONFIG_SDL - dpy.type =DISPLAY_TYPE_SDL ; -break ; -#else -error_report ("SDL support is disabled" ); -exit (1 ); -#endif case QEMU_OPTION_pidfile: pid_file = optarg;break ;
qemu-options.hx +2 -22
@@ -1981,9 +1981,8 @@ DEF("display", HAS_ARG, QEMU_OPTION_display, , QEMU_ARCH_ALL) SRST ``-display type`` - Select type of display to use. This option is a replacement for the - old style -sdl/-curses/... options. Use ``-display help`` to list - the available display types. Valid values for type are + Select type of display to use. Use ``-display help`` to list the available + display types. Valid values for type are ``spice-app[,gl=on|off]`` Start QEMU as a Spice server and launch the default Spice client
@@ -2085,25 +2084,6 @@ SRST Use C-a h for help on switching between the console and monitor. ERST -DEF("curses", 0, QEMU_OPTION_curses, - "-curses shorthand for -display curses\n", - QEMU_ARCH_ALL) -SRST -``-curses`` - Normally, if QEMU is compiled with graphical window support, it - displays output such as guest graphics, guest console, and the QEMU - monitor in a window. With this option, QEMU can display the VGA - output when in text mode using a curses/ncurses interface. Nothing - is displayed in graphical mode. -ERST - -DEF("sdl", 0, QEMU_OPTION_sdl, - "-sdl shorthand for -display sdl\n", QEMU_ARCH_ALL) -SRST -``-sdl`` - Enable SDL. -ERST - #ifdef CONFIG_SPICE DEF("spice", HAS_ARG, QEMU_OPTION_spice, "-spice [port=port][,tls-port=secured-port][,x509-dir=<dir>]\n"
Signature · 1 line
2.31.1
[PULL 06/12] MAINTAINERS: Change my email address
In reply to Thomas HuthFrom: Hailiang Zhang <[email protected]>
The [email protected] email address has been stopped. Change it to my new email address.
Message-Id: <[email protected]>
--- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
@@ -3102,7 +3102,7 @@ F: include/qemu/yank.h F: qapi/yank.json COLO Framework -M: zhanghailiang <[email protected]> +M: Hailiang Zhang <[email protected]> S: Maintained F: migration/colo* F: include/migration/colo.h
Signature · 1 line
2.31.1
[PULL 02/12] hw/s390x/s390-virtio-ccw: Improve the machine description string
In reply to Thomas HuthThe machine name already contains the words "ccw" and "virtio", so using "VirtIO-ccw" in the description likely does not really help the average user to get an idea what this machine type is about. Thus let's switch to "Virtual s390x machine" now, since "virtual machine" should be a familiar term, and "s390x" signals that this is about 64-bit guests (unlike S390 which could mean that it is 31-bit only).
Also expand "v" to "version", since this makes it easier to use this macro also with non-numeric machine names in downstream.
Message-Id: <[email protected]>
--- hw/s390x/s390-virtio-ccw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
hw/s390x/s390-virtio-ccw.c +1 -1
@@ -768,7 +768,7 @@ bool css_migration_enabled(void) { \MachineClass *mc =MACHINE_CLASS (oc); \ ccw_machine_##suffix##_class_options(mc); \ - mc->desc ="VirtIO-ccw based S390 machine v" verstr; \ + mc->desc ="Virtual s390x machine (version " verstr")" ; \if (latest) { \ mc->alias ="s390-ccw-virtio" ; \ mc->is_default = true; \
Signature · 1 line
2.31.1
[PULL 04/12] MAINTAINERS: Update s390 vhost entries
In reply to Thomas HuthFrom: Eric Farman <[email protected]>
Commit 7a523d96a0 ("virtio-ccw: move vhost_ccw_scsi to a separate file") introduced a new file hw/s390x/vhost-scsi-ccw.c, which received a couple comments [1][2] to update MAINTAINERS that were missed.
Fix that by making the vhost CCW entries a wildcard.
[1] https://lore.kernel.org/r/[email protected]/
[2] https://lore.kernel.org/r/[email protected]/
Message-Id: <[email protected]>
--- MAINTAINERS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
MAINTAINERS +1 -2
@@ -2018,8 +2018,7 @@ M: Halil Pasic <[email protected]> M: Eric Farman <[email protected]> S: Supported F: hw/s390x/virtio-ccw*.[hc] -F: hw/s390x/vhost-vsock-ccw.c -F: hw/s390x/vhost-user-fs-ccw.c +F: hw/s390x/vhost-*-ccw.c T: git https://gitlab.com/cohuck/qemu.git s390-next T: git https://github.com/borntraeger/qemu.git s390-next L: [email protected]
Signature · 1 line
2.31.1
[PULL 07/12] MAINTAINERS: Update maintainers for Guest x86 HAXM CPUs
In reply to Thomas HuthFrom: Wenchao Wang <[email protected]>
Clean up the maintainer list.
Message-Id: <DM6PR11MB4090A58ACCA4AD8C752AEEA587199@DM6PR11MB4090.namprd11.prod.outlook.com>
--- MAINTAINERS | 1 - 1 file changed, 1 deletion(-)
MAINTAINERS +0 -1
@@ -488,7 +488,6 @@ Guest CPU Cores (HAXM) --------------------- X86 HAXM CPUs M: Wenchao Wang <[email protected]> -M: Colin Xu <[email protected]> L: [email protected] W: https://github.com/intel/haxm/issues S: Maintained
Signature · 1 line
2.31.1
[PULL 10/12] ui: Remove deprecated parameters of the "-display sdl" option
In reply to Thomas HuthDropping these deprecated parameters simplifies further refactoring (e.g. QAPIfication is easier without underscores in the name).
Message-Id: <[email protected]>
--- docs/about/deprecated.rst | 16 ------------- docs/about/removed-features.rst | 17 ++++++++++++++ softmmu/vl.c | 41 +-------------------------------- qemu-options.hx | 32 ++----------------------- 4 files changed, 20 insertions(+), 86 deletions(-)
docs/about/deprecated.rst +0 -16
@@ -81,22 +81,6 @@ the process listing. This is replaced by the new ``password-secret`` option which lets the password be securely provided on the command line using a ``secret`` object instance. -``-display sdl,window_close=...`` (since 6.1) -''''''''''''''''''''''''''''''''''''''''''''' - -Use ``-display sdl,window-close=...`` instead (i.e. with a minus instead of -an underscore between "window" and "close"). - -``-alt-grab`` and ``-display sdl,alt_grab=on`` (since 6.2) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -Use ``-display sdl,grab-mod=lshift-lctrl-lalt`` instead. - -``-ctrl-grab`` and ``-display sdl,ctrl_grab=on`` (since 6.2) -'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' - -Use ``-display sdl,grab-mod=rctrl`` instead. - ``-sdl`` (since 6.2) ''''''''''''''''''''
docs/about/removed-features.rst +17 -0
@@ -370,6 +370,23 @@ The ``opened=on`` option in the command line or QMP ``object-add`` either had no effect (if ``opened`` was the last option) or caused errors. The property is therefore useless and should simply be removed. +``-display sdl,window_close=...`` (removed in 7.1) +'''''''''''''''''''''''''''''''''''''''''''''''''' + +Use ``-display sdl,window-close=...`` instead (i.e. with a minus instead of +an underscore between "window" and "close"). + +``-alt-grab`` and ``-display sdl,alt_grab=on`` (removed in 7.1) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Use ``-display sdl,grab-mod=lshift-lctrl-lalt`` instead. + +``-ctrl-grab`` and ``-display sdl,ctrl_grab=on`` (removed in 7.1) +''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + +Use ``-display sdl,grab-mod=rctrl`` instead. + + QEMU Machine Protocol (QMP) commands ------------------------------------
softmmu/vl.c +1 -40
59 lines not on this page · raw message
qemu-options.hx +2 -30
@@ -1938,8 +1938,8 @@ DEF("display", HAS_ARG, QEMU_OPTION_display, "-display spice-app[,gl=on|off]\n" #endif #if defined(CONFIG_SDL) - "-display sdl[,alt_grab=on|off][,ctrl_grab=on|off][,gl=on|core|es|off]\n" - " [,grab-mod=<mod>][,show-cursor=on|off][,window-close=on|off]\n" + "-display sdl[,gl=on|core|es|off][,grab-mod=<mod>][,show-cursor=on|off]\n" + " [,window-close=on|off]\n" #endif #if defined(CONFIG_GTK) "-display gtk[,full-screen=on|off][,gl=on|off][,grab-on-hover=on|off]\n"
@@ -2012,12 +2012,6 @@ SRST the mouse grabbing in conjunction with the "g" key. ``<mods>`` can be either ``lshift-lctrl-lalt`` or ``rctrl``. - ``alt_grab=on|off`` : Use Control+Alt+Shift-g to toggle mouse grabbing. - This parameter is deprecated - use ``grab-mod`` instead. - - ``ctrl_grab=on|off`` : Use Right-Control-g to toggle mouse grabbing. - This parameter is deprecated - use ``grab-mod`` instead. - ``gl=on|off|core|es`` : Use OpenGL for displaying ``show-cursor=on|off`` : Force showing the mouse cursor
@@ -2103,28 +2097,6 @@ SRST is displayed in graphical mode. ERST -DEF("alt-grab", 0, QEMU_OPTION_alt_grab, - "-alt-grab use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt)\n", - QEMU_ARCH_ALL) -SRST -``-alt-grab`` - Use Ctrl-Alt-Shift to grab mouse (instead of Ctrl-Alt). Note that - this also affects the special keys (for fullscreen, monitor-mode - switching, etc). This option is deprecated - please use - ``-display sdl,grab-mod=lshift-lctrl-lalt`` instead. -ERST - -DEF("ctrl-grab", 0, QEMU_OPTION_ctrl_grab, - "-ctrl-grab use Right-Ctrl to grab mouse (instead of Ctrl-Alt)\n", - QEMU_ARCH_ALL) -SRST -``-ctrl-grab`` - Use Right-Ctrl to grab mouse (instead of Ctrl-Alt). Note that this - also affects the special keys (for fullscreen, monitor-mode - switching, etc). This option is deprecated - please use - ``-display sdl,grab-mod=rctrl`` instead. -ERST - DEF("sdl", 0, QEMU_OPTION_sdl, "-sdl shorthand for -display sdl\n", QEMU_ARCH_ALL) SRST
Signature · 1 line
2.31.1
[PULL 08/12] qtest/npcm7xx_pwm-test: Fix memory leak in mft_qom_set
In reply to Thomas HuthFrom: Miaoqian Lin <[email protected]>
g_strdup_printf() allocated memory for path, we should free it with g_free() when no longer needed.
Message-Id: <[email protected]>
--- tests/qtest/npcm7xx_pwm-test.c | 3 +++ 1 file changed, 3 insertions(+)
tests/qtest/npcm7xx_pwm-test.c +3 -0
@@ -268,6 +268,9 @@ static void mft_qom_set(QTestState *qts, int index, const char *name, path, name, value);/* The qom set message returns successfully. */ g_assert_true (qdict_haskey (response,"return" )); + +qobject_unref (response); +g_free (path); }static uint32_t get_pll (uint32_t con)
Signature · 1 line
2.31.1
[PULL 11/12] ui: Switch "-display sdl" to use the QAPI parser
In reply to Thomas HuthThe "-display sdl" option still uses a hand-crafted parser for its parameters since we didn't want to drag an interface we considered somewhat flawed into the QAPI schema. Since the flaws are gone now, it's time to QAPIfy.
This introduces the new "DisplaySDL" QAPI struct that is used to hold the parameters that are unique to the SDL display. The only specific parameter is currently "grab-mod" that is used to specify the required modifier keys to escape from the mouse grabbing mode.
Message-Id: <[email protected]>
--- qapi/ui.json | 26 ++++++++++++++- include/sysemu/sysemu.h | 2 -- softmmu/globals.c | 2 -- softmmu/vl.c | 70 +---------------------------------------- ui/sdl2.c | 10 ++++++ 5 files changed, 36 insertions(+), 74 deletions(-)
qapi/ui.json +25 -1
@@ -1295,6 +1295,29 @@ '*swap-opt-cmd': 'bool' } } +## +# @HotKeyMod: +# +# Set of modifier keys that need to be held for shortcut key actions. +# +# Since: 7.1 +## +{ 'enum' : 'HotKeyMod', + 'data' : [ 'lctrl-lalt', 'lshift-lctrl-lalt', 'rctrl' ] } + +## +# @DisplaySDL: +# +# SDL2 display options. +# +# @grab-mod: Modifier keys that should be pressed together with the +# "G" key to release the mouse grab. +# +# Since: 7.1 +## +{ 'struct' : 'DisplaySDL', + 'data' : { '*grab-mod' : 'HotKeyMod' } } + ## # @DisplayType: #
@@ -1374,7 +1397,8 @@ 'curses': { 'type': 'DisplayCurses', 'if': 'CONFIG_CURSES' }, 'egl-headless': { 'type': 'DisplayEGLHeadless', 'if': { 'all': ['CONFIG_OPENGL', 'CONFIG_GBM'] } }, - 'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' } + 'dbus': { 'type': 'DisplayDBus', 'if': 'CONFIG_DBUS_DISPLAY' }, + 'sdl': { 'type': 'DisplaySDL', 'if': 'CONFIG_SDL' } } }
include/sysemu/sysemu.h +0 -2
@@ -42,8 +42,6 @@ extern int graphic_depth;extern int display_opengl;extern const char *keyboard_layout;extern int win2k_install_hack; -extern int alt_grab; -extern int ctrl_grab;extern int graphic_rotate;extern int old_param;extern uint8_t *boot_splash_filedata;
softmmu/globals.c +0 -2
@@ -50,8 +50,6 @@ QEMUOptionRom option_rom[MAX_OPTION_ROMS];int nb_option_roms;int old_param;const char *qemu_name; -int alt_grab; -int ctrl_grab;unsigned int nb_prom_envs;const char *prom_envs[MAX_PROM_ENVS ];uint8_t *boot_splash_filedata;
softmmu/vl.c +1 -69
76 lines not on this page · raw message
ui/sdl2.c +10 -0
@@ -40,6 +40,8 @@ static struct sdl2_console *sdl2_console;static SDL_Surface *guest_sprite_surface;static int gui_grab;/* if true, all keyboard/mouse events are grabbed */ +static bool alt_grab; +static bool ctrl_grab;static int gui_saved_grab;static int gui_fullscreen;
@@ -853,6 +855,14 @@ static void sdl2_display_init(DisplayState *ds, DisplayOptions *o) gui_fullscreen = o->has_full_screen && o->full_screen; +if (o->u.sdl.has_grab_mod) { +if (o->u.sdl.grab_mod ==HOT_KEY_MOD_LSHIFT_LCTRL_LALT ) { + alt_grab = true; + }else if (o->u.sdl.grab_mod ==HOT_KEY_MOD_RCTRL ) { + ctrl_grab = true; + } + } +for (i =0 ;; i++) {QemuConsole *con =qemu_console_lookup_by_index (i);if (!con) {
Signature · 1 line
2.31.1
Richard Henderson
AppliedQuoted 10 lines · Thomas Huth
The following changes since commit
1e62a82574fc28e64deca589a23cf55ada2e1a7d:Merge tag 'm68k-for-7.1-pull-request' of https://github.com/vivier/qemu-m68k into staging (2022-06-02 06:30:24 -0700)are available in the Git repository at:
https://gitlab.com/thuth/qemu.git tags/pull-request-2022-06-03for you to fetch changes up to
707d93d4abc6485c638e2aecd93fbd904f2f6b3e:
Quoted 8 lines
ui: Remove deprecated options "-sdl" and "-curses" (2022-06-03 08:03:28 +0200)----------------------------------------------------------------
* s390x storage key improvements for KVM
* Some cosmetics for s390x
* UpdateMAINTAINERSentries
* Improve some spots wrt memory handling in the qtests
* Clean up the "-display sdl" parameter parsing
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/7.1 as appropriate.
r~
Quoted 52 lines
----------------------------------------------------------------
Alex Bennée (1):
tests/qtest: useg_autofreefortest_server_create_chrDr. David Alan Gilbert (1):
s390: Typo fixFLOATING_POINT_SUPPPORT_ENHEric Farman (1):
MAINTAINERS: Update s390 vhost entriesGautam Agrawal (1):
tests/tcg: Test overflow conditionsHailiang Zhang (1):
MAINTAINERS: Change my email addressJanis Schoetterl-Glausch (1):
target/s390x: kvm: Honor storage keys during emulationMiaoqian Lin (1):
qtest/npcm7xx_pwm-test: Fix memory leak inmft_qom_setThomas Huth (4):
hw/s390x/s390-virtio-ccw: Improve the machine description string
ui: Remove deprecated parameters of the "-display sdl" option
ui: Switch "-display sdl" to use the QAPI parser
ui: Remove deprecated options "-sdl" and "-curses"Wenchao Wang (1):
MAINTAINERS: Update maintainers for Guest x86 HAXM CPUsdocs/about/deprecated.rst | 26 -------- docs/about/removed-features.rst | 27 ++++++++ qapi/ui.json | 26 +++++++- include/sysemu/sysemu.h | 2 - target/s390x/cpu_features_def.h.inc | 2 +- hw/s390x/s390-virtio-ccw.c | 2 +- softmmu/globals.c | 2 - softmmu/vl.c | 128 +----------------------------------- target/s390x/gen-features.c | 6 +- target/s390x/kvm/kvm.c | 9 +++ target/s390x/tcg/translate.c | 8 +-- tests/qtest/npcm7xx_pwm-test.c | 3 + tests/qtest/vhost-user-test.c | 7 +- tests/tcg/multiarch/overflow.c | 58 ++++++++++++++++ ui/sdl2.c | 10 +++ MAINTAINERS | 6 +- qemu-options.hx | 56 ++-------------- 17 files changed, 151 insertions(+), 227 deletions(-)create mode 100644
tests/tcg/multiarch/overflow.c