]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86/xen: Add runstate tests for 32-bit mode and crossing page boundary
authorDavid Woodhouse <dwmw@amazon.co.uk>
Sat, 19 Nov 2022 09:27:46 +0000 (09:27 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Nov 2022 00:05:28 +0000 (19:05 -0500)
commitd24148b3f5fe1edfd529fe4f33d05f6dd0c467f9
tree7dfd1e22cf4440210c6bca399e05367add56e451
parentc0a97136e1670b5dccdf8ba456fe1326268083b7
KVM: x86/xen: Add runstate tests for 32-bit mode and crossing page boundary

Torture test the cases where the runstate crosses a page boundary, and
and especially the case where it's configured in 32-bit mode and doesn't,
but then switching to 64-bit mode makes it go onto the second page.

To simplify this, make the KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADJUST ioctl
also update the guest runstate area. It already did so if the actual
runstate changed, as a side-effect of kvm_xen_update_runstate(). So
doing it in the plain adjustment case is making it more consistent, as
well as giving us a nice way to trigger the update without actually
running the vCPU again and changing the values.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Paul Durrant <paul@xen.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/xen.c
tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c