From: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Xiaoyao Li <xiaoyao.li@intel.com>, Chao Gao <chao.gao@intel.com>,
kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org, Jim Mattson <jmattson@google.com>,
antonio.gomez.iglesias@linux.intel.com,
Daniel Sneddon <daniel.sneddon@linux.intel.com>,
asit.k.mallick@intel.com
Subject: Re: [PATCH] KVM: x86: Track supported ARCH_CAPABILITIES in kvm_caps
Date: Mon, 22 May 2023 21:47:31 -0700 [thread overview]
Message-ID: <20230523044731.obkyesjyhwercj2q@desk> (raw)
In-Reply-To: <20230522205453.kqhvk5aheye22hfa@desk>
On Mon, May 22, 2023 at 01:54:55PM -0700, Pawan Gupta wrote:
> On Mon, May 22, 2023 at 10:43:49AM -0700, Sean Christopherson wrote:
> > On Fri, May 19, 2023, Pawan Gupta wrote:
> > > On Thu, May 18, 2023 at 10:33:15AM -0700, Sean Christopherson wrote:
> > > > I made the mistake of digging into why KVM doesn't advertise ARCH_CAP_FB_CLEAR_CTRL...
> > > >
> > > > 1. I see *nothing* in commit 027bbb884be0 ("KVM: x86/speculation: Disable Fill
> > > > buffer clear within guests") that justifies 1x RDMSR and 2x WRMSR on every
> > > > entry+exit.
> > >
> > > Unnecessary VERWs in guest will have much higher impact than due to MSR
> > > read/write at vmentry/exit.
> >
> > Can you provide numbers for something closeish to a real world workload?
>
> I am collecting the numbers, will update here soon.
Looks like avoiding VERW flush behavior in guest results in 2-5%
improvement in performance.
Pybench and CPU bound sysbench test shows minor improvement when
avoiding reading/writing MSR_MCU_OPT_CTRL at VMentry/VMexit.
Baseline : v6.4-rc3
Target : v6.4-rc3 + No read/write to MSR_MCU_OPT_CTRL at VMentry/VMexit
| Test | Configuration | Relative |
| --------- | ------------- | -------- |
| nginx | 200 | 0.977 |
| hackbench | 8 - Process | 0.975 |
| sysbench | RAM / Memory | 0.946 |
| sysbench | CPU | 1.002 |
| pybench | T.F.A.T.T | 1.007 |
Host configuration (Icelake server):
CPU family: 6
Model: 106
Stepping: 6
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Retbleed: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Vulnerable: eIBRS with unprivileged eBPF
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Guest configuration (Skylake Client):
CPU family: 6
Model: 94
Stepping: 3
Vulnerabilities:
Itlb multihit: KVM: Mitigation: VMX unsupported
L1tf: Mitigation; PTE Inversion
Mds: Vulnerable: Clear CPU buffers attempted, no microcode;
SMT Host state unknown
Meltdown: Mitigation; PTI
Mmio stale data: Vulnerable: Clear CPU buffers attempted, no microcode;
SMT Host state unknown
Retbleed: Vulnerable
Spec store bypass: Vulnerable
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer
sanitization
Spectre v2: Mitigation; Retpolines, STIBP disabled, RSB filling, PB
RSB-eIBRS Not affected
Srbds: Unknown: Dependent on hypervisor status
Tsx async abort: Vulnerable: Clear CPU buffers attempted, no microcode;
SMT Host state unknown
next prev parent reply other threads:[~2023-05-23 4:49 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-06 3:04 Chao Gao
2023-05-18 9:32 ` Xiaoyao Li
2023-05-18 17:33 ` Sean Christopherson
2023-05-19 8:40 ` Chao Gao
2023-05-19 15:25 ` Sean Christopherson
2023-05-20 1:02 ` Pawan Gupta
2023-05-22 17:43 ` Sean Christopherson
2023-05-22 19:31 ` Xiaoyao Li
2023-05-22 21:23 ` Pawan Gupta
2023-05-23 1:00 ` Xiaoyao Li
2023-05-23 3:34 ` Pawan Gupta
2023-05-25 15:42 ` Xiaoyao Li
2023-05-25 20:33 ` Pawan Gupta
2023-05-22 20:54 ` Pawan Gupta
2023-05-23 4:47 ` Pawan Gupta [this message]
2023-05-22 14:23 ` Dave Hansen
2023-05-22 16:37 ` Sean Christopherson
2023-05-29 3:35 ` Chao Gao
2023-06-06 16:54 ` Sean Christopherson
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=20230523044731.obkyesjyhwercj2q@desk \
--to=pawan.kumar.gupta@linux.intel.com \
--cc=antonio.gomez.iglesias@linux.intel.com \
--cc=asit.k.mallick@intel.com \
--cc=bp@alien8.de \
--cc=chao.gao@intel.com \
--cc=daniel.sneddon@linux.intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xiaoyao.li@intel.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
all inboxes | Powered by JetHome®