summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* PPC: Fix IPI support in MPICAlexander Graf2011-10-061-2/+15
| | | | | | | | | | | | | | | | | The current IPI support in the MPIC code is incomplete and doesn't work. This code adds proper support for IPIs in MPIC by using the IDE register to remember which CPUs IPIs are still outstanding to. New triggers through the IPI trigger register only add to the list of CPUs we want to IPI. Signed-off-by: Alexander Graf <agraf@suse.de> --- v1 -> v2: - Use MAX_IPI instead of hardcoded 4 Signed-off-by: Alexander Graf <agraf@suse.de>
* PPC: Extend MPIC MMIO rangeAlexander Graf2011-10-061-1/+1
| | | | | | | | The MPIC exports a page for each CPU that it controls. To support more than one CPU, we need to also reserve the MMIO space according to the amount of CPUs we want to support. Signed-off-by: Alexander Graf <agraf@suse.de>
* PPC: Add CPU local MMIO regions to MPICAlexander Graf2011-10-061-38/+72
| | | | | | | | | | | The MPIC exports a register set for each CPU connected to it. They can all be accessed through specific registers or using a shadow page that is mapped differently depending on which CPU accesses it. This patch implements the shadow map, making it possible for guests to access the CPU local registers using the same address on each CPU. Signed-off-by: Alexander Graf <agraf@suse.de>
* PPC: Move openpic to target specific code compilationAlexander Graf2011-10-062-1/+2
| | | | | | | | | | The MPIC has some funny feature where it maps different registers to an MMIO region depending which CPU accesses them. To be able to reflect that, we need to make OpenPIC be compiled in the target code, so it can access cpu_single_env. Signed-off-by: Alexander Graf <agraf@suse.de>
* spapr: make irq customizable via qdevPaolo Bonzini2011-10-061-1/+7
| | | | | | | | | This also lets the user see the irq in "info qtree". Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Alexander Graf <agraf@suse.de> Cc: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
* spapr: prepare for qdevification of irqPaolo Bonzini2011-10-064-7/+8
| | | | | | | | | | Restructure common properties for sPAPR devices so that IRQ definitions can be added in one place. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Alexander Graf <agraf@suse.de> Cc: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
* spapr: proper qdevificationPaolo Bonzini2011-10-067-39/+25
| | | | | | | | | | | | | | | | | | | Right now the spapr devices cannot be instantiated with -device, because the IRQs need to be passed to the spapr_*_create functions. Do this instead in the bus's init wrapper. This is particularly important with the conversion from scsi-disk to scsi-{cd,hd} that Markus made. After his patches, if you specify a scsi-cd device attached to an if=none drive, the default VSCSI controller will not be created and, without qdevification, you will not be able to add yours. NOTE from agraf: added small compile fix Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Cc: Alexander Graf <agraf@suse.de> Cc: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Alexander Graf <agraf@suse.de>
* qed: fix use-after-free during l2 cache commitStefan Hajnoczi2011-10-052-5/+5
| | | | | | | | | | | | | | | | | QED's metadata caching strategy allows two parallel requests to race for metadata lookup. The first one to complete will populate the metadata cache and the second one will drop the data it just read in favor of the cached data. There is a use-after-free in qed_read_l2_table_cb() and qed_commit_l2_update() where l2_table->offset was used after the l2_table may have been freed due to a metadata lookup race. Fix this by keeping the l2_offset in a local variable and not reaching into the possibly freed l2_table. Reported-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* etrax-dma: Remove bogus if statementEdgar E. Iglesias2011-10-031-6/+4
| | | | | Reported-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* memory: Print regions in ascending orderJan Kiszka2011-10-021-6/+31
| | | | | | | Makes reading the output more user friendly. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: Do not print empty PIO rootJan Kiszka2011-10-021-3/+6
| | | | | Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: Print region priorityJan Kiszka2011-10-021-2/+4
| | | | | | | Useful to discover eclipses. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* memory: simple memory tree printerBlue Swirl2011-10-023-0/+106
| | | | | | | | Add a monitor command 'info mtree' to show the memory hierarchy much like /proc/iomem in Linux. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Avi Kivity <avi@redhat.com>
* Move GETPC from dyngen-exec.h to exec-all.hBlue Swirl2011-10-013-12/+13
| | | | | | | GETPC() can be used even from outside of helper code. Move the macro to a more accessible location. Avoid a compile warning from redefining it in exec.c. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* softmmu_header: pass CPUState to tlb_fillBlue Swirl2011-10-0115-55/+43
| | | | | | | Pass CPUState pointer to tlb_fill() instead of architecture local cpu_single_env hacks. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Document softmmu templatesBlue Swirl2011-10-014-1/+33
| | | | | | Add some comments to describe each file. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* ESP: convert to trace frameworkBlue Swirl2011-10-012-40/+61
| | | | Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* PPC: Drop initial ESCC mappingAlexander Graf2011-10-012-2/+2
| | | | | | | | | | | We are mapping ESCC to a static (incorrect) address on machine init. This overlaps with our vram, rendering the screen barely usable. Since openBIOS is clever enough to map ESCC to where it needs to be, we can just drop that invalid map and everyone's happy. Signed-off-by: Alexander Graf <agraf@suse.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* tcg-i386: Introduce limited deposit supportJan Kiszka2011-10-014-4/+40
| | | | | | | | | | | | x86 cannot provide an optimized generic deposit implementation. But at least for a few special cases, namely for writing bits 0..7, 8..15, and 0..15, versions using only a single instruction are feasible. Introducing such limited support improves emulating 16-bit x86 code on x86, but also rarer cases where 32-bit or 64-bit code accesses bytes or words. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* mips_fulong2e: Reorder ISA bus and i8259 creationJan Kiszka2011-10-011-4/+4
| | | | | | | | Missed during memory region conversion: The i8259 now depends on the ISA bus being created first. Reorder the initialization. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-i386: Remove redundant word mask in port out instructionsJan Kiszka2011-10-011-2/+0
| | | | | | | | T0 was already masked to 16 bits when loading it. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* softfloat: Reinstate accidentally disabled target-specific NaN handlingPeter Maydell2011-10-011-0/+5
| | | | | | | | | | | Include config.h in softfloat.c, so that the target specific ifdefs in softfloat-specialize.h are evaluated correctly. This was accidentally broken in commit 789ec7ce2 when config-target.h was removed from softfloat.h, and means that most targets will have been returning the wrong results for calculations involving NaNs. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* tcg/arm: Remove unused tcg_out_addi()Peter Maydell2011-10-011-15/+0
| | | | | | | | | Remove the unused function tcg_out_addi() from the ARM TCG backend; this fixes a compilation failure on ARM hosts with newer gcc. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* configure: Detect predefined compiler symbols for ARM and HPPABrad2011-10-011-1/+7
| | | | | | | | To be able to detect some ARM / HPPA based architectures such as with OpenBSD/(armish / zaurus) or OpenBSD/hppa. Signed-off-by: Brad Smith <brad@comstyle.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* tcg: Add some assertionsStefan Weil2011-10-011-0/+2
| | | | | Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* tcg: Add forward declarations for local functionsStefan Weil2011-10-011-0/+16
| | | | | | | | | | | These functions are defined in the tcg target specific file tcg-target.c. The forward declarations assert that every tcg target uses the same function prototype. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* tcg: Don't declare TCG_TARGET_REG_BITS in tcg-target.hStefan Weil2011-10-018-21/+1
| | | | | | | | It is now declared for all tcg targets in tcg.h, so the tcg target specific declarations are redundant. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* tcg: Declare TCG_TARGET_REG_BITS in tcg.hStefan Weil2011-10-011-0/+10
| | | | | | | | | | | TCG_TARGET_REG_BITS can be determined by the compiler, so there is no need to declare it for each individual tcg target. This is especially important for new tcg targets which will be supported by the tcg interpreter. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* Merge remote-tracking branch 'kiszka/queues/slirp' into stagingAnthony Liguori2011-09-292-14/+13
|\
| * slirp: Fix packet expirationThomas Huth2011-09-281-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two new variables "arp_requested" and "expiration_date" in the mbuf structure have been added after the variable-sized "m_dat_" array. The variables have to be added before the m_dat_ array instead. Without this patch, the expiration_date gets clobbered by code that accesses the m_dat_ array. I experienced this problem with the code in slirp/tftp.c: The tftp_send_data() function created a new packet with the m_get() function (which fills-in a default expiration_date value). Then the TFTP code cleared the data section of the packet, which accidentially also cleared the expiration_date. This zeroed expiration_date then finally causes the packet to be discarded during if_start(), so that TFTP packets were not transmitted anymore. [Jan: added comment as suggested by Fabien ] CC: Fabien Chouteau <chouteau@adacore.com> Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
| * slirp: Fix use after release on tcp_inputJan Kiszka2011-09-281-12/+10
| | | | | | | | | | | | | | | | ti points into the m buffer. But the latter may already be released right after the dodata: label. Move the test before the potential release. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
* | Merge remote-tracking branch 'aneesh/for-upstream-5' into stagingAnthony Liguori2011-09-2914-538/+1712
|\ \
| * | hw/9pfs: Add handle based fs driverAneesh Kumar K.V2011-09-224-4/+617
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Implement TFLUSH operationAneesh Kumar K.V2011-09-228-265/+439
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Avoid unnecessary get_fid in v9fs_clunkAneesh Kumar K.V2011-09-221-10/+10
| | | | | | | | | | | | Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Add fs driver specific details to fscontextAneesh Kumar K.V2011-09-229-52/+105
| | | | | | | | | | | | | | | | | | | | | | | | Add a new context flag PATHNAME_FSCONTEXT and indicate whether the fs driver track fid using path names. Also add a private pointer that help us to track fs driver specific values in there Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Add init callback to fs driverAneesh Kumar K.V2011-09-223-2/+14
| | | | | | | | | | | | | | | | | | This call back can be used to do fs driver specific initialization. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Move fid pathname tracking to seperate data type.Aneesh Kumar K.V2011-09-229-299/+548
| | | | | | | | | | | | | | | | | | | | | This enables us to add handles to track fids later. The V9fsPath added is similar to V9fsString except that the size include the NULL byte also. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Use read-write lock for protecting fid path.Aneesh Kumar K.V2011-09-228-87/+155
| | | | | | | | | | | | | | | | | | | | | On rename we take the write lock and this ensure path doesn't change as we operate on them. Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
| * | hw/9pfs: Make v9fs_string* functions non-staticAneesh Kumar K.V2011-09-222-5/+10
| | | | | | | | | | | | | | | | | | We will use them later in other files Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
* | | Add OpenBIOS as a submoduleBlue Swirl2011-09-286-3/+6
| |/ |/| | | | | | | | | Update OpenBIOS images to r1047 built from submodule. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | PPC: use memory API to construct the PCI holeBlue Swirl2011-09-274-7/+26
| | | | | | | | | | | | | | Avoid vga.chain4 mapping by constructing a PCI hole for upper 2G of the PCI space. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* | Merge remote-tracking branch 'qemu-kvm-tmp/memory/urgent' into stagingAnthony Liguori2011-09-261-1/+1
|\ \
| * | ppc_prep: fix pci config space initializationAvi Kivity2011-09-251-1/+1
| | | | | | | | | | | | | | | | | | Use data_mem for the data mmio region, not conf_mem. Signed-off-by: Avi Kivity <avi@redhat.com>
* | | Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into stagingAnthony Liguori2011-09-2620-122/+232
|\ \ \
| * | | fdc: Convert isabus_fdc_init1 to MemoryRegionRichard Henderson2011-09-251-20/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This requires some amount of hoop-jumping, so that we don't inadvertently claim port 0x3f6, which is used by ISA IDE. The sysbus initialization path is as yet unconverted. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
| * | | serial: Convert serial_isa_initfn to MemoryRegionRichard Henderson2011-09-251-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The serial_mm_init path is as yet unconverted. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
| * | | pckbd: Convert to MemoryRegionRichard Henderson2011-09-253-25/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slightly non-obvious with mips_jazz passing in the region structure to populate. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
| * | | i8259: Convert to MemoryRegionRichard Henderson2011-09-251-19/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only non-obvious part is pic_poll_read which used "addr1 >> 7" to detect whether one referred to either the master or slave PIC. Instead, test this directly. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Avi Kivity <avi@redhat.com>
| * | | ppc_prep: initialize i8259 after the ISA busAvi Kivity2011-09-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Succeeding i8259 conversion to ISA requires this. Signed-off-by: Avi Kivity <avi@redhat.com>
OpenPOWER on IntegriCloud