lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d6e794c7-4741-a656-07ae-1cad4c26d93e@redhat.com>
Date:   Tue, 21 Feb 2023 07:49:49 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     Tianrui Zhao <zhaotianrui@...ngson.cn>
Cc:     Huacai Chen <chenhuacai@...nel.org>,
        WANG Xuerui <kernel@...0n.name>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        loongarch@...ts.linux.dev, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org, Jens Axboe <axboe@...nel.dk>,
        Mark Brown <broonie@...nel.org>,
        Alex Deucher <alexander.deucher@....com>,
        Oliver Upton <oliver.upton@...ux.dev>, maobibo@...ngson.cn
Subject: Re: [PATCH v2 01/29] LoongArch: KVM: Add kvm related header files

On 2/21/23 03:56, Tianrui Zhao wrote:
>>
>> In _kvm_check_vmid(), you already have
>>
>> +    if (migrated || (ver != old)) {
>> +        _kvm_update_vpid(vcpu, cpu);
>> +        trace_kvm_vpid_change(vcpu, vcpu->arch.vpid[cpu]);
>> +    }
>>
>> so a vpid will never be recycled if a vCPU migrates from physical CPU 
>> A to B and back to A.
>>
>> So please keep the current VPID in the per-cpu struct vmcs, and you 
>> can just copy it from there in _kvm_check_vmid().
> 
> Thanks,  that is to say we should remove the vpid[NR_CPUS] array and it 
> is enough to use only one vpid variable?

Yes, you need a vpid variable here and one in struct kvm_context.

Paolo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ