From: Peter Xu <peterx@redhat.com>
To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Vitaly Kuznetsov" <vkuznets@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Thomas Huth" <thuth@redhat.com>,
"Andrew Jones" <drjones@redhat.com>,
peterx@redhat.com
Subject: [PATCH v3 0/4] KVM: selftests: Introduce VM_MODE_PXXV48_4K
Date: Fri, 30 Aug 2019 09:36:15 +0800 [thread overview]
Message-ID: <20190830013619.18867-1-peterx@redhat.com> (raw)
v3:
- pick r-b
- refine DEBUG macro [Drew]
v2:
- pick r-bs
- rebased to master
- fix pa width detect, check cpuid(1):edx.PAE(bit 6)
- fix arm compilation issue [Drew]
- fix indents issues and ways to define macros [Drew]
- provide functions for fetching cpu pa/va bits [Drew]
This series originates from "[PATCH] KVM: selftests: Detect max PA
width from cpuid" [1] and one of Drew's comments - instead of keeping
the hackish line to overwrite guest_pa_bits all the time, this series
introduced the new mode VM_MODE_PXXV48_4K for x86_64 platform.
The major issue is that even all the x86_64 kvm selftests are
currently using the guest mode VM_MODE_P52V48_4K, many x86_64 hosts
are not using 52 bits PA (and in most cases, far less). If with luck
we could be having 48 bits hosts, but it's more adhoc (I've observed 3
x86_64 systems, they are having different PA width of 36, 39, 48). I
am not sure whether this is happening to the other archs as well, but
it probably makes sense to bring the x86_64 tests to the real world on
always using the correct PA bits.
A side effect of this series is that it will also fix the crash we've
encountered on Xeon E3-1220 as mentioned [1] due to the
differenciation of PA width.
With [1], we've observed AMD host issues when with NPT=off. However a
funny fact is that after I reworked into this series, the tests can
instead pass on both NPT=on/off. It could be that the series changes
vm->pa_bits or other fields so something was affected. I didn't dig
more on that though, considering we should not lose anything.
[1] https://lkml.org/lkml/2019/8/26/141
Peter Xu (4):
KVM: selftests: Move vm type into _vm_create() internally
KVM: selftests: Create VM earlier for dirty log test
KVM: selftests: Introduce VM_MODE_PXXV48_4K
KVM: selftests: Remove duplicate guest mode handling
tools/testing/selftests/kvm/dirty_log_test.c | 79 +++++--------------
.../testing/selftests/kvm/include/kvm_util.h | 18 ++++-
.../selftests/kvm/include/x86_64/processor.h | 3 +
.../selftests/kvm/lib/aarch64/processor.c | 3 +
tools/testing/selftests/kvm/lib/kvm_util.c | 67 ++++++++++++----
.../selftests/kvm/lib/x86_64/processor.c | 30 ++++++-
6 files changed, 121 insertions(+), 79 deletions(-)
--
2.21.0
next reply other threads:[~2019-08-30 1:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-30 1:36 Peter Xu [this message]
2019-08-30 1:36 ` [PATCH v3 1/4] KVM: selftests: Move vm type into _vm_create() internally Peter Xu
2019-08-30 1:36 ` [PATCH v3 2/4] KVM: selftests: Create VM earlier for dirty log test Peter Xu
2019-08-30 1:36 ` [PATCH v3 3/4] KVM: selftests: Introduce VM_MODE_PXXV48_4K Peter Xu
2019-08-30 1:36 ` [PATCH v3 4/4] KVM: selftests: Remove duplicate guest mode handling Peter Xu
2019-09-17 13:33 ` [PATCH v3 0/4] KVM: selftests: Introduce VM_MODE_PXXV48_4K Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190830013619.18867-1-peterx@redhat.com \
--to=peterx@redhat.com \
--cc=drjones@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=thuth@redhat.com \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).