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

2008-03-04 Thread Avi Kivity
Anthony Liguori wrote: > 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 extboo

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

2008-03-04 Thread Yang, Sheng
On Wednesday 05 March 2008 14:54:06 Avi Kivity wrote: > Yang, Sheng wrote: > > + > > +static int pit_get_out(struct kvm *kvm, int channel) > > +{ > > + struct kvm_kpit_channel_state *c = > > + &kvm->arch.vpit->pit_state.channels[channel]; > > + s64 d, t; > > + int out; > > + > > +

Re: [kvm-devel] KVM architecture docs

2008-03-04 Thread Avi Kivity
Zhao Forrest wrote: >>> Normally swapping mechanism choose the Least Recently Used(LRU) pages >>> of a process to be swapped out. When KVM uses MMU notifier in linux >>> kernel to implement swapping for VM, could KVM choose LRU pages of a >>> VM to swap out? If so, could you give a brief descriptio

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

2008-03-04 Thread Avi Kivity
Yang, Sheng wrote: > + > +static int pit_get_out(struct kvm *kvm, int channel) > +{ > + struct kvm_kpit_channel_state *c = > + &kvm->arch.vpit->pit_state.channels[channel]; > + s64 d, t; > + int out; > + > + ASSERT(mutex_is_locked(&kvm->arch.vpit->pit_state.lock)); > + >

Re: [kvm-devel] loop in copy_user_generic_string

2008-03-04 Thread Avi Kivity
Andi Kleen wrote: > 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

Re: [kvm-devel] KVM architecture docs

2008-03-04 Thread Zhao Forrest
> > > > Normally swapping mechanism choose the Least Recently Used(LRU) pages > > of a process to be swapped out. When KVM uses MMU notifier in linux > > kernel to implement swapping for VM, could KVM choose LRU pages of a > > VM to swap out? If so, could you give a brief description about how > >

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

2008-03-04 Thread Avi Kivity
Marcelo Tosatti wrote: > 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-use

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

2008-03-04 Thread Avi Kivity
Anthony Liguori wrote: > Glauber Costa wrote: > >> Anthony Liguori wrote: >> >> No, it can't. Because at the time qemu starts, no vcpu -> thread id >> relationship exists at all. And we don't know when it will. >> > > Sure we do. The vcpu -> thread id relationship is valid after > kvm_in

Re: [kvm-devel] KVM architecture docs

2008-03-04 Thread Avi Kivity
Zhao Forrest wrote: > when NPT is used by KVM in the future, this mmu > btw, NPT support is already integrated. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. - This SF.net email

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

2008-03-04 Thread Avi Kivity
Daniel P. Berrange wrote: >> (qemu) info block >> ide0-hd0: type=hd removable=0 file=/root/images/marcelo5.img ro=0 drv=raw >> ide1-cd0: type=cdrom removable=1 locked=0 [not inserted] >> floppy0: type=floppy removable=1 locked=0 [not inserted] >> sd0: type=floppy removable=1 locked=0 [not inserted]

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

2008-03-04 Thread Avi Kivity
Marcelo Tosatti wrote: > 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 t

Re: [kvm-devel] KVM architecture docs

2008-03-04 Thread Zhao Forrest
> > Normally swapping mechanism choose the Least Recently Used(LRU) pages > > of a process to be swapped out. When KVM uses MMU notifier in linux > > kernel to implement swapping for VM, could KVM choose LRU pages of a > > VM to swap out? If so, could you give a brief description about how > > this

Re: [kvm-devel] KVM architecture docs

2008-03-04 Thread Avi Kivity
Zhao Forrest wrote: >>> Normally swapping mechanism choose the Least Recently Used(LRU) pages >>> of a process to be swapped out. When KVM uses MMU notifier in linux >>> kernel to implement swapping for VM, could KVM choose LRU pages of a >>> VM to swap out? If so, could you give a brief descriptio

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

2008-03-04 Thread Avi Kivity
Marcelo Tosatti wrote: > Add monitor command to hot-add PCI devices (nic and drive). > > A drive is not a pci device. One would hot-plug a scsi controller, and then hot-plug a device to that controller. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic.

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

2008-03-04 Thread Avi Kivity
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 with addition, I'd like separ

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

2008-03-04 Thread Avi Kivity
Marcelo Tosatti wrote: > 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 >

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

2008-03-04 Thread Avi Kivity
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 i

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

2008-03-04 Thread Avi Kivity
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

Re: [kvm-devel] KVM architecture docs

2008-03-04 Thread Avi Kivity
Zhao Forrest wrote: >> - swapping allows you to overcommit memory >> > > Normally swapping mechanism choose the Least Recently Used(LRU) pages > of a process to be swapped out. When KVM uses MMU notifier in linux > kernel to implement swapping for VM, could KVM choose LRU pages of a > VM to sw

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

2008-03-04 Thread Yang, Sheng
On Wednesday 05 March 2008 12:25:07 Anthony Liguori wrote: > Yang, Sheng wrote: > > On Wednesday 05 March 2008 08:50:24 Anthony Liguori wrote: > >> So how do we measure the benefits of an in-kernel PIT? > > > > On the time accuracy side, one typical example is in RHEL5 32E guest, > > time flows ver

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

2008-03-04 Thread Avi Kivity
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 PREEMPT_RCU

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

2008-03-04 Thread Anthony Liguori
Yang, Sheng wrote: > On Wednesday 05 March 2008 08:50:24 Anthony Liguori wrote: > >> So how do we measure the benefits of an in-kernel PIT? >> > > On the time accuracy side, one typical example is in RHEL5 32E guest, time > flows very slow compared to the host > (https://sourceforge.net/t

Re: [kvm-devel] KVM architecture docs

2008-03-04 Thread Zhao Forrest
> > > > 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 later write drivers (virtio?) > > to DMA-heavy hardware (IB, RDMA, etc). am i wrong? or is it > > something more

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

2008-03-04 Thread Anthony Liguori
Glauber Costa wrote: > Anthony Liguori wrote: > > No, it can't. Because at the time qemu starts, no vcpu -> thread id > relationship exists at all. And we don't know when it will. Sure we do. The vcpu -> thread id relationship is valid after kvm_init_ap() is called which is after machine init b

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

2008-03-04 Thread Yang, Sheng
On Wednesday 05 March 2008 08:50:24 Anthony Liguori wrote: > 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/r

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

2008-03-04 Thread Yang, Sheng
On Tuesday 04 March 2008 21:23:46 Uri Lublin wrote: > > @@ -492,9 +494,13 @@ PITState *pit_init(int base, qemu_irq irq) > > PITChannelState *s; > > > > s = &pit->channels[0]; > > -/* the timer 0 is connected to an IRQ */ > > -s->irq_timer = qemu_new_timer(vm_clock, pit_irq_timer,

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 specifi

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 mod

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 i

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. http://clk.atdmt.com/

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 struc

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 requi

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

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) > > { > >

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] [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] [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 adde

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][inde

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'

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 i

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'

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 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: > > * w

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, a

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 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 > > A

[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 *qemu_allocate_irqs(qem

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

2008-03-04 Thread Daniel P. Berrange
On Tue, Mar 04, 2008 at 03:34:42PM -0300, Marcelo Tosatti wrote: > 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 >

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

2008-03-04 Thread Daniel P. Berrange
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 > === > --- kvm-userspace.hotplug.orig/qemu/monitor.c

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 evict

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?

[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

[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 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 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 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 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 ls

[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-userspace.hotp

[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-userspace.h

[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-userspace.hotplu

[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 @@ -689

[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 hack_arou

[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 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.

[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-userspace.hotplug/qem

[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 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 dr

[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-userspace.hotplug.ori

[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-userspace.

[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 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-userspac

[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 @@ DefinitionBloc

[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 @@ -40

[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. -- --

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

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. >> >> Ho

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 _s

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

2008-03-04 Thread Eckersid SIlapaswang
david ahern 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 (i.e., the

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

[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 implemen

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 necessari

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

2008-03-04 Thread Joerg Roedel
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 it very difficu

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 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-k

[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 7/8] process a cpu affinity mask

2008-03-04 Thread Glauber Costa
This patch provides a function that process a cpu affinity list in the form x,y,z... into a cpu_set_t variable. Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- qemu/vl.c | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/qemu/vl.c b/qemu/vl.c index 6a94

[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 +++ b/qemu

[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 +++ b

[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 kvm_register_defa

[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 PROTECT

[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..8ee3bf

[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 from

[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 --- a/qemu/qem

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

[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 Kivit

[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 /de

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 gues

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

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

[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

  1   2   >