summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* target-mips: Let cpu_mips_init() return MIPSCPUAndreas Färber2012-06-042-4/+12
| | | | | | | Turn cpu_init macro into a static inline function returning CPUMIPSState for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-mips: Use cpu_reset() in do_interrupt()Andreas Färber2012-06-041-1/+2
| | | | Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-mips: Use cpu_reset() in cpu_mips_init()Andreas Färber2012-06-041-1/+1
| | | | | | | | | | | | | | Commit 0f71a7095db6bc055bc5bb520d85ea650cca8a33 (target-mips: QOM'ify CPU) hooked up cpu_state_reset() to CPUClass::reset(). Dropping the introduction of subclasses for 1.1, due to mips_def_t the reset code could not be QOM'ified yet, i.e. cpu_state_reset() will not forward to CPUClass::reset(). Update cpu_mips_init() with cpu_reset() nontheless, indirectly calling cpu_state_reset(), so that generic code can be converted to call cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de>
* r2d: Store SuperHCPU in ResetDataAndreas Färber2012-06-041-4/+4
| | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset() in main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de>
* r2d: Use cpu_sh4_init() to obtain SuperHCPUAndreas Färber2012-06-041-3/+7
| | | | | | Needed for main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-sh4: Let cpu_sh4_init() return SuperHCPUAndreas Färber2012-06-042-4/+12
| | | | | | | Turn cpu_init macro into a static inline function returning CPUSH4State for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de>
* pc: Pass X86CPU to pc_cpu_reset()Andreas Färber2012-06-041-4/+5
| | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
* pc: Use cpu_x86_init() to obtain X86CPUAndreas Färber2012-06-041-4/+6
| | | | | | | | | Needed for pc_cpu_reset(). Also change return type to X86CPU. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
* target-i386: Let cpu_x86_init() return X86CPUAndreas Färber2012-06-042-4/+12
| | | | | | | | Turn cpu_init macro into a static inline function returning CPUX86State for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
* target-i386: Pass X86CPU to do_cpu_{init,sipi}()Andreas Färber2012-06-044-11/+16
| | | | | | | Allows to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
* microblaze_boot: Pass MicroBlazeCPU to microblaze_load_kernel()Andreas Färber2012-06-044-14/+18
| | | | | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset() in main_cpu_reset(). Also pass it through to its reset callbacks, while at it. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* petalogix_s3adsp1800_mmu: Use cpu_mb_init() to obtain MicroBlazeCPUAndreas Färber2012-06-041-1/+3
| | | | | | | Needed for microblaze_load_kernel(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* petalogix_ml605: Use cpu_mb_init() to obtain MicroBlazeCPUAndreas Färber2012-06-041-1/+3
| | | | | | | Needed for microblaze_load_kernel(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* target-microblaze: Let cpu_mb_init() return MicroBlazeCPUAndreas Färber2012-06-042-9/+16
| | | | | | | | | | | Since qemu_init_vcpu() is no-op for CONFIG_USER_ONLY drop the env variable that is now unused there. Turn cpu_init macro into a static inline function returning CPUMBState for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* cris-boot: Pass CRISCPU to main_cpu_reset().Andreas Färber2012-06-041-3/+4
| | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* cris-boot: Pass CRISCPU to cris_load_image()Andreas Färber2012-06-043-3/+4
| | | | | | | Needed for main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* axis_dev88: Use cpu_cris_init() to obtain CRISCPUAndreas Färber2012-06-041-1/+3
| | | | | | | Needed for cris_load_image(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* target-cris: Let cpu_cris_init() return CRISCPUAndreas Färber2012-06-042-6/+14
| | | | | | | | Turn cpu_init macro into a static inline function returning CPUCRISState for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* target-cris: Reindent cpu_cris_init()Andreas Färber2012-06-041-52/+53
| | | | | | | | Judging by TCG variable initialization it used 8-char tabs; use 4 spaces instead. Also remove trailing whitespace. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* xtensa_lx60: Pass XtensaCPU to lx60_reset()Andreas Färber2012-06-041-3/+3
| | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa_lx60: Use cpu_xtensa_init() to obtain XtensaCPUAndreas Färber2012-06-041-3/+6
| | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa_sim: Pass XtensaCPU to sim_reset()Andreas Färber2012-06-041-4/+6
| | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Max Filippov <jcmvbkbc@gmail.com>
* xtensa_sim: Use cpu_xtensa_init() to obtain XtensaCPUAndreas Färber2012-06-041-2/+5
| | | | | | | Needed for sim_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Max Filippov <jcmvbkbc@gmail.com>
* target-xtensa: Let cpu_xtensa_init() return XtensaCPUAndreas Färber2012-06-043-6/+16
| | | | | | | | | | | Make the include paths for cpu-qom.h consistent to allow using XtensaCPU in cpu.h. Turn cpu_init macro into a static inline function returning CPUXtensaState for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Max Filippov <jcmvbkbc@gmail.com>
* milkymist: Store LM32 in ResetInfoAndreas Färber2012-06-041-4/+4
| | | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset() in main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc>
* milkymist: Use cpu_lm32_init() to obtain LM32CPUAndreas Färber2012-06-041-1/+3
| | | | | | | Needed for main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc>
* lm32_boards: Store LM32CPU in ResetInfoAndreas Färber2012-06-041-5/+5
| | | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset() in main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc>
* lm32_boards: Use cpu_lm32_init() to obtain LM32CPUAndreas Färber2012-06-041-2/+6
| | | | | | | Needed for main_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc>
* target-lm32: Let cpu_lm32_init() return LM32CPUAndreas Färber2012-06-043-5/+13
| | | | | | | | | | | Make the include paths for cpu-qom.h consistent to allow using LM32CPU in cpu.h. Turn cpu_init macro into a static inline function returning CPULM32State for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc>
* arm_boot: Pass ARMCPU to do_cpu_reset()Andreas Färber2012-06-041-3/+6
| | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
* armv7m: Pass ARMCPU to armv7m_reset()Andreas Färber2012-06-041-2/+4
| | | | | | | Allows us to use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
* armv7m: Use cpu_arm_init() to obtain ARMCPUAndreas Färber2012-06-041-3/+6
| | | | | | | Needed for armv7m_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
* omap: Use cpu_arm_init() to store ARMCPU in omap_mpu_state_sAndreas Färber2012-06-046-19/+21
| | | | | | | Fix tab indentations of comments, add braces, use cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
* pxa2xx: Use cpu_arm_init() and store ARMCPUAndreas Färber2012-06-046-25/+25
| | | | | | | Also use cpu_reset() in place of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
* target-arm: Use cpu_reset() in cpu_arm_init()Andreas Färber2012-06-041-1/+1
| | | | | | | | | Commit 3c30dd5a68e9fee6af67cfd0d14ed7520820f36a (target-arm: Move reset handling to arm_cpu_reset) QOM'ified CPU reset. Complete it by replacing cpu_state_reset() with cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Peter Maydell <peter.maydell@linaro.org>
* target-microblaze: lwx/swx: first implementationPeter A. G. Crosthwaite2012-06-044-5/+64
| | | | | Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
* Revert "rtl8139: do the network/host communication only in normal operating ↵Jason Wang2012-06-041-9/+0
| | | | | | | | | | | | | | | | mode" This reverts commit ff71f2e8cacefae99179993204172bc65e4303df. This is because the linux 8139cp driver would leave the card in "Config Register Write Enable" mode after the eeprom were read or write ( which is unexpected in the spec ). Also a physical 8139 card can still DMA into host memory in modes other than Normal mode, so we need revert this commit to align with the behavior of physical card. The issue of 8139cp driver should be fixed in linux seperately. Signed-off-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge remote-tracking branch 'qemu-kvm/uq/master' into stagingAnthony Liguori2012-06-0318-52/+624
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qemu-kvm/uq/master: virtio/vhost: Add support for KVM in-kernel MSI injection msix: Add msix_nr_vectors_allocated kvm: Enable use of kvm_irqchip_in_kernel in hwlib code kvm: Introduce kvm_irqchip_add/remove_irqfd kvm: Make kvm_irqchip_commit_routes an internal service kvm: Publicize kvm_irqchip_release_virq kvm: Introduce kvm_irqchip_add_msi_route kvm: Rename kvm_irqchip_add_route to kvm_irqchip_add_irq_route msix: Introduce vector notifiers msix: Invoke msix_handle_mask_update on msix_mask_all msix: Factor out msix_get_message kvm: update vmxcap for EPT A/D, INVPCID, RDRAND, VMFUNC kvm: Enable in-kernel irqchip support by default kvm: Add support for direct MSI injections kvm: Update kernel headers kvm: x86: Wire up MSI support for in-kernel irqchip pc: Enable MSI support at APIC level kvm: Introduce basic MSI support for in-kernel irqchips Introduce MSIMessage structure kvm: Refactor KVMState::max_gsi to gsi_count
| * virtio/vhost: Add support for KVM in-kernel MSI injectionJan Kiszka2012-05-212-0/+132
| | | | | | | | | | | | | | | | | | | | | | | | Make use of the new vector notifier to track changes of the MSI-X configuration of virtio PCI devices. On enabling events, we establish the required virtual IRQ to MSI-X message route and link the signaling eventfd file descriptor to this vIRQ line. That way, vhost-generated interrupts can be directly delivered to an in-kernel MSI-X consumer like the x86 APIC. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * msix: Add msix_nr_vectors_allocatedJan Kiszka2012-05-212-0/+7
| | | | | | | | | | | | | | | | Analogously to msi_nr_vectors_allocated, add a service for MSI-X. Will be used by the virtio-pci layer. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: Enable use of kvm_irqchip_in_kernel in hwlib codeJan Kiszka2012-05-211-0/+1
| | | | | | | | | | | | | | | | Provide a dummy kvm_kernel_irqchip so that kvm_irqchip_in_kernel can be used by code that is not under CONFIG_KVM protection. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: Introduce kvm_irqchip_add/remove_irqfdJan Kiszka2012-05-213-0/+43
| | | | | | | | | | | | | | | | | | Add services to associate an eventfd file descriptor as input with an IRQ line as output. Such a line can be an input pin of an in-kernel irqchip or a virtual line returned by kvm_irqchip_add_route. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: Make kvm_irqchip_commit_routes an internal serviceJan Kiszka2012-05-213-18/+15
| | | | | | | | | | | | | | | | | | | | | | Automatically commit route changes after kvm_add_routing_entry and kvm_irqchip_release_virq. There is no performance relevant use case for which collecting multiple route changes is beneficial. This makes kvm_irqchip_commit_routes an internal service which assert()s that the corresponding IOCTL will always succeed. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: Publicize kvm_irqchip_release_virqJan Kiszka2012-05-213-1/+6
| | | | | | | | | | | | | | | | This allows to drop routes created by kvm_irqchip_add_irq/msi_route again. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: Introduce kvm_irqchip_add_msi_routeJan Kiszka2012-05-213-4/+45
| | | | | | | | | | | | | | | | | | Add a service that establishes a static route from a virtual IRQ line to an MSI message. Will be used for IRQFD and device assignment. As we will use this service outside of CONFIG_KVM protected code, stub it properly. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: Rename kvm_irqchip_add_route to kvm_irqchip_add_irq_routeJan Kiszka2012-05-213-6/+6
| | | | | | | | | | | | | | | | We will add kvm_irqchip_add_msi_route, so let's make the difference clearer. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * msix: Introduce vector notifiersJan Kiszka2012-05-213-0/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Vector notifiers shall be triggered by the MSI/MSI-X core whenever a relevant configuration change is programmed by the guest. In case of MSI-X, changes are reported when the effective mask (global && per-vector) alters its state. On unmask, the current vector configuration is included in the event report. This allows users - e.g. virtio-pci layer - to transfer this information to external MSI-X routing subsystems - like vhost + KVM in-kernel irqchip. This implementation only provides MSI-X support, but extension to MSI is feasible and will be provided later on when adding support for KVM PCI device assignment. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * msix: Invoke msix_handle_mask_update on msix_mask_allJan Kiszka2012-05-211-0/+4
| | | | | | | | | | | | | | | | | | In preparation of firing vector notifiers on mask changes, call msix_handle_mask_update also from msix_mask_all. So far, this will have no real effect. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * msix: Factor out msix_get_messageJan Kiszka2012-05-211-6/+13
| | | | | | | | | | | | | | This helper will also be used by the upcoming config notifier. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
| * kvm: update vmxcap for EPT A/D, INVPCID, RDRAND, VMFUNCAvi Kivity2012-05-171-0/+13
| | | | | | | | | | Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
OpenPOWER on IntegriCloud