History | View | Annotate | Download (15.7 kB)
Merge branch 'master' of git://git.qemu.org/qemu into qom-cpu
Adapt header include paths.
Signed-off-by: Andreas Färber <afaerber@suse.de>
cpu: Move kvm_state field into CPUState
Adapt some functions to take CPUState / {PowerPC,S390}CPU argument.
cpu: Move kvm_run into CPUState
Pass CPUState / {X86,S390}CPU to helper functions.
kvm: Pass CPUState to kvm_arch_*
Move kvm_vcpu_dirty field into CPUState to simplify things and changeits type to bool while at it.
kvm: Pass CPUState to kvm_vcpu_ioctl()
Adapt helper functions to pass X86CPU / PowerPCCPU / S390CPU.
softmmu: move include files to include/sysemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
misc: move include files to include/qemu/
cpus: Pass CPUState to qemu_cpu_kick()
CPUArchState is no longer needed there.
s390: use sync regs for register transfer
Newer kernels provide the guest registers in kvm_run. Lets usethose if available (i.e. the capability is set). This avoidsioctls on cpu_synchronize_state making intercepts faster.
In addition, we have now the prefix register, the access registers...
s390: sclp base support
This adds a more generic infrastructure for handling Service-Callrequests on s390. Currently we only support a small subset of ReadSCP Info directly in target-s390x. This patch provides the baseinfrastructure for supporting more commands and moves Read SCP...
s390: Fix error handling and condition code of service call
Invalid sccb addresses will cause specification or addressing exception.Lets add those checks. Furthermore, the good case (cc=0) was incorrectfor KVM, we did not set the CC at all. We now use return codes < 0...
s390: autodetect map private
By default qemu will use MAP_PRIVATE for guest pages. This will writeprotect pages and thus break on s390 systems that dont support this feature.Therefore qemu has a hack to always use MAP_SHARED for s390. But MAP_SHAREDhas other problems (no dirty pages tracking, a lot more swap overhead etc.)...
s390: stop target cpu on sigp initial reset
We must not run the target cpu after an initial reset. This makessystem_reset more reliable for smp guests.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>Signed-off-by: Alexander Graf <agraf@suse.de>
target-s390x: Pass S390CPU to s390_cpu_restart()
Needed for qemu_cpu_kick().
s390-virtio: Let s390_cpu_addr2state() return S390CPU
Convert ipi_states to S390CPU**.
Needed for s390_cpu_restart() in handle_sigp().
S390: support reboot for kvm on s390
This patch adds reboot support for s390x-softmmu by callingthe generic reboot support in kvm.
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>Signed-off-by: Alexander Graf <agraf@suse.de>
S390: dont call system_shutdown on disabled wait
A disabled wait usually indicates a guest problem. Dont shutdown theguest to allow guest dumping.Have some special cases, e.g. a quiesce disabled wait. In that casewe want to shutdown.
Long term solution might be a crashed/panic indication....
target-s390x: Don't overuse CPUState
Scripted conversion: sed -i "s/CPUState/CPUS390XState/g" target-s390x/*.[hc] sed -i "s/#define CPUS390XState/#define CPUState/" target-s390x/cpu.h
Signed-off-by: Andreas Färber <afaerber@suse.de>Acked-by: Anthony Liguori <aliguori@us.ibm.com>
s390: fix cpu hotplug / cpu activity on interrupts
The add_del/running_cpu code and env->halted are tracking stopped cpus.Sleeping cpus (idle and enabled for interrupts) are waiting inside thekernel.No interrupt besides the restart can move a cpu from stopped to...
s390: Fix cpu shutdown for KVM
On s390 a shutdown is the state of all CPUs being either stoppedor disabled (for interrupts) waiting. We have to track the overallnumber of running CPUs to call the shutdown sequence accordingly.This patch implements the counting and shutdown handling for the...
s390x: Fix debugging for unknown sigp order codes
On unknown sigp order codes we print a debug message. This patchfixes the output, since we want to see the order_code and notthe register numbers.Patch applies on agraf tree.
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>...
s390x: fix smp support for kvm
Currently smp support for kvm does not work. Qemu does a kvm run even onsecondary CPUs which dont have a sane state (initial psw == 0)triggering some program faults. Architecturally these cpus are in the stoppedstate, so we should not do the kvm run ioctl. (these CPUs will be started...
s390x: Adjust internal kvm code
We're now finally emulating an s390x CPU, so we can move quite some logicfrom the kvm code out into generic CPU code.
This patch does this and adjusts the interfaces according to what the codearound now expects to be able to call....
s390x: Prepare cpu.h for emulation
We need to add some more logic to the CPU description to leverage emulationof an s390x CPU. This patch adds all the required helpers, fields in CPUStateand constant definitions required for user and system emulation....
s390x: fix KVM target
During Jan's rework of the generic KVM layer, he added some more error checksand actually aborted if something went wrong. Unfortunately, one of the s390internal error codes slipped through, aborting the VM without needing to.
This patch fixes booting of S390x virtual machines in KVM....
kvm: Align kvm_arch_handle_exit to kvm_cpu_exec changes
Make the return code of kvm_arch_handle_exit directly usable forkvm_cpu_exec. This is straightforward for x86 and ppc, just s390would require more work. Avoid this for now by pushing the return code...
kvm: Rename kvm_arch_process_irqchip_events to async_events
We will broaden the scope of this function on x86 beyond irqchip events.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
always qemu_cpu_kick after unhalting a cpu
This ensures env->halt_cond is broadcast, and the loop inqemu_tcg_wait_io_event and qemu_kvm_wait_io_event is exitednaturally rather than through a timeout.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
kvm: Drop return values from kvm_arch_pre/post_run
We do not check them, and the only arch with non-empty implementationsalways returns 0 (this is also true for qemu-kvm).
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>CC: Alexander Graf <agraf@suse.de>...
kvm: Provide sigbus services arch-independently
Provide arch-independent kvm_on_sigbus* stubs to remove the #ifdef'eryfrom cpus.c. This patch also fixes --disable-kvm build by providing themissing kvm_on_sigbus_vcpu kvm-stub.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
kvm: Consolidate must-have capability checks
Instead of splattering the code with #ifdefs and runtime checks forcapabilities we cannot work without anyway, provide central testinfrastructure for verifying their availability both at build andruntime.
kvm: Drop smp_cpus argument from init functions
No longer used.
s390: compile fixes
The s390 target doesn't compile out of the box anymore. This patch fixes allthe obvious glitches that got introduced in the last few weeks.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
target-s390: enable SIGP Initial Reset
For SMP to work with KVM, we need to properly emulate the SIGP Initial ResetCommand. Recent (2.6.32) kernels issue that before the SIGP Reset command thatactually wakes up the vcpu.
This patch makes -smp work on S390x....
Do not stop VM if emulation failed in userspace.
Continue vcpu execution in case emulation failure happened while vcpuwas in userspace. In this case #UD will be injected into the guestallowing guest OS to kill offending process and continue.
Signed-off-by: Gleb Natapov <gleb@redhat.com>...
kvm: enable smp > 1
Process INIT/SIPI requests and enable -smp > 1.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Avi Kivity <avi@redhat.com>
KVM: Rework VCPU state writeback API
This grand cleanup drops all reset and vmsave/load relatedsynchronization points in favor of four(!) generic hooks:
- cpu_synchronize_all_states in qemu_savevm_state_complete (initial sync from kernel before vmsave)...
Fix incorrect exception_index use
env->exception_index should be cleared with -1, not 0.
See also 821b19fe923ac49a24cdb4af902584fdd019cee6.
Spotted by Igor Kovalenko.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-s390: Fail on unknown instructions
We were being a bit too nice and didn't give the guest an invalid instructioninterrupt.
While that works, it's not exactly the fastest thing to do, since now theguest doesn't know that we're not really implementing that instruction, so it...
Add KVM support for S390x
S390x was one of the first platforms that received support for KVM back in theday. Unfortunately until now there hasn't been a qemu implementation that wouldenable users to actually run guests.
So let's include support for KVM S390x in qemu!...