* [PATCH] KVM: arm64: nv: Use GFP_KERNEL_ACCOUNT for sysreg_masks allocation
@ 2024-06-17 18:10 Oliver Upton
2024-06-17 18:17 ` Marc Zyngier
2024-06-19 8:44 ` Oliver Upton
0 siblings, 2 replies; 3+ messages in thread
From: Oliver Upton @ 2024-06-17 18:10 UTC (permalink / raw)
To: kvmarm
Cc: Marc Zyngier, James Morse, Suzuki K Poulose, Zenghui Yu, kvm,
Oliver Upton
Of course, userspace is in the driver's seat for struct kvm and
associated allocations. Make sure the sysreg_masks allocation
participates in kmem accounting.
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
---
arch/arm64/kvm/nested.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c
index 6813c7c7f00a..57e3fb3eb334 100644
--- a/arch/arm64/kvm/nested.c
+++ b/arch/arm64/kvm/nested.c
@@ -196,7 +196,7 @@ int kvm_init_nv_sysregs(struct kvm *kvm)
goto out;
kvm->arch.sysreg_masks = kzalloc(sizeof(*(kvm->arch.sysreg_masks)),
- GFP_KERNEL);
+ GFP_KERNEL_ACCOUNT);
if (!kvm->arch.sysreg_masks) {
ret = -ENOMEM;
goto out;
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
--
2.45.2.627.g7a2c4fd464-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] KVM: arm64: nv: Use GFP_KERNEL_ACCOUNT for sysreg_masks allocation
2024-06-17 18:10 [PATCH] KVM: arm64: nv: Use GFP_KERNEL_ACCOUNT for sysreg_masks allocation Oliver Upton
@ 2024-06-17 18:17 ` Marc Zyngier
2024-06-19 8:44 ` Oliver Upton
1 sibling, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2024-06-17 18:17 UTC (permalink / raw)
To: Oliver Upton; +Cc: kvmarm, James Morse, Suzuki K Poulose, Zenghui Yu, kvm
On Mon, 17 Jun 2024 19:10:18 +0100,
Oliver Upton <oliver.upton@linux.dev> wrote:
>
> Of course, userspace is in the driver's seat for struct kvm and
> associated allocations. Make sure the sysreg_masks allocation
> participates in kmem accounting.
>
> Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
> ---
> arch/arm64/kvm/nested.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kvm/nested.c b/arch/arm64/kvm/nested.c
> index 6813c7c7f00a..57e3fb3eb334 100644
> --- a/arch/arm64/kvm/nested.c
> +++ b/arch/arm64/kvm/nested.c
> @@ -196,7 +196,7 @@ int kvm_init_nv_sysregs(struct kvm *kvm)
> goto out;
>
> kvm->arch.sysreg_masks = kzalloc(sizeof(*(kvm->arch.sysreg_masks)),
> - GFP_KERNEL);
> + GFP_KERNEL_ACCOUNT);
> if (!kvm->arch.sysreg_masks) {
> ret = -ENOMEM;
> goto out;
>
> base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
Ah, well spotted.
Reviewed-by: Marc Zyngier <maz@kernel.org>
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] KVM: arm64: nv: Use GFP_KERNEL_ACCOUNT for sysreg_masks allocation
2024-06-17 18:10 [PATCH] KVM: arm64: nv: Use GFP_KERNEL_ACCOUNT for sysreg_masks allocation Oliver Upton
2024-06-17 18:17 ` Marc Zyngier
@ 2024-06-19 8:44 ` Oliver Upton
1 sibling, 0 replies; 3+ messages in thread
From: Oliver Upton @ 2024-06-19 8:44 UTC (permalink / raw)
To: kvmarm, Oliver Upton
Cc: Zenghui Yu, kvm, Suzuki K Poulose, James Morse, Marc Zyngier
On Mon, 17 Jun 2024 18:10:18 +0000, Oliver Upton wrote:
> Of course, userspace is in the driver's seat for struct kvm and
> associated allocations. Make sure the sysreg_masks allocation
> participates in kmem accounting.
>
>
Applied to kvmarm/next, thanks!
[1/1] KVM: arm64: nv: Use GFP_KERNEL_ACCOUNT for sysreg_masks allocation
https://git.kernel.org/kvmarm/kvmarm/c/3dc14eefa504
--
Best,
Oliver
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-19 8:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-17 18:10 [PATCH] KVM: arm64: nv: Use GFP_KERNEL_ACCOUNT for sysreg_masks allocation Oliver Upton
2024-06-17 18:17 ` Marc Zyngier
2024-06-19 8:44 ` Oliver Upton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox