[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] KVM: use KVM_{GET|SET}_SREGS2 when supported by kvm.
From: |
Maxim Levitsky |
Subject: |
Re: [PATCH 2/2] KVM: use KVM_{GET|SET}_SREGS2 when supported by kvm. |
Date: |
Thu, 01 Apr 2021 20:10:56 +0300 |
User-agent: |
Evolution 3.36.5 (3.36.5-2.fc32) |
On Thu, 2021-04-01 at 18:09 +0200, Paolo Bonzini wrote:
> On 01/04/21 16:45, Maxim Levitsky wrote:
> > +
> > + for (i = 0; i < 4; i++) {
> > + sregs.pdptrs[i] = env->pdptrs[i];
> > + }
> > +
> > + sregs.flags = 0;
> > + sregs.padding = 0;
> > +
> > + return kvm_vcpu_ioctl(CPU(cpu), KVM_SET_SREGS2, &sregs);
> > +}
> > +
>
> This breaks when migrating from old to new kernel, because in that case
> the PDPTRs are not initialized.
True, I haven't thought about it!
I'll fix this in the next version.
Best regards,
Maxim Levitsky
>
> Paolo
>