[COMMIT master] test: make x86/vm.c support 32-bit guests

2010-06-09 Thread Avi Kivity
From: Asias He asias.he...@gmail.com Signed-off-by: Asias He asias.he...@gmail.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kvm/test/x86/vm.c b/kvm/test/x86/vm.c index ec9c145..c9876e5 100644 --- a/kvm/test/x86/vm.c +++ b/kvm/test/x86/vm.c @@ -1,11 +1,16 @@ - #include vm.h - -void

[COMMIT master] test: vmexit: enable NX

2010-06-09 Thread Avi Kivity
From: Marcelo Tosatti mtosa...@redhat.com Enable NX to disable MSR autoload/save. This is the common case anyway. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kvm/test/x86/vmexit.c b/kvm/test/x86/vmexit.c index c3a01e0..731316b 100644

[COMMIT master] Print a user-friendly message on failed vmentry

2010-06-09 Thread Avi Kivity
From: Mohammed Gamal m.gamal...@gmail.com This patch address bug report in https://bugs.launchpad.net/qemu/+bug/530077. Failed vmentries were handled with handle_unhandled() which prints a rather unfriendly message to the user. This patch separates handling vmentry failures from unknown exit

[COMMIT master] KVM: VMX: fix rcu usage warning in init_rmode()

2010-06-09 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com fix: [ INFO: suspicious rcu_dereference_check() usage. ] --- include/linux/kvm_host.h:258 invoked rcu_dereference_check() without protection! other info that might help us debug this:

[COMMIT master] KVM: MMU: remove unnecessary remote tlb flush

2010-06-09 Thread Avi Kivity
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com This remote tlb flush is no necessary since we have synced while sp is zapped Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Gerd Hoffmann
On 06/09/10 04:40, Anthony Liguori wrote: On 06/08/2010 09:30 PM, Paul Brook wrote: The offset given to a block created via qemu_ram_alloc/map() is arbitrary, let the caller specify a name so we can make a positive match. @@ -1924,7 +1925,9 @@ static int pci_add_option_rom(PCIDevice *pdev) +

RE: [RFC PATCH v7 11/19] Use callback to deal with skb_release_data() specially.

2010-06-09 Thread Xin, Xiaohui
-Original Message- From: Eric Dumazet [mailto:eric.duma...@gmail.com] Sent: Saturday, June 05, 2010 10:56 PM To: Xin, Xiaohui Cc: net...@vger.kernel.org; kvm@vger.kernel.org; linux-ker...@vger.kernel.org; m...@redhat.com; mi...@elte.hu; da...@davemloft.net; herb...@gondor.apana.org.au;

RE: [RFC PATCH v7 08/19] Make __alloc_skb() to get external buffer.

2010-06-09 Thread Xin, Xiaohui
-Original Message- From: Eric Dumazet [mailto:eric.duma...@gmail.com] Sent: Saturday, June 05, 2010 10:53 PM To: Xin, Xiaohui Cc: net...@vger.kernel.org; kvm@vger.kernel.org; linux-ker...@vger.kernel.org; m...@redhat.com; mi...@elte.hu; da...@davemloft.net; herb...@gondor.apana.org.au;

[RFC PATCH 1/2] kvm: rename gfn_to_pfn() etc.

2010-06-09 Thread Lai Jiangshan
gfn_to_pfn() does actually increase the reference of the page. But gfn_to_pfn is questionable, it misses this semantic. So we rename it to kvm_get_pfn_for_gfn() which make more sense. gfn_to_page() and hva_to_pfn() are also renamed. This patch also add a write parameter, thus we can just pin a

[RFC PATCH 2/2] kvm, x86: use ro page and don't copy shared page

2010-06-09 Thread Lai Jiangshan
When page fault, we always call get_user_pages(write=1). Actually, we don't need to do this when it is not write fault. get_user_pages(write=1) will cause shared page(ksm) copied. If this page is not modified in future, this copying and the copied page are just wasted. Ksm may scan and merge them

Re: [RFC PATCH 2/6] ram_blocks: Convert to a QLIST

2010-06-09 Thread Juan Quintela
Alex Williamson alex.william...@redhat.com wrote: On Tue, 2010-06-08 at 14:26 -0700, Chris Wright wrote: * Alex Williamson (alex.william...@redhat.com) wrote: extern int phys_ram_fd; -extern uint8_t *phys_ram_dirty; extern ram_addr_t ram_size; -extern ram_addr_t last_ram_offset; +

Re: Live Migration of 32-bit Linux guest broken since 2.6.35-rc2

2010-06-09 Thread Peter Lieven
Avi Kivity wrote: On 06/08/2010 04:44 PM, Peter Lieven wrote: -cpu host is good if you have identical machines and don't plan to add new ones. i will likely add new ones, but my plan would be to use qemu64 and then add all flags manually that are common to all cpus in the pool. would that

RE: [RFC PATCH v7 01/19] Add a new structure for skb buffer from external.

2010-06-09 Thread Xin, Xiaohui
-Original Message- From: Stephen Hemminger [mailto:shemmin...@vyatta.com] Sent: Monday, June 07, 2010 7:14 AM To: Xin, Xiaohui Cc: net...@vger.kernel.org; kvm@vger.kernel.org; linux-ker...@vger.kernel.org; m...@redhat.com; mi...@elte.hu; da...@davemloft.net; herb...@gondor.apana.org.au;

Re: KSM For All Via LD_PRELOAD?

2010-06-09 Thread Dor Laor
On 06/08/2010 09:43 PM, Gordan Bobic wrote: Is this plausible? I'm trying to work out if it's even worth considering this approach to enable all memory used by in a system to be open to KSM page merging, rather than only memory used by specific programs aware of it (e.g. kvm/qemu). Something

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Avi Kivity
On 06/09/2010 06:30 AM, Zhang, Yanmin wrote: From: Zhang, Yanminyanmin_zh...@linux.intel.com Based on Ingo's idea, I implement a para virt interface for perf to support statistics collection in guest os. That means we could run tool perf in guest os directly. Great thanks to Peter Zijlstra. He

[no subject]

2010-06-09 Thread Wolfgang Lendl
unsubscribe -- Wolfgang Lendl IT Systems Communications Medizinische Universität Wien Spitalgasse 23 / BT 88 /Ebene 00 A-1090 Wien Tel: +43 1 40160-21231 Fax: +43 1 40160-921200 http://www.meduniwien.ac.at/itsc -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

RE: [RFC PATCH v7 01/19] Add a new structure for skb buffer from external.

2010-06-09 Thread Xin, Xiaohui
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Andi Kleen Sent: Monday, June 07, 2010 3:51 PM To: Stephen Hemminger Cc: Xin, Xiaohui; net...@vger.kernel.org; kvm@vger.kernel.org; linux-ker...@vger.kernel.org; m...@redhat.com;

Re: KSM For All Via LD_PRELOAD?

2010-06-09 Thread Paolo Bonzini
On 06/09/2010 10:33 AM, Dor Laor wrote: What I'm thinking about is somehow intercepting malloc() and wrapping it so that all malloc()-ed memory gets madvise()-d as well. You can also operate at a lower level and intercept mmap and brk, not malloc. (But see below). Or is this too crazy an

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Avi Kivity
On 06/09/2010 06:30 AM, Zhang, Yanmin wrote: From: Zhang, Yanminyanmin_zh...@linux.intel.com Based on Ingo's idea, I implement a para virt interface for perf to support statistics collection in guest os. That means we could run tool perf in guest os directly. Great thanks to Peter Zijlstra. He

Re: [RFC PATCH 00/23] Kemari for KVM v0.1.1

2010-06-09 Thread Yoshiaki Tamura
Hi, I rebased the patch series to the head of both qemu.git (26ebe46848ecb2462cc53d4de20ac6590709643b) and qemu-kvm.git (3f505ec990599aeb960ed7031a2bb7b233ea4927). The repository contains branches for both tree. git://kemari.git.sourceforge.net/gitroot/kemari/kemari Patches for qemu.git are in

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Zhang, Yanmin
On Wed, 2010-06-09 at 11:33 +0300, Avi Kivity wrote: On 06/09/2010 06:30 AM, Zhang, Yanmin wrote: From: Zhang, Yanminyanmin_zh...@linux.intel.com Based on Ingo's idea, I implement a para virt interface for perf to support statistics collection in guest os. That means we could run tool

RE: [RFC PATCH v7 01/19] Add a new structure for skb buffer from external.

2010-06-09 Thread Xin, Xiaohui
-Original Message- From: Mitchell Erblich [mailto:erbli...@earthlink.net] Sent: Monday, June 07, 2010 4:17 PM To: Andi Kleen Cc: Stephen Hemminger; Xin, Xiaohui; net...@vger.kernel.org; kvm@vger.kernel.org; linux-ker...@vger.kernel.org; m...@redhat.com; mi...@elte.hu;

Re: [RFC PATCH 2/2] kvm, x86: use ro page and don't copy shared page

2010-06-09 Thread Avi Kivity
On 06/09/2010 10:53 AM, Lai Jiangshan wrote: When page fault, we always call get_user_pages(write=1). Actually, we don't need to do this when it is not write fault. get_user_pages(write=1) will cause shared page(ksm) copied. If this page is not modified in future, this copying and the copied

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Zhang, Yanmin
On Wed, 2010-06-09 at 11:59 +0300, Avi Kivity wrote: On 06/09/2010 06:30 AM, Zhang, Yanmin wrote: From: Zhang, Yanminyanmin_zh...@linux.intel.com Based on Ingo's idea, I implement a para virt interface for perf to support statistics collection in guest os. That means we could run tool

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Avi Kivity
On 06/09/2010 12:21 PM, Zhang, Yanmin wrote: One thing that's missing is documentation of the guest/host ABI. It will be a requirement for inclusion, but it will also be a great help for review, so please provide it ASAP. I will add such document. It will includes: 1) Data struct

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Avi Kivity
On 06/09/2010 12:30 PM, Zhang, Yanmin wrote: On Wed, 2010-06-09 at 11:59 +0300, Avi Kivity wrote: On 06/09/2010 06:30 AM, Zhang, Yanmin wrote: From: Zhang, Yanminyanmin_zh...@linux.intel.com Based on Ingo's idea, I implement a para virt interface for perf to support statistics

RE: [RFC PATCH v7 01/19] Add a new structure for skb buffer from external.

2010-06-09 Thread Xin, Xiaohui
-Original Message- From: Herbert Xu [mailto:herb...@gondor.apana.org.au] Sent: Tuesday, June 08, 2010 1:28 PM To: Stephen Hemminger Cc: Xin, Xiaohui; net...@vger.kernel.org; kvm@vger.kernel.org; linux-ker...@vger.kernel.org; m...@redhat.com; mi...@elte.hu; da...@davemloft.net;

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Peter Zijlstra
On Wed, 2010-06-09 at 12:41 +0300, Avi Kivity wrote: Disabling the watchdog is unfortunate. Why is it necessary? perf always uses NMI, so we disable the nmi_watchdog when a perf_event is set up in case they might have impact. Ok. Is that the case for the hardware pmus as

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Ingo Molnar
* Peter Zijlstra pet...@infradead.org wrote: On Wed, 2010-06-09 at 12:41 +0300, Avi Kivity wrote: Disabling the watchdog is unfortunate. Why is it necessary? perf always uses NMI, so we disable the nmi_watchdog when a perf_event is set up in case they might have impact.

[Autotest][PATCH] KVM Test: Support netdev parameter in make_qemu_command.

2010-06-09 Thread Feng Yang
If qemu support netdev parameter, It will be added to qemu command line by default. Signed-off-by: Feng Yang fy...@redhat.com --- client/tests/kvm/kvm_vm.py | 19 ++- 1 files changed, 14 insertions(+), 5 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py

Re: KSM For All Via LD_PRELOAD?

2010-06-09 Thread Gordan Bobic
On 06/09/2010 09:56 AM, Paolo Bonzini wrote: Or is this too crazy an idea? It should work. Note that the the malloced memory should be aligned in order to get better sharing. Within glibc malloc large blocks are mmaped, so they are automatically aligned. Effective sharing of small blocks

Re: [PATCH] megasas: Update to version 1.01

2010-06-09 Thread Nicholas A. Bellinger
On Wed, 2010-06-09 at 03:14 -0700, Nicholas A. Bellinger wrote: On Tue, 2010-06-08 at 16:15 +0200, Hannes Reinecke wrote: This patch updates the megasas HBA emulation to version 1.01. It fixes the following issues: - Remove hand-crafted inquiry command - Remove bounce-buffer for direct

Re: [RFC][PATCH 1/3] Introduce a workqueue to deliver PIT timer interrupts.

2010-06-09 Thread Avi Kivity
On 06/08/2010 08:55 PM, Chris Lalancette wrote: We really want to kvm_set_irq during the hrtimer callback, but that is risky because that is during interrupt context. Instead, offload the work to a workqueue, which is a bit safer and should provide most of the same functionality. +static

Re: [RFC][PATCH 3/3] In DM_LOWEST, only deliver interrupts to vcpus with enabled LAPIC's

2010-06-09 Thread Gleb Natapov
On Tue, Jun 08, 2010 at 01:55:03PM -0400, Chris Lalancette wrote: Otherwise we might try to deliver a timer interrupt to a cpu that can't possibly handle it. Signed-off-by: Chris Lalancette clala...@redhat.com --- virt/kvm/irq_comm.c |2 +- 1 files changed, 1 insertions(+), 1

Re: [RFC][PATCH 0/3]: Fixes to IRQ routing

2010-06-09 Thread Avi Kivity
On 06/08/2010 08:55 PM, Chris Lalancette wrote: As we've discussed previously, here is a series of patches to fix some of the IRQ routing issues we have in KVM. With this series in place I was able to successfully kdump a RHEL-5 64-bit, and RHEL-6 32- and 64-bit guest on CPU's other than the

Re: [PATCH V2] VFIO driver: Non-privileged user level PCI drivers

2010-06-09 Thread Avi Kivity
On 06/09/2010 12:21 AM, Tom Lyon wrote: The VFIO driver is used to allow privileged AND non-privileged processes to implement user-level device drivers for any well-behaved PCI, PCI-X, and PCIe devices. Signed-off-by: Tom Lyonp...@cisco.com --- This version now requires an IOMMU domain

Re: kvm test: vmexit: enable NX

2010-06-09 Thread Avi Kivity
On 06/08/2010 09:33 PM, Marcelo Tosatti wrote: Enable NX to disable MSR autoload/save. This is the common case anyway. Applied, 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

Re: [RFC][PATCH 3/3] In DM_LOWEST, only deliver interrupts to vcpus with enabled LAPIC's

2010-06-09 Thread Avi Kivity
On 06/09/2010 02:01 PM, Gleb Natapov wrote: On Tue, Jun 08, 2010 at 01:55:03PM -0400, Chris Lalancette wrote: Otherwise we might try to deliver a timer interrupt to a cpu that can't possibly handle it. Signed-off-by: Chris Lalancetteclala...@redhat.com --- virt/kvm/irq_comm.c |2 +-

Re: [PATCH] megasas: Update to version 1.01

2010-06-09 Thread Nicholas A. Bellinger
On Wed, 2010-06-09 at 12:32 +0200, Hannes Reinecke wrote: Nicholas A. Bellinger wrote: Hi Hannes, I applied your changes and everything looks good with the exception of the new MEGASAS_DEFAULT_SGE=80 setting.. diff --git a/hw/megasas.c b/hw/megasas.c index 250c3fb..19569a8 100644

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Avi Kivity
On 06/09/2010 01:08 PM, Peter Zijlstra wrote: On Wed, 2010-06-09 at 12:41 +0300, Avi Kivity wrote: Disabling the watchdog is unfortunate. Why is it necessary? perf always uses NMI, so we disable the nmi_watchdog when a perf_event is set up in case they might have impact.

Re: [RFC][PATCH 3/3] In DM_LOWEST, only deliver interrupts to vcpus with enabled LAPIC's

2010-06-09 Thread Gleb Natapov
On Wed, Jun 09, 2010 at 02:08:31PM +0300, Avi Kivity wrote: On 06/09/2010 02:01 PM, Gleb Natapov wrote: On Tue, Jun 08, 2010 at 01:55:03PM -0400, Chris Lalancette wrote: Otherwise we might try to deliver a timer interrupt to a cpu that can't possibly handle it. Signed-off-by: Chris

Re: [RFC][PATCH 3/3] In DM_LOWEST, only deliver interrupts to vcpus with enabled LAPIC's

2010-06-09 Thread Avi Kivity
On 06/09/2010 02:20 PM, Gleb Natapov wrote: The apic still accepts some interrupts even if disabled, so this needs to be very conditional. What kind of interrupt and can they be delivered in DM_LOWEST mode? INIT, NMI, SMI, and SIPI. So no DM_LOWEST. -- error compiling

Re: [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Avi Kivity
On 06/09/2010 12:41 AM, Chris Wright wrote: pci. D.F. (B:D.F?) D:B:D.F bar rom bar.n -- 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

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Avi Kivity
On 06/09/2010 05:54 AM, Paul Brook wrote: On 06/08/2010 09:30 PM, Paul Brook wrote: The offset given to a block created via qemu_ram_alloc/map() is arbitrary, let the caller specify a name so we can make a positive match. @@ -1924,7 +1925,9 @@ static int pci_add_option_rom(PCIDevice

Re: applications running in KVM crashing?

2010-06-09 Thread Avi Kivity
On 06/09/2010 07:14 AM, Nikola Ciprich wrote: Hi, on two of my KVM machines, some applications started to crash. I'm not sure, but I think it might be related to some host update I've made recently. I also can't find any difference to guests, on which I don't see any such problems. It's usually

Re: [KVM-AUTOTEST PATCH v2 1/4] KVM test: support -kernel and -append command line options

2010-06-09 Thread Avi Kivity
On 06/09/2010 12:50 AM, Michael Goldish wrote: Signed-off-by: Michael Goldishmgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py b/client/tests/kvm/kvm_vm.py index

Re: [PATCH 3/3] KVM: MMU: delay local tlb flush

2010-06-09 Thread Avi Kivity
On 06/08/2010 03:07 PM, Xiao Guangrong wrote: delay local tlb flush until enter guest moden, it can reduce vpid flush frequency and reduce remote tlb flush IPI(if KVM_REQ_TLB_FLUSH bit is already set, IPI is not sent) Applied all, thanks. -- error compiling committee.c: too many arguments

Re: [PATCH V2] VFIO driver: Non-privileged user level PCI drivers

2010-06-09 Thread Arnd Bergmann
On Tuesday 08 June 2010, Randy Dunlap wrote: Documentation/ioctl/ioctl-number.txt |1 Documentation/vfio.txt | 177 +++ MAINTAINERS |7 drivers/Kconfig |2 drivers/Makefile |1

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Paul Brook
Not all ram is associated with a device. Maybe not, but where it is we should be using that information. Absolute minimum we should be using the existing qdev address rather than inventing a new one. Duplicating this logic inside every device seems like a bad idea so I suggest

Re: applications running in KVM crashing?

2010-06-09 Thread Nikola Ciprich
backtrace / disassembly of the failing instructions will help. Do the failures always occur in the same ip or random ips? Hi Avi, OK, I'll post is once I have it, but it can take few days... ips seem to remain the same, for same process (even across reboots): May 25 02:23:07 sql2

Re: [Qemu-devel] Re: [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Paul Brook
* Alex Williamson (alex.william...@redhat.com) wrote: +// XXX check duplicates Yes, definitely. You created a notion of a hierarchical namespace, can this be formalized any more? We already have one: The qdev tree. Paul -- To unsubscribe from this list: send the line unsubscribe kvm

Re: [PATCH 2/2] KVM: x86: pre-allocate one more dirty bitmap to avoid vmalloc() in kvm_vm_ioctl_get_dirty_log()

2010-06-09 Thread Avi Kivity
On 06/03/2010 04:06 PM, Takuya Yoshikawa wrote: Currently x86's kvm_vm_ioctl_get_dirty_log() needs to allocate a bitmap by vmalloc() which will be used in the next logging and this has been causing bad effects to VGA and live-migration: vmalloc() consumes extra systime, triggers tlb flush, etc.

Re: [RFC][PATCH 1/3] Introduce a workqueue to deliver PIT timer interrupts.

2010-06-09 Thread Marcelo Tosatti
On Tue, Jun 08, 2010 at 04:36:16PM -1000, Zachary Amsden wrote: +pt-timer.function = pit_timer_fn; I am happy to see this. I thought kvm_timer_fn was a step backwards; it was too general of a function to justify the savings of 20 some odd lines of code. This was not done to save 20

Re: [RFC][PATCH 1/3] Introduce a workqueue to deliver PIT timer interrupts.

2010-06-09 Thread Marcelo Tosatti
On Tue, Jun 08, 2010 at 01:55:01PM -0400, Chris Lalancette wrote: We really want to kvm_set_irq during the hrtimer callback, but that is risky because that is during interrupt context. Instead, offload the work to a workqueue, which is a bit safer and should provide most of the same

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Anthony Liguori
On 06/09/2010 06:58 AM, Avi Kivity wrote: On 06/09/2010 05:54 AM, Paul Brook wrote: On 06/08/2010 09:30 PM, Paul Brook wrote: The offset given to a block created via qemu_ram_alloc/map() is arbitrary, let the caller specify a name so we can make a positive match. @@ -1924,7 +1925,9 @@ static

Snapshots tool - usage whilst running ?

2010-06-09 Thread Julian Robbins
Hi I'm a KVM newbie; I've been using the new snapshots tool with libvirt0 0.8.0 But I found that I couldn't make good snapshots whilst the domain was running. When I tried, data was being created as the pool was getting bigger, but after 15 mins, I got an error 'error : server closed

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Paul Brook
Keep in mind, this has to be a stable string across versions of qemu since this is savevm/migration. Are we absolutely confident that the full qdev path isn't going to change? I'm more confident that a unique device name is going to be static across qemu versions. The actual representation

Re: [RFC][PATCH 1/3] Introduce a workqueue to deliver PIT timer interrupts.

2010-06-09 Thread Avi Kivity
On 06/09/2010 04:23 PM, Marcelo Tosatti wrote: Is there any chance that using a workqueue might help the problem of hrtimers firing too quickly? I wanted to return HR_NORESTART from pit_timer_fn always, then restart the hrtimer on delivery, but because of unreliable delivery, it wasn't clear

Re: [RFC][PATCH 1/3] Introduce a workqueue to deliver PIT timer interrupts.

2010-06-09 Thread Avi Kivity
On 06/09/2010 04:49 PM, Marcelo Tosatti wrote: Certain guests do not compensate for lost ticks (older RHEL3 for ex), and this completly reinjection. Perhaps you can increase the pending counter on pit_timer_fn, and reinject on ACK? Also, due to

Re: [RFC][PATCH 1/3] Introduce a workqueue to deliver PIT timer interrupts.

2010-06-09 Thread Marcelo Tosatti
On Wed, Jun 09, 2010 at 05:16:47PM +0300, Avi Kivity wrote: On 06/09/2010 04:23 PM, Marcelo Tosatti wrote: Is there any chance that using a workqueue might help the problem of hrtimers firing too quickly? I wanted to return HR_NORESTART from pit_timer_fn always, then restart the hrtimer on

Re: Live Migration of 32-bit Linux guest broken since 2.6.35-rc2

2010-06-09 Thread Avi Kivity
On 06/09/2010 11:29 AM, Peter Lieven wrote: Avi Kivity wrote: On 06/08/2010 04:44 PM, Peter Lieven wrote: -cpu host is good if you have identical machines and don't plan to add new ones. i will likely add new ones, but my plan would be to use qemu64 and then add all flags manually that are

Re: Live Migration of 32-bit Linux guest broken since 2.6.35-rc2

2010-06-09 Thread Gleb Natapov
On Wed, Jun 09, 2010 at 06:08:23PM +0300, Avi Kivity wrote: On 06/09/2010 11:29 AM, Peter Lieven wrote: Avi Kivity wrote: On 06/08/2010 04:44 PM, Peter Lieven wrote: -cpu host is good if you have identical machines and don't plan to add new ones. i will likely add new ones, but my plan

Re: [Qemu-devel] Re: KVM call minutes for June 8

2010-06-09 Thread Luiz Capitulino
On Tue, 08 Jun 2010 16:13:37 -0500 Anthony Liguori anth...@codemonkey.ws wrote: On 06/08/2010 03:59 PM, Luiz Capitulino wrote: Now, QError. This is something I think we should fix for 0.13. However, I still don't know how to get it right: most of what you say in the wiki page has

Re: [KVM-AUTOTEST PATCH v2 1/4] KVM test: support -kernel and -append command line options

2010-06-09 Thread Michael Goldish
On 06/09/2010 03:03 PM, Avi Kivity wrote: On 06/09/2010 12:50 AM, Michael Goldish wrote: Signed-off-by: Michael Goldishmgold...@redhat.com --- client/tests/kvm/kvm_vm.py | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/client/tests/kvm/kvm_vm.py

Re: [PATCH V2] VFIO driver: Non-privileged user level PCI drivers

2010-06-09 Thread Greg KH
On Wed, Jun 09, 2010 at 02:04:53PM +0300, Avi Kivity wrote: On 06/09/2010 12:21 AM, Tom Lyon wrote: The VFIO driver is used to allow privileged AND non-privileged processes to implement user-level device drivers for any well-behaved PCI, PCI-X, and PCIe devices. Signed-off-by: Tom

Re: [Qemu-devel] Re: KVM call minutes for June 8

2010-06-09 Thread Daniel P. Berrange
On Wed, Jun 09, 2010 at 12:18:20PM -0300, Luiz Capitulino wrote: On Tue, 08 Jun 2010 16:13:37 -0500 Anthony Liguori anth...@codemonkey.ws wrote: On 06/08/2010 03:59 PM, Luiz Capitulino wrote: Now, QError. This is something I think we should fix for 0.13. However, I still don't

RE: [RFC] Moving the kvm ioapic, pic, and pit back to userspace

2010-06-09 Thread Dong, Eddie
Avi Kivity wrote: I am currently investigating a problem with the a guest running Linux malfunctioning in the NMI watchdog code. The problem is that we don't handle NMI delivery mode for the local APIC LINT0 pin; instead we expect ExtInt deliver mode or that the line is disabled completely.

Re: [RFC] Moving the kvm ioapic, pic, and pit back to userspace

2010-06-09 Thread Avi Kivity
On 06/09/2010 06:59 PM, Dong, Eddie wrote: Besides VF IO interrupt and timer interrupt introduced performance overhead risk, VF usually uses MSI EOI message deliver from lapic to ioapic, Only for non-MSI which becomes in user land now, may have potential scalability issue. For

Re: [PATCH V2] VFIO driver: Non-privileged user level PCI drivers

2010-06-09 Thread Michael S. Tsirkin
On Tue, Jun 08, 2010 at 02:21:52PM -0700, Tom Lyon wrote: + case VFIO_DOMAIN_UNSET: + vfio_domain_unset(vdev); + ret = 0; + break; + What if I do: SET mmap UNSET Now I have access to device which is not behind an iommu. Simplest solution is to remove

Re: [Qemu-devel] Re: KVM call minutes for June 8

2010-06-09 Thread Anthony Liguori
On 06/09/2010 10:31 AM, Daniel P. Berrange wrote: However, libvirt was counting on this feature and on the snapshot commands to switch from the text Monitor. We have two options: 1. Ask them to wait one more release (not so good for us) 2. Try to find a way to have those features in for

Re: [Qemu-devel] Re: KVM call minutes for June 8

2010-06-09 Thread Anthony Liguori
On 06/09/2010 10:18 AM, Luiz Capitulino wrote: The big problem is things like the block io error events. I don't see how we can support that given what we have in 0.13. Putting errno on the wire is a bad idea. We need to marshal a QError object using the __class__ memory to identify it as

Re: [Qemu-devel] Re: KVM call minutes for June 8

2010-06-09 Thread Daniel P. Berrange
On Wed, Jun 09, 2010 at 11:22:55AM -0500, Anthony Liguori wrote: On 06/09/2010 10:31 AM, Daniel P. Berrange wrote: However, libvirt was counting on this feature and on the snapshot commands to switch from the text Monitor. We have two options: 1. Ask them to wait one more release

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Alex Williamson
On Wed, 2010-06-09 at 13:18 +0100, Paul Brook wrote: Not all ram is associated with a device. Maybe not, but where it is we should be using that information. Absolute minimum we should be using the existing qdev address rather than inventing a new one. Duplicating this logic

ssh into kvm-guests

2010-06-09 Thread brizly vaan van Ulciputz
Hello all, i don't know why i can not ssh-in into my kvm-guests from another physical machine. [all my machines/hosts/guests here are Fedora Core 13] i have a kvm-host, running several bridged guests, and the host itself is a openvpn-server, too. the kvm-guests can vpn-connect, other clients in

Re: [Qemu-devel] [RFC PATCH 2/6] ram_blocks: Convert to a QLIST

2010-06-09 Thread Cam Macdonell
On Tue, Jun 8, 2010 at 1:15 PM, Alex Williamson alex.william...@redhat.com wrote: This makes the RAM block list easier to manipulate.  Also incorporate relevant variables into the RAMList struct. Signed-off-by: Alex Williamson alex.william...@redhat.com ---  arch_init.c |   14 ++-  

Re: [PATCH] acpi_piix4: save gpe and pci hotplug slot status

2010-06-09 Thread Alex Williamson
nudge. Any comments here? On Wed, Jun 2, 2010 at 10:58 AM, Alex Williamson alex.william...@redhat.com wrote: PCI hotplug currently doesn't work after a migration because we don't migrate the enable bits of the GPE state.  Pull hotplug structs into vmstate. Signed-off-by: Alex Williamson

Re: [Qemu-devel] [PATCH v6 5/6] Inter-VM shared memory PCI device

2010-06-09 Thread Blue Swirl
On Mon, Jun 7, 2010 at 4:41 PM, Cam Macdonell c...@cs.ualberta.ca wrote: On Sat, Jun 5, 2010 at 3:44 AM, Blue Swirl blauwir...@gmail.com wrote: On Fri, Jun 4, 2010 at 9:45 PM, Cam Macdonell c...@cs.ualberta.ca wrote: Support an inter-vm shared memory device that maps a shared-memory object as

Re: [Qemu-devel] [PATCH 1/3] export tdb_hash()

2010-06-09 Thread Luiz Capitulino
On Tue, 8 Jun 2010 12:31:38 +0530 Prerna Saxena pre...@linux.vnet.ibm.com wrote: This exports tdb_hash() for use by tracing framework. Suggest to rename it (eg. qemu_hash()) and move it to a better location, qdict is not the best module to export such service. Signed-off-by: Prerna Saxena

Re: [Qemu-devel] [RFC PATCH 3/6] RAMBlock: Add a name field

2010-06-09 Thread Paul Brook
Not really. This identifier is device and bus independent, which is why I suggested passing the device to qemu_ram_alloc. This can then figure out how to the identify the device. It should probably do this the same way that we identify the saved state for the device. Currently I think

Re: [Qemu-devel] [PATCH 2/3] Monitor command 'trace'

2010-06-09 Thread Luiz Capitulino
On Tue, 8 Jun 2010 12:34:37 +0530 Prerna Saxena pre...@linux.vnet.ibm.com wrote: This introduces the monitor command 'trace' to read current contents of trace buffer. Signed-off-by: Prerna Saxena pre...@linux.vnet.ibm.com --- configure |3 +++ monitor.c |3 +++

Re: [Qemu-devel] [PATCH 3/3] Toggle tracepoint state

2010-06-09 Thread Luiz Capitulino
On Tue, 8 Jun 2010 12:38:58 +0530 Prerna Saxena pre...@linux.vnet.ibm.com wrote: This patch adds support for dynamically enabling/disabling of tracepoints. Monitor commands added : 1) info tracepoints : to view all available tracepoints and their

Re: [Qemu-devel] [RFC PATCH 2/6] ram_blocks: Convert to a QLIST

2010-06-09 Thread Alex Williamson
On Wed, 2010-06-09 at 14:11 -0600, Cam Macdonell wrote: On Tue, Jun 8, 2010 at 1:15 PM, Alex Williamson diff --git a/cpu-all.h b/cpu-all.h index 77eaf85..458cb4b 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -859,9 +859,21 @@ target_phys_addr_t cpu_get_phys_page_debug(CPUState *env,

Re: [Qemu-devel] [RFC PATCH 2/6] ram_blocks: Convert to a QLIST

2010-06-09 Thread Yoshiaki Tamura
2010/6/10 Alex Williamson alex.william...@redhat.com: On Wed, 2010-06-09 at 14:11 -0600, Cam Macdonell wrote: On Tue, Jun 8, 2010 at 1:15 PM, Alex Williamson diff --git a/cpu-all.h b/cpu-all.h index 77eaf85..458cb4b 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -859,9 +859,21 @@

GPGPU passthrough in linux kvm

2010-06-09 Thread Adhyas Avasthi
I read an old email thread which talked about GPGPU passthroughin linux-kvm. Was this implemented? If not, are there some quick hacks I can use to enable it in my tree? Right now, I try to follow the same commands as I do for NIC passthrough, but it complains that my device is busy. I have two

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Zhang, Yanmin
On Wed, 2010-06-09 at 12:41 +0300, Avi Kivity wrote: On 06/09/2010 12:21 PM, Zhang, Yanmin wrote: One thing that's missing is documentation of the guest/host ABI. It will be a requirement for inclusion, but it will also be a great help for review, so please provide it ASAP. I

RE: [RFC] Moving the kvm ioapic, pic, and pit back to userspace

2010-06-09 Thread Dong, Eddie
Avi Kivity wrote: On 06/09/2010 06:59 PM, Dong, Eddie wrote: Besides VF IO interrupt and timer interrupt introduced performance overhead risk, VF usually uses MSI Typo, I mean PV IO. A VF interrupt usually happens in 4-8KHZ. How about the virtio? I assume virtio will be widely used

Re: [RFC PATCH 2/2] kvm, x86: use ro page and don't copy shared page

2010-06-09 Thread Lai Jiangshan
Avi Kivity wrote: Wierd. For what gfn/pfns does this trigger? It is ZERO_PAGE which also has Reserved bit, not mmio page. The pte is set write-protected, I still don't know why it cause the system hangup. set_spte() { if (tdp_enabled) spte |=

Re: [RFC] Moving the kvm ioapic, pic, and pit back to userspace

2010-06-09 Thread Avi Kivity
On 06/10/2010 05:37 AM, Dong, Eddie wrote: Avi Kivity wrote: On 06/09/2010 06:59 PM, Dong, Eddie wrote: Besides VF IO interrupt and timer interrupt introduced performance overhead risk, VF usually uses MSI Typo, I mean PV IO. That also uses MSI these days. A

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Avi Kivity
On 06/10/2010 05:21 AM, Zhang, Yanmin wrote: I see. So put it in a union. Or perhaps not even in a union - what if a kvm guest is also acting as a kvm host? My patch has consideration on it. I compiled kernel with host and guest support at the same time. The accessing to

[PATCH 2/2] KVM: x86: XSAVE/XRSTOR live migration support

2010-06-09 Thread Sheng Yang
This patch enable save/restore of xsave state. Signed-off-by: Sheng Yang sh...@linux.intel.com --- Documentation/kvm/api.txt | 76 ++ arch/x86/include/asm/kvm.h | 24 ++ arch/x86/kvm/x86.c | 110

[PATCH v8 1/2] KVM: VMX: Enable XSAVE/XRSTOR for guest

2010-06-09 Thread Sheng Yang
From: Dexuan Cui dexuan@intel.com This patch enable guest to use XSAVE/XRSTOR instructions. We assume that host_xcr0 would use all possible bits that OS supported. And we loaded xcr0 in the same way we handled fpu - do it as late as we can. Signed-off-by: Dexuan Cui dexuan@intel.com

[PATCH 2/3] qemu: Enable XSAVE related CPUID

2010-06-09 Thread Sheng Yang
We can support it in KVM now. The 0xd leaf is queried from KVM. Signed-off-by: Sheng Yang sh...@linux.intel.com --- target-i386/cpuid.c | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c index fb78061..26e4054

[PATCH 1/3] qemu: kvm: Extend kvm_arch_get_supported_cpuid() to support index

2010-06-09 Thread Sheng Yang
Would use it later for XSAVE related CPUID. Signed-off-by: Sheng Yang sh...@linux.intel.com --- kvm.h |2 +- target-i386/kvm.c | 19 +++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/kvm.h b/kvm.h index aab5118..16b06a4 100644 --- a/kvm.h +++

[PATCH 3/3] qemu: kvm: Enable XSAVE live migration support

2010-06-09 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- qemu-kvm-x86.c| 114 qemu-kvm.c| 24 ++ qemu-kvm.h| 28 target-i386/cpu.h |6 +++ target-i386/machine.c | 21 + 5 files

[PATCH 2/2] test: Add XSAVE unit test

2010-06-09 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- kvm/test/config-x86-common.mak |2 + kvm/test/config-x86_64.mak |3 +- kvm/test/x86/xsave.c | 263 3 files changed, 267 insertions(+), 1 deletions(-) create mode 100644

[PATCH 1/2] test: Add IDT framework

2010-06-09 Thread Sheng Yang
Signed-off-by: Sheng Yang sh...@linux.intel.com --- kvm/test/config-x86-common.mak |2 + kvm/test/config-x86_64.mak |2 +- kvm/test/lib/x86/idt.h | 19 + kvm/test/x86/idt.c | 85 kvm/test/x86/idt_test.c|

Re: [PATCH 2/2] KVM: x86: pre-allocate one more dirty bitmap to avoid vmalloc() in kvm_vm_ioctl_get_dirty_log()

2010-06-09 Thread Takuya Yoshikawa
On Wed, 09 Jun 2010 16:11:34 +0300 Avi Kivity a...@redhat.com wrote: Looks good in general. Note: Though this patch introduces some ifdefs, we tried not to mixing these with other parts to keep the code as clean as possible. What's the reason for that? Can't you update

Re: [RFC] para virt interface of perf to support kvm guest os statistics collection in guest os

2010-06-09 Thread Zhang, Yanmin
On Thu, 2010-06-10 at 06:06 +0300, Avi Kivity wrote: On 06/10/2010 05:21 AM, Zhang, Yanmin wrote: I see. So put it in a union. Or perhaps not even in a union - what if a kvm guest is also acting as a kvm host? My patch has consideration on it. I compiled kernel with host and