1. 01 6月, 2015 1 次提交
  2. 29 5月, 2015 1 次提交
    • G
      kbd: add brazil kbd keys to qemu · b771f470
      Gerd Hoffmann 提交于
      The brazilian computer keyboard layout has two extra keys (compared to
      the usual 105-key intl ps/2 keyboard).  This patch makes these two keys
      known to qemu.
      
      For historic reasons qemu has two ways to specify a key:  A QKeyCode
      (name-based) or a number (ps/2 scancode based).  Therefore we have to
      update multiple places to make new keys known to qemu:
      
        (1) The QKeyCode definition in qapi-schema.json
        (2) The QKeyCode <-> number mapping table in ui/input-keymap.c
      
      This patch does just that.  With this patch applied you can send those
      two keys to the guest using the send-key monitor command.
      
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NMichael Tokarev <mjt@tls.msk.ru>
      b771f470
  3. 14 5月, 2015 1 次提交
  4. 08 5月, 2015 3 次提交
  5. 06 5月, 2015 3 次提交
    • E
      qapi: Drop inline nested structs in query-pci · 9fa02cd1
      Eric Blake 提交于
      A future patch will be using a 'name':{dictionary} entry in the
      QAPI schema to specify a default value for an optional argument
      (see previous commit message for more details why); but existing
      use of inline nested structs conflicts with that goal. This patch
      fixes one of only two commands relying on nested types, by
      breaking the nesting into an explicit type; it means that the
      type is now boxed instead of unboxed in C code, but the QMP wire
      format is unaffected by this change.
      
      Prefer the safer g_new0() while making the conversion, and reduce
      some long lines.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      9fa02cd1
    • E
      qapi: Use 'struct' instead of 'type' in schema · 895a2a80
      Eric Blake 提交于
      Referring to "type" as both a meta-type (built-in, enum, union,
      alternate, or struct) and a specific type (the name that the
      schema uses for declaring structs) is confusing.  Do the bulk of
      the conversion to "struct" in qapi schema, with a fairly
      mechanical:
      
      for f in `find -name '*.json'; do sed -i "s/'type'/'struct'/"; done
      
      followed by manually filtering out the places where we have a
      'type' embedded in 'data'.  Then tweak a couple of tests whose
      output changes slightly due to longer lines.
      
      I also verified that the generated files for QMP and QGA (such
      as qmp-commands.h) are the same before and after, as assurance
      that I didn't leave in any accidental member name changes.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      895a2a80
    • E
      qapi: Unify type bypass and add tests · d708cdbe
      Eric Blake 提交于
      For a few QMP commands, we are forced to pass an arbitrary type
      without tracking it properly in QAPI.  Among the existing clients,
      this unnamed type was spelled 'dict', 'visitor', and '**'; this
      patch standardizes on '**', matching the documentation changes
      earlier in the series.
      
      Meanwhile, for the 'gen' key, we have been ignoring the value,
      although the schema consistently used "'no'" ('success-response'
      was hard-coded to checking for 'no').  But now that we can support
      a literal "false" in the schema, we might as well use that rather
      than ignoring the value or special-casing a random string.  Note
      that these are one-way switches (use of 'gen':true is not the same
      as omitting 'gen'). Also, the use of '**' requires 'gen':false,
      but the use of 'gen':false does not mandate the use of '**'.
      
      There is no difference to the generated code.  Add some tests on
      what we'd like to guarantee, although it will take later patches
      to clean up test results and actually enforce the use of a bool
      parameter.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      d708cdbe
  6. 17 3月, 2015 2 次提交
  7. 16 3月, 2015 1 次提交
  8. 10 3月, 2015 1 次提交
  9. 22 1月, 2015 3 次提交
  10. 13 1月, 2015 2 次提交
  11. 10 12月, 2014 1 次提交
  12. 26 11月, 2014 1 次提交
  13. 13 11月, 2014 2 次提交
    • A
      QMP/input-send-event: make console parameter optional · 51fc4476
      Amos Kong 提交于
      The 'QemuConsole' is the input source for handler, we share some
      input handlers to process the input events from different QemuConsole.
      
      Normally we only have one set of keyboard, mouse, usbtablet, etc.
      The devices have different mask, it's fine to just checking mask to
      insure that the handler has the ability to process the event.
      
      I saw we try to bind console to handler in usb/dev-hid.c, but display
      always isn't available at that time.
      
      If we have multiseat setup (as Gerd said), we only have 'problem' in
      this case. Actually event from different devices have the same effect
      for system, it's fine to always use the first available handler
      without caring about the console.
      
      For send-key command, we just pass a NULL for console parameter in
      calling qemu_input_event_send_key(NULL, ..), but 'input-send-event'
      needs to care more devices.
      
      Conclusion:
      Generally assigning the special console is meanless, and we can't
      directly remove the QMP parameter for compatibility.
      
      So we can make the parameter optional. The parameter might be useful
      for some special condition: we have multiple devices without binding
      console and they all have the ability(mask) to process events, and
      we don't want to use the first one.
      
      Cc: Gerd Hoffmann <kraxel@redhat.com>
      Cc: Markus Armbruster <armbru@redhat.com>
      Cc: Marcelo Tosatti <mtosatti@redhat.com>
      Signed-off-by: NAmos Kong <akong@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      51fc4476
    • A
      935fb915
  14. 15 10月, 2014 1 次提交
    • G
      qmp: Print descriptions of object properties · 07d09c58
      Gonglei 提交于
      Add a new "description" field to DevicePropertyInfo.
      The descriptions can serve as documentation in the code,
      and they can be used to provide better help. For example:
      
      $./qemu-system-x86_64 -device virtio-blk-pci,?
      
      Before this patch:
      
      virtio-blk-pci.iothread=link<iothread>
      virtio-blk-pci.x-data-plane=bool
      virtio-blk-pci.scsi=bool
      virtio-blk-pci.config-wce=bool
      virtio-blk-pci.serial=str
      virtio-blk-pci.secs=uint32
      virtio-blk-pci.heads=uint32
      virtio-blk-pci.cyls=uint32
      virtio-blk-pci.discard_granularity=uint32
      virtio-blk-pci.bootindex=int32
      virtio-blk-pci.opt_io_size=uint32
      virtio-blk-pci.min_io_size=uint16
      virtio-blk-pci.physical_block_size=uint16
      virtio-blk-pci.logical_block_size=uint16
      virtio-blk-pci.drive=str
      virtio-blk-pci.virtio-backend=child<virtio-blk-device>
      virtio-blk-pci.command_serr_enable=on/off
      virtio-blk-pci.multifunction=on/off
      virtio-blk-pci.rombar=uint32
      virtio-blk-pci.romfile=str
      virtio-blk-pci.addr=pci-devfn
      virtio-blk-pci.event_idx=on/off
      virtio-blk-pci.indirect_desc=on/off
      virtio-blk-pci.vectors=uint32
      virtio-blk-pci.ioeventfd=on/off
      virtio-blk-pci.class=uint32
      
      After:
      
      virtio-blk-pci.iothread=link<iothread>
      virtio-blk-pci.x-data-plane=bool (on/off)
      virtio-blk-pci.scsi=bool (on/off)
      virtio-blk-pci.config-wce=bool (on/off)
      virtio-blk-pci.serial=str
      virtio-blk-pci.secs=uint32
      virtio-blk-pci.heads=uint32
      virtio-blk-pci.cyls=uint32
      virtio-blk-pci.discard_granularity=uint32
      virtio-blk-pci.bootindex=int32
      virtio-blk-pci.opt_io_size=uint32
      virtio-blk-pci.min_io_size=uint16
      virtio-blk-pci.physical_block_size=uint16 (A power of two between 512 and 32768)
      virtio-blk-pci.logical_block_size=uint16 (A power of two between 512 and 32768)
      virtio-blk-pci.drive=str (ID of a drive to use as a backend)
      virtio-blk-pci.virtio-backend=child<virtio-blk-device>
      virtio-blk-pci.command_serr_enable=bool (on/off)
      virtio-blk-pci.multifunction=bool (on/off)
      virtio-blk-pci.rombar=uint32
      virtio-blk-pci.romfile=str
      virtio-blk-pci.addr=int32 (Slot and optional function number, example: 06.0 or 06)
      virtio-blk-pci.event_idx=bool (on/off)
      virtio-blk-pci.indirect_desc=bool (on/off)
      virtio-blk-pci.vectors=uint32
      virtio-blk-pci.ioeventfd=bool (on/off)
      virtio-blk-pci.class=uint32
      
      Cc: Markus Armbruster <armbru@redhat.com>
      Signed-off-by: NGonglei <arei.gonglei@huawei.com>
      Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Signed-off-by: NAndreas Färber <afaerber@suse.de>
      07d09c58
  15. 04 10月, 2014 1 次提交
  16. 02 10月, 2014 1 次提交
  17. 26 9月, 2014 1 次提交
  18. 25 8月, 2014 1 次提交
    • A
      cpus: Define callback for QEMU "nmi" command · 9cb805fd
      Alexey Kardashevskiy 提交于
      This introduces an NMI (Non Maskable Interrupt) interface with
      a single nmi_monitor_handler() method. A machine or a device can
      implement it. This searches for an QOM object with this interface
      and if it is implemented, calls it. The callback implements an action
      required to cause debug crash dump on in-kernel debugger invocation.
      The callback returns Error**.
      
      This adds a nmi_monitor_handle() helper which walks through
      all objects to find the interface. The interface method is called
      for all found instances.
      
      This adds support for it in qmp_inject_nmi(). Since no architecture
      supports it at the moment, there is no change in behaviour.
      
      This changes inject-nmi command description for HMP and QMP.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Reviewed-by: NAlexander Graf <agraf@suse.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      9cb805fd
  19. 06 8月, 2014 1 次提交
    • P
      backends: Introduce chr-testdev · 5692399f
      Paolo Bonzini 提交于
      From: Paolo Bonzini <pbonzini@redhat.com>
      
      chr-testdev enables a virtio serial channel to be used for guest
      initiated qemu exits. hw/misc/debugexit already enables guest
      initiated qemu exits, but only for PC targets. chr-testdev supports
      any virtio-capable target. kvm-unit-tests/arm is already making use
      of this backend.
      
      Currently there is a single command implemented, "q".  It takes a
      (prefix) argument for the exit code, thus an exit is implemented by
      writing, e.g. "1q", to the virtio-serial port.
      
      It can be used as:
         $QEMU ... \
           -device virtio-serial-device \
           -device virtserialport,chardev=ctd -chardev testdev,id=ctd
      
      or, use:
         $QEMU ... \
           -device virtio-serial-device \
           -device virtconsole,chardev=ctd -chardev testdev,id=ctd
      
      to bind it to virtio-serial port0.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NAndrew Jones <drjones@redhat.com>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      5692399f
  20. 29 6月, 2014 1 次提交
  21. 27 6月, 2014 4 次提交
  22. 23 6月, 2014 6 次提交
  23. 19 6月, 2014 1 次提交