- 03 8月, 2010 6 次提交
-
-
由 Markus Armbruster 提交于
bdrv_eject() gets called when a device model opens or closes the tray. If the block driver implements method bdrv_eject(), that method gets called. Drivers host_cdrom implements it, and it opens and closes the physical tray, and nothing else. When a device model opens, then closes the tray, media changes only if the user actively changes the physical media while the tray is open. This is matches how physical hardware behaves. If the block driver doesn't implement method bdrv_eject(), we do something quite different: opening the tray severs the connection to the image by calling bdrv_close(), and closing the tray does nothing. When the device model opens, then closes the tray, media is gone, unless the user actively inserts another one while the tray is open, with a suitable change command in the monitor. This isn't how physical hardware behaves. Rather inconvenient when programs "helpfully" eject media to give you a chance to change it. The way bdrv_eject() behaves here turns that chance into a must, which is not what these programs or their users expect. Change the default action not to call bdrv_close(). Instead, note the tray status in new BlockDriverState member tray_open. Use it in bdrv_is_inserted(). Arguably, the device models should keep track of tray status themselves. But this is less invasive. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
Assuming that any image on a block device is not properly zero-initialized is actually wrong: Only raw images have this problem. Any other image format shouldn't care about it, they initialize everything properly themselves. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Yoshiaki Tamura 提交于
Signed-off-by: NYoshiaki Tamura <tamura.yoshiaki@lab.ntt.co.jp> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 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>
-
由 Kevin Wolf 提交于
bdrv_commit copies the image to its backing file sector by sector, which is (surprise!) relatively slow. Let's take a larger buffer and handle more sectors at once if possible. With a 1G qcow2 file, this brought the time bdrv_commit takes down from 5:06 min to 1:14 min for me. Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Artyom Tarasenko 提交于
The timer #0 is the system timer, so the timer #num_cpu is the timer of the last CPU, and it must be initialized in slavio_timer_reset. Don't mark non-existing timers as running. Signed-off-by: NArtyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 01 8月, 2010 3 次提交
-
-
由 Blue Swirl 提交于
Commit d167f9bc missed this one: /src/qemu/ui/vnc-enc-tight.c:1483: warning: 'ret' may be used uninitialized in this function Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Blue Swirl 提交于
Commit 7bccf573 missed this one: /src/qemu/ui/vnc-enc-tight.c: In function 'send_sub_rect': /src/qemu/ui/vnc-enc-tight.c:1527: warning: comparison is always true due to limited range of data type Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
由 Blue Swirl 提交于
Add a missing #include statement to avoid a warning: /src/qemu/net/tap-solaris.c: In function 'tap_open': /src/qemu/net/tap-solaris.c:189: warning: implicit declaration of function 'error_report' Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 31 7月, 2010 15 次提交
-
-
由 Hervé Poussineau 提交于
Signed-off-by: NHervé Poussineau <hpoussin@reactos.org> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Hervé Poussineau 提交于
Remove unused constant MIPS_FCR0 Signed-off-by: NHervé Poussineau <hpoussin@reactos.org> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Hervé Poussineau 提交于
Add a macro to easily enable/disable debug prints Also fix wrong printf formatters Signed-off-by: NHervé Poussineau <hpoussin@reactos.org> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Edgar E. Iglesias 提交于
Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Edgar E. Iglesias 提交于
Set high to a word aligned address beyond loaded image. Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Mike McCormack 提交于
This header is not present on my system and causes a build failure, but is also not used in these files, so remove it. Signed-off-by: NMike McCormack <mikem@ring3k.org> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Amit Shah 提交于
When a 'cont' is issued on a VM that's just waiting for an incoming migration, the VM reboots and boots into the guest, possibly corrupting its storage since it could be shared with another VM running elsewhere. Ensure that a VM started with '-incoming' is only run when an incoming migration successfully completes. A new qerror, QERR_MIGRATION_EXPECTED, is added to signal that 'cont' failed due to no incoming migration has been attempted yet. Reported-by: NLaine Stump <laine@redhat.com> Signed-off-by: NAmit Shah <amit.shah@redhat.com> Reviewed-by: NLuiz Capitulino <lcapitulino@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Isaku Yamahata 提交于
Use PCI_DEVFN() where appropriate. The resulted stripped binary remains same with/without thie patch. Cc: Huacai Chen <zltjiangshi@gmail.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Joel Schopp 提交于
We already set sockets to nonzero in the code above. So this if statement always evaluates true. Remove it. Signed-off-by: NJoel Schopp <jschopp@austin.ibm.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Joel Schopp 提交于
The variable len can get a negative return value from cvtnum, which we check for, but which is impossible with the current unsigned variable type. Currently the if(len < 0) check is pointless. This patch fixes that. Signed-off-by: NJoel Schopp <jschopp@austin.ibm.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Joel Schopp 提交于
Removing dead code. Above we already continued when rom->addr + valuegreaterthan0 < addr so this condition is always false. Signed-off-by: NJoel Schopp <jschopp@austin.ibm.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Alex Williamson 提交于
Forgot to check for and free these. Found-by: NZachary Amsden <zamsden@redhat.com> Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
由 Amit Shah 提交于
Currently virtio-serial supports a maximum of 31 ports. Specifying the 'max_ports' parameter to be > 31 on the cmd line causes badness. Ensure we initialise virtio-serial only if max_ports is within the supported range. Signed-off-by: NAmit Shah <amit.shah@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net>
-
git://repo.or.cz/qemu/kevin由 Aurelien Jarno 提交于
* 'for-anthony' of git://repo.or.cz/qemu/kevin: Fix -snapshot deleting images on disk change block: Use error codes from lower levels for error message block: default to 0 minimal / optiomal I/O size move 'unsafe' to end of caching modes in help virtio-blk: Create exit function to unregister savevm block migration: propagate return value when bdrv_write() returns < 0 ide/atapi: add support for GET EVENT STATUS NOTIFICATION
-
由 Aurelien Jarno 提交于
Commit 68a1c816 broke qemu on hosts not using guest base. It uses reserved_va unconditionally in mmap.c. To avoid to many #ifdef #endif blocks, define RESERVED_VA as either reserved_va or 0ul, and use it instead of reserved_va, similarly to what has been done with guest_base/GUEST_BASE.
-
- 30 7月, 2010 1 次提交
-
-
由 Richard Henderson 提交于
Cc: malc <av1474@comtv.ru> Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: Nmalc <av1474@comtv.ru>
-
- 29 7月, 2010 14 次提交
-
-
由 Edgar E. Iglesias 提交于
Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Edgar E. Iglesias 提交于
Verified on real HW. Signed-off-by: NEdgar E. Iglesias <edgar@axis.com>
-
由 Richard Henderson 提交于
This requires moving the PT_INTERP extraction and GUEST_BASE handling into load_elf_image. Key this off a non-null pointer argument to receive the interpreter name. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Richard Henderson 提交于
Moving toward a single copy of the elf binary loading code. Fill in the details of the loaded image into a struct image_info. Adjust create_elf_tables to read from such structures instead of from a collection of passed arguments. Don't return error values from load_elf_interp; always exit(-1) with a message to stderr. Collect elf_interpreter handling in load_elf_binary to a common spot. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Richard Henderson 提交于
At the bottom of the a.out support was the unimplemented load_aout_interp function. There were other portions of the support that didn't look right; when I went to look in the Linux kernel for clarification, I found that the support for such interpreters has been removed from binfmt_elf. There doesn't seem to be any reason to keep this broken support in qemu. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Richard Henderson 提交于
There are no supported stack-grows-up targets. We were putting the guard page at the highest address, i.e. the bottom of the stack. Use the maximum of host and guest page size for the guard size. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Richard Henderson 提交于
Validate more fields of the elf header. Extract those checks into two common functions to be used in both load_elf_interp and load_elf_binary. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Richard Henderson 提交于
First, adjust load_symbols to accept a load_bias parameter. At the same time, read the entire section header table in one go, use pread instead f lseek+read for the symbol and string tables, and properly free allocated structures on error exit paths. Second, adjust load_elf_interp to compute load_bias. This requires finding out the built-in load addresses. Which allows us to honor a pre-linked interpreter image when possible, and eliminate the hard-coded INTERP_MAP_SIZE value. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Richard Henderson 提交于
Remove ifdefs from code by defining empty inline functions when byte swapping isn't needed. Push loops over swapping arrays of structures into the swapping functions. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Richard Henderson 提交于
The only consideration on this value is the target endianness. The existing defines were incorrect for alpha and sh4eb. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Richard Henderson 提交于
Define BPRM_BUF_SIZE to 1k and read that amount initially. If the data we want from the binary is in this buffer, use it instead of reading from the file again. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Richard Henderson 提交于
Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Richard Henderson 提交于
Moving some PPC AT_* constants from elfload.c at the same time. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
由 Richard Henderson 提交于
I caught padzero not properly initializing the .bss segment on a statically linked Alpha program. Rather than a minimal patch, replace the gross code with a single mmap+memset. Share more code between load_elf_interp and load_elf_binary. Legally, an ELF program need not have just a single .bss; and PT_LOAD segment can have memsz > filesz. Signed-off-by: NRichard Henderson <rth@twiddle.net> Signed-off-by: NEdgar E. Iglesias <edgar.iglesias@gmail.com>
-
- 28 7月, 2010 1 次提交
-
-
由 Anthony Liguori 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-