Commit Graph

30272 Commits

Author SHA1 Message Date
espes f49702010c fix handling of inline array strides 2015-07-02 23:19:30 +10:00
espes a1872ce97e fix inline UB_D3D attributes; call frame terminator for debugging 2015-07-02 22:03:30 +10:00
espes fa4abd286b set gl context once only in puller thread 2015-07-02 21:56:56 +10:00
espes d098d7f86d puller thread shold be joinable? 2015-07-02 21:55:29 +10:00
espes 5a131570bb rejig glo extension stuff 2015-07-02 21:54:33 +10:00
espes b9eda55bfb stub out acpi gpio regs 2015-07-02 16:55:41 +10:00
espes 9c1123bd4e (╯°□°)╯︵ ┻━┻ 2015-06-21 22:04:35 +10:00
espes 68db7724c7 dsp debug print to stdout 2015-06-21 22:03:43 +10:00
espes b1dfbc6037 maybe this is more correct handling of flip_stall? 2015-06-21 16:41:10 +10:00
Peter Crosthwaite ae1f36f12b cpus: Don't kick un-realized cpus.
following a464982499, it's now possible for
there to be attempts to take the BQL before CPUs have been realized in
cases where a machine model inits peripherals before the first CPU.

BQL lock aquisition kicks the first_cpu, leading to a segfault if this
happens pre-realize. Guard the CPU kick routine to perform no action for
a CPU that doesn't exist or doesn't have a thread yet.

There was a fix to this with commit
6b49809c59, but the check there misses
the case where the CPU has been inited and not realized. Strengthen the
check to make sure that the first_cpu has a thread (i.e. it is
realized) before allowing the kick.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-Id: <1427107689-6946-1-git-send-email-peter.crosthwaite@xilinx.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-06-21 14:46:20 +10:00
Paolo Bonzini c5d92c871f cpus: be more paranoid in avoiding deadlocks
For good measure, ensure that the following sequence:

   thread 1 calls qemu_mutex_lock_iothread
   thread 2 calls qemu_mutex_lock_iothread
   VCPU thread are created
   VCPU thread enters execution loop

results in the VCPU threads letting the other two threads run
and obeying iothread_requesting_mutex even if the VCPUs are
not halted.  To do this, check iothread_requesting_mutex
before execution starts.

Tested-by: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-06-21 14:46:11 +10:00
Paolo Bonzini 620f0af8d5 cpus: fix deadlock and segfault in qemu_mutex_lock_iothread
When two threads (other than the low-priority TCG VCPU thread)
are competing for the iothread lock, a deadlock can happen.  This
is because iothread_requesting_mutex is set to false by the first
thread that gets the mutex, and then the VCPU thread might never
yield from the execution loop.  If iothread_requesting_mutex is
changed from a bool to a counter, the deadlock is fixed.

However, there is another bug in qemu_mutex_lock_iothread that
can be triggered by the new call_rcu thread.  The bug happens
if qemu_mutex_lock_iothread is called before the CPUs are
created.  In that case, first_cpu is NULL and the caller
segfaults in qemu_mutex_lock_iothread.  To fix this, just
do not do the kick if first_cpu is NULL.

Reported-by: Leon Alrae <leon.alrae@imgtec.com>
Reported-by: Andreas Gustafsson <gson@gson.org>
Tested-by: Leon Alrae <leon.alrae@imgtec.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2015-06-21 14:43:30 +10:00
espes f0184232aa dont busywait for surface flip 2015-06-21 11:50:53 +10:00
espes 2bb6b5b275 bdrv_open changed 2015-06-21 04:10:41 +10:00
espes ff304138d7 Merge tag 'v1.7.2' into xbox 2015-06-21 04:07:41 +10:00
espes cab5558bc1 untested surface format 2015-06-21 03:57:14 +10:00
espes e91dff0bed maybe slightly less racey 2015-06-21 03:57:08 +10:00
espes 0ca0cc251d build fixes 2015-06-21 01:41:32 +10:00
espes 282894119a Merge tag 'v1.7.0' into xbox17
Conflicts:
	blockdev.c
	hw/audio/ac97.c
2015-06-21 00:56:44 +10:00
espes bce8d4ec76 some minor signature cleanups 2015-06-18 15:39:44 +10:00
espes 9e58566c29 ifdef out xbox rtc hacks 2015-06-15 21:11:01 +10:00
espes c75d30d5e5 tidy dsp dma DPRINTF 2015-06-15 16:22:53 +10:00
espes 4c3129b973 test irc notification 2015-06-15 15:58:44 +10:00
espes cfb5a59e10 some dma tweaks 2015-06-15 13:36:43 +10:00
espes a92748812b copy more code in bootstrap 2015-06-14 23:58:05 +10:00
espes 3e6fc14a4c cleanup, integrate with apu 2015-06-14 22:51:54 +10:00
espes 77374dde69 minor cleanups 2015-06-14 20:18:07 +10:00
espes 9a882a9db9 more inst 2015-06-14 19:52:12 +10:00
espes 5cfb52aebf instructions, mix 2015-06-14 16:16:39 +10:00
espes 7f336a762e dma kinda 2015-06-14 10:50:51 +10:00
espes 8f556211d9 more rejig 2015-06-14 00:52:15 +10:00
espes ecba64bbd7 interrupt naming 2015-06-14 00:52:15 +10:00
espes 291a95d3f0 init more 2015-06-14 00:52:15 +10:00
espes 1d568ccecf less args 2015-06-14 00:52:15 +10:00
espes 9f3c4f70e9 untested instructions 2015-06-14 00:52:14 +10:00
espes b0e67a7a1f some instructions, shitily 2015-06-14 00:52:14 +10:00
espes 9901c77dc4 ssstttaaattteee 2015-06-14 00:52:14 +10:00
espes 761a3b98e8 btw 2015-06-14 00:52:14 +10:00
espes 50635c450a better 2015-06-14 00:52:14 +10:00
espes 7c49af6e1f ... 2015-06-14 00:52:14 +10:00
espes 9490ae7e78 factor 2015-06-14 00:52:14 +10:00
espes 7302ce570f rejig dispatch, some new instructions 2015-06-14 00:52:13 +10:00
espes 1017e21968 wip some instructions, cleanups 2015-06-14 00:52:13 +10:00
espes fb5e9617a9 adapted 2015-06-14 00:52:13 +10:00
espes 35e0ab7e69 kill dsp_core 2015-06-14 00:52:13 +10:00
espes 8d029a7c2e kill wut 2015-06-14 00:52:13 +10:00
espes 537edc85f3 style, build 2015-06-14 00:52:12 +10:00
espes 6f22e7679b import hatari dsp 2015-06-14 00:52:12 +10:00
espes 4bb3043bf5 bah 2015-06-14 00:52:04 +10:00
espes b3868ad7d1 Merge pull request #3 from Grovespaz/xbox
Add Linux support.
2015-05-23 00:48:17 +10:00