Re: [kvm-devel] KVM architecture docs

2008-03-04 Thread Avi Kivity
Zhao Forrest wrote: http://ols.108.redhat.com/2007/Reprints/kivity-Reprint.pdf Hi Avi, I have a question about KVM architecture after reading your paper. It reads: .. At the kernel level, the kernel causes the hardware to enter guest mode. If the processor exits guest mode due

Re: [kvm-devel] use smp_cpus as lapic id

2008-03-04 Thread Avi Kivity
Glauber Costa wrote: apic is not acpi, although they are acronyms. Due to a confusion of mine, those things were mixed, leading to a bug reported at https://sourceforge.net/tracker/index.php?func=detailaid=1903732group_id=180599atid=893831 This patch fixes it, by assigning smp_cpus

[kvm-devel] 11s softlockup and hang with kvm on 2.6.24.3

2008-03-04 Thread Paul Collins
Running kvm 62 on 2.6.24.3 (the extraversion is reported due to a local patch to vfat) I just got a couple of soft lockups and a hang. I was installing FreeBSD 7 at the time. I am trying again with v2.6.25-rc3-369-g976dde0. Here are the wossnames. Mar 4 21:20:12 burly kernel: BUG: soft

Re: [kvm-devel] KVM architecture docs

2008-03-04 Thread Zhao Forrest
Thanks for your detailed explanation :). That's quite helpful for me to understand KVM internals. If this is the case, see the below example: 1 physical NIC interrupt is received on physical CPU 0 and host kernel determines that this is a network packet targeted to the emulated NIC for a

Re: [kvm-devel] KVM architecture docs

2008-03-04 Thread Avi Kivity
Zhao Forrest wrote: The incoming packet is processed by the host ethernet stack; it is forwarded to the bridge, which forwards it to the tap. When the tap queues the packet, it sends a signal to qemu (since the tap file descriptor has a signal associated). When the kernel delivers the

Re: [kvm-devel] 11s softlockup and hang with kvm on 2.6.24.3

2008-03-04 Thread Avi Kivity
Paul Collins wrote: Running kvm 62 on 2.6.24.3 (the extraversion is reported due to a local patch to vfat) I just got a couple of soft lockups and a hang. I was installing FreeBSD 7 at the time. Mar 4 21:20:13 burly kernel: Call Trace: Mar 4 21:20:13 burly kernel: [8024b60e]

Re: [kvm-devel] [PATCH 4/8] KVM: MMU: hypercall based pte updates and TLB flushes

2008-03-04 Thread Avi Kivity
Marcelo Tosatti wrote: Hi Avi, Looks nice. On Sun, Mar 02, 2008 at 06:31:17PM +0200, Avi Kivity wrote: +int kvm_pv_mmu_op(struct kvm_vcpu *vcpu, unsigned long bytes, + gpa_t addr, unsigned long *ret) +{ +int r; +struct kvm_pv_mmu_op_buffer buffer; Perhaps

Re: [kvm-devel] [PATCH 4/8] KVM: MMU: hypercall based pte updates and TLB flushes

2008-03-04 Thread Avi Kivity
Avi Kivity wrote: As the patchset (less cr3 caching) passed the regression tests I'll apply it. Forgot about the unresolved CONFIG_HIGHPTE problem, so not applying for now. -- error compiling committee.c: too many arguments to function

[kvm-devel] [PATCH 1/6] KVM: In kernel pit model

2008-03-04 Thread Yang, Sheng
From f389ff3bc38b1684f15d8073c6d9abd2f2c9 Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Mon, 28 Jan 2008 05:10:22 +0800 Subject: [PATCH] KVM: In kernel pit model The patch moved PIT from userspace to kernel, and increase the timer accuracy greatly. Signed-off-by: Sheng

[kvm-devel] [PATCH 6/6] kvm: qemu: Add save/restore support for in kernel PIT

2008-03-04 Thread Yang, Sheng
From 22b56da8fe8f8e7d38075956bef9205f1dab829d Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Tue, 4 Mar 2008 09:45:16 +0800 Subject: [PATCH] kvm: qemu: Add save/restore support for in kernel PIT Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- qemu/hw/i8254.c | 73

[kvm-devel] [PATCH 0/6] In kernel PIT patch

2008-03-04 Thread Yang, Sheng
Hi Here is the last in-kernel PIT patch for KVM. The mainly change from last version is the supporting to save/restore. I also tested live migration. The other modifies including some date structure changed to be better for supporting the save/restore. I moved the PIT timer to outside of

[kvm-devel] [PATCH 5/6] kvm: libkvm: Add interface for PIT save/restore supporting

2008-03-04 Thread Yang, Sheng
From 79f06bc838534fc916f9ca90f89b7778b8e64dfe Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Tue, 4 Mar 2008 09:42:27 +0800 Subject: [PATCH] kvm: libkvm: Add interface for PIT save/restore supporting Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- libkvm/libkvm-x86.c | 30

[kvm-devel] [PATCH 4/6] KVM: Add save/restore supporting of in kernel PIT

2008-03-04 Thread Yang, Sheng
From ac2c08ee7a3bcceb8dede74d0d8f1dce0fea8956 Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Tue, 4 Mar 2008 08:50:59 +0800 Subject: [PATCH] KVM: Add save/restore supporting of in kernel PIT Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- arch/x86/kvm/i8254.c |7 +++

Re: [kvm-devel] 11s softlockup and hang with kvm on 2.6.24.3

2008-03-04 Thread Paul Collins
Avi Kivity [EMAIL PROTECTED] writes: Paul Collins wrote: Running kvm 62 on 2.6.24.3 (the extraversion is reported due to a local patch to vfat) I just got a couple of soft lockups and a hang. I was installing FreeBSD 7 at the time. Mar 4 21:20:13 burly kernel: Call Trace: Mar 4 21:20:13

[kvm-devel] [PATCH 2/6] kvm: libkvm: Add Supporting for in-kernel PIT model

2008-03-04 Thread Yang, Sheng
From da231cf5bb50310b4b98cc4b58370723b8e3f65d Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Sun, 27 Jan 2008 11:25:29 +0800 Subject: [PATCH] kvm: libkvm: Add Supporting for in-kernel PIT model Signed-off-by: Sheng Yang [EMAIL PROTECTED] --- kernel/Kbuild |2 +-

[kvm-devel] Stop the clock!

2008-03-04 Thread Avi Kivity
With paravirt clocksource, reboot and kexec are broken: the clock keeps updating after the reboot, and the new kernel will have a random memory location trampled occasionally. So we need to stop the clock on kexec (in the guest) and reboot (in the host). On the host side, this can be done

Re: [kvm-devel] KVM Test result, kernel daf4de3.., userspace 724f8a9.. One new issue

2008-03-04 Thread Avi Kivity
Yunfeng Zhao wrote: Hi, all, This is today's KVM test result against kvm.git daf4de30ec718b16798aba07e9f25fd9e6ba9e53 and kvm-userspace.git 724f8a940ec0e78e607c051e6e82ca2f5055b1e1. In today's testing , save/restore crashed host once on pae/ia32e hosts. One new issue has been found:

Re: [kvm-devel] The SMP RHEL 5.1 PAE guest can't boot up issue

2008-03-04 Thread Avi Kivity
Avi Kivity wrote: Dong, Eddie wrote: I don't know if the patch was still needed now, since it was posted long ago(I don't know which issue it solved). I'd like to post a revert patch if necessary. I believe the patch is still necessary, since we still need to guarantee that a vcpu's

Re: [kvm-devel] Stop the clock!

2008-03-04 Thread Glauber Costa
Avi Kivity wrote: With paravirt clocksource, reboot and kexec are broken: the clock keeps updating after the reboot, and the new kernel will have a random memory location trampled occasionally. So we need to stop the clock on kexec (in the guest) and reboot (in the host). On the host

Re: [kvm-devel] [PATCH] KVM swapping with mmu notifiers #v9

2008-03-04 Thread Andrea Arcangeli
Hello Izik, On Tue, Mar 04, 2008 at 02:44:07AM +0200, Izik Eidus wrote: i wrote to you about this before (i didnt get answer for this so i write Ouch I must have lost your previous comment with a too-fast pgdown in the full quoting of the patch sorry. again) with large pages support i think

Re: [kvm-devel] [PATCH 3/6] kvm: qemu: Add option for enable/disable in kernel PIT

2008-03-04 Thread Uri Lublin
Yang, Sheng wrote: From 40cf60009d1031891a34685b690dad47290a0b04 Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Tue, 4 Mar 2008 09:29:55 +0800 Subject: [PATCH] kvm: qemu: Add option for enable/disable in kernel PIT diff --git a/libkvm/libkvm-x86.c b/libkvm/libkvm-x86.c

Re: [kvm-devel] [RFC] Notifier for Externally Mapped Memory (EMM)

2008-03-04 Thread Andrea Arcangeli
On Mon, Mar 03, 2008 at 11:31:15PM -0800, Christoph Lameter wrote: @@ -446,6 +450,8 @@ static int page_mkclean_one(struct page if (address == -EFAULT) goto out; + /* rmap lock held */ + emm_notify(mm, emm_invalidate_start, address, address + PAGE_SIZE);

Re: [kvm-devel] KVM architecture docs

2008-03-04 Thread Javier Guerra
On 3/4/08, Avi Kivity [EMAIL PROTECTED] wrote: apply to kvm guests. With mmu notifiers, the trend will grow even stronger. could you (or anybody) elaborate on that? the mmu-related threads show lots of progress, but it's way (way) out of my league. AFAICT, it's about the infrastructure to

Re: [kvm-devel] [PATCH] mmu notifiers #v8

2008-03-04 Thread Jack Steiner
On Tue, Mar 04, 2008 at 11:35:32AM +0100, Peter Zijlstra wrote: On Mon, 2008-03-03 at 13:15 -0600, Jack Steiner wrote: I haven't thought about locking requirements for the radix tree. Most accesses would be read-only updates infrequent. Any chance of an RCU-based radix

Re: [kvm-devel] KVM architecture docs

2008-03-04 Thread Avi Kivity
Javier Guerra wrote: On 3/4/08, Avi Kivity [EMAIL PROTECTED] wrote: apply to kvm guests. With mmu notifiers, the trend will grow even stronger. could you (or anybody) elaborate on that? the mmu-related threads show lots of progress, but it's way (way) out of my league. AFAICT,

Re: [kvm-devel] [PATCH] Virtio network device migration support

2008-03-04 Thread Dor Laor
On Mon, 2008-03-03 at 09:27 -0600, Anthony Liguori wrote: Hi Dor, Dor Laor wrote: void *virtio_net_init(PCIBus *bus, NICInfo *nd, int devfn) { VirtIONet *n; +const char *info_str = virtio-net; -n = (VirtIONet *)virtio_init_pci(bus, virtio-net, 6900, 0x1000, +n

[kvm-devel] [PATCH] Check device status in tx timer

2008-03-04 Thread Dor Laor
repository: /home/dor/src/merge/kvm branch: trunk commit acdb6d2aa7332179eead306ead17494ae23edbd6 Author: Dor Laor [EMAIL PROTECTED] Date: Tue Mar 4 08:16:06 2008 -0500 Check device status in tx timer. The device can be down when the timer pops. If it is down it will cause

Re: [kvm-devel] KVM-61/62 build fails on SLES 10

2008-03-04 Thread Alexey Eremenko
and ran with your patch, and is rather faster than KVM-37 for networking... Hi Michael ! If you're looking for blazing fast networking, then KVM (61+) offers VirtIO - PV networking, capable of breaking the 1 Gbps barrier... But to achieve such speeds you'll need to compile custom kernels

[kvm-devel] [PATCH] Add virtio_net_id for evenry instance

2008-03-04 Thread Dor Laor
repository: /home/dor/src/merge/kvm branch: trunk commit 27541e5166e4bb6d053b77f7fd7b3ed75db58138 Author: Dor Laor [EMAIL PROTECTED] Date: Tue Mar 4 08:59:03 2008 -0500 Add virtio_net_id for every instance, as suggested by Anthony Liguori Signed-off-by: Dor Laor [EMAIL PROTECTED]

[kvm-devel] [PATCH] Fix virtio migration when the device is down If the guest did not initalize the pfn, don't use it

2008-03-04 Thread Dor Laor
repository: /home/dor/src/merge/kvm branch: trunk commit db89e8403773a68d4c0ac3d6813f19ec83cb7011 Author: Dor Laor [EMAIL PROTECTED] Date: Tue Mar 4 08:14:37 2008 -0500 Fix virtio migration when the device is down If the guest did not initalize the pfn, don't use it.

[kvm-devel] [PATCH] Use specific avail/used ring structures

2008-03-04 Thread Dor Laor
repository: /home/dor/src/merge/kvm branch: trunk commit bf1e6da21722a4699ea3739e587f282b9a5db418 Author: Dor Laor [EMAIL PROTECTED] Date: Tue Mar 4 08:57:52 2008 -0500 Use specific avail/used ring structures This is more accurate than using page_size, as suggested by Anthony

Re: [kvm-devel] KVM-61/62 build fails on SLES 10

2008-03-04 Thread Tomas Rusnak
Alexey Eremenko napsal(a): and ran with your patch, and is rather faster than KVM-37 for networking... Hi Michael ! If you're looking for blazing fast networking, then KVM (61+) offers VirtIO - PV networking, capable of breaking the 1 Gbps barrier... But to achieve such speeds you'll

Re: [kvm-devel] [PATCH 0/6] In kernel PIT patch

2008-03-04 Thread Anthony Liguori
Yang, Sheng wrote: Hi Here is the last in-kernel PIT patch for KVM. The mainly change from last version is the supporting to save/restore. I also tested live migration. The other modifies including some date structure changed to be better for supporting the save/restore. I moved the PIT

Re: [kvm-devel] Stop the clock!

2008-03-04 Thread Joerg Roedel
On Tue, Mar 04, 2008 at 12:47:58PM +0200, Avi Kivity wrote: With paravirt clocksource, reboot and kexec are broken: the clock keeps updating after the reboot, and the new kernel will have a random memory location trampled occasionally. So we need to stop the clock on kexec (in the guest)

[kvm-devel] loop in copy_user_generic_string

2008-03-04 Thread Zdenek Kabelac
Hello I'm having weird problem and being a bit puzzled about where to look for this bug. I'm using T61 - C2D 2GB So I'll describe symptoms: When I run inside my 0.5G smp qemu-kvm guest with Debian these two loops in parallel: 'while : ; do dmsetup status ; done' and 'while : ; do cat

[kvm-devel] [GIT PULL] KVM fixes for 2.6.25-rc3

2008-03-04 Thread Avi Kivity
Linus, please pull the kvm fixes in the repo and branch git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm.git for-linus comprising an ABI fix, a few host crash fixes, AMD specific fixes, a Kbuild fix for the randconfig addicts, fallout from the scaling work, and other miscellany. Avi

Re: [kvm-devel] loop in copy_user_generic_string

2008-03-04 Thread Avi Kivity
Zdenek Kabelac wrote: Hello I'm having weird problem and being a bit puzzled about where to look for this bug. I'm using T61 - C2D 2GB So I'll describe symptoms: When I run inside my 0.5G smp qemu-kvm guest with Debian these two loops in parallel: 'while : ; do dmsetup status ;

[kvm-devel] [PATCH 8/8] provide -cpu-map option

2008-03-04 Thread Glauber Costa
this patch introduces a -cpu-map option. It has the form C:x,y,z..., and have the effect of setting the affinity mask of vcpu C to processors x,y,z... Signed-off-by: Glauber Costa [EMAIL PROTECTED] --- qemu/vl.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git

[kvm-devel] [PATCH 3/8] get thread id at thread's creation

2008-03-04 Thread Glauber Costa
store the thread id through our new call as soon as the process is created. Signed-off-by: Glauber Costa [EMAIL PROTECTED] --- qemu/qemu-kvm.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 8ee3bf8..1aeb97b 100644 ---

[kvm-devel] [PATCH 5/8] initialize affinities

2008-03-04 Thread Glauber Costa
store default process affinities before we get the chance to process any options Signed-off-by: Glauber Costa [EMAIL PROTECTED] --- qemu/vl.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/qemu/vl.c b/qemu/vl.c index f10fbd8..6a94724 100644 --- a/qemu/vl.c +++

[kvm-devel] [PATCH 1/8] add thread id to vcpu structure

2008-03-04 Thread Glauber Costa
This allow us to track which thread is currently running the cpu Signed-off-by: Glauber Costa [EMAIL PROTECTED] --- qemu/qemu-kvm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 051946e..43e0f2e 100644 --- a/qemu/qemu-kvm.c +++

[kvm-devel] [PATCH 0/8] RFC: vcpu pinning at qemu start

2008-03-04 Thread Glauber Costa
Hi guys, Here's a first series of patch aiming at vcpu pinning support in qemu. Ideally, as vcpu as just normal threads, the usual userspace tools can be used to set cpu affinities mask. However, It makes it very difficult to _start_ a vm with vcpus pinned, since we don't know the thread ids

[kvm-devel] [PATCH 2/8] provide a gettid function

2008-03-04 Thread Glauber Costa
Since glibc does not provide a gettid call directly, only through syscall, we wrap one for kvm Signed-off-by: Glauber Costa [EMAIL PROTECTED] --- qemu/qemu-kvm.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index 43e0f2e..8ee3bf8

[kvm-devel] [PATCH 4/8] store and set cpu affinities

2008-03-04 Thread Glauber Costa
This patch provides a cpu_set variable to vcpu_info structure. It stores the current cpu mask for a thread. We also provide a wrapper for storing a provided affinity, and a function to set default affinities: The default affinities are current process' Signed-off-by: Glauber Costa [EMAIL

[kvm-devel] [PATCH 6/8] stabilish default affinity for newly created cpus

2008-03-04 Thread Glauber Costa
Signed-off-by: Glauber Costa [EMAIL PROTECTED] --- qemu/qemu-kvm.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index a36fbf6..80fe8e5 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -68,6 +68,12 @@ void

Re: [kvm-devel] loop in copy_user_generic_string

2008-03-04 Thread Zdenek Kabelac
2008/3/4, Avi Kivity [EMAIL PROTECTED]: Zdenek Kabelac wrote: Hello I'm having weird problem and being a bit puzzled about where to look for this bug. I'm using T61 - C2D 2GB So I'll describe symptoms: When I run inside my 0.5G smp qemu-kvm guest with Debian

Re: [kvm-devel] loop in copy_user_generic_string

2008-03-04 Thread Avi Kivity
Zdenek Kabelac wrote: Is it emulated ? I've thought it's running natively with vmx? In some cases (memory mapped I/O, writes to page tables) some instructions are emulated. Usually they run natively. Please post the output of 'kvm_stat -1' to ensure the problem is with the emulator. --

Re: [kvm-devel] loop in copy_user_generic_string

2008-03-04 Thread Andi Kleen
Avi Kivity [EMAIL PROTECTED] writes: Most likely movs emulation is broken for long counts. Please post a disassembly of copy_user_generic_string to make sure we're looking at the same code. Be careful -- this code is patched at runtime and what you see in the vmlinux is not necessarily

[kvm-devel] [PATCH][EXTBOOT] Fix read drive parameters to solve Grub Error 18

2008-03-04 Thread Anthony Liguori
In certain circumstances, the calculated CHS can result in a total number of sectors that is less than the actual number of sectors. I'm not entirely sure why this upsets grub, but it seems to be the source of the Grub Error 18 that sometimes occurs when using extboot. The solution is to

Re: [kvm-devel] [PATCH 0/8] RFC: vcpu pinning at qemu start

2008-03-04 Thread Anthony Liguori
Glauber Costa wrote: Hi guys, Here's a first series of patch aiming at vcpu pinning support in qemu. Ideally, as vcpu as just normal threads, the usual userspace tools can be used to set cpu affinities mask. However, It makes it very difficult to _start_ a vm with vcpus pinned, since we

Re: [kvm-devel] still seeing network freezes with rtl8139 nic

2008-03-04 Thread Eckersid SIlapaswang
david ahern daahern at cisco.com writes: I know this issue has been discussed on this list before, but I am still experiencing network freezes in a guest that requires a restart to clear. When the network freezes in the guest I no longer see the network interrupts counter incrementing

Re: [kvm-devel] [PATCH 0/8] RFC: vcpu pinning at qemu start

2008-03-04 Thread Glauber Costa
Anthony Liguori wrote: Glauber Costa wrote: Hi guys, Here's a first series of patch aiming at vcpu pinning support in qemu. Ideally, as vcpu as just normal threads, the usual userspace tools can be used to set cpu affinities mask. However, It makes it very difficult to _start_ a vm with

Re: [kvm-devel] [PATCH 0/8] RFC: vcpu pinning at qemu start

2008-03-04 Thread Glauber Costa
Joerg Roedel wrote: On Tue, Mar 04, 2008 at 01:21:53PM -0300, Glauber Costa wrote: Hi guys, Here's a first series of patch aiming at vcpu pinning support in qemu. Ideally, as vcpu as just normal threads, the usual userspace tools can be used to set cpu affinities mask. However, It makes

Re: [kvm-devel] [PATCH 0/8] RFC: vcpu pinning at qemu start

2008-03-04 Thread Joerg Roedel
On Tue, Mar 04, 2008 at 03:11:27PM -0300, Glauber Costa wrote: Joerg Roedel wrote: On Tue, Mar 04, 2008 at 01:21:53PM -0300, Glauber Costa wrote: Hi guys, Here's a first series of patch aiming at vcpu pinning support in qemu. Ideally, as vcpu as just normal threads, the usual userspace

[kvm-devel] [patch 05/23] QEMU/KVM: return PCIDevice on net device init and record devfn

2008-03-04 Thread Marcelo Tosatti
Change the PCI network drivers init functions to return the PCIDev, to inform which slot has been hot-plugged. Also record devfn on the NICInfo structure to locate for release on hot-removal. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/hw/e1000.c

Re: [kvm-devel] [patch 2/6] mmu_notifier: Callbacks to invalidate address ranges

2008-03-04 Thread Christoph Lameter
On Tue, 4 Mar 2008, Nick Piggin wrote: Then put it into the arch code for TLB invalidation. Paravirt ops gives good examples on how to do that. Put what into arch code? The mmu notifier code. What about a completely different approach... XPmem runs over NUMAlink, right? Why not

Re: [kvm-devel] [RFC] Notifier for Externally Mapped Memory (EMM)

2008-03-04 Thread Christoph Lameter
On Tue, 4 Mar 2008, Andrea Arcangeli wrote: When working with single pages it's more efficient and preferable to call invalidate_page and only later release the VM reference on the page. But as you pointed out before that path is a slow path anyways. Its rarely taken. Having a single

[kvm-devel] [patch 15/23] QEMU/KVM: add pci_find_device

2008-03-04 Thread Marcelo Tosatti
Return PCIDevice from bus number and slot. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/hw/pci.c === --- kvm-userspace.hotplug.orig/qemu/hw/pci.c +++ kvm-userspace.hotplug/qemu/hw/pci.c @@

[kvm-devel] [patch 03/23] QEMU/KVM: add OperationRegion and GPE handler for add/removal notification

2008-03-04 Thread Marcelo Tosatti
Use GPE _L01 to notify OSPM. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/bios/acpi-dsdt.dsl === --- kvm-userspace.hotplug.orig/bios/acpi-dsdt.dsl +++ kvm-userspace.hotplug/bios/acpi-dsdt.dsl @@

[kvm-devel] [patch 18/23] QEMU/KVM: handle SEJ notifications

2008-03-04 Thread Marcelo Tosatti
Handle the _EJ0 notifications. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/hw/acpi.c === --- kvm-userspace.hotplug.orig/qemu/hw/acpi.c +++ kvm-userspace.hotplug/qemu/hw/acpi.c @@ -26,6 +26,7 @@

[kvm-devel] [patch 23/23] QEMU/KVM: device hot-remove

2008-03-04 Thread Marcelo Tosatti
Add monitor command to hot-remove devices. Remove device data on _EJ0 notification. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/monitor.c === --- kvm-userspace.hotplug.orig/qemu/monitor.c +++

[kvm-devel] [patch 07/23] QEMU/KVM: dynamic drive/drive_opt index allocation

2008-03-04 Thread Marcelo Tosatti
Dynamically allocate drive options and drive table index, so to reused indexes when devices are removed. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/sysemu.h === ---

[kvm-devel] [patch 02/23] QEMU/KVM: add devices to represent PCI slots with _EJ0 method

2008-03-04 Thread Marcelo Tosatti
Presence of _EJ0 method indicates that slots are hot-pluggable. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/bios/acpi-dsdt.dsl === --- kvm-userspace.hotplug.orig/bios/acpi-dsdt.dsl +++

[kvm-devel] [patch 14/23] QEMU/KVM: device hot-add

2008-03-04 Thread Marcelo Tosatti
Add monitor command to hot-add PCI devices (nic and drive). Save QEMUMachine necessary for drive_init. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/Makefile.target === ---

[kvm-devel] [patch 11/23] QEMU/KVM: move drives_opt for external use

2008-03-04 Thread Marcelo Tosatti
Device hotplug will use that structure from a separate file. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/sysemu.h === --- kvm-userspace.hotplug.orig/qemu/sysemu.h +++

[kvm-devel] [patch 09/23] QEMU/KVM: drive removal support

2008-03-04 Thread Marcelo Tosatti
To be used by hot-remove. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/vl.c === --- kvm-userspace.hotplug.orig/qemu/vl.c +++ kvm-userspace.hotplug/qemu/vl.c @@ -4972,6 +4972,12 @@ static int

[kvm-devel] [patch 10/23] QEMU/KVM: record devfn on block driver instance

2008-03-04 Thread Marcelo Tosatti
Record devfn on the BlockDriverState structure to locate for release on hot-removal. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/block_int.h === --- kvm-userspace.hotplug.orig/qemu/block_int.h

[kvm-devel] [patch 06/23] QEMU/KVM: pci hotplug GPE support

2008-03-04 Thread Marcelo Tosatti
Enable the corresponding bit on the PCIST region and trigger the SCI. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/hw/acpi.c === --- kvm-userspace.hotplug.orig/qemu/hw/acpi.c +++

[kvm-devel] [patch 04/23] QEMU/KVM: add pci_find_bus

2008-03-04 Thread Marcelo Tosatti
Return PCIBus pointer from bus number integer. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/hw/pci.c === --- kvm-userspace.hotplug.orig/qemu/hw/pci.c +++ kvm-userspace.hotplug/qemu/hw/pci.c @@

[kvm-devel] [patch 13/23] QEMU/KVM: add net_client_uninit

2008-03-04 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/net.h === --- kvm-userspace.hotplug.orig/qemu/net.h +++ kvm-userspace.hotplug/qemu/net.h @@ -38,6 +38,7 @@ void do_info_network(void); int

[kvm-devel] [patch 22/23] QEMU/KVM: zero ioport_opaque on isa_unassign_ioport

2008-03-04 Thread Marcelo Tosatti
If the io port is unassigned, the previous private pointer is meaningless. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/vl.c === --- kvm-userspace.hotplug.orig/qemu/vl.c +++

[kvm-devel] [patch 21/23] QEMU/KVM: LSI SCSI unregister callback

2008-03-04 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/hw/lsi53c895a.c === --- kvm-userspace.hotplug.orig/qemu/hw/lsi53c895a.c +++ kvm-userspace.hotplug/qemu/hw/lsi53c895a.c @@ -1849,6 +1849,18 @@ void

[kvm-devel] [patch 16/23] QEMU/KVM: add cpu_unregister_io_memory and make io mem table index dynamic

2008-03-04 Thread Marcelo Tosatti
So drivers can clear their mem io table entries on exit back to unassigned state. Also make the io mem index allocation dynamic. Perhaps freeing the state created during cpu_register_physical_memory() is also necessary. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index:

[kvm-devel] [patch 01/23] QEMU/KVM: add PCI IRQ routing information up to slot 32

2008-03-04 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/bios/acpi-dsdt.dsl === --- kvm-userspace.hotplug.orig/bios/acpi-dsdt.dsl +++ kvm-userspace.hotplug/bios/acpi-dsdt.dsl @@ -249,6 +249,162 @@ DefinitionBlock

[kvm-devel] [patch 17/23] QEMU/KVM: notify _EJ0 through _SEJ OperationRegion

2008-03-04 Thread Marcelo Tosatti
The _EJ0 method is executed by the OS once it has successfully finished device removal. Inform that event through IO port space so QEMU can free the associated data. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/bios/acpi-dsdt.dsl

[kvm-devel] [patch 20/23] QEMU/KVM: add pci_unregister_device

2008-03-04 Thread Marcelo Tosatti
Unregister the pci device, unassign its IO and memory regions, and free associated data. Add a callback so drivers can free device state. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/hw/pci.c

[kvm-devel] [patch 00/23] [RFC] QEMU/KVM ACPI PCI hotplug

2008-03-04 Thread Marcelo Tosatti
The following patchset adds ACPI PCI hotplug support for QEMU. It extends the number of slots with IRQ routing information from 6 to 32. The only PCI driver which the unregister method has been added is LSI SCSI, would like more comments to implement that for the remaining drivers. --

[kvm-devel] [patch 12/23] QEMU/KVM: net/drive add/remove tweaks

2008-03-04 Thread Marcelo Tosatti
Export net/drive add/remove functions for device hotplug usage. Return the table index on add. Return failure instead of exiting if limit has been reached on drive_add. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/vl.c

[kvm-devel] [patch 08/23] QEMU/KVM: dynamic nic info index allocation

2008-03-04 Thread Marcelo Tosatti
The same, but for nics. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/net.h === --- kvm-userspace.hotplug.orig/qemu/net.h +++ kvm-userspace.hotplug/qemu/net.h @@ -46,6 +46,7 @@ struct NICInfo {

[kvm-devel] [patch 19/23] QEMU/KVM: add qemu_free_irqs

2008-03-04 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Index: kvm-userspace.hotplug/qemu/hw/irq.c === --- kvm-userspace.hotplug.orig/qemu/hw/irq.c +++ kvm-userspace.hotplug/qemu/hw/irq.c @@ -56,6 +56,12 @@ qemu_irq

Re: [kvm-devel] [PATCH 0/8] RFC: vcpu pinning at qemu start

2008-03-04 Thread Anthony Liguori
Glauber Costa wrote: My main interest is in management tools being able to specify pinning set ups at VM creation time. As I said, it can be done through tools like taskset, but then you'd have to know: * when are the threads created * which thread ids corresponds to each cpu And of

Re: [kvm-devel] [patch 14/23] QEMU/KVM: device hot-add

2008-03-04 Thread Anthony Liguori
Daniel P. Berrange wrote: On Tue, Mar 04, 2008 at 03:34:33PM -0300, Marcelo Tosatti wrote: Add monitor command to hot-add PCI devices (nic and drive). [snip] Index: kvm-userspace.hotplug/qemu/monitor.c === ---

Re: [kvm-devel] [patch 23/23] QEMU/KVM: device hot-remove

2008-03-04 Thread Anthony Liguori
Daniel P. Berrange wrote: Removing based on pci device number is very un-pleasant, since its not something the user of the monitor cares about. Nor do they even know what the PCI device number assigned by 'pci_add' is. As with addition, I'd like separate commands for NIC vs Drive, and for

Re: [kvm-devel] [PATCH 0/8] RFC: vcpu pinning at qemu start

2008-03-04 Thread Daniel P. Berrange
On Tue, Mar 04, 2008 at 01:28:24PM -0600, Anthony Liguori wrote: Glauber Costa wrote: My main interest is in management tools being able to specify pinning set ups at VM creation time. As I said, it can be done through tools like taskset, but then you'd have to know: * when are the

Re: [kvm-devel] [patch 14/23] QEMU/KVM: device hot-add

2008-03-04 Thread Daniel P. Berrange
On Tue, Mar 04, 2008 at 01:30:42PM -0600, Anthony Liguori wrote: Daniel P. Berrange wrote: On Tue, Mar 04, 2008 at 03:34:33PM -0300, Marcelo Tosatti wrote: Add monitor command to hot-add PCI devices (nic and drive). [snip] Index: kvm-userspace.hotplug/qemu/monitor.c

Re: [kvm-devel] [patch 23/23] QEMU/KVM: device hot-remove

2008-03-04 Thread Marcelo Tosatti
On Tue, Mar 04, 2008 at 01:32:22PM -0600, Anthony Liguori wrote: Daniel P. Berrange wrote: Removing based on pci device number is very un-pleasant, since its not something the user of the monitor cares about. Nor do they even know what the PCI device number assigned by 'pci_add' is. As

Re: [kvm-devel] [PATCH 0/8] RFC: vcpu pinning at qemu start

2008-03-04 Thread Glauber Costa
Daniel P. Berrange wrote: On Tue, Mar 04, 2008 at 01:28:24PM -0600, Anthony Liguori wrote: Glauber Costa wrote: My main interest is in management tools being able to specify pinning set ups at VM creation time. As I said, it can be done through tools like taskset, but then you'd have to

Re: [kvm-devel] [PATCH 0/8] RFC: vcpu pinning at qemu start

2008-03-04 Thread Glauber Costa
Anthony Liguori wrote: Glauber Costa wrote: My main interest is in management tools being able to specify pinning set ups at VM creation time. As I said, it can be done through tools like taskset, but then you'd have to know: * when are the threads created * which thread ids corresponds

Re: [kvm-devel] [patch 23/23] QEMU/KVM: device hot-remove

2008-03-04 Thread Daniel P. Berrange
On Tue, Mar 04, 2008 at 05:00:09PM -0300, Marcelo Tosatti wrote: On Tue, Mar 04, 2008 at 01:32:22PM -0600, Anthony Liguori wrote: Daniel P. Berrange wrote: nic_remove [vlan=n][,macaddr=addr][,model=type] drive_remove [[file=file][,if=type][,bus=n][,unit=m][,media=d][index=i]]

Re: [kvm-devel] [patch 14/23] QEMU/KVM: device hot-add

2008-03-04 Thread Itamar Heim
Actually, the following (old) patch by Yuval Kashtan was sent to qemu-devel back in October (but not merged AFAIK) to facilitate usb_del using the same string used during usb_add. Hello, This proposed patch add support for deleting usb devices by providing the (exact) same string they were

Re: [kvm-devel] [RFC] Notifier for Externally Mapped Memory (EMM)

2008-03-04 Thread Andrea Arcangeli
On Tue, Mar 04, 2008 at 11:00:31AM -0800, Christoph Lameter wrote: But as you pointed out before that path is a slow path anyways. Its rarely It's a slow path but I don't see why you think two hooks are better than one, when only one is necessary. I once ripped invalidate_page while working on

Re: [kvm-devel] [RFC] Notifier for Externally Mapped Memory (EMM)

2008-03-04 Thread Christoph Lameter
On Tue, 4 Mar 2008, Andrea Arcangeli wrote: I once ripped invalidate_page while working on #v8 but then I reintroduced it because I thought reducing the total number of hooks was beneficial to the core linux VM (even if only a microoptimization, I sure agree about that, but it's trivial to

Re: [kvm-devel] [PATCH] Check device status in tx timer

2008-03-04 Thread Dor Laor
On Tue, 2008-03-04 at 09:42 -0600, Anthony Liguori wrote: diff --git a/qemu/hw/virtio-net.c b/qemu/hw/virtio-net.c index 612cf6b..a05eafb 100644 --- a/qemu/hw/virtio-net.c +++ b/qemu/hw/virtio-net.c @@ -280,6 +280,10 @@ static void virtio_net_tx_timer(void *opaque) { VirtIONet

Re: [kvm-devel] KVM-61/62 build fails on SLES 10

2008-03-04 Thread Dor Laor
Hello Sorry for my intervention into your communication, but are you sure, when you want to use virtio, you must have 2.6.25 kernel on both - guest and host system? I test this case right now, and I have running 2.6.25-rc3 only on guest system with kvm-62. It's enough running the

Re: [kvm-devel] [RFC] Notifier for Externally Mapped Memory (EMM)

2008-03-04 Thread Christoph Lameter
On Tue, 4 Mar 2008, Peter Zijlstra wrote: On Tue, 2008-03-04 at 14:35 -0800, Christoph Lameter wrote: RCU means that the callbacks occur in an atomic context. Not really, if it requires moving the VM locks to sleepable locks under a .config option, I think its also fair to require

Re: [kvm-devel] [PATCH 0/6] In kernel PIT patch

2008-03-04 Thread Dor Laor
On Tue, 2008-03-04 at 09:52 -0600, Anthony Liguori wrote: Yang, Sheng wrote: Hi Here is the last in-kernel PIT patch for KVM. The mainly change from last version is the supporting to save/restore. I also tested live migration. The other modifies including some date structure changed

Re: [kvm-devel] [RFC] Notifier for Externally Mapped Memory (EMM)

2008-03-04 Thread Peter Zijlstra
FWIW, I'll cut the kvm and openfabrics lists from any future posts. I'm getting tired of the bounces. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008.

Re: [kvm-devel] [PATCH] mmu notifiers #v8

2008-03-04 Thread Nick Piggin
On Mon, Mar 03, 2008 at 11:01:22AM -0800, Christoph Lameter wrote: On Mon, 3 Mar 2008, Nick Piggin wrote: I'm still not completely happy with this. I had a very quick look at the GRU driver, but I don't see why it can't be implemented more like the regular TLB model, and have TLB

Re: [kvm-devel] [PATCH 0/6] In kernel PIT patch

2008-03-04 Thread Anthony Liguori
Dor Laor wrote: On Tue, 2008-03-04 at 09:52 -0600, Anthony Liguori wrote: Yang, Sheng wrote: Hi Here is the last in-kernel PIT patch for KVM. The mainly change from last version is the supporting to save/restore. I also tested live migration. The other modifies including some

Re: [kvm-devel] [patch 2/6] mmu_notifier: Callbacks to invalidate address ranges

2008-03-04 Thread Nick Piggin
On Wednesday 05 March 2008 05:58, Christoph Lameter wrote: On Tue, 4 Mar 2008, Nick Piggin wrote: Then put it into the arch code for TLB invalidation. Paravirt ops gives good examples on how to do that. Put what into arch code? The mmu notifier code. It isn't arch specific.

  1   2   >