diff options
author | Paul Mackerras <paulus@samba.org> | 2012-10-15 01:17:42 +0000 |
---|---|---|
committer | Alexander Graf <agraf@suse.de> | 2012-10-30 10:54:56 +0100 |
commit | 8455d79e2163997e479931b8d5b7e60a92cd2b86 (patch) | |
tree | 901616f2b871898e206181d082356fd0a54fe17c /arch/powerpc/include/asm/kvm_host.h | |
parent | 2f12f03436847e063cda8cc4c339ad84961cbf39 (diff) | |
download | linux-8455d79e2163997e479931b8d5b7e60a92cd2b86.tar.gz linux-8455d79e2163997e479931b8d5b7e60a92cd2b86.tar.bz2 linux-8455d79e2163997e479931b8d5b7e60a92cd2b86.zip |
KVM: PPC: Book3S HV: Run virtual core whenever any vcpus in it can run
Currently the Book3S HV code implements a policy on multi-threaded
processors (i.e. POWER7) that requires all of the active vcpus in a
virtual core to be ready to run before we run the virtual core.
However, that causes problems on reset, because reset stops all vcpus
except vcpu 0, and can also reduce throughput since all four threads
in a virtual core have to wait whenever any one of them hits a
hypervisor page fault.
This relaxes the policy, allowing the virtual core to run as soon as
any vcpu in it is runnable. With this, the KVMPPC_VCPU_STOPPED state
and the KVMPPC_VCPU_BUSY_IN_HOST state have been combined into a single
KVMPPC_VCPU_NOTREADY state, since we no longer need to distinguish
between them.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'arch/powerpc/include/asm/kvm_host.h')
-rw-r--r-- | arch/powerpc/include/asm/kvm_host.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h index 218534d46ae9..1e8cbd1299fc 100644 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@ -563,9 +563,8 @@ struct kvm_vcpu_arch { }; /* Values for vcpu->arch.state */ -#define KVMPPC_VCPU_STOPPED 0 -#define KVMPPC_VCPU_BUSY_IN_HOST 1 -#define KVMPPC_VCPU_RUNNABLE 2 +#define KVMPPC_VCPU_NOTREADY 0 +#define KVMPPC_VCPU_RUNNABLE 1 /* Values for vcpu->arch.io_gpr */ #define KVM_MMIO_REG_MASK 0x001f |