linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] KVM: VMX: Allow to disable ioport intercept per-VM by userspace
@ 2018-04-17  5:45 Wanpeng Li
  2018-04-17  5:46 ` [PATCH 1/3] KVM: VMX: Introduce per-VM I/O permission bitmaps Wanpeng Li
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Wanpeng Li @ 2018-04-17  5:45 UTC (permalink / raw)
  To: linux-kernel, kvm
  Cc: Paolo Bonzini, Radim Krčmář, Tim Shearer, Liran Alon

Tim Shearer reported that "There is a guest which is running a packet
forwarding app based on the DPDK (dpdk.org). The packet receive routine
writes to 0xc070 using glibc's "outw_p" function which does an additional
write to I/O port 0x80. It does this write for every packet that's
received, causing a flood of KVM userspace context switches". He uses
mpstat to observe a CPU performing L2 packet forwarding on a pinned
guest vCPU, the guest time is 95 percent when allowing I/O port 0x80
bypass, however, it is 65.78 percent when I/O port 0x80 bypss is
disabled.

This patchset introduces per-VM I/O permission bitmaps, the userspace
can disable the ioport intercept when they are more concern the
performance than the security.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Tim Shearer <tshearer@advaoptical.com>
Cc: Liran Alon <liran.alon@oracle.com>

Wanpeng Li (3):
  KVM: VMX: Introduce per-VM I/O permission bitmaps
  KVM: X86: Allow userspace to disable ioport intercept
  KVM: VMX: Allow I/O port 0x80 bypass when userspace prefer

 Documentation/virtual/kvm/api.txt | 11 +++++++++++
 arch/x86/include/asm/kvm_host.h   |  2 ++
 arch/x86/kvm/vmx.c                | 41 ++++++++++++++++++++++++++++++++++++---
 arch/x86/kvm/x86.c                |  5 +++++
 include/uapi/linux/kvm.h          |  1 +
 5 files changed, 57 insertions(+), 3 deletions(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2018-05-16  1:13 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-17  5:45 [PATCH 0/3] KVM: VMX: Allow to disable ioport intercept per-VM by userspace Wanpeng Li
2018-04-17  5:46 ` [PATCH 1/3] KVM: VMX: Introduce per-VM I/O permission bitmaps Wanpeng Li
2018-05-11 15:39   ` Konrad Rzeszutek Wilk
2018-05-15 21:55     ` Jim Mattson
2018-04-17  5:46 ` [PATCH 2/3] KVM: X86: Allow userspace to disable ioport intercept Wanpeng Li
2018-05-11 15:42   ` Konrad Rzeszutek Wilk
2018-05-11 15:43     ` Konrad Rzeszutek Wilk
2018-05-15 21:56       ` Jim Mattson
2018-05-16  1:13         ` Wanpeng Li
2018-04-17  5:46 ` [PATCH 3/3] KVM: VMX: Allow I/O port 0x80 bypass when userspace prefer Wanpeng Li
2018-05-11 15:44   ` Konrad Rzeszutek Wilk
2018-05-15 21:57     ` Jim Mattson
2018-05-08  7:55 ` [PATCH 0/3] KVM: VMX: Allow to disable ioport intercept per-VM by userspace Wanpeng Li
2018-05-08 16:14   ` Paolo Bonzini
2018-05-11 15:40 ` Konrad Rzeszutek Wilk
2018-05-12  1:03   ` Wanpeng Li
2018-05-14 13:48     ` Tim Shearer

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).