Re: [kvm-devel] tools to dump guest memory and generate core file

2008-03-18 Thread Uri Lublin
Avi Kivity wrote:
> david ahern wrote:
>   
>> Attaching gdb to qemu you work with addresses as seen by the qemu process; 
>> the
>> idea is to work with addresses as seen inside the guest.
>>
>>
>> Now, if you attach gdb to the qemu process,
>>
>> gdb /usr/local/bin/qemu-system-x86_64 2346
>>   
>> 
> I meant connecting to the gdb stub in qemu that represents the guest:
>
>   (gdb) target remote localhost:1234
>
> Of course, it means starting qemu with the gdb stub enabled.  We might 
> add a monitor command to start it after the fact.
>   
gdbserver is the monitor command you're looking for:
(qemu) help gdbserver
gdbserver [port] -- start gdbserver session (default port=1234)


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] [PATCH] qemu: acpi: notify a powerdown event to the guest only if acpi is enabled

2008-03-12 Thread Uri Lublin
Without this patch when '-no-acpi' is added to the command line and the
user issues a 'system_powerdown' qemu monitor command, we get a segmentation
fault.

Signed-off-by: Uri Lublin <[EMAIL PROTECTED]>
---
 qemu/hw/acpi.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qemu/hw/acpi.c b/qemu/hw/acpi.c
index e44c8b5..9033ee2 100644
--- a/qemu/hw/acpi.c
+++ b/qemu/hw/acpi.c
@@ -530,7 +530,7 @@ i2c_bus *piix4_pm_init(PCIBus *bus, int devfn, uint32_t 
smb_io_base,
 #if defined(TARGET_I386)
 void qemu_system_powerdown(void)
 {
-if(pm_state->pmen & PWRBTN_EN) {
+if(pm_state && (pm_state->pmen & PWRBTN_EN)) {
 pm_state->pmsts |= PWRBTN_EN;
pm_update_sci(pm_state);
 }
-- 
1.5.4.2


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] PCI IO regions must be power of two

2008-03-12 Thread Uri Lublin
From: Marcelo Tosatti
>
>Index: kvm-userspace.hotplug2/qemu/hw/pci.c
>===
>--- kvm-userspace.hotplug2.orig/qemu/hw/pci.c
>+++ kvm-userspace.hotplug2/qemu/hw/pci.c
>@@ -236,6 +236,13 @@ void pci_register_io_region(PCIDevice *p
>
> if ((unsigned int)region_num >= PCI_NUM_REGIONS)
> return;
>+
>+/* IO region size must be power of two */
>+if (type == PCI_ADDRESS_SPACE_IO && (size & (size-1))) {

Why only for PCI IO regions ? Don't PCI memory regions have the same 
restriction ?

>+size = size << 1;
>+size &= size-1;

That would not make size a power of 2 (e.g. size=7 --> size=12).

>+}
>+

Regards,
Uri.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] no mouse

2008-03-12 Thread Uri Lublin
From: aGaTHoS
>CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4800+
>kvm version: 62
>kernel: 2.6.23-hardened-r7 (with gentoo standard and hardened patches, it is 
>anyway compiled without ssp and pie)
>arch: x86_64
>guest OS: various, windows XP and various linux livecds
>command line:
>
> 1 (windows) # kvm -hda /root/kvm/windows.img -m 192 -localtime -k es -net nic 
> -net tap,script=/etc/kvm/br1
>
> 2 (livecd f.e puppy) # kvm -hda /root/kvm/live.img -cdrom 
> /home/agathos/data/downloads/puppy-3.01-seamonkey.iso -boot d -name live -m 
> 192 -localtime -k es -std-vga -net nic >-net tap,script=/etc/kvm/br1
>
>with -no-kvm : it crashes after entering command
>
>-- 
>Hugo Amorós Salvador <[EMAIL PROTECTED]>
-
Hi,

I was able to reproduce the problem on an AMD machine (but not on an Intel 
machine).
(kvm-62, AMD, x86_64, fedora 7, puppy linux live guest)

Adding '-no-kvm' to the command line just made things slower (no crush).
Adding '-no-acpi' or '-clock unix' seems to workaround the mouse problem.

Uri.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


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
> index b3a241e..22a6283 100644
> --- a/libkvm/libkvm-x86.c
> +++ b/libkvm/libkvm-x86.c
> @@ -630,3 +630,10 @@ int kvm_disable_tpr_access_reporting(kvm_context_t kvm, 
> int vcpu)
>  }
>
>  #endif
> +
> +int kvm_pit_in_kernel(kvm_context_t kvm)
> +{
> +#ifdef KVM_CAP_PIT
> + return kvm->pit_in_kernel;
>   
#else
  return 0;
> +#endif
>   
> +}
> diff --git a/qemu/hw/i8254.c b/qemu/hw/i8254.c
> index c281680..0753ca9 100644
> --- a/qemu/hw/i8254.c
> +++ b/qemu/hw/i8254.c
> @@ -26,6 +26,8 @@
>  #include "isa.h"
>  #include "qemu-timer.h"
>
> +#include "qemu-kvm.h"
> +
>  //#define DEBUG_PIT
>
>  #define RW_STATE_LSB 1
> @@ -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, s);
> -s->irq = irq;
> +#ifdef KVM_CAP_PIT
>   
I  think you should remove the ifdef such that the if-statement is 
executed even if KVM_CAP_PIT
is not defined (in which case qemu pit emulation should be used).

> +if (!kvm_enabled() || !qemu_kvm_pit_in_kernel()) {
> + /* the timer 0 is connected to an IRQ */
> + s->irq_timer = qemu_new_timer(vm_clock, pit_irq_timer, s);
> + s->irq = irq;
> +}
> +#endif
>
>  register_savevm("i8254", base, 1, pit_save, pit_load, pit);
>
> diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c
> index 1122b87..4587a5c 100644
> --- a/qemu/hw/pc.c
> +++ b/qemu/hw/pc.c
> @@ -984,7 +984,13 @@ static void pc_init1(ram_addr_t ram_size, int 
> vga_ram_size,
>  ioapic = ioapic_init();
>  }
>  pit = pit_init(0x40, i8259[0]);
> +#ifdef KVM_CAP_PIT
>   
and here
> +if (!kvm_enabled() || !qemu_kvm_pit_in_kernel()) {
> +#endif
>  pcspk_init(pit);
> +#ifdef KVM_CAP_PIT
> +}
> +#endif
>  if (pci_enabled) {
>  pic_set_alt_irq_func(isa_pic, ioapic_set_irq, ioapic);
>  }
>

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [ANNOUNCE] kvm-62 release

2008-02-27 Thread Uri Lublin
From: [EMAIL PROTECTED] on behalf of Jim Paris
>>
>> - add file:// migration protocol (Uri Lublin)
>>
>>commit 70d2a9dc3594446f3ad66b32abc94c08b74118d4
>>Author: Uri Lublin <[EMAIL PROTECTED]>
>>Date:   Thu Feb 21 15:00:50 2008 +0200
>>
>>kvm: qemu: migration: added file:// migration protocol
>>
>>Instead of writing into a file with fork+exec, just open the file and
>>write the data. This solves a bug that sometimes not all the data was
>>kept in the state-file.
>>
>I haven't tested it yet, but this sounds like the problems I've always
>had with migration.  It seems this is just a new way to work around
>it, rather than an actual fix for the bug though -- won't exec: still
>have the same problem even when not writing to a file?  Was this
>ever tracked down any further?  Or is there a known reason why 
>"exec:dd" is expected to be broken?  I never had any luck finding it..
>
>-jim

Opening a file, and writing into it is simpler anyway.
I too do not know yet why "exec:dd" sometimes fails.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Clock off in guest

2008-02-13 Thread Uri Lublin
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wed 13/02/2008 14:52
To: Uri Lublin
Cc: kvm-devel@lists.sourceforge.net
Subject: RE: [kvm-devel] Clock off in guest
 
>> This would not work if you are using an old version of kvm ( with no
>> in-kernel-apic )
>> I recommend upgrading to kvm-60 (or latest linux kernel).
>
>Should I upgrade the guest kernel or the host kernel? My bet is the host
>kernel, but the clocksource=tsc applies to the guest, so I'm not really
>sure...

The host kernel or kvm.
If you choose to upgrade your host kernel (and kvm that comes with it), make 
sure 
you are using recent kvm-userspace too (e.g. kvm-60).

>> Or as an alternative, probably not as good, sometimes (when the guest's
>> clocksource is PIT) adding '-tdf' to the command line helps.
>
>I cannot find this in man kvm or man qemu.

I'm not sure about the man pages, but kvm/qemu's help says:
bash$ /usr/bin/kvm -h | grep tdf
-tdfinject timer interrupts that got lost

>Should I add this to the command line that starts the guest?

Yes, try adding it to the command line that starts the guest (executable name 
may vary):
   /usr/bin/kvm [kvm-params] -tdf

Also tdf (time drift fix) only works when using PIT+PIC (no APIC) so sometimes 
it's helpful
to also add -no-acpi:
   /usr/bin/kvm [kvm-params] -tdf -no-acpi


>
>Best,
>Koen


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Clock off in guest

2008-02-13 Thread Uri Lublin
From: [EMAIL PROTECTED] on behalf of Dan Kenigsberg
Sent: Wed 13/02/2008 13:25
To: Koen Vermeer
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] Clock off in guest
 
>On Wed, Feb 13, 2008 at 10:41:44AM +0100, Koen Vermeer wrote:
>> Hi,
>> 
>> I'm running an Linux AMD64 guest on an AMD64 host. The host is running a
>> 2.6.23 kernel (self compiled), the guest is running a stock
>> linux-image-2.6.22-3-amd64 Debian kernel.
>> 
>> My problem is that the clock on the guest is off (slow), while the clock
>> on the host seems to be OK. When doing 'time sleep 10' on the guest, it
>> takes about 16 'real' seconds for it to finish.
>
>What is the clock source of your guest? If it is the traditional PIT,
>you describe a known problem in busy hosts. You may try to set
>clocksource=tsc in the guest kerenl parameters.
>
>Regards,
>
>Dan.

Hi,

This would not work if you are using an old version of kvm ( with no 
in-kernel-apic )
I recommend upgrading to kvm-60 (or latest linux kernel).
Or as an alternative, probably not as good, sometimes (when the guest's 
clocksource is PIT) adding '-tdf' to the command line helps.

Uri.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] KVM migration problem on Ubuntu

2008-02-10 Thread Uri Lublin
From: Kay Hayen [mailto:[EMAIL PROTECTED]
Sent: Sun 10/02/2008 17:59
To: Uri Lublin
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] KVM migration problem on Ubuntu
Hello Uri,

thanks for the reply, that is going to work for me. I am indeed trying to:
Ubuntu Hardy Development as Host, Ubuntu Gutsy as Minimal,
kernel "linux-virtual".

> You are correct about the default network adapter emulated, it is now
> rtl8139, and not ne2000. If your guest is configured to use ne2000 network
> adapter, try adding to your command line "-net nic,model=ne2000" (replacing
> "-net nic"). Hope that helps,

If that's possible to re-activate the old network card, I will be able to
update the virtual machine again. Thanks a lot.

Yours,
Kay

--
Hi Kay,

The syntax I suggested before was incorrect. Please use "-net 
nic,model=ne2k_pci" to enable ne2000 nic emulation.

Regards,

Uri.



-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] script initiation and user access of host system

2008-02-09 Thread Uri Lublin
From: [EMAIL PROTECTED] on behalf of Bob Tennent
Sent: Fri 08/02/2008 17:54
To: kvm-devel@lists.sourceforge.net
Subject: [kvm-devel] script initiation and user access of host system



Hi. I want to be able to "connect" and initiate a guest in a *script*
(so it can be done automatically when the host boots), and then allow
users (without admin privileges) to access the guest graphically. Is
this a reasonable mode of operation? If so, how do I do it? If I call
qemu-kvm directly the -nographic option doesn't seem to do what I
expect. And I don't know how users can access the guest (graphically)
except by using virt-viewer, which seems to require that the guest have
been initiated by virt-manager.

Bob T.




 
Did you try using vnc ? 
Just add "-vnc :N" (e.g -vnc :10) to the command line when starting you VM, and 
let the user use "vncviewer :N" (e.g. vncviewer localhost:10) to 
graphically access the guest.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] KVM migration problem on Ubuntu

2008-02-09 Thread Uri Lublin
From: [EMAIL PROTECTED] on behalf of Kay Hayen
Sent: Sat 09/02/2008 14:12
To: kvm-devel@lists.sourceforge.net
Subject: [kvm-devel] KVM migration problem on Ubuntu

Hello people,


I have a Ubuntu gutsy minimal VM made as a testing environment for our system
software. In the mean time, I upgraded to Hardy, largely driven by the hope
that it will improve certain issues I had.

Well, but it seems, now the virtual machine no longer finds a network device
anymore. I think I saw that Ubuntu recently updated the linux-virtual kernel
in Hardy to include some rtl chip support. My suspect is that kvm changed the
network device it emulates?

Well, now I it seems I am stuck with an inaccessible VM. I tried to convert
with qemu-img to "raw", and then loop back mount as it says in the FAQ, but
it claims not an ext3 there. I would love to chroot into the machine to
update it, but I have no clue if that's possible.

Will I really need to find a Gutsy machine to transfer my VM to, in order to
update it? Or is there something that I am missing.

Yours,
Kay Hayen

-

Hi Kay
Just to be clear, are you trying to upgrade you host or your guest (VM) ? 
Please specify your Host CPU/OS and your guest OS.
What is the command line you are using to start your VM ?
What are the errors ?
You are correct about the default network adapter emulated, it is now rtl8139, 
and not ne2000.
If your guest is configured to use ne2000 network adapter, try adding to your 
command line "-net nic,model=ne2000" (replacing "-net nic").
Hope that helps,
Uri.
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Fedora 8 as kvm guest

2008-02-03 Thread Uri Lublin
Bob Tennent wrote:
> I'm experimenting with kvm on a Fedora 8 system. I've installed the
> necessary packages, have a suitable CPU etc. I'll eventually aim for
> a Windows guest, but am trying out a virtual Fedora 8 guest. When I
> try to install a Fedora guest, it threatens to wipe and re-partition
> the whole drive. It does this whether I specify an installation file
> or partition in virt-manager. Can I ignore this? I don't want my whole
> installation wiped. Is the hypervisor presenting the Fedora install with
> a file/parition and making it think it has a whole drive?
>
> Bob T.
>   

KVM guests see a virtual disk (which usually does not contain the host 
installation).
To be on the safe side use a disk-image-file and verify that your guest 
finds no partitions and specifically no linux partition where the host 
fedora is installed.
And/Or let us know the command line you are using.
And/Or use the following, taken from KVM Wiki, which is safe 
(location/name of executables may vary):

/usr/local/kvm/bin/qemu-img create -f qcow vdisk.img 10G
sudo /usr/local/kvm/bin/qemu-system-x86_64 -hda vdisk.img -cdrom 
/path/to/boot-media.iso \ 
   -boot d  -m 384

Uri

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Migration problems

2008-01-24 Thread Uri Lublin
Chris Lalancette wrote:
> All,
>  I've been doing some migration testing of KVM guests, and have been 
> running
> into some problems.  Let me describe the setup and what I've tried, and maybe
> somebody has some ideas about what might be going on here.
>
> When I try to do
> live migration this way, things seem like they work, and it even seems like a
> few instructions get executed on the destination side.  However, fairly 
> quickly
> I'll get "Disabling IRQ #11" on the console of the guest at the destination, 
> and
> the qemu process will just spin at 100%, with no interaction possible.  IRQ 
> #11,
> incidentally, is the IRQ associated with the emulated rtl8139 card.
>
> This led me to suspect the in-kernel PIC/APIC emulation, and, sure enough, if 
> I
> pass -no-kvm-irqchip (on both the source and destination), things are better; 
> I
> can at least migrate from the host to the destination without the "Disabling 
> IRQ
> #11" message.  However, if I put any sort of load on the guest while doing
> migration, I still get a hang-up, even with -no-kvm-irqchip.
>
> Has anyone else seen this, or have ideas where I can start debugging it?
>
> Thanks,
> Chris Lalancette
>   
Hi Chris,

I am chasing migration bug(s) too.
I think the problem lies in userspace and not in the kernel modules.
It seems that for kvm-56 migration works but for kvm-57 it does not.
The problem seems to be related to the qemu-cvs merge: 
25a2e04e5689af63d104de2dea755f30bf643afd
If you run it with -no-kvm migration seems to be working.

The test case I'm using is savevm/loadvm.
After a loadvm my FC6 guest gets double-fault ( -loadvm ).
Adding '-no-kvm-irqchip' does not help.
But if I start qemu in a stopped mode ( -S) and 'loadvm 
' in qemu-monitor, it works.
Sometimes after lodavm guest network does work better with '-no-kvm-irqchip'
I am trying to use bisection to find the problematic patch.

Thanks,
Uri.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH]: Make migration handle errors a little better

2008-01-24 Thread Uri Lublin


Chris Lalancette wrote:
> All,
>  Attached is a fairly simple patch to the migration code to make it handle
> errors better.  In particular, if the remote side wasn't set up properly (i.e.
> the memory size didn't match), the migration would fail, but the source host
> didn't actually react properly, so the migration would still be "in-progress".
> This patch fixes up the error checking to properly quit when the remote side
> isn't prepared for whatever reason.
>
> Signed-off-by: Chris Lalancette <[EMAIL PROTECTED]>
>   
Patch looks good.
Why did you define MIG_STAT_DIRTY_TRACK_FAIL and not 
MIG_STAT_KVM_SET_DIRTY_TRACKING_FAILED ?
Also we need to make sure, in case of a failure, that 'status' is  
updated and *s->has_error is freed. How about calling migrate_finish ?
Thanks,
Uri.
 

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] current kvm userspace git doesn't compile on i386

2008-01-15 Thread Uri Lublin
Christoph Hellwig wrote:
> On Sun, Jan 13, 2008 at 01:37:11PM +0200, Uri Lublin wrote:
>   
>> Try to build the kernel modules too (remove '--with-patched-kernel' from 
>> ./configure arguments ):
>> ./configure --prefix=/opt/kvm --qemu-cc=/usr/bin/gcc-3.4 ; make -C 
>> kernel LINUX= sync; make
>> You will have to rmmod current kvm modules and insmod the built modules 
>> under /kernel.
>> 
>
> This doesn't work with rsync complaining.  But I don't really want new
> kernel code anyway, and I would be very surprised if building a
> different kernel would fix a userspace link error given the obvious
> boundary between kernel and userspace code.
>   
I'm not suggesting to build the whole kernel, just the kvm-modules 
(instead of using the kvm-modules that came with linux).
It seems that your current kvm modules know nothing about vapic, while 
your kvm-userspace assumes they do.

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] current kvm userspace git doesn't compile on i386

2008-01-13 Thread Uri Lublin
Christoph Hellwig wrote:
> Current kvm userspace git configured with ./configure --prefix=/opt/kvm 
> --with-patched-kernel --qemu-cc=/usr/bin/gcc-3.4 gives:
>
> /usr/bin/gcc-3.4  -L /home/hch/work/kvm-userspace/qemu/../libkvm  -g -o 
> qemu-system-x86_64 vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o 
> migration.o block-raw-posix.o lsi53c895a.o usb-ohci.o eeprom93xx.o eepro100.o 
> ne2000.o pcnet.o rtl8139.o hypercall.o virtio.o virtio-net.o virtio-blk.o 
> ide.o pckbd.o ps2.o vga.o sb16.o es1370.o dma.o fdc.o mc146818rtc.o serial.o 
> i8259.o i8254.o pcspk.o pc.o cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o 
> usb-uhci.o vmmouse.o vmport.o vmware_vga.o extboot.o gdbstub.o 
> ../libqemu_common.a libqemu.a 
> /home/hch/work/kvm-userspace/qemu/../libkvm/libkvm.a  -lm -lz -lkvm -lgnutls  
>  -L/usr/lib -lSDL  -lrt -lpthread -lutil
> libqemu.a(kvm-tpr-opt.o): In function `enable_vapic':
> /home/hch/work/kvm-userspace/qemu/kvm-tpr-opt.c:221: undefined reference to 
> `kvm_enable_vapic'
> libqemu.a(kvm-tpr-opt.o): In function `kvm_tpr_opt_setup':
> /home/hch/work/kvm-userspace/qemu/kvm-tpr-opt.c:287: undefined reference to 
> `kvm_enable_tpr_access_reporting'
> collect2: ld returned 1 exit status
> make[2]: *** [qemu-system-x86_64] Error 1
> make[2]: Leaving directory
> `/home/hch/work/kvm-userspace/qemu/x86_64-softmmu'
> make[1]: *** [subdir-x86_64-softmmu] Error 2
> make[1]: Leaving directory `/home/hch/work/kvm-userspace/qemu'
> make: *** [qemu] Error 2
>   
Try to build the kernel modules too (remove '--with-patched-kernel' from 
./configure arguments ):
./configure --prefix=/opt/kvm --qemu-cc=/usr/bin/gcc-3.4 ; make -C 
kernel LINUX= sync; make
You will have to rmmod current kvm modules and insmod the built modules 
under /kernel.


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] kvm 58 and vncviewer

2008-01-03 Thread Uri Lublin
Jerry Geis wrote:
> Anthony Liguori wrote:
>   
>> Jerry Geis wrote:
>> 
>>> I have kvm-amd working fine.
>>>
>>> when I am at my desktop everything works normal.
>>> However, when I vncviewer into my desktop and startup my
>>> session I mouse over the XP desktop but I cannot click in the desktop
>>> and make it active. I get the little square mouse pointer.
>>>
>>> I have to do the crl-alt to release the mouse but I cannot click into 
>>> the desktop
>>> to run anything.
>>>   
>>>   
>> vncviewer does not do mouse grab so I'm not terribly sure what you're 
>> talking about.  Are you sure you're using vncviewer and not SDL?
>>
>> Regards,
>>
>> Anthony Liguori
>>
>> 
>>> What might I be missing?
>>>
>>> jerry
>>>
>>> - 
>>>
>>>   
>
> Anthony,
>
> I dont exactly know what SDL is.
>
> All I know is when I am at my desk everything is working fine...
> Then I go home and use "vncviewer machine" to remote into my desktop.
> Everything runs normal of course but when I select my minimized kvm session,
> it maximizes but I cannot click in the XP session to give it focus. All 
> I get is the
> little square mouse pointer like you get when you move the mouse off the 
> kvm window
> and kvm has grabbed the mouse. I cannot ever select anything in the XP 
> window accessing my
> machine with vncviewer.
>
> I am using centos 5.1 and now kvm-59.
>
> Jerry
>   
What is the command line you are using ?
If there is no '-vnc' in your kvm command line, try adding '-vnc :50', 
meaning: /usr/bin/kvm -hda ... -vnc :50
And from your home machine try vncviewer :50

Another option is use F8 and mark "alt" and "ctrl" then press 1, another 
F8 and unmark "alt" and "ctrl"

Hope that helps,
Uri.


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Is there any way to get Windbg to work with QEMU/KVM?

2007-12-13 Thread Uri Lublin
[EMAIL PROTECTED] wrote:
> G'day folks.
>
> After blindly trying applying an oldish QEMU patch mentioned here
> (http://www.damogran.de/blog/archives/14-WinDbg-and-QEMU.html) I got ever
> so slightly further, to the point that I reached the Windbg command prompt
> and could enter commands (e.g. '.dl'). All I got back were sporadic errors
> such as "couldn't find KTHREAD entry at blah" and other "it's nae workin'
> cap'n" sort of messages.
>
> Can it be made to work? Others seem to have claimed to have done it. Seems
> I am so near but so far!
>   
Try hacking qemu/qemu-kvm.c:pre_kvm_run() with something like that:

+#if 1
+#define MIN_CYCLE_COUNT 100
+   {
+static int cycle_count;
+ 
+   if (++cycle_count > MIN_CYCLE_COUNT) {
+cycle_count = 0;
+return 1;
+}
+   }
+#endif



-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] fix -kernel option

2007-12-09 Thread Uri Lublin
Glauber de Oliveira Costa wrote:
> Currently, the -kernel option is not working.
>
> Reason is, because we're registering chunks for regions 0-0xa and
> 0x10-ram_size, the phys_ram_addr + PA is broken.
> The real fix should be to rewrite all the load_linux() code to not rely
> on this, but meanwhile, filling in the gap up to 0xc - the beginning
> of extended memory - makes it work again
>
> Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]>
> ---
>  qemu/hw/pc.c |   11 ---
>  1 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/qemu/hw/pc.c b/qemu/hw/pc.c
> index 6c71b09..e4a5f2d 100644
> --- a/qemu/hw/pc.c
> +++ b/qemu/hw/pc.c
> @@ -725,13 +725,18 @@ static void pc_init1(ram_addr_t ram_size, int 
> vga_ram_size, int boot_device,
>  #ifdef USE_KVM
>   #ifdef KVM_CAP_USER_MEMORY
>  if (kvm_allowed && kvm_qemu_check_extension(KVM_CAP_USER_MEMORY)) {
> +ram_addr = qemu_ram_alloc(0xa);
> +cpu_register_physical_memory(0, 0xa, ram_addr);
> +kvm_cpu_register_physical_memory(0, 0xa, ram_addr);
> +
> + /* move the pointer up to 0xc, which is the next
> +   address we'll touch */
> +qemu_ram_alloc(0x2);
> +
>   
Actually the next address we'll touch (see the following lines) is 0x10.
So maybe replace the last line above with "qemu_ram_alloc (0x10 - 
0xa);"
>  ram_addr = qemu_ram_alloc(ram_size - 0x10);
>  cpu_register_physical_memory(0x10, ram_size - 0x10, 
> ram_addr);
>  kvm_cpu_register_physical_memory(0x10, ram_size - 0x10,
>   ram_addr);
> -ram_addr = qemu_ram_alloc(0xa);
> -cpu_register_physical_memory(0, 0xa, ram_addr);
> -kvm_cpu_register_physical_memory(0, 0xa, ram_addr);
>  } else
>   #endif
>  #endif
>   

-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] QEMU/KVM reboot after loading from statefile

2007-12-06 Thread Uri Lublin
Lukasz Lempart wrote:
> Hi,
>
> I am having a problem with starting qemu/kvm from a previously saved 
> statefile. qemu/kvm starts and the console output is the same as when 
> I initially stopped the vm and saved state. However, after a 'cont' 
> the guest reboots (i.e. takes me back to the grub menu).
>
> The specs for my setup are as follows:
>
> kvm version: 55 (same issue with 52, and when attempted with 44 
> instead of going back to the grub screen the vm would just freeze)
>
> Is this a known bug, or am I doing somethign wrong (i.e. using an 
> incompatible kernel version)?
> Any help would be greatly appreciated as I am attempting to get this 
> working for a school project. Please e-mail me at [EMAIL PROTECTED] 
>  with any suggestions/solutions to the 
> problem (I am not currently a member of the mailing list).
>
> Thank you in advance for all your help.
>
> Lukasz Lempart
It is a known bug.  Migration is currently broken. I'm working on it.


-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Strange network behaviour

2007-12-05 Thread Uri Lublin
Mike wrote:
> You can download the requested trace at
> http://www.eliteserver.biz/trace.tar.gz
>
> the peaks were around 12:04:30
>
> Mike
>
> Avi Kivity schrieb:
>   
>> Mike wrote:
>> 
>>> Avi Kivity schrieb:
>>>   
 Mike wrote:
 
> Now I noticed a strange behaviour.
> I have a gameserver running in a guest os. No problems on performance 
> side, really fast.
> The only thing, when I make a ping test after unspecific time periods I 
> get this: (this peaks are even there if the gameserver isn't running)
>
>
> As you can see, no peaks.
> Example of start command from a guest:
> kvm -hda apache.img -hdb apache_storage.img -m 512 -boot c -net 
> nic,vlan=0,macaddr=00:16:3e:00:00:01,model=rtl8139 -net tap -nographic 
> -daemonize
>
> Here the pings from the guest started with the command line listed above:
>
>Reply from 195.24.77.171: bytes=32 time=37ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=37ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=97ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=60ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=186ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=363ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=368ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=972ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=673ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=1133ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=1198ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=1881ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=2341ms TTL=57
>Reply from 195.24.77.171: bytes=32 time=2401ms TTL=57
>   
>> Ok.  How long does it take for the latency to appear?  If it isn't too 
>> long, please run kvm with
>>
>>strace -fF -ttT -o /tmp/trace kvm ...
>>
>> Note the time that latency appears so we can correlate with the logs.  
>> Be aware the logs can be quite large, so make sure you have some disk 
>> space ready.
>> 
>
Does using a different clock helps ( add "-clock hpet" or "-clock rtc" 
or "-clock unix" to kvm command line) ?

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] VM Snapshots ?

2007-12-03 Thread Uri Lublin



> From: Slohm Gadaburi [mailto:[EMAIL PROTECTED]
> On 12/3/07, Uri Lublin <[EMAIL PROTECTED]> wrote:
> > > From: [EMAIL PROTECTED] on behalf of Slohm Gadaburi
> > > I want to use VM Snapshots.. But I read QEMU's docs saying
> > > that one must use qcow2 file image for that. The problem is that
> > > My Ubuntu 7.04-based qemu-img (v 0.8.2) has only qcow...
> >
> > With qemu v 0.8.2 one can save/load the VM state into/from a file (using
> > monitor commands savevm/loadvm)
> > This is not a "real" VM snapshot, as the disk image changes when the guest
> > runs, but it works fairly well.
> 
> Can you please elaborate on that ?
> Can I use savevm to save the current running state of my machine, and
> later restore the exact state using loadvm (with qcow) ?
> Let's say I use -snapshot mode, so I am guranteed my image does not
> change... so is this a real VM snapshot ?

Qemu (v 0.8.2) monitor command "savevm" does not save the state of the disk 
(your qcow image).
If you stop+savevm+quit, and the next time you run your guest you loadvm+cont, 
then you are safe.
If you savevm and continue running the guest, the disk changes and the next 
loadvm may fail.

If you use -snapshot, then the snapshot's temporary disk file is part of the 
disk state (a part which is not saved), which means 
that even "stop, savevm, quit, start, loadvm, cont" may not work correctly. In 
other words everything
your guest have written to (local temporary) disk disappears.
Think of a case when you run with -snapshot and download the newly released 
DVD-iso of your favorite linux distribution.
Would you expect to find that iso file after savevm/quit/loadvm ?
You'd probably not find it and your snapshot image's file system would be 
corrupted.
Think of a case when your guest runs a database server...

I hope that helps.
Uri.
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] VM Snapshots ?

2007-12-03 Thread Uri Lublin



> From: [EMAIL PROTECTED] on behalf of Slohm Gadaburi
> Sent: Mon 03/12/2007 12:10
> To: kvm-devel@lists.sourceforge.net
> Subject: [kvm-devel] VM Snapshots ?
>  
> Hi all..
> 
> I want to use VM Snapshots.. But I read QEMU's docs saying
> that one must use qcow2 file image for that. The problem is that
> My Ubuntu 7.04-based qemu-img (v 0.8.2) has only qcow...
> 
> thank you
> slohm

With qemu v 0.8.2 one can save/load the VM state into/from a file (using 
monitor commands savevm/loadvm)
This is not a "real" VM snapshot, as the disk image changes when the guest 
runs, but it works fairly well.
A theoretical, never-tried, possibly disk-consuming method for creating "real" 
VM snapshot is:
  1. create a new "snapshot" image S1 based on the original image S0 (using 
"qemu-img create -b S0 -f qcow S1 ")
  2. start the guest with that image ("-hda S1")
When you want to create a snapshot: from qemu monitor
  3. stop
  4. savevm PATH_TO_SAVED_STATE_DIR/state1
  5. quit
  6. copy S1 to a S2
S1+state1 is the VM snapshot
To continue running the guest: From linux shell
  7. start the guest with S2 image and in stopped mode ("-S" command line 
argument)
>From qemu monitor
  8. loadvm PATH_TO_SAVED_STATE_DIR/state1
  9. cont

To go back to your VM snapshot, follow steps 7-9 when using S1 instead of S2.

Uri.
-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Compile problem with GIT repo on Scientific Linux

2007-11-22 Thread Uri Lublin

Thanks for reporting the problem.

You do not need to "make -C kernel sync" with kvm-tarballs.

For more information look at http://kvm.qumranet.com/kvmwiki/HOWTO -- 
"Unpacking and configuring kvm components"

Uri.

-Original Message-
From: [EMAIL PROTECTED] on behalf of Cam Macdonell
Sent: Thu 22/11/2007 00:49
To: kvm-devel
Subject: [kvm-devel] Compile problem with GIT repo on Scientific Linux

Hi,



The kvm-53 tarball works fine, but something is getting misconfigured 
when I run  "make -C kernel sync". 

Thanks,
Cam


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] unhandled vm exit on kvm36 with Etch 32 guest on AMD64

2007-09-10 Thread Uri Lublin

Using kvm-37, I was able to install a debian guest using 
debian-40r0-i386-DVD-1.iso, and run it, on both AMD and Intel machine.
My hosts are both running Fedora 7 with linux kernel versions 2.6.21-1 
and 2.6.23-rc3.

Does your guest boot when adding '-no-kvm' to the command line ?

Uri.


Joseph Wolff wrote:
> Hello,
>
> I'm getting "unhandled vm exit:0xb8002" running a Debian Etch guest 
> under kvm36 on AMD64.
>
> The host is a 4-core dual-dual AMD, and I was able to create the Debian 
> Etch (4.0) guest image just fine, using a standard install, from the 
> standard Debian DVD disc1: debian-40r0-i386-DVD-1.iso
>
> Distro is Ubuntu Gutsy, kernel is brand-new 2.6.22-11-server from the 
> Gutsy repo. The KVM36 was installed via apt-pinning from the Debian 
> (sid) repo (they're compatible - dependencies all met). The KVM36 is the 
> only thing from the sid repo.
>
> I originally upgraded to kvm36 because I was having this problem on the 
> default Gutsy kvm28, and the Guest Status page for Etch says kvm29 works 
> (albeit with Intel), but this is the same error I was getting with kvm28.
>
>
> Here's the commandline and the subsequent regdump:
>
> [EMAIL PROTECTED]:/vm/143#  kvm -vnc :1 -k en-us -net 
> nic,macaddr=de:ad:be:ef:01:43 -net tap -monitor 
> telnet::23143,server,nowait,nodelay -cdrom 
> /iso/debian-40r0-i386-DVD-1.iso -append vga=771 debian-40r0-i386.8G.qc2
>
> In /etc/kvm/kvm-ifup, adding: tap0
>
> unhandled vm exit:  0xb8002
> rax c0318000 rbx 0fa0 rcx 0fa0 rdx 
> c00b8000
> rsi c00b8000 rdi c110a980 rsp c0319fb8 rbp 
> c110a980
> r8   r9   r10  r11 
> 
> r12  r13  r14  r15 
> 
> rip c01bc276 rflags 0206
> cs 0060 (/ p 1 dpl 0 db 1 s 1 type b l 0 g 0 avl 0)
> ds 007b (/ p 1 dpl 3 db 1 s 1 type 2 l 0 g 1 avl 0)
> es 007b (/ p 1 dpl 3 db 1 s 1 type 3 l 0 g 1 avl 0)
> ss 0068 (/ p 1 dpl 0 db 1 s 1 type 2 l 0 g 1 avl 0)
> fs  (/ p 0 dpl 0 db 0 s 0 type 0 l 0 g 0 avl 0)
> gs  (/ p 0 dpl 0 db 0 s 0 type 0 l 0 g 0 avl 0)
> tr 0080 (c11006c0/2073 p 1 dpl 0 db 0 s 0 type 9 l 0 g 0 avl 0)
> ldt 0088 (c0352020/0027 p 1 dpl 0 db 0 s 0 type 2 l 0 g 0 avl 0)
> gdt c1109000/ff
> idt c030f000/7ff
> cr0 80050033 cr2 0 cr3 34f000 cr4 690 cr8 0 efer 0
> Aborted
> [EMAIL PROTECTED]:/vm/143#
>
>
>
> Let me know,
>
> Cheers,
> joe
>
>
>
> -
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
> ___
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>   

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] frozen winXP on kvm after savevm

2007-08-19 Thread Uri Lublin

The attached patch should help.

Shahar Livne wrote:

Hello list,

I am running winXP English on the kvm, and sometimes after savevm when 
starting with loadvm - it starts frozen (the process takes 100% CPU and 
the target OS is not responsive).


The command line to run qemu (while kvm-intel is loaded) that I use is:

/usr/local/kvm/bin/qemu-system-x86_64 -hda winxp.qcow2 -L 
/usr/local/kvm/share/qemu/ -usbdevice tablet -no-rtc  -m 256 -localtime 
-net none -vnc :0 -serial /dev/null -parallel /dev/null -monitor 
unix:/tmp/monitor-qemu.sock,server,nowait -S


Then I send commands to the monitor, the moment it is available:
loadvm 1
cont

And after few mouse moves and clicks (using vncviewer) I save the vm:
stop
delvm 1
savevm 1
quit

After 1-3 iterations of the above procedure, the system starts frozen.



Remarks:

1. I currently use kvm-35

2. The symptom is the same when I start already with -loadvm 1 and 
without -S


3. I have tried to run it with -no-kvm and it seems _not_ to freeze (few 
tens of experiments).


4. I have tried with kvm, but without -usbdevice tablet and it seems 
_not_ to freeze.


5. The presence of this problem has been verified on kvm-28,32,33,35.

6. Once a qcow2 image gets frozen, running it again and again doesn't 
'fix' the problem.


7. I had a workaround, that often worked - run loadvm 1 again. Then the 
system gets again operational. This method does not always work though.


8. Same problem happened with other windows OS (2000, and other 
languages) as well.


9. Nothing relevant in dmesg


While frozen, I ran 'info cpus' few times on the monitor:
info cpus
(qemu) info cpus
* CPU #0: pc=0x806d5cbc
* CPU #0: pc=0x806d5cec
* CPU #0: pc=0x806d563c
* CPU #0: pc=0x806d57f9
* CPU #0: pc=0x806d5cec
* CPU #0: pc=0xf9c89f55
* CPU #0: pc=0x806d57f4
* CPU #0: pc=0x81719a54
* CPU #0: pc=0x806d57f4
* CPU #0: pc=0x806d5caa
* CPU #0: pc=0x806d5caa
* CPU #0: pc=0x806d5cf0
* CPU #0: pc=0x806d5cec
* CPU #0: pc=0x806d5caa
* CPU #0: pc=0x806d563c
* CPU #0: pc=0x806d563c
* CPU #0: pc=0x806d57f4

I can see that some addresses repeat and it is kind of a loop, but I 
have no idea what part of winXP is running then. I could only guess that 
it has to do with usb, since the presence of -usbdevice tablet makes a 
difference.
The whole problem is probably some race condition caused during savevm 
(qcow2) while kvm and usb devices are present.


Running 'info registers' on the monitor few times gives a constant result:

info registers
EAX=0062 EBX=2002 ECX=0012 EDX=80548dd8
ESI=80551920 EDI=81719a18 EBP=80548de0 ESP=80548dc8
EIP=806d5cf0 EFL=0002 [---] CPL=0 II=0 A20=1 SMM=0 HLT=0
ES =0023   00c0f300
CS =0008   00c09b00
SS =0010   00c09300
DS =0023   00c0f300
FS =0030 ffdff000 1fff 00c09300
GS =   
LDT=   
TR =0028 80042000 20ab 8b00
GDT= 8003f000 03ff
IDT= 8003f400 07ff
CR0=e001003b CR2=e10e8000 CR3=007db000 CR4=06f8
FCW=027f FSW=0120 [ST=0] FTW=00 MXCSR=
FPR0=0007502c  FPR1=3d64050b a3ae
FPR2=4ea90006c4ff c1a0 FPR3=5c11 519a
FPR4=0007f86c0ebe  FPR5= 
FPR6=ff7d 400e FPR7=ccc9a000 4019
XMM00=607a60407c9106eb 
XMM01=010f08710f31
XMM02=03ad 
XMM03=
XMM04=0c0a02ff3911 
XMM05=012f01a4
XMM06=0162000c0518000d 
XMM07=



Hardware:
Intel(R) Xeon(R) CPU E5310  @ 1.60GHz (2*quad)

Software:
RedHat Enterprise 5
Linux 2.6.18-8.1.6.el5 #1 SMP Fri Jun 1 18:52:13 EDT 2007 x86_64 x86_64 
x86_64 GNU/Linux


Any idea of why it happens or how to avoid it?

Regards,

Shahar Livne


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel
  
commit 93f590514fa96dedc02274183fd1c57fcbba6fdc
Author: Uri Lublin <[EMAIL PROTECTED]>
Date:   Mon Jul 23 11:57:33 2007 +0300

migration: save/load usb devices (specifically mouse/tablet)

Taken (slightly modified) from xen (hg 14366:2955b0677310 Tim Deegan)
Signed-off-by: Uri Lublin <[EMAIL PROTECTED]>

diff --git a/qemu/hw/usb-hid.c b/qemu/hw/usb-hid.c
index bde3a7c..d24a959 100644
--- a/qemu/hw/usb-hid.c
+++

Re: [kvm-devel] migration with exec giving truncated images

2007-08-09 Thread Uri Lublin

Thanks for the patches.

There is still the mystery of different file sizes for different 
migration-exec commands, all files are "valid saved image".
It seems to me that some unmodified pages are being marked as dirty, and 
are being saved twice (and later loaded twice).
I'm still chasing that.

Uri.

Jim Paris wrote:
> I think I've (finally!) tracked it down.  See the attached patches.
>
> The main problem is this: when using "-monitor pty", all incoming
> commands are terminated with CRLF even though they were sent with just
> LF, probably because of the pty layer somewhere.  When qemu's readline
> gets CR and LF without calling readline_start() in between, it
> executes the same command twice in a row, which meant that _two_
> migrations were running concurrently.
>
> -jim
>
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> ___
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>   

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] migration with exec giving truncated images

2007-08-08 Thread Uri Lublin

I've never encountered that problem.
I haven't used "exec" migration protocol too many times though.
I have not used libvirt too many times either.
I'll look into it too.

Thanks,
Uri.

Jim Paris wrote:
> I wrote:
>   
>> It's almost as if migrate_write() is being called after
>> migrate_finish() ??
>> 
>
> Yes, I'm definitely seeing this -- migrate_finish followed by
> migrate_write, which causes a segfault (and explains my truncated
> images).  Unfortunately I'm not at all familiar with this code, and
> all the qemu I/O handler stuff is still confusing to me.  Does anyone
> with some experience in this area have some time to help track this
> down?
>
> -jim
>
> -
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> ___
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>   

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] kvm+virtmanager can't save machine state?

2007-07-02 Thread Uri Lublin
Actually, although not intended (and was not tested), KVM's migration 
capability enables save/restore of non-qcow images.
I used it to debug the migration code.
Please look at the bottom of http://kvm.qumranet.com/kvmwiki/Migration 
("savevm/loadvm to an external state file").
BTW, my little trick also works for "live" savevm/loadvm (kids don't try 
this at home).
Hope that helps,
Uri.

Daniel P. Berrange wrote:
> On Fri, Jun 29, 2007 at 04:05:22PM +0800, youhongyu wrote:
>   
>> hi all,
>>
>> i use: fc7, built in xen, kvm.
>> i boot my machine into normal kernal and install a guest os by vir-manager, 
>> and i encounter a strange situation  the "save" command from virtual-
>> manager menu failed! it pop out a small windows seem want to tell me 
>> something, but it quickly disappeared. what's thing happens?
>> 
>
> The window shouldn't have disappeared like that - it should have told
> you that this isn't supported
>
> We can't support save/restore of  KVM guests in virt-manager at this
> time. QEMU 0.9.0 was really very unhelpful and removed the ability specify
> a filename for saving VM state, assuming that everyone happens to be using
> a qcow file :-( Not much use if you are using raw files, or physical volumes,
> or LVM which are the primary storage types used in virt-manager currently.
>
> Dan.
>   

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Migration and disk-image filesystem semantics?

2007-04-19 Thread Uri Lublin
You are correct. The disk image(s) must be available to both the sending and 
receiving qemu/kvm processes. Otherwise, we would have to copy (or rsync if a 
base copy exists) the disk image. This copy operation would usually take a long 
time as the image is very big.
Also, writing to temporary local files (e.g. -snapshot) would fail the 
migration process.
 
Before transferring the VM state, the migration code makes sure all IO 
operations to disk have been completed (waiting for aio/BH operations to 
complete, which does not mean all the way to the disk yet), and calls fsync on 
the disk image file descriptor (bdrv_flush). It is assumed that the file system 
flushes all data to disk when fsync is requested.
 
Theoretically, I should add a close/open synchronization too.
 


From: [EMAIL PROTECTED] on behalf of Troy Benjegerdes
Sent: Fri 20/04/2007 00:39
To: kvm-devel@lists.sourceforge.net
Subject: [kvm-devel] Migration and disk-image filesystem semantics?



The kvm migration wiki seems to imply (but not directly state) that the
disk image file must be on a shared filesystem for both the sending and
the receiving kvm/qemu processes.

Is this correct? And if so, what are the semantics that kvm/qemu
requires of the filesystem hosting the image? Is there any
locking/synchronization/flushing that goes on?

--
--
Troy Benjegerdes'da hozer'[EMAIL PROTECTED] 

Somone asked me why I work on this free (http://www.fsf.org/philosophy/)
software stuff and not get a real job. Charles Shultz had the best answer:

"Why do musicians compose symphonies and poets write poems? They do it
because life wouldn't have any meaning for them if they didn't. That's why
I draw cartoons. It's my life." -- Charles Shultz

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] kvm-18 breaks Cisco VPN on WinXP SP1

2007-03-30 Thread Uri Lublin
When using rtc to keep qemu/host time, which is the default, qemu gets 
periodically SIGIO signals.



From: [EMAIL PROTECTED] on behalf of Avi Kivity
Sent: Fri 30/03/2007 09:48
To: Leslie Mann
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] kvm-18 breaks Cisco VPN on WinXP SP1



Leslie Mann wrote:
> That works.  Here is the last 100 lines from the strace capture. Letme know if
> there is anything else you need.
>  

[...]

> 21:05:48.736568 clock_gettime(CLOCK_MONOTONIC, {1334, 970496230}) = 0 
> <0.10>
> 21:05:48.736618 sigreturn() = ? (mask now []) <0.08>
> 21:05:48.736707 ioctl(10, 0xae80, 0)= 0 <0.22>
> 21:05:48.736767 ioctl(10, 0xae80, 0)= 0 <0.000544>
> 21:05:48.744119 --- SIGIO (I/O possible) @ 0 (0) ---
> 21:05:48.744146 clock_gettime(CLOCK_MONOTONIC, {1334, 978076521}) = 0 
> <0.10>
> 21:05:48.744200 sigreturn() = ? (mask now [INT QUIT TRAP FPE KILL
> SEGV TSTP URG SYS RTMIN]) <0.10>
> 21:05:48.744285 --- SIGSEGV (Segmentation fault) @ 0 (0) ---
>  

The SIGIO means some I/O has occured, but what exactly, we don't know. 
Can you generate a core, attach it with gdb, and generate a backtrace?

Check the backtrace for signs of your password and delete them if
found.  It shouldn't be there, but then it shouldn't crash either.

--
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] KVM-17 & WinXP network setup hangs

2007-03-20 Thread Uri Lublin
Hi,
Do you use a software bridge and a tun/tap device ?
If you do, what is your network configuration (host + guest) ?
If you do not, search the list to find how to do it.
You'll need to setup a bridge (either manually or using an init script posted), 
and add a '-net tap,script=/etc/kvm/qemu-ifup' to qemu command line. 
 
Hope that helps,
Uri.
 


From: [EMAIL PROTECTED] on behalf of Alessandro Sardo
Sent: Tue 20/03/2007 17:23
To: kvm-devel@lists.sourceforge.net
Subject: [kvm-devel] KVM-17 & WinXP network setup hangs



Hello KVM devs,

I've just downloaded and checked out KVM-17. I tried
installing a Windows XP SP2 guest, using the following
script (notice how I did NOT use the '-no-acpi' flag):

qemu -hda /var/vm/img/WinXP.img -cdrom
/var/vm/iso/WinXP.iso -boot d -m 512


<...snipped...>

This is where I got the big problem: after installing the
devices and asking for the cd-key (among other things),
the guest totally *stalled* while configuring the network.
It just says "Installing the network...", but the progress
bar is frozen - and there's no output on the shell. I've
also tried with the '-net nic,model=rtl8139' flag, but the
result was the same. I'm unable to complete the
installation.

Is there a work-around for this?

Thanks!


- Alessandro


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] savevm causes 'Bus error'

2007-03-08 Thread Uri Lublin
Hi Jon,

It seems KVM's savevm/loadvm has been broken since the upgrade to version 0.9.0 
of QEMU.
Please apply the attached patch and retry.

Currently, saved images (aka snapshots) of QEMU are not compatible with those 
of KVM, and vice versa.
In other words if you savevm a VM started with '-no-kvm' (or a pure QEMU) you 
must
start the new VM with '-no-kvm' to be able to successfully loadvm the saved 
image.

Regards,
Uri

-Original Message-
From: [EMAIL PROTECTED] on behalf of Jon
Sent: Thu 08/03/2007 14:31
To: kvm-devel@lists.sourceforge.net
Subject: [kvm-devel] savevm causes 'Bus error'
 
Hi

I'd like to savevm/loadvm the state of my win2k virtual machine.

This works fine with qemu or with kvm using the -no-kvm switch. But
when kvm is enabled, issuing "savevm" causes a crash. All I get is the
message "Bus error" on the console.

If I try to restore a previously saved state with kvm, I get a different crash:

qemu: warning: error while loading state for instance 0x0 of device 'ram'
unhandled vm exit:  0x8021
rax 6010 rbx 00060784 rcx 00b6 rdx
00307ae3
rsi ac2f rdi 0600 rsp 00067ff6 rbp
00060e14
r8   r9   r10  r11

r12  r13  r14  r15

rip 03a8 rflags 0002
cs 0058 (0002/ p 1 dpl 0 db 0 s 1 type a l 0 g 0 avl 0)
ds 0060 (00022ac0/ p 1 dpl 0 db 0 s 1 type 2 l 0 g 0 avl 0)
es 0060 (00022ac0/ p 1 dpl 0 db 0 s 1 type 2 l 0 g 0 avl 0)
ss 0060 (00022ac0/ p 1 dpl 0 db 0 s 1 type 2 l 0 g 0 avl 0)
fs 0060 (00022ac0/ p 1 dpl 0 db 0 s 1 type 2 l 0 g 0 avl 0)
gs 0060 (00022ac0/ p 1 dpl 0 db 0 s 1 type 2 l 0 g 0 avl 0)
tr 0028 (00023ff0/0077 p 1 dpl 0 db 0 s 0 type 9 l 0 g 0 avl 0)
ldt  (/ p 1 dpl 0 db 0 s 0 type 0 l 0 g 0 avl 0)
gdt 36000/3ff
idt 36400/7ff
cr0 6010 cr2 0 cr3 3 cr4 0 cr8 0 efer 0
cirrus_vga_load: REAL_VRAM_SIZE MISMATCH !! SAVED=4194304
CURRENT=4194304Aborted

Any ideas? This is my first attempt at kvm so I may have missed
something. I'm using: a Core Duo cpu, kvm-16, and the Debian etch
2.6.18 kernel.

Thanks!

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel



Index: qemu/vl.c
===
--- qemu/vl.c	(revision 4510)
+++ qemu/vl.c	(working copy)
@@ -5732,6 +5732,10 @@
 if (ram_compress_open(s, f) < 0)
 return;
 for(i = 0; i < phys_ram_size; i+= BDRV_HASH_BLOCK_SIZE) {
+#ifdef USE_KVM
+if (kvm_allowed && (i>=0xa) && (i<0xc)) /* do not access video-addresses */
+continue;
+#endif
 #if 0
 if (tight_savevm_enabled) {
 int64_t sector_num;
@@ -5804,6 +5808,10 @@
 if (ram_decompress_open(s, f) < 0)
 return -EINVAL;
 for(i = 0; i < phys_ram_size; i+= BDRV_HASH_BLOCK_SIZE) {
+#ifdef USE_KVM
+if (kvm_allowed && (i>=0xa) && (i<0xc)) /* do not access video-addresses */
+continue;
+#endif
 if (ram_decompress_buf(s, buf, 1) < 0) {
 fprintf(stderr, "Error while reading ram block header\n");
 goto error;
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


[kvm-devel] Live Migration support for KVM

2007-02-25 Thread Uri Lublin
Hi,

FYI, as of last Thursday, KVM supports live migration.
The migration code is based on Anthony Liguori's live migration patch for Qemu; 
Thanks Anthony.
I added the part needed for KVM (based on KVM's dirty pages logging written by 
Avi).

Regards,
Uri.
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] kvm 12 windows XP network

2007-01-30 Thread Uri Lublin

Please run the following commands and report their output:
  rpm -q bridge-utils
  /sbin/lsmod | grep bridge
  /usr/sbin/brctl show
  /sbin/ip route list | grep default

-Original Message-
From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED]
Sent: Tue 30/01/2007 13:26
To: Dor Laor
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] kvm 12 windows XP network
 

Sorry, I did not understand !
Could me explain what I must put in the quemu-ifup script ?
I am using the original supplayed by kvm svn !!!

Thanks

- Messaggio da [EMAIL PROTECTED] -
Data: Tue, 30 Jan 2007 03:08:20 -0800
Da: Dor Laor <[EMAIL PROTECTED]>
Rispondi-A: Dor Laor <[EMAIL PROTECTED]>
Oggetto: RE: [kvm-devel] kvm 12 windows XP network
  A: [EMAIL PROTECTED], kvm-devel@lists.sourceforge.net


>> Good morning, I installed kvm 12 on a linux fedora core 6.
>> I also installed a windows XP guest but I am not able to setup bridging
>> network.
>> If I launch:
>> /usr/local/bin/qemu-system-x86_64 -no-acpi -hda
>> /root/winXP/windows_kvm.disk -boot c -m 1024  -cdrom
>> /root/winXP/winXP.iso -net nic -net
>> tap,script=/root/kvm-svn/kvm/scripts/qemu-ifup
>>
>> the following error is displayed:
>>
>> can't add ÿ to bridge eth2: Operation not supported
>> /root/kvm-svn/kvm/scripts/qemu-ifup: could not launch network script
>> Could not initialize device 'tap'
>>
>> Could anyone help me ?
>
> Seems like the bridge is not running ">can't add ÿ to bridge eth2:"
> It should add the tap to the bridge and not to eth2.
> The qemu-ifup script decides the bridge to use according to the default gw.
> You can change either the gw or the qemu-ifup script.
>
>
>> Thanks
>>
>>
>>
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys - and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> ___
>> kvm-devel mailing list
>> kvm-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>


- Fine messaggio da [EMAIL PROTECTED] -




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] compiler problem in Read Hat ES 4

2007-01-24 Thread Uri Lublin

I was merely pointing out the cause of the problem, and offering a couple of 
ways for solving it.
Of course, there may be other solutions.
A valid alternative, which I did not mention due to a possibly long waiting 
time, is to wait for KVM (and/or a newer Linux kernel version) to be included 
in a Red Hat ES release or update.

Regards,
Uri.

-Original Message-
From: [EMAIL PROTECTED] on behalf of Bill Davidsen
Sent: Wed 24/01/2007 02:20
To: kvm-devel@lists.sourceforge.net
Cc: [EMAIL PROTECTED]
Subject: Re: [kvm-devel] compiler problem in Read Hat ES 4
 
Uri Lublin wrote:
> Hi Frank,
> 
> It seems it would be easier if you'd build kvm on a more recent linux 
> kernel (version 2.6.16 or later).

It wouldn't be ES 4 then. The way the enterprise releases work is that 
no software is upgraded, therefore you don't find new and exciting 
changes in the way things work. Instead, any bug fixes or security 
patches are backported to the original software.

> You could not make the kvm modules because 2.6.9 kernel does not use 
> Kbuild, but expects that information to be in the Makefile.
> So... I typed "cd kernel; mv Makefile Makefile.orig; cat Kbuild 
> Makefile.orig > Makefile; make".
> That started building the modules, but include file  was 
> not found.
> linux/mutex.h was introduced in version 2.6.16
> 
> If you insist on 2.6.9, try to replace the mutex with a semaphore 
> (kvm_main.c and kvm.h).
> 
ES is intended to provide extremely stable platforms for production 
servers, which normally doesn't make it a good candidate for building 
new kernel modules.

I assume that's why ES is being used.

-- 
Bill Davidsen <[EMAIL PROTECTED]>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] [PATCH] svm_set_idt() - don't store/get idt to/from LDTsave

2007-01-23 Thread Uri Lublin

I've committed this patch.
In addition to the reboot problem, it fixes savevm/loadvm/migration on AMD 
machines.
Thanks,
Uri.


-Original Message-
From: [EMAIL PROTECTED] on behalf of Leonard Norrgard
Sent: Fri 19/01/2007 16:49
To: kvm-devel@lists.sourceforge.net
Subject: [kvm-devel] [PATCH] svm_set_idt() - don't store/get idt to/from LDTsave
 
On AMD processors, executing "shutdown -r now" in a Linux guest actually
reboots the host. While investigating that, I noticed this likely typo.
This patch isn't in itself the complete fix the host reboot, so be
prepared if you test the shutdown command in a Linux guest.

Note: "shutdown -h now" works perfectly and closes the kvm window as
expected.

PS. When I first installed this patch, "shutdown -r now" _didn't_ reboot
the _host_ for about 10 times, instead the guest OOPSed in slightly
different situations. Currently I don't see guest OOPSes, but host reboots.


--- kvm/trunk/kernel/svm.c2007-01-14 17:29:39.0 +0200
+++ kvm-reset/trunk/kernel/svm.c2007-01-19 15:42:18.0 +0200
@@ -680,14 +680,14 @@
 
 static void svm_get_idt(struct kvm_vcpu *vcpu, struct descriptor_table *dt)
 {
-dt->limit = vcpu->svm->vmcb->save.ldtr.limit;
-dt->base = vcpu->svm->vmcb->save.ldtr.base;
+dt->limit = vcpu->svm->vmcb->save.idtr.limit;
+dt->base = vcpu->svm->vmcb->save.idtr.base;
 }
 
 static void svm_set_idt(struct kvm_vcpu *vcpu, struct descriptor_table *dt)
 {
-vcpu->svm->vmcb->save.ldtr.limit = dt->limit;
-vcpu->svm->vmcb->save.ldtr.base = dt->base ;
+vcpu->svm->vmcb->save.idtr.limit = dt->limit;
+vcpu->svm->vmcb->save.idtr.base = dt->base ;
 }
 
 static void svm_get_gdt(struct kvm_vcpu *vcpu, struct descriptor_table *dt)

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] kvm-10/11 not working under current fedora core 6 kernel

2007-01-19 Thread Uri Lublin
Hi Fabian,
 
After the host FC6 upgrade, 
  Were kvm modules loaded ?  You may need to recompile kvm.
  Were there error messages in the log ?
 
Uri.
 


מאת: [EMAIL PROTECTED] בשם Fabian Deutsch
נשלח: ש 20/01/2007 04:46
אל: kvm-devel@lists.sourceforge.net
נושא: [kvm-devel] kvm-10/11 not working under current fedora core 6 kernel



Hello,

I'm currenlty running kvm on a fc6 machine (intel).
Everything worked quite fine until i did a kernel update (can post uname
-a tomorrow) and noted, that qemu didn't work anymore.

qemu starts but uses 100% of the CPU and nothing else happens (well you
get a monitor shell and serial console, but not more).

this happens with kvm-10, -11 and svn. on a i386 kernel (the current on
on fc6).

Greetings
fabian



-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] exception 13 (0)

2007-01-19 Thread Uri Lublin
Hi Vineet,
 
There are so many distributions out there, naturally we can not test them all.
ubuntu desktop i386 install was not tested yet.
We'll try to reproduce and investigate the problem.
Is your host cpu is a 32 bits or 64 bits cpu ? 
If 64, did you try to install ubuntu image for a 64 bits cpu machine ? 
 
As for the pre-installed QEMU linux image, it seems to be working. 
We'll have to check up that error message.
 
Thanks for your input,
Uri.
 



Vineet Chadha wrote:
Hi,
I installed ubuntu in only QEMU mode when i booted in KVM/QEMU mode it DOESN't 
boot. It stops  at  initial point after uncompressing the kernel "
Uncompresssing kernelok, booting the kernel
PCI: PIIX3: Enabling Passive Release on  [stops here] 
This was tried with ubuntu guest installation. Yes i changed into non-graphics 
mode but still didn't work.
Then I tried using pre-installed QEMU linux image  ( linux-test-0.5.1.tar.gz 
  )
http://fabrice.bellard.free.fr/qemu/download.html in KVM/QEMU mode. 
This image boots but gives error SIOSIFADDR: No such device.  I can see shell 
prompt. 

In both cases - dmesg gives me  "kvm: msrs: 2"




Vineet Chadha wrote:
> Hi,
>
> I was installing KVM in fedora core 6 (Intel xeon processors).  I was 
> able to compile KVM. While running kVM with command as shown -it  
starts
> QEMU/KVM for 5 sec and then KVM automatically aborts with an exception
> 13. Any clues ? I have tried KVM-9/10/11.
>
> [EMAIL PROTECTED] software]# modprobe kvm-intel
> [EMAIL PROTECTED] software]# /usr/local/kvm/bin/qemu -hda vdisk.img 
-cdrom
> /home/vineet/software/ubuntu-6.06.1-desktop-i386.iso -boot d  -m 384
> exception 13 (0) 
> Aborted
>


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] exception 13 (0)

2007-01-19 Thread Uri Lublin
Hi,
 
The procedure for installing a windows guest is described at 
kvm.sf.net/faq.html (and is copied below)
Bill, did you follow this procedure ? If not please do and report if it helps 
or not.
I have never tried installing windows 98.
Has anyone been able to run a virtualized-by-KVM  windows 98 guest ?
 
As for the Centos installation problem, an explanation may be:
Sometimes (not specific to Centos) a reboot does the "down" part but does not 
reset and reboots. In that case the installation is actually successful, and a 
working image is created.
 
Thanks for the input,
Uri
 
>From kvm.sf.net/faq.html:

What is the procedure to install a Windows guest? 

Currently Windows guest installation is broken. The problem arises from the 
APIC implementation. At the moment the APIC is emulated by qemu, which is not 
as tightly integrated to the kvm virtual cpu as it should be. There is work in 
progress to implement the APIC within kvm to fix the problem. 

Until then, start qemu with the -no-acpi option. If you have a guest that uses 
the APIC HAL, the following workaround is suggested: 

Run the guest without kvm (-no-kvm) 
My Computer -> Properties -> Hardware -> Device Manager -> [Whatever under 
Computer] -> Properties -> Update Driver -> Not at this time -> Next -> Install 
from a list -> Next -> Don't search -> Next -> Standard PC -> Next. 
"Standard PC" is the noacpi HAL. 




 
Bill Davidsen wrote:



I have posted on this to the kernel mailing several times, while trying
to install Win98SE. Judging by the utter lack of response no one gives a
shit.

What doesn't work is installing with -no-kvm initially then running with
kvm. People will offer that advice, I'm sure.

I also see this symptom at the end of the Centos install, default
install from Centos-4.4.ServerCD.iso. However, even though it crashes,
the image created works. It seems to skip some minor post-install
activity, but the image does work nicely.

Hope this tiny bit helps.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] compiler problem in Read Hat ES 4

2007-01-18 Thread Uri Lublin
Hi Frank,

It seems it would be easier if you'd build kvm on a more recent linux kernel 
(version 2.6.16 or later).
You could not make the kvm modules because 2.6.9 kernel does not use Kbuild, 
but expects that information to be in the Makefile.
So... I typed "cd kernel; mv Makefile Makefile.orig; cat Kbuild Makefile.orig > 
Makefile; make".
That started building the modules, but include file  was not 
found.
linux/mutex.h was introduced in version 2.6.16

If you insist on 2.6.9, try to replace the mutex with a semaphore (kvm_main.c 
and kvm.h).

Uri.

-Original Message-
From: Francesc [mailto:[EMAIL PROTECTED]
Sent: Thu 18/01/2007 10:32
To: Uri Lublin
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] compiler problem in Read Hat ES 4
 
Hi Uri,
I did it what you said but it's the same:

[EMAIL PROTECTED] kvm-11]# make clean ; ./configure --qemu-cc=gcc ; make
for i in  kernel user qemu; do \
make -C $i clean; \
done
make[1]: Entering directory `/var/tmp/kvm-11/kernel'
make -C /lib/modules/2.6.9-42.0.3.ELsmp/build M=`pwd` clean
make[2]: Entering directory `/usr/src/kernels/2.6.9-42.0.3.EL-smp-i686'
  CLEAN   /var/tmp/kvm-11/kernel/.tmp_versions
make[2]: Leaving directory `/usr/src/kernels/2.6.9-42.0.3.EL-smp-i686'
make[1]: Leaving directory `/var/tmp/kvm-11/kernel'
make[1]: Entering directory `/var/tmp/kvm-11/user'
rm -f kvmctl *.o *.a .*.d
rm -f test/bootstrap test/*.o test/*.flat test/.*.d
make[1]: Leaving directory `/var/tmp/kvm-11/user'
make[1]: Entering directory `/var/tmp/kvm-11/qemu'
rm -f config.mak config.h op-i386.h opc-i386.h gen-op-i386.h op-arm.h 
opc-arm.h gen-op-arm.h
rm -f *.o *.a qemu-img dyngen TAGS *.pod *~ */*~
make -C tests clean
make[2]: Entering directory `/var/tmp/kvm-11/qemu/tests'
rm -f *~ *.o test-i386.out test-i386.ref \
   test-x86_64.log test-x86_64.ref qruncom linux-test testthread 
sha1-i386 test-i386 runcom sha1
make[2]: Leaving directory `/var/tmp/kvm-11/qemu/tests'
for d in i386-softmmu; do \
make -C $d clean || exit 1 ; \
done
make[2]: Entering directory `/var/tmp/kvm-11/qemu/i386-softmmu'
rm -f *.o  *.a *~ qemu gen-op.h opc.h op.h nwfpe/*.o slirp/*.o fpu/*.o
make[2]: Leaving directory `/var/tmp/kvm-11/qemu/i386-softmmu'
make[1]: Leaving directory `/var/tmp/kvm-11/qemu'
rm -f config.make user/config.mak
which: no texi2html in 
(/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin)
Install prefix/usr/local
BIOS directory/usr/local/share/qemu
binary directory  /usr/local/bin
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path   /var/tmp/kvm-11/qemu
C compilergcc
Host C compiler   gcc
make  make
install   install
host CPU  i386
host big endian   no
target list   i386-softmmu
gprof enabled no
profiler  no
static build  no
SDL support   yes
SDL static link   yes
mingw32 support   no
Adlib support no
CoreAudio support no
ALSA support  yes
DSound supportno
FMOD support  no
kqemu support no
kvm support   yes
Documentation no
make -C kernel
make[1]: Entering directory `/var/tmp/kvm-11/kernel'
make -C /lib/modules/2.6.9-42.0.3.ELsmp/build M=`pwd` "$@"
make[2]: Entering directory `/usr/src/kernels/2.6.9-42.0.3.EL-smp-i686'
  Building modules, stage 2.
  MODPOST
make[2]: Leaving directory `/usr/src/kernels/2.6.9-42.0.3.EL-smp-i686'
make[1]: Leaving directory `/var/tmp/kvm-11/kernel'
make -C user
make[1]: Entering directory `/var/tmp/kvm-11/user'
cc -I /var/tmp/kvm-11/kernel/include -MMD -MF ./.kvmctl.d -g   -c -o 
kvmctl.o kvmctl.c
cc -I /var/tmp/kvm-11/kernel/include -MMD -MF ./.main.d -g   -c -o 
main.o main.c
cc   kvmctl.o main.o   -o kvmctl
ar rcs libkvm.a kvmctl.o
make[1]: Leaving directory `/var/tmp/kvm-11/user'
make -C qemu
make[1]: Entering directory `/var/tmp/kvm-11/qemu'
gcc -DQEMU_TOOL -I /var/tmp/kvm-11/qemu/../user -Wall -O2 -g 
-fno-strict-aliasing -I. -g -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE -o qemu-img qemu-img.c block.c block-cow.c 
block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c 
block-vpc.c block-vvfat.c -lz -luuid


gcc -I /var/tmp/kvm-11/qemu/../user -Wall -O2 -g -fno-strict-aliasing 
-fomit-frame-pointer -I. -I.. -I/var/tmp/kvm-11/qemu/target-i386 
-I/var/tmp/kvm-11/qemu -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE -I/var/tmp/kvm-11/qemu/fpu -I 
/var/tmp/kvm-11/kernel/include -DHAS_AUDIO -I/var/tmp/kvm-11/qemu/slirp 
-c -o disas.o /var/tmp/kvm-11/qemu/disas.c
gcc -I /var/tmp/kvm-11/qemu/../user -Wall -O2 -g -fno-strict-aliasing 
-fomit-frame-pointer -I. -I.. -I/var/tmp/kvm-11/qemu/target-i386 
-I/var/tmp/kvm-11/qemu -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 
-D_LARGEFILE_SOURCE -I/var/tmp/kvm-11/qemu/fpu -I 

Re: [kvm-devel] exception 13 (0) ???

2007-01-18 Thread Uri Lublin
Hi Vineet,

What guest OS are you trying to run ?
Do you see anything meaningful in the system log (or dmesg) ?
What happens if you run it with '-no-kvm' ?

Sometimes exception 13 means "something is wrong with your guest image". 
Try running a different guest image.

Uri.

-Original Message-
From: [EMAIL PROTECTED] on behalf of Vineet Chadha
Sent: Thu 18/01/2007 07:41
To: kvm-devel@lists.sourceforge.net
Subject: [kvm-devel] exception 13 (0) ???
 
Hi,

I was installing KVM in fedora core 6 (Intel xeon processors).  I was able to 
compile KVM. While running kVM with command as shown -it  starts QEMU/KVM for 5 
sec and then KVM automatically aborts with an exception 13. Any clues ? I have 
tried KVM-9/10/11. 

[EMAIL PROTECTED] software]# modprobe kvm-intel
[EMAIL PROTECTED] software]# /usr/local/kvm/bin/qemu -hda vdisk.img -cdrom 
/home/vineet/software/ubuntu-6.06.1-desktop-i386.iso -boot d  -m 384
exception 13 (0)
Aborted

Thanks in advance
Regards,
Vineet




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] compiler problem in Read Hat ES 4

2007-01-17 Thread Uri Lublin
Hi Frank,

The modules were probably already made. 
Try to remake (from ): "make clean ; ./configure --qemu-cc=gcc ; make"

Uri.

-Original Message-
From: Francesc [mailto:[EMAIL PROTECTED]
Sent: Wed 17/01/2007 14:31
To: Uri Lublin
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] compiler problem in Read Hat ES 4

Hi Uri,
it has compiled OK with gcc, but it has not produced any module ( .ko)
It seems like does not do anything when the "make"  should do this part:



what can be the problem?

Thanks for your help.

Frank

Uri Lublin wrote:
>
> Hi,
>
> It seems like a gcc32 problem.
> Please try to use your default gcc (3.4.6) to compile qemu instead of 
> gcc32
> Just type in  "configure --qemu-cc=gcc"
>
> Hope that helps,
> Uri.
>


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] compiler problem in Read Hat ES 4

2007-01-17 Thread Uri Lublin
Hi,

It seems like a gcc32 problem.
Please try to use your default gcc (3.4.6) to compile qemu instead of gcc32
Just type in  "configure --qemu-cc=gcc"

Hope that helps,
Uri.


-Original Message-
From: [EMAIL PROTECTED] on behalf of Francesc
Sent: Tue 16/01/2007 12:02
To: kvm-devel@lists.sourceforge.net
Subject: [kvm-devel] compiler problem in Read Hat ES 4
 
Hi,
we are trying to kmstall kvm on a Read Hat Enterprise 4 with all the 
latest updates, and when we do the "make" we
get this error

/usr/bin/gcc32 -I /var/tmp/kvm-11/qemu/../user -Wall -O2 -g 
-fno-strict-aliasing -fomit-frame-pointer -I. -I.. 
-I/var/tmp/kvm-11/qemu/target-i386 -I/var/tmp/kvm-11/qemu -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/var/tmp/kvm-11/qemu/fpu -I 
/var/tmp/kvm-11/kernel/include -DHAS_AUDIO -I/var/tmp/kvm-11/qemu/slirp 
-c -o qemu-kvm.o /var/tmp/kvm-11/qemu/qemu-kvm.c
/var/tmp/kvm-11/qemu/qemu-kvm.c: In function `load_regs':
/var/tmp/kvm-11/qemu/qemu-kvm.c:223: unable to find a register to spill 
in class `SIREG'
/var/tmp/kvm-11/qemu/qemu-kvm.c:223: this is the insn:
(insn 98 95 101 (parallel[
(set (reg:SI 2 ecx [78])
(const_int 0 [0x0]))
(set (reg/f:SI 1 edx [75])
(plus:SI (ashift:SI (reg:SI 2 ecx [77])
(const_int 2 [0x2]))
(reg/f:SI 1 edx [75])))
(set (reg/f:SI 0 eax [76])
(plus:SI (ashift:SI (reg:SI 2 ecx [77])
(const_int 2 [0x2]))
(reg/f:SI 0 eax [76])))
(set (mem:BLK (reg/f:SI 1 edx [75]) [0 A128])
(mem:BLK (reg/f:SI 0 eax [76]) [0 A128]))
(use (reg:SI 2 ecx [77]))
(use (reg:SI 19 dirflag))
] ) 603 {*rep_movsi} (insn_list 90 (insn_list 92 (insn_list 93 
(insn_list 95 (nil)
(expr_list:REG_DEAD (reg:SI 19 dirflag)
(expr_list:REG_DEAD (reg:SI 2 ecx [77])
(expr_list:REG_UNUSED (reg:SI 2 ecx [78])
(expr_list:REG_UNUSED (reg/f:SI 1 edx [75])
(expr_list:REG_UNUSED (reg/f:SI 0 eax [76])
(nil)))
/var/tmp/kvm-11/qemu/qemu-kvm.c:223: confused by earlier errors, bailing out
make[2]: *** [qemu-kvm.o] Error 1
make[2]: Leaving directory `/var/tmp/kvm-11/qemu/i386-softmmu'
make[1]: *** [subdir-i386-softmmu] Error 2
make[1]: Leaving directory `/var/tmp/kvm-11/qemu'
make: *** [qemu] Error 2


The gcc version is 3.4.6; I have read that there were problems with 
older gcc versions. Is this another bug?
Thanks for your help.

Frank
UPC - Terrassa -Spain


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Talking about regressions...

2007-01-16 Thread Uri Lublin
Hi,

I've noticed that too (on Xeon).
Netbsd installer gets a general protection fault (unknown rdmsr 0x1a0) and 
traps into its debugger.
It then busy-waits for input, hence the high cpu usage.
kvm-10 too could not install netbsd for the same reason.

Uri.

-Original Message-
From: Michael Riepe [mailto:[EMAIL PROTECTED]
Sent: Tue 16/01/2007 15:23
To: Uri Lublin
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] Talking about regressions...
 
Hi!

Just for the records: On the Xeon 53xx, netbsd produces a few kernel
messages before it dies with a protection fault:

kvm: msrs: 6
kvm: unhandled rdmsr: 0x1a0
inject_general_protection: rip 0xc0433a1c
kvm: unhandled rdmsr: 0x1a0
inject_general_protection: rip 0xc0433a1c

This is notably different from the behaviour on a Core Duo, maybe
because the Xeon is running in 64-bit mode.

Uri Lublin wrote:
> O.K.
> I'll try to reproduce it with netbsd, and investigate a little.
> Uri.
> 
> 
> *From:* Michael Riepe [mailto:[EMAIL PROTECTED]
> *Sent:* Mon 15/01/2007 20:38
> *To:* Uri Lublin
> *Cc:* kvm-devel@lists.sourceforge.net
> *Subject:* Re: [kvm-devel] Talking about regressions...
> 
> Hi!
> 
> Uri Lublin wrote:
>>
>> Thanks for running those tests.
>> Does kvm complains ( dmesg ) ?
> 
> Not in the cases I listed. The host just becomes very busy, for a long
> time. After ~30 minutes I lost patience and killed qemu.
> 
> I see a single "kvm: emulating exchange as write" when I try to boot
> FreeBSD 6.1, and with Knoppix 5.1.1 the kernel reports "kvm: unhandled
> wrmsr: 0xc1" once. Neither of these worked with earlier kvm versions,
> though.
> 
> Interestingly, Knoppix 5.1.1 *does* work on an AMD Quad Dual-Core
> Opteron we have at work (running Suse Linux Enterprise Server 10, as far
> as I remember). Knoppix 5.0, on the other hand, which works fine on the
> Core Duo, needs "acpi=off" as a boot parameter on the AMD.
> 
> More AMD results: FreeBSD, NetBSD and OpenSolaris (32-bit versions) all
> fail with exceptions, usually page faults. OpenSolaris catches lots of
> SIGILL's. OpenSuse 10.2 (32 bit as well) works, even with gfxmenu
> enabled. Qemu-puppy behaves the same as on the Intel CPU - the old
> version works, the new one sometimes hangs (and at the same point).
> 
> The next thing I'm going to try is the Dual Quad-Core Xeon... as soon as
> I can get my hands on it. :-)
> 
>> -Original Message-
>> From: [EMAIL PROTECTED] on behalf of Michael Riepe
>> Sent: Sun 14/01/2007 19:09
>> To: kvm-devel@lists.sourceforge.net
>> Subject: [kvm-devel] Talking about regressions...
>>
>> When I did a couple of tests the other day, I noticed that one or more
>> bugs must have been introduced at least into the vmx part in kvm-10:
>>
>> - netbsd 3.1 used to work with kvm-9. In kvm-10, the system hangs during
>> boot. One of the last things I can see is that a shell process dies with
>> a SIGSEGV. Then the load rises to 100% (sys) on the host and stays there
>> until I kill qemu (yes I've waited several minutes).
>>
>> - opensolaris displays a "Time of Day clock error" during boot, claiming
>> the clock has jumped by 0x5 (no unit given, I suppose that means
>> seconds). Everything else seems to work.
>>
>> - qemu-puppy-2.13-1 sometimes works and sometimes hangs somewhere inside
>> the initial ramdisk. The exact place seems to differ, but usually it
>> happens while the kernel modules are loaded. Again, host load rises to
>> 100%. An older version (2.01-3) still works fine. kvm-9 works, too.
>>
>> (Core Duo T2400, 32-bit SMP host, 32-bit guest, Linux 2.6.19 + kvm trunk
>> revision 4290)
>>
>> Any idea what to look for? The SIGSEGV on netbsd makes me suspect that
>> there's a problem with the page tables, but I couldn't narrow down the
>> cause yet.
>>
>> --
>> Michael "Tired" Riepe <[EMAIL PROTECTED]>
>> X-Tired: Each morning I get up I die a little
>>
>> -
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to
> share your
>> opinions on IT & business topics through brief surveys - and earn cash
>>
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
>>
> <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> &

Re: [kvm-devel] Talking about regressions...

2007-01-15 Thread Uri Lublin
O.K.
I'll try to reproduce it with netbsd, and investigate a little.
Uri.



From: Michael Riepe [mailto:[EMAIL PROTECTED]
Sent: Mon 15/01/2007 20:38
To: Uri Lublin
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] Talking about regressions...



Hi!

Uri Lublin wrote:
>
> Thanks for running those tests.
> Does kvm complains ( dmesg ) ?

Not in the cases I listed. The host just becomes very busy, for a long
time. After ~30 minutes I lost patience and killed qemu.

I see a single "kvm: emulating exchange as write" when I try to boot
FreeBSD 6.1, and with Knoppix 5.1.1 the kernel reports "kvm: unhandled
wrmsr: 0xc1" once. Neither of these worked with earlier kvm versions,
though.

Interestingly, Knoppix 5.1.1 *does* work on an AMD Quad Dual-Core
Opteron we have at work (running Suse Linux Enterprise Server 10, as far
as I remember). Knoppix 5.0, on the other hand, which works fine on the
Core Duo, needs "acpi=off" as a boot parameter on the AMD.

More AMD results: FreeBSD, NetBSD and OpenSolaris (32-bit versions) all
fail with exceptions, usually page faults. OpenSolaris catches lots of
SIGILL's. OpenSuse 10.2 (32 bit as well) works, even with gfxmenu
enabled. Qemu-puppy behaves the same as on the Intel CPU - the old
version works, the new one sometimes hangs (and at the same point).

The next thing I'm going to try is the Dual Quad-Core Xeon... as soon as
I can get my hands on it. :-)

> -Original Message-
> From: [EMAIL PROTECTED] on behalf of Michael Riepe
> Sent: Sun 14/01/2007 19:09
> To: kvm-devel@lists.sourceforge.net
> Subject: [kvm-devel] Talking about regressions...
>
> When I did a couple of tests the other day, I noticed that one or more
> bugs must have been introduced at least into the vmx part in kvm-10:
>
> - netbsd 3.1 used to work with kvm-9. In kvm-10, the system hangs during
> boot. One of the last things I can see is that a shell process dies with
> a SIGSEGV. Then the load rises to 100% (sys) on the host and stays there
> until I kill qemu (yes I've waited several minutes).
>
> - opensolaris displays a "Time of Day clock error" during boot, claiming
> the clock has jumped by 0x5 (no unit given, I suppose that means
> seconds). Everything else seems to work.
>
> - qemu-puppy-2.13-1 sometimes works and sometimes hangs somewhere inside
> the initial ramdisk. The exact place seems to differ, but usually it
> happens while the kernel modules are loaded. Again, host load rises to
> 100%. An older version (2.01-3) still works fine. kvm-9 works, too.
>
> (Core Duo T2400, 32-bit SMP host, 32-bit guest, Linux 2.6.19 + kvm trunk
> revision 4290)
>
> Any idea what to look for? The SIGSEGV on netbsd makes me suspect that
> there's a problem with the page tables, but I couldn't narrow down the
> cause yet.
>
> --
> Michael "Tired" Riepe <[EMAIL PROTECTED]>
> X-Tired: Each morning I get up I die a little
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
> ___
> kvm-devel mailing list
> kvm-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
>

--
Michael "Tired" Riepe <[EMAIL PROTECTED]>
X-Tired: Each morning I get up I die a little


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Talking about regressions...

2007-01-15 Thread Uri Lublin

Thanks for running those tests.
Does kvm complains ( dmesg ) ?

-Original Message-
From: [EMAIL PROTECTED] on behalf of Michael Riepe
Sent: Sun 14/01/2007 19:09
To: kvm-devel@lists.sourceforge.net
Subject: [kvm-devel] Talking about regressions...
 
When I did a couple of tests the other day, I noticed that one or more
bugs must have been introduced at least into the vmx part in kvm-10:

- netbsd 3.1 used to work with kvm-9. In kvm-10, the system hangs during
boot. One of the last things I can see is that a shell process dies with
a SIGSEGV. Then the load rises to 100% (sys) on the host and stays there
until I kill qemu (yes I've waited several minutes).

- opensolaris displays a "Time of Day clock error" during boot, claiming
the clock has jumped by 0x5 (no unit given, I suppose that means
seconds). Everything else seems to work.

- qemu-puppy-2.13-1 sometimes works and sometimes hangs somewhere inside
the initial ramdisk. The exact place seems to differ, but usually it
happens while the kernel modules are loaded. Again, host load rises to
100%. An older version (2.01-3) still works fine. kvm-9 works, too.

(Core Duo T2400, 32-bit SMP host, 32-bit guest, Linux 2.6.19 + kvm trunk
revision 4290)

Any idea what to look for? The SIGSEGV on netbsd makes me suspect that
there's a problem with the page tables, but I couldn't narrow down the
cause yet.

-- 
Michael "Tired" Riepe <[EMAIL PROTECTED]>
X-Tired: Each morning I get up I die a little

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] TUN networking - guest device missing

2007-01-11 Thread Uri Lublin
Try Adding "-net nic" to the command line:
qemu-system-x86_64 \
   -m 384 -no-acpi \
   -hda vdisk.img \
   -boot c \
   -net nic \
   -net tap,script=/etc/kvm/qemu-ifup


-Original Message-
From: [EMAIL PROTECTED] on behalf of Nikola Ciprich
Sent: Thu 11/01/2007 14:17
To: Avi Kivity
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] TUN networking - guest device missing
 
Sorry, I should have already attached that information.
cmdline is:

qemu-system-x86_64 \
-m 384 -no-acpi \
-hda vdisk.img \
-boot c \
-net tap,script=/etc/kvm/qemu-ifup

/etc/kvm/qemu-ifup is:
#!/bin/sh
brctl addif br0 $1
exit 0

 - I already have br0 defined, with eth0 as a member, IP address is set only 
for bridge...

I don't see device even with -no-kvm

I also noticed another strange thing - clock is running much faster in the 
guest system...

I'm using version 10 of KVM - should I give ver 11 a try?



> What's your qemu command line?
> 
> Does it work with -no-kvm?
> 
> 
> -- 
> error compiling committee.c: too many arguments to function
> 

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Windows XP internal Power error

2006-12-19 Thread Uri Lublin
Sorry, the patch is broken, please ignore it.


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tue 19/12/2006 15:05
To: Uri Lublin
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] Windows XP internal Power error
 

Must I rewind the other patches before applying this one ?


- Messaggio da [EMAIL PROTECTED] -
Data: Tue, 19 Dec 2006 04:46:27 -0800
Da: Uri Lublin <[EMAIL PROTECTED]>
Rispondi-A: Uri Lublin <[EMAIL PROTECTED]>
Oggetto: Re: [kvm-devel] Windows XP internal Power error
  A: [EMAIL PROTECTED]
  Cc: kvm-devel@lists.sourceforge.net


> Please try with attached patch.
>
>
> -Original Message-
> From: [EMAIL PROTECTED] on behalf of 
> [EMAIL PROTECTED]
> Sent: Tue 19/12/2006 13:15
> To: Avi Kivity
> Cc: kvm-devel@lists.sourceforge.net
> Subject: Re: [kvm-devel] Windows XP internal Power error
>
> Sorry, you can find it attacched here.
> I use fedora core 6 distrib.
> Really with the last patch, first tile I boot Windows Xp guest, the
> following is displayed in /var/log/messages:
>
> 
>
> Dec 19 12:10:10 timb194083 kernel: RIP: 0010:[]
> [] :kvm:load_msrs+0x13/0x22
>
> 
>
> Dec 19 12:10:10 timb194083 kernel: Call Trace:
> Dec 19 12:10:10 timb194083 kernel:  []
> :kvm_intel:vmx_vcpu_run+0x363/0x403
>
> 
>


- Fine messaggio da [EMAIL PROTECTED] -




-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel


Re: [kvm-devel] Windows XP internal Power error

2006-12-19 Thread Uri Lublin
Please try with attached patch.


-Original Message-
From: [EMAIL PROTECTED] on behalf of [EMAIL PROTECTED]
Sent: Tue 19/12/2006 13:15
To: Avi Kivity
Cc: kvm-devel@lists.sourceforge.net
Subject: Re: [kvm-devel] Windows XP internal Power error
 
Sorry, you can find it attacched here.
I use fedora core 6 distrib.
Really with the last patch, first tile I boot Windows Xp guest, the 
following is displayed in /var/log/messages:



Dec 19 12:10:10 timb194083 kernel: RIP: 0010:[] 
[] :kvm:load_msrs+0x13/0x22



Dec 19 12:10:10 timb194083 kernel: Call Trace:
Dec 19 12:10:10 timb194083 kernel:  []
:kvm_intel:vmx_vcpu_run+0x363/0x403


--- kernel/vmx.c	2006-12-19 14:35:47.0 +0200
+++ kernel/vmx.c.bad_msrs_fix	2006-12-19 14:34:58.0 +0200
@@ -1158,11 +1158,11 @@
 
 	nr_good_msrs = vcpu->nmsrs - NR_BAD_MSRS;
 	vmcs_writel(VM_ENTRY_MSR_LOAD_ADDR,
-		virt_to_phys(vcpu->guest_msrs + NR_BAD_MSRS));
+		virt_to_phys(vcpu->guest_msrs));
 	vmcs_writel(VM_EXIT_MSR_STORE_ADDR,
-		virt_to_phys(vcpu->guest_msrs + NR_BAD_MSRS));
+		virt_to_phys(vcpu->guest_msrs));
 	vmcs_writel(VM_EXIT_MSR_LOAD_ADDR,
-		virt_to_phys(vcpu->host_msrs + NR_BAD_MSRS));
+		virt_to_phys(vcpu->host_msrs));
 	vmcs_write32_fixedbits(MSR_IA32_VMX_EXIT_CTLS_MSR, VM_EXIT_CONTROLS,
 		 	   (HOST_IS_64 << 9));  /* 22.2,1, 20.7.1 */
 	vmcs_write32(VM_EXIT_MSR_STORE_COUNT, nr_good_msrs); /* 22.2.2 */
@@ -1720,8 +1720,8 @@
 	fx_save(vcpu->host_fx_image);
 	fx_restore(vcpu->guest_fx_image);
 
-	save_msrs(vcpu->host_msrs, vcpu->nmsrs);
-	load_msrs(vcpu->guest_msrs, NR_BAD_MSRS);
+	save_msrs(vcpu->host_msrs, vcpu->nmsrs - NR_BAD_MSRS);
+	load_msrs(vcpu->guest_msrs, vcpu->nmsrs - NR_BAD_MSRS);
 
 	asm (
 		/* Store host registers */
@@ -1844,8 +1844,8 @@
 
 	++kvm_stat.exits;
 
-	save_msrs(vcpu->guest_msrs, NR_BAD_MSRS);
-	load_msrs(vcpu->host_msrs, NR_BAD_MSRS);
+	save_msrs(vcpu->guest_msrs, vcpu->nmsrs - NR_BAD_MSRS);
+	load_msrs(vcpu->host_msrs, vcpu->nmsrs - NR_BAD_MSRS);
 
 	fx_save(vcpu->guest_fx_image);
 	fx_restore(vcpu->host_fx_image);
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
kvm-devel mailing list
kvm-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-devel