[PATCH 0/2] Improve kvm_stat delta display

2010-09-01 Thread Avi Kivity
Make the first sleep shorter, so numbers come up quicker, and scale the delta so it is a rate-of-change instead of a meaningless number. Avi Kivity (2): kvm_stat: make the initial sleep shorter kvm_stat: scale delta column to make it a rate kvm/kvm_stat | 10 ++ 1 files changed, 6

[PATCH 1/2] kvm_stat: make the initial sleep shorter

2010-09-01 Thread Avi Kivity
So we can see results faster Signed-off-by: Avi Kivity --- kvm/kvm_stat |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/kvm/kvm_stat b/kvm/kvm_stat index e68ca4e..b031d48 100755 --- a/kvm/kvm_stat +++ b/kvm/kvm_stat @@ -325,9 +325,11 @@ def tui(screen, stats):

[PATCH 2/2] kvm_stat: scale delta column to make it a rate

2010-09-01 Thread Avi Kivity
Scale the delta column by 1/sleeptime, so its units are events per second. Signed-off-by: Avi Kivity --- kvm/kvm_stat |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kvm/kvm_stat b/kvm/kvm_stat index b031d48..e32df14 100755 --- a/kvm/kvm_stat +++ b/kvm/kvm_stat @@ -

Re: [patch 0/2] SVM: fix cpu onlining

2010-09-01 Thread Avi Kivity
On 09/01/2010 01:13 AM, Marcelo Tosatti wrote: applied, thanks. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majo

[PATCH] kvm_stat: use total count as a secondary sort key

2010-09-01 Thread Avi Kivity
This shows events with history in preference to events with none. Signed-off-by: Avi Kivity --- kvm/kvm_stat |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kvm/kvm_stat b/kvm/kvm_stat index e32df14..4a16277 100755 --- a/kvm/kvm_stat +++ b/kvm/kvm_stat @@ -308,9 +308,

[PATCH] kvm_stat: ignore events that have never occured

2010-09-01 Thread Avi Kivity
Less cluttered display. Signed-off-by: Avi Kivity --- kvm/kvm_stat |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kvm/kvm_stat b/kvm/kvm_stat index 4a16277..d373c60 100755 --- a/kvm/kvm_stat +++ b/kvm/kvm_stat @@ -315,6 +315,8 @@ def tui(screen, stats): if

Re: [PATCH 0/6] *** SUBJECT HERE ***

2010-09-01 Thread Gerd Hoffmann
On 08/31/10 18:13, Anthony Liguori wrote: Just as an aside, does anyone have a good way to maintain the 00 patches in series with repeated submissions? /me uses cut+paste from email folder or list archive. I suspect you are looking for something better though ... cheers, Gerd -- To unsub

[PATCH 2/2] KVM: Fix bogus value returned for MSR_IA32_PERF_STATUS

2010-09-01 Thread Avi Kivity
The returned value is completely bogus, and sets reserved bits. Return zero instead. Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 1cbf168..a2c03f1 100644 --- a/arch/x86/

[PATCH 1/2] KVM: Don't save/restore MSR_IA32_PERF_STATUS

2010-09-01 Thread Avi Kivity
It is read/only; restoring it only results in annoying messages. Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index cc6d6cd..1cbf168 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x8

[PATCH 0/2] Fix MSR_IA32_PERF_STATUS

2010-09-01 Thread Avi Kivity
MSR_IA32_PERF_STATUS is read-only, yet exposed for save/restore. This generates annoying printk()s when userspace attempts to initialize it. The value returned is also bogus, the comments appear to refer to another msr. Fix both issues. Alex, please test with a guest Mac. Avi Kivity (2): KVM

Re: [PATCH] Write to read-only msr MSR_IA32_PERF_STATUS is harmless, ignore it!

2010-09-01 Thread Avi Kivity
On 08/31/2010 11:02 PM, Marcelo Tosatti wrote: kvm_reset_msrs in qemu-kvm-x86.c. I posted a patch to fix this. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body o

Re: [PULL 00/35] KVM: PPC: End-August patch queue

2010-09-01 Thread Avi Kivity
On 08/31/2010 05:31 AM, Alexander Graf wrote: Howdy, This is my local patch queue with stuff that has accumulated over the last weeks on KVM for PPC with some last minute fixes, speedups and debugging help that I needed for the KVM Forum ;-). The highlights of this set are: - Converted mos

Re: [PATCH] Write to read-only msr MSR_IA32_PERF_STATUS is harmless, ignore it!

2010-09-01 Thread Jes Sorensen
On 08/31/10 22:02, Marcelo Tosatti wrote: > On Tue, Aug 31, 2010 at 06:33:34PM +0200, Jes Sorensen wrote: >> which makes no sense to me, but given it's x86, I am not sure if it >> could have come from the BIOS or something during reboot? > > kvm_reset_msrs in qemu-kvm-x86.c. Interesting, I hadn't

ftrace/perf_event leak

2010-09-01 Thread Avi Kivity
I recently added perf_event support to kvm_stat, to display kvm tracepoints as statistics (I'd like to fold this to tools/perf eventually, but that's another story). However I'm seeing a resource leak - after I quit the tool, there are quite a few references into the kvm module: kvm_intel

Re: [PATCH 2/2] KVM: Fix bogus value returned for MSR_IA32_PERF_STATUS

2010-09-01 Thread Alexander Graf
On 01.09.2010, at 09:34, Avi Kivity wrote: > The returned value is completely bogus, and sets reserved bits. > Return zero instead. > > Signed-off-by: Avi Kivity > --- > arch/x86/kvm/x86.c |5 + > 1 files changed, 1 insertions(+), 4 deletions(-) > > diff --git a/arch/x86/kvm/x86.c b/arc

Re: [PATCH 5/5] virtio-net: Switch default to new bottom half TX handler for iothread

2010-09-01 Thread Michael S. Tsirkin
On Tue, Aug 31, 2010 at 04:32:54PM -0600, Alex Williamson wrote: > On Tue, 2010-08-31 at 23:25 +0300, Michael S. Tsirkin wrote: > > On Fri, Aug 27, 2010 at 04:37:45PM -0600, Alex Williamson wrote: > > > The bottom half handler shows big improvements over the timer > > > with few downsides, default

Re: [PATCH 2/2] KVM: Fix bogus value returned for MSR_IA32_PERF_STATUS

2010-09-01 Thread Avi Kivity
On 09/01/2010 11:49 AM, Alexander Graf wrote: On 01.09.2010, at 09:34, Avi Kivity wrote: The returned value is completely bogus, and sets reserved bits. Return zero instead. Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c |5 + 1 files changed, 1 insertions(+), 4 deletions(-) diff --

Re: [PATCH 2/2] KVM: Fix bogus value returned for MSR_IA32_PERF_STATUS

2010-09-01 Thread Alexander Graf
On 01.09.2010, at 10:55, Avi Kivity wrote: > On 09/01/2010 11:49 AM, Alexander Graf wrote: >> On 01.09.2010, at 09:34, Avi Kivity wrote: >> >>> The returned value is completely bogus, and sets reserved bits. >>> Return zero instead. >>> >>> Signed-off-by: Avi Kivity >>> --- >>> arch/x86/kvm/x86

Re: ftrace/perf_event leak

2010-09-01 Thread Peter Zijlstra
On Wed, 2010-09-01 at 11:42 +0300, Avi Kivity wrote: > I recently added perf_event support to kvm_stat, to display kvm > tracepoints as statistics (I'd like to fold this to tools/perf > eventually, but that's another story). However I'm seeing a resource > leak - after I quit the tool, there ar

Re: [PATCH v2 5/5] KVM: MMU: lower the aduit frequency

2010-09-01 Thread Avi Kivity
On 08/31/2010 05:27 AM, Xiao Guangrong wrote: I've always seen progress from the guest while running with audit enabled (its slow, but its not supposed to be fast anyway). Did you experience a freeze? There is a simply test in the guest if it's not rate limit: # time ls anaconda-ks.cfg Do

Re: ftrace/perf_event leak

2010-09-01 Thread Avi Kivity
On 09/01/2010 12:04 PM, Peter Zijlstra wrote: Does something like the below cure that? Unfortunately not. I seem to remember C doesn't make any promises about the order of logic statements, hence we need to explicitly pull out that try_module_get() so that it evaluates after the rest of th

Re: ftrace/perf_event leak

2010-09-01 Thread Li Zefan
Avi Kivity wrote: > On 09/01/2010 12:04 PM, Peter Zijlstra wrote: >> >> Does something like the below cure that? >> > > Unfortunately not. > Then try this: The bug should be caused by commit 1c024eca51fdc965290acf342ae16a476c2189d0. --- diff --git a/kernel/trace/trace_event_perf.c b/kernel/tr

Re: ftrace/perf_event leak

2010-09-01 Thread Peter Zijlstra
On Wed, 2010-09-01 at 12:26 +0300, Avi Kivity wrote: > On 09/01/2010 12:04 PM, Peter Zijlstra wrote: > > > > Does something like the below cure that? > > > > Unfortunately not. Hrmm,.. bugger, don't use modules is my motto.. still I'll have another look. -- To unsubscribe from this list: send the

Re: ftrace/perf_event leak

2010-09-01 Thread Peter Zijlstra
On Wed, 2010-09-01 at 17:38 +0800, Li Zefan wrote: > --- > diff --git a/kernel/trace/trace_event_perf.c b/kernel/trace/trace_event_perf.c > index 8a2b73f..9d1d1f2 100644 > --- a/kernel/trace/trace_event_perf.c > +++ b/kernel/trace/trace_event_perf.c > @@ -161,6 +161,7 @@ void perf_trace_destroy(st

[PATCH 0/1] Fix guest kernel crash when hitting AMD errata

2010-09-01 Thread Jes . Sorensen
From: Jes Sorensen This fix gets around the case where a user specifies a CPU model triggering an old Opteron errata. The patch returns the clock timing the errata expects to see and ignores writes to make sure a guest doesn't get an exception from reading or writing an MSR that is not supported,

[PATCH 1/1] Fix guest kernel crash when hitting AMD errata

2010-09-01 Thread Jes . Sorensen
From: Jes Sorensen MSR_K7_CLK_CTL is a no longer documented MSR, which is only relevant on said old AMD CPU models. This change returns the expected value, which the Linux kernel is expecting to avoid writing back the MSR, plus it ignores all writes to the MSR. Signed-off-by: Jes Sorensen ---

Re: [PATCH 4/5] virtio-net: Introduce a new bottom half packet TX

2010-09-01 Thread Michael S. Tsirkin
On Tue, Aug 31, 2010 at 02:33:46PM -0600, Alex Williamson wrote: > On Tue, 2010-08-31 at 23:14 +0300, Michael S. Tsirkin wrote: > > On Fri, Aug 27, 2010 at 04:37:36PM -0600, Alex Williamson wrote: > > > Based on a patch from Mark McLoughlin, this patch introduces a new > > > bottom half packet tran

Re: ftrace/perf_event leak

2010-09-01 Thread Avi Kivity
On 09/01/2010 12:38 PM, Li Zefan wrote: Then try this: Tested-by: Avi Kivity -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.ker

Re: [PATCH 1/7] pci: expand tabs to spaces in pci_regs.h

2010-09-01 Thread Michael S. Tsirkin
On Wed, Sep 01, 2010 at 01:58:30AM +0300, Eduard - Gabriel Munteanu wrote: > On Tue, Aug 31, 2010 at 11:29:53PM +0300, Michael S. Tsirkin wrote: > > On Sat, Aug 28, 2010 at 05:54:52PM +0300, Eduard - Gabriel Munteanu wrote: > > > The conversion was done using the GNU 'expand' tool (default settings

Re: [PATCH 0/5] virtio-net: More configurability and bh handling for tx

2010-09-01 Thread Michael S. Tsirkin
On Tue, Aug 31, 2010 at 04:26:07PM -0600, Alex Williamson wrote: > On Tue, 2010-08-31 at 16:33 -0500, Anthony Liguori wrote: > > On 08/31/2010 03:27 PM, Michael S. Tsirkin wrote: > > > On Fri, Aug 27, 2010 at 04:36:59PM -0600, Alex Williamson wrote: > > > > > >> Add the ability to configure the

Re: ftrace/perf_event leak

2010-09-01 Thread Peter Zijlstra
On Wed, 2010-09-01 at 13:38 +0300, Avi Kivity wrote: > On 09/01/2010 12:38 PM, Li Zefan wrote: > > > > Then try this: > > Tested-by: Avi Kivity > Thanks, queued as: --- Subject: perf, trace: Fix module leak From: Li Zefan Date: Wed Sep 01 12:58:43 CEST 2010 Commit 1c024eca (perf, trace: Opti

Re: ftrace/perf_event leak

2010-09-01 Thread Ingo Molnar
* Peter Zijlstra wrote: > On Wed, 2010-09-01 at 13:38 +0300, Avi Kivity wrote: > > On 09/01/2010 12:38 PM, Li Zefan wrote: > > > > > > Then try this: > > > > Tested-by: Avi Kivity > > > > Thanks, queued as: > > --- > Subject: perf, trace: Fix module leak > From: Li Zefan > Date: Wed Sep 01

Re: ftrace/perf_event leak

2010-09-01 Thread Frederic Weisbecker
On Wed, Sep 01, 2010 at 01:02:57PM +0200, Peter Zijlstra wrote: > On Wed, 2010-09-01 at 13:38 +0300, Avi Kivity wrote: > > On 09/01/2010 12:38 PM, Li Zefan wrote: > > > > > > Then try this: > > > > Tested-by: Avi Kivity > > > > Thanks, queued as: > > --- > Subject: perf, trace: Fix module leak

Re: [Qemu-devel] 10Gb Ethernet Adapters (with TOE ) port

2010-09-01 Thread Jes Sorensen
On 08/18/10 08:12, Onkar Mahajan wrote: > Is there any benefit gained by porting 10Gb Ethernet adapters to > Qemu/KVM ? The question may be naive. Please forgive me if this doesn't > make any sense. Creating a new QEMU driver to mimic one of the 10Gbit adapters is probably a waste of time, you sh

Re: ftrace/perf_event leak

2010-09-01 Thread Steven Rostedt
On Wed, 2010-09-01 at 14:15 +0200, Frederic Weisbecker wrote: > Thanks for fixing this. > > However, can we split this in two patches to ease the backport? > > The lack of a module_put() after perf_trace_init() failure is there for a > while > (the backport needs to start in 2.6.32). > > But t

Re: [PATCH v2 5/5] KVM: MMU: lower the aduit frequency

2010-09-01 Thread Marcelo Tosatti
On Wed, Sep 01, 2010 at 12:06:37PM +0300, Avi Kivity wrote: > On 08/31/2010 05:27 AM, Xiao Guangrong wrote: > > > >>I've always seen progress from the guest while running with audit > >>enabled (its slow, but its not supposed to be fast anyway). > >> > >>Did you experience a freeze? > >> > >There

Re: ftrace/perf_event leak

2010-09-01 Thread Ingo Molnar
* Steven Rostedt wrote: > On Wed, 2010-09-01 at 14:15 +0200, Frederic Weisbecker wrote: > > > Thanks for fixing this. > > > > However, can we split this in two patches to ease the backport? > > > > The lack of a module_put() after perf_trace_init() failure is there for a > > while > > (the b

Re: [Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-09-01 Thread Stefan Weil
Please see my comments at the end of this mail. Am 30.08.2010 00:08, schrieb Eduard - Gabriel Munteanu: PCI devices should access memory through pci_memory_*() instead of cpu_physical_memory_*(). This also provides support for translation and access checking in case an IOMMU is emulated. Memor

RE: Degrading Network performance as KVM/kernel version increases

2010-09-01 Thread matthew . r . rohrer
>I can't say anything about the kernel version making things worse. At >least for the qemu-kvm version, you should be using -device and -netdev >instead of -net nic -net tap (see >*http://git.qemu.org/qemu.git/tree/docs/qdev-device-use.txt since it's >not in the 0.12 tree).* Thanks for your su

Re: [RFC 1/8] Implement getnsboottime kernel API

2010-09-01 Thread Zachary Amsden
On 08/30/2010 06:06 AM, Glauber Costa wrote: From: Zachary Amsden Add a kernel call to get the number of nanoseconds since boot. This is generally useful enough to make it a generic call. Signed-off-by: Zachary Amsden --- include/linux/time.h |1 + kernel/time/timekeeping.c | 27

Re: ftrace/perf_event leak

2010-09-01 Thread Li Zefan
>> Subject: perf, trace: Fix module leak >> From: Li Zefan >> Date: Wed Sep 01 12:58:43 CEST 2010 >> >> Commit 1c024eca (perf, trace: Optimize tracepoints by using >> per-tracepoint-per-cpu hlist to track events) caused a module refcount >> leak. >> >> Tested-by: Avi Kivity >> Signed-off-by: Pete

[PATCH] KVM test: virtio_console test v2

2010-09-01 Thread Lucas Meneghel Rodrigues
From: Lukáš Doktor 1) Starts VMs with the specified number of virtio console devices 2) Start smoke test 3) Start loopback test 4) Start performance test This test uses an auxiliary script, console_switch.py, that is copied to guests. This script has functions to send and write data to virtio co

[PATCH v2] KVM-TEST: Use cdrom for Linux guests in unattended_install

2010-09-01 Thread Amos Kong
Bug 615839 - kernel panic when install guest with -fda There exists a bug of floppy driver, it blocked our installation tests. So replace floppy with cdrom for Linux guestsin unattended_install. Changes from v1: - Format floppy before mount - Mount install ISO to self.cd2_iso Signed-off-by: Am

Re: [PATCH 4/7] ide: use the PCI memory access interface

2010-09-01 Thread Michael S. Tsirkin
On Sat, Aug 28, 2010 at 05:54:55PM +0300, Eduard - Gabriel Munteanu wrote: > Emulated PCI IDE controllers now use the memory access interface. This > also allows an emulated IOMMU to translate and check accesses. > > Map invalidation results in cancelling DMA transfers. Since the guest OS > can't

Re: [PATCH 2/7] pci: memory access API and IOMMU support

2010-09-01 Thread Michael S. Tsirkin
On Sat, Aug 28, 2010 at 05:54:53PM +0300, Eduard - Gabriel Munteanu wrote: > PCI devices should access memory through pci_memory_*() instead of > cpu_physical_memory_*(). This also provides support for translation and > access checking in case an IOMMU is emulated. > > Memory maps are treated as r

Re: [Qemu-devel] [PATCH 2/7] pci: memory access API and IOMMU support

2010-09-01 Thread Michael S. Tsirkin
On Wed, Sep 01, 2010 at 10:10:30PM +0200, Stefan Weil wrote: > >+static inline void pci_memory_read(PCIDevice *dev, > >+ pcibus_t addr, > >+ uint8_t *buf, > >+ pcibus_t len) > >+{ > >+ pci_memory_rw(dev, addr, buf, len, 0); > >+} > >+ > >+static inline void pci_memory_write(PCIDevice *dev, > >+ pci