[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bochs-cvs
Subject:    [Bochs-cvs] [12550] trunk/bochs
From:       vruppert () users ! sourceforge ! net
Date:       2014-11-15 10:22:38
Message-ID: E1XpaVE-0003Zz-7G () sfs-ml-4 ! v29 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 12550
Author:   vruppert
Date:     2014-11-15 10:22:27 +0000 (Sat, 15 Nov 2014)
Log Message:
-----------
Added the capability to select the operation mode of the VGA update timer.
The realtime mode is enabled by default (patch by Dawn Teschendorf).

Modified Paths:
--------------
    trunk/bochs/.bochsrc
    trunk/bochs/config.cc
    trunk/bochs/doc/docbook/user/user.dbk
    trunk/bochs/doc/man/bochsrc.5
    trunk/bochs/iodev/display/vgacore.cc
    trunk/bochs/param_names.h

Modified: trunk/bochs/.bochsrc
===================================================================
--- trunk/bochs/.bochsrc	2014-11-15 07:45:49 UTC (rev 12549)
+++ trunk/bochs/.bochsrc	2014-11-15 10:22:27 UTC (rev 12550)
@@ -409,10 +409,17 @@
 #     The VGA update timer now uses the realtime engine and the default
 #     value is 5. This parameter can be changed at runtime.
 #
+#   REALTIME
+#     If set to 1, the VGA timer is based on realtime, otherwise it is based
+#     on the ips setting. If the host is slow (low ips, update_freq) and the
+#     guest uses HLT appropriately, setting this to 0 and "clock: sync=none"
+#     may improve the responsiveness of the guest GUI when the guest is
+#     otherwise idle. The default value is 1.
+#
 # Examples:
 #   vga: extension=cirrus, update_freq=10
 #=======================================================================
-#vga: extension=vbe, update_freq=5
+#vga: extension=vbe, update_freq=5, realtime=1
 
 #=======================================================================
 # VOODOO:

Modified: trunk/bochs/config.cc
===================================================================
--- trunk/bochs/config.cc	2014-11-15 07:45:49 UTC (rev 12549)
+++ trunk/bochs/config.cc	2014-11-15 10:22:27 UTC (rev 12550)
@@ -957,6 +957,12 @@
   screenmode->set_handler(bx_param_string_handler);
 #endif
 
+  new bx_param_bool_c(display,
+      "vga_realtime",
+      "VGA timer realtime",
+      "If enabled, the VGA timer is based on realtime",
+      1);
+
   bx_param_num_c *vga_update_freq = new bx_param_num_c(display,
       "vga_update_frequency",
       "VGA Update Frequency",
@@ -2720,6 +2726,8 @@
         SIM->get_param_string(BXPN_VGA_EXTENSION)->set(&params[i][10]);
       } else if (!strncmp(params[i], "update_freq=", 12)) {
         SIM->get_param_num(BXPN_VGA_UPDATE_FREQUENCY)->set(atol(&params[i][12]));
+      } else if (!strncmp(params[i], "realtime=", 9)) {
+        SIM->get_param_bool(BXPN_VGA_REALTIME)->set(atol(&params[i][9]));
       } else {
         PARSE_ERR(("%s: vga directive malformed.", context));
       }
@@ -3377,9 +3385,10 @@
     }
   }
   fprintf(fp, "\n");
-  fprintf(fp, "vga: extension=%s, update_freq=%u\n",
+  fprintf(fp, "vga: extension=%s, update_freq=%u, realtime=%u\n",
     SIM->get_param_string(BXPN_VGA_EXTENSION)->getptr(),
-    SIM->get_param_num(BXPN_VGA_UPDATE_FREQUENCY)->get());
+    SIM->get_param_num(BXPN_VGA_UPDATE_FREQUENCY)->get(),
+    SIM->get_param_bool(BXPN_VGA_REALTIME)->get());
 #if BX_SUPPORT_SMP
   fprintf(fp, "cpu: count=%u:%u:%u, ips=%u, quantum=%d, ",
     SIM->get_param_num(BXPN_CPU_NPROCESSORS)->get(), SIM->get_param_num(BXPN_CPU_NCORES)->get(),

Modified: trunk/bochs/doc/docbook/user/user.dbk
===================================================================
--- trunk/bochs/doc/docbook/user/user.dbk	2014-11-15 07:45:49 UTC (rev 12549)
+++ trunk/bochs/doc/docbook/user/user.dbk	2014-11-15 10:22:27 UTC (rev 12550)
@@ -3717,7 +3717,7 @@
 <para>
 Examples:
 <screen>
-  vga: extension=cirrus, update_freq=10
+  vga: extension=cirrus, update_freq=10, realtime=1
   vga: extension=vbe
 </screen>
 This defines parameters related to the VGA display
@@ -3732,9 +3732,16 @@
 </para>
 <para>
 The VGA update frequency specifies the number of display updates per second.
-The update timer now uses the realtime engine and the default value is 5.
-This parameter can be changed at runtime.
+This parameter can be changed at runtime. The default value is 5.
 </para>
+<para>
+The 'realtime' option specifies the operation mode of the VGA update timer.
+If set to 1, the VGA timer is based on realtime, otherwise it is based on the
+ips setting. If the host is slow (low ips, update_freq) and the guest uses HLT
+appropriately, setting this to 0 and "clock: sync=none" may improve the
+responsiveness of the guest GUI when the guest is otherwise idle. The default
+value is 1.
+</para>
 </section>
 
 <section>

Modified: trunk/bochs/doc/man/bochsrc.5
===================================================================
--- trunk/bochs/doc/man/bochsrc.5	2014-11-15 07:45:49 UTC (rev 12549)
+++ trunk/bochs/doc/man/bochsrc.5	2014-11-15 10:22:27 UTC (rev 12550)
@@ -1,5 +1,5 @@
 .\"Document Author:  Timothy R. Butler   -   tbutler@uninetsolutions.com"
-.TH bochsrc 5 "19 Oct 2014" "bochsrc" "The Bochs Project"
+.TH bochsrc 5 "15 Nov 2014" "bochsrc" "The Bochs Project"
 .\"SKIP_SECTION"
 .SH NAME
 bochsrc \- Configuration file for Bochs.
@@ -461,12 +461,20 @@
 
 update_freq:
 
-This parameter specifies the number of display updates per second.
-The VGA update timer now uses the realtime engine and the default
-value is 5. This parameter can be changed at runtime.
+Specifies the number of display updates per second.
+This parameter can be changed at runtime. The default value is 5.
 
+realtime:
+
+If set to 1, the VGA timer is based on realtime, otherwise it is based on the
+ips setting. If the host is slow (low ips, update_freq) and the guest uses HLT
+appropriately, setting this to 0 and "clock: sync=none" may improve the
+responsiveness of the guest GUI when the guest is otherwise idle. The default
+value is 1.
+
 Examples:
-  vga: extension=cirrus, update_freq=10
+  vga: extension=none, update_freq=10, realtime=0
+  vga: extension=cirrus, update_freq=30
   vga: extension=vbe
 
 .TP

Modified: trunk/bochs/iodev/display/vgacore.cc
===================================================================
--- trunk/bochs/iodev/display/vgacore.cc	2014-11-15 07:45:49 UTC (rev 12549)
+++ trunk/bochs/iodev/display/vgacore.cc	2014-11-15 10:22:27 UTC (rev 12550)
@@ -259,12 +259,13 @@
 
 void bx_vgacore_c::init_systemtimer(bx_timer_handler_t f_timer, param_event_handler f_param)
 {
+  const bx_bool realtime = SIM->get_param_bool(BXPN_VGA_REALTIME)->get();
   bx_param_num_c *vga_update_freq = SIM->get_param_num(BXPN_VGA_UPDATE_FREQUENCY);
   BX_VGA_THIS update_interval = (Bit32u)(1000000 / vga_update_freq->get());
-  BX_INFO(("interval=%u", BX_VGA_THIS update_interval));
+  BX_INFO(("interval=%u, mode=%s", BX_VGA_THIS update_interval, realtime ? "realtime":"standard"));
   if (BX_VGA_THIS timer_id == BX_NULL_TIMER_HANDLE) {
     BX_VGA_THIS timer_id = bx_virt_timer.register_timer(this, f_timer,
-       BX_VGA_THIS update_interval, 1, 1, 1, "vga");
+       BX_VGA_THIS update_interval, 1, 1, realtime, "vga");
     vga_update_freq->set_handler(f_param);
   }
   // VGA text mode cursor blink frequency 1.875 Hz

Modified: trunk/bochs/param_names.h
===================================================================
--- trunk/bochs/param_names.h	2014-11-15 07:45:49 UTC (rev 12549)
+++ trunk/bochs/param_names.h	2014-11-15 10:22:27 UTC (rev 12550)
@@ -116,6 +116,7 @@
 #define BXPN_SCREENMODE                  "display.screenmode"
 #define BXPN_VGA_EXTENSION               "display.vga_extension"
 #define BXPN_VGA_UPDATE_FREQUENCY        "display.vga_update_frequency"
+#define BXPN_VGA_REALTIME                "display.vga_realtime"
 #define BXPN_VOODOO                      "display.voodoo"
 #define BXPN_KEYBOARD                    "keyboard_mouse.keyboard"
 #define BXPN_KBD_TYPE                    "keyboard_mouse.keyboard.type"


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Bochs-cvs mailing list
Bochs-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bochs-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic