On 8/3/23 23:15, Michal Luczaj wrote:
*mmu_reset_needed |= kvm_read_cr0(vcpu) != sregs->cr0; with a call to the function just before __set_sregs_common returns.What about kvm_post_set_cr4() then? Should it be introduced to __set_sregs_common() as well?
Yes, indeed, but it starts getting a bit unwieldy.If we decide not to particularly optimize KVM_SYNC_X86_SREGS, however, we can just chuck a KVM_REQ_TLB_FLUSH_GUEST request after __set_sregs and __set_sregs2 call kvm_mmu_reset_context().
Paolo