aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-03-14microblaze hw/: Don't use CPUStateAndreas Färber6-13/+13
Scripted conversion: for file in hw/microblaze_*.[hc] hw/petalogix_ml605_mmu.c hw/petalogix_s3adsp1800_mmu.c; do sed -i "s/CPUState/CPUMBState/g" $file done Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14m68k hw/: Don't use CPUStateAndreas Färber6-9/+9
Scripted conversion: for file in hw/an5206.c hw/dummy_m68k.c hw/mcf.h hw/mcf5206.c hw/mcf5208.c hw/mcf_intc.c; do sed -i "s/CPUState/CPUM68KState/g" $file done Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14lm32 hw/: Don't use CPUStateAndreas Färber2-9/+9
Scripted conversion: for file in hw/lm32_boards.c hw/milkymist.c; do sed -i "s/CPUState/CPULM32State/g" $file done Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14i386 hw/: Don't use CPUStateAndreas Färber6-30/+30
Scripted conversion: for file in hw/apic.h hw/kvm/apic.c hw/kvmvapic.c hw/pc.c hw/vmport.c hw/xen_machine_pv.c; do sed -i "s/CPUState/CPUX86State/g" $file done Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14cris hw/: Don't use CPUStateAndreas Färber6-9/+9
Scripted conversion: for file in hw/cris-boot.[hc] hw/cris_pic_cpu.c hw/axis_dev88.c hw/etraxfs.h hw/etraxfs_ser.c; do sed -i "s/CPUState/CPUCRISState/g" $file done Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14arm hw/: Don't use CPUStateAndreas Färber17-33/+33
Scripted conversion: for file in hw/arm-misc.h hw/arm_boot.c hw/arm_pic.c hw/armv7m.c hw/exynos4210.h hw/highbank.c hw/integratorcp.c hw/musicpal.c hw/omap.h hw/pxa.h hw/pxa2xx_gpio.c hw/pxa2xx_pic.c hw/realview.c hw/strongarm.h hw/versatilepb.c hw/vexpress.c hw/xilinx_zynq.c ; do sed -i "s/CPUState/CPUARMState/g" $file done Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14alpha hw/: Don't use CPUStateAndreas Färber3-9/+9
Scripted conversion: for file in hw/alpha_*.[hc]; do sed -i "s/CPUState/CPUAlphaState/g" $file done Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14xtensa-semi: Don't use CPUStateAndreas Färber1-1/+1
Scripted conversion: sed -i "s/CPUState/CPUXtensaState/g" xtensa-semi.c Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14m68k-semi: Don't use CPUStateAndreas Färber1-2/+2
Scripted conversion: sed -i "s/CPUState/CPUM68KState/g" m68k-semi.c Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14arm-semi: Don't use CPUStateAndreas Färber1-5/+5
Scripted conversion: sed -i "s/CPUState/CPUARMState/g" arm-semi.c Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-xtensa: Don't overuse CPUStateAndreas Färber4-68/+68
Scripted conversion: sed -i "s/CPUState/CPUXtensaState/g" target-xtensa/*.[hc] sed -i "s/#define CPUXtensaState/#define CPUState/" target-xtensa/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-unicore32: Don't overuse CPUStateAndreas Färber4-77/+77
Scripted conversion: sed -i "s/CPUState/CPUUniCore32State/g" target-unicore32/*.[hc] sed -i "s/#define CPUUniCore32State/#define CPUState/" target-unicore32/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-sparc: Don't overuse CPUStateAndreas Färber13-208/+208
Scripted conversion: sed -i "s/CPUState/CPUSPARCState/g" target-sparc/*.[hc] sed -i "s/#define CPUSPARCState/#define CPUState/" target-sparc/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-sh4: Don't overuse CPUStateAndreas Färber4-44/+44
Scripted conversion: sed -i "s/CPUState/CPUSH4State/g" target-sh4/*.[hc] sed -i "s/#define CPUSH4State/#define CPUState/" target-sh4/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-s390x: Don't overuse CPUStateAndreas Färber5-133/+133
Scripted conversion: sed -i "s/CPUState/CPUS390XState/g" target-s390x/*.[hc] sed -i "s/#define CPUS390XState/#define CPUState/" target-s390x/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-ppc: Don't overuse CPUStateAndreas Färber8-152/+152
Scripted conversion: sed -i "s/CPUState/CPUPPCState/g" target-ppc/*.[hc] sed -i "s/#define CPUPPCState/#define CPUState/" target-ppc/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-mips: Don't overuse CPUStateAndreas Färber5-274/+274
Scripted conversion: sed -i "s/CPUState/CPUMIPSState/g" target-mips/*.[hc] sed -i "s/#define CPUMIPSState/#define CPUState/" target-mips/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-microblaze: Don't overuse CPUStateAndreas Färber6-57/+57
Scripted conversion: sed -i "s/CPUState/CPUMBState/g" target-microblaze/*.[hc] sed -i "s/#define CPUMBState/#define CPUState/" target-microblaze/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-m68k: Don't overuse CPUStateAndreas Färber4-65/+65
Scripted conversion: sed -i "s/CPUState/CPUM68KState/g" target-m68k/*.[hc] sed -i "s/#define CPUM68KState/#define CPUState/" target-m68k/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-lm32: Don't overuse CPUStateAndreas Färber5-54/+54
Scripted conversion: sed -i "s/CPUState/CPULM32State/g" target-lm32/*.[hc] sed -i "s/#define CPULM32State/#define CPUState/" target-lm32/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-i386: Don't overuse CPUStateAndreas Färber6-222/+222
Scripted conversion: sed -i "s/CPUState/CPUX86State/g" target-i386/*.[hc] sed -i "s/#define CPUX86State/#define CPUState/" target-i386/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-cris: Don't overuse CPUStateAndreas Färber7-62/+62
Scripted conversion: sed -i "s/CPUState/CPUCRISState/g" target-cris/*.[hc] sed -i "s/#define CPUCRISState/#define CPUState/" target-cris/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-arm: Don't overuse CPUStateAndreas Färber6-195/+195
Scripted conversion: sed -i "s/CPUState/CPUARMState/g" target-arm/*.[hc] sed -i "s/#define CPUARMState/#define CPUState/" target-arm/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com> Acked-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-14target-alpha: Don't overuse CPUStateAndreas Färber5-74/+74
Scripted conversion: sed -i "s/CPUState/CPUAlphaState/g" target-alpha/*.[hc] sed -i "s/#define CPUAlphaState/#define CPUState/" target-alpha/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14bsd-user: Don't overuse CPUStateAndreas Färber1-2/+2
Use CPU*State where applicable. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-03-14darwin-user: Don't overuse CPUStateAndreas Färber2-9/+9
Use CPU*State where applicable. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-03-14linux-user: Don't overuse CPUStateAndreas Färber4-124/+131
In target-specific code use CPU*State. While at it, fix indentation on those lines. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-03-14hw/mc146818: Drop unneeded #includesAndreas Färber1-2/+0
pc.h and apic.h are not needed; apic.h would drag in x86 CPUState and is now included directly for TARGET_I386. isa.h is already #included from mc146818rtc.h. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-unicore32: Rename to CPUUniCore32StateAndreas Färber1-4/+4
This aids in refactoring CPUState by adopting the common naming scheme. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-sparc: Typedef struct CPUSPARCState earlyAndreas Färber1-2/+4
Will be needed for qemu_irq_ack callback. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-lm32/microblaze: Typedef struct CPU{MB,LM32}StateAndreas Färber2-0/+2
Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14monitor: Avoid CPUState in read/write functionsAndreas Färber1-28/+28
Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14monitor: Don't access registers through CPUStateAndreas Färber1-246/+246
Use CPUX86State etc. instead (hand-converted). Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14Rename cpu_reset() to cpu_state_reset()Andreas Färber48-61/+98
Frees the identifier cpu_reset for QOM CPUs (manual rename). Don't hide the parameter type behind explicit casts, use static functions with strongly typed argument to indirect. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14PPC: 405: Use proper CPU resetAlexander Graf4-27/+7
On ppc405ep there is a register that allows for software to reset the core, but not the whole system. Implement this reset using a reset interrupt. This gets rid of a bunch of #if 0'ed code. Reported-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-03-14qom: Introduce object_class_get_list()Andreas Färber2-0/+28
This function allows to obtain a singly-linked list of classes, which can be sorted by the caller. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14qom/object.c: rename type_class_init() to type_initialize()Igor Mitsyanko1-6/+6
Function name type_class_init() gave us a wrong impression of separation of type's "class" and "object" entities initialization. Name type_initialize() is more appropriate for type_class_init() function (considering what operations it performs). Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14qom: if @instance_size==0, assign size of object to parent object sizeIgor Mitsyanko1-2/+17
QOM documentation states that for objects of type with @instance_size == 0 size will be assigned to match parent object's size. But currently this feauture is not implemented and qemu asserts during creation of object with zero instance_size. Set appropriate value for type instance_size during type_class_init() call. object_initialize_with_type() must call type_class_init() before asserting type->instance_size, and object_new_with_type() must call type_class_init() before object allocation. Signed-off-by: Igor Mitsyanko <i.mitsyanko@samsung.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14kvmvapic: align start address as well as sizeAvi Kivity1-1/+3
The kvmvapic code remaps a section of ROM as RAM to allow the guest to maintain state there. It is careful to align the section size to a page boundary, to avoid creating subpages, but neglects to do the same for the start address. These leads to an assert later on when the memory core tries to create a page which is half RAM and half ROM. Fix by aligning the start address to a page boundary. This can be triggered by running qemu-system-x86_64 -enable-kvm -vga none. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-13Merge remote-tracking branch 'kiszka/queues/slirp' into stagingAnthony Liguori12-39/+116
* kiszka/queues/slirp: slirp: Fix compiler warning for w64 slirp: Cleanup resources on instance removal slirp: Remove unneeded if_queued slirp: Fix queue walking in if_start slirp: Prevent recursion of if_start slirp: Keep next_m always valid
2012-03-13Merge remote-tracking branch 'kraxel/usb.44' into stagingAnthony Liguori39-218/+226
* kraxel/usb.44: Endian fix an assertion in usb-msd uhci: alloc can't fail, drop check. uhci: new uhci_handle_td return code for tds still in flight uhci: renumber uhci_handle_td return codes uhci: use enum for uhci_handle_td return codes uhci: tracing support uhci: cancel on schedule stop. uhci: fix uhci_async_cancel_all uhci: pass addr to uhci_async_alloc usb: improve packet state sanity checks usb-ohci: DMA writeback bug fixes usb-ehci: drop unused isoch_pause variable usb: zap hw/ush-{ohic,uhci}.h + init wrappers usb: the big rename
2012-03-13qom: Add QOM support to user emulatorsAndreas Färber8-8/+70
Link the Object base class and the module infrastructure for class registration. Introduce $(universal-obj-y) for objects that are more common than $(common-obj-y), so that those only get built once. Call QOM module init for type registration. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-13qom: Register QOM infrastructure earlyAndreas Färber1-2/+2
The constructors for QOM TYPE_INTERFACE were executed rather late in vl.c's main(). Call them very early so that QOM can safely be used for machines and CPUs. Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-13kvmclock: Always register typeAndreas Färber1-2/+0
Currently, the "kvmclock" type is only registered when kvm_enabled(). This breaks when moving type registration to before command line parsing (so that QOM types can be used for CPU and machine). Since the QOM classes are lazy-initialized anyway and kvmclock_create() has another kvm_enabled() check, simply drop the KVM check in kvmclock_register_types(). kvm-i8259, kvm-apic and kvm-ioapic do not suffer from such a check. Reviewed-by: please. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-13slirp: Fix compiler warning for w64Stefan Weil1-1/+1
Casting a pointer to an integer value must use uintptr_t or intptr_t (not long) for portable code. MinGW-w64 requires this because sizeof(long) != sizeof(void *) for w64 hosts, so casting to long raises a compiler warning. I use uintptr_t instead of intptr_t because changing the sign does not matter here and casting pointers to unsigned values seems more reasonable (the unsigned value is a non negative offset. Cc: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-03-13slirp: Cleanup resources on instance removalJan Kiszka10-0/+58
Close & free sockets when shutting down a slirp instance, also release all buffers. CC: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-03-13slirp: Remove unneeded if_queuedJan Kiszka3-17/+2
There is now a trivial check on entry of if_start for pending packets, so we can drop the additional tracking via if_queued. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-03-13slirp: Fix queue walking in if_startJan Kiszka1-21/+39
Another attempt to get this right: We need to carefully walk both the fastq and the batchq in if_start while trying to send packets to possibly not yet resolved hosts on the virtual network. So far we just requeued a delayed packet where it was and then started walking the queues from the top again - that couldn't work. Now we pre- calculate the next packet in the queue so that the current one can safely be removed if it was sent successfully. We also need to take into account that the next packet can be from the same session if the current one was sent and there are no other sessions. CC: Fabien Chouteau <chouteau@adacore.com> CC: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> CC: Stefan Weil <sw@weilnetz.de> Tested-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-03-13slirp: Prevent recursion of if_startJan Kiszka2-1/+11
if_start can be called recursively via if_encap. Avoid this as our scheme of dequeuing packets is not compatible with this. CC: Fabien Chouteau <chouteau@adacore.com> CC: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> CC: Stefan Weil <sw@weilnetz.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2012-03-13slirp: Keep next_m always validJan Kiszka1-8/+14
Make sure that next_m always points to a packet if batchq is non-empty. This will simplify walking the queues in if_start. CC: Fabien Chouteau <chouteau@adacore.com> CC: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com> CC: Stefan Weil <sw@weilnetz.de> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>