Make use of new kvm_s390_get_registers_partial() for kvm_handle_css_inst() and
handle_hypercall() since they only need registers from the partial set and they
are called quite frequently.
Signed-off-by: Jason J. Herne <jjherne@us.ibm.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
int r = 0;
int no_cc = 0;
CPUS390XState *env = &cpu->env;
int r = 0;
int no_cc = 0;
CPUS390XState *env = &cpu->env;
+ CPUState *cs = ENV_GET_CPU(env);
if (ipa0 != 0xb2) {
/* Not handled for now. */
return -1;
}
if (ipa0 != 0xb2) {
/* Not handled for now. */
return -1;
}
- cpu_synchronize_state(env);
+
+ kvm_s390_get_registers_partial(cs);
+ cs->kvm_vcpu_dirty = true;
+
switch (ipa1) {
case PRIV_XSCH:
r = ioinst_handle_xsch(env, env->regs[1]);
switch (ipa1) {
case PRIV_XSCH:
r = ioinst_handle_xsch(env, env->regs[1]);
static int handle_hypercall(CPUS390XState *env, struct kvm_run *run)
{
static int handle_hypercall(CPUS390XState *env, struct kvm_run *run)
{
- cpu_synchronize_state(env);
+ CPUState *cs = ENV_GET_CPU(env);
+
+ kvm_s390_get_registers_partial(cs);
+ cs->kvm_vcpu_dirty = true;
env->regs[2] = s390_virtio_hypercall(env);
return 0;
env->regs[2] = s390_virtio_hypercall(env);
return 0;
struct kvm_run *run = cs->kvm_run;
int ret;
struct kvm_run *run = cs->kvm_run;
int ret;
- cpu_synchronize_state(env);
+ kvm_s390_get_registers_partial(cs);
+ cs->kvm_vcpu_dirty = true;
+
ret = ioinst_handle_tsch(env, env->regs[1], run->s390_tsch.ipb);
if (ret >= 0) {
/* Success; set condition code. */
ret = ioinst_handle_tsch(env, env->regs[1], run->s390_tsch.ipb);
if (ret >= 0) {
/* Success; set condition code. */