summaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2011-03-14 23:25:28 -0300
committerMarcelo Tosatti <mtosatti@redhat.com>2011-03-14 23:25:28 -0300
commit0d2956697b7e7ee457cae5789f91afe58b190bf9 (patch)
treed75230aa57a6e15aa2b1307fbc4282ae1327f344 /exec.c
parent0205c5c763526edb39ded427d6ac84a1926d3adf (diff)
parent9257d46d55f1fe4e8209be9a6870e339ac3266fe (diff)
Merge commit '9257d46d55f1fe4e8209be9a6870e339ac3266fe' into upstream-merge
* commit '9257d46d55f1fe4e8209be9a6870e339ac3266fe': (132 commits) add win32 qemu-thread implementation Refactor thread retrieval and check use win32 timer queues implement win32 dynticks timer unlock iothread during WaitForMultipleObjects hw/fmopl: Fix buffer access out-of-bounds errors moving eeprom initialization pc: fix wrong CMOS values for floppy drives microblaze: Add PVR for writeback cache, endians microblaze: Fix PetaLogix company name vmstate: move timers to use test instead of version vmstate: be able to store/save a pci device from a pointer vmstate: Add a way to send a partial array vmstate: add VMSTATE_STRUCT_VARRAY_UINT32 vmstate: add VMSTATE_INT64_ARRAY vmstate: add VMSTATE_STRUCT_VARRAY_INT32 vmstate: add UINT32 VARRAYS vmstate: Fix varrays with uint8 indexes vmstate: add VMSTATE_UINT32_EQUAL vnc: Fix stack corruption and other bitmap related bugs ... Conflicts: Makefile.objs
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/exec.c b/exec.c
index 9c6d7eacd..bb0c1be4d 100644
--- a/exec.c
+++ b/exec.c
@@ -1656,7 +1656,7 @@ void cpu_interrupt(CPUState *env, int mask)
* If called from iothread context, wake the target cpu in
* case its halted.
*/
- if (!qemu_cpu_self(env)) {
+ if (!qemu_cpu_is_self(env)) {
qemu_cpu_kick(env);
return;
}
@@ -2986,8 +2986,11 @@ void *qemu_get_ram_ptr(ram_addr_t addr)
QLIST_FOREACH(block, &ram_list.blocks, next) {
if (addr - block->offset < block->length) {
- QLIST_REMOVE(block, next);
- QLIST_INSERT_HEAD(&ram_list.blocks, block, next);
+ /* Move this entry to to start of the list. */
+ if (block != QLIST_FIRST(&ram_list.blocks)) {
+ QLIST_REMOVE(block, next);
+ QLIST_INSERT_HEAD(&ram_list.blocks, block, next);
+ }
return block->host + (addr - block->offset);
}
}