summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
| * kvm: Enable in-kernel irqchip support by defaultJan Kiszka2012-05-161-1/+1
| | | | | | | | | | | | | | | | As MSI is now fully supported by KVM (/wrt available features in upstream), we can finally enable the in-kernel irqchip by default. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * kvm: Add support for direct MSI injectionsJan Kiszka2012-05-161-3/+19
| | | | | | | | | | | | | | | | If the kernel supports KVM_SIGNAL_MSI, we can avoid the route-based MSI injection mechanism. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * kvm: Update kernel headersJan Kiszka2012-05-161-0/+38
| | | | | | | | | | | | | | Corresponding kvm.git hash: f2569053e0 Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * kvm: x86: Wire up MSI support for in-kernel irqchipJan Kiszka2012-05-161-2/+32
| | | | | | | | | | | | | | | | | | Catch writes to the MSI MMIO region in the KVM APIC and forward them to the kernel. Provide the kernel support GSI routing, this allows to enable MSI support also for in-kernel irqchip mode. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * pc: Enable MSI support at APIC levelJan Kiszka2012-05-164-19/+8
| | | | | | | | | | | | | | | | | | | | Push msi_supported enabling to the APIC implementations where we can encapsulate the decision more cleanly, hiding the details from the generic code. Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * kvm: Introduce basic MSI support for in-kernel irqchipsJan Kiszka2012-05-162-1/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch basically adds kvm_irqchip_send_msi, a service for sending arbitrary MSI messages to KVM's in-kernel irqchip models. As the original KVM API requires us to establish a static route from a pseudo GSI to the target MSI message and inject the MSI via toggling that virtual IRQ, we need to play some tricks to make this interface transparent. We create those routes on demand and keep them in a hash table. Succeeding messages can then search for an existing route in the table first and reuse it whenever possible. If we should run out of limited GSIs, we simply flush the table and rebuild it as messages are sent. This approach is rather simple and could be optimized further. However, latest kernels contains a more efficient MSI injection interface that will obsolete the GSI-based dynamic injection. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * Introduce MSIMessage structureJan Kiszka2012-05-162-0/+6
| | | | | | | | | | | | | | | | Will be used for generating and distributing MSI messages, both in emulation mode and under KVM. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
| * kvm: Refactor KVMState::max_gsi to gsi_countJan Kiszka2012-05-161-4/+4
| | | | | | | | | | | | | | | | | | Instead of the bitmap size, store the maximum of GSIs the kernel support. Move the GSI limit assertion to the API function kvm_irqchip_add_route and make it stricter. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
* | Merge remote-tracking branch 'kwolf/for-anthony' into stagingAnthony Liguori2012-06-033-9/+26
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * kwolf/for-anthony: ahci: SATA FIS is 20 bytes, not 0x20 virtio-blk: Fix geometry sector calculation block: prevent snapshot mode $TMPDIR symlink attack sheepdog: fix return value of do_load_save_vm_state virtio: Fix compiler warning for non Linux hosts
| * | ahci: SATA FIS is 20 bytes, not 0x20Daniel Verkamp2012-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | As in the SATA and AHCI specifications, a FIS is 5 Dwords of 4 bytes each, which comes to 20 bytes (decimal), not 0x20. Signed-off-by: Daniel Verkamp <daniel@drv.nu> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
OpenPOWER on IntegriCloud