* 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
 -----BEGIN PGP SIGNATURE-----
 
 iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmKZpQURHHRodXRoQHJl
 ZGhhdC5jb20ACgkQLtnXdP5wLbXQ1Q//TVyCnWe+kAwwMljS9tebnVwZ1C3wrH68
 KJxeeWNxIdCLMJetZa3V8lYkLuLKojELi24+qAFH+//RWoEIBFvhVlZffWL/7NHw
 KAYy8ZWHeGui29hYgAxlKFC8GSCdsGD+PJU6E0C7wN7R6UVCvPfxPk+MQXjbt/Tn
 UGgb0Ysp4MxEKk3i2t3DR49n7KniUD3ZGZimGhAWfPwe+tPP52Ijczheenv2/R4J
 ip0bc+xo2zUwa6VPBdncnZtOhyXTCNeTxsJcnxnjFVmo9scP2aFOFrV43PvLs0E7
 l2yhQKwXbqIMyaJ+/aFULuOOLL3w2fdOu6TzsMlWiRFF5UmbJjj/8V7Vq1GELupZ
 2QU0wSJMlNPteRlHUMD0Tz8nG/r/ffYtOAoK3eZAG0tIWV/3xcTIGt0TZuV1VgzY
 M8nNhQTdweCtx5y4sbncEO6qmF5F8u8hbZ7DZCFRCKYkLkC3sv+QDiF1Ys9Iu1MM
 wy7uLcrQZ9rPZ96x1aPKgYMHtrV98yN5om6/CnFVXKvAYX+pAp2of9iTSEAWhRKi
 sDktJ39uCdkdgxnNKBQe6g0cug6mlnpoCM9PSR0zuXuTjFTVZxJBgw7p6Uyofccv
 jL8T6/uR3xQMJ/VDuo0UZLYa4bYnzCc/gJmarLiwBxhykzHAthobBwaXSsLTZ+9J
 1DpfGpSKDDQ=
 =3Rhl
 -----END PGP SIGNATURE-----

Merge tag 'pull-request-2022-06-03' of https://gitlab.com/thuth/qemu into staging

* 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

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmKZpQURHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbXQ1Q//TVyCnWe+kAwwMljS9tebnVwZ1C3wrH68
# KJxeeWNxIdCLMJetZa3V8lYkLuLKojELi24+qAFH+//RWoEIBFvhVlZffWL/7NHw
# KAYy8ZWHeGui29hYgAxlKFC8GSCdsGD+PJU6E0C7wN7R6UVCvPfxPk+MQXjbt/Tn
# UGgb0Ysp4MxEKk3i2t3DR49n7KniUD3ZGZimGhAWfPwe+tPP52Ijczheenv2/R4J
# ip0bc+xo2zUwa6VPBdncnZtOhyXTCNeTxsJcnxnjFVmo9scP2aFOFrV43PvLs0E7
# l2yhQKwXbqIMyaJ+/aFULuOOLL3w2fdOu6TzsMlWiRFF5UmbJjj/8V7Vq1GELupZ
# 2QU0wSJMlNPteRlHUMD0Tz8nG/r/ffYtOAoK3eZAG0tIWV/3xcTIGt0TZuV1VgzY
# M8nNhQTdweCtx5y4sbncEO6qmF5F8u8hbZ7DZCFRCKYkLkC3sv+QDiF1Ys9Iu1MM
# wy7uLcrQZ9rPZ96x1aPKgYMHtrV98yN5om6/CnFVXKvAYX+pAp2of9iTSEAWhRKi
# sDktJ39uCdkdgxnNKBQe6g0cug6mlnpoCM9PSR0zuXuTjFTVZxJBgw7p6Uyofccv
# jL8T6/uR3xQMJ/VDuo0UZLYa4bYnzCc/gJmarLiwBxhykzHAthobBwaXSsLTZ+9J
# 1DpfGpSKDDQ=
# =3Rhl
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 02 Jun 2022 11:07:01 PM PDT
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [undefined]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [undefined]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.org>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2022-06-03' of https://gitlab.com/thuth/qemu:
  ui: Remove deprecated options "-sdl" and "-curses"
  ui: Switch "-display sdl" to use the QAPI parser
  ui: Remove deprecated parameters of the "-display sdl" option
  tests/qtest: use g_autofree for test_server_create_chr
  qtest/npcm7xx_pwm-test: Fix memory leak in mft_qom_set
  MAINTAINERS: Update maintainers for Guest x86 HAXM CPUs
  MAINTAINERS: Change my email address
  tests/tcg: Test overflow conditions
  MAINTAINERS: Update s390 vhost entries
  target/s390x: kvm: Honor storage keys during emulation
  hw/s390x/s390-virtio-ccw: Improve the machine description string
  s390: Typo fix FLOATING_POINT_SUPPPORT_ENH

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2022-06-03 06:43:38 -07:00
commit 70e975203f
17 changed files with 151 additions and 227 deletions

View File

@ -488,7 +488,6 @@ Guest CPU Cores (HAXM)
---------------------
X86 HAXM CPUs
M: Wenchao Wang <wenchao.wang@intel.com>
M: Colin Xu <colin.xu@intel.com>
L: haxm-team@intel.com
W: https://github.com/intel/haxm/issues
S: Maintained
@ -2018,8 +2017,7 @@ M: Halil Pasic <pasic@linux.ibm.com>
M: Eric Farman <farman@linux.ibm.com>
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: qemu-s390x@nongnu.org
@ -3103,7 +3101,7 @@ F: include/qemu/yank.h
F: qapi/yank.json
COLO Framework
M: zhanghailiang <zhang.zhanghailiang@huawei.com>
M: Hailiang Zhang <zhanghailiang@xfusion.com>
S: Maintained
F: migration/colo*
F: include/migration/colo.h

View File

@ -81,32 +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)
''''''''''''''''''''
Use ``-display sdl`` instead.
``-curses`` (since 6.2)
'''''''''''''''''''''''
Use ``-display curses`` instead.
``-watchdog`` (since 6.2)
'''''''''''''''''''''''''

View File

@ -370,6 +370,33 @@ 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.
``-sdl`` (removed in 7.1)
'''''''''''''''''''''''''
Use ``-display sdl`` instead.
``-curses`` (removed in 7.1)
''''''''''''''''''''''''''''
Use ``-display curses`` instead.
QEMU Machine Protocol (QMP) commands
------------------------------------

View File

@ -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; \

View File

@ -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;

View File

@ -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' }
}
}

View File

@ -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"
@ -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
@ -2012,12 +2011,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
@ -2091,47 +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("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
``-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"

View File

@ -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;

View File

@ -1056,100 +1056,7 @@ static void parse_display(const char *p)
exit(0);
}
if (strstart(p, "sdl", &opts)) {
/*
* sdl DisplayType needs hand-crafted parser instead of
* parse_display_qapi() due to some options not in
* DisplayOptions, specifically:
* - ctrl_grab + alt_grab
* They can't be moved into the QAPI since they use underscores,
* thus they will get replaced by "grab-mod" in the long term
*/
#if defined(CONFIG_SDL)
dpy.type = DISPLAY_TYPE_SDL;
while (*opts) {
const char *nextopt;
if (strstart(opts, ",grab-mod=", &nextopt)) {
opts = nextopt;
if (strstart(opts, "lshift-lctrl-lalt", &nextopt)) {
alt_grab = 1;
} else if (strstart(opts, "rctrl", &nextopt)) {
ctrl_grab = 1;
} else {
goto invalid_sdl_args;
}
} else if (strstart(opts, ",alt_grab=", &nextopt)) {
opts = nextopt;
if (strstart(opts, "on", &nextopt)) {
alt_grab = 1;
} else if (strstart(opts, "off", &nextopt)) {
alt_grab = 0;
} else {
goto invalid_sdl_args;
}
warn_report("alt_grab is deprecated, use grab-mod instead.");
} else if (strstart(opts, ",ctrl_grab=", &nextopt)) {
opts = nextopt;
if (strstart(opts, "on", &nextopt)) {
ctrl_grab = 1;
} else if (strstart(opts, "off", &nextopt)) {
ctrl_grab = 0;
} else {
goto invalid_sdl_args;
}
warn_report("ctrl_grab is deprecated, use grab-mod instead.");
} else if (strstart(opts, ",window_close=", &nextopt) ||
strstart(opts, ",window-close=", &nextopt)) {
if (strstart(opts, ",window_close=", NULL)) {
warn_report("window_close with an underscore is deprecated,"
" please use window-close instead.");
}
opts = nextopt;
dpy.has_window_close = true;
if (strstart(opts, "on", &nextopt)) {
dpy.window_close = true;
} else if (strstart(opts, "off", &nextopt)) {
dpy.window_close = false;
} else {
goto invalid_sdl_args;
}
} else if (strstart(opts, ",show-cursor=", &nextopt)) {
opts = nextopt;
dpy.has_show_cursor = true;
if (strstart(opts, "on", &nextopt)) {
dpy.show_cursor = true;
} else if (strstart(opts, "off", &nextopt)) {
dpy.show_cursor = false;
} else {
goto invalid_sdl_args;
}
} else if (strstart(opts, ",gl=", &nextopt)) {
opts = nextopt;
dpy.has_gl = true;
if (strstart(opts, "on", &nextopt)) {
dpy.gl = DISPLAYGL_MODE_ON;
} else if (strstart(opts, "core", &nextopt)) {
dpy.gl = DISPLAYGL_MODE_CORE;
} else if (strstart(opts, "es", &nextopt)) {
dpy.gl = DISPLAYGL_MODE_ES;
} else if (strstart(opts, "off", &nextopt)) {
dpy.gl = DISPLAYGL_MODE_OFF;
} else {
goto invalid_sdl_args;
}
} else {
invalid_sdl_args:
error_report("invalid SDL option string");
exit(1);
}
opts = nextopt;
}
#else
error_report("SDL display supported is not available in this binary");
exit(1);
#endif
} else if (strstart(p, "vnc", &opts)) {
if (strstart(p, "vnc", &opts)) {
/*
* vnc isn't a (local) DisplayType but a protocol for remote
* display access.
@ -1962,10 +1869,6 @@ static void qemu_create_early_backends(void)
const bool use_gtk = false;
#endif
if ((alt_grab || ctrl_grab) && !use_sdl) {
error_report("-alt-grab and -ctrl-grab are only valid "
"for SDL, ignoring option");
}
if (dpy.has_window_close && !use_gtk && !use_sdl) {
error_report("window-close is only valid for GTK and SDL, "
"ignoring option");
@ -2897,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;
@ -3273,25 +3166,6 @@ void qemu_init(int argc, char **argv, char **envp)
dpy.has_full_screen = true;
dpy.full_screen = true;
break;
case QEMU_OPTION_alt_grab:
alt_grab = 1;
warn_report("-alt-grab is deprecated, please use "
"-display sdl,grab-mod=lshift-lctrl-lalt instead.");
break;
case QEMU_OPTION_ctrl_grab:
ctrl_grab = 1;
warn_report("-ctrl-grab is deprecated, please use "
"-display sdl,grab-mod=rctrl instead.");
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;

View File

@ -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")

View File

@ -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,

View File

@ -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) {

View File

@ -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 */

View File

@ -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)

View File

@ -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);

View File

@ -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;
}

View File

@ -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) {