Re: [PATCH] tsc: use kvmclock for calibration

2012-08-10 Thread Gleb Natapov
On Thu, Aug 09, 2012 at 04:09:13PM -0300, Marcelo Tosatti wrote: > On Thu, Aug 09, 2012 at 05:01:34PM +0300, Avi Kivity wrote: > > On 08/09/2012 04:57 PM, Gerd Hoffmann wrote: > > > Hi, > > > > > >>> +u64 kvm_tsc_khz(void) > > >>> +{ > > >>> +u32 eax, ebx, ecx, edx, msr; > > >>> +struct

Re: [PATCH] tsc: use kvmclock for calibration

2012-08-10 Thread Gleb Natapov
On Fri, Aug 10, 2012 at 10:18:00AM +0300, Gleb Natapov wrote: > > can fix the in-kernel PIT issues with GRUB (see Michaels message) while > > testing. > > > What message exactly? > found it. -- Gleb. -- To unsubscribe from this list: send the line "unsubscribe kvm" in th

Re: [Qemu-devel] TSC in qem[-kvm] 1.1+ and in-kernel irqchip

2012-08-10 Thread Gleb Natapov
On Thu, Aug 09, 2012 at 10:27:43PM +0400, Michael Tokarev wrote: > As a follow-up to the patch "tsc: use kvmclock for > calibration". > > There's another problem reported by several users. > The sympthom is that grub does not show boot menu, > it boots default entry right away without any pause. >

Re: [PATCH 1/4] s390/kvm: Handle hosts not supporting s390-virtio.

2012-08-10 Thread Cornelia Huck
On Fri, 10 Aug 2012 01:09:15 +0200 Alexander Graf wrote: > > On 07.08.2012, at 16:52, Cornelia Huck wrote: > > > Running under a kvm host does not necessarily imply the presence of > > a page mapped above the main memory with the virtio information; > > however, the code includes a hard coded a

Re: [PATCH] tsc: use kvmclock for calibration

2012-08-10 Thread Gerd Hoffmann
Hi, >>> (1) Use this patch (with alignment issue fixed of course). >>> (2) Do a full kvmclock implementation. Feels a bit like overkill. >>> (3) SeaBIOS can fallback to the PIT for timing on machines which >>> have no TSC. We could do that too in case we detect kvm ... >> >> What s

[PATCH RESEND] KVM: MMU: Fix mmu_shrink() so that it can free mmu pages as intended

2012-08-10 Thread Takuya Yoshikawa
The following commit changed mmu_shrink() so that it would skip VMs whose n_used_mmu_pages was not zero and try to free pages from others: commit 1952639665e92481c34c34c3e2a71bf3e66ba362 KVM: MMU: do not iterate over all VMs in mmu_shrink() This patch fixes the function so that it can free mm

Re: [PATCH 1/4] s390/kvm: Handle hosts not supporting s390-virtio.

2012-08-10 Thread Heiko Carstens
On Thu, Aug 09, 2012 at 12:41:57PM +0200, Cornelia Huck wrote: > On Thu, 09 Aug 2012 13:03:57 +0300 > Avi Kivity wrote: > > > On 08/07/2012 05:52 PM, Cornelia Huck wrote: > > > Running under a kvm host does not necessarily imply the presence of > > > a page mapped above the main memory with the v

Slow disk performances

2012-08-10 Thread Alessandro Tagliapietra
Hello everyone, i've a running KVM instance, ran by Openstack. The command used is (checked from ps auxwww): /usr/bin/kvm -S -M pc-1.0 -enable-kvm -m 4096 -smp 4,sockets=4,cores=1,threads=1 -name instance-001b -uuid 598878a6-a5dc-4e15-ab17-3ab8b954f00a -nodefconfig -nodefaults -chardev so

Re: [PATCH 2/3] KVM: PPC: booke: Allow multiple exception types

2012-08-10 Thread Alexander Graf
On 10.08.2012, at 08:38, Bhushan Bharat-R65777 wrote: > > >> -Original Message- >> From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On >> Behalf Of Alexander Graf >> Sent: Tuesday, August 07, 2012 4:16 PM >> To: Bhushan Bharat-R65777 >> Cc: kvm-...@vger.kernel.

Re: [PATCH 3/3] KVM: PPC: booke: Added debug handler

2012-08-10 Thread Alexander Graf
On 10.08.2012, at 08:55, Bhushan Bharat-R65777 wrote: > > >> -Original Message- >> From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On >> Behalf Of Alexander Graf >> Sent: Wednesday, August 08, 2012 4:41 PM >> To: Bhushan Bharat-R65777 >> Cc: Wood Scott-B07421;

Re: [PATCH 0/5] Improve memory slot handling and other fixes

2012-08-10 Thread Alexander Graf
On 06.08.2012, at 12:02, Paul Mackerras wrote: > This series of 5 patches starts off with two fixes that I have posted > previously but not got any response to, and then has 3 patches to > improve our handling of memory slots on PPC. The first of those 3 > makes HV-style KVM able to handle delet

Re: [Qemu-devel] TSC in qem[-kvm] 1.1+ and in-kernel irqchip

2012-08-10 Thread Michael Tokarev
On 10.08.2012 11:33, Gleb Natapov wrote: > On Thu, Aug 09, 2012 at 10:27:43PM +0400, Michael Tokarev wrote: >> As a follow-up to the patch "tsc: use kvmclock for >> calibration". >> >> There's another problem reported by several users. >> The sympthom is that grub does not show boot menu, >> it boo

Re: [RFC PATCH 5/5] KVM: PPC: Take the SRCU lock around memslot use

2012-08-10 Thread Alexander Graf
On 10.08.2012, at 02:37, Paul Mackerras wrote: > On Thu, Aug 09, 2012 at 03:27:17PM -0300, Marcelo Tosatti wrote: >> On Mon, Aug 06, 2012 at 08:08:16PM +1000, Paul Mackerras wrote: >>> The generic KVM code uses SRCU (sleeping RCU) to protect accesses >>> to the memslots data structures against up

[PATCH] kvm: disable stealtime via reboot notifier to avoid mem corruption

2012-08-10 Thread Florian Westphal
else, we get memory corruption on reboot; found when tracking down initramfs unpack error on initial reboot (with qemu-kvm -smp 2, no problem with single-core). problem with doing it via kvm_shutdown() is that this file depends on CONFIG_KVM_CLOCK, also its not enough to call it for one cpu only.

RE: [PATCH 2/3] KVM: PPC: booke: Allow multiple exception types

2012-08-10 Thread Bhushan Bharat-R65777
> -Original Message- > From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf > Of > Alexander Graf > Sent: Friday, August 10, 2012 2:49 PM > To: Bhushan Bharat-R65777 > Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org > Subject: Re: [PATCH 2/3] KVM: PPC: booke: All

Re: [PATCH 2/3] KVM: PPC: booke: Allow multiple exception types

2012-08-10 Thread Alexander Graf
On 10.08.2012, at 12:41, Bhushan Bharat-R65777 wrote: > > >> -Original Message- >> From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf >> Of >> Alexander Graf >> Sent: Friday, August 10, 2012 2:49 PM >> To: Bhushan Bharat-R65777 >> Cc: kvm-...@vger.kernel.org;

RE: [PATCH 2/3] KVM: PPC: booke: Allow multiple exception types

2012-08-10 Thread Bhushan Bharat-R65777
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Friday, August 10, 2012 4:27 PM > To: Bhushan Bharat-R65777 > Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org > Subject: Re: [PATCH 2/3] KVM: PPC: booke: Allow multiple exception types > > > On 10.08.2012, at 12

Re: [PATCH 1/4] s390/kvm: Handle hosts not supporting s390-virtio.

2012-08-10 Thread Cornelia Huck
On Fri, 10 Aug 2012 10:42:48 +0200 Heiko Carstens wrote: > On Thu, Aug 09, 2012 at 12:41:57PM +0200, Cornelia Huck wrote: > > On Thu, 09 Aug 2012 13:03:57 +0300 > > Avi Kivity wrote: > > > > > On 08/07/2012 05:52 PM, Cornelia Huck wrote: > > > > Running under a kvm host does not necessarily imp

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

2012-08-10 Thread Arnaldo Carvalho de Melo
Em Fri, Aug 10, 2012 at 11:19:10AM +0800, Dong Hao escreveu: > From: Xiao Guangrong > > Add 'perf kvm stat' support to analyze kvm vmexit/mmio/ioport smartly. Some comments below about recent changes in my perf/core branch. > +static void process_raw_event(struct thread *thread, void *data, u64

Re: KVM segfaults with 3.5 while installing ubuntu 12.04

2012-08-10 Thread Stefan Hajnoczi
On Wed, Aug 8, 2012 at 9:29 AM, Stefan Priebe wrote: > ah OK - thanks. Will there be a fixed 1.1.2 as well? mdroth: Kevin has the fix in his block branch, which means qemu.git will get it soon. Here's the commit: http://repo.or.cz/w/qemu/kevin.git/commit/730a9c53b4e52681fcfe31cf38854cbf91e132c7

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-10 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: > Changelog: > - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page > - introduce KVM_HVA_ERR_BAD and optimize error hva indicators > > The test case can be found at: > http://lkml.indiana.edu/hypermail/linux/kernel/1207.2/00819/mig

Re: [PATCH v5 11/12] KVM: x86: introduce set_mmio_exit_info

2012-08-10 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 05:54:42PM +0800, Xiao Guangrong wrote: > Introduce set_mmio_exit_info to cleanup the common code > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/x86.c | 33 + > 1 files changed, 17 insertions(+), 16 deletions(-) > > diff --git a/

Re: [PATCH v5 05/12] KVM: reorganize hva_to_pfn

2012-08-10 Thread Marcelo Tosatti
On Tue, Aug 07, 2012 at 05:51:05PM +0800, Xiao Guangrong wrote: > We do too many things in hva_to_pfn, this patch reorganize the code, > let it be better readable > > Signed-off-by: Xiao Guangrong > --- > virt/kvm/kvm_main.c | 159 > +++ > 1 file

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Handle memory slot deletion and modification correctly

2012-08-10 Thread Marcelo Tosatti
On Fri, Aug 10, 2012 at 11:09:09AM +0900, Takuya Yoshikawa wrote: > On Thu, 9 Aug 2012 22:25:32 -0300 > Marcelo Tosatti wrote: > > > I'll send a patch to flush per memslot in the next days, you can work > > out the PPC details in the meantime. Not anymore. > Are you going to implement that usin

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

2012-08-10 Thread David Ahern
Thanks for resubmitting this; it was on my to-do list as well. On 8/9/12 9:19 PM, Dong Hao wrote: +static bool kvm_events_exist(const char *event) +{ + char evt_path[MAXPATHLEN]; + int fd; + + snprintf(evt_path, MAXPATHLEN, "%s/kvm/%s/id", tracing_events_path, +

Re: [PATCH] tsc: use kvmclock for calibration

2012-08-10 Thread Marcelo Tosatti
On Fri, Aug 10, 2012 at 10:10:27AM +0200, Gerd Hoffmann wrote: > Hi, > > >>> (1) Use this patch (with alignment issue fixed of course). > >>> (2) Do a full kvmclock implementation. Feels a bit like overkill. > >>> (3) SeaBIOS can fallback to the PIT for timing on machines which > >>>

[PATCH] powerpc/epapr: export epapr_hypercall_start

2012-08-10 Thread Scott Wood
This fixes breakage introduced by the following commit: commit 6d2d82627f4f1e96a33664ace494fa363e0495cb Author: Liu Yu-B13201 Date: Tue Jul 3 05:48:56 2012 + PPC: Don't use hardcoded opcode for ePAPR hcall invocation when a driver that uses ePAPR hypercalls is built as a module.

[PATCH v8 1/6] kvm: Allow filtering of acked irqs

2012-08-10 Thread Alex Williamson
Registering an kvm_irq_ack_notifier with kian.irq_source_id < 0 retains existing behavior, filling in the actual irq_source_id results in the callback only being called when the specified irq_source_id is asserting the given gsi. The i8254 PIT remains unfiltered because it de-asserts it's irq sour

[PATCH v8 6/6] kvm: Add de-assert option to KVM_IRQ_ACKFD

2012-08-10 Thread Alex Williamson
It's likely (vfio) that one of the reasons to watch for an IRQ ACK is to de-assert and re-enable an interrupt. As the IRQ ACK notfier is already watching a GSI for an IRQ source ID we can easily couple these together. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt |4

[PATCH v8 5/6] kvm: KVM_IRQ_ACKFD

2012-08-10 Thread Alex Williamson
Enable a mechanism for IRQ ACKs to be exposed through an eventfd. The user can specify the GSI and optionally an IRQ source ID and have the provided eventfd trigger whenever the irqchip resamples it's inputs, for instance on EOI. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api

[PATCH v8 0/6] kvm: level irqfd support

2012-08-10 Thread Alex Williamson
v8: Trying a new approach. Nobody seems to like the internal IRQ source ID object and the interactions it implies between irqfd and eoifd, so let's get rid of it. Instead, simply expose IRQ source IDs to userspace. This lets the user be in charge of freeing them or hanging onto a source ID for

[PATCH v8 2/6] kvm: Expose IRQ source IDs to userspace

2012-08-10 Thread Alex Williamson
Introduce KVM_IRQ_SOURCE_ID and KVM_CAP_NR_IRQ_SOURCE_ID to allow user allocation of IRQ source IDs and querying both the capability and the total count of IRQ source IDs. These will later be used by interfaces for setting up level IRQs. Signed-off-by: Alex Williamson --- Documentation/virtual

[PATCH v8 3/6] kvm: Add IRQ source ID option to KVM_IRQFD

2012-08-10 Thread Alex Williamson
This allows specifying an IRQ source ID to be used when injecting an interrupt. When not specified KVM_USERSPACE_IRQ_SOURCE_ID is used. Signed-off-by: Alex Williamson --- Documentation/virtual/kvm/api.txt |5 + arch/x86/kvm/x86.c|1 + include/linux/kvm.h

[PATCH v8 4/6] kvm: Add assert-only option to KVM_IRQFD

2012-08-10 Thread Alex Williamson
This allows specifying that an irqfd is used only to assert the specified gsi, whereas standard behavior is to follow the assertion with a deassertion. This will later allow a level interrupt to be asserted via eventfd and later de-asserted by other means. Signed-off-by: Alex Williamson --- Do

Re: [PATCH] kvm tools: Fix crash when /etc/resolv.conf doesn't exist

2012-08-10 Thread Asias He
On Fri, Aug 10, 2012 at 1:01 PM, Michael Ellerman wrote: > In uip_dhcp_get_dns() we try to open /etc/resolv.conf. If we fail to > open it we then SEGV trying to fclose() it. > > Fix the code to just return directly if we can't open it. > > Signed-off-by: Michael Ellerman > --- > tools/kvm/net/ui

Re: [PATCH 1/2] kvm tools: Fix formatting of error message in TAP handling

2012-08-10 Thread Asias He
On Fri, Aug 10, 2012 at 1:38 PM, Michael Ellerman wrote: > This error message is missing a space, and has a redundant ":" at the end, > currently it produces: > > You have requested a TAP device, but creation of one hasfailed because:: No > such file or directory > > Add a space to "hasfailed"

Re: [PATCH 2/2] kvm tools: Check for unknown parameters in network option handling

2012-08-10 Thread Asias He
On Fri, Aug 10, 2012 at 1:38 PM, Michael Ellerman wrote: > Currently the parsing of network command line parameters doesn't check > for unknown parameters. > > For example "-n mod=none" will cause kvmtool to setup TAP networking. > > Save users from their typos by checking for unknown parameters a

Re: [PATCH 3/5] KVM: PPC: Book3S HV: Handle memory slot deletion and modification correctly

2012-08-10 Thread Paul Mackerras
On Fri, Aug 10, 2012 at 03:35:53PM -0300, Marcelo Tosatti wrote: > There's no plan. I just wanted to confirm this before converting > to per-memslot flush. > > 1) __kvm_set_memory_region line 807: > > * - gfn_to_hva (kvm_read_guest, gfn_to_pfn) > * - k

Re: [PATCH 09/15] memory: prepare flatview and radix-tree for rcu style access

2012-08-10 Thread liu ping fan
On Wed, Aug 8, 2012 at 5:41 PM, Avi Kivity wrote: > On 08/08/2012 09:25 AM, Liu Ping Fan wrote: >> From: Liu Ping Fan >> >> Flatview and radix view are all under the protection of pointer. >> And this make sure the change of them seem to be atomic! >> >> The mr accessed by radix-tree leaf or flat

Re: [PATCH v5 05/12] KVM: reorganize hva_to_pfn

2012-08-10 Thread Xiao Guangrong
On 08/11/2012 01:51 AM, Marcelo Tosatti wrote: > On Tue, Aug 07, 2012 at 05:51:05PM +0800, Xiao Guangrong wrote: >> We do too many things in hva_to_pfn, this patch reorganize the code, >> let it be better readable >> >> Signed-off-by: Xiao Guangrong >> --- >> virt/kvm/kvm_main.c | 159 >> ++

Re: [PATCH v5 11/12] KVM: x86: introduce set_mmio_exit_info

2012-08-10 Thread Xiao Guangrong
On 08/11/2012 02:03 AM, Marcelo Tosatti wrote: >> int emulator_read_write(struct x86_emulate_ctxt *ctxt, unsigned long addr, >> void *val, unsigned int bytes, >> struct x86_exception *exception, >> @@ -3870,14 +3881,10 @@ int emulator_read_write(struct x8

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-10 Thread Xiao Guangrong
On 08/11/2012 02:14 AM, Marcelo Tosatti wrote: > On Tue, Aug 07, 2012 at 05:47:15PM +0800, Xiao Guangrong wrote: >> Changelog: >> - introduce KVM_PFN_ERR_RO_FAULT instead of dummy page >> - introduce KVM_HVA_ERR_BAD and optimize error hva indicators >> >> The test case can be found at: >> http://lk