[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2] arm/kvm: Enable support for KVM_CAP_ARM_EAGER_SPLIT_CHUNK
From: |
Gavin Shan |
Subject: |
Re: [PATCH v2] arm/kvm: Enable support for KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE |
Date: |
Mon, 28 Aug 2023 10:05:10 +1000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 |
Hi Shameer,
On 8/15/23 19:27, Shameer Kolothum wrote:
Now that we have Eager Page Split support added for ARM in the kernel,
enable it in Qemu. This adds,
-eager-split-size to -accel sub-options to set the eager page split chunk
size.
-enable KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE.
The chunk size specifies how many pages to break at a time, using a
single allocation. Bigger the chunk size, more pages need to be
allocated ahead of time.
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
---
RFC v1:
https://lore.kernel.org/qemu-devel/20230725150002.621-1-shameerali.kolothum.thodi@huawei.com/
-Updated qemu-options.hx with description
-Addressed review comments from Peter and Gavin(Thanks).
---
include/sysemu/kvm_int.h | 1 +
qemu-options.hx | 14 +++++++++
target/arm/kvm.c | 62 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 77 insertions(+)
[...]
+static void kvm_arch_get_eager_split_size(Object *obj, Visitor *v,
+ const char *name, void *opaque,
+ Error **errp)
+{
+ KVMState *s = KVM_STATE(obj);
+ uint64_t value = s->kvm_eager_split_size;
+
+ visit_type_size(v, name, &value, errp);
+}
+
+static void kvm_arch_set_eager_split_size(Object *obj, Visitor *v,
+ const char *name, void *opaque,
+ Error **errp)
+{
+ KVMState *s = KVM_STATE(obj);
+ uint64_t value;
+
+ if (s->fd != -1) {
+ error_setg(errp, "Cannot set properties after the accelerator has been
initialized");
+ return;
+ }
+
Errors spotted by './scripts/checkpatch.pl', as below:
ERROR: line over 90 characters
#139: FILE: target/arm/kvm.c:1112:
+ error_setg(errp, "Cannot set properties after the accelerator has been
initialized");
Thanks,
Gavin