- 19 6月, 2010 1 次提交
-
-
由 Blue Swirl 提交于
Convert to qdev. Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 18 6月, 2010 1 次提交
-
-
由 Blue Swirl 提交于
There's no need to use ioapic_set_irq() outside of ioapic.c, so make it static. Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 16 6月, 2010 8 次提交
-
-
由 Paul Brook 提交于
When loading a shared library that requires an executable stack, glibc uses the mprotext PROT_GROWSDOWN flag to achieve this. We don't support PROT_GROWSDOWN. Add a special case to handle changing the stack permissions in this way. Signed-off-by: NPaul Brook <paul@codesourcery.com>
-
由 Paul Brook 提交于
Teach strace code about linux specific mprotect flags. Signed-off-by: NPaul Brook <paul@codesourcery.com>
-
由 Paul Brook 提交于
Report exit status to GDB when a semihosted application exits. Signed-off-by: NPaul Brook <paul@codesourcery.com>
-
由 Edgar E. Iglesias 提交于
Move it in preparation for further changes. No functional change. Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@axis.com>
-
由 Edgar E. Iglesias 提交于
Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Edgar E. Iglesias 提交于
Prepare to return error from the individual decoders. Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@axis.com>
-
由 Richard Henderson 提交于
Some hosts (amd64, ia64) have an ABI that ignores the high bits of the 64-bit register when passing 32-bit arguments. Others require the value to be properly sign-extended for the type. I.e. "int32_t" must be sign-extended and "uint32_t" must be zero-extended to 64-bits. To effect this, extend the "sizemask" parameter to tcg_gen_callN to include the signedness of the type of each parameter. If the tcg target requires it, extend each 32-bit argument into a 64-bit temp and pass that to the function call. This ABI feature is required by sparc64, ppc64 and s390x. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Stefan Weil 提交于
Comparing an 8 bit value with ~0 does not work as expected. Replace ~0 by UINT8_MAX in comparison and also in assignment (and fix coding style, too). Cc: Gleb Natapov <gleb@redhat.com> Cc: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: NStefan Weil <weil@mail.berlios.de> Signed-off-by: Nmalc <av1474@comtv.ru>
-
- 15 6月, 2010 30 次提交
-
-
由 Jan Kiszka 提交于
Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Blue Swirl 提交于
Fix a warning from OpenBSD gcc (3.3.5 (propolice)): /src/qemu/block.c: In function `bdrv_info_stats_bs': /src/qemu/block.c:1548: warning: long long int format, long unsigned int arg (arg 6) There may be also truncation effects. Signed-off-by: NBlue Swirl <blauwirbel@gmail.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Jes Sorensen 提交于
Correct definitions for FD_CMD_SAVE and FD_CMD_RESTORE in hw/fdc.c Per https://bugs.launchpad.net/qemu/+bug/424453 the correct values for FD_CMD_SAVE is 0x2e and FD_CMD_RESTORE is 0x4e. Verified against the Intel 82078 manual which can be found at: http://wiki.qemu.org/Documentation/HardwareManuals page 22. Signed-off-by: NJes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
This is the list of drives defined with drive_init(). Hide it, so it doesn't get abused. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
We find snapshots by iterating over the list of drives defined with drive_init(). This misses host block devices defined by other means. Such means don't exist now, but will be introduced later in this series. Iterate over all host block devices instead, with bdrv_next(). Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
This is a more flexible alternative to bdrv_iterate(). Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
do_commit() and mux_proc_byte() iterate over the list of drives defined with drive_init(). This misses host block devices defined by other means. Such means don't exist now, but will be introduced later in this series. Change them to use new bdrv_commit_all(), which iterates over all host block devices. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
That's where they belong semantically (block device host part), even though the actions are actually executed by guest device code. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Christoph Hellwig 提交于
Use bdrv_pwrite to access the backing device instead of pread, and convert the driver to implementing the bdrv_open method which gives it an already opened BlockDriverState for the underlying device. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Christoph Hellwig 提交于
We don't have an equivalent to mmap in the qemu block API, so read and write the bitmap directly. At least in the dumb implementation added in this patch this is a lot less efficient, but it means cow can also work on windows, and over nbd or curl. And it fixes qemu-iotests testcase 012 which did not work properly due to issues with read-only mmap access. In addition we can also get rid of the now unused get_mmap_addr function. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Christoph Hellwig 提交于
Use pread/pwrite instead of lseek + read/write in preparation of using the qemu block API. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
If writing the L1 table to disk failed, we need to restore its old content in memory to avoid inconsistencies. Reported-by: NJuan Quintela <quintela@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Markus Armbruster 提交于
Empty file used to create an empty drive (no media). Since commit 9dfd7c7a, it's an error: "qemu: could not open disk image : No such file or directory". Older versions of libvirt can choke on this. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Miguel Di Ciurcio Filho 提交于
Both bdrv_can_snapshot() and bdrv_has_snapshot() does not work as advertized. First issue: Their names implies different porpouses, but they do the same thing and have exactly the same code. Maybe copied and pasted and forgotten? bdrv_has_snapshot() is called in various places for actually checking if there is snapshots or not. Second issue: the way bdrv_can_snapshot() verifies if a block driver supports or not snapshots does not catch all cases. E.g.: a raw image. So when do_savevm() is called, first thing it does is to set a global BlockDriverState to save the VM memory state calling get_bs_snapshots(). static BlockDriverState *get_bs_snapshots(void) { BlockDriverState *bs; DriveInfo *dinfo; if (bs_snapshots) return bs_snapshots; QTAILQ_FOREACH(dinfo, &drives, next) { bs = dinfo->bdrv; if (bdrv_can_snapshot(bs)) goto ok; } return NULL; ok: bs_snapshots = bs; return bs; } bdrv_can_snapshot() may return a BlockDriverState that does not support snapshots and do_savevm() goes on. Later on in do_savevm(), we find: QTAILQ_FOREACH(dinfo, &drives, next) { bs1 = dinfo->bdrv; if (bdrv_has_snapshot(bs1)) { /* Write VM state size only to the image that contains the state */ sn->vm_state_size = (bs == bs1 ? vm_state_size : 0); ret = bdrv_snapshot_create(bs1, sn); if (ret < 0) { monitor_printf(mon, "Error while creating snapshot on '%s'\n", bdrv_get_device_name(bs1)); } } } bdrv_has_snapshot(bs1) is not checking if the device does support or has snapshots as explained above. Only in bdrv_snapshot_create() the device is actually checked for snapshot support. So, in cases where the first device supports snapshots, and the second does not, the snapshot on the first will happen anyways. I believe this is not a good behavior. It should be an all or nothing process. This patch addresses these issues by making bdrv_can_snapshot() actually do what it must do and enforces better tests to avoid errors in the middle of do_savevm(). bdrv_has_snapshot() is removed and replaced by bdrv_can_snapshot() where appropriate. bdrv_can_snapshot() was moved from savevm.c to block.c. It makes more sense to me. The loadvm_state() function was updated too to enforce that when loading a VM at least all writable devices must support snapshots too. Signed-off-by: NMiguel Di Ciurcio Filho <miguel.filho@gmail.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
This fixes load_refcount_block which completely ignored the return value of write_refcount_block and always returned -EIO for bdrv_pwrite failure. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
Currently it would consider blocks for which get_refcount fails used. However, it's unlikely that get_refcount would succeed for the next cluster, so it's not really helpful. Return an error instead. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
get_refcount might need to load a refcount block from disk, so errors may happen. Return the error code instead of assuming a refcount of 1 and change the callers to respect error return values. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
This changes the vpc block driver (for VHD) to read/write multiple sectors at once instead of doing a request for each single sector. Before this, running qemu-iotests for VPC took ages, now it's actually quite reasonable to run it always (down from ~1 hour to 40 seconds for me). Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Gerd Hoffmann 提交于
Hook up any cleanup work which needs to be done here. Advantages over using atexit(3): (1) You get passed in a pointer to the notifier. If you embed that into your state struct you can use container_of() to get get your state info. (2) You can unregister, say when un-plugging a device. [ v2: move code out of #ifndef _WIN32 ] Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Alex Williamson 提交于
PCI hotplug currently doesn't work after a migration because we don't migrate the enable bits of the GPE state. Pull hotplug structs into vmstate. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Markus Armbruster 提交于
Restrict IDs to letters, digits, '-', '.', '_', starting with a letter. This takes care of '/' in qdev IDs breaking qbus_find(). Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Markus Armbruster 提交于
Setting the ID in pci_nic_init() is a blatant violation of the DeviceState abstraction. Which even carries a comment advising against this: /* This structure should not be accessed directly. We declare it here so that it can be embedded in individual device state structures. */ What's worse, it bypasses the code ensuring unique qdev IDs: "-device virtio-net-pci,id=foo -net nic,id=foo -net nic,name=foo" happily creates three qdevs with ID "foo". That's because qdev relies on qemu_opts_create() to ensure unique IDs, but -net nic uses a different QemuOptsList, which means id is in a different namespace. And its name is not checked for uniqueness at all. -net nic and pci_add are legacy. Use -device and device_add if you want a NIC with a qdev ID. This reverts what's still left of commit eb54b6dc "qdev: add id= support for pci nics." Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Daniel P. Berrange 提交于
When mistakenly configuring two devices in the same PCI slot, QEMU gives a not entirely obvious message about a 'devfn' being in use: $ qemu -device rtl8139 -device virtio-balloon-pci,bus=pci.0,addr=0x3 qemu-kvm: -device virtio-balloon-pci,bus=pci.0,addr=0x3: PCI: devfn 24 not available for virtio-balloon-pci, in use by rtl8139 The user does not configure 'devfn' numbers, they use slot+function. Thus the error messages should be reported back to the user with that same terminology rather than the internal QEMU terminology. This patch makes it report: $ qemu -device rtl8139 -device virtio-balloon-pci,bus=pci.0,addr=0x3 qemu: -device virtio-balloon-pci,bus=pci.0,addr=0x3.7: PCI: slot 3 function 0 not available for virtio-balloon-pci, in use by rtl8139 Signed-off-by: NDaniel P. Berrange <berrange@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Christoph Hellwig 提交于
Pass the MultiReqBuffer structure down all the way to the I/O submission instead of takin it apart. Also mark num_writes unsigned as it can't go negative, and take the check for any pending I/O requests into the submission function. Last but not least rename do_multiwrite to virtio_submit_multiwrite to fit the general naming scheme and make clear what it does. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Christoph Hellwig 提交于
There is a 1:1 relation between VirtIOBlock and BlockDriverState instances, no need to track it because it won't change. Signed-off-by: NChristoph Hellwig <hch@lst.de> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Jes Sorensen 提交于
If a USB keyboard is unplugged, the keyboard eventhandler is never removed, and events will continue to be passed through to the device, causing crashes or memory corruption. Signed-off-by: NJes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Paolo Bonzini 提交于
All signals will thus be routed through the IO thread. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Yoshiaki Tamura 提交于
This patch fixes the following error report. When changing migration-tcp.c to call migrate_fd_error() instead of close() and free() by itself, monitor is resumed, and returns allocated mig_state is set to current_migration in migration.c allows us to print "info migrate". Reported-by: NCole Robinson <crobinso@redhat.com> Signed-off-by: NYoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Yoshiaki Tamura 提交于
Although there is no difference, other migration related code use qemu_free(), and it should be better to be consistent. Signed-off-by: NYoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-