]> Git Repo - qemu.git/commit
qdev: Use int32_t container for devfn property
authorMichael Roth <[email protected]>
Sun, 4 Mar 2012 19:38:27 +0000 (13:38 -0600)
committerAndreas Färber <[email protected]>
Fri, 8 Jun 2012 14:11:14 +0000 (16:11 +0200)
commit09f1bbcd834c63da35b3fe190fcd9a20d7b04f07
tree49be20255dd293b1af972a1d7b8cd4cd6e9d87ae
parent0d30b0a2d338cd5f463a0fd3942d19f70eb6db56
qdev: Use int32_t container for devfn property

Valid range for devfn is -1 to 255 (-1 for automatic assignment). We do
not currently validate this due to devfn being stored as a uint32_t.
This can lead to segfaults and other strange behavior.

We could technically just cast it to int32_t to implement the checking,
but this will not work for visitor-based setting where we may do additional
bounds-checking based on target container type, which is int32_t for this
case.

Signed-off-by: Michael Roth <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
hw/pci.c
hw/pci.h
hw/qdev-properties.c
hw/qdev.h
This page took 0.028673 seconds and 4 git commands to generate.