summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2010-06-13hpet: Catch out-of-bounds timer accessJan Kiszka1-1/+5
Also prevent out-of-bounds write access to the timers but don't spam the host console if it triggers. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-10esp: lower IRQ on soft resetBlue Swirl1-5/+14
42f1ced228c9b616cfa2b69846025271618e4ef5 removed irq lowering during reset. However, for chip reset command and DMA reset signal, its actually the correct thing to do. Lower IRQ on soft reset only. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-10qbus: fix memory leak in qbus_free()Isaku Yamahata1-0/+1
BusState::name is allocated in qbus_create_inplace(). So it should be freed by qbus_free(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-10multiboot: compilation fix with DEBUG_MULTIBOOT enabled.Isaku Yamahata1-4/+5
This patch fixes the following compilation errors in multiboot.c when DEBUG_MULTIBOOT is defined. Use TARGET_FMT_plx instead of %x for target_phys_addr_t. CC i386-softmmu/multiboot.o cc1: warnings being treated as errors qemu/hw/multiboot.c: In function 'mb_add_mod': qemu/hw/multiboot.c:121: error: format '%08x' expects type 'unsigned int', but argument 4 has type 'target_phys_addr_t' qemu/hw/multiboot.c:121: error: format '%08x' expects type 'unsigned int', but argument 5 has type 'target_phys_addr_t' qemu/hw/multiboot.c: In function 'load_multiboot': qemu/hw/multiboot.c:279: error: format '%#x' expects type 'unsigned int', but argument 5 has type 'target_phys_addr_t' qemu/hw/multiboot.c:307: error: format '%x' expects type 'unsigned int', but argument 3 has type 'target_phys_addr_t' qemu/hw/multiboot.c:308: error: format '%x' expects type 'unsigned int', but argument 3 has type 'target_phys_addr_t' make[1]: *** [multiboot.o] Error 1 Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-10vga-isa-mm: remove one #ifdef CONFIG_BOCHS_VBE.Isaku Yamahata1-5/+1
remove one #ifdef CONFIG_BOCHS_VBE. Call vga_init_vbe() instead. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-10Merge remote branch 'mst/for_anthony' into stagingAnthony Liguori1-12/+14
2010-06-10cris: Break out image loading to hw/cris-boot.c.Edgar E. Iglesias4-93/+131
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@axis.com>
2010-06-09hw: honor low bit in mipssim machineNathan Froyd1-1/+4
Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-06-07virtio-net: truncating packetMichael S. Tsirkin1-6/+9
virtio net attempts to peek into virtio queue to determine that we have enough space for the complete packet to fit. However, it fails to account for space consumed by virtio net header when it does this, under stress this results in a failure with the message 'truncating packet'. redhat bz 591494. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-06-07petlogix-3adsp: Tweak displacement of cmdline and fdt blob.Edgar E. Iglesias1-2/+2
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-06-02virtio-net: stop vhost backend on vmstopMichael S. Tsirkin1-6/+5
vhost net currently keeps running after vmstop, which causes trouble as qemy does not check for dirty pages anymore. The fix is to simply keep vm and vhost running/stopped status in sync. Tested-by: David L Stevens <dlstevens@us.ibm.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-06-01Monitor: Drop QMP documentation from codeLuiz Capitulino2-74/+0
Previous commit added QMP documentation to the qemu-monitor.hx file, it's is a copy of this information. While it's good to keep it near code, maintaining two copies of the same information is too hard and has little benefit as we don't expect client writers to consult the code to find how to use a QMP command. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-06-01Merge remote branch 'mst/for_anthony' into HEADAnthony Liguori4-32/+33
2010-06-01virtio-serial-bus: fix ports_map allocation on initAlon Levy1-1/+2
Fix for too small allocation to ports_map Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-31ioapic: improve debuggingBlue Swirl1-6/+10
Add a DPRINTF macro, use it also to see irq deliveries. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-31arm: fix arm kernel boot for non zero start addrLars Munch8-29/+1
Booting an arm kernel has been broken a while when booting from non zero start address. This is due to the order of events: board init loads the kernel and sets register 15 to the start address and then qemu_system_reset reset the cpu making register 15 zero again. This patch fixes the usage of the register 15 start address trick in combination with arm_load_kernel. Signed-off-by: Lars Munch <lars@segv.dk> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-31pci-hotplug: make them aware of pci domain.Isaku Yamahata3-4/+26
add helper function which converts root bus to pci domain. make them aware of pci domain. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31msix: remove duplicated defines.Isaku Yamahata1-8/+0
remove defines which are already defined in pci_regs.h Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31pci.h: remove unused constants.Isaku Yamahata1-11/+0
So remove unused constants, PCI_STATUS_RESERVED_MASK_LO, PCI_STATUS_RESERVED_MASK_HI, PCI_COMMAND_RESERVED, PCI_COMMAND_RESERVED_MASK_HI. They were used once, but they aren't used anymore. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31pci: add const to pci_is_express(), pci_config_size().Isaku Yamahata1-2/+2
add const to pci_is_express(), pci_config_size(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-31pci: clean up of pci_set_default_subsystem_id().Isaku Yamahata1-7/+5
Use pci accessor function. don't return value because it always return 0 and the caller doesn't check the return value. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2010-05-30mc146818rtc: improve debuggingBlue Swirl1-2/+20
Add a separate flag for debugging coalesced interrupts. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29pc: improve debuggingBlue Swirl1-0/+12
Add a DPRINTF macro and use it for ISA and PIC interrupts. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29apic: improve debuggingBlue Swirl1-13/+30
Add a DPRINTF macro. Use TARGET_FMT_plx for printing target_phys_addr_t items. Add a separate flag for debugging coalescing interrupts. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29i8259: improve debuggingBlue Swirl1-12/+11
Add a DPRINTF macro. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-29Pad iommu with an empty slot (necessary for SunOS 4.1.4)Artyom Tarasenko1-1/+13
On the real hardware (SS-5, LX) the MMU is not padded, but aliased. Software shouldn't use aliased addresses, neither should it crash when it uses (on the real hardware it wouldn't). Using empty_slot instead of aliasing can help with debugging such accesses. Signed-off-by: Artyom Tarasenko <atar4qemu@googlemail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-28Fix hw/gt64xxx.c compilation with DEBUG definedRiccardo Magliocchetti1-1/+1
Use TARGET_FMT_plx as format placeholder for target_phys_addr_t Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28musicpal: Drop redundant reset callJan Kiszka1-2/+0
Reset is now triggered after init, no need for explicit calls anymore. Signed-off-by: Jan Kiszka <jan.kiszka@web.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-28Fix overflow in i440fx_init()Avi Kivity2-2/+2
The ram_size parameter can be larger than an int, so it may be truncated. Fix by using the correct type. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-27vhost_net.c: v2 Fix build failure introduced by ↵Jes Sorensen1-1/+1
0bfcd599e3f5c5679cc7d0165a0a1822e2f60de2 Fix build failure introduced by 0bfcd599e3f5c5679cc7d0165a0a1822e2f60de2 The format statement expects unsigned long on x86_64, but receives unsigned long long, so gcc exits with an error. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-26sparc64: clean up pci bridge mapIgor V. Kovalenko2-25/+28
- remove unused host state and store pci bus pointer only - do not map host state access into unused 1fe.10000000 range - reorder pci region registration - assign pci i/o region to isa_mem_base Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-26sparc64: rename sun4u cpu to Ultrasparc IIiIgor V. Kovalenko1-1/+1
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-24use new cursor struct + functions for vmware vga and sdl.Gerd Hoffmann1-5/+35
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-24Virtio-net: Replace the hardcode 6 with defined ETN_ALENAmos Kong1-2/+2
hw/virtio-net.h: #define ETH_ALEN 6 ETH_ALEN was defined by commit 7967406801aa897fae83caad3278ac85a342adaa Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-05-24Merge remote branch 'kwolf/for-anthony' into stagingAnthony Liguori1-3/+16
2010-05-24Merge remote branch 'qmp/for-anthony' into stagingAnthony Liguori1-44/+7
2010-05-24microblaze: Handle new elf mach nr for sysemu.Edgar E. Iglesias1-0/+5
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-05-22lsi: Fix value overflow in request tag processingJan Kiszka1-2/+2
This fixes a mismerge of 64d564094cac5f72eeaeb950c442b773a00d3586 (wrong patch version): We need to mask the tag value properly to obtain its device ID. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-22sparc32 protect read-only bits in DMA CSR registersArtyom Tarasenko1-4/+8
On a real hardware changing read-only bits has no effect Use a mask common for SCSI and Ethernet registers. The crucial bit is DMA_INTR, because setting or clearing it may produce spurious interrupts. This patch allows booting Solaris 2.3 Signed-off-by: Artyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22vmstate: fix breakage by 7e72abc382b700a72549e8147bdea413534eeedcTeLeMan1-1/+0
cirrus_post_load() will be executed twice when loading vm states and then the wrong physical memory will be registered. This issue may lead to crash qemu. Signed-off-by: TeLeMan <geleman@gmail.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Fix %lld or %llx printf format useBlue Swirl2-2/+2
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Compile dma only onceBlue Swirl8-14/+71
Use a qemu_irq to request CPU exit. 7 compilations less for the full build. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22pckbd: improve debuggingBlue Swirl1-13/+15
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-22Compile pckbd only onceBlue Swirl4-53/+73
Use a qemu_irq to indicate A20 line changes. Move I/O port 92 to pckbd.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-05-21axisdev88: Fix passing of kernel cmdline.Edgar E. Iglesias1-13/+18
Signed-off-by: Edgar E. Iglesias <edgar@axis.com>
2010-05-21arm_timer: fix oneshot modeRabin Vincent1-1/+1
In oneshot mode, the delta needs to come from the TimerLoad register, not the maximum limit. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21arm_timer: reload timer when enabledRabin Vincent1-1/+1
Reload the timer when TimerControl is written, if the timer is to be enabled. Otherwise, if an earlier write to TimerLoad was done while periodic mode was not set, s->delta may incorrectly still have the value of the maximum limit instead of the value written to TimerLoad. This problem is evident on versatileap on current linux-next, which enables TIMER_CTRL_32BIT before writing to TimerLoad and then enabling periodic mode and starting the timer. This causes the first periodic tick to be scheduled to occur after 0xffffffff periods, leading to a perceived hang while the kernel waits for the first timer tick. Signed-off-by: Rabin Vincent <rabin@rab.in> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21pflash_cfi01: add device ID read commandMichael Walle1-0/+20
Add support to read manufacturer and device ID. For everything else (eg. lock bits) 0 is returned. Signed-off-by: Michael Walle <michael@walle.cc> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2010-05-21virtio-blk: fix barrier supportChristoph Hellwig1-2/+13
Before issuing the barrier to the block driver we need to flush our oustanding queue of write requests, as the flush is supposed to be issued after them. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2010-05-21virtio-blk: Avoid zeroing every request structureStefan Hajnoczi1-1/+3
The VirtIOBlockRequest structure is about 40 KB in size. This patch avoids zeroing every request by only initializing fields that are read. The other fields are either written to or may not be used at all. Oprofile shows about 10% of CPU samples in memset called by virtio_blk_alloc_request(). The workload is dd if=/dev/vda of=/dev/null iflag=direct bs=8k running concurrently 4 times. This patch makes memset disappear to the bottom of the profile. Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>