1. 17 11月, 2010 1 次提交
  2. 04 11月, 2010 2 次提交
  3. 22 10月, 2010 1 次提交
  4. 14 10月, 2010 1 次提交
  5. 03 10月, 2010 1 次提交
  6. 01 10月, 2010 19 次提交
  7. 10 9月, 2010 2 次提交
    • S
      trace: Add trace-file command to open/close/flush trace file · c5ceb523
      Stefan Hajnoczi 提交于
      This patch adds the trace-file command:
      
        trace-file [on|off|flush]
      
        Open, close, or flush the trace file.  If no argument is given,
        the status of the trace file is displayed.
      
      The trace file is turned on by default but is only written out when the
      trace buffer becomes full.  The flush operation can be used to force
      write out at any time.
      
      Turning off the trace file does not change the state of trace events;
      tracing will continue to the trace buffer.  When the trace file is off,
      use "info trace" to display the contents of the trace buffer in memory.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      
      This commit also contains the trace-file sub-command from the following
      commit:
      
      commit 5ce8d1a957afae2c52ad748944ce72848ccf57bd
      Author: Prerna Saxena <prerna@linux.vnet.ibm.com>
      Date:   Wed Aug 4 16:23:54 2010 +0530
      
          trace: Add options to specify trace file name at startup and runtime
      
          This patch adds an optional command line switch '-trace' to specify the
          filename to write traces to, when qemu starts.
          Eg, If compiled with the 'simple' trace backend,
          [temp@system]$ qemu -trace FILENAME IMAGE
          Allows the binary traces to be written to FILENAME instead of the option
          set at config-time.
      
          Also, this adds monitor sub-command 'set' to trace-file commands to
          dynamically change trace log file at runtime.
          Eg,
          (qemu)trace-file set FILENAME
          This allows one to set trace outputs to FILENAME from the default
          specified at startup.
      Signed-off-by: NPrerna Saxena <prerna@linux.vnet.ibm.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      c5ceb523
    • P
      trace: Support for dynamically enabling/disabling trace events · 22890ab5
      Prerna Saxena 提交于
      This patch adds support for dynamically enabling/disabling of trace events.
      This is done by internally maintaining each trace event's state, and
      permitting logging of data from a trace event only if it is in an
      'active' state.
      
      Monitor commands added :
      1) info trace-events 		: to view all available trace events and
      				  their state.
      2) trace-event NAME on|off 	: to enable/disable data logging from a
      				  given trace event.
      				  Eg, trace-event paio_submit off
      				  	disables logging of data when
      					paio_submit is hit.
      
      By default, all trace-events are disabled. One can enable desired trace-events
      via the monitor.
      Signed-off-by: NPrerna Saxena <prerna@linux.vnet.ibm.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      
      trace: Monitor command 'info trace'
      
      Monitor command 'info trace' to display contents of trace buffer
      Signed-off-by: NPrerna Saxena <prerna@linux.vnet.ibm.com>
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      
      trace: Remove monitor.h dependency from simpletrace
      
      User-mode targets don't have a monitor so the simple trace backend
      currently does not build on those targets.  This patch abstracts the
      monitor printing interface so there is no direct coupling between
      simpletrace and the monitor.
      Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
      22890ab5
  8. 23 8月, 2010 1 次提交
  9. 03 8月, 2010 1 次提交
    • M
      loadvm: improve tests before bdrv_snapshot_goto() · f0aa7a8b
      Miguel Di Ciurcio Filho 提交于
      This patch improves the resilience of the load_vmstate() function, doing
      further and better ordered tests.
      
      In load_vmstate(), if there is any error on bdrv_snapshot_goto(), except if the
      error is on VM state device, load_vmstate() will return zero and the VM will be
      started with major corruption chances.
      
      The current process:
      - test if there is any writable device without snapshot support
          - if exists return -error
      - get the device that saves the VM state, possible return -error but unlikely
      because it was tested earlier
      - flush I/O
      - run bdrv_snapshot_goto() on devices
          - if fails, give an warning and goes to the next (not good!)
          - if fails on the VM state device, return zero (not good!)
      - check if the requested snapshot exists on the device that saves the VM state
      and the state is not zero
          - if fails return -error
      - open the file with the VM state
          - if fails return -error
      - load the VM state
          - if fails return -error
      - return zero
      
      New behavior:
      - get the device that saves the VM state
          - if fails return -error
      - check if the requested snapshot exists on the device that saves the VM state
      and the state is not zero
          - if fails return -error
      - test if there is any writable device without snapshot support
          - if exists return -error
      - test if the devices with snapshot support have the requested snapshot
          - if anyone fails, return -error
      - flush I/O
      - run snapshot_goto() on devices
          - if anyone fails, return -error
      - open the file with the VM state
          - if fails return -error
      - load the VM state
          - if fails return -error
      - return zero
      
      do_loadvm must not call vm_start if any error has occurred in load_vmstate.
      Signed-off-by: NMiguel Di Ciurcio Filho <miguel.filho@gmail.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      f0aa7a8b
  10. 31 7月, 2010 1 次提交
  11. 03 7月, 2010 1 次提交
  12. 02 7月, 2010 9 次提交
    • J
      monitor: Allow to exclude commands from QMP · a6c4d364
      Jan Kiszka 提交于
      Ported commands that are marked 'user_only' will not be considered for
      QMP monitor sessions. This allows to implement new commands that do not
      (yet) provide a sufficiently stable interface for QMP use.
      Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com>
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      a6c4d364
    • L
      QMP: handle_qmp_command(): Small cleanup · e4940c60
      Luiz Capitulino 提交于
      Drop a unneeded label and QDECREF() call.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      e4940c60
    • L
      QMP: Drop old input object checking · 0bbab46d
      Luiz Capitulino 提交于
      Previous commit added qmp_check_input_obj(), it does all the
      checking we need.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      0bbab46d
    • L
      QMP: Introduce qmp_check_input_obj() · c917c8f3
      Luiz Capitulino 提交于
      This is similar to qmp_check_client_args(), but it checks if
      the input object follows the specification (QMP/qmp-spec.txt
      section 2.3).
      
      As we're limited to three keys, the work here is quite simple:
      we iterate over the input object, checking each time if the
      current argument complies to the specification.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      c917c8f3
    • L
      QMP: Drop old client argument checker · f6b4fc8b
      Luiz Capitulino 提交于
      Previous two commits added qmp_check_client_args(), which
      fully replaces this code and is way better.
      
      It's important to note that the new checker doesn't support
      the '/' arg type. As we don't have any of those handlers
      converted to QMP, this is just dead code.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      f6b4fc8b
    • L
      QMP: New argument checker (second part) · 4af9193a
      Luiz Capitulino 提交于
      This commit introduces the second (and last) part of QMP's new
      argument checker.
      
      The job is done by check_client_args_type(), it iterates over
      the client's argument qdict and for for each argument it checks
      if it exists and if its type is valid.
      
      It's important to observe the following changes from the existing
      argument checker:
      
        - If the handler accepts an O-type argument, unknown arguments
          are passed down to it. It's up to O-type handlers to validate
          their arguments
      
        - Boolean types (eg. 'b' and '-') don't accept integers anymore,
          only json-bool
      
        - Argument types '/' and '.' are currently unsupported under QMP,
          thus they're not handled
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      4af9193a
    • L
      QMP: New argument checker (first part) · 2dbc8db0
      Luiz Capitulino 提交于
      Current QMP's argument checker is more complex than it should be
      and has (at least) one serious bug: it ignores unknown arguments.
      
      To solve both problems we introduce a new argument checker. It's
      added on top of the existing one, so that there are no regressions
      during the transition.
      
      This commit introduces the first part of the new checker, which
      is run by qmp_check_client_args() and does the following:
      
        1. Check if all mandatory arguments were provided
        2. Set flags for argument validation
      
      In order to do that, we transform the args_type string (from
      qemu-montor.hx) into a qdict and iterate over it.
      
      Next commit adds the new checker's second part: type checking and
      invalid argument detection.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      2dbc8db0
    • L
      Monitor: handle optional '-' arg as a bool · eb159d13
      Luiz Capitulino 提交于
      Historically, user monitor arguments beginning with '-' (eg. '-f')
      were passed as integers down to handlers.
      
      I've maintained this behavior in the new monitor because we didn't
      have a boolean type at the very beginning of QMP. Today we have it
      and this behavior is causing trouble to QMP's argument checker.
      
      This commit fixes the problem by doing the following changes:
      
      1. User Monitor
      
         Before: the optional arg was represented as a QInt, we'd pass 1
                 down to handlers if the user specified the argument or
                 0 otherwise
      
         This commit: the optional arg is represented as a QBool, we pass
                      true down to handlers if the user specified the
                      argument, otherwise _nothing_ is passed
      
      2. QMP
      
         Before: the client was required to pass the arg as QBool, but we'd
                 convert it to QInt internally. If the argument wasn't passed,
                 we'd pass 0 down
      
         This commit: still require a QBool, but doesn't do any conversion and
                      doesn't pass any default value
      
      3. Convert existing handlers (do_eject()/do_migrate()) to the new way
      
         Before: Both handlers would expect a QInt value, either 0 or 1
      
         This commit: Change the handlers to accept a QBool, they handle the
                      following cases:
      
                         A) true is passed: the option is enabled
                         B) false is passed: the option is disabled
                         C) nothing is passed: option not specified, use
                                               default behavior
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      eb159d13
    • L
      QMP: Fix error reporting in the async API · 5af7bbae
      Luiz Capitulino 提交于
      The current asynchronous command API doesn't return a QMP response
      when the async command fails.
      
      This is easy to reproduce with the balloon command (the sole async
      command we have so far): run qemu w/o the '-balloon virtio' option
      and try to issue the balloon command via QMP: no response will be
      sent to the client.
      
      This commit fixes the problem by making qmp_async_cmd_handler()
      return the handler's error code and then calling
      monitor_protocol_emitter() if the handler has returned an error.
      Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
      5af7bbae