Biweekly KVM Test report, kernel a7805... qemu d0be2...

2009-12-14 Thread Hao, Xudong
Hi, all, This is KVM biweekly test report against latest kvm.git: a78054a4d28affdf93dfdc73e75b9831bc34cbef and qemu-kvm.git: d0be2513d5eefb47a83f9a303fe142dd8ef72848. There is no new issue in the past two weeks. one bug about NIC device with INTx mode got fixed. Live-migration still can not

Re: Biweekly KVM Test report, kernel a7805... qemu d0be2...

2009-12-14 Thread Gleb Natapov
On Mon, Dec 14, 2009 at 03:57:48PM +0800, Hao, Xudong wrote: Seven Old Issues: 1. Window7 debug version installation fail on KVM https://sourceforge.net/tracker/?func=detailatid=893831aid=2902983group_id=180599 This should work with Seabios. Are

Re: [PATCH] KVM: Fix possible circular locking in kvm_vm_ioctl_assign_device()

2009-12-14 Thread Avi Kivity
On 12/14/2009 09:14 AM, Sheng Yang wrote: On Monday 07 December 2009 16:58:04 Sheng Yang wrote: One possible order is: KVM_CREATE_IRQCHIP ioctl(took kvm-lock) - kvm_iobus_register_dev() - down_write(kvm-slots_lock). The other one is in kvm_vm_ioctl_assign_device(), which take

RE: Biweekly KVM Test report, kernel a7805... qemu d0be2...

2009-12-14 Thread Hao, Xudong
Gleb Natapov wrote: On Mon, Dec 14, 2009 at 03:57:48PM +0800, Hao, Xudong wrote: Seven Old Issues: 1. Window7 debug version installation fail on KVM https://sourceforge.net/tracker/?func=detailatid=893831aid=2902983group_id=180599 This should

Re: [PATCH] KVM: x86: Extend KVM_SET_VCPU_EVENTS with selective updates

2009-12-14 Thread Jan Kiszka
Jan Kiszka wrote: User space may not want to overwrite asynchronously changing VCPU event states on write-back. So allow to skip nmi.pending and sipi_vector by setting corresponding bits in the flags field of kvm_vcpu_events. What will happen to this patch now? Merge during 2.6.33 window or

Re: [PATCH] KVM: x86: Extend KVM_SET_VCPU_EVENTS with selective updates

2009-12-14 Thread Avi Kivity
On 12/14/2009 12:32 PM, Jan Kiszka wrote: Jan Kiszka wrote: User space may not want to overwrite asynchronously changing VCPU event states on write-back. So allow to skip nmi.pending and sipi_vector by setting corresponding bits in the flags field of kvm_vcpu_events. What will

Re: Doubt on KVM-88 vulnerabilities

2009-12-14 Thread Daniel Bareiro
Hi, Avi. On Tuesday, 10 November 2009 12:04:40 +0200, Avi Kivity wrote: I'm using KVM-88 compiled by myself from the source code provided by the official site of the project. Is this version of KVM vulnerable to the mentioned thing in the DSA-1907-1 [1]? Yes. In such case, there is some

[PATCH] KVM: SVM: Adjust tsc_offset only if tsc_unstable

2009-12-14 Thread Joerg Roedel
The tsc_offset adjustment in svm_vcpu_load is executed unconditionally even if Linux considers the host tsc as stable. This causes a Linux guest detecting an unstable tsc in any case. This patch removes the tsc_offset adjustment if the host tsc is stable. The guest will now get the benefit of a

Re: Networking-related crash?

2009-12-14 Thread Patrick McHardy
Adam Huffman wrote: On Thu, Dec 10, 2009 at 11:01 AM, Patrick McHardy ka...@trash.net wrote: Eric Dumazet wrote: Le 09/12/2009 16:11, Avi Kivity a écrit : On 12/09/2009 03:46 PM, Adam Huffman wrote: I've been seeing lots of crashes on a new Dell Precision T7500, running the KVM in Fedora 12.

Re: Networking-related crash?

2009-12-14 Thread Adam Huffman
On Mon, Dec 14, 2009 at 1:16 PM, Patrick McHardy ka...@trash.net wrote: Adam Huffman wrote: On Thu, Dec 10, 2009 at 11:01 AM, Patrick McHardy ka...@trash.net wrote: Eric Dumazet wrote: Le 09/12/2009 16:11, Avi Kivity a écrit : On 12/09/2009 03:46 PM, Adam Huffman wrote: I've been seeing lots

vga std / vga vmware leads to unhandled vm exit: 0x11

2009-12-14 Thread Dominik Brodowski
Hey, using kvm with -vga std or -vga vmware leads to an unhandled vm exit: 0x11, while -vga cirrus works fine. CPU model: Intel(R) Core(TM)2 Duo CPU T7250 @ 2.00GHz KVM version: - QEMU PC emulator version 0.11.0 (qemu-kvm-0.11.0), Copyright (c) 2003-2008 Fabrice Bellard

[Autotest] [KVM-AUTOTEST PATCH] Add support for ipv6 address

2009-12-14 Thread yogi
Hello everyone, I like to submit a patch to enable ipv6 address support in kvm-autotest. The patch adds a new dictionary called address6_cache for ip6 address. Tcpdump is used to create this cache of link-local ipv6 address. Link-local ipv6 address is used because it eliminates to need to create

network shutdown under heavy load

2009-12-14 Thread rek2
Hello, we notice that when we stress any of our guests, in this case they are all fedora, the KVM network will shutdown.. anyone experience this? Thanks -- 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: [Qemu-devel] Qemu terminating with SIGABRT

2009-12-14 Thread Luiz Capitulino
On Sat, 12 Dec 2009 11:09:38 -0700 David S. Ahern daah...@cisco.com wrote: Thanks for the responses. I had forgotten that SIGABRT==abort() which means I have to get the core file to get to the root cause. To date the only information I have is a shell exit status of 134 which from the bash

Re: [Qemu-devel] Qemu terminating with SIGABRT

2009-12-14 Thread David S. Ahern
I'm using a variant of the KVM source from RHEL5 plus a few cherry-picked patches. Host OS is RHEL 5.3. The servers are using E5540 or E5504 processors. The host OS is running from a small USB key, and there is no place to write a core file. Other accommodations have to be made to get it.

buildbot failure in qemu-kvm on default_x86_64_debian_5_0

2009-12-14 Thread qemu-kvm
The Buildbot has detected a new failure of default_x86_64_debian_5_0 on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_x86_64_debian_5_0/builds/198 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qemu_kvm_1

buildbot failure in qemu-kvm on default_i386_debian_5_0

2009-12-14 Thread qemu-kvm
The Buildbot has detected a new failure of default_i386_debian_5_0 on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_i386_debian_5_0/builds/200 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qemu_kvm_2

buildbot failure in qemu-kvm on default_x86_64_out_of_tree

2009-12-14 Thread qemu-kvm
The Buildbot has detected a new failure of default_x86_64_out_of_tree on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_x86_64_out_of_tree/builds/139 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build:

buildbot failure in qemu-kvm on default_i386_out_of_tree

2009-12-14 Thread qemu-kvm
The Buildbot has detected a new failure of default_i386_out_of_tree on qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_i386_out_of_tree/builds/137 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Build: b1_qemu_kvm_2

Art Kupr has added you as a friend on the website VK.com

2009-12-14 Thread VK
kvm, Art Kupr has added you as a friend on the website VK.com You can log in and view your friends` pages using your email and automatically created password: SAS6FOsv VK.com is a website that helps dozens of millions of people find their old friends, share photos and events and always stay

Re: Doubt on KVM-88 vulnerabilities

2009-12-14 Thread Daniel Bareiro
On Monday, 14 December 2009 08:08:32 -0300, Daniel Bareiro wrote: I recommend to use distro-provided modules (or kernel.org kernels within their support period) for production use. This ensures you get security and stability fixes. kvm-89 will fix these issues, but as it's a

[ANNOUNCE] qemu-kvm-0.12.0-rc2 released

2009-12-14 Thread Avi Kivity
qemu-kvm-0.12.0-rc2 is now available. This release is is based on the upstream qemu 0.12.0-rc2, plus kvm-specific enhancements. Please see the original qemu 0.12.0-rc2 release announcement for details. This release can be used with the kvm kernel modules provided by your distribution

Re: Doubt on KVM-88 vulnerabilities

2009-12-14 Thread Avi Kivity
On 12/14/2009 01:08 PM, Daniel Bareiro wrote: Then, I imagine that only it would be necessary to compile the userspace. It is not necessary to rebuild userspace, unless you want to use new features. The steps that I habitually followed are the mentioned ones in the section 'Unpacking and

Re: Doubt on KVM-88 vulnerabilities

2009-12-14 Thread Avi Kivity
On 12/14/2009 07:36 PM, Daniel Bareiro wrote: According to I found looking for in Internet, qemu-kvm does not include the kernel modules but only the userspace and it is considered to be stable. I've downloaded qemu-kvm-0.11.0 and I build it with 'make' and 'make install' like did with kvm-nn

Re: [PATCH] KVM: Fix possible circular locking in kvm_vm_ioctl_assign_device()

2009-12-14 Thread Marcelo Tosatti
On Mon, Dec 07, 2009 at 04:58:04PM +0800, Sheng Yang wrote: One possible order is: KVM_CREATE_IRQCHIP ioctl(took kvm-lock) - kvm_iobus_register_dev() - down_write(kvm-slots_lock). The other one is in kvm_vm_ioctl_assign_device(), which take kvm-slots_lock first, then kvm-lock. Observe

-smb bug

2009-12-14 Thread niertour
Hi. * what cpu model : opteron and phenom * what kvm version you are using : 0.11.1 * the host kernel version : 2.6.32 * what host kernel arch you are using : x86_64 * what guest you are using : XP pro 32 bit * the qemu command line you are using to start the guest : qemu-system-x86_64 -smb

KVM: LAPIC: make sure IRR bitmap is scanned after vm load

2009-12-14 Thread Marcelo Tosatti
The vcpus are initialized with irr_pending set to false, but loading the LAPIC registers with pending IRR fails to reset the irr_pending variable. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index cd60c0b..3063a0c 100644 ---

Re: Memory under KVM?

2009-12-14 Thread Thomas Fjellstrom
On Mon December 14 2009, rek2 wrote: VIRT includes a lot of shared memory, so it's not a very useful number to look at when trying to gauge how much memory a process is using. Ok, so then what stats should we look to calculate the amount of memory a server should have depending on how many

Re: [PATCH v2 0/4] Defer skb allocation for both mergeable buffers and big packets in virtio_net

2009-12-14 Thread Shirley Ma
On Sun, 2009-12-13 at 12:19 +0200, Michael S. Tsirkin wrote: Shirley, some advice on packaging patches that I hope will be helpful: You did try to split up the patch logically, and it's better than a single huge patch, but it can be better. For example, you add static functions in one

Re: [PATCH v2 1/4] Defer skb allocation -- add destroy buffers function for virtio

2009-12-14 Thread Shirley Ma
Hello Michael, I agree with the comments (will have two patches instead of 4 based on Rusty's comments) except below one. On Sun, 2009-12-13 at 12:26 +0200, Michael S. Tsirkin wrote: That said - do we have to use a callback? I think destroy_buf which returns data pointer, and which we call

Re: [PATCH v2 1/4] Defer skb allocation -- add destroy buffers function for virtio

2009-12-14 Thread Michael S. Tsirkin
On Mon, Dec 14, 2009 at 12:08:05PM -0800, Shirley Ma wrote: Hello Michael, I agree with the comments (will have two patches instead of 4 based on Rusty's comments) except below one. On Sun, 2009-12-13 at 12:26 +0200, Michael S. Tsirkin wrote: That said - do we have to use a callback? I

[PATCH] qemu-kvm initialize vcpu state after machine initialization

2009-12-14 Thread Marcelo Tosatti
So that the vcpu state is initialized, from vcpu thread context, after machine initialization is settled. This allows to revert apic_init's apic_reset call. apic_reset now happens through system_reset, similarly to qemu upstream. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com diff --git

[ kvm-Bugs-2914397 ] Virtio drivers for Windows - large volumes fail

2009-12-14 Thread SourceForge.net
Bugs item #2914397, was opened at 2009-12-14 15:06 Message generated for change (Tracker Item Submitted) made by iggy_cav You can respond by visiting: https://sourceforge.net/tracker/?func=detailatid=893831aid=2914397group_id=180599 Please note that this message will contain a full copy of the

Re: [PATCH v2 2/4] Defer skb allocation -- new skb_set calls chain pages in virtio_net

2009-12-14 Thread Shirley Ma
On Sun, 2009-12-13 at 13:24 +0200, Michael S. Tsirkin wrote: Hmm, this scans the whole list each time. OTOH, the caller probably can easily get list tail as well as head. If we ask caller to give us list tail, and chain them at head, then 1. we won't have to scan the list each time 2. we get

Re: Doubt on KVM-88 vulnerabilities

2009-12-14 Thread Daniel Bareiro
Hi, Avi. On Monday, 14 December 2009 20:39:13 +0200, Avi Kivity wrote: According to I found looking for in Internet, qemu-kvm does not include the kernel modules but only the userspace and it is considered to be stable. I've downloaded qemu-kvm-0.11.0 and I build it with 'make' and 'make

Re: [ANNOUNCE] qemu-kvm-0.12.0-rc2 released

2009-12-14 Thread Dustin Kirkland
On Mon, Dec 14, 2009 at 12:33 PM, Avi Kivity a...@redhat.com wrote: qemu-kvm-0.12.0-rc2 is now available.  This release is is based on the upstream qemu 0.12.0-rc2, plus kvm-specific enhancements.  Please see the original qemu 0.12.0-rc2 release announcement for details. This release can be

Re: PATCH v2 3/4] Defer skb allocation -- new recvbuf alloc receive calls

2009-12-14 Thread Shirley Ma
On Sun, 2009-12-13 at 13:43 +0200, Michael S. Tsirkin wrote: Interesting. I think skb_goodcopy will sometimes set *page to NULL. Will the above crash then? Nope, when *page is NULL, *len is 0. don't put empty line here. if below is part of same logical block as skb_goodcopy. Ok. Local

Re: [PATCH v2 1/4] Defer skb allocation -- add destroy buffers function for virtio

2009-12-14 Thread Shirley Ma
Thanks Rusty. I agree with all these comments, will work on them. Shirley -- 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: [PATCH v2 2/4] Defer skb allocation -- new skb_set calls chain pages in virtio_net

2009-12-14 Thread Shirley Ma
Thanks Rusty, agree with you, working on them. Shirley -- 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: [PATCH v2 1/4] Defer skb allocation -- add destroy buffers function for virtio

2009-12-14 Thread Shirley Ma
Hello Michael, On Mon, 2009-12-14 at 22:22 +0200, Michael S. Tsirkin wrote: I dont insist, but my idea was for (;;) { b = vq-destroy(vq); if (!b) break; --vi-num; put_page(b); } so we do not have to lose track of the counter. That's

Re: Doubt on KVM-88 vulnerabilities

2009-12-14 Thread Daniel Bareiro
Hi, Avi. On Monday, 14 December 2009 20:38:08 +0200, Avi Kivity wrote: Then, I imagine that only it would be necessary to compile the userspace. It is not necessary to rebuild userspace, unless you want to use new features. Good. Then if we did not need new features and we only want to

Video problem

2009-12-14 Thread Frans de Boer
Dear Reader(s), I have encountered a problem after the qemu-kvm-0.11 version in that the resolution for Windows XP changed to 640x480 with 4-bit depth as opposed to 1680x1050x24/32 bits. Using git I tried to keep up with the latest. recently I am using Opensuse 11.2, but the current git produces

Re: PATCH v2 3/4] Defer skb allocation -- new recvbuf alloc receive calls

2009-12-14 Thread Shirley Ma
Hello Michael, On Mon, 2009-12-14 at 14:08 -0800, Shirley Ma wrote: + + err = vi-rvq-vq_ops-add_buf(vi-rvq, sg, 0, 2, skb); + if (err 0) + kfree_skb(skb); + else + skb_queue_head(vi-recv, skb); So why are we queueing this still? This is

debugging windows guests

2009-12-14 Thread Raindog
Hello, I am researching KVM as a malware analysis platform and had some questions about debugging the guest OS. In my case I intend to use windows guests. So my questsions are as follows: Questions: 1. What instrumentation facilities are their available? 2. Is it possible to extend the

[PATCH] qemu-kvm: compatfd: trivial compile fix

2009-12-14 Thread Chris Wright
Fix build when !CONFIG_EVENTFD CCcompatfd.o compatfd.c: In function ‘qemu_eventfd’: compatfd.c:137: error: ‘ret’ undeclared (first use in this function) compatfd.c:137: error: (Each undeclared identifier is reported only once compatfd.c:137: error: for each function it appears in.) make: ***

Re: Doubt on KVM-88 vulnerabilities

2009-12-14 Thread Daniel Bareiro
Hi, Avi and Chris. On Monday, 14 December 2009 18:07:57 -0300, Daniel Bareiro wrote: According to I found looking for in Internet, qemu-kvm does not include the kernel modules but only the userspace and it is considered to be stable. I've downloaded qemu-kvm-0.11.0 and I build it with

OpenBSD 4.5 and qemu-kvm-0.12.0-rc2

2009-12-14 Thread Daniel Bareiro
Hi all! I'm testing qemu-kvm-0.12.0-rc2 with the patch for compatfd of Chris Wright on a host with Linux 2.6.32 from kernel.org and a virtual machine with OpenBSD 4.5. After to boot this virtual machine I'm observing by serial console the following message of the network interface which is

Re: [PATCH] KVM: SVM: Adjust tsc_offset only if tsc_unstable

2009-12-14 Thread Zachary Amsden
On 12/14/2009 01:22 AM, Joerg Roedel wrote: The tsc_offset adjustment in svm_vcpu_load is executed unconditionally even if Linux considers the host tsc as stable. This causes a Linux guest detecting an unstable tsc in any case. This patch removes the tsc_offset adjustment if the host tsc is

SeaBIOS mailing list

2009-12-14 Thread Kevin O'Connor
There is now a mailing list for discussions on SeaBIOS. To join the mailing list, please visit: http://www.seabios.org/mailman/listinfo/seabios Mails can be sent to seab...@seabios.org. To reduce spam, non-member posts to the list will be moderated. -Kevin -- To unsubscribe from this list:

RFC - TSC virtualization for KVM

2009-12-14 Thread Zachary Amsden
This set of patches builds the infrastructure to do both passthrough and intercept based virtualization of TSC in KVM. Unfortunately, I got caught up on the mechanics of the locking for quite some time to this work is a bit delayed, and the tail end of the patches is in a bit of a messy state,

[PATCH RFC: kvm tsc virtualization 01/20] Move TSC read to vmx_vcpu_put

2009-12-14 Thread Zachary Amsden
This makes the VMX implementation match the SVM implementation as far as when the TSC is read. This means last_tsc is measured at the time of relinquishing VM operation, rather than at CPU switch time. That may seem non-optimal for now, but it is a preparatory step for unifying the TSC code in

[PATCH RFC: kvm tsc virtualization 10/20] Add a stat counter for RDTSC exits

2009-12-14 Thread Zachary Amsden
Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/include/asm/kvm_host.h |4 arch/x86/kvm/svm.c |1 + arch/x86/kvm/x86.c |3 +++ include/linux/kvm_host.h| 12 virt/kvm/kvm_main.c | 18 -- 5

[PATCH RFC: kvm tsc virtualization 09/20] Use TSC reference for SVM

2009-12-14 Thread Zachary Amsden
Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/include/asm/kvm_host.h |1 + arch/x86/kvm/kvm_timer.h| 19 arch/x86/kvm/svm.c | 45 +-- arch/x86/kvm/x86.c |2 +- 4 files changed, 36

[PATCH RFC: kvm tsc virtualization 14/20] Move TSC cpu vars to a struct

2009-12-14 Thread Zachary Amsden
There's enough of these floating around randomly to justify using a structure for keeping them in one place. Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/kvm/x86.c | 110 ++-- 1 files changed, 64 insertions(+), 46 deletions(-)

[PATCH RFC: kvm tsc virtualization 15/20] Fix longstanding races

2009-12-14 Thread Zachary Amsden
First, we could get multiple CPU frequency updates in rapid succession. If the base CPU changes, we must resynchronize all CPUs, but the work scheduling was poorly serialized, which could result in some CPUs missing the resynchronize action. Second, the work function doesn't protect against CPU

[PATCH RFC: kvm tsc virtualization 20/20] Get passthrough TSC working in SVM again

2009-12-14 Thread Zachary Amsden
Quick and dirty hack to get passthrough TSC back in SVM. Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/kvm/svm.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 91eb263..91107a4 100644 ---

[PATCH RFC: kvm tsc virtualization 19/20] IOCTL for different TSC modes

2009-12-14 Thread Zachary Amsden
Expand the previous ioctl to add a mode field specifying the mode of TSC virtualization. There are three modes. 1) Pure passthrough - TSC is always passed through. Hardware offset features are used. Great for fixed frequency machines with VMs that will not be migrated. 2) Pure intercept - TSC

[PATCH RFC: kvm tsc virtualization 18/20] Implement variable speed TSC

2009-12-14 Thread Zachary Amsden
Add ioctl's to get and set TSC rate per-VM. The TSC rate is set at creation to the reference tsc rate. Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/include/asm/kvm_host.h |4 +++ arch/x86/kvm/kvm_timer.h| 14 +- arch/x86/kvm/x86.c | 49

[PATCH RFC: kvm tsc virtualization 16/20] Fix 32-bit mult_precise

2009-12-14 Thread Zachary Amsden
Turns out it wasn't very precise; it needs to work on 64-bit values. Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/kvm/x86.c | 18 +++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 7e2ba3e..792c895

[PATCH RFC: kvm tsc virtualization 17/20] Periodically measure TSC skew

2009-12-14 Thread Zachary Amsden
Resync all CPUs to measure TSC skew periodically. Use the measured skew to adjust the resync time (not done yet - heuristic needed) Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/kvm/x86.c | 93 ++-- 1 files changed, 90

[PATCH RFC: kvm tsc virtualization 11/20] Use highest TSC frequency as reference clock

2009-12-14 Thread Zachary Amsden
If CPU frequency governors can change the TSC frequency, use the highest possible frequency as the reference. Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/kvm/x86.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c

[PATCH RFC: kvm tsc virtualization 03/20] TSC offset framework

2009-12-14 Thread Zachary Amsden
Add the framework for a preliminary way to cope with CPUs which have different TSC offsets from each other. The TSC delta is measured (in cross-cache-directions for highest accuracy) and stored. Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/kvm/x86.c | 202

[PATCH RFC: kvm tsc virtualization 04/20] Synchronize TSC when a new CPU comes up

2009-12-14 Thread Zachary Amsden
The loop is written to only work when one master and one slave enter simultaneously, so properly protect it, and call it when adding new CPUs. Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/kvm/x86.c | 43 --- 1 files changed, 32

[PATCH RFC: kvm tsc virtualization 12/20] Higher accuracy TSC offset computation

2009-12-14 Thread Zachary Amsden
Use per-cpu delta counters and statistically eliminate outliers which might happen due to platform anomalies such as NMI. Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/kvm/x86.c | 100 +--- 1 files changed, 71 insertions(+), 29

[PATCH RFC: kvm tsc virtualization 08/20] Export the reference TSC from KVM module

2009-12-14 Thread Zachary Amsden
KVM now maintains a reference TSC, which can be exported to the individual backends for private use. Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/kvm/x86.c | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86.c

[PATCH RFC: kvm tsc virtualization 07/20] Basic SVM implementation of RDTSC trapping.

2009-12-14 Thread Zachary Amsden
Add a dumb version of RDTSC trapping for SVM which just passes through the hardware counter. Signed-off-by: Zachary Amsden zams...@redhat.com --- arch/x86/kvm/emulate.c |2 +- arch/x86/kvm/svm.c | 15 +++ 2 files changed, 16 insertions(+), 1 deletions(-) diff --git

[PATCH RFC: kvm tsc virtualization 06/20] Make TSC reference stable across frequency changes

2009-12-14 Thread Zachary Amsden
Add the full infrastructure for dealing with dynamic TSC frequency changes. The only way to properly deal with this is to disable hardware virtualization during a CPU frequency event; this is possible because the CPU frequency module will call before and after a change. In that case, we simply

[PATCH RFC: kvm tsc virtualization 05/20] Fix AMD C1 TSC desynchronization

2009-12-14 Thread Zachary Amsden
Some AMD based machines can have TSC drift when in C1 HLT state because despite attempting to scale the TSC increment when dividing down the P-state, the processor may return to full P-state to service cache probes. This causes unpredictable TSC drift on these machines. We implement a recommended

[PATCH RFC: kvm tsc virtualization 02/20] Add a hotplug notifier to KVM x86 backend

2009-12-14 Thread Zachary Amsden
Using a hotplug notifier here gives us direct control for getting the clock rate, which might be different on power-up. This eliminates a check from the hot path of entering hardware virtualization, and is a cleaner way to do things. The notifier must be last, so the cpufreq code has a chance to

[PATCH] KVM: VMX: Trap and invalid MWAIT/MONITOR instruction

2009-12-14 Thread Sheng Yang
We don't support these instructions, but guest can execute them even if the feature('monitor') haven't been exposed in CPUID. So we would trap and inject a #UD if guest try this way. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/include/asm/vmx.h |1 + arch/x86/kvm/vmx.c

[PATCH] KVM: VMX: Trap and invalid MWAIT/MONITOR instruction

2009-12-14 Thread Sheng Yang
We don't support these instructions, but guest can execute them even if the feature('monitor') haven't been exposed in CPUID. So we would trap and inject a #UD if guest try this way. Signed-off-by: Sheng Yang sh...@linux.intel.com --- arch/x86/include/asm/vmx.h |1 + arch/x86/kvm/vmx.c

Re: [PATCH] KVM: VMX: Trap and invalid MWAIT/MONITOR instruction

2009-12-14 Thread Alexander Graf
On 15.12.2009, at 06:29, Sheng Yang wrote: We don't support these instructions, but guest can execute them even if the feature('monitor') haven't been exposed in CPUID. So we would trap and inject a #UD if guest try this way. Wouldn't it be a lot better to emulate them? I actually have

[COMMIT master] Merge branch 'upstream-merge'

2009-12-14 Thread Avi Kivity
From: Avi Kivity a...@redhat.com * upstream-merge: (229 commits) Initialize apic before vcpu main loop Add S390 maintainer information Set default console to virtio on S390x S390 GDB stub Add S390x virtio machine bus Add S390x virtio machine description Add support for S390x system

[COMMIT master] vapic: fix alignment

2009-12-14 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Align the bios descriptor to 16 bytes (cosmetic) and the vptr to 128 bytes (worst case cache line). Signed-off-by: Avi Kivity a...@redhat.com diff --git a/pc-bios/optionrom/vapic.S b/pc-bios/optionrom/vapic.S index 1924eeb..afe98a9 100644 ---

[COMMIT master] tpr patching: defer post-migration load to vcpu context

2009-12-14 Thread Avi Kivity
From: Avi Kivity a...@redhat.com This makes sure the cpu state is properly loaded. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kvm-tpr-opt.c b/kvm-tpr-opt.c index 89256d4..bf9c9a0 100644 --- a/kvm-tpr-opt.c +++ b/kvm-tpr-opt.c @@ -233,7 +233,7 @@ static int get_pcr_cpu(CPUState *env)

[COMMIT master] Merge branch 'upstream-merge'

2009-12-14 Thread Avi Kivity
From: Avi Kivity a...@redhat.com * upstream-merge: (134 commits) target-alpha: Fix double log_cpu_state. target-alpha: Fix FMOV. target-alpha: Expand ins*h inline. target-alpha: Expand msk*h inline. target-alpha: Expand msk*l inline. target-alpha: Expand ins*l inline. target-alpha:

[COMMIT master] Revert Temporarily avoid loading pxe option roms

2009-12-14 Thread Avi Kivity
From: Avi Kivity a...@redhat.com This reverts commit b496fe34317ead61cf5ae019506fadc8f9ad6556. Seabios fixes/workarounds now allow gpxe to work. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/hw/loader.c b/hw/loader.c index b1827a7..2d7a2c4 100644 --- a/hw/loader.c +++ b/hw/loader.c @@

[COMMIT master] Fix mismerge in cpu_post_load

2009-12-14 Thread Avi Kivity
From: Jan Kiszka jan.kis...@siemens.com Merge 8e2c5ec2f6 forgot to restore some qemu-kvm-specific hooks in cpu_post_load. mp_state was readded later on, but tsc was missing, breaking the guest timing after resume. Also, reset of halt was dropped which is obviously required for in-kernel irqchip.

[COMMIT master] KVM: MMU: remove prefault from invlpg handler

2009-12-14 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com The invlpg prefault optimization breaks Windows 2008 R2 occasionally. The visible effect is that the invlpg handler instantiates a pte which is, microseconds later, written with a different gfn by another vcpu. The OS could have other mechanisms to