1. 09 11月, 2009 3 次提交
    • G
      QemuOpts: command line switches for the config file. · 715a664a
      Gerd Hoffmann 提交于
      Adds -readconfig and -writeconfig command line switches to read/write
      QemuOpts from config file.
      
      In theory you should be able to do:
      
        qemu < machine config cmd line switches here > -writeconfig vm.cfg
        qemu -readconfig vm.cfg
      
      In practice it will not work.  Not all command line switches are
      converted to QemuOpts, so you'll have to keep the not-yet converted ones
      on the second line.  Also there might be bugs lurking which prevent even
      the converted ones from working correctly.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      715a664a
    • M
      Configurable block format whitelist · eb852011
      Markus Armbruster 提交于
      We have code for a quite a few block formats.  While I trust that all
      of these formats are useful at least for some people in some
      circumstances, some of them are of a kind that friends don't let
      friends use in production.
      
      This patch provides an optional block format whitelist, default off.
      If a whitelist is configured with --block-drv-whitelist, QEMU proper
      can use only whitelisted formats.  Other programs, like qemu-img, are
      not affected.
      
      Drivers for formats off the whitelist still participate in format
      probing, to ensure all programs probe exactly the same.  Without that,
      QEMU proper would be prone to treat images with a format off the
      whitelist as raw when the image's format is probed.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      eb852011
    • N
      Added readonly flag to -drive command · 59f2689d
      Naphtali Sprei 提交于
      This is a slightly revised patch for adding readonly flag to the -drive command.
      Even though this patch is "stand-alone", it assumes a previous related patch (in Anthony staging tree), that passes
      the readonly attribute of the drive to the guest OS, applied first.
      
      This enables sharing same image between guests, with readonly access.
      Implementaion mark the drive as read_only and changes the flags when actually opening the file.
      The readonly attribute of a qcow also passed to it's base file.
      For ide that cannot pass the readonly attribute to the guest OS, disallow the readonly flag.
      
      Also, return error code from bdrv_truncate for readonly drive.
      Signed-off-by: NNaphtali Sprei <nsprei@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      59f2689d
  2. 07 11月, 2009 1 次提交
    • G
      v3: don't call reset functions on cpu initialization · c1699988
      Glauber Costa 提交于
      There is absolutely no need to call reset functions when initializing
      devices. Since we are already registering them, calling qemu_system_reset()
      should suffice. Actually, it is what happens when we reboot the machine,
      and using the same process instead of a special case semantics will even
      allow us to find bugs easier.
      
      Furthermore, the fact that we initialize things like the cpu quite early,
      leads to the need to introduce synchronization stuff like qemu_system_cond.
      This patch removes it entirely. All we need to do is call qemu_system_reset()
      only when we're already sure the system is up and running
      
      I tested it with qemu (with and without io-thread) and qemu-kvm, and it
      seems to be doing okay - although qemu-kvm uses a slightly different patch.
      
      [ v2: user mode still needs cpu_reset, so put it in ifdef. ]
      [ v3: leave qemu_system_cond for now. ]
      Signed-off-by: NGlauber Costa <glommer@redhat.com>
      Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
      c1699988
  3. 31 10月, 2009 1 次提交
  4. 30 10月, 2009 5 次提交
  5. 28 10月, 2009 2 次提交
  6. 17 10月, 2009 1 次提交
  7. 15 10月, 2009 3 次提交
  8. 12 10月, 2009 1 次提交
  9. 07 10月, 2009 7 次提交
    • M
      Final net cleanup after conversion to QemuOpts · dc1c9fe8
      Mark McLoughlin 提交于
      Now that net_client_init() has no users, kill it off and rename
      net_client_init_from_opts().
      
      There is no further need for the old code in net_client_parse() either.
      We use qemu_opts_parse() 'firstname' facitity for that. Instead, move
      the special handling of the 'vmchannel' type there.
      
      Simplify the vl.c code into merely call net_client_parse() for each
      -net command line option and then calling net_init_clients() later
      to iterate over the options and create the clients.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      dc1c9fe8
    • M
      Port usb net to QemuOpts · 13cf8f21
      Mark McLoughlin 提交于
      We need net_client_init_from_opts() exported for this
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      13cf8f21
    • M
      Remove double error message for -device option parsing · b386becf
      Mark McLoughlin 提交于
      qemu_opts_parse() gives a suitable error message in all failure cases
      so we can remove the error message from the caller.
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      b386becf
    • M
      Don't exit() in config_error() · 0752706d
      Markus Armbruster 提交于
      Propagating errors up the call chain is tedious.  In startup code, we
      can take a shortcut: terminate the program.  This is wrong elsewhere,
      the monitor in particular.
      
      config_error() tries to cater for both customers: it terminates the
      program unless its mon parameter tells it it's working for the
      monitor.
      
      Its users need to return status anyway (unless passing a null mon
      argument, which none do), which their users need to check.  So this
      automatic exit buys us exactly nothing useful.  Only the dangerous
      delusion that we can get away without returning status.  Some of its
      users fell for that.  Their callers continue executing after failure
      when working for the monitor.
      
      This bites monitor command host_net_add in two places:
      
      * net_slirp_init() continues after slirp_hostfwd(), slirp_guestfwd(),
        or slirp_smb() failed, and may end up reporting success.  This
        happens for "host_net_add user guestfwd=foo": it complains about the
        invalid guest forwarding rule, then happily creates the user network
        without guest forwarding.
      
      * net_client_init() can't detect slirp_guestfwd() failure, and gets
        fooled by net_slirp_init() lying about success.  Suppresses its
        "Could not initialize device" message.
      
      Add the missing error reporting, make sure errors are checked, and
      drop the exit() from config_error().
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Signed-off-by: NMark McLoughlin <markmc@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      0752706d
    • M
      3cd67992
    • D
      offer right-ctrl as a grab option · 0ca9f8a4
      Dustin Kirkland 提交于
      Add support for -ctrl-grab to use the right-ctrl button to grab/release
      the mouse in SDL.
      
      The multi-button ctrl-alt and ctrl-alt-shift grab buttons present an
      accessibility problem to users who cannot press more than one button
      at a time.
      
      https://bugs.edge.launchpad.net/ubuntu/+source/qemu-kvm/+bug/237635Signed-off-by: NDustin Kirkland <kirkland@canonical.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      0ca9f8a4
    • G
      Reorganize option rom (+linux kernel) loading. · 45a50b16
      Gerd Hoffmann 提交于
      This patch adds infrastructure to maintain memory regions which must be
      restored on reset.  That includes roms (vga bios and option roms on pc),
      but is also used when loading linux kernels directly.  Features:
      
        - loading files is supported.
        - passing blobs is supported.
        - target address range is supported (for optionrom area).
        - fixed target memory address is supported (linux kernel).
      
      New in v2:
        - writes to ROM are done only at initial boot.
        - also handle aout and uimage loaders.
        - drop unused fread_targphys() function.
      
      The final memory layout is created once all memory regions are
      registered.  The option roms get addresses assigned and the
      registered regions are checked against overlaps.  Finally all data
      is copyed to the guest memory.
      
      Advantages:
      
        (1) Filling memory on initial boot and on reset takes the same
            code path, making reset more robust.
        (2) The need to keep track of the option rom load address is gone.
        (3) Due to (2) option roms can be loaded outside pc_init().  This
            allows to move the pxe rom loading into the nic drivers for
            example.
      
      Additional bonus:  There is a 'info roms' monitor command now.
      
      The patch also switches over pc.c and removes the
      option_rom_setup_reset() and load_option_rom() functions.
      Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
      45a50b16
  10. 06 10月, 2009 1 次提交
  11. 05 10月, 2009 8 次提交
  12. 03 10月, 2009 1 次提交
  13. 02 10月, 2009 2 次提交
  14. 28 9月, 2009 1 次提交
  15. 27 9月, 2009 3 次提交