[PATCH]: Fix i2c_bus_save, which fixes KVM live migration

2008-07-28 Thread Chris Lalancette
Attached is a simple patch to make i2c_bus_save() put a 32-bit quantity in the save file, which matches what i2c_bus_load() expects to pull out of the save file later. Without this fix in place, KVM live migration fails since the sender is only sending 1 byte while the receiver is waiting to recei

Re: [PATCH 3/6] kvm.git allow browsing memslots with mmu_lock

2008-07-28 Thread Andrea Arcangeli
On Mon, Jul 28, 2008 at 06:51:50PM -0300, Marcelo Tosatti wrote: > Looks good. Cool, thanks for the review of the three patches! Now I only hope Andrew will post his -mm patches to Linus without waiting any further. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a

Re: [PATCH 3/6] kvm.git allow browsing memslots with mmu_lock

2008-07-28 Thread Marcelo Tosatti
On Fri, Jul 25, 2008 at 04:32:03PM +0200, Andrea Arcangeli wrote: > This allows reading memslots with only the mmu_lock hold for mmu > notifiers that runs in atomic context and with mmu_lock held. > > Compared to previous versions I had to move this: > > - if (mem->slot >= kvm->nmemslots) >

Re: [PATCH 2/6] kvm.git allow reading aliases with mmu_lock

2008-07-28 Thread Marcelo Tosatti
On Fri, Jul 25, 2008 at 04:26:39PM +0200, Andrea Arcangeli wrote: > This allows the mmu notifier code to run unalias_gfn with only the > mmu_lock held. Only alias writes need the mmu_lock held. Readers will > either take the slots_lock in read mode or the mmu_lock. > > Signed-off-by: Andrea Arcang

[RFC][PATCH] VMX: Add enhanced mechanism to detect vmentry failures

2008-07-28 Thread Mohammed Gamal
This patch is *not* meant to be merged. This patch fixes the random crashes with gfxboot and it doesn't crash anymore at random instructions. It mainly does two things: 1- It handles all possible exit reasons before exiting for VMX failures 2- It handles vmentry failures avoiding external interrup

Re:

2008-07-28 Thread Mohammed Gamal
Please ignore this messed up e-mail, Sorry! -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[no subject]

2008-07-28 Thread Mohammed Gamal
[EMAIL PROTECTED], [EMAIL PROTECTED] Bcc: Subject: [RFC][PATCH] VMX: Add and enhance VMentry failure detection mechanism Reply-To: This patch is *not* meant to be merged. This patch fixes the random crashes with gfxboot and it doesn't crash anymore at random instructions. It mainly does two

Re: [PATCH 1/6] kvm.git mmu notifier patch

2008-07-28 Thread Marcelo Tosatti
Hi Andrea, On Fri, Jul 25, 2008 at 04:24:52PM +0200, Andrea Arcangeli wrote: > Hello, > > This is the latest version of the kvm mmu notifier patch. > > This allows largepages to be invalidated too, and a separate patch > takes care of alias locking (2/5) and memslot locking (3/5). > > While in

Re: [PATCH 1/6] kvm.git mmu notifier patch

2008-07-28 Thread Marcelo Tosatti
On Mon, Jul 28, 2008 at 06:11:04PM -0300, Marcelo Tosatti wrote: > > +static int kvm_unmap_rmapp(struct kvm *kvm, unsigned long *rmapp) > > +{ > > + u64 *spte; > > + int need_tlb_flush = 0; > > + > > + while ((spte = rmap_next(kvm, rmapp, NULL))) {

[ kvm-Bugs-2030701 ] 1280x768 in -std-vga

2008-07-28 Thread SourceForge.net
Bugs item #2030701, was opened at 2008-07-28 14:03 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2030701&group_id=180599 Please note that this message will contain a full copy

[ kvm-Bugs-2030703 ] Virtio Vista drivers

2008-07-28 Thread SourceForge.net
Bugs item #2030703, was opened at 2008-07-28 14:05 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2030703&group_id=180599 Please note that this message will contain a full copy

Re: [PATCH 1/4] reduce kvm stack usage in kvm_arch_vm_ioctl()

2008-07-28 Thread Dave Hansen
On Mon, 2008-07-28 at 13:46 -0500, Anthony Liguori wrote: > Tricking gcc seems like a bad thing to me. Who knows what crazy thing > GCC is going to do in the future. > > Why not just kmalloc() these things? Is kmalloc really that slow? In this case, I the kmalloc() just looked worse. I think

Re: [PATCH 1/4] reduce kvm stack usage in kvm_arch_vm_ioctl()

2008-07-28 Thread Anthony Liguori
Dave Hansen wrote: On my machine with gcc 3.4, kvm uses ~2k of stack in a few select functions. This is mostly because gcc fails to notice that the different case: statements could have their stack usage combined. It overflows very nicely if interrupts happen during one of these large uses. Th

Re: [ANNOUNCE] kvm-72 release

2008-07-28 Thread Henrik Holst
> Since this probably is due to something in qemu it would be great if > the release-log to kvm could include towards which revision of the > qemu svn repository that was merged. Or am I to understand that the > merge was performed on the same day as the new kvm release was > released? > > I'm thin

Re: e1000 and PXE issues

2008-07-28 Thread Charles Duffy
FYI, I'm experiencing this as well, and note that the issue still occurs with -no-kvm, but not with current qemu-trunk (r4955); that said, qemu-trunk's behavior doesn't seem to be perfect either -- there are several "No IP address" responses before one is acknowledged. -- To unsubscribe from

[PATCH 3/4] reduce stack usage in kvm_arch_vcpu_ioctl()

2008-07-28 Thread Dave Hansen
This time it is kvm_arch_vcpu_ioctl(). Use dynamic allocations to reduce its stack usage. Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 20 +--- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c ind

[PATCH 4/4] kvm: reduce stack usage in kvm_pv_mmu_op()

2008-07-28 Thread Dave Hansen
This time, we're in a hot path. We can't use kmalloc() because it might impact performance. So, we just stick the buffer that we need into the kvm_vcpu_arch structure. This is used very often, so it is not really a waste. We also have to move the buffer structure's definition to the arch-specif

[PATCH 1/4] reduce kvm stack usage in kvm_arch_vm_ioctl()

2008-07-28 Thread Dave Hansen
On my machine with gcc 3.4, kvm uses ~2k of stack in a few select functions. This is mostly because gcc fails to notice that the different case: statements could have their stack usage combined. It overflows very nicely if interrupts happen during one of these large uses. This patch uses two met

[PATCH 2/4] reduce stack usage in kvm_vcpu_ioctl()

2008-07-28 Thread Dave Hansen
Same as the last one, but this time we use kmalloc() for all of the uses. Note that the kfree()s take advantage of the fact that kfree() is OK on NULL. Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 48 ++-- 1 files changed,

Re: How to run KVM on non-X environment (RESEND)

2008-07-28 Thread Thomas Mueller
> > > Thanks for your advice and URL. > > > Performed following test but failed. > > > # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc IP:0 > Could not parse VNC address > > # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc IP:1 on kvm-machine) kvm -hda ubuntu6.

Re: How to run KVM on non-X environment (RESEND)

2008-07-28 Thread Henrik Holst
>Hi Henrik, > >Thanks for your advice. > >- snip - > >> You should run it as: >> # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc :0 > >Tried it just hangs there. I don't run X on the server. Then it is working, since you are running it with -vnc :0 kvm/qemu will provide all the outp

Re: [PATCH] kvm-userspace: fix memslot assignment

2008-07-28 Thread Christian Borntraeger
Am Sonntag, 27. Juli 2008 schrieb Avi Kivity: > This is really a no-op, since s390 will nack a KVM_CAP_SET_TSS_ADDR > query. Of course, the change is an improvement. > > > @@ -92,8 +92,11 @@ int get_free_slot(kvm_context_t kvm) > > if (tss_ext > 0) > > i = 0; > > else > > +#i

Re: [PATCH 2/4] KVM: pci device assignment

2008-07-28 Thread Ben-Ami Yassour
On Mon, 2008-07-28 at 15:27 +0800, Yang, Sheng wrote: > On Tuesday 22 July 2008 20:13:53 Ben-Ami Yassour wrote: > > > > -int kvm_pic_read_irq(struct kvm_pic *s) > > +int kvm_pic_read_irq(struct kvm *kvm) > > { > > int irq, irq2, intno; > > + struct kvm_pic *s = pic_irqchip(kvm); > > > >

RE: [PATCH 4/4] KVM: Device assignemnt with VT-d

2008-07-28 Thread Ben-Ami Yassour
On Mon, 2008-07-28 at 14:49 +0800, Han, Weidong wrote: > Ben-Ami Yassour wrote: > > From: Kay, Allen M <[EMAIL PROTECTED]> > > > > { > > if (pfn_valid(pfn)) > > return PageReserved(pfn_to_page(pfn)); > > I cannot find this is_mmio_pfn() definition on main KVM tree, and failed > t

[PATCH 1/1] KVM/userspace: Support for assigning PCI devices to guest

2008-07-28 Thread Ben-Ami Yassour
Based on a patch from: Amit Shah <[EMAIL PROTECTED]> We can assign a device from the host machine to a guest. The original code comes from Neocleus. A new command-line option, -pcidevice is added. For example, to invoke it for an Ethernet device sitting at PCI bus:dev.fn 04:08.0 with host IRQ 18,

Device assignment - userspace part

2008-07-28 Thread Ben-Ami Yassour
Follwing is the patch for the userspace part -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 5/5] This patch extends the VT-d driver to support KVM

2008-07-28 Thread Ben-Ami Yassour
[Ben: fixed memory pinning] Signed-off-by: Kay, Allen M <[EMAIL PROTECTED]> Signed-off-by: Weidong Han <[EMAIL PROTECTED]> Signed-off-by: Ben-Ami Yassour <[EMAIL PROTECTED]> --- arch/x86/kvm/Makefile |2 +- arch/x86/kvm/vtd.c | 180 a

[PATCH 1/5] KVM: PCIPT: direct mmio pfn check

2008-07-28 Thread Ben-Ami Yassour
In some cases it is not enough to identify mmio memory slots by pfn_valid. This patch adds checking the PageReserved as well. Signed-off-by: Ben-Ami Yassour <[EMAIL PROTECTED]> Signed-off-by: Muli Ben-Yehuda <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 22 +++--- 1 files change

[PATCH 3/5] KVM: pci device assignment

2008-07-28 Thread Ben-Ami Yassour
Based on a patch from: Amit Shah <[EMAIL PROTECTED]> This patch adds support for handling PCI devices that are assigned to the guest. The device to be assigned to the guest is registered in the host kernel and interrupt delivery is handled. If a device is already assigned, or the device driver fo

[PATCH 4/5] VT-d: changes to support KVM

2008-07-28 Thread Ben-Ami Yassour
From: Kay, Allen M <[EMAIL PROTECTED]> This patch extends the VT-d driver to support KVM [Ben: fixed memory pinning] Signed-off-by: Kay, Allen M <[EMAIL PROTECTED]> Signed-off-by: Weidong Han <[EMAIL PROTECTED]> Signed-off-by: Ben-Ami Yassour <[EMAIL PROTECTED]> --- drivers/pci/dmar.c

[PATCH 2/5] KVM: Add irq ack notifier list

2008-07-28 Thread Ben-Ami Yassour
FROM: Avi Kivity <[EMAIL PROTECTED]> This can be used by kvm subsystems that are interested in when interrupts are acked, for example time drift compenstation. [Ben: add notification call to the pic and ioapic] Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> Signed-off-by: Ben-Ami Yassour <[EMAIL

Device assignemnt: updated patches

2008-07-28 Thread Ben-Ami Yassour
Following are the device assignment patches with the fixes of the comments that were sent for the previous version. The main changes with respect to the previous version: 1. Add a missing patch that better defines mmio memory slots. 2. Change the device assignment ioctls: one ioctl for assigning a

Re: How to run KVM on non-X environment (RESEND)

2008-07-28 Thread Stephen Liu
Hi Henrik, Thanks for your advice. - snip - > You should run it as: > # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc :0 Tried it just hangs there. I don't run X on the server. > qemu contains a built in vnc-server. Thomas meant that you should > then > connect with a vncvi

Re: How to run KVM on non-X environment

2008-07-28 Thread Stephen Liu
--- Ian Kirk <[EMAIL PROTECTED]> wrote: > Stephen Liu wrote: > > > # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc IP:0 > > Could not parse VNC address > > "IP" is not a valid ip address? Sorry I don't follow. Please explain in more detail. B.R. satimis Send instant messag

Re: How to run KVM on non-X environment

2008-07-28 Thread Stephen Liu
Hi Alberto, Thanks for your advice. > On Monday 28 July 2008 08:09:58 am you wrote: > > # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc IP:0 > > Could not parse VNC address > > > > # kvm -hda ubuntu6.06.img -cdrom /dev/scd0 -m 512 -boot d -vnc IP:1 > > Could not parse VNC address

[PATCH 2/2] use paravirt function to calculate cpu khz

2008-07-28 Thread Glauber Costa
We're currently facing timing problems in guests that do calibration under heavy load, and then the load vanishes. This means we'll have a much lower lpj than we actually should, and delays end up taking less time than they should, which is a nasty bug. Solution is to pass on the lpj value from ho

[PATCH 0/2] Paravirt loops per jiffy

2008-07-28 Thread Glauber Costa
Resending, as avi seem to have missed the patches. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH 1/2] factor out cpu_khz to common code

2008-07-28 Thread Glauber Costa
KVM intends to use paravirt code to calibrate khz. Xen current code will do just fine. So as a first step, factor out code to pvclock.c. Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/pvclock.c | 12 arch/x86/xen/time.c | 11 ++- include/asm-x8

Re: How to run KVM on non-X environment (RESEND)

2008-07-28 Thread Henrik Holst
>--- Thomas Mueller chaschperli.ch> wrote: > >> On Mon, 28 Jul 2008 15:06:17 +0800, Stephen Liu wrote: >> >> >> >> >> >> >> >> > On running >> >> > # kvm -m 750 -cdrom /dev/scd0 -boot d ubuntu6.06.img >> >> >> >> add -vnc : >> >> >> >> or disable graphics completly (see kvm --help) >> > >> > >> >

Re: Device Paravirtualization

2008-07-28 Thread Henrik Holst
>As device paravirtualization requires a modified device driver (PV >driver) in the guest, which is aware about the hypervisor, can this be >done for proprietary OSs by writing a device driver for them and then >installing it in the guest OS ? > >If yes, has it been done for Windows guests so far ?

Re: [ANNOUNCE] kvm-72 release

2008-07-28 Thread Henrik Holst
2008/7/28 Henrik Holst <[EMAIL PROTECTED]>: > 2008/7/28 Anthony Liguori <[EMAIL PROTECTED]>: >> Henrik Holst wrote: >>> >>> There is a boot regression in kvm-72: >>> >>> scsi and virtio images will not survive a "reboot" from within the >>> guest. Only drives with if=ide survives a rebooting of the

Re: [ANNOUNCE] kvm-72 release

2008-07-28 Thread Henrik Holst
2008/7/28 Anthony Liguori <[EMAIL PROTECTED]>: > Henrik Holst wrote: >> >> There is a boot regression in kvm-72: >> >> scsi and virtio images will not survive a "reboot" from within the >> guest. Only drives with if=ide survives a rebooting of the guest. >> >> That is, this will create a guest that

Re: How to run KVM on non-X environment (RESEND)

2008-07-28 Thread Stephen Liu
--- Thomas Mueller <[EMAIL PROTECTED]> wrote: > On Mon, 28 Jul 2008 15:06:17 +0800, Stephen Liu wrote: > > > >> > >> > >> > On running > >> > # kvm -m 750 -cdrom /dev/scd0 -boot d ubuntu6.06.img > >> > >> add -vnc : > >> > >> or disable graphics completly (see kvm --help) > > > > > > Hi T

Re: [ANNOUNCE] kvm-72 release

2008-07-28 Thread Anthony Liguori
Henrik Holst wrote: There is a boot regression in kvm-72: scsi and virtio images will not survive a "reboot" from within the guest. Only drives with if=ide survives a rebooting of the guest. That is, this will create a guest that will survive any number of reboots: qemu-system-x86_64 -M -dr

Re: e1000 and PXE issues

2008-07-28 Thread Greg Kurtzer
In my case, it is possible but seems unlikely as I can switch between a working KVM-69 and KVM>=70 and replicate the bug (nothing related to the TAP or bridge support or configuration on the system is changing in my scenario). Still it could be a bug that just gets tickled by the newer KVM's, but I

RE: [PATCH 5 of 5] kvm: powerpc: Map guest userspace with TID=0 mappings

2008-07-28 Thread Liu Yu
I have a question that I could not think through. While multiple qemu/kvm processes are running at the same time, how to prevent one guest from using others' TLB? For all the guests have the same TID=0 for userspace and TID=1 for kernel. > -Original Message- > From: [EMAIL PROTECTED] >

Re: [PATCH 2/4] KVM: pci device assignment

2008-07-28 Thread Amit Shah
* On Tuesday 22 Jul 2008 17:43:53 Ben-Ami Yassour wrote: > Based on a patch from: Amit Shah <[EMAIL PROTECTED]> > > This patch adds support for handling PCI devices that are assigned to > the guest. > > The device to be assigned to the guest is registered in the host kernel > and interrupt delivery

Re: e1000 and PXE issues

2008-07-28 Thread Amit Shah
* On Sunday 27 Jul 2008 23:02:06 Farkas Levente wrote: > Greg Kurtzer wrote: > > On Sat, Jul 26, 2008 at 1:12 AM, Avi Kivity <[EMAIL PROTECTED]> wrote: > >> Greg Kurtzer wrote: > >>> Hello, > >>> > >>> I noticed some problems with the e1000 implementation in kvm >= 70. At > >>> first glance it seem

Re: [PATCH 2/4] KVM: pci device assignment

2008-07-28 Thread Yang, Sheng
On Tuesday 22 July 2008 20:13:53 Ben-Ami Yassour wrote: > > -int kvm_pic_read_irq(struct kvm_pic *s) > +int kvm_pic_read_irq(struct kvm *kvm) > { > int irq, irq2, intno; > + struct kvm_pic *s = pic_irqchip(kvm); > > irq = pic_get_irq(&s->pics[0]); > if (irq >= 0) { > @@ -186,

Re: How to run KVM on non-X environment

2008-07-28 Thread Ian Kirk
Stephen Liu wrote: > Please advise how to fix the problem. TIA Why not just use -vnc :0 or -curses ? -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: How to run KVM on non-X environment (RESEND)

2008-07-28 Thread Thomas Mueller
On Mon, 28 Jul 2008 15:06:17 +0800, Stephen Liu wrote: >> >> >> > On running >> > # kvm -m 750 -cdrom /dev/scd0 -boot d ubuntu6.06.img >> >> add -vnc : >> >> or disable graphics completly (see kvm --help) > > > Hi Thomas, > > > Thanks for your advice. > > > There is no graphic running o

Re: How to run KVM on non-X environment (RESEND)

2008-07-28 Thread Stephen Liu
--- Thomas Mueller <[EMAIL PROTECTED]> wrote: > On Mon, 28 Jul 2008 13:18:32 +0800, Stephen Liu wrote: > > > > > > On running > > # kvm -m 750 -cdrom /dev/scd0 -boot d ubuntu6.06.img > > add -vnc : > > or disable graphics completly (see kvm --help) Hi Thomas, Thanks for your advice. The

[ kvm-Bugs-2019608 ] Ubuntu 8.04.1 (IA32 && x86_64) - cannot install bootloader

2008-07-28 Thread SourceForge.net
Bugs item #2019608, was opened at 2008-07-16 15:03 Message generated for change (Comment added) made by awwy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2019608&group_id=180599 Please note that this message will contain a full copy of the comment thre

Re: How to run KVM on non-X environment

2008-07-28 Thread Stephen Liu
--- Ian Kirk <[EMAIL PROTECTED]> wrote: > Stephen Liu wrote: > > > Please advise how to fix the problem. TIA > > Why not just use -vnc :0 or -curses ? Hi Ian, Please explain in more detail how to make it. TIA B.R. Stephen L Send instant messages to your online friends http://uk.messeng

[PATCH] Save 64-bit of the IA-32e capable sysenter MSRs

2008-07-28 Thread Alexander Graf
Hi, When transitioning from KVM to the qemu userspace, we try to get and push a whole bunch of MSR values, including the SYSENTER ones. While this is basically a good idea, qemu doesn't know anything about SYSENTER on x86_64, which is an additional feature only available on Intel CPUs and thu