Commit Graph

49 Commits

Author SHA1 Message Date
Blue Swirl a01d6ef446 sparc32 (mostly): remove unneeded calls to device reset
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-11-07 08:55:24 +00:00
Blue Swirl 1a522e8a67 sparc32: convert IOMMU to reset + vmsd
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-10-24 19:39:17 +00:00
Anthony Liguori c227f0995e Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem.  Something
like this _must_ be presented on the list first so people can provide input
and cope with it.

This reverts commit 99a0949b72.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-01 16:12:16 -05:00
malc 99a0949b72 Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <av1474@comtv.ru>
2009-10-01 22:45:02 +04:00
Blue Swirl db3c9e08e0 Sparc32: port IOMMU to VMState design
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-28 20:46:21 +00:00
Gerd Hoffmann 81a322d4a1 qdev: add return value to init() callbacks.
Sorry folks, but it has to be.  One more of these invasive qdev patches.

We have a serious design bug in the qdev interface:  device init
callbacks can't signal failure because the init() callback has no
return value.  This patch fixes it.

We have already one case in-tree where this is needed:
Try -device virtio-blk-pci (without drive= specified) and watch qemu
segfault.  This patch fixes it.

With usb+scsi being converted to qdev we'll get more devices where the
init callback can fail for various reasons.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-08-27 20:43:28 -05:00
Blue Swirl d60efc6b0d Make CPURead/WriteFunc structure 'const'
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-25 18:29:31 +00:00
Gerd Hoffmann 668724a784 qdev/prop: convert iommu.c to helper macros.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Message-Id:
2009-08-10 13:05:51 -05:00
Blue Swirl 4b48bf059b Sparc32: move device instantiation to sun4m.c
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-08-08 20:24:47 +00:00
Blue Swirl 109819e0c0 Sparc32: use hex for version numbers
0x10000000 looks better than 268435456.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-17 11:01:50 +00:00
Gerd Hoffmann ee6847d19b qdev: rework device properties.
This patch is a major overhaul of the device properties.  The properties
are saved directly in the device state struct now, the linked list of
property values is gone.

Advantages:
  * We don't have to maintain the list with the property values.
  * The value in the property list and the value actually used by
    the device can't go out of sync any more (used to happen for
    the pci.devfn == -1 case) because there is only one place where
    the value is stored.
  * A record describing the property is required now, you can't set
    random properties any more.

There are bus-specific and device-specific properties.  The former
should be used for properties common to all bus drivers.  Typical
use case is bus addressing, i.e. pci.devfn and i2c.address.

Properties have a PropertyInfo struct attached with name, size and
function pointers to parse and print properties.  A few common property
types have PropertyInfos defined in qdev-properties.c.  Drivers are free
to implement their own very special property parsers if needed.

Properties can have default values.  If unset they are zero-filled.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16 17:28:51 -05:00
Blue Swirl 5f750b2ea0 Sparc32: convert iommu to qdev
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-07-16 13:47:55 +00:00
Jan Kiszka a08d43677f Revert "Introduce reset notifier order"
This reverts commit 8217606e6e (and
updates later added users of qemu_register_reset), we solved the
problem it originally addressed less invasively.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-29 14:18:08 -05:00
Blue Swirl 42f1ced228 Don't set IRQs on device reset and loadvm/savevm
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-06-17 19:23:44 +00:00
Avi Kivity 1eed09cb4a Remove io_index argument from cpu_register_io_memory()
The parameter is always zero except when registering the three internal
io regions (ROM, unassigned, notdirty).  Remove the parameter to reduce
the API's power, thus facilitating future change.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-06-16 15:18:37 -05:00
Jan Kiszka 8217606e6e Introduce reset notifier order
Add the parameter 'order' to qemu_register_reset and sort callbacks on
registration. On system reset, callbacks with lower order will be
invoked before those with higher order. Update all existing users to the
standard order 0.

Note: At least for x86, the existing users seem to assume that handlers
are called in their registration order. Therefore, the patch preserves
this property. If someone feels bored, (s)he could try to identify this
dependency and express it properly on callback registration.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-05-22 10:50:34 -05:00
Blue Swirl 001faf3269 Replace gcc variadic macro extension with C99 version
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2009-05-13 17:53:17 +00:00
aliguori 487414f1cb hw: remove error handling from qemu_malloc() callers (Avi Kivity)
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6529 c046a42c-6fe2-441c-8c8c-71466251a162
2009-02-05 22:06:05 +00:00
blueswir1 7b16968757 add Arbiter Enable Register support to sparc iommu (Robert Reif)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6118 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-21 10:46:23 +00:00
blueswir1 8b0de438d4 More consistent PAGE_xxx defines, avoid conflicting with system PAGE_xxx
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5863 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-03 16:29:47 +00:00
pbrook 8da3ff1809 Change MMIO callbacks to use offsets, not absolute addresses.
Signed-off-by: Paul Brook <paul@codesourcery.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5849 c046a42c-6fe2-441c-8c8c-71466251a162
2008-12-01 18:59:50 +00:00
blueswir1 a5cdf95220 Fix DMA length bug seen with NetBSD (Cliff Wright)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4816 c046a42c-6fe2-441c-8c8c-71466251a162
2008-07-01 19:28:23 +00:00
blueswir1 22548760ca Fix compiler warnings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4404 c046a42c-6fe2-441c-8c8c-71466251a162
2008-05-10 10:12:00 +00:00
blueswir1 e5e3812157 Add TurboSPARC mask ID register (Robert Reif)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3932 c046a42c-6fe2-441c-8c8c-71466251a162
2008-01-25 19:52:54 +00:00
blueswir1 7c56045670 Register only valid register access widths
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3881 c046a42c-6fe2-441c-8c8c-71466251a162
2008-01-01 17:06:38 +00:00
blueswir1 ff403da6a7 DVMA translation errors raise a module error irq (NMI)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3880 c046a42c-6fe2-441c-8c8c-71466251a162
2008-01-01 17:04:45 +00:00
blueswir1 498fbd8aad Allow IOMMU tables above 2G
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3753 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-01 14:51:25 +00:00
blueswir1 c52428fcb1 Prevent overwriting fixed bits in AFSR
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3752 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-01 14:51:24 +00:00
blueswir1 5ad6bb97a4 Name the magic constants, wrap long lines
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3751 c046a42c-6fe2-441c-8c8c-71466251a162
2007-12-01 14:51:23 +00:00
blueswir1 5cc9878d3d Set initial value of AFSR register properly (Robert Reif)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3739 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-25 12:44:08 +00:00
pbrook 87ecb68bdf Break up vl.h.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-17 17:14:51 +00:00
blueswir1 7fbfb139ec Machine specific IOMMU version (Robert Reif)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3664 c046a42c-6fe2-441c-8c8c-71466251a162
2007-11-17 09:04:09 +00:00
blueswir1 f930d07eda More detabification
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3338 c046a42c-6fe2-441c-8c8c-71466251a162
2007-10-06 11:28:21 +00:00
blueswir1 748e49932d Fix breakage on big endian hosts (Aurelien Jarno)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3206 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-22 12:09:09 +00:00
blueswir1 5e3b100b65 Change ldl_phys to cpu_physical_memory_read, fix pte address
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3197 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-20 16:01:51 +00:00
ths 3b46e62427 find -type f | xargs sed -i 's/[\t ]*$//g' # Yes, again. Note the star in the regex.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3177 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-17 08:09:54 +00:00
ths 5fafdf24ef find -type f | xargs sed -i 's/[\t ]$//g' # on most files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
2007-09-16 21:08:06 +00:00
blueswir1 225d4be709 Log invalid accesses (no faults generated yet)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3115 c046a42c-6fe2-441c-8c8c-71466251a162
2007-08-11 07:52:09 +00:00
blueswir1 981a2e9906 Improve iommu debugging, use register names
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3114 c046a42c-6fe2-441c-8c8c-71466251a162
2007-08-11 07:49:55 +00:00
blueswir1 fda77c2d65 Fix loadvm
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3044 c046a42c-6fe2-441c-8c8c-71466251a162
2007-07-03 09:55:03 +00:00
blueswir1 5dcb6b914e Use full 36-bit physical address space on SS10
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2830 c046a42c-6fe2-441c-8c8c-71466251a162
2007-05-19 12:58:30 +00:00
bellard 67e999be93 Separate the DMA controllers - Convert ESP to new DMA methods (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2143 c046a42c-6fe2-441c-8c8c-71466251a162
2006-09-03 16:09:07 +00:00
pbrook a917d384ac SCSI TCQ support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2139 c046a42c-6fe2-441c-8c8c-71466251a162
2006-08-29 04:52:16 +00:00
bellard 05f3fb8de3 endianness fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1586 c046a42c-6fe2-441c-8c8c-71466251a162
2005-10-30 19:34:15 +00:00
bellard 4e3b1ea1b8 sparc merge (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1578 c046a42c-6fe2-441c-8c8c-71466251a162
2005-10-30 17:24:19 +00:00
bellard 66321a11a4 sparc update (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1350 c046a42c-6fe2-441c-8c8c-71466251a162
2005-04-06 20:47:48 +00:00
bellard e80cfcfc88 SPARC merge
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1179 c046a42c-6fe2-441c-8c8c-71466251a162
2004-12-19 23:18:01 +00:00
bellard 8d5f07fa3b sparc merge (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1098 c046a42c-6fe2-441c-8c8c-71466251a162
2004-10-04 21:23:09 +00:00
bellard 420557e898 full system SPARC emulation (Blue Swirl)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1085 c046a42c-6fe2-441c-8c8c-71466251a162
2004-09-30 22:13:50 +00:00