Re: qemu-kvm: Inconsistent vgabios reference

2012-01-16 Thread Gerd Hoffmann
Hi, Now, I've a question: what seabios implementation of extboot we're talking about? seabios boots natively from virtio now, so for that use case extboot isn't needed any more. -option-rom which is impossible to select as a first boot device? 'qemu-kvm -option-rom

[RFC][PATCH] KVM: perf: a smart tool to analyse kvm events

2012-01-16 Thread Xiao Guangrong
This tool is very like xenoprof(if i remember correctly), and traces kvm events smartly. currently, it supports vmexit/mmio/ioport events. Usage: - to trace kvm events: # ./perf kvm-events record - show the result # ./perf kvm-events report Some output are as follow: # ./perf kvm-events report

[PATCH 1/3] KVM: trace mmio read event properly

2012-01-16 Thread Xiao Guangrong
In current code, we use KVM_TRACE_MMIO_READ to trace mmio read event which only can be completed immediately, instead of it, we trace the time when read event occur, then cooperate with then later patch, we can know the time of mmio read emulation Signed-off-by: Xiao Guangrong

[PATCH 2/3] KVM: improve trace events of vmexit/mmio/ioport

2012-01-16 Thread Xiao Guangrong
- trace vcpu_id for these events - add kvm_mmio_done to trace the time when mmio/ioport emulation is completed Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- arch/x86/kvm/trace.h | 33 ++--- arch/x86/kvm/x86.c | 19

[PATCH 3/3] KVM: perf: kvm events analysis tool

2012-01-16 Thread Xiao Guangrong
Add 'perf kvm-events' support to analyze kvm vmexit/mmio/ioport smartly Usage: perf kvm-events record perf kvm-events report Signed-off-by: Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com --- tools/perf/Documentation/perf-kvm-events.txt | 54 ++ tools/perf/Makefile

Re: [PATCH 2/3] KVM: improve trace events of vmexit/mmio/ioport

2012-01-16 Thread Avi Kivity
On 01/16/2012 11:32 AM, Xiao Guangrong wrote: - trace vcpu_id for these events We can infer the vcpu id from the kvm_entry tracepoints, no? - add kvm_mmio_done to trace the time when mmio/ioport emulation is completed ditto? Relying on the existing tracepoints will make the tool work on

Re: [PATCH 3/3] KVM: perf: kvm events analysis tool

2012-01-16 Thread Avi Kivity
On 01/16/2012 11:32 AM, Xiao Guangrong wrote: Add 'perf kvm-events' support to analyze kvm vmexit/mmio/ioport smartly Usage: perf kvm-events record Why not 'perf record -e kvm'? perf kvm-events report +static const char *get_exit_reason(long isa, u64 exit_code) +{ +

Re: [PATCH 3/3] KVM: perf: kvm events analysis tool

2012-01-16 Thread Stefan Hajnoczi
On Mon, Jan 16, 2012 at 9:32 AM, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: +DESCRIPTION +--- +You can analyze some crucial events and statistics with this +'perf kvm-events' command. This line is very general and does not explain which events/statistics can be collected

Re: [RFC][PATCH] KVM: perf: a smart tool to analyse kvm events

2012-01-16 Thread Avi Kivity
On 01/16/2012 11:30 AM, Xiao Guangrong wrote: This tool is very like xenoprof(if i remember correctly), and traces kvm events smartly. currently, it supports vmexit/mmio/ioport events. Usage: - to trace kvm events: # ./perf kvm-events record - show the result # ./perf kvm-events report

Re: [PATCH 1/3] KVM: trace mmio read event properly

2012-01-16 Thread Avi Kivity
On 01/16/2012 11:31 AM, Xiao Guangrong wrote: In current code, we use KVM_TRACE_MMIO_READ to trace mmio read event which only can be completed immediately, instead of it, we trace the time when read event occur, then cooperate with then later patch, we can know the time of mmio read emulation

Re: [PATCH] KVM: SVM: comment nested paging and virtualization module parameters

2012-01-16 Thread Marcelo Tosatti
On Fri, Jan 13, 2012 at 02:51:56PM +0100, Davidlohr Bueso wrote: From: Davidlohr Bueso d...@gnu.org Also use true instead of 1 for enabling by default. Signed-off-by: Davidlohr Bueso d...@gnu.org --- arch/x86/kvm/svm.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-)

Re: [PULL 00/52] ppc patch queue 2012-01-13

2012-01-16 Thread Marcelo Tosatti
On Fri, Jan 13, 2012 at 03:31:03PM +0100, Alexander Graf wrote: Hi Avi, This is my current patch queue for ppc. Please pull. Alex The following changes since commit 188fc33198ddb1469562d40de33bcc29e7e2ed5f: Christian Borntraeger (1): kvm-s390: provide access guest registers

Re: [PATCH 0/2] KVM guest-kernel panics double fault

2012-01-16 Thread Marcelo Tosatti
On Sun, Jan 15, 2012 at 08:44:50PM +0100, Stephan Bärwolf wrote: Thank you for applying this, Marcelo. I fear we (or me after I agreed) did some mistake by erasing the additional cpuid 0x8001 checks. In contradiction to only AMD it MUST also apply on Intel-CPUs. Documentation

Re: [PATCH] KVM: Don't mistreat edge-triggered INIT IPI as INIT de-assert. (LAPIC)

2012-01-16 Thread Marcelo Tosatti
On Fri, Jan 13, 2012 at 12:46:19PM +0100, Julian Stecklina wrote: Am Freitag, den 13.01.2012, 08:52 -0200 schrieb Marcelo Tosatti: On Thu, Jan 12, 2012 at 06:07:51PM +0100, Julian Stecklina wrote: Am Freitag, den 23.12.2011, 08:40 -0200 schrieb Marcelo Tosatti: On Mon, Dec 19, 2011 at

Re: [PATCH 0/2] KVM guest-kernel panics double fault

2012-01-16 Thread Stephan Bärwolf
Okay, thx to hear a second opinion. Then everything is ok, have a nice day. regards Stephan On 01/16/12 10:58, Marcelo Tosatti wrote: On Sun, Jan 15, 2012 at 08:44:50PM +0100, Stephan Bärwolf wrote: Thank you for applying this, Marcelo. I fear we (or me after I agreed) did some mistake by

Re: [PATCH 2/3] acpi_piix4: Add stub functions for CPU eject callback

2012-01-16 Thread Vasilis Liaskovitis
On Sun, Jan 15, 2012 at 02:38:52PM +0200, Avi Kivity wrote: On 01/13/2012 01:11 PM, Vasilis Liaskovitis wrote: Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- hw/acpi_piix4.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff

Re: [PATCH 1/3][Seabios] Add bitmap for cpu _EJ0 callback

2012-01-16 Thread Vasilis Liaskovitis
On Fri, Jan 13, 2012 at 07:27:01PM -0500, Kevin O'Connor wrote: On Fri, Jan 13, 2012 at 12:11:30PM +0100, Vasilis Liaskovitis wrote: Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com The SeaBIOS change is okay with me, but the qemu/kvm change needs to be accepted

Re: [PATCH] vhost-net: add module alias (v2.1)

2012-01-16 Thread Alan Cox
ACKs, NACKs? What is happening here? I would like an Ack from Alan Cox who switched vhost-net to a dynamic minor in the first place, in commit 79907d89c397b8bc2e05b347ec94e928ea919d33. Sorry dev...@lanana.org isn't yet back from the kernel hack incident. I don't read netdev so someone

Re: [PATCH 2/3] acpi_piix4: Add stub functions for CPU eject callback

2012-01-16 Thread Avi Kivity
On 01/16/2012 01:32 PM, Vasilis Liaskovitis wrote: On Sun, Jan 15, 2012 at 02:38:52PM +0200, Avi Kivity wrote: On 01/13/2012 01:11 PM, Vasilis Liaskovitis wrote: Signed-off-by: Vasilis Liaskovitis vasilis.liaskovi...@profitbricks.com --- hw/acpi_piix4.c | 15 +++ 1

Re: [PATCH] vhost-net: add module alias

2012-01-16 Thread Avi Kivity
On 01/11/2012 06:54 AM, Stephen Hemminger wrote: By adding the a module alias, programs (or users) won't have to explicitly call modprobe. Vhost-net will always be available if built into the kernel. It does require assigning a permanent minor number for depmod to work. Choose one next to TUN

Re: [PATCH v2] kvm: remove dependence on delay-accounting

2012-01-16 Thread Marcelo Tosatti
On Sat, Jan 14, 2012 at 08:30:51PM +0400, Konstantin Khlebnikov wrote: KVM selects delay-accounting only to get sched-info for steal-time accounting. Meanwhile delay-accounting can be disabled by boot option. This is ridiculous. This patch adds internal boolean option CONFIG_TASK_SCHED_INFO

[PATCH] KVM: Don't mistreat edge-triggered INIT IPI as INIT de-assert. (LAPIC)

2012-01-16 Thread js
From: Julian Stecklina j...@alien8.de If the guest programs an IPI with level=0 (de-assert) and trig_mode=0 (edge), it is erroneously treated as INIT de-assert and ignored, but to quote the spec: For this delivery mode [INIT de-assert], the level flag must be set to 0 and trigger mode flag to 1.

[PATCH 1/2] KVM: x86 emulator: add 8-bit memory operands

2012-01-16 Thread Avi Kivity
Useful for MOVSX/MOVZX. Signed-off-by: Avi Kivity a...@redhat.com --- arch/x86/kvm/emulate.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c index 05a562b..92a45dd 100644 --- a/arch/x86/kvm/emulate.c +++

[PATCH 2/2] KVM: x86 emulator: Remove byte-sized MOVSX/MOVZX hack

2012-01-16 Thread Avi Kivity
Currently we treat MOVSX/MOVZX with a byte source as a byte instruction, and change the destination operand size with a hack. Change it to be a word instruction, so the destination receives its natural size, and change the source to be SrcMem8. Signed-off-by: Avi Kivity a...@redhat.com ---

[PATCH 0/2] Remove hack from movsx/movzx decoding

2012-01-16 Thread Avi Kivity
movsx/movzx destination operands currently have a hack for the operand size. Add OpMem8 and use it to remove the hack. I'll wait with this until Nadav's more direct fix is in. Avi Kivity (2): KVM: x86 emulator: add 8-bit memory operands KVM: x86 emulator: Remove byte-sized MOVSX/MOVZX hack

Re: [PATCH v3] KVM: Move gfn_to_memslot() to kvm_host.h

2012-01-16 Thread Alexander Graf
On 13.01.2012, at 07:09, Paul Mackerras wrote: This moves __gfn_to_memslot() and search_memslots() from kvm_main.c to kvm_host.h to reduce the code duplication caused by the need for non-modular code in arch/powerpc/kvm/book3s_hv_rm_mmu.c to call gfn_to_memslot() in real mode. Rather than

Re: [PATCH v3] KVM: Move gfn_to_memslot() to kvm_host.h

2012-01-16 Thread Avi Kivity
On 01/16/2012 03:18 PM, Alexander Graf wrote: Avi? ACK! -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v3] KVM: Move gfn_to_memslot() to kvm_host.h

2012-01-16 Thread Alexander Graf
On 13.01.2012, at 07:09, Paul Mackerras wrote: This moves __gfn_to_memslot() and search_memslots() from kvm_main.c to kvm_host.h to reduce the code duplication caused by the need for non-modular code in arch/powerpc/kvm/book3s_hv_rm_mmu.c to call gfn_to_memslot() in real mode. Rather than

Re: [PATCH v2] kvm: remove dependence on delay-accounting

2012-01-16 Thread Peter Zijlstra
On Sat, 2012-01-14 at 20:30 +0400, Konstantin Khlebnikov wrote: KVM selects delay-accounting only to get sched-info for steal-time accounting. Meanwhile delay-accounting can be disabled by boot option. This is ridiculous. This patch adds internal boolean option CONFIG_TASK_SCHED_INFO to

Re: [PATCH v2] kvm: remove dependence on delay-accounting

2012-01-16 Thread Konstantin Khlebnikov
Marcelo Tosatti wrote: On Sat, Jan 14, 2012 at 08:30:51PM +0400, Konstantin Khlebnikov wrote: KVM selects delay-accounting only to get sched-info for steal-time accounting. Meanwhile delay-accounting can be disabled by boot option. This is ridiculous. This patch adds internal boolean option

[PATCH] sched: remove task-sched-info dynamic disabler

2012-01-16 Thread Konstantin Khlebnikov
Currently per-task sched-info statistics can be disabled if delay-accounting is disabled by boot option. There is no reason for it, sched-info is built-in into task-struct, and its collecting does not add any extra atomic operations. In other combinations it either not compiled or cannot be

Offline for a bit

2012-01-16 Thread Avi Kivity
I'll be offline until next Monday (inclusive). Please send kvm patches to Marcelo, as usual. Urgent or non-core memory API fixes can go to Anthony, I'll review core memory patches, if any, when I return. -- error compiling committee.c: too many arguments to function -- To unsubscribe from

Re: [PATCH v2] kvm: remove dependence on delay-accounting

2012-01-16 Thread Konstantin Khlebnikov
Peter Zijlstra wrote: On Sat, 2012-01-14 at 20:30 +0400, Konstantin Khlebnikov wrote: KVM selects delay-accounting only to get sched-info for steal-time accounting. Meanwhile delay-accounting can be disabled by boot option. This is ridiculous. This patch adds internal boolean option

Re: [RFC PATCH] emulator: Fix task switch into/out of VM86

2012-01-16 Thread Kevin Wolf
Am 10.01.2012 18:51, schrieb Joerg Roedel: On Tue, Jan 10, 2012 at 01:30:47PM +0200, Gleb Natapov wrote: On Tue, Jan 10, 2012 at 12:25:18PM +0100, Kevin Wolf wrote: Did that now, and it looks like exit_int_info is always 0 during the task switch intercept for a task gate in the IDT. So

Re: [PATCH] vhost-net: add module alias (v2.1)

2012-01-16 Thread Stephen Hemminger
On Mon, 16 Jan 2012 12:26:45 + Alan Cox a...@linux.intel.com wrote: ACKs, NACKs? What is happening here? I would like an Ack from Alan Cox who switched vhost-net to a dynamic minor in the first place, in commit 79907d89c397b8bc2e05b347ec94e928ea919d33. Sorry dev...@lanana.org

[PATCH v7 10/18] ioapic: Drop post-load irr initialization

2012-01-16 Thread Jan Kiszka
As all devices undergo a reset prior to vmloa, and the reset value of irr is 0, we do not need to do this clearing for older vmstates explicitly. Dropping this redundant code will also make KVM integration a bit simpler. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/ioapic.c | 12

[PATCH v7 12/18] memory: Introduce memory_region_init_reservation

2012-01-16 Thread Jan Kiszka
Introduce a memory region type that can reserve I/O space. Such regions are useful for modeling I/O that is only handled outside of QEMU, i.e. in the context of an accelerator like KVM. Any access to such a region from QEMU is a bug, but could theoretically be triggered by guest code (DMA to

[PATCH v7 00/18] uq/master: Introduce basic irqchip support

2012-01-16 Thread Jan Kiszka
Changes in v7: - introduce {apic,pic,ioapic}_qdev_register and use {APIC,PIC,IOAPIC}CommonInfo to move more code into the common modules - clean up forgotten fragments of backend/frontend approach - rephrased potentially misleading title of last patch ;) CC: Lai Jiangshan la...@cn.fujitsu.com

[PATCH v7 08/18] i8259: Completely privatize PicState

2012-01-16 Thread Jan Kiszka
Use DeviceState instead of PicState in the public i8259 API. This is cleaner and allows to reorganize the PIC data structures for KVM reuse. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/i8259.c | 17 +++-- hw/pc.h|7 +++ 2 files changed, 14 insertions(+), 10

[PATCH v7 17/18] kvm: x86: Add user space part for in-kernel IOAPIC

2012-01-16 Thread Jan Kiszka
This introduces the KVM-accelerated IOAPIC model 'kvm-ioapic' and extends the IRQ routing setup by the 0-2 redirection when needed. The kvm-ioapic model has a property that allows to define its GSI base for injecting interrupts into the kernel model. This will allow to disentangle PIC and IOAPIC

[PATCH v7 03/18] apic: Stop timer on reset

2012-01-16 Thread Jan Kiszka
All LVTs are masked on reset, so the timer becomes ineffective. Letting it tick nevertheless is harmless, but will at least create a spurious trace event. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/apic.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

[PATCH v7 13/18] kvm: Introduce core services for in-kernel irqchip support

2012-01-16 Thread Jan Kiszka
Add the basic infrastructure to active in-kernel irqchip support, inject interrupts into these models, and maintain IRQ routes. Routing is optional and depends on the host arch supporting KVM_CAP_IRQ_ROUTING. When it's not available on x86, we looe the HPET as we can't route GSI0 to IOAPIC pin 2.

[PATCH v7 04/18] apic: Inject external NMI events via LINT1

2012-01-16 Thread Jan Kiszka
On real hardware, NMI button events are injected via the LINT1 line of the APICs. E.g. kdump expect this wiring and gets upset if the per-APIC LINT1 mask is not respected, i.e. if NMIs are injected to VCPUs that should not receive them. Change the APIC emulation code to reflect this. Based on

[PATCH v7 15/18] kvm: x86: Add user space part for in-kernel APIC

2012-01-16 Thread Jan Kiszka
This introduces the alternative APIC device which makes use of KVM's in-kernel device model. External NMI injection via LINT1 is emulated by checking the current state of the in-kernel APIC, only injecting a NMI into the VCPU if LINT1 is unmasked and configured to DM_NMI. MSI is not yet

[PATCH v7 02/18] kvm: Move kvmclock into hw/kvm folder

2012-01-16 Thread Jan Kiszka
More KVM-specific devices will come, so let's start with moving the kvmclock into a dedicated folder. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Makefile.target|4 ++-- configure |1 + hw/{kvmclock.c = kvm/clock.c} |4 ++--

[PATCH v7 11/18] ioapic: Factor out base class for KVM reuse

2012-01-16 Thread Jan Kiszka
Split up the IOAPIC analogously to APIC and i8259. KVM will share the IOAPICCommonState, the vmstate, reset logic and certain init parts with the user space model. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- Makefile.target |2 +- hw/ioapic.c | 130

[PATCH v7 16/18] kvm: x86: Add user space part for in-kernel i8259

2012-01-16 Thread Jan Kiszka
Introduce the alternative 'kvm-i8259' device model that exploits KVM in-kernel acceleration. The PIIX3 initialization code is furthermore extended by KVM specific IRQ route setup. GSI injection differs in KVM mode from the user space model. As we can dispatch ISA-range IRQs to both IOAPIC and PIC

[PATCH v7 18/18] kvm: Activate in-kernel irqchip support

2012-01-16 Thread Jan Kiszka
Make the basic in-kernel irqchip support selectable via -machine ...,kernel_irqchip=on. Leave it off by default until it can fully replace user space models. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- qemu-config.c |4 qemu-options.hx |5 - 2 files changed, 8

[PATCH v7 06/18] apic: Factor out base class for KVM reuse

2012-01-16 Thread Jan Kiszka
The KVM in-kernel APIC model will reuse parts of the user space model while providing the same frontend view to guest and most management interfaces. Factor out an APIC base class to encapsulate those parts that will be shared by user space and KVM model. This class offers callback hooks for

[PATCH v7 07/18] apic: Open-code timer save/restore

2012-01-16 Thread Jan Kiszka
To enable migration between accelerated and non-accelerated APIC models, we will need to handle the timer saving and restoring specially and can no longer rely on the automatics of VMSTATE_TIMER. Specifically, accelerated model will not start any QEMUTimer. This patch therefore factors out the

[PATCH v7 09/18] i8259: Factor out base class for KVM reuse

2012-01-16 Thread Jan Kiszka
Analogously to the APIC, we will reuse some parts of the user space i8259 model for KVM. The base class provides a common device state, the vmstate, the property list, a reset core and some shared init bits. This also introduces a common helper to instantiate a single i8259 chip from the

[PATCH v7 01/18] msi: Generalize msix_supported to msi_supported

2012-01-16 Thread Jan Kiszka
Rename msix_supported to msi_supported and control MSI and MSI-X activation this way. That was likely to original intention for this flag, but MSI support came after MSI-X. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/msi.c |8 hw/msi.h |2 ++ hw/msix.c |9

[PATCH v7 14/18] kvm: x86: Establish IRQ0 override control

2012-01-16 Thread Jan Kiszka
KVM is forced to disable the IRQ0 override when we run with in-kernel irqchip but without IRQ routing support of the kernel. Set the fwcfg value correspondingly. This aligns us with qemu-kvm. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/pc.c|3 ++- kvm-all.c |5 +

[PATCH v7 05/18] apic: Introduce apic_report_irq_delivered

2012-01-16 Thread Jan Kiszka
The in-kernel i8259 and IOAPIC backends for KVM will need this, so encapsulate the shared bits. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/apic.c| 11 --- hw/apic.h|1 + trace-events |2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git

Re: [RFC PATCH] emulator: Fix task switch into/out of VM86

2012-01-16 Thread Joerg Roedel
On Mon, Jan 16, 2012 at 04:37:33PM +0100, Kevin Wolf wrote: Am 10.01.2012 18:51, schrieb Joerg Roedel: Joerg, do you know how can we check that task switch was cause by an exception triggering task gate if exit_int_info is not provided during intercept (short of decoding instruction that

[PATCH] pci-assign: Fix multifunction support

2012-01-16 Thread Alex Williamson
The core PCI code sets the multifunction bit in the header before calling the device initfn. For device assignment, we're blasting that value with the actual hardware value, so nobody sees the additional functions if the devices isn't physically multifunction. Switch the HEADER_TYPE to a fully

[18/48] KVM: Device assignment permission checks

2012-01-16 Thread Greg KH
3.1-stable review patch. If anyone has any objections, please let me know. -- From: Alex Williamson alex.william...@redhat.com (cherry picked from commit 3d27e23b17010c668db311140b1770c78fb9) Only allow KVM device assignment to attach to devices which: - Are not bridges

[17/48] KVM: Remove ability to assign a device without iommu support

2012-01-16 Thread Greg KH
3.1-stable review patch. If anyone has any objections, please let me know. -- From: Alex Williamson alex.william...@redhat.com (cherry picked from commit 423873736b78f549fbfa2f715f2e4de7e6c5e1e9) This option has no users and it exposes a security hole that we can allow

[15/48] KVM guest: prevent tracing recursion with kvmclock

2012-01-16 Thread Greg KH
3.1-stable review patch. If anyone has any objections, please let me know. -- From: Avi Kivity a...@redhat.com (cherry picked from commit 95ef1e52922cf75b1ea2eae54ef886f2cc47eecb) Prevent tracing of preempt_disable() in get_cpu_var() in kvm_clock_read(). When

[16/48] KVM: x86: Prevent starting PIT timers in the absence of irqchip support

2012-01-16 Thread Greg KH
3.1-stable review patch. If anyone has any objections, please let me know. -- From: Jan Kiszka jan.kis...@siemens.com (cherry picked from commit 0924ab2cfa98b1ece26c033d696651fd62896c69) User space may create the PIT and forgets about setting up the irqchips. In that case,

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Ryan Harper
* Alexander Graf ag...@suse.de [2012-01-08 17:53]: When running QEMU without -cpu parameter, the user usually wants a sane default. So far, we're using the qemu64/qemu32 CPU type, which basically means the maximum TCG can emulate. it also means we all maximum possible migration targets. Have

Re: [Qemu-devel] [PATCH 1/2] KVM: Add new -cpu best

2012-01-16 Thread Anthony Liguori
On 01/08/2012 05:52 PM, Alexander Graf wrote: During discussions on whether to make -cpu host the default in SLE, I found myself disagreeing to the thought, because it potentially opens a big can of worms for potential bugs. But if I already am so opposed to it for SLE, how can it possibly be

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Alexander Graf
On 16.01.2012, at 20:30, Ryan Harper wrote: * Alexander Graf ag...@suse.de [2012-01-08 17:53]: When running QEMU without -cpu parameter, the user usually wants a sane default. So far, we're using the qemu64/qemu32 CPU type, which basically means the maximum TCG can emulate. it also means

Re: [Qemu-devel] [PATCH 1/2] KVM: Add new -cpu best

2012-01-16 Thread Alexander Graf
On 16.01.2012, at 20:33, Anthony Liguori wrote: On 01/08/2012 05:52 PM, Alexander Graf wrote: During discussions on whether to make -cpu host the default in SLE, I found myself disagreeing to the thought, because it potentially opens a big can of worms for potential bugs. But if I already am

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Ryan Harper
* Alexander Graf ag...@suse.de [2012-01-16 13:37]: On 16.01.2012, at 20:30, Ryan Harper wrote: * Alexander Graf ag...@suse.de [2012-01-08 17:53]: When running QEMU without -cpu parameter, the user usually wants a sane default. So far, we're using the qemu64/qemu32 CPU type, which

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Ryan Harper
* Alexander Graf ag...@suse.de [2012-01-16 13:52]: On 16.01.2012, at 20:46, Ryan Harper wrote: * Alexander Graf ag...@suse.de [2012-01-16 13:37]: On 16.01.2012, at 20:30, Ryan Harper wrote: * Alexander Graf ag...@suse.de [2012-01-08 17:53]: When running QEMU without -cpu

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Alexander Graf
On 16.01.2012, at 21:13, Ryan Harper wrote: * Alexander Graf ag...@suse.de [2012-01-16 13:52]: On 16.01.2012, at 20:46, Ryan Harper wrote: * Alexander Graf ag...@suse.de [2012-01-16 13:37]: On 16.01.2012, at 20:30, Ryan Harper wrote: * Alexander Graf ag...@suse.de [2012-01-08

Re: [Qemu-devel] [PATCH 2/2] KVM: Use -cpu best as default on x86

2012-01-16 Thread Ryan Harper
* Alexander Graf ag...@suse.de [2012-01-16 14:52]: On 16.01.2012, at 21:13, Ryan Harper wrote: * Alexander Graf ag...@suse.de [2012-01-16 13:52]: On 16.01.2012, at 20:46, Ryan Harper wrote: * Alexander Graf ag...@suse.de [2012-01-16 13:37]: On 16.01.2012, at 20:30, Ryan

Re: [RFC][PATCH] KVM: perf: a smart tool to analyse kvm events

2012-01-16 Thread David Ahern
On 01/16/2012 02:30 AM, Xiao Guangrong wrote: This tool is very like xenoprof(if i remember correctly), and traces kvm events smartly. currently, it supports vmexit/mmio/ioport events. Usage: - to trace kvm events: # ./perf kvm-events record - show the result # ./perf kvm-events

Re: [PATCH] vhost-net: add module alias (v2.1)

2012-01-16 Thread David Miller
From: Stephen Hemminger shemmin...@vyatta.com Date: Mon, 16 Jan 2012 07:52:36 -0800 On Mon, 16 Jan 2012 12:26:45 + Alan Cox a...@linux.intel.com wrote: ACKs, NACKs? What is happening here? I would like an Ack from Alan Cox who switched vhost-net to a dynamic minor in the first

Re: [PATCH] vhost-net: add module alias (v2.1)

2012-01-16 Thread Alan Cox
Also: - use C99 style initialization. - add missing entry in documentation for loop-control Signed-off-by: Stephen Hemminger shemmin...@vyatta.com For the device allocation Acked-by: Alan Cox devi...@lanana.org -- To unsubscribe from this list: send the line unsubscribe kvm in the body

Re: [PATCH 2/3] KVM: improve trace events of vmexit/mmio/ioport

2012-01-16 Thread Xiao Guangrong
On 01/16/2012 05:38 PM, Avi Kivity wrote: On 01/16/2012 11:32 AM, Xiao Guangrong wrote: - trace vcpu_id for these events We can infer the vcpu id from the kvm_entry tracepoints, no? Thanks for your review, Avi! Hmm. i think it is hard to do since the vcpu thread can be scheduled

Re: [PATCH 3/3] KVM: perf: kvm events analysis tool

2012-01-16 Thread Xiao Guangrong
On 01/16/2012 06:04 PM, Avi Kivity wrote: On 01/16/2012 11:32 AM, Xiao Guangrong wrote: Add 'perf kvm-events' support to analyze kvm vmexit/mmio/ioport smartly Usage: perf kvm-events record Why not 'perf record -e kvm'? It works, many perf tools have this style, like: perf lock

Re: [RFC][PATCH] KVM: perf: a smart tool to analyse kvm events

2012-01-16 Thread Xiao Guangrong
On 01/16/2012 06:11 PM, Avi Kivity wrote: Total Samples:975981, Total events handled time:126502464.88us. Nice! If we can have a live version as well, this can replace kvm_stat. The average numbers are really high. Like a factor of 3x-4x off. Would be good to print the standard

Re: [PATCH 3/3] KVM: perf: kvm events analysis tool

2012-01-16 Thread Xiao Guangrong
On 01/16/2012 06:08 PM, Stefan Hajnoczi wrote: On Mon, Jan 16, 2012 at 9:32 AM, Xiao Guangrong xiaoguangr...@linux.vnet.ibm.com wrote: +DESCRIPTION +--- +You can analyze some crucial events and statistics with this +'perf kvm-events' command. This line is very general and does

Re: [RFC][PATCH] KVM: perf: a smart tool to analyse kvm events

2012-01-16 Thread Xiao Guangrong
On 01/17/2012 06:53 AM, David Ahern wrote: On 01/16/2012 02:30 AM, Xiao Guangrong wrote: This tool is very like xenoprof(if i remember correctly), and traces kvm events smartly. currently, it supports vmexit/mmio/ioport events. Usage: - to trace kvm events: # ./perf kvm-events record

[PATCH 0/3] Add migration function and test for libvirt.

2012-01-16 Thread tangchen
Hi~ 1. There is no muigrate() function in class VM in libvirt_vm.py. 2. There is no tests for libvirt in client/tests/libvirt. So, I would like to add some tests for libvirt. Here are three patches, 1. Add a migrate() function for class VM in libvirt_vm.py, which encapsulates virsh

Re: [Autotest] [PATCH 3/3] Add migration function and test for libvirt.

2012-01-16 Thread tangchen
This adds configuration for virsh migrate test. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- client/virt/subtests.cfg.sample | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/client/virt/subtests.cfg.sample b/client/virt/subtests.cfg.sample index

Re: [Autotest] [PATCH 1/3] Add migration function and test for libvirt.

2012-01-16 Thread tangchen
This patch adds a migrate() function for libvirt, which is a encapsulation for virsh migrate command. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- client/virt/libvirt_vm.py | 212 + 1 files changed, 212 insertions(+), 0 deletions(-) diff

Re: [Autotest] [PATCH 0/3] Add migration function and test for libvirt.

2012-01-16 Thread tangchen
This patch tests the virsh migrate command with --live parameter. Signed-off-by: Tang Chen tangc...@cn.fujitsu.com --- client/tests/libvirt/tests/virsh_migrate.py | 33 +++ 1 files changed, 33 insertions(+), 0 deletions(-) create mode 100644

Re: [RFC][PATCH] KVM: perf: a smart tool to analyse kvm events

2012-01-16 Thread David Ahern
On 01/16/2012 07:41 PM, Xiao Guangrong wrote: Have you thought about dumping a time history -- something similar to what perf-script can do with dumping events but adding in kvm-specific analysis like what you are doing in these examples? I will look into it and put it to my todo list if

Re: [PATCH v3] KVM: Move gfn_to_memslot() to kvm_host.h

2012-01-16 Thread Paul Mackerras
On Mon, Jan 16, 2012 at 02:30:41PM +0100, Alexander Graf wrote: Which tree is this against? I got this diff between your patch and the patch when applied on my tree: It's against your tree (previously) plus my first 13-patch series, but not the second series of 5 patches, which presumably why

Host processes priority over guests

2012-01-16 Thread Romain LE DISEZ
Hello all, we are currently evaluating a migration from Xen to KVM. We host our VMs on a SAN, access to LUNs is done by the iSCSI protocol, all multipathed. With Xen, we faced a problem when VMs were consuming a lot of CPU and a lot of I/O. In this situation, the Dom0 did not get enough CPU

Re: [PULL 00/52] ppc patch queue 2012-01-13

2012-01-16 Thread Marcelo Tosatti
On Fri, Jan 13, 2012 at 03:31:03PM +0100, Alexander Graf wrote: Hi Avi, This is my current patch queue for ppc. Please pull. Alex The following changes since commit 188fc33198ddb1469562d40de33bcc29e7e2ed5f: Christian Borntraeger (1): kvm-s390: provide access guest registers

Re: [KVM PATCH 2/2] KVM: PPC: Book3S HV: Report stolen time to guest through dispatch trace log

2012-01-16 Thread Alexander Graf
On 20.12.2011, at 11:37, Paul Mackerras wrote: This adds code to measure stolen time per virtual core in units of timebase ticks, and to report the stolen time to the guest using the dispatch trace log (DTL). The guest can register an area of memory for the DTL for a given vcpu. The DTL is

Re: [PATCH v3] KVM: Move gfn_to_memslot() to kvm_host.h

2012-01-16 Thread Alexander Graf
On 13.01.2012, at 07:09, Paul Mackerras wrote: This moves __gfn_to_memslot() and search_memslots() from kvm_main.c to kvm_host.h to reduce the code duplication caused by the need for non-modular code in arch/powerpc/kvm/book3s_hv_rm_mmu.c to call gfn_to_memslot() in real mode. Rather than

Re: [PATCH v3] KVM: Move gfn_to_memslot() to kvm_host.h

2012-01-16 Thread Avi Kivity
On 01/16/2012 03:18 PM, Alexander Graf wrote: Avi? ACK! -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm-ppc in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH v3] KVM: Move gfn_to_memslot() to kvm_host.h

2012-01-16 Thread Alexander Graf
On 13.01.2012, at 07:09, Paul Mackerras wrote: This moves __gfn_to_memslot() and search_memslots() from kvm_main.c to kvm_host.h to reduce the code duplication caused by the need for non-modular code in arch/powerpc/kvm/book3s_hv_rm_mmu.c to call gfn_to_memslot() in real mode. Rather than

Re: [RFC PATCH 1/2] KVM: PPC: Book3S HV: Make virtual processor area registration more robust

2012-01-16 Thread Paul Mackerras
On Mon, Jan 16, 2012 at 02:04:29PM +0100, Alexander Graf wrote: On 20.12.2011, at 11:22, Paul Mackerras wrote: @@ -152,6 +152,8 @@ static unsigned long do_h_register_vpa(struct kvm_vcpu *vcpu, flags = 7; if (flags == 0 || flags == 4) This could probably use a new variable

Re: [PATCH v3] KVM: Move gfn_to_memslot() to kvm_host.h

2012-01-16 Thread Paul Mackerras
On Mon, Jan 16, 2012 at 02:30:41PM +0100, Alexander Graf wrote: Which tree is this against? I got this diff between your patch and the patch when applied on my tree: It's against your tree (previously) plus my first 13-patch series, but not the second series of 5 patches, which presumably why