From: Paolo Bonzini <pbonzini@redhat.com>
To: Michael Roth <michael.roth@amd.com>,
Andy Lutomirski <luto@amacapital.net>
Cc: Sean Christopherson <seanjc@google.com>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"x86@kernel.org" <x86@kernel.org>,
"H . Peter Anvin" <hpa@zytor.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Lendacky, Thomas" <Thomas.Lendacky@amd.com>,
Andy Lutomirski <luto@kernel.org>
Subject: Re: [PATCH v2] KVM: SVM: use vmsave/vmload for saving/restoring additional host state
Date: Wed, 16 Dec 2020 16:23:22 +0100 [thread overview]
Message-ID: <f22e2410-d4e3-f5fd-8e40-4225a83851c0@redhat.com> (raw)
In-Reply-To: <20201216151203.utpaitooaer7mdfa@amd.com>
On 16/12/20 16:12, Michael Roth wrote:
> It looks like it does save us ~20-30 cycles vs. vmload, but maybe not
> enough to justify the added complexity. Additionally, since we still
> need to call vmload when we exit to userspace, it ends up being a bit
> slower for this particular workload at least. So for now I'll plan on
> sticking to vmload'ing after vmexit and moving that to the asm code
> if there are no objections.
Yeah, agreed. BTW you can use "./x86/run x86/vmexit.flat" from
kvm-unit-tests to check the numbers for a wide range of vmexit paths.
Paolo
> current v2 patch, sample 1
> ioctl entry: 1204722748832
> pre-run: 1204722749408 ( +576)
> post-run: 1204722750784 (+1376)
> ioctl exit: 1204722751360 ( +576)
> total cycles: 2528
>
> current v2 patch, sample 2
> ioctl entry: 1204722754784
> pre-vmrun: 1204722755360 ( +576)
> post-vmrun: 1204722756720 (+1360)
> ioctl exit: 1204722757312 ( +592)
> total cycles 2528
>
> wrgsbase, sample 1
> ioctl entry: 1346624880336
> pre-vmrun: 1346624880912 ( +576)
> post-vmrun: 1346624882256 (+1344)
> ioctl exit: 1346624882912 ( +656)
> total cycles 2576
>
> wrgsbase, sample 2
> ioctl entry: 1346624886272
> pre-vmrun: 1346624886832 ( +560)
> post-vmrun: 1346624888176 (+1344)
> ioctl exit: 1346624888816 ( +640)
> total cycles: 2544
>
next prev parent reply other threads:[~2020-12-16 15:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-14 17:41 [PATCH v2] KVM: SVM: use vmsave/vmload for saving/restoring additional host state Michael Roth
2020-12-14 19:38 ` Sean Christopherson
2020-12-14 20:08 ` Andy Lutomirski
2020-12-14 22:02 ` Michael Roth
2020-12-14 22:23 ` Sean Christopherson
2020-12-14 22:29 ` Andy Lutomirski
2020-12-15 10:15 ` Paolo Bonzini
2020-12-15 18:17 ` Michael Roth
2020-12-16 15:12 ` Michael Roth
2020-12-16 15:23 ` Paolo Bonzini [this message]
2020-12-16 17:07 ` Michael Roth
2020-12-15 18:55 ` Michael Roth
2020-12-16 23:48 ` Sean Christopherson
2020-12-17 8:29 ` 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=f22e2410-d4e3-f5fd-8e40-4225a83851c0@redhat.com \
--to=pbonzini@redhat.com \
--cc=Thomas.Lendacky@amd.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
--cc=luto@kernel.org \
--cc=michael.roth@amd.com \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
/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).