[PATCH] kvm-intel: Auto-load on CPUs with VMX.

2012-03-20 Thread Josh Triplett
Enable x86 feature-based autoloading for the kvm-intel module on CPUs with X86_FEATURE_VMX. Signed-off-by: Josh Triplett --- I've tested this and it works correctly. I can also supply the obvious equivalent patch for kvm-amd on AMD CPUs with SVM, but I don't have any such CPUs to test that on.

RE: [Qemu-devel] [PATCH v4 1/7] RTC: Remove the logic to update time format when DM bit changed

2012-03-20 Thread Zhang, Yang Z
> -Original Message- > From: Stefano Stabellini [mailto:stefano.stabell...@eu.citrix.com] > Sent: Tuesday, March 20, 2012 10:05 PM > To: Zhang, Yang Z > Cc: qemu-de...@nongnu.org; Paolo Bonzini; aligu...@us.ibm.com; > kvm@vger.kernel.org > Subject: Re: [Qemu-devel] [PATCH v4 1/7] RTC: Remov

x86: call restore_sched_clock_state after %gs is initialized

2012-03-20 Thread Marcelo Tosatti
restore_sched_clock_state methods use percpu data, therefore they must run after %gs is initialized, but before mtrr_bp_restore (due to lockstat using sched_clock). Move it to the correct place. Signed-off-by: Marcelo Tosatti diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c index 0e76a

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-20 Thread Wen Congyang
At 03/20/2012 11:45 PM, Gleb Natapov Wrote: > On Tue, Mar 20, 2012 at 05:59:16PM +0800, Wen Congyang wrote: >> At 03/19/2012 03:33 PM, Wen Congyang Wrote: >>> At 03/08/2012 03:57 PM, Wen Congyang Wrote: We can know the guest is paniced when the guest runs on xen. But we do not have such f

Re: Unknown KVM internal error on 3.2.1

2012-03-20 Thread Doug Goldstein
On Wed, Mar 7, 2012 at 8:19 AM, Avi Kivity wrote: > On 03/07/2012 01:00 PM, Gleb Natapov wrote: >> > >> > > KVM internal error. Suberror: 1 >> > > emulation failure >> > > EAX=8004003b EBX=38d54633 ECX=c0460a7e EDX=8005003b >> > > ESI=e49329a8 EDI=f7c98d60 EBP=0286 ESP=f7fecf68 >> > > EIP=f91d

Re: [Qemu-devel] [PATCH v4 5/7] RTC:Add RTC update-ended interrupt support

2012-03-20 Thread Stefano Stabellini
> +/* handle update-ended timer */ > +static void check_update_timer(RTCState *s) > +{ > +uint64_t next_update_time, expire_time; > +uint64_t guest_usec; > +qemu_del_timer(s->update_timer); > +qemu_del_timer(s->update_timer2); > + > +if (!((s->cmos_data[RTC_REG_C] & (REG_C_UF |

Re: [Qemu-devel] [PATCH v4 5/7] RTC:Add RTC update-ended interrupt support

2012-03-20 Thread Stefano Stabellini
On Mon, 19 Mar 2012, Zhang, Yang Z wrote: > Use a timer to emulate update cycle. When update cycle ended and UIE is > setting, then raise an interrupt. The timer runs only when UF or AF is > cleared. The idea is that if the user requests the update-ended interrupt (UIE) we setup a timer to injec

Re: [Qemu-devel] [PATCH v4 4/7] RTC: Set internal millisecond register to 500ms when reset divider

2012-03-20 Thread Paolo Bonzini
Il 20/03/2012 18:39, Stefano Stabellini ha scritto: > This code is new: does it mean we were not handling divider reset > correctly before? > Also if we are trying to handle the DV registers, shouldn't we emulated > the other RTC frequencies as well? If so, we need a scale factor, in > addition to

Re: [Qemu-devel] [PATCH v4 4/7] RTC: Set internal millisecond register to 500ms when reset divider

2012-03-20 Thread Stefano Stabellini
On Mon, 19 Mar 2012, Zhang, Yang Z wrote: > The first update cycle begins one - half seconds later when divider reset is > removing. > > Signed-off-by: Yang Zhang > --- > hw/mc146818rtc.c | 38 +- > 1 files changed, 33 insertions(+), 5 deletions(-) > > dif

Re: native kvm tool hrtimer problem

2012-03-20 Thread Daniele Carollo
I tried using the kernel 3.2.11 and i had different results: -one time it worked correctly without errors -one time i had the hrtimer message but the network seemed continue working -one time the network stopped working (during udp test) If you have time, try using these scripts: http://pastebin.c

Re: [Qemu-devel] [PATCHv2] virtio-pci: add MMIO property

2012-03-20 Thread Paul Brook
> @@ -682,10 +733,18 @@ void virtio_init_pci(VirtIOPCIProxy *proxy, > VirtIODevice *vdev) if (size & (size-1)) > size = 1 << qemu_fls(size); > > +proxy->bar0_mask = size - 1; You'll get better performance if you use page-sized mappings. You're already creating a mapping bigger tha

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-20 Thread Gleb Natapov
On Tue, Mar 20, 2012 at 05:59:16PM +0800, Wen Congyang wrote: > At 03/19/2012 03:33 PM, Wen Congyang Wrote: > > At 03/08/2012 03:57 PM, Wen Congyang Wrote: > >> We can know the guest is paniced when the guest runs on xen. > >> But we do not have such feature on kvm. > >> > >> Another purpose of thi

[PULL] vhost-net/virtio: fixes for 3.4

2012-03-20 Thread Michael S. Tsirkin
The following changes since commit 5ffca28a4ac7abb8a254fafe6bd03b2f83667df7: Merge git://git.kernel.org/pub/scm/linux/kernel/git/aia21/ntfs (2012-02-27 07:59:33 -0800) are available in the git repository at: ra.kernel.org:/pub/scm/linux/kernel/git/mst/vhost.git for_davem (ssh url as git.

Re: [PATCH RFC] virtio-pci: add MMIO property

2012-03-20 Thread Avi Kivity
On 03/19/2012 08:57 PM, Michael S. Tsirkin wrote: > > > > Should be done via an extra BAR (with the same layout, perhaps extended) > > so compatibility is preserved. > > No, that would need guest changes to be of use. The point of this hack > is to make things work for Linux guests where PIO does

Re: [PULL 00/56] ppc patch queue 2012-03-15

2012-03-20 Thread Avi Kivity
On 03/15/2012 02:10 PM, Alexander Graf wrote: > Hi Avi, > > This is my current patch queue for ppc. Please pull. > Pulled, thanks. -- 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.

Re: [PATCH 0/4] KVM: srcu-less dirty logging -v2

2012-03-20 Thread Avi Kivity
On 03/01/2012 12:30 PM, Takuya Yoshikawa wrote: > This patch series is the result of the integration of my dirty logging > optimization work, including preparation for the new GET_DIRTY_LOG API, > and the attempt to get rid of controversial synchronize_srcu_expedited(). > > 1 - KVM: MMU: Split the

Re: [Qemu-devel] [PATCH v4 3/7] RTC: Add UIP(update in progress) check logic

2012-03-20 Thread Stefano Stabellini
On Mon, 19 Mar 2012, Zhang, Yang Z wrote: > The UIP(update in progress) is set when RTC is updating. And the update cycle > begins 244us later after UIP is set. And it is cleared when update end. this patch seems good to me > Signed-off-by: Yang Zhang > --- > hw/mc146818rtc.c | 18 +

Re: [Qemu-devel] [PATCH v4 2/7] RTC: Update the RTC clock only when reading it

2012-03-20 Thread Stefano Stabellini
On Mon, 19 Mar 2012, Zhang, Yang Z wrote: > There has no need to use two periodic timer to update RTC time. In this > patch, we only update it when guest reading it. So the basic idea here is that we don't need to two periodic timers because we are going to calculate the RTC guest time from QEMU'

[GIT PULL] KVM updates for the 3.4 merge window

2012-03-20 Thread Avi Kivity
Linus, please pull from ra.kernel.org:/pub/scm/virt/kvm/kvm.git kvm-updates/3.4 (ssh URL as git.kernel.org is down at the moment) to receive the KVM updates for the 3.4 merge window. Changes include timekeeping improvements, support for assigning host PCI devices that share interrupt lines, s

Re: [Qemu-devel] [PATCH v4 1/7] RTC: Remove the logic to update time format when DM bit changed

2012-03-20 Thread Stefano Stabellini
On Mon, 19 Mar 2012, Zhang, Yang Z wrote: > Change DM(date mode) and 24/12 control bit don't affect the internal > registers. It only indicates what format is using for those registers. So we > don't need to update time format when it is modified. That might be true, but if the user changes form

Re: KVM call agenda for Tuesday 20th

2012-03-20 Thread Juan Quintela
Juan Quintela wrote: > Hi > > Please send in any agenda items you are interested in covering. As there are no topics, call is cancelled. Happy hacking, Juan. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo inf

Re: [Qemu-devel] [PATCH 2/2] Expose tsc deadline timer cpuid to guest

2012-03-20 Thread Eduardo Habkost
On Tue, Mar 20, 2012 at 12:53:57PM +, Liu, Jinsong wrote: > Rik van Riel wrote: > > On 03/09/2012 01:27 PM, Liu, Jinsong wrote: > > > >> As for 'tsc deadline' feature exposing, my patch (as attached) just > >> obey qemu general cpuid exposing method, and also satisfied your > >> target I think

Re: performance trouble

2012-03-20 Thread Gleb Natapov
On Tue, Mar 20, 2012 at 12:18:39PM +0100, David Cure wrote: > Le Tue, Mar 20, 2012 at 11:45:41AM +0200, Gleb Natapov ecrivait : > > > > This is without -no-hpet :) Also I hope you are not measuring time while > > ha yes, sorry for the mistake. > > > tracing since it supposed to be slow

Re: [PATCH v4 0/7] RTC: New logic to emulate RTC

2012-03-20 Thread Paolo Bonzini
Il 19/03/2012 07:13, Zhang, Yang Z ha scritto: > Current RTC emulation uses periodic timer(2 timers per second) to > update RTC clock. And it will stop CPU staying at deep C-state for > long period. Our experience shows the Pkg C6 residency reduced 6% > when running 64 idle guest. The following pat

Re: [PATCH 3/3] KVM: MMU: Separate trivial NULL check out from rmap_get_next()

2012-03-20 Thread Avi Kivity
On 03/20/2012 08:37 AM, Takuya Yoshikawa wrote: > On Thu, 15 Mar 2012 15:46:31 +0200 > Avi Kivity wrote: > > > You can look at what's happening by doing > > > > perf record -a -f > > perf report > > > > using the TUI, select 'annotate rmap_get_next' > > > > You should see where the time is

[PATCH 1/1] Fixed integer constant is too large for ‘long’ type warning

2012-03-20 Thread Sasikantha babu
--- arch/x86/kvm/pmu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/pmu.c b/arch/x86/kvm/pmu.c index 7aad544..9395230 100644 --- a/arch/x86/kvm/pmu.c +++ b/arch/x86/kvm/pmu.c @@ -365,7 +365,7 @@ int kvm_pmu_set_msr(struct kvm_vcpu *vcpu, u32 index, u64 da

Re: performance trouble

2012-03-20 Thread David Cure
Le Tue, Mar 20, 2012 at 11:45:41AM +0200, Gleb Natapov ecrivait : > > This is without -no-hpet :) Also I hope you are not measuring time while ha yes, sorry for the mistake. > tracing since it supposed to be slower. Can you please try to run with > -cpu host,-hypervisor and -no-hpet

Re: KVM inside Oracle VM

2012-03-20 Thread Al Patel
So you really mean to run Qemu inside Oracle VM? For KVM, the module needs to run on host kernel. If you are in the VM kernel already, KVM does not provide you with hardware acceleration. On Tue, Mar 20, 2012 at 4:34 AM, Paolo Bonzini wrote: > Il 19/03/2012 21:06, Sever Apostu ha scritto:

Re: [Qemu-devel] [PATCH v4 1/2] qemu-socket: change inet_connect() to to support nonblock socket

2012-03-20 Thread Orit Wasserman
On 03/19/2012 04:11 PM, Amos Kong wrote: > Change inet_connect(const char *str, int socktype) to > inet_connect(const char *str, bool block, int *sock_err), > socktype is unused, block is used to assign if set socket > to block/nonblock, sock_err is used to restore socket error. It is more common

Re: performance trouble

2012-03-20 Thread Gleb Natapov
On Tue, Mar 20, 2012 at 10:32:20AM +0100, David Cure wrote: > hello, > > Le Mon, Mar 19, 2012 at 12:51:34PM +0200, Gleb Natapov ecrivait : > > > > Can you run the same test on Linux guest and on Windows vm with 1 cpu? > > I see a lot of IPIs between vcpus. > > I run the same s

Re: [PATCH 0/2 v3] kvm: notify host when guest panicked

2012-03-20 Thread Wen Congyang
At 03/19/2012 03:33 PM, Wen Congyang Wrote: > At 03/08/2012 03:57 PM, Wen Congyang Wrote: >> We can know the guest is paniced when the guest runs on xen. >> But we do not have such feature on kvm. >> >> Another purpose of this feature is: management app(for example: >> libvirt) can do auto dump whe

Re: performance trouble

2012-03-20 Thread David Cure
hello, Le Mon, Mar 19, 2012 at 12:51:34PM +0200, Gleb Natapov ecrivait : > > Can you run the same test on Linux guest and on Windows vm with 1 cpu? > I see a lot of IPIs between vcpus. I run the same slowly fonction (to remember the guest is Windows2008R2 64bits). The repo

KVM call agenda for Tuesday 20th

2012-03-20 Thread Juan Quintela
Hi Please send in any agenda items you are interested in covering. Cheers, Juan. -- 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 http://vger.kernel.org/majordomo-info.html

Re: KVM inside Oracle VM

2012-03-20 Thread Paolo Bonzini
Il 19/03/2012 21:06, Sever Apostu ha scritto: >>> Any chance anyone has any feedback about KVM installed inside a Xen guest ? >> It's really a Xen question more than a KVM question. > > Thank you for the reply, Paolo! > > Most likely both will suffer and I am prepared to live with that, but > is