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] [day] [month] [year] [list]
Message-ID: <CAAhV-H7bo0d4qO695nJ+t5p3Bf2Ogzmeas1wKE2beKmdRvLpng@mail.gmail.com>
Date: Thu, 6 Nov 2025 20:30:08 +0800
From: Huacai Chen <chenhuacai@...nel.org>
To: Bibo Mao <maobibo@...ngson.cn>
Cc: WANG Xuerui <kernel@...0n.name>, kvm@...r.kernel.org, loongarch@...ts.linux.dev, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] LoongArch: KVM: Set page with write privilege if dirty
 track disabled

Applied, thanks.

Huacai

On Tue, Sep 30, 2025 at 5:17 PM Bibo Mao <maobibo@...ngson.cn> wrote:
>
> With secondary MMU page table, if there is read page fault, page write
> privilege will not set even if it is writable from master MMU page
> table. This logic only works if dirty tracking is enabled, page table
> can be set as page_write if dirty tracking is disabled.
>
> It reduces extra page fault on secondary MMU page table if VM finishes
> migration, where master MMU page table is ready and secondary MMU page
> is fresh.
>
> Signed-off-by: Bibo Mao <maobibo@...ngson.cn>
> ---
>  arch/loongarch/kvm/mmu.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/loongarch/kvm/mmu.c b/arch/loongarch/kvm/mmu.c
> index 7c8143e79c12..a7fa458e3360 100644
> --- a/arch/loongarch/kvm/mmu.c
> +++ b/arch/loongarch/kvm/mmu.c
> @@ -857,7 +857,7 @@ static int kvm_map_page(struct kvm_vcpu *vcpu, unsigned long gpa, bool write)
>
>         if (writeable) {
>                 prot_bits = kvm_pte_mkwriteable(prot_bits);
> -               if (write)
> +               if (write || !kvm_slot_dirty_track_enabled(memslot))
>                         prot_bits = kvm_pte_mkdirty(prot_bits);
>         }
>
>
> base-commit: e5f0a698b34ed76002dc5cff3804a61c80233a7a
> --
> 2.39.3
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ