Re: IRQ affinity on Linux guest

2015-08-21 Thread Mihai Neagu
Radim, Thanks for your answer. Indeed setting IRQ affinity to a specific core seems to be respected. However, on software emulation and on the real machine, while IRQ affinity defaults to 3, all interrupts go on CPU0, while on KVM they go on CPU1. I wonder why KVM would act differently

Re: IRQ affinity on Linux guest

2015-08-21 Thread Paolo Bonzini
On 21/08/2015 05:33, Mihai Neagu wrote: Radim, Thanks for your answer. Indeed setting IRQ affinity to a specific core seems to be respected. However, on software emulation and on the real machine, while IRQ affinity defaults to 3, all interrupts go on CPU0, while on KVM they go on

Re: [PATCH] target-i386: enable cflushopt/clwb/pcommit instructions

2015-08-21 Thread Eduardo Habkost
On Fri, Aug 21, 2015 at 01:05:12PM +0800, Xiao Guangrong wrote: These instructions are used by NVDIMM drivers and the specification locates at: https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf Let them be enabled on Broadwell on default Signed-off-by: Xiao

[PATCH kvm-unit-tests 1/2] x86: add small library to find ACPI tables

2015-08-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- config/config-x86-common.mak | 1 + lib/x86/acpi.c | 52 ++ lib/x86/acpi.h | 104 +++ x86/s3.c | 127 ++-

[PATCH kvm-unit-tests 2/2] x86: get ACPI port addresses from FADT

2015-08-21 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- x86/s3.c | 5 +++-- x86/vmexit.c | 9 - 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/x86/s3.c b/x86/s3.c index 72467a2..8bf71da 100644 --- a/x86/s3.c +++ b/x86/s3.c @@ -1,5 +1,5 @@ #include libcflat.h -#include

[PATCH kvm-unit-tests 0/2] x86: get ACPI port addresses from FADT

2015-08-21 Thread Paolo Bonzini
Recent versions of QEMU are placing the ACPI I/O ports starting at 0x600 instead of 0xb000. This broke s3.flat and made vmexit.flat test something else than PMTIMER; the latter matters because PMTIMER is special in that it is not using the big QEMU lock. Using the FADT to fetch the port

[PATCH] virtio-blk: use VIRTIO_BLK_F_WCE and VIRTIO_BLK_F_CONFIG_WCE in virtio1

2015-08-21 Thread Paolo Bonzini
VIRTIO_BLK_F_CONFIG_WCE is important in order to achieve good performance (up to 2x, though more realistically +30-40%) in latency-bound workloads. However, it was removed by mistake together with VIRTIO_BLK_F_FLUSH. It will be restored in the next revision of the virtio 1.0 standard, so do the

[PATCH 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-21 Thread Jason Wang
We register wildcard mmio eventfd on two buses, one for KVM_MMIO_BUS and another is KVM_FAST_MMIO_BUS. This leads to issue: - kvm_io_bus_destroy() knows nothing about the devices on two buses points to a single dev. Which will lead double free [1] during exit. - wildcard eventfd ignores data

[PATCH 3/3] kvm: add tracepoint for fast mmio

2015-08-21 Thread Jason Wang
Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/kvm/trace.h | 17 + arch/x86/kvm/vmx.c | 1 + arch/x86/kvm/x86.c | 1 + 3 files changed, 19 insertions(+)

Re: [PATCH 2/3] kvm: don't register wildcard MMIO EVENTFD on two buses

2015-08-21 Thread Cornelia Huck
On Fri, 21 Aug 2015 16:03:52 +0800 Jason Wang jasow...@redhat.com wrote: diff --git a/virt/kvm/eventfd.c b/virt/kvm/eventfd.c index 9ff4193..834a409 100644 --- a/virt/kvm/eventfd.c +++ b/virt/kvm/eventfd.c @@ -838,11 +838,6 @@ kvm_assign_ioeventfd(struct kvm *kvm, struct kvm_ioeventfd

[tip:x86/asm] x86/asm/tsc: Add rdtscll() merge helper

2015-08-21 Thread tip-bot for Ingo Molnar
Commit-ID: 99770737ca7e3ebc14e66460a69b7032de9421e1 Gitweb: http://git.kernel.org/tip/99770737ca7e3ebc14e66460a69b7032de9421e1 Author: Ingo Molnar mi...@kernel.org AuthorDate: Fri, 21 Aug 2015 08:33:53 +0200 Committer: Ingo Molnar mi...@kernel.org CommitDate: Fri, 21 Aug 2015 08:35:42

[PATCH 1/3] kvm: use kmalloc() instead of kzalloc() during iodev register/unregister

2015-08-21 Thread Jason Wang
All fields of kvm_io_range were initialized or copied explicitly afterwards. So switch to use kmalloc(). Cc: Gleb Natapov g...@kernel.org Cc: Paolo Bonzini pbonz...@redhat.com Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- virt/kvm/kvm_main.c | 4 ++-- 1