- Dec 17, 2010
-
-
Ryan Harper authored
If a user decides to punish a guest by revoking its block device via drive_del, and subsequently also attempts to remove the pci device backing it, and the device is using blockdev_auto_del() then we get a segfault when we attempt to access dinfo->auto_del.[1] The fix is to check if drive_get_by_blockdev() actually returns a valid dinfo pointer or not. 1. (qemu) pci_add auto storage file=images/test01.raw,if=virtio,id=block1,snapshot=on (qemu) drive_del block1 (qemu) pci_del 5 *segfault* Signed-off-by:
Ryan Harper <ryanh@us.ibm.com> Tested-by:
Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Anthony Liguori authored
-
Anthony Liguori authored
-
Anthony Liguori authored
-
Anthony Liguori authored
-
Anthony Liguori authored
-
- Dec 14, 2010
-
-
Stefan Hajnoczi authored
The qemu-img create command should check the backing format to ensure only image files with valid backing formats are created. By checking in qemu-img.c we can print a useful error message. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Free option parameter lists in the img_create() error return path. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Yoda said, "list is the templace is". Fix this. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
parse_option_parameters() may need to create a new option parameter list from a template list. Use append_option_parameters() instead of duplicating the code. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Jes Sorensen authored
If -6 or -e is specified, an error message is printed and we exit. It does not print help() to avoid the error message getting lost in the noise. Signed-off-by:
Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Christian Brunner authored
RBD is an block driver for the distributed file system Ceph (http://ceph.newdream.net/ ). This driver uses librados (which is part of the Ceph server) for direct access to the Ceph object store and is running entirely in userspace (Yehuda also wrote a driver for the linux kernel, that can be used to access rbd volumes as a block device). Signed-off-by:
Yehuda Sadeh <yehuda@hq.newdream.net> Signed-off-by:
Christian Brunner <chb@muc.de> Reviewed-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Jes Sorensen authored
Signed-off-by:
Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Jes Sorensen authored
This patch changes qemu-img to exit if an unknown option is detected, instead of trying to continue with a set of arguments which may be incorrect. Signed-off-by:
Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Jes Sorensen authored
Signed-off-by:
Jes Sorensen <Jes.Sorensen@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Jes Sorensen authored
This consolidates the printing of block driver options in print_block_option_help() which is called from both img_create() and img_convert(). This allows for the "?" detection to be done just after the parsing of options and the filename, instead of half way down the codepath of these functions. Signed-off-by:
Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Jes Sorensen authored
This allows for jumping to 'out:' consistently for error exit. Signed-off-by:
Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Jes Sorensen authored
Signed-off-by:
Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Jes Sorensen authored
Signed-off-by:
Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Stefan Hajnoczi authored
Filenames may start with "<protocol>:" to explicitly use a protocol like nbd. Filenames with unknown protocols are rejected in most of QEMU except for bdrv_create_file(). Even if a file with an invalid filename can be created, QEMU cannot use it since all the other relevant functions reject such paths. Make bdrv_create_file() consistent. Signed-off-by:
Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Dec 12, 2010
-
-
Richard W.M. Jones authored
This commit causes the watchdog timer to be reset when a guest is hard-rebooted. The failure case previously was as follows: (a) guest boots, watchdog is enabled (b) guest does a reset eg: echo 'b' > /proc/sysrq-trigger (note that an ordinary /sbin/reboot wouldn't hit this case since as the watchdog daemon is shut down, the daemon would properly disable the watchdog device) (c) the reboot takes longer than the remaining time on the watchdog (d) the watchdog therefore fires during the reboot (e) probably the VM would just reboot again at this point which is pretty benign, but it could depend on the action that the user had selected for the watchdog Now we use the qdev reset function to register a reset handler which disables the timer. Note the handler is called _either_ just after init _or_ when the guest reboots. In the i6300esb case there is a small refactoring of the code so that the device's internal state is now fully restored to defaults on a reboot. Signed-off-by:
Richard W.M. Jones <rjones@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
- Dec 11, 2010
-
-
Gleb Natapov authored
Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Action that depends on fully initialized device model should register with this notifier chain. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Extend -option-rom command to have additional parameter ,bootindex=. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Change fw_cfg_add_file() to get full file path as a parameter instead of building one internally. Two reasons for that. First caller may need to know how file is named. Second this moves policy of file naming out from fw_cfg. Platform may want to use more then two levels of directories for instance. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
If bootindex is specified on command line a string that describes device in firmware readable way is added into sorted list. Later this list will be passed into firmware to control boot order. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Ports on root hub will have NULL here. This is needed to reconstruct path from device to its root hub to build device path. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Prints out mmio or pio used to access child device. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Use device ioports to create unique device path. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Store all io ports used by device in ISADevice structure. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
New get_fw_dev_path callback will be used for build device path usable by firmware in contrast to qdev qemu internal device path. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Gleb Natapov authored
Add "fw_name" to DeviceInfo to use in device path building. In contrast to "name" "fw_name" should refer to functionality device provides instead of particular device model like "name" does. Signed-off-by:
Gleb Natapov <gleb@redhat.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Blue Swirl authored
'info mem' didn't show correct information for PAE mode and x86_64 long mode. Fix by implementing the output for missing modes. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Blue Swirl authored
'info tlb' didn't show correct information for PAE mode and x86_64 long mode. Implement the missing modes. Also print NX bit for PAE and long modes. Fix off-by-one error in 32 bit mode mask. Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-
Bernhard Kohl authored
The device shall set its default hardware state after each reset. This includes that the timer is stopped which is especially important if the guest does a reboot independantly of a watchdog bite. I moved the initialization of the state variables completely from the init to the reset function which is called right after init during the first boot and afterwards during each reboot. Signed-off-by:
Bernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by:
Blue Swirl <blauwirbel@gmail.com>
-