Re: [kvm-devel] Crash when booting from SCSI disk using Grub

2008-04-11 Thread Anthony Liguori
Alberto Treviño wrote: > When I try to boot from a SCSI device using grub, Qemu crashes (see > below). I have been able to boot from SCSI devices using Windows, but > anytime I use grub I get a crash, even when booting off a CD with grub. > Any ideas? > > # qemu-system-x86_64 -drive \ > file

Re: [kvm-devel] Ubuntu Gutsy host / XP guest / -smp 2

2008-04-11 Thread David Abrahams
Avi Kivity wrote: > David Abrahams wrote: >> on Wed Apr 02 2008, Avi Kivity wrote: >> >> >>> David Abrahams wrote: >>> With the title combination, the guest takes nearly 100% of my real CPU time and still only sees one CPU. Is this a known problem, and does it have a known so

Re: [kvm-devel] [patch 1/2] KVM: hlt emulation should take in-kernel APIC/PIT timers into account

2008-04-11 Thread Carsten Otte
Avi Kivity wrote: >> @@ -765,6 +766,7 @@ void kvm_vcpu_block(struct kvm_vcpu *vcp >> > > > This breaks ia64 (and shouldn't s390 use this too?) >> * We will block until either an interrupt or a signal wakes us up >> */ >> while (!kvm_cpu_has_interrupt(vcpu) >> + && !k

Re: [kvm-devel] [patch 1/2] QEMU: use SIGARLM for alarm timers, enable SIGIO on qemu_set_fd_handler2()

2008-04-11 Thread Marcelo Tosatti
On Fri, Apr 11, 2008 at 01:59:35PM -0500, Anthony Liguori wrote: > >-static void enable_sigio_timer(int fd) > >+static void enable_sigio(int fd) > >+{ > >+struct sigaction act; > >+ > >+sigfillset(&act.sa_mask); > >+act.sa_flags = 0; > >+act.sa_handler = host_io_handler; > >+ > >+

Re: [kvm-devel] [patch 1/2] QEMU: use SIGARLM for alarm timers, enable SIGIO on qemu_set_fd_handler2()

2008-04-11 Thread Marcelo Tosatti
On Fri, Apr 11, 2008 at 01:59:35PM -0500, Anthony Liguori wrote: > With the IO thread, shouldn't we be striving to perform the select()s > within the IO thread itself to completely avoid the need to use SIGIO at > all? Fully agree. Problem with it are the fundamental changes in qemu that are req

Re: [kvm-devel] pv clock: kvm is incompatible with xen :-(

2008-04-11 Thread Jeremy Fitzhardinge
Gerd Hoffmann wrote: > Wall clock is off a few hours though. Oops. > > I think the way wall clock and system clock work together in xen (Jeremy > correct me if I'm wrong) is that the wall clock specifies the point in > time where the system clock started going. As kvm fills in host system > time

Re: [kvm-devel] [patch 1/2] QEMU: use SIGARLM for alarm timers, enable SIGIO on qemu_set_fd_handler2()

2008-04-11 Thread Anthony Liguori
With the IO thread, shouldn't we be striving to perform the select()s within the IO thread itself to completely avoid the need to use SIGIO at all? Regards, Anthony Liguori Marcelo Tosatti wrote: > From: Anders Melchiorsen <[EMAIL PROTECTED]> > > Without I/O signals, qemu is relying on periodi

[kvm-devel] [patch 2/2] QEMU: decrease console "refresh rate" with -nographic

2008-04-11 Thread Marcelo Tosatti
With SIGIO enabled on stdio, there's no need to wakeup the thread performing IO every 30ms. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm-userspace.io/qemu/vl.c === --- kvm-userspace.io.orig/qemu/vl.c +++ kvm-userspac

[kvm-devel] [patch 1/2] QEMU: use SIGARLM for alarm timers, enable SIGIO on qemu_set_fd_handler2()

2008-04-11 Thread Marcelo Tosatti
From: Anders Melchiorsen <[EMAIL PROTECTED]> Without I/O signals, qemu is relying on periodic timer events to poll the I/O. That seems wrong, even though it works reasonably well because timers are so frequent. In KVM, timers are less frequent, and it does not work quite as well. Here is a quick

[kvm-devel] [patch 0/2] SIGIO handling changes

2008-04-11 Thread Marcelo Tosatti
First patch from Anders Melchiorsen cleans up SIGIO handling: - SIGALRM for alarm timers - enable SIGIO on qemu_set_fd_handler2() - avoid tap from abusing enable_sigio_timer() With that in place its possible to increase the dumb console (-nographic) refresh rate to 1s (from 30ms). -- ---

Re: [kvm-devel] [0/3] -reserved-ram for PCI passthrough without VT-d and without?paravirt

2008-04-11 Thread Andrea Arcangeli
On Fri, Apr 11, 2008 at 05:43:03PM +0530, Amit Shah wrote: > Hi Andrea, > > Did you have to recompile the bios? How did you do that (or did you ask Avi > to Yes. > generate it?) Do you have a binary of the bios that I can use to test > reserved ram? make bios; make install should do the tric

Re: [kvm-devel] [patch 2/2] KVM: fix kvm_vcpu_kick vs __vcpu_run race

2008-04-11 Thread Marcelo Tosatti
On Fri, Apr 11, 2008 at 03:18:19PM +0300, Avi Kivity wrote: > kvm_vcpu_kick() can be called from nonatomic contexts, so the vcpu->cpu > == cpu check is dangerous (and will warn on preemptible kernels, no?) Doh, right. How's this. --- KVM: fix kvm_vcpu_kick vs __vcpu_run race There is a

Re: [kvm-devel] [patch 1/2] KVM: hlt emulation should take in-kernel APIC/PIT timers into account

2008-04-11 Thread Marcelo Tosatti
On Fri, Apr 11, 2008 at 03:12:41PM +0300, Avi Kivity wrote: > This breaks ia64 (and shouldn't s390 use this too?) > > * We will block until either an interrupt or a signal wakes us up > > */ > > while (!kvm_cpu_has_interrupt(vcpu) > >+ && !kvm_cpu_has_pending_timer(vcpu) >

[kvm-devel] [PATCH] qemu: Add support for suffixes to the -m parameter

2008-04-11 Thread Amit Shah
The -m parameter doesn't take suffixes like G or M currently and it doesn't complain if such a suffix is given. Add support for the G and M suffixes and update the usage instructions appropriately. Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- qemu/vl.c | 25 +++-- 1 fil

[kvm-devel] [patch 0/5] fix SMP migration and loadvm/savevm (V3)

2008-04-11 Thread Marcelo Tosatti
Address comments from Avi: - fold mp_state into a structure - IOW/IOR markers for ioctl definitions - return -ENOSYS if extension is not supported -- - This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don

[kvm-devel] [patch 3/5] QEMU/KVM: save and load mp state

2008-04-11 Thread Marcelo Tosatti
Use the new interface to save and restore MP_STATE for all vcpu's. Increase version_id for cpu_load/cpu_save. Fixes SMP migration. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm-userspace.io/qemu/hw/pc.c === --- kvm-

[kvm-devel] [patch 4/5] QEMU/KVM: ignore SIG_IPI signals in userspace

2008-04-11 Thread Marcelo Tosatti
Otherwise a signal can be received in userspace and a vcpu goes back to the kernel while it should stay still. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm-userspace.io/qemu/qemu-kvm.c === --- kvm-userspace.io.orig/q

[kvm-devel] [patch 5/5] KVM: add ioctls to save/store mpstate

2008-04-11 Thread Marcelo Tosatti
So userspace can save/restore the mpstate during migration. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm/arch/x86/kvm/x86.c === --- kvm.orig/arch/x86/kvm/x86.c +++ kvm/arch/x86/kvm/x86.c @@ -814,6 +814,7 @@ int kvm_d

[kvm-devel] [patch 2/5] QEMU/KVM: Add libkvm interface to get/set the mpstate.

2008-04-11 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm-userspace.io/libkvm/libkvm.c === --- kvm-userspace.io.orig/libkvm/libkvm.c +++ kvm-userspace.io/libkvm/libkvm.c @@ -776,6 +776,28 @@ int kvm_set_sregs(kvm_context_t kvm, in

[kvm-devel] [patch 1/5] QEMU/KVM: properly copy the in-kernel apicbase value

2008-04-11 Thread Marcelo Tosatti
The MSR_IA32_APICBASE_ENABLE/MSR_IA32_APICBASE_BSP bits in s->apicbase are not initialized if in-kernel APIC emulation is used, so save the actual value passed by cpu_set_apic_base() caller. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm-userspace.io/qemu/hw/apic.c

Re: [kvm-devel] how to automate installation of kvm guests

2008-04-11 Thread Miguel Araujo
Thank you Anthony for your program. I have downloaded it and it works great! Until now I was generating the iso without gfxboot doing changes by hand. This is going to let me work faster, thanks. Thanks a lot for the kvmtest information too. Regards, Miguel Miguel Araujo wrote: Hello

[kvm-devel] Crash when booting from SCSI disk using Grub

2008-04-11 Thread Alberto Treviño
When I try to boot from a SCSI device using grub, Qemu crashes (see below). I have been able to boot from SCSI devices using Windows, but anytime I use grub I get a crash, even when booting off a CD with grub. Any ideas? # qemu-system-x86_64 -drive \ file=junk.raw,if=scsi,bus=0,index=0,medi

Re: [kvm-devel] pv clock: kvm is incompatible with xen :-(

2008-04-11 Thread Gerd Hoffmann
Gerd Hoffmann wrote: > Wall clock is off a few hours though. Oops. > > I think the way wall clock and system clock work together in xen (Jeremy > correct me if I'm wrong) is that the wall clock specifies the point in > time where the system clock started going. As kvm fills in host system > tim

Re: [kvm-devel] how to automate installation of kvm guests

2008-04-11 Thread Anthony Liguori
Miguel Araujo wrote: > Hello all, > > I'm interested in automate linux guests installation. First I haven't > been able to guess if the gfxboot issues with Ubuntu have been solved > (changelog searching has given zero results), so I thought about > installing a debootstrap system in a file mount

Re: [kvm-devel] [PATCH] kvm-userspace: fix compilation breakage when in-kernel pit is not detected

2008-04-11 Thread Anthony Liguori
Avi Kivity wrote: > Anthony Liguori wrote: >> Joerg Roedel wrote: >>> The compilation of kvm-userspace part fails if the in-kernel pit is not >>> detected in with the following error message: >>> >>> pc.o: In function `pc_init1': >>> /home/jroedel/src/kvm/kvm-userspace/qemu/hw/pc.c:987: undefined

Re: [kvm-devel] pv clock: kvm is incompatible with xen :-(

2008-04-11 Thread Gerd Hoffmann
Avi Kivity wrote: > Gerd Hoffmann wrote: >> Hi, >> >> Tried to use kvmclock with xenner and noticed that the kvmclock >> (MSR_KVM_SYSTEM_TIME msr) is incompatible with xen. > > Patches are welcome, especially as kvmclock isn't merged yet, so there > are no backward compatibility issues. Great,

Re: [kvm-devel] [PATCH] SVM: do not intercept task switch with NPT

2008-04-11 Thread Avi Kivity
Joerg Roedel wrote: >> Applied, thanks. I didn't know task switch and npt were related under svm. >> > > The only reason why task switch is intercepted is the cr3 switch it > involves. But with NPT we don't intercept cr3 switches anymore so we can > disable task switch intercept too. >

Re: [kvm-devel] [PATCH] SVM: do not intercept task switch with NPT

2008-04-11 Thread Joerg Roedel
On Fri, Apr 11, 2008 at 03:36:57PM +0300, Avi Kivity wrote: > Joerg Roedel wrote: > >When KVM uses NPT there is no reason to intercept task switches. This patch > >removes the intercept for it in that case. > > > > Applied, thanks. I didn't know task switch and npt were related under svm. The

Re: [kvm-devel] QEMU/KVM: make sure all vcpus are paused before saving state

2008-04-11 Thread Avi Kivity
Marcelo Tosatti wrote: > Make sure that all threads are paused in userspace before saving machine > state. > > Applied, thanks. -- Any sufficiently difficult bug is indistinguishable from a feature. - This SF.net email

Re: [kvm-devel] [PATCH] SVM: do not intercept task switch with NPT

2008-04-11 Thread Avi Kivity
Joerg Roedel wrote: > When KVM uses NPT there is no reason to intercept task switches. This patch > removes the intercept for it in that case. > Applied, thanks. I didn't know task switch and npt were related under svm. -- Any sufficiently difficult bug is indistinguishable from a feature.

Re: [kvm-devel] virtual machines network goes 100Mbit when interface is Gbit

2008-04-11 Thread Miguel Araujo
Hello again, I want to thank you for the information given. Now I understand what you mean, I'm going to test virtio drivers with the last kernel possible. Thanks a lot. Regards, Miguel Haydn Solomon escribió: See also http://www.linux-kvm.com/content/tip-how-setup-windows-guest-paravir

Re: [kvm-devel] [patch 2/2] KVM: fix kvm_vcpu_kick vs __vcpu_run race

2008-04-11 Thread Avi Kivity
Marcelo Tosatti wrote: > There is a window open between testing of pending IRQ's > and assignment of guest_mode in __vcpu_run. > > Injection of IRQ's can race with __vcpu_run as follows: > > CPU0CPU1 > kvm_x86_ops->run() > vcpu->guest_mode = 0SET_IRQ

[kvm-devel] how to automate installation of kvm guests

2008-04-11 Thread Miguel Araujo
Hello all, I'm interested in automate linux guests installation. First I haven't been able to guess if the gfxboot issues with Ubuntu have been solved (changelog searching has given zero results), so I thought about installing a debootstrap system in a file mounted in loopback mode. would be K

Re: [kvm-devel] [0/3] -reserved-ram for PCI passth rough without VT-d and without paravirt

2008-04-11 Thread Amit Shah
Hi Andrea, Did you have to recompile the bios? How did you do that (or did you ask Avi to generate it?) Do you have a binary of the bios that I can use to test reserved ram? Thanks, Amit - This SF.net email is sponsored by

Re: [kvm-devel] [patch 1/2] KVM: hlt emulation should take in-kernel APIC/PIT timers into account

2008-04-11 Thread Avi Kivity
Marcelo Tosatti wrote: > Timers that fire between guest hlt and vcpu_block's add_wait_queue() are > ignored, possibly resulting in hangs. > > Also make sure that atomic_inc and waitqueue_active tests happen in the > specified order, otherwise the following race is open: > > CPU0

Re: [kvm-devel] pv clock: kvm is incompatible with xen :-(

2008-04-11 Thread Avi Kivity
Gerd Hoffmann wrote: > Hi, > > Tried to use kvmclock with xenner and noticed that the kvmclock > (MSR_KVM_SYSTEM_TIME msr) is incompatible with xen. > > Patches are welcome, especially as kvmclock isn't merged yet, so there are no backward compatibility issues. -- Any sufficiently difficul

Re: [kvm-devel] [PATCH] kvm-userspace: fix compilation breakage when in-kernel pit is not detected

2008-04-11 Thread Avi Kivity
Anthony Liguori wrote: > Joerg Roedel wrote: >> The compilation of kvm-userspace part fails if the in-kernel pit is not >> detected in with the following error message: >> >> pc.o: In function `pc_init1': >> /home/jroedel/src/kvm/kvm-userspace/qemu/hw/pc.c:987: undefined >> reference to `kvm_pit_

[kvm-devel] Наличные деньги в кассе

2008-04-11 Thread Кассир
Вeдeниe кaссoвых oпepaций. Пpaвилa, нapушeния, кoнтpoль. Дата проведения: 15 aпpeля 2008, г. Мoсквa В пpoгpaммe: 1. oбщиe пpaвилa вeдeния кaссoвых oпepaций в pФ. Нopмaтивнaя бaзa. 2. opгaнизaция нaличных paсчeтoв нa пpeдпpиятии 3. oфopмлeниe кaссoвых дoкумeнтoв 4. Дeнeжнaя нaличнoсть в кaссe п

[kvm-devel] pv clock: kvm is incompatible with xen :-(

2008-04-11 Thread Gerd Hoffmann
Hi, Tried to use kvmclock with xenner and noticed that the kvmclock (MSR_KVM_SYSTEM_TIME msr) is incompatible with xen. kvm guests do this to translate the tsc delta into nsecs: #define get_clock(cpu, field) per_cpu(hv_clock, cpu).field static inline u64 kvm_get_delta(u64 last_tsc) {