qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

Merge remote-tracking branch 'remotes/kraxel/tags/ui-20200114-pull-request' into staging

ui: add "-display help", gtk refresh rate.

# gpg: Signature made Tue 14 Jan 2020 10:01:14 GMT
# gpg: using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20200114-pull-request:
display/gtk: get proper refreshrate
ui: Print available display backends with '-display help'

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

+36 -1
+1
include/ui/console.h
··· 442 442 bool qemu_display_find_default(DisplayOptions *opts); 443 443 void qemu_display_early_init(DisplayOptions *opts); 444 444 void qemu_display_init(DisplayState *ds, DisplayOptions *opts); 445 + void qemu_display_help(void); 445 446 446 447 /* vnc.c */ 447 448 void vnc_display_init(const char *id, Error **errp);
+2
include/ui/gtk.h
··· 28 28 #include "ui/egl-context.h" 29 29 #endif 30 30 31 + #define MILLISEC_PER_SEC 1000000 32 + 31 33 typedef struct GtkDisplayState GtkDisplayState; 32 34 33 35 typedef struct VirtualGfxConsole {
+2 -1
qemu-options.hx
··· 1669 1669 @item -display @var{type} 1670 1670 @findex -display 1671 1671 Select type of display to use. This option is a replacement for the 1672 - old style -sdl/-curses/... options. Valid values for @var{type} are 1672 + old style -sdl/-curses/... options. Use @code{-display help} to list 1673 + the available display types. Valid values for @var{type} are 1673 1674 @table @option 1674 1675 @item sdl 1675 1676 Display video output via SDL (usually in a separate graphics
+15
ui/console.c
··· 2333 2333 dpys[opts->type]->init(ds, opts); 2334 2334 } 2335 2335 2336 + void qemu_display_help(void) 2337 + { 2338 + int idx; 2339 + 2340 + printf("Available display backend types:\n"); 2341 + for (idx = DISPLAY_TYPE_NONE; idx < DISPLAY_TYPE__MAX; idx++) { 2342 + if (!dpys[idx]) { 2343 + ui_module_load_one(DisplayType_str(idx)); 2344 + } 2345 + if (dpys[idx]) { 2346 + printf("%s\n", DisplayType_str(dpys[idx]->type)); 2347 + } 2348 + } 2349 + } 2350 + 2336 2351 void qemu_chr_parse_vc(QemuOpts *opts, ChardevBackend *backend, Error **errp) 2337 2352 { 2338 2353 int val;
+11
ui/gtk.c
··· 1966 1966 GSList *group, GtkWidget *view_menu) 1967 1967 { 1968 1968 bool zoom_to_fit = false; 1969 + int refresh_rate_millihz; 1970 + 1971 + GdkDisplay *dpy = gtk_widget_get_display(s->window); 1972 + GdkWindow *win = gtk_widget_get_window(s->window); 1973 + GdkMonitor *monitor = gdk_display_get_monitor_at_window(dpy, win); 1969 1974 1970 1975 vc->label = qemu_console_get_label(con); 1971 1976 vc->s = s; ··· 2026 2031 2027 2032 vc->gfx.kbd = qkbd_state_init(con); 2028 2033 vc->gfx.dcl.con = con; 2034 + 2035 + refresh_rate_millihz = gdk_monitor_get_refresh_rate(monitor); 2036 + if (refresh_rate_millihz) { 2037 + vc->gfx.dcl.update_interval = MILLISEC_PER_SEC / refresh_rate_millihz; 2038 + } 2039 + 2029 2040 register_displaychangelistener(&vc->gfx.dcl); 2030 2041 2031 2042 gd_connect_vc_gfx_signals(vc);
+5
vl.c
··· 1869 1869 { 1870 1870 const char *opts; 1871 1871 1872 + if (is_help_option(p)) { 1873 + qemu_display_help(); 1874 + exit(0); 1875 + } 1876 + 1872 1877 if (strstart(p, "sdl", &opts)) { 1873 1878 /* 1874 1879 * sdl DisplayType needs hand-crafted parser instead of