[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] s390: clear registers, psw and prefix at vc
From: |
Alexander Graf |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] s390: clear registers, psw and prefix at vcpu reset |
Date: |
Fri, 23 Nov 2012 16:13:29 +0100 |
On 23.11.2012, at 16:02, Peter Maydell wrote:
> On 23 November 2012 10:18, Jens Freimann <address@hidden> wrote:
>> + /* The initial reset call is needed here to reset in-kernel
>> + * vcpu data that we can't access directly from QEMU.
>
> If there's in-kernel vcpu data we can't access from QEMU,
> doesn't this cause problems for migration?
This one is for older kernels. For newer kernels, we have sync regs and ONE_REG
interfaces to everything we need FWIW :).
>
>> Before
>> + * this ioctl cpu_synchronize_state() is called in common kvm
>> + * code (kvm-all). What remains is clearing registers and psw
>> + * in QEMU cpu state */
>> + if (kvm_vcpu_ioctl(env, KVM_S390_INITIAL_RESET, NULL)) {
>> + perror("Can't reset vcpu\n");
>> + }
>
> Doesn't this mean we're now out-of-sync again, since the
> kernel state will be whatever INITIAL_RESET says it should
> be but the QEMU state won't have been changed?
>
> Generally, I think an arch-independent 'reset vcpu' ioctl
> would be useful. At the moment for ARM you have to pull
> everything out and back in again via the GET/SET_REG interface,
> which works [you can keep all the state around to write back
> on vcpu reset] but is ugly.
Actually it's the way it's supposed to work. The reset call is just a hack,
because it means we need to duplicate the reset logic for KVM & TCG. But it
dates back to when KVM on s390 wasn't using QEMU.
Alex
- [Qemu-devel] [PATCH 0/3] s390: vcpu reset, -cpu ? and minor sclp fix, Jens Freimann, 2012/11/23
- [Qemu-devel] [PATCH 1/3] S390: Basic CPU model support, Jens Freimann, 2012/11/23
- [Qemu-devel] [PATCH 2/3] s390: clear registers, psw and prefix at vcpu reset, Jens Freimann, 2012/11/23
- Re: [Qemu-devel] [PATCH 2/3] s390: clear registers, psw and prefix at vcpu reset, Peter Maydell, 2012/11/23
- Re: [Qemu-devel] [PATCH 2/3] s390: clear registers, psw and prefix at vcpu reset,
Alexander Graf <=
- [Qemu-devel] [PATCH 3/3] sclp: Fix uninitialized var in handle_write_event_buf()., Jens Freimann, 2012/11/23