aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-03-23target-arm: TODO markerscp15-on-qom.2Peter Maydell
Add some TODO comments as a sketch of where things are going to need to change...
2012-03-23target-arm: Convert cp15 crn=1 registersPeter Maydell
Convert the cp15 crn=1 registers to the new scheme. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert cp15 crn=9 registersPeter Maydell
Convert cp15 crn=9 registers (mostly cache lockdown) to the new scheme. Note that this change makes OMAPCP cores RAZ/WI the whole c9 space. This is a change from previous behaviour, but a return to the behaviour of commit c3d2689d when OMAP1 support was first added -- subsequent commits have clearly accidentally relegated the OMAPCP RAZ condition to only a subset of the crn=9 space when adding support for other cores. TODO: doesn't this disable the c15 dummy ? Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert cp15 crn=6 registersPeter Maydell
Convert the cp15 crn=6 registers to the new scheme. Note that this includes some minor tidyup: drop an unnecessary underdecoding of op2 on OMAPCP cores, and only implement the pre-v6 c6,c0,0,1 IFAR on the 1026 and not on the other ARMv5 cores, which didn't have it. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: convert cp15 crn=7 registersPeter Maydell
Convert the cp15 crn=7 registers to the new scheme. Note that to do this we have to distinguish some registers used on the ARM9 and ARM10 from some which are ARM1176 only. This is because the old code returned a value of 0 but always set the Z flag (by clearing env->ZF, since we store the Z flag in CPUState inverted). This is inconsistent with actual ARM CPU behaviour, which only sets flags for reads to r15 and sets them based on the top bits of the result. However it happened to work for the two common use cases for cp15 crn=7 reads: * On ARM9 and ARM10 the cache clean-and-test operations are typically done with a destination of r15 so that you can do a "loop: mrc ... ; bne loop" to keep cleaning until the cache is finally clean; always setting the Z flag means this loop terminates immediately * on ARM1176 the Cache Dirty Status Register reads as zero if the cache is dirty; returning 0 means this is correctly implemented for QEMU Since the new coprocessor register framework does the right thing of always setting flags based on the returned result for reads to r15, we need to split these up so that we can return (1<<30) for the ARM9/ARM10 registers but 0 for the ARM1176 one. This allows us to remove the nasty hack which always sets Z. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert cp15 VA-PA translation registersPeter Maydell
Convert the cp15 VA-PA translation registers (a subset of the crn=7 regs) to the new scheme. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert cp15 MMU TLB controlPeter Maydell
Convert cp15 MMU TLB control (crn=8) to new scheme. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert cp15 crn=15 registersPeter Maydell
Convert the cp15 crn=15 (implementation specific) registers to the new scheme. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert cp15 crn=10 registersPeter Maydell
We RAZ/WI the entire block of crn=10 registers. Note that this actually covers not just the implementation-defined TLB lockdown registers but also a number of v7 VMSA memory attribute registers which we would need to implement to support TEX remap. We retain the previous QEMU behaviour in this conversion, though. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert cp15 crn=13 registersPeter Maydell
Convert the cp15 crn=13 registers (FCSEIDR, CONTEXTIDR, and the ARM946 Trace Process Identifier Register). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert cp15 crn=2 registersPeter Maydell
Convert the cp15 crn=2 registers (MMU page table control, MPU cache control) to the new scheme. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert MMU fault status cp15 registersPeter Maydell
Convert the MMU fault status and MPU access permission cp15 registers to the new scheme. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert cp15 c3 registerPeter Maydell
Convert the cp15 c3 register (MMU domain access control or MPU write buffer control). NB that this is horribly underdecoded for modern cores (should be crn=3,crm=0, opc1=0,opc2=0) but this change preserves the existing QEMU behaviour. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert generic timer cp15 regsPeter Maydell
Convert the (dummy) generic timer cp15 implementation. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert performance monitor registersPeter Maydell
Convert the v7 performance monitor cp15 registers to the new scheme. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert TLS registersPeter Maydell
Convert TLS registers to the new cp15 framework Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert WFI/barriers special cases to cp_reginfoPeter Maydell
Convert the various WFI and barrier instruction special cases to use cp_reginfo infrastructure. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Convert TEECR, TEEHBR to new schemePeter Maydell
Convert the THUMB2EE cp14 registers TEECR and TEEHBR to use arm_cp_reginfo.
2012-03-23target-arm: Convert debug registers to cp_reginfoPeter Maydell
Convert the cp14 debug registers (DBGDIDR, DBGDRAR, DBGDSAR) to the cp_reginfo scheme.
2012-03-23target-arm: Add register_cp_regs_for_features()Peter Maydell
Add new function register_cp_regs_for_features() as a place to register coprocessor registers dependent on feature flags.
2012-03-23target-arm: Remove old cpu_arm_set_cp_io infrastructurePeter Maydell
All the users of cpu_arm_set_cp_io have been converted, so we can remove it and the infrastructure it used.
2012-03-23hw/pxa2xx_pic: Convert coprocessor registers to new schemePeter Maydell
Convert the coprocessor access functions for the pxa2xx PIC to the arm_cp_reginfo scheme.
2012-03-23hw/pxa2xx.c: Convert CLKCFG and PWRMODE cp14 regsPeter Maydell
Convert the PXA2xx CLKCFG and PWRMODE cp14 registers to the new arm_cp_reginfo scheme.
2012-03-23hw/pxa2xx: Convert cp14 perf registers to new schemePeter Maydell
Convert the PXA2xx cp14 perf registers from old-style coprocessor hooks to the new scheme.
2012-03-23target-arm: initial coprocessor register frameworkPeter Maydell
Initial infrastructure allowing you to define a coprocessor register implementation. We still fall back to the old-style switch statements pending complete conversion of all existing registers.
2012-03-23target-arm: Move c0_cachetype to ARMCPUPeter Maydell
Move c0_cachetype value to ARMCPU and out of cpu_reset_model_id(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Move MVFR* VFP feature register values to ARMCPUPeter Maydell
Move the MVFR* VFP feature register values to ARMCPU, so they are set up by the implementation-specific instance init functions rather than in cpu_reset_model_id(). Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Move reset FPSID to ARMCPUPeter Maydell
Move the reset FPSID to the ARMCPU struct, and set it in the per-implementation instance init function. At reset we then just copy the reset value into the CPUARMState field. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Move feature bit settings to init fnsPeter Maydell
Move the setting of the feature bits from cpu_reset_model_id() to each CPU's instance init function. This requires us to move the features field in CPUARMState so that it is not cleared on reset. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2012-03-23target-arm: Don't use common instance initPeter Maydell
Don't use a common instance init function: we want a place to set up the instance's feature switches, register reset values and feature register values.
2012-03-23target-arm: Prepare model-specific class_init functionAndreas Färber
This allows to share initialization between CPU models. Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-03-23target-arm: Embed CPUARMState in QOM ARMCPUAndreas Färber
We g_malloc0()'ed CPUARMState ourself, and exec.c's cpu_copy() runs through cpu_init() as well, so we are at liberty to supply the CPUState any way we see fit. Having CPUARMState as field in the QOM CPU allows both to access env from an ARMCPU object and to access the QOM Object and its ObjectClass from an env pointer, in ARM code for now. The goal is to convert all CPUs to QOM and to use CPU objects in central places, especially once we have property support for Object. This will then allow to have TCG AREG0 point to target-specific fields where small immediate offsets are desired (as pointed out by rth) while allowing for common fields at known offsets from the base class. Having the CPUID in ARMCPUClass, we can set it from the instance_init function. Same for cpu_model_str, which is now the QOM class name. Make cpu_state_reset() call cpu_reset() and move most of its code to arm_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: Peter Maydell <peter.maydell@linaro.org> Cc: Richard Henderson <rth@twiddle.net>
2012-03-23target-arm: Introduce QOM ARMCPUClassAndreas Färber
Create a CPU subclass, and register classes matching all CPU models except for "pxa270", which is an alias for "pxa270-a0". Let arm_cpu_list() enumerate CPU subclasses in alphabetical order, except for special value "any". Replace cpu_arm_find_by_name()'s string -> CPUID lookup by storing the CPUID in the class. NB: CPUIDs were first introduced by Paul Brook in r1765 (2006). Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: Paul Brook <paul@codesourcery.com> Cc: Peter Maydell <peter.maydell@linaro.org>
2012-03-19Merge remote-tracking branch 'sstabellini/saverestore-8' into stagingAnthony Liguori
* sstabellini/saverestore-8: xen: do not allocate RAM during INMIGRATE runstate xen mapcache: check if memory region has moved. xen: record physmap changes to xenstore Set runstate to INMIGRATE earlier Introduce "xen-save-devices-state" cirrus_vga: do not reset videoram Conflicts: qapi-schema.json Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-19Merge remote-tracking branch 'stefanha/trivial-patches' into stagingAnthony Liguori
* stefanha/trivial-patches: qemu-ga: for w32, fix leaked handle ov.hEvent in ga_channel_write() ioapic: fix build with DEBUG_IOAPIC .gitignore: add qemu-bridge-helper and option rom build products cleanup obsolete typedef monitor: Remove unused bool field 'qapi' in mon_cmd_t struct ds1338: Add missing break statement vnc: Fix packed boolean struct members Remove type field in ModuleEntry as it's not used
2012-03-19Merge remote-tracking branch 'spice/spice.v50' into stagingAnthony Liguori
* spice/spice.v50: spice: fix broken initialization hw/qxl.c: Fix compilation failures on 32 bit hosts qxl/qxl_render.c: add trace events qxl: switch qxl.c to trace-events qxl: init_pipe_signaling: exit on failure monitor: fix client_migrate_info error handling spice: set spice uuid and name
2012-03-19Merge remote-tracking branch 'bonzini/scsi-next' into stagingAnthony Liguori
* bonzini/scsi-next: scsi: add get_dev_path virtio-scsi: call unregister_savevm properly scsi: copy serial number into VPD page 0x83 scsi-cd: check ready condition before processing several commands get rid of CONFIG_VIRTIO_SCSI
2012-03-19Merge remote-tracking branch 'qemu-kvm/memory/urgent' into stagingAnthony Liguori
* qemu-kvm/memory/urgent: exec: fix guest memory access for Xen
2012-03-19xen: do not allocate RAM during INMIGRATE runstateAnthony PERARD
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-03-19xen mapcache: check if memory region has moved.Anthony PERARD
This patch changes the xen_map_cache behavior. Before trying to map a guest addr, mapcache will look into the list of range of address that have been moved (physmap/set_memory). There is currently one memory space like this, the vram, "moved" from were it's allocated to were the guest will look into. This help to have a succefull migration. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-03-19xen: record physmap changes to xenstoreStefano Stabellini
Write to xenstore any physmap changes so that the hypervisor can be aware of them. Read physmap changes from xenstore on boot. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
2012-03-19Set runstate to INMIGRATE earlierStefano Stabellini
Set runstate to RUN_STATE_INMIGRATE as soon as we can on resume. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-03-19Introduce "xen-save-devices-state"Stefano Stabellini
- add an "is_ram" flag to SaveStateEntry; - register_savevm_live sets is_ram for live_savevm devices; - introduce a "xen-save-devices-state" QAPI command that can be used to save the state of all devices, but not the RAM or the block devices of the VM. Changes in v8: - rename save-devices-state to xen-save-devices-state. Changes in v7: - rename save_devices to save-devices-state. Changes in v6: - remove the is_ram parameter from register_savevm_live and sets is_ram if the device is a live_savevm device; - introduce save_devices as a QAPI command, write a better description for it; - fix CODING_STYLE; - introduce a new doc to explain the save format used by save_devices. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Acked-by: Luiz Capitulino <lcapitulino@redhat.com>
2012-03-19exec: fix guest memory access for XenAnthony PERARD
In cpu_physical_memory_rw, a change has been introduced and qemu_get_ram_ptr is no longuer called with the ram addr we want to access, but only with the section address. This patch fixes this. (All other call to qemu_get_ram_ptr are already called with the right address.) This patch fixes Xen guest. Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Avi Kivity <avi@redhat.com>
2012-03-19Merge remote-tracking branch 'origin/master' into stagingAnthony Liguori
* origin/master: tcg: fix sparc host for AREG0 free operation
2012-03-19scsi: add get_dev_pathPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-03-19virtio-scsi: call unregister_savevm properlyPaolo Bonzini
This fixes a use-after-free when migrating after hot-unplug. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-03-19scsi: copy serial number into VPD page 0x83Paolo Bonzini
Currently QEMU passes the qdev device id to the guest in an ASCII-string designator in page 0x83. While this is fine, it does not match what real hardware does; usually the ASCII-string designator there hosts another copy of the serial number (there can be other designators, for example with a world-wide name). Do the same for QEMU SCSI disks. ATAPI does not support VPD pages, so it does not matter there. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-03-19scsi-cd: check ready condition before processing several commandsPaolo Bonzini
This commit is more or less obvious. What it caused is less obvious: SCSI CD drives failed to eject under Linux, though for example the "change" command worked okay. This happens because of the autoclose option in the Linux CD-ROM driver. The actual chain of events is quite complex and somehow involves udev helpers; the actual command that matters is READ TOC, though honestly it's not really clear to me how because it should always be invoked after autoclose, not before. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-03-19get rid of CONFIG_VIRTIO_SCSIPaolo Bonzini
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>