les changed, 8 insertions(+), 12 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/tools/testing/selftests/kvm/access_tracking_perf_test.c
b/tools/testing/selftests/kvm/access_tracking_perf_test.c
index 76c583a07ea2..942370d57392 100644
--- a/tools/testing/selftests/
On 11/12/22 7:19 AM, Oliver Upton wrote:
Does exactly what it says on the tin.
Signed-off-by: Oliver Upton
---
tools/testing/selftests/kvm/Makefile | 1 +
1 file changed, 1 insertion(+)
Reviewed-by: Gavin Shan
diff --git a/tools/testing/selftests/kvm/Makefile
b/tools/testing
changed, 3 insertions(+)
Reviewed-by: Gavin Shan
diff --git a/tools/testing/selftests/kvm/access_tracking_perf_test.c
b/tools/testing/selftests/kvm/access_tracking_perf_test.c
index 76c583a07ea2..4da066479e0a 100644
--- a/tools/testing/selftests/kvm/access_tracking_perf_test.c
+++ b/tools
Hi Sean,
On 11/12/22 8:18 AM, Sean Christopherson wrote:
On Sat, Nov 12, 2022, Gavin Shan wrote:
On 11/12/22 7:00 AM, Sean Christopherson wrote:
On Sat, Nov 12, 2022, Gavin Shan wrote:
On 11/11/22 11:19 PM, Marc Zyngier wrote:
On Thu, 10 Nov 2022 23:47:41 +,
Gavin Shan wrote
cpu context, kvm_arch_allow_write_without_running_vcpu() returns 'true',
and the backup bitmap (KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP) isn't enabled
yet.
Suggested-by: Sean Christopherson
Signed-off-by: Gavin Shan
---
virt/kvm/kvm_main.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --
Hi Sean,
On 11/12/22 7:00 AM, Sean Christopherson wrote:
On Sat, Nov 12, 2022, Gavin Shan wrote:
On 11/11/22 11:19 PM, Marc Zyngier wrote:
On Thu, 10 Nov 2022 23:47:41 +,
Gavin Shan wrote:
But that I don't get. Or rather, I don't get the commit message that
matches this hunk. Do we want
Hi Marc,
On 11/11/22 11:19 PM, Marc Zyngier wrote:
On Thu, 10 Nov 2022 23:47:41 +,
Gavin Shan wrote:
commit b05377ecbe003f12c8b79846fa3a300401dcab68 (HEAD -> kvm/arm64_dirtyring)
Author: Gavin Shan
Date: Fri Nov 11 07:13:12 2022 +0800
KVM: Push dirty information unconditiona
Hi Sean,
On 11/11/22 12:46 AM, Sean Christopherson wrote:
On Thu, Nov 10, 2022, Gavin Shan wrote:
@@ -3305,7 +3305,10 @@ void mark_page_dirty_in_slot(struct kvm *kvm,
struct kvm_vcpu *vcpu = kvm_get_running_vcpu();
#ifdef CONFIG_HAVE_KVM_DIRTY_RING
- if (WARN_ON_ONCE(!vcpu
Hi Marc,
On 11/10/22 6:25 PM, Marc Zyngier wrote:
On Wed, 09 Nov 2022 00:51:21 +,
Gavin Shan wrote:
On 11/9/22 8:32 AM, Sean Christopherson wrote:
That said, there're no remaining issues that can't be sorted out
on top, so don't hold up v10 if I don't look at it in a timely
manner
Hi Marc,
On 10/25/22 7:18 AM, Maciej S. Szmigiero wrote:
On 20.10.2022 09:12, Gavin Shan wrote:
kvm/selftests/memslots_perf_test doesn't work with 64KB-page-size-host
and 4KB-page-size-guest on aarch64. In the implementation, the host and
guest page size have been hardcoded to 4KB. It's
vcpu exit due to full dirty ring state. The option '-c'
becomes a hint to the dirty ring count, instead of the value of it.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/dirty_log_test.c | 26 +---
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/tools
' and the ring
buffer index before next new mode is to be executed.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/dirty_log_test.c | 27
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/tools/testing/selftests/kvm/dirty_log_test.c
b/tools/testing
0xb06ec86b: ?? ??:0
10 0x00401def: _start at ??:?
Dirty ring mapped private
Fix the issue by using host's page size to map the ring buffer.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/lib/kvm_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
() to
keep the site of saving vgic/its tables out of the no-running-vcpu
radar.
Signed-off-by: Gavin Shan
---
Documentation/virt/kvm/api.rst| 2 +-
arch/arm64/include/uapi/asm/kvm.h | 1 +
arch/arm64/kvm/Kconfig| 2 ++
arch/arm64/kvm/arm.c | 3 +++
arch
-off-by: Gavin Shan
Acked-by: Peter Xu
---
Documentation/virt/kvm/api.rst| 34 ---
.../virt/kvm/devices/arm-vgic-its.rst | 5 +-
include/linux/kvm_dirty_ring.h| 7 +++
include/linux/kvm_host.h | 1 +
include/uapi/linux/kvm.h
for 'kvm_cpu_dirty_log_size' \
[-Wmissing-prototypes] \
int __weak kvm_cpu_dirty_log_size(void)
Reported-by: kernel test robot
Signed-off-by: Gavin Shan
Reviewed-by: Peter Xu
---
arch/x86/include/asm/kvm_host.h | 2 --
include/linux/kvm_dirty_ring.h | 1 +
2 files
host.h is changed to tab character by the way. In order
to avoid using 'container_of()', the argument @ring is replaced by @vcpu
in kvm_dirty_ring_push().
Link: https://lore.kernel.org/kvmarm/87lerkwtm5.wl-...@kernel.org
Suggested-by: Marc Zyngier
Signed-off-by: Gavin Shan
Reviewed-by: Pe
elog improvement (Marc)
* Fix dirty_log_test without knowing host page size (Drew)
Gavin Shan (7):
KVM: x86: Introduce KVM_REQ_DIRTY_RING_SOFT_FULL
KVM: Move declaration of kvm_cpu_dirty_log_size() to kvm_dirty_ring.h
KVM: Support dirty ring in conjunction with bitmap
KVM: arm64: E
| 3 +-
arch/arm64/kvm/hyp/pgtable.c | 63 +++-
3 files changed, 26 insertions(+), 41 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/include/asm/kvm_pgtable.h
b/arch/arm64/include/asm/kvm_pgtable.h
index 14d4b68a1e92..a752793482cb 100644
/pgtable.c | 18 +-
1 file changed, 5 insertions(+), 13 deletions(-)
Reviewed-by: Gavin Shan
diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c
index db25e81a9890..93989b750a26 100644
--- a/arch/arm64/kvm/hyp/pgtable.c
+++ b/arch/arm64/kvm/hyp/pgtable.c
Hi Oliver,
On 11/8/22 5:56 AM, Oliver Upton wrote:
As a prerequisite for getting visitors off of struct kvm_pgtable, pass
mm_ops through the visitor context.
No functional change intended.
Signed-off-by: Oliver Upton
---
arch/arm64/include/asm/kvm_pgtable.h | 1 +
(+), 51 deletions(-)
Reviewed-by: Gavin Shan
A nit as below.
diff --git a/arch/arm64/include/asm/kvm_pgtable.h
b/arch/arm64/include/asm/kvm_pgtable.h
index 607f9bb8aab4..14d4b68a1e92 100644
--- a/arch/arm64/include/asm/kvm_pgtable.h
+++ b/arch/arm64/include/asm/kvm_pgtable.h
@@ -201,6 +201,7
Hi Oliver,
On 11/10/22 8:42 AM, Oliver Upton wrote:
On Thu, Nov 10, 2022 at 08:23:36AM +0800, Gavin Shan wrote:
On 11/8/22 5:56 AM, Oliver Upton wrote:
Passing new arguments by value to the visitor callbacks is extremely
inflexible for stuffing new parameters used by only some of the
visitors
/arm64/include/asm/kvm_pgtable.h | 15 +-
arch/arm64/kvm/hyp/nvhe/mem_protect.c | 10 +-
arch/arm64/kvm/hyp/nvhe/setup.c | 16 +-
arch/arm64/kvm/hyp/pgtable.c | 269 +-
4 files changed, 154 insertions(+), 156 deletions(-)
Reviewed-by: Gavin Shan
One
Hi Sean,
On 11/9/22 8:32 AM, Sean Christopherson wrote:
On Wed, Nov 09, 2022, Gavin Shan wrote:
On 11/9/22 8:05 AM, Sean Christopherson wrote:
On Wed, Nov 09, 2022, Gavin Shan wrote:
On 11/9/22 12:25 AM, Sean Christopherson wrote:
I have no objection to disallowing userspace from disabling
Hi Sean,
On 11/9/22 8:05 AM, Sean Christopherson wrote:
On Wed, Nov 09, 2022, Gavin Shan wrote:
On 11/9/22 12:25 AM, Sean Christopherson wrote:
I have no objection to disallowing userspace from disabling the combo, but I
think it's worth requiring cap->args[0] to be '0' just in case we cha
Hi Sean,
On 11/9/22 12:25 AM, Sean Christopherson wrote:
On Tue, Nov 08, 2022, Gavin Shan wrote:
diff --git a/virt/kvm/Kconfig b/virt/kvm/Kconfig
index 800f9470e36b..228be1145cf3 100644
--- a/virt/kvm/Kconfig
+++ b/virt/kvm/Kconfig
@@ -33,6 +33,14 @@ config HAVE_KVM_DIRTY_RING_ACQ_REL
vcpu exit due to full dirty ring state. The option '-c'
becomes a hint to the dirty ring count, instead of the value of it.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/dirty_log_test.c | 26 +---
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/tools
' and the ring
buffer index before next new mode is to be executed.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/dirty_log_test.c | 27
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/tools/testing/selftests/kvm/dirty_log_test.c
b/tools/testing
0xb06ec86b: ?? ??:0
10 0x00401def: _start at ??:?
Dirty ring mapped private
Fix the issue by using host's page size to map the ring buffer.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/lib/kvm_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
the generic one, to keep the site of saving vgic/its
tables out of the no-running-vcpu radar.
Signed-off-by: Gavin Shan
---
Documentation/virt/kvm/api.rst| 2 +-
arch/arm64/include/uapi/asm/kvm.h | 1 +
arch/arm64/kvm/Kconfig| 2 ++
arch/arm64/kvm/arm.c | 3 +++
arch/arm64
-off-by: Gavin Shan
Acked-by: Peter Xu
---
Documentation/virt/kvm/api.rst| 34 ---
.../virt/kvm/devices/arm-vgic-its.rst | 5 +-
include/linux/kvm_dirty_ring.h| 7 +++
include/linux/kvm_host.h | 1 +
include/uapi/linux/kvm.h
for 'kvm_cpu_dirty_log_size' \
[-Wmissing-prototypes] \
int __weak kvm_cpu_dirty_log_size(void)
Reported-by: kernel test robot
Signed-off-by: Gavin Shan
Reviewed-by: Peter Xu
---
arch/x86/include/asm/kvm_host.h | 2 --
include/linux/kvm_dirty_ring.h | 1 +
2 files
host.h is changed to tab character by the way. In order
to avoid using 'container_of()', the argument @ring is replaced by @vcpu
in kvm_dirty_ring_push().
Link: https://lore.kernel.org/kvmarm/87lerkwtm5.wl-...@kernel.org
Suggested-by: Marc Zyngier
Signed-off-by: Gavin Shan
Reviewed-by: Pe
quest_pending() (Peter)
* Move declaration of kvm_cpu_dirty_log_size() (test-robot)
v2:
* Introduce KVM_REQ_RING_SOFT_FULL (Marc)
* Changelog improvement (Marc)
* Fix dirty_log_test without knowing host page size
Hi Oliver,
On 11/8/22 9:13 AM, Oliver Upton wrote:
On Tue, Nov 08, 2022 at 08:44:52AM +0800, Gavin Shan wrote:
Frankly, I don't expect the capability to be disabled. Similar to
KVM_CAP_DIRTY_LOG_RING
or KVM_CAP_DIRTY_LOG_RING_ACQ_REL, it would a one-shot capability and only
enablement
Hi Sean,
On 11/8/22 12:05 AM, Sean Christopherson wrote:
On Sat, Nov 05, 2022, Gavin Shan wrote:
diff --git a/virt/kvm/dirty_ring.c b/virt/kvm/dirty_ring.c
index fecbb7d75ad2..758679724447 100644
--- a/virt/kvm/dirty_ring.c
+++ b/virt/kvm/dirty_ring.c
@@ -21,6 +21,16 @@ u32
Hi Marc,
On 11/7/22 7:33 PM, Marc Zyngier wrote:
On Mon, 07 Nov 2022 10:45:34 +,
Gavin Shan wrote:
On 11/5/22 7:40 AM, Gavin Shan wrote:
ARM64 needs to dirty memory outside of a VCPU context when VGIC/ITS is
enabled. It's conflicting with that ring-based dirty page tracking always
Hi Marc,
On 11/7/22 5:47 PM, Marc Zyngier wrote:
On Sun, 06 Nov 2022 21:46:19 +,
Gavin Shan wrote:
On 11/6/22 11:50 PM, Marc Zyngier wrote:
On Fri, 04 Nov 2022 23:40:46 +,
Gavin Shan wrote:
Enable ring-based dirty memory tracking on arm64 by selecting
CONFIG_HAVE_KVM_DIRTY_
Hi Marc, Peter, Oliver and Sean,
On 11/5/22 7:40 AM, Gavin Shan wrote:
ARM64 needs to dirty memory outside of a VCPU context when VGIC/ITS is
enabled. It's conflicting with that ring-based dirty page tracking always
requires a running VCPU context.
Introduce a new flavor of dirty ring
Hi Marc,
On 11/7/22 12:08 AM, Marc Zyngier wrote:
On Fri, 04 Nov 2022 23:40:42 +,
Gavin Shan wrote:
This series enables the ring-based dirty memory tracking for ARM64.
The feature has been available and enabled on x86 for a while. It
is beneficial when the number of dirty pages is small
Hi Marc,
On 11/6/22 11:50 PM, Marc Zyngier wrote:
On Fri, 04 Nov 2022 23:40:46 +,
Gavin Shan wrote:
Enable ring-based dirty memory tracking on arm64 by selecting
CONFIG_HAVE_KVM_DIRTY_{RING_ACQ_REL, RING_WITH_BITMAP} and providing
the ring buffer's physical page offset
Hi Marc,
On 11/6/22 11:43 PM, Marc Zyngier wrote:
On Fri, 04 Nov 2022 23:40:45 +,
Gavin Shan wrote:
ARM64 needs to dirty memory outside of a VCPU context when VGIC/ITS is
enabled. It's conflicting with that ring-based dirty page tracking always
requires a running VCPU context.
Introduce
Hi Peter and Marc,
On 11/7/22 5:06 AM, Peter Xu wrote:
On Sun, Nov 06, 2022 at 08:12:22PM +, Marc Zyngier wrote:
On Sun, 06 Nov 2022 16:22:29 +,
Peter Xu wrote:
On Sun, Nov 06, 2022 at 03:43:17PM +, Marc Zyngier wrote:
+Note that the bitmap here is only a backup of the ring
On 10/25/22 7:18 AM, Maciej S. Szmigiero wrote:
On 20.10.2022 09:12, Gavin Shan wrote:
kvm/selftests/memslots_perf_test doesn't work with 64KB-page-size-host
and 4KB-page-size-guest on aarch64. In the implementation, the host and
guest page size have been hardcoded to 4KB. It's ovbiously
vcpu exit due to full dirty ring state. The option '-c'
becomes a hint to the dirty ring count, instead of the value of it.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/dirty_log_test.c | 26 +---
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/tools
' and the ring
buffer index before next new mode is to be executed.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/dirty_log_test.c | 27
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/tools/testing/selftests/kvm/dirty_log_test.c
b/tools/testing
0xb06ec86b: ?? ??:0
10 0x00401def: _start at ??:?
Dirty ring mapped private
Fix the issue by using host's page size to map the ring buffer.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/lib/kvm_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
are being saved or not. The helper is used
in ARM64's kvm_arch_allow_write_without_running_vcpu() to keep the
site of saving vgic/its tables out of no-running-vcpu radar.
Signed-off-by: Gavin Shan
---
Documentation/virt/kvm/api.rst | 2 +-
arch/arm64/include/uapi/asm/kvm.h | 1 +
arch/arm64
-off-by: Gavin Shan
Acked-by: Peter Xu
---
Documentation/virt/kvm/api.rst | 33 ++-
include/linux/kvm_dirty_ring.h | 7 +
include/linux/kvm_host.h | 1 +
include/uapi/linux/kvm.h | 1 +
virt/kvm/Kconfig | 8 ++
virt/kvm/dirty_ring.c
host.h is changed to tab character by the way. In order
to avoid using 'container_of()', the argument @ring is replaced by @vcpu
in kvm_dirty_ring_push().
Link: https://lore.kernel.org/kvmarm/87lerkwtm5.wl-...@kernel.org
Suggested-by: Marc Zyngier
Signed-off-by: Gavin Shan
Reviewed-by: Pe
for 'kvm_cpu_dirty_log_size' \
[-Wmissing-prototypes] \
int __weak kvm_cpu_dirty_log_size(void)
Reported-by: kernel test robot
Signed-off-by: Gavin Shan
Reviewed-by: Peter Xu
---
arch/x86/include/asm/kvm_host.h | 2 --
include/linux/kvm_dirty_ring.h | 1 +
2 files
(Marc)
* Changelog improvement (Marc)
* Fix dirty_log_test without knowing host page size (Drew)
Gavin Shan (7):
KVM: x86: Introduce KVM_REQ_DIRTY_RING_SOFT_FULL
KVM: Move declaration of kvm_cpu_dirty_log_size() to kvm_dirty_ring.h
KVM
Hi Oliver,
On 11/5/22 4:12 AM, Oliver Upton wrote:
On Fri, Nov 04, 2022 at 02:57:15PM +0800, Gavin Shan wrote:
On 11/4/22 9:06 AM, Oliver Upton wrote:
[...]
Just to make sure we're on the same page, there's two issues:
(1) If DIRTY_LOG_RING is enabled before memslot creation
Hi Oliver,
On 11/4/22 9:06 AM, Oliver Upton wrote:
On Fri, Nov 04, 2022 at 08:12:21AM +0800, Gavin Shan wrote:
On 11/4/22 7:32 AM, Oliver Upton wrote:
On Mon, Oct 31, 2022 at 08:36:16AM +0800, Gavin Shan wrote:
ARM64 needs to dirty memory outside of a VCPU context when VGIC/ITS is
enabled
Hi Oliver,
On 11/4/22 7:32 AM, Oliver Upton wrote:
On Mon, Oct 31, 2022 at 08:36:16AM +0800, Gavin Shan wrote:
ARM64 needs to dirty memory outside of a VCPU context when VGIC/ITS is
enabled. It's conflicting with that ring-based dirty page tracking always
requires a running VCPU context
On 11/3/22 12:44 AM, Marc Zyngier wrote:
On Wed, 02 Nov 2022 16:11:07 +,
Sean Christopherson wrote:
On Wed, Nov 02, 2022, Marc Zyngier wrote:
On Wed, 02 Nov 2022 14:29:26 +, Peter Xu wrote:
However I don't see anything stops a simple "race" to trigger like below:
On 10/31/22 5:08 PM, Oliver Upton wrote:
On Mon, Oct 31, 2022 at 08:36:17AM +0800, Gavin Shan wrote:
KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP should be enabled only when KVM
device "kvm-arm-vgic-its" is used by userspace. Currently, it's the
only case where a running VCPU is missed for
On 10/31/22 5:08 PM, Marc Zyngier wrote:
On 2022-10-28 17:51, Sean Christopherson wrote:
On Fri, Oct 28, 2022, Gavin Shan wrote:
On 10/28/22 2:30 AM, Marc Zyngier wrote:
> On Thu, 27 Oct 2022 18:44:51 +0100,
> > On Thu, Oct 27, 2022, Marc Zyngier wrote:
> > > On Tue, 25 Oct 2
Hi Sean,
On 10/29/22 12:51 AM, Sean Christopherson wrote:
On Fri, Oct 28, 2022, Gavin Shan wrote:
On 10/28/22 2:30 AM, Marc Zyngier wrote:
On Thu, 27 Oct 2022 18:44:51 +0100,
Sean Christopherson wrote:
On Thu, Oct 27, 2022, Marc Zyngier wrote:
On Tue, 25 Oct 2022 18:47:12 +0100, Sean
vcpu exit due to full dirty ring state. The option '-c'
becomes a hint to the dirty ring count, instead of the value of it.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/dirty_log_test.c | 26 +---
1 file changed, 22 insertions(+), 4 deletions(-)
diff --git a/tools
' and the ring
buffer index before next new mode is to be executed.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/dirty_log_test.c | 27
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/tools/testing/selftests/kvm/dirty_log_test.c
b/tools/testing
0xb06ec86b: ?? ??:0
10 0x00401def: _start at ??:?
Dirty ring mapped private
Fix the issue by using host's page size to map the ring buffer.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/lib/kvm_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
Enable ring-based dirty memory tracking on arm64 by selecting
CONFIG_HAVE_KVM_DIRTY_{RING_ACQ_REL, RING_WITH_BITMAP} and providing
the ring buffer's physical page offset (KVM_DIRTY_LOG_PAGE_OFFSET).
Signed-off-by: Gavin Shan
---
Documentation/virt/kvm/api.rst| 2 +-
arch/arm64/include/uapi
google.com
Suggested-by: Sean Christopherson
Signed-off-by: Gavin Shan
---
arch/arm64/kvm/mmu.c | 14 ++
arch/arm64/kvm/vgic/vgic-init.c| 4 ++--
arch/arm64/kvm/vgic/vgic-irqfd.c | 4 ++--
arch/arm64/kvm/vgic/vgic-its.c | 2 +-
arch/arm64/kvm/vgic
-off-by: Gavin Shan
---
Documentation/virt/kvm/api.rst | 31 ---
include/linux/kvm_dirty_ring.h | 6 ++
include/linux/kvm_host.h | 1 +
include/uapi/linux/kvm.h | 1 +
virt/kvm/Kconfig | 8
virt/kvm/dirty_ring.c | 5
: Add KVM_CAP_DIRTY_LOG_RING_ACQ_REL capability and
config option")
Reported-by: Sean Christopherson
Suggested-by: Sean Christopherson
Signed-off-by: Gavin Shan
---
virt/kvm/kvm_main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 30
for 'kvm_cpu_dirty_log_size' \
[-Wmissing-prototypes] \
int __weak kvm_cpu_dirty_log_size(void)
Reported-by: kernel test robot
Signed-off-by: Gavin Shan
Reviewed-by: Peter Xu
---
arch/x86/include/asm/kvm_host.h | 2 --
include/linux/kvm_dirty_ring.h | 1 +
2 files
rieved from the VCPU.
Link: https://lore.kernel.org/kvmarm/87lerkwtm5.wl-...@kernel.org
Suggested-by: Marc Zyngier
Signed-off-by: Gavin Shan
Reviewed-by: Peter Xu
---
arch/x86/kvm/x86.c | 15 ++-
include/linux/kvm_dirty_ring.h | 17 ++---
include/linux/kvm_
_SOFT_FULL (Marc)
* Changelog improvement (Marc)
* Fix dirty_log_test without knowing host page size (Drew)
Gavin Shan (9):
KVM: x86: Introduce KVM_REQ_DIRTY_RING_SOFT_FULL
KVM: Move declaration of kvm_cpu_dirty_log_size() to kvm_dirty_ri
Hi Sean and Marc,
On 10/28/22 2:30 AM, Marc Zyngier wrote:
On Thu, 27 Oct 2022 18:44:51 +0100,
Sean Christopherson wrote:
On Thu, Oct 27, 2022, Marc Zyngier wrote:
On Tue, 25 Oct 2022 18:47:12 +0100, Sean Christopherson
wrote:
[...]
And ideally such bugs would detected without
Hi Sean,
On 10/22/22 12:05 AM, Sean Christopherson wrote:
On Fri, Oct 21, 2022, Marc Zyngier wrote:
On Fri, 21 Oct 2022 00:44:51 +0100,
Sean Christopherson wrote:
On Tue, Oct 11, 2022, Gavin Shan wrote:
Some architectures (such as arm64) need to dirty memory outside of the
context
Hi Sean,
On 10/22/22 7:20 AM, Sean Christopherson wrote:
On Fri, Oct 21, 2022, Gavin Shan wrote:
What about inverting the naming to better capture that this is about the dirty
bitmap, and less so about the dirty ring? It's not obvious what "exclusive"
means, e.g. I saw this s
Hi Sean,
On 10/22/22 7:48 AM, Sean Christopherson wrote:
On Sat, Oct 22, 2022, Gavin Shan wrote:
When dirty ring becomes full, the VCPU can't handle any operations, which will
bring more dirty pages.
Right, but there's a buffer of 64 entries on top of what the CPU can buffer
(VMX's
PML can
Hi Sean,
On 10/21/22 11:25 PM, Sean Christopherson wrote:
On Fri, Oct 21, 2022, Gavin Shan wrote:
I think Marc want to make the check more generalized with a new event [1].
Generalized code can be achieved with a helper though. The motivation is indeed
to avoid overhead on every run
Hi Sean,
On 10/21/22 7:44 AM, Sean Christopherson wrote:
On Tue, Oct 11, 2022, Gavin Shan wrote:
Some architectures (such as arm64) need to dirty memory outside of the
context of a vCPU. Of course, this simply doesn't fit with the UAPI of
KVM's per-vCPU dirty ring.
What is the point of using
Hi Sean,
On 10/21/22 6:42 AM, Sean Christopherson wrote:
On Tue, Oct 11, 2022, Gavin Shan wrote:
This adds KVM_REQ_RING_SOFT_FULL, which is raised when the dirty
"This" is basically "This patch", which is generally frowned upon. Just state
what changes are being
On 10/20/22 4:18 AM, Maciej S. Szmigiero wrote:
On 19.10.2022 02:26, Gavin Shan wrote:
On 10/18/22 11:56 PM, Maciej S. Szmigiero wrote:
On 18.10.2022 02:51, Gavin Shan wrote:
On 10/18/22 8:46 AM, Gavin Shan wrote:
On 10/18/22 5:31 AM, Maciej S. Szmigiero wrote:
On 14.10.2022 09:19, Gavin
igh for this test, decrease the cap (max is 514)
Signed-off-by: Gavin Shan
---
.../testing/selftests/kvm/memslot_perf_test.c | 45 +--
1 file changed, 41 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c
b/tools/testing/selftests/
also add checks to ensure that none of host/guest page size exceeds
64KB. MEM_TEST_MOVE_SIZE is fixed up to 192KB either.
With this, the following command works fine on 64KB-page-size-host and
4KB-page-size-guest.
# ./memslot_perf_test -v -s 512
Signed-off-by: Gavin Shan
---
.../testing
in this patch are almost mechanical
replacing '4096' with 'guest_page_size'.
Signed-off-by: Gavin Shan
---
.../testing/selftests/kvm/memslot_perf_test.c | 210 +++---
1 file changed, 129 insertions(+), 81 deletions(-)
diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c
b/tools
intended.
Signed-off-by: Gavin Shan
---
.../testing/selftests/kvm/memslot_perf_test.c | 32 +++
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c
b/tools/testing/selftests/kvm/memslot_perf_test.c
index dcb492b3f27b
it as the
memory slot index either.
No functional change intended.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/memslot_perf_test.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c
b/tools/testing/selftests
atches.
No functional change intended.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/memslot_perf_test.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c
b/tools/testing/selftests/kvm/memslot_perf_test.c
index 449954
size in kvm_util_base.h in
PATCH[v2 5/6] (Sean)
* Add checks on host/guest page size in check_memory_size()
and fail early if any of them exceeds 64KB in PATCH[v2 5/6] (Maciej)
Gavin Shan (6):
KVM: selftests: memslot_perf_test: Use data
On 10/18/22 11:56 PM, Maciej S. Szmigiero wrote:
On 18.10.2022 02:51, Gavin Shan wrote:
On 10/18/22 8:46 AM, Gavin Shan wrote:
On 10/18/22 5:31 AM, Maciej S. Szmigiero wrote:
On 14.10.2022 09:19, Gavin Shan wrote:
The test case is obviously broken on aarch64 because non-4KB guest
page size
Hi Peter,
On 10/19/22 12:07 AM, Peter Xu wrote:
On Tue, Oct 11, 2022 at 02:14:42PM +0800, Gavin Shan wrote:
Some architectures (such as arm64) need to dirty memory outside of the
context of a vCPU. Of course, this simply doesn't fit with the UAPI of
KVM's per-vCPU dirty ring.
Introduce a new
On 10/18/22 3:47 PM, Oliver Upton wrote:
On Mon, Oct 17, 2022 at 10:08:48PM +, Sean Christopherson wrote:
On Mon, Oct 17, 2022, Maciej S. Szmigiero wrote:
+#define MEM_EXTRA_SIZE 0x1
Also, an expression like "(64 << 10)" is more readable than a "1"
with a tail of zeroes (it's
igh for this test, decrease the cap (max is 514)
Signed-off-by: Gavin Shan
---
.../testing/selftests/kvm/memslot_perf_test.c | 45 +--
1 file changed, 41 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c
b/tools/testing/selftests/
to host page,
the size of page chunk is automatically selected, other than one
page.
- All other changes included in this patch are almost mechanical
replacing '4096' with 'guest_page_size'.
Signed-off-by: Gavin Shan
---
.../testing/selftests/kvm/memslot_perf_test.c | 201
also add checks to ensure that none of host/guest page size exceeds 64KB.
After it's applied, the following command works fine on 64KB-page-size-host
and 4KB-page-size-guest.
# ./memslot_perf_test -v -s 512
Signed-off-by: Gavin Shan
---
.../selftests/kvm/include/kvm_util_base.h | 15
intended.
Signed-off-by: Gavin Shan
---
.../testing/selftests/kvm/memslot_perf_test.c | 32 +++
1 file changed, 19 insertions(+), 13 deletions(-)
diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c
b/tools/testing/selftests/kvm/memslot_perf_test.c
index dcb492b3f27b
atches.
No functional change intended.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/memslot_perf_test.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c
b/tools/testing/selftests/kvm/memslot_perf_test.c
index 449954
it as the
memory slot index either.
No functional change intended.
Signed-off-by: Gavin Shan
---
tools/testing/selftests/kvm/memslot_perf_test.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/tools/testing/selftests/kvm/memslot_perf_test.c
b/tools/testing/selftests
)
Gavin Shan (6):
KVM: selftests: memslot_perf_test: Use data->nslots in prepare_vm()
KVM: selftests: memslot_perf_test: Consolidate loop conditions in
prepare_vm()
KVM: selftests: memslot_perf_test: Probe memory slots for once
KVM: selftests: memslot_perf_test: Support variable guest p
On 10/18/22 5:36 AM, Maciej S. Szmigiero wrote:
On 14.10.2022 09:19, Gavin Shan wrote:
The addresses and sizes passed to madvise() and vm_userspace_mem_region_add()
should be aligned to host page size, which can be 64KB on aarch64. So it's
wrong by passing additional fixed 4KB memory area
On 10/18/22 8:46 AM, Gavin Shan wrote:
On 10/18/22 5:31 AM, Maciej S. Szmigiero wrote:
On 14.10.2022 09:19, Gavin Shan wrote:
The test case is obviously broken on aarch64 because non-4KB guest
page size is supported. The guest page size on aarch64 could be 4KB,
16KB or 64KB.
This supports
On 10/18/22 5:31 AM, Maciej S. Szmigiero wrote:
On 14.10.2022 09:19, Gavin Shan wrote:
The test case is obviously broken on aarch64 because non-4KB guest
page size is supported. The guest page size on aarch64 could be 4KB,
16KB or 64KB.
This supports variable guest page size, mostly
On 10/18/22 7:32 AM, Sean Christopherson wrote:
On Tue, Oct 18, 2022, Gavin Shan wrote:
On 10/18/22 6:56 AM, Maciej S. Szmigiero wrote:
On 18.10.2022 00:51, Gavin Shan wrote:
On 10/18/22 6:08 AM, Sean Christopherson wrote:
On Mon, Oct 17, 2022, Maciej S. Szmigiero wrote:
+#define
On 10/18/22 6:56 AM, Maciej S. Szmigiero wrote:
On 18.10.2022 00:51, Gavin Shan wrote:
On 10/18/22 6:08 AM, Sean Christopherson wrote:
On Mon, Oct 17, 2022, Maciej S. Szmigiero wrote:
+#define MEM_EXTRA_SIZE 0x1
Also, an expression like "(64 << 10)" is more re
1 - 100 of 637 matches
Mail list logo