Re: [kvm-devel] Windows XP crash: emulation failed but !mmio_needed?

2007-06-19 Thread Adam Monsen
On 6/19/07, Avi Kivity <[EMAIL PROTECTED]> wrote: [...] > The virtual machine has spontaneously rebooted, then failed because > Windows has (legitimately) overwritten the real-mode task state segment > located at the end of memory. The emulation failure is for an 'out' > instruction, which will tr

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-19 Thread Zachary Amsden
Jeremy Fitzhardinge wrote: > Well, I was suggesting we could print the banner later rather than > forcing an earlier init. > > The important part is that you set your pv_ops before patching occurs, > since that will bake the function calls into the rest of the kernel, and > it will ignore any furth

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-19 Thread Zachary Amsden
Anthony Liguori wrote: > > I don't see a compelling reason to paravirtualize earlier although I > also don't see a compelling reason not too. I noticed that VMI hooks > setup.c. It wasn't immediately obvious why it was hooking there but > perhaps it worthwhile to have a common hook? I suspect

[kvm-devel] [ kvm-Bugs-1740031 ] Kubuntu 7.04 fails to boot as guest- hangs after kernel boot

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

Re: [kvm-devel] [PATCH 3/5] KVM: Add paravirt MMU write support

2007-06-19 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: > Anthony Liguori wrote: > >> Perhaps my grep'ing skills are weak, but I don't seem to see any. >> Were you thinking of something in particular? >> > > __pte(), of course. Sheesh. ;) > How could I have missed something that is so clearly named! :-) Rega

Re: [kvm-devel] [PATCH 3/5] KVM: Add paravirt MMU write support

2007-06-19 Thread Jeremy Fitzhardinge
Anthony Liguori wrote: > Perhaps my grep'ing skills are weak, but I don't seem to see any. > Were you thinking of something in particular? __pte(), of course. Sheesh. ;) J - This SF.net email is sponsored by DB2 Exp

Re: [kvm-devel] [PATCH 3/5] KVM: Add paravirt MMU write support

2007-06-19 Thread Anthony Liguori
Avi Kivity wrote: >> +static void kvm_pte_clear(struct mm_struct *mm, >> + unsigned long addr, pte_t *ptep) >> +{ >> +pte_t pte = {0}; >> > > Surely there's a nice macro for creating a pte from an int? Perhaps my grep'ing skills are weak, but I don't seem to see any. Were you

Re: [kvm-devel] [PATCH 5/5] KVM: paravirt time source

2007-06-19 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: > Anthony Liguori wrote: > >> I've updated this patch and switched to using a scale/shift like Xen >> is doing, but I must admit, I don't understand how it helps adjtime. >> I poked around a bit and it wasn't obvious. >> >> Why is having {mult=1<<22, shift=22} better

Re: [kvm-devel] [PATCH 5/5] KVM: paravirt time source

2007-06-19 Thread Jeremy Fitzhardinge
Anthony Liguori wrote: > I've updated this patch and switched to using a scale/shift like Xen > is doing, but I must admit, I don't understand how it helps adjtime. > I poked around a bit and it wasn't obvious. > > Why is having {mult=1<<22, shift=22} better for adjtime than {mult=1, > shift=0}?

Re: [kvm-devel] Duplicate content in files

2007-06-19 Thread Anthony Liguori
Baruch Even wrote: > Luca wrote: > >> On 6/19/07, Baruch Even <[EMAIL PROTECTED]> wrote: >> >>> Hello, >>> >>> I've tried to diff kvm-28 qemu directory with qemu 0.9.0 and I see that >>> some files in the kvm sources have the content of the file duplicated, >>> f.ex. qemu/hw/mips_int.c has

Re: [kvm-devel] Duplicate content in files

2007-06-19 Thread Baruch Even
Luca wrote: > On 6/19/07, Baruch Even <[EMAIL PROTECTED]> wrote: >> Hello, >> >> I've tried to diff kvm-28 qemu directory with qemu 0.9.0 and I see that >> some files in the kvm sources have the content of the file duplicated, >> f.ex. qemu/hw/mips_int.c has it's own content twice in the kvm tree,

Re: [kvm-devel] Duplicate content in files

2007-06-19 Thread Luca
On 6/19/07, Baruch Even <[EMAIL PROTECTED]> wrote: > Hello, > > I've tried to diff kvm-28 qemu directory with qemu 0.9.0 and I see that > some files in the kvm sources have the content of the file duplicated, > f.ex. qemu/hw/mips_int.c has it's own content twice in the kvm tree, it > only has it on

Re: [kvm-devel] [PATCH 1/2] kvm: Fix x86 emulator writeback

2007-06-19 Thread Luca Tettamanti
Il Mon, Jun 18, 2007 at 02:32:39PM +0300, Avi Kivity ha scritto: > >Unfortunately, this kills Windows XP (first run with a guest crash, > >second with a host oops), so I reverted it. I'd guess some operation > >which doesn't need writeback ends up in the modified code. > >Previously, the che

[kvm-devel] [PATCH 2/2] kvm: avoid useless memory write when possible

2007-06-19 Thread Luca Tettamanti
When writing to normal memory and the memory area is unchanged the write can be safely skipped, avoiding the costly kvm_mmu_pte_write. Signed-Off-By: Luca Tettamanti <[EMAIL PROTECTED]> --- Tested with Fedora7, Solaris10 and WinXP on a 32 bit host with Intel CPU. drivers/kvm/kvm_main.c |6

[kvm-devel] [PATCH 1/2] kvm: Fix x86 emulator writeback

2007-06-19 Thread Luca Tettamanti
When the old value and new one are the same the emulator skips the write; this is undesiderable when the destination is a MMIO area and the write shall be performed regardless of the previous value. This optimization breaks e.g. a Linux guest APIC compiled without X86_GOOD_APIC. Remove the check a

Re: [kvm-devel] [PATCH 5/5] KVM: paravirt time source

2007-06-19 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: >> +.read = read_hyper, >> +.mask = CLOCKSOURCE_MASK(64), >> +.mult = 1, >> +.shift = 0, >> >> > > It would be better to use a scale and shift here, so that adjtime has > someth

[kvm-devel] Duplicate content in files

2007-06-19 Thread Baruch Even
Hello, I've tried to diff kvm-28 qemu directory with qemu 0.9.0 and I see that some files in the kvm sources have the content of the file duplicated, f.ex. qemu/hw/mips_int.c has it's own content twice in the kvm tree, it only has it once in qemu as it should be. Look for the include directive

Re: [kvm-devel] [PATCH 9/9] KVM: Adds support for halting in the kernel

2007-06-19 Thread Gregory Haskins
On Tue, 2007-06-19 at 17:48 +0300, Avi Kivity wrote: > Gregory Haskins wrote: > > Halting in userspace requires a relatively cumbersome mechanism to signal > > the > > halted VCPU. Implementing halt in kernel should be relatively straight > > forward and it eliminates the need for the signaling >

Re: [kvm-devel] Erratic gettimeofday() behavior with KVM and newer Linux kernels?

2007-06-19 Thread Anthony Liguori
Avi Kivity wrote: > Anthony Liguori wrote: >> >> It's less stable then I thought. > > less stable? less unstable? It didn't fix the problem :-) >> You were right btw, the guest is deciding the TSC is too unreliable. >> It happens every once and while (although the taskset/no pm timer >> comb

Re: [kvm-devel] Erratic gettimeofday() behavior with KVM and newer Linux kernels?

2007-06-19 Thread Avi Kivity
Anthony Liguori wrote: > > It's less stable then I thought. less stable? less unstable? > You were right btw, the guest is deciding the TSC is too unreliable. > It happens every once and while (although the taskset/no pm timer > combination helps a whole lot). > Well, the guest is right too

Re: [kvm-devel] support for in-kernel piohandlers

2007-06-19 Thread Avi Kivity
Dong, Eddie wrote: > This patch add in-kernel piohandlers on top of Greg's in-kernel > mmiohandlers as a preparation of in kernel PIC patch. > > Applied, thanks. -- error compiling committee.c: too many arguments to function --

Re: [kvm-devel] Erratic gettimeofday() behavior with KVM and newer Linux kernels?

2007-06-19 Thread Anthony Liguori
Avi Kivity wrote: > Anthony Liguori wrote: >> Avi Kivity wrote: >>> Anthony Liguori wrote: Avi Kivity wrote: > Anthony Liguori wrote: >> It's pretty erratic. If I run if a few times at any rate, >> sometimes I get 0.0 and sometimes I get a more sane result. > > I expect t

Re: [kvm-devel] Erratic gettimeofday() behavior with KVM and newer Linux kernels?

2007-06-19 Thread Avi Kivity
Anthony Liguori wrote: > Avi Kivity wrote: >> Anthony Liguori wrote: >>> Avi Kivity wrote: Anthony Liguori wrote: > It's pretty erratic. If I run if a few times at any rate, > sometimes I get 0.0 and sometimes I get a more sane result. I expect the newer kernel is sometimes

Re: [kvm-devel] Is there any accurate way to check if Qemu is using KVM modules?

2007-06-19 Thread Avi Kivity
You, Yongkang wrote: >>> I am a newbie for KVM testing. >>> Now I meet a problem in testing, that it seems there isn't a simple and >>> >> effective way to judge if a Qemu is using KVM modules or doing pure Qemu >> operations. >> >>> Checking how many reference of kvm.ko by lsmod is a w

Re: [kvm-devel] [PATCH 9/9] KVM: Adds support for halting in the kernel

2007-06-19 Thread Avi Kivity
Gregory Haskins wrote: > Halting in userspace requires a relatively cumbersome mechanism to signal the > halted VCPU. Implementing halt in kernel should be relatively straight > forward and it eliminates the need for the signaling > > Merging this one in, found some nits: > +/* > * This fun

Re: [kvm-devel] Is there any accurate way to check if Qemu isusing KVMmodules?

2007-06-19 Thread You, Yongkang
> >A non-programmatic way is to look at the SDL banner window (assuming you >are using SDL and not VNC or gfx disabled). When you are using KVM it >will say "QEMU/KVM". It would be troublesome if doing auto testing. :) > >(WARNING: hack alert) A programmatic way would be to check the /proc >files

Re: [kvm-devel] Is there any accurate way to check if Qemu is using KVM modules?

2007-06-19 Thread You, Yongkang
>> I am a newbie for KVM testing. >> Now I meet a problem in testing, that it seems there isn't a simple and >effective way to judge if a Qemu is using KVM modules or doing pure Qemu >operations. >> >> Checking how many reference of kvm.ko by lsmod is a way, but would meet >trouble when creating mu

Re: [kvm-devel] Erratic gettimeofday() behavior with KVM and newer Linux kernels?

2007-06-19 Thread Anthony Liguori
Avi Kivity wrote: > Anthony Liguori wrote: >> Avi Kivity wrote: >>> Anthony Liguori wrote: It's pretty erratic. If I run if a few times at any rate, sometimes I get 0.0 and sometimes I get a more sane result. >>> >>> I expect the newer kernel is sometimes disqualifying the timestamp >>

Re: [kvm-devel] Erratic gettimeofday() behavior with KVM and newer Linux kernels?

2007-06-19 Thread Avi Kivity
Anthony Liguori wrote: > Avi Kivity wrote: >> Anthony Liguori wrote: >>> It's pretty erratic. If I run if a few times at any rate, sometimes >>> I get 0.0 and sometimes I get a more sane result. >> >> I expect the newer kernel is sometimes disqualifying the timestamp >> counter from being used a

Re: [kvm-devel] Is there any accurate way to check if Qemu is using KVMmodules?

2007-06-19 Thread Gregory Haskins
A non-programmatic way is to look at the SDL banner window (assuming you are using SDL and not VNC or gfx disabled). When you are using KVM it will say "QEMU/KVM". (WARNING: hack alert) A programmatic way would be to check the /proc filesystem for the pid of the QEMU process for open references t

Re: [kvm-devel] Is there any accurate way to check if Qemu is using KVM modules?

2007-06-19 Thread Avi Kivity
You, Yongkang wrote: > Hi all, > > I am a newbie for KVM testing. > Now I meet a problem in testing, that it seems there isn't a simple and > effective way to judge if a Qemu is using KVM modules or doing pure Qemu > operations. > > Checking how many reference of kvm.ko by lsmod is a way, but w

Re: [kvm-devel] Erratic gettimeofday() behavior with KVM and newer Linux kernels?

2007-06-19 Thread Anthony Liguori
Avi Kivity wrote: > Anthony Liguori wrote: >> It's pretty erratic. If I run if a few times at any rate, sometimes >> I get 0.0 and sometimes I get a more sane result. > > I expect the newer kernel is sometimes disqualifying the timestamp > counter from being used as a clocksource. Running pinn

[kvm-devel] Is there any accurate way to check if Qemu is using KVM modules?

2007-06-19 Thread You, Yongkang
Hi all, I am a newbie for KVM testing. Now I meet a problem in testing, that it seems there isn't a simple and effective way to judge if a Qemu is using KVM modules or doing pure Qemu operations. Checking how many reference of kvm.ko by lsmod is a way, but would meet trouble when creating mu

Re: [kvm-devel] Suspending with kvm and kvm_loaded

2007-06-19 Thread Richard Hughes
On Tue, 2007-06-19 at 08:33 -0400, Jeremy Katz wrote: > On Tue, 2007-06-19 at 11:05 +0300, Avi Kivity wrote: > > Richard Hughes wrote: > > > On Sun, 2007-06-17 at 11:10 +0300, Avi Kivity wrote: > > >> I posted a patchset which does just that, when the F kernel > > >> integrates > > >> it (through

Re: [kvm-devel] Suspending with kvm and kvm_loaded

2007-06-19 Thread Jeremy Katz
On Tue, 2007-06-19 at 11:05 +0300, Avi Kivity wrote: > Richard Hughes wrote: > > On Sun, 2007-06-17 at 11:10 +0300, Avi Kivity wrote: > >> I posted a patchset which does just that, when the F kernel > >> integrates > >> it (through inclusion of 2.6.23 or by patching the current kernel), > >> Fedo

Re: [kvm-devel] lapic branch rebased and updated

2007-06-19 Thread Avi Kivity
Gregory Haskins wrote: > On Tue, 2007-06-19 at 13:29 +0300, Avi Kivity wrote: > >> Avi Kivity wrote: >> >>> Avi Kivity wrote: >>> - rebased to latest master - added latest 6 patches from Gregory >>> My AMD machine seems happy with it. I'll start picking

Re: [kvm-devel] lapic branch rebased and updated

2007-06-19 Thread Gregory Haskins
On Tue, 2007-06-19 at 13:29 +0300, Avi Kivity wrote: > Avi Kivity wrote: > > Avi Kivity wrote: > >> - rebased to latest master > >> - added latest 6 patches from Gregory > >> > > > > My AMD machine seems happy with it. I'll start picking stuff into > > mainline. > > > Spoke too soon. Things are

Re: [kvm-devel] lapic branch rebased and updated

2007-06-19 Thread Avi Kivity
Avi Kivity wrote: > Avi Kivity wrote: >> - rebased to latest master >> - added latest 6 patches from Gregory >> > > My AMD machine seems happy with it. I'll start picking stuff into > mainline. > Spoke too soon. Things are broken. -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] lapic branch rebased and updated

2007-06-19 Thread Avi Kivity
Avi Kivity wrote: > - rebased to latest master > - added latest 6 patches from Gregory > My AMD machine seems happy with it. I'll start picking stuff into mainline. -- error compiling committee.c: too many arguments to function -

Re: [kvm-devel] KVM 28: Reboot fails in Linux

2007-06-19 Thread Baruch Even
Avi Kivity wrote: > Baruch Even wrote: >> I'm using KVM 28 and when I'm trying to reboot the guest vm kvm fails >> with the following message: >> >> > > Can you be more specific as to what you're doing? what host cpu, > bitness, guest OS, bitness, actions to reproduce? The host CPU is Intel

[kvm-devel] lapic branch rebased and updated

2007-06-19 Thread Avi Kivity
- rebased to latest master - added latest 6 patches from Gregory the smp patches gave birth to a nice lockless inter-vcpu signalling system, I'll try to reuse that for lapic. -- error compiling committee.c: too many arguments to function ---

Re: [kvm-devel] Windows XP crash: emulation failed but !mmio_needed?

2007-06-19 Thread Avi Kivity
Adam Monsen wrote: > I had just installed a Windows XP guest and left it running for a few > hours with no users logged in. The machine appears to have crashed. > Avi requested that I send this bug(?) report to kvm-devel, so here > 'tis... > > REPRO STEPS: > 1. Install Fedora 7 > 2. Install KVM > 3

Re: [kvm-devel] [PATCH RFC 3/3] Virtio draft III: example block driver

2007-06-19 Thread Avi Kivity
Rusty Russell wrote: > On Mon, 2007-06-18 at 12:09 +0300, Avi Kivity wrote: > >> Rusty Russell wrote: >> >>> On Sun, 2007-06-17 at 17:25 +0300, Avi Kivity wrote: >>> >>> Rusty Russell wrote: > + /* Set up for reply. */ > + vblk->sg[0].page = vi

Re: [kvm-devel] [Patch] Implement emulation of instruction "ret"

2007-06-19 Thread Avi Kivity
Kamble, Nitin A wrote: > The patch attached to this email. >> Hi Avi, >> >> Attached is a patch implementing the instruction "ret" opcode 0xc3. >> >> Please Comment/Apply. Applied, thanks. -- error compiling committee.c: too many arguments to function ---

Re: [kvm-devel] [Patch] Implement emulation of "pop reg" instruction

2007-06-19 Thread Avi Kivity
Kamble, Nitin A wrote: > Hi Avi, > Patch implementing the "pop reg", opcodes 0x58-0x5f attached. It > has passed the checkpatch.pl test. And you should not see any CRLF > characters in the attachment. > I did get it in dos format. I guess I'll just have to live with it. Applied & thanks.

Re: [kvm-devel] [patch] emit more information on the emulation failure

2007-06-19 Thread Avi Kivity
Kamble, Nitin A wrote: > Hi Avi, > > Attached is a small patch to emit little bit more information when > emulcation reaches cannot_emulate:. > > > The patch looks fine to the scripts/checkpatch.pl. It show not look to > you in the DOS format, unless something in between us is changing the > for

Re: [kvm-devel] Suspending with kvm and kvm_loaded

2007-06-19 Thread Avi Kivity
Richard Hughes wrote: > On Sun, 2007-06-17 at 11:10 +0300, Avi Kivity wrote: > >> I posted a patchset which does just that, when the F kernel >> integrates >> it (through inclusion of 2.6.23 or by patching the current kernel), >> Fedora will be able to suspend/resume just fine. >> > > I'

Re: [kvm-devel] [PATCH 5/5] KVM: paravirt time source

2007-06-19 Thread Rusty Russell
On Tue, 2007-06-19 at 10:44 +0300, Avi Kivity wrote: > Anthony Liguori wrote: > > > >> How are you doing clockevents? > >> > >> > > > > Right now, I'm relying on the PIT but it would be nice to eliminate > > that. I'd like to move to something PV so that I can make use of > > tickless gu

Re: [kvm-devel] another centrino duo problem

2007-06-19 Thread Avi Kivity
David Brown wrote: > Okay there's another centrino duo issue I've run across. > > Also, finally got a setup where I can get console dumps from kvm :) so > I should be able to provide much better debugging information. > > This happens when I try to tftpboot from and etherboot image and > install ei

Re: [kvm-devel] [PATCH 5/5] KVM: paravirt time source

2007-06-19 Thread Avi Kivity
Anthony Liguori wrote: > >> How are you doing clockevents? >> >> > > Right now, I'm relying on the PIT but it would be nice to eliminate > that. I'd like to move to something PV so that I can make use of > tickless guest kernels. I'm very open to suggestion and even more open > to reus

Re: [kvm-devel] Erratic gettimeofday() behavior with KVM and newer Linux kernels?

2007-06-19 Thread Avi Kivity
Anthony Liguori wrote: > In debugging a virtbench bug on KVM, I seemed to uncover some weird > behaviors with gettimeofday() and KVM with newer kernels. > > The attached program will run a tight loop of code a certain number of > times and measure it's duration with gettimeofday(). With a stock

Re: [kvm-devel] KVM 28: Reboot fails in Linux

2007-06-19 Thread Avi Kivity
Baruch Even wrote: > I'm using KVM 28 and when I'm trying to reboot the guest vm kvm fails > with the following message: > > Can you be more specific as to what you're doing? what host cpu, bitness, guest OS, bitness, actions to reproduce? -- error compiling committee.c: too many arguments