Re: [kvm-devel] [PATCH] [RESEND] Update kernel/Makefile and remove x86 only entries

2008-05-02 Thread Avi Kivity
Jerone Young wrote: This patch removes static x86 entries and makes things work for multiple archs. Applied, thanks, -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.

Re: [kvm-devel] fx_init schedule in atomic

2008-05-02 Thread Avi Kivity
Andrea Arcangeli wrote: This make sure not to schedule in atomic during fx_init. I also changed the name of fpu_init to fx_finit to avoid duplicating the name with fpu_init that is already used in the kernel, this makes grep simpler if nothing else. Applied, thanks. Dynamic allocation

Re: [kvm-devel] [PATCH] Don't leak EPT identity page table

2008-05-02 Thread Avi Kivity
Anthony Liguori wrote: In vmx.c:alloc_identity_pagetable() we grab a reference to the EPT identity page table via gfn_to_page(). We never release this reference though. This patch releases the reference to this page on VM destruction. I haven't tested this with EPT. Applied, thanks.

Re: [kvm-devel] [PATCH]: Fake MSR_K7 performance counters

2008-05-02 Thread Avi Kivity
Chris Lalancette wrote: Chris Lalancette wrote: Attached is a patch that fixes a guest crash when booting older Linux kernels. The problem stems from the fact that we are currently emulating MSR_K7_EVNTSEL[0-3], but not emulating MSR_K7_PERFCTR[0-3]. Because of this,

Re: [kvm-devel] kvm-67: kernel panic while booting debian-40r3-i386-businesscard.iso

2008-05-02 Thread Avi Kivity
Jan Luebbe wrote: Hi! I'm preparing kvm-67 for debian. While testing i noticed a problem: When booting the debian installer from the official CD [1] this problem: Call Trace: [c0146d5b] kmem_cache_create+0x15e/0x410 Code: c3 57 56 53 89 c6 9c 5f fa 8b 08 83 39 00

Re: [kvm-devel] qemu/kvm seems to take ALSA all for itself?

2008-05-02 Thread Avi Kivity
David Abrahams wrote: Jon iroquoi at gmail.com writes: I use: export QEMU_AUDIO_DRV=alsa export QEMU_AUDIO_DAC_FIXED_FREQ=48000 export QEMU_AUDIO_ADC_FIXED_FREQ=48000 export QEMU_ALSA_DAC_BUFFER_SIZE=16384 Buffer size is very important, else it crackles and pops for me.

Re: [kvm-devel] Wiki: Add SMP Count to Guest Support Status

2008-05-02 Thread Avi Kivity
Fabian Deutsch wrote: Avi Kivity wrote: Fabian Deutsch wrote: Hey. I've been trying Microsoft Windows 2003 a couple of times. The wiki tells me that everything should work okay. It does, when using -smp 1, but gets ugly when using -smp 2 or so. SO might it be useful, to add

Re: [kvm-devel] Feedback and errors

2008-05-02 Thread Avi Kivity
nadim khemir wrote: Hi, great work. While playing with kvm-qemu I noticed a few points that might be of interrest: 1/ -loadvm and -snapshot don't work together. It works as if -loadvm wasn't passed as argument 2/ two instances of kvm can be passed the same -hda. There is no locking

Re: [kvm-devel] [PATCH 2/2] KVM: Handle interrupts for PCI passthrough devices

2008-05-02 Thread Avi Kivity
Amit Shah wrote: +static irqreturn_t +kvm_pci_pt_dev_intr(int irq, void *dev_id) +{ + struct kvm_pci_pt_dev_list *match; + struct kvm *kvm = (struct kvm *) dev_id; + + if (!test_bit(irq, pt_irq_handled)) + return IRQ_NONE; + + if (test_bit(irq,

Re: [kvm-devel] [PATCH] kvm: qemu: Allow booting from extboot drive with -kernel

2008-05-02 Thread Avi Kivity
Mark McLoughlin wrote: The -kernel option generates a new boot sector for the boot drive which jumps directly to the supplied kernel rather than running the standard bootloader. Trivially fix generate_bootsect() to handle the case where we're booting using extboot. Applied, thanks. --

Re: [kvm-devel] [PATCH] x86: handle double and triple faults for every exception

2008-05-02 Thread Avi Kivity
Joerg Roedel wrote: The current KVM x86 exception code handles double and triple faults only for page fault exceptions. This patch extends this detection for every exception that gets queued for the guest. Some double faults are handled serially rather than generating a #DF. For example

Re: [kvm-devel] libkvm: initialize no_pit_creation

2008-05-02 Thread Avi Kivity
Jan Kiszka wrote: Yeah, it is. Reminds me of another warning I recently came across (offsets may vary due to other patches: ==5801== 1 errors in context 1 of 2: ==5801== Conditional jump or move depends on uninitialised value(s) ==5801==at 0x53F4AE: kvm_register_userspace_phys_mem

Re: [kvm-devel] [PATCH 2/2] KVM: Handle interrupts for PCI passthrough devices

2008-05-02 Thread Avi Kivity
Amit Shah wrote: Seems to me the only choice here is to mask the interrupt at the ioapic level, wait until the guest acks the interrupt, then unmask the interrupt. OK; will that create problems if the line is shared? It will not work with shared interrupts (unless all users of the

Re: [kvm-devel] Feedback and errors

2008-05-02 Thread Avi Kivity
Anthony Liguori wrote: 2/ two instances of kvm can be passed the same -hda. There is no locking whatsoever. This messes up things seriously. These two are upstream qemu problems. Copying qemu-devel. I guess using file locking by default would improve the situation, and we can

Re: [kvm-devel] Feedback and errors

2008-05-02 Thread Avi Kivity
Daniel P. Berrange wrote: I guess using file locking by default would improve the situation, and we can add a -drive ...,exclusive=no option for people playing with cluster filesystems. Turning on file locking by default will break existing apps / deployments using shared disks. IMHO

Re: [kvm-devel] [PATCH] Handle vma regions with no backing page (v2)

2008-04-30 Thread Avi Kivity
Andrea Arcangeli wrote: On Wed, Apr 30, 2008 at 11:59:47AM +0300, Avi Kivity wrote: The code is not trying to find a vma for the address, but a vma for the address which also has VM_PFNMAP set. The cases for vma not found, or vma found, but not VM_PFNMAP, are folded together

Re: [kvm-devel] small author mixup

2008-04-30 Thread Avi Kivity
Christian Borntraeger wrote: Am Sonntag, 27. April 2008 schrieb Avi Kivity: Carsten Otte (4): s390: KVM preparation: provide hook to enable pgstes in user pagetable KVM: s390: interrupt subsystem, cpu timer, waitpsw KVM: s390: API documentation s390: KVM guest

Re: [kvm-devel] [PATCH] Handle vma regions with no backing page (v2)

2008-04-30 Thread Avi Kivity
Muli Ben-Yehuda wrote: @@ -544,19 +545,35 @@ pfn_t gfn_to_pfn(struct kvm *kvm, gfn_t gfn) npages = get_user_pages(current, current-mm, addr, 1, 1, 1, page, NULL); -if (npages != 1) { -get_page(bad_page); -return

Re: [kvm-devel] Moving kvm lists to kernel.org?

2008-04-30 Thread Avi Kivity
David Miller wrote: I've created (and tested) all of these lists. Thanks. I about a week I'll make the sourceforge lists read-only. -- Any sufficiently difficult bug is indistinguishable from a feature. - This

Re: [kvm-devel] [PATCH] x86: handle double and triple faults for every exception

2008-04-30 Thread Avi Kivity
Jan Kiszka wrote: Joerg Roedel wrote: The current KVM x86 exception code handles double and triple faults only for page fault exceptions. This patch extends this detection for every exception that gets queued for the guest. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Cc: Jan Kiszka

Re: [kvm-devel] performance with guests running 2.4 kernels (specifically RHEL3)

2008-04-30 Thread Avi Kivity
David S. Ahern wrote: Another tidbit for you guys as I make my way through various permutations: I installed the RHEL3 hugemem kernel and the guest behavior is *much* better. System time still has some regular hiccups that are higher than xen and esx (e.g., 1 minute samples out of 5 show

[kvm-devel] [ANNOUNCE] kvm mailing lists moving

2008-04-30 Thread Avi Kivity
In about a week, the various kvm lists will move to vger.kenel.org. This will improve responsiveness, and reduce spam and advertising. Please subscribe to the lists you are interested in as soon as possible. You can subscribe by sending an email to [EMAIL PROTECTED], with the following lines

Re: [kvm-devel] [PATCH] x86: handle double and triple faults for every exception

2008-04-30 Thread Avi Kivity
Jan Kiszka wrote: Clear the pending original exception when raising a triple fault. This allows to re-use the vcpu instance, e.g. after a reset which is typically issued as reaction on the triple fault. Signed-off-by: Jan Kiszka [EMAIL PROTECTED] --- arch/x86/kvm/x86.c |4 +++- 1

Re: [kvm-devel] Fwd: [kvm-ppc-devel] [PATCH] kvmppc: deliver INTERRUPT_FP_UNAVAIL to the guest

2008-04-30 Thread Avi Kivity
Hollis Blanchard wrote: Acked-by: Hollis Blanchard [EMAIL PROTECTED] Avi, please apply for 2.6.26. Sure thing. Thanks. -- Any sufficiently difficult bug is indistinguishable from a feature. - This SF.net email is

Re: [kvm-devel] performance with guests running 2.4 kernels (specifically RHEL3)

2008-04-30 Thread Avi Kivity
David S. Ahern wrote: Avi Kivity wrote: David S. Ahern wrote: Another tidbit for you guys as I make my way through various permutations: I installed the RHEL3 hugemem kernel and the guest behavior is *much* better. System time still has some regular hiccups that are higher than

Re: [kvm-devel] KVM: PIT: support mode 4

2008-04-30 Thread Avi Kivity
Marcelo Tosatti wrote: The in-kernel PIT emulation ignores pending timers if operating under mode 4, which for example DragonFlyBSD uses (and Plan9 too, apparently). Mode 4 seems to be similar to one-shot mode, other than the fact that it starts counting after the next CLK pulse once

Re: [kvm-devel] [PATCH] x86: handle double and triple faults for every exception

2008-04-30 Thread Avi Kivity
Jan Kiszka wrote: Yes, the following still works for me. But I'm not the right person to ask if there are obscure cases where you may not want this clearing while just editing some registers (I'm thinking of debugger scenarios now). Applied, as the bug we're fixing is much more likely

Re: [kvm-devel] [PATCH 0/6] SVM: complete support for kvmtrace

2008-04-30 Thread Avi Kivity
Joerg Roedel wrote: This series of patches adds the missing kvmtrace markers to the SVM specific code paths in KVM. Further it adds a new trace event for TDP page faults. Thanks, applied all. Please use git format-patch -n (or format.numbered = auto) so that patch order is explicit. --

Re: [kvm-devel] Windows PV driver for KVM

2008-04-30 Thread Avi Kivity
Jiang, Yunhong wrote: I noticed there is a windows PV driver based on virtIO in http://sourceforge.net/project/showfiles.php?group_id=180599 But when I enable the driver in guest, the guest will hang. I'm using changeset around April, 18. Since the driver is created in March, I assume the

Re: [kvm-devel] [PATCH] Update kernel/Makefile and remove x86 only entries

2008-04-30 Thread Avi Kivity
Jerone Young wrote: This patch removes static x86 entries and makes things work for multiple archs. Signed-off-by: Jerone Young [EMAIL PROTECTED] diff --git a/kernel/Makefile b/kernel/Makefile --- a/kernel/Makefile +++ b/kernel/Makefile @@ -1,5 +1,10 @@ include ../config.mak include

Re: [kvm-devel] [PATCH 1 of 3] Remove dynamic allocation of /hypervisor node from device tree in memory

2008-04-30 Thread Avi Kivity
Jerone Young wrote: 1 file changed, 1 deletion(-) qemu/hw/ppc440_bamboo.c |1 - In 2.6.26 wait is now enabled by default. With this the /hypervisor node will not be need to be idetified to enable the guest to go into wait state while idle. Signed-off-by: Jerone Young [EMAIL

Re: [kvm-devel] Moving kvm lists to kernel.org?

2008-04-29 Thread Avi Kivity
David Miller wrote: Should I create the list(s) now? If so, please let me know the names they should have. I sent an email a couple of days ago to [EMAIL PROTECTED]: Hi, please create the following lists for kvm: kvm (x86 and general discussion) kvm-ppc (powerpc, managed by Hollis

Re: [kvm-devel] [PATCH] Handle vma regions with no backing page (v2)

2008-04-29 Thread Avi Kivity
Anthony Liguori wrote: This patch allows VMA's that contain no backing page to be used for guest memory. This is a drop-in replacement for Ben-Ami's first page in his direct mmio series. Here, we continue to allow mmio pages to be represented in the rmap. I like this very much, as it

Re: [kvm-devel] [PATCH] [RFC] try to reduce kvm impact in core qemu code.

2008-04-29 Thread Avi Kivity
Glauber Costa wrote: Hi. This is a proposal for reducing the impact of kvm functions in core qemu code. This is by all means not ready, but I felt like posting it, so a discussion on it could follow. The idea in this patch is to replace the specific kvm details from core qemu files like

Re: [kvm-devel] [PATCH] Handle vma regions with no backing page (v2)

2008-04-29 Thread Avi Kivity
Anthony Liguori wrote: struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn) { -return pfn_to_page(gfn_to_pfn(kvm, gfn)); +pfn_t pfn; + +pfn = gfn_to_pfn(kvm, gfn); +if (pfn_valid(pfn)) +return pfn_to_page(pfn); + +return NULL; } You're

Re: [kvm-devel] [PATCH] KVM x86: Handle hypercalls for assigned PCI devices

2008-04-29 Thread Avi Kivity
Amit Shah wrote: + if (is_error_page(host_page)) { + printk(KERN_INFO %s: gfn %p not valid\n, + __func__, (void *)page_gfn); + r = -1; r = -1 is not really informative. Better use some meaningful error. The error's going to the guest.

Re: [kvm-devel] [PATCH] Handle vma regions with no backing page (v2)

2008-04-29 Thread Avi Kivity
Anthony Liguori wrote: Avi Kivity wrote: It depends on what's going on? Does a page table point to mmio? Or the glommerclock? Not sure there is a single answer. Perhaps we should be replacing consumers of gfn_to_page() with copy_to_user() instead? Indeed we should. The problem

Re: [kvm-devel] State of debug register emulation

2008-04-29 Thread Avi Kivity
Jan Kiszka wrote: This still leaves me with the question how to handle the case when the host sets and arms some debug registers to debug the guest and the latter does the same to debug itself. Guest access will be trapped, OK, but KVM will then have to decide which value should actually be

Re: [kvm-devel] Protected mode transitions and big real mode... still an issue

2008-04-29 Thread Avi Kivity
Laurent Vivier wrote: Why dst.val is not 0x53e10 ? I can answer myself to this one: emulate_2op_SrcB(sal, c-src, c-dst, ctxt-eflags); does nothing if dst.byte == 0 So next question is the good question... Why dst.byte is 0 ? Because dst.bytes is only set if

Re: [kvm-devel] Wiki: Add SMP Count to Guest Support Status

2008-04-29 Thread Avi Kivity
Fabian Deutsch wrote: Hey. I've been trying Microsoft Windows 2003 a couple of times. The wiki tells me that everything should work okay. It does, when using -smp 1, but gets ugly when using -smp 2 or so. SO might it be useful, to add the column smp to the Guest Support Status Page in the

Re: [kvm-devel] [PATCH] Don't race while creating a VCPU

2008-04-29 Thread Avi Kivity
Anthony Liguori wrote: We hold qemu_mutex while machine-init() executes, which issues a VCPU create. We need to make sure to not return from the VCPU creation until the VCPU file descriptor is valid to ensure that APIC creation succeeds. However, we also need to make sure that the VCPU thread

[kvm-devel] [ANNOUNCE] kvm-67 release

2008-04-28 Thread Avi Kivity
This release adds support for the ppc 44x embedded processors. Like s390 and ia64, it is only provided in the git tree, not in the tarball. Linux guests are supported. Changes from kvm-66: - s390/ia64: compile fix (Christian Borntraeger) - s390: change virtio interrupt to follow arch

Re: [kvm-devel] [PATCH 8/8] KVM: VMX: Enable EPT feature for KVM

2008-04-28 Thread Avi Kivity
Yang, Sheng wrote: The updated patch also moved ept_load_pdptrs() from critical region to kvm_handle_vmexit(). Thanks; applied all EPT patches. -- error compiling committee.c: too many arguments to function - This

Re: [kvm-devel] kvm: how big is type?

2008-04-28 Thread Avi Kivity
Harvey Harrison wrote: arch/x86/kvm/x86.c:3484:25: warning: cast truncates bits from constant value (100 becomes 0) arch/x86/kvm/x86.c:3510:24: warning: cast truncates bits from constant value (100 becomes 0) The problem: cseg_desc.type = ~(1 8); //clear the B flag

Re: [kvm-devel] kvm: how big is type?

2008-04-28 Thread Avi Kivity
Izik Eidus wrote: Avi Kivity wrote: Harvey Harrison wrote: arch/x86/kvm/x86.c:3484:25: warning: cast truncates bits from constant value (100 becomes 0) arch/x86/kvm/x86.c:3510:24: warning: cast truncates bits from constant value (100 becomes 0) The problem

Re: [kvm-devel] [PATCH] [KVM POWERPC] Handle guest idle by emulating MSR[WE] writes

2008-04-28 Thread Avi Kivity
Hollis Blanchard wrote: This reduces host CPU usage when the guest is idle. However, the guest must set MSR[WE] in its idle loop, which Linux did not do until 2.6.26. Applied, thanks. -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] [PATCH 4/8] KVM: MMU: Add EPT support

2008-04-27 Thread Avi Kivity
Yang, Sheng wrote: From 239f38236196c2321989c64d7c61ff28490b3f00 Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Fri, 25 Apr 2008 21:13:50 +0800 Subject: [PATCH 4/8] KVM: MMU: Add EPT support Enable kvm_set_spte() to generate EPT entries. @@ -1155,7 +1178,7 @@ static int

Re: [kvm-devel] Moving kvm lists to kernel.org?

2008-04-27 Thread Avi Kivity
Avi Kivity wrote: I propose moving the kvm lists to vger.kernel.org, for the following benefits: - better spam control - faster service (I see significant lag with the sourceforge lists) - no ads appended to the end of each email If no objections are raised, and if the vger postmasters

Re: [kvm-devel] [PATCH 8/8] KVM: VMX: Enable EPT feature for KVM

2008-04-27 Thread Avi Kivity
Yang, Sheng wrote: From 592b7855a88266fa19505f0d51fe12ec0eadfa62 Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Fri, 25 Apr 2008 22:14:06 +0800 Subject: [PATCH 8/8] KVM: VMX: Enable EPT feature for KVM Scratch my earlier __direct_map comment. diff --git

Re: [kvm-devel] libkvm: initialize no_pit_creation

2008-04-27 Thread Avi Kivity
Marcelo Tosatti wrote: Valgrind caught this: ==11754== Conditional jump or move depends on uninitialised value(s) ==11754==at 0x50C9BC: kvm_create_pit (libkvm-x86.c:153) ==11754==by 0x50CA7F: kvm_arch_create (libkvm-x86.c:178) ==11754==by 0x50AB31: kvm_create (libkvm.c:383)

Re: [kvm-devel] Kernel Oops with kvm 66 running WinXP

2008-04-27 Thread Avi Kivity
Michal Ludvig wrote: Hi, I've experienced a kernel Oops on 2.6.24 with kvm 66 on AMD in 64bit mode while starting up WinXP: kvm: emulating exchange as write Unable to handle kernel NULL pointer dereference at RIP: [883a7a5a] :kvm:x86_emulate_insn+0x3fa/0x4240

Re: [kvm-devel] [PATCH 0/4] paravirt clock patches

2008-04-27 Thread Avi Kivity
Gerd Hoffmann wrote: Hi folks, My first attempt to send out a patch series with git ... The patches fix the kvm paravirt clocksource code to be compatible with xen and they also factor out some code which can be shared into a separate source files used by both kvm and xen. The

Re: [kvm-devel] [PATCH] Remove test suite config.mak from libkvm build

2008-04-27 Thread Avi Kivity
Jerone Young wrote: This is a relic of the big userspace refactoring, but today libkvm does should not include settings from the test suite. This patch resolves this and removes the overwriting of setting from the main config.mak with test suite settings. applied, thanks. -- error

Re: [kvm-devel] Kernel Oops with kvm 66 running WinXP

2008-04-27 Thread Avi Kivity
Avi Kivity wrote: Michal Ludvig wrote: Hi, I've experienced a kernel Oops on 2.6.24 with kvm 66 on AMD in 64bit mode while starting up WinXP: kvm: emulating exchange as write Unable to handle kernel NULL pointer dereference at RIP: [883a7a5a

[kvm-devel] [UPDATED][ANNOUNCE] Preliminary KVM Forum 2008 Agenda

2008-04-27 Thread Avi Kivity
The preliminary KVM Forum 2008 agenda at http://kforum.qumranet.com/KVMForum/agenda.php has been updated, with a few more new presentations added. Be sure to check them out. Note we still have a couple more in the pipeline. If you haven't done so already, please register! There is a big

[kvm-devel] [GIT PULL] KVM updates for 2.6.26rc

2008-04-27 Thread Avi Kivity
() Anthony Liguori (1): KVM: MMU: Don't assume struct page for x86 Avi Kivity (33): KVM: x86 emulator: add support for group decoding KVM: x86 emulator: group decoding for group 1A KVM: x86 emulator: Group decoding for group 3 KVM: x86 emulator: Group decoding

Re: [kvm-devel] Error Compiling kvm-userspace

2008-04-27 Thread Avi Kivity
Mohammed Gamal wrote: Hi, I was trying to compile the code from kvm-userspace.git against the kernel from kvm.git tree. I ran configure --with-patched-kernel and I got this error: ../libkvm/libkvm.h:385: error: expected '=', ',', ';', 'asm' or Last commit broke libkvm. I pushed out a

Re: [kvm-devel] performance with guests running 2.4 kernels (specifically RHEL3)

2008-04-26 Thread Avi Kivity
David S. Ahern wrote: Avi Kivity wrote: Ah! The flood detector is not seeing the access through the kmap_atomic() pte, because that access has gone through the emulator. last_updated_pte_accessed(vcpu) will never return true. Can you verify that last_updated_pte_accessed(vcpu) indeed

Re: [kvm-devel] performance with guests running 2.4 kernels (specifically RHEL3)

2008-04-26 Thread Avi Kivity
David S. Ahern wrote: What is the rip (GUEST_RIP) value in the VMEXIT trace output? Is that the current instruction pointer for the guest? Yes. I take it the virt in the PAGE_FAULT trace output is the virtual address the guest was referencing when the page fault occurred. What I don't

Re: [kvm-devel] performance with guests running 2.4 kernels (specifically RHEL3)

2008-04-26 Thread Avi Kivity
David S. Ahern wrote: David S. Ahern wrote: Avi Kivity wrote: David S. Ahern wrote: I added the traces and captured data over another apparent lockup of the guest. This seems to be representative of the sequence (pid/vcpu removed). (+4776) VMEXIT [ exitcode

Re: [kvm-devel] Automatically hibernate XP guest on suspend?

2008-04-26 Thread Avi Kivity
David Abrahams wrote: Cam Macdonell wrote: David Abrahams wrote: If I suspend my host while running a Windows XP guest, the whole machine crashes, so I was hoping to automate hibernation of the guest OS and integrate that into my host's suspend process. Does anyone know how to do

Re: [kvm-devel] Automatically hibernate XP guest on suspend?

2008-04-26 Thread Avi Kivity
David Abrahams wrote: If I suspend my host while running a Windows XP guest, the whole machine crashes, so I was hoping to automate hibernation of the guest OS and integrate that into my host's suspend process. Does anyone know how to do that? It's doable (not sure how), but kvm ought

Re: [kvm-devel] Real Mode Improvement on Intel Hosts - GSoC Project

2008-04-26 Thread Avi Kivity
Anthony Liguori wrote: The second stage is to use a loop of x86_emulate() to run all 16-bit code (instead of using vm86 mode). This will allow us to support guests that use big real mode. Why do that unconditionally, instead of only when in a big-real-mode state? -- Do not meddle in

Re: [kvm-devel] [PATCH] Fix QEMU vcpu thread race with apic_reset

2008-04-26 Thread Avi Kivity
Ryan Harper wrote: There is a race between when the vcpu thread issues a create ioctl and when apic_reset() gets called resulting in getting a badfd error. The problem is indeed there, but the fix is wrong: main threadvcpu thread diff --git a/qemu/qemu-kvm.c

Re: [kvm-devel] WARNING: at /usr/src/modules/kvm/mmu.c:390 account_shadowed()

2008-04-26 Thread Avi Kivity
Marcelo Tosatti wrote: On Wed, Apr 23, 2008 at 09:30:06AM +0300, Avi Kivity wrote: as I got no reply, I guess it is a bad setup on my part. If that might help, this happenned while I was doing a make -j on webkit svn tree (ie. heavy c++ compilation workload

Re: [kvm-devel] Real Mode Improvement on Intel Hosts - GSoC Project

2008-04-26 Thread Avi Kivity
Mohammed Gamal wrote: Why do that unconditionally, instead of only when in a big-real-mode state? Is big-real-mode the only state where we have problems? In general, we need to emulate whenever we are in a VT-unfriendly state, where that is defined as guest state that fails the

Re: [kvm-devel] Real Mode Improvement on Intel Hosts - GSoC Project

2008-04-25 Thread Avi Kivity
Guillaume Thouvenin wrote: On Thu, 24 Apr 2008 11:05:39 -0500 Anthony Liguori [EMAIL PROTECTED] wrote: The first stage is to detect vmentry failures and run x86_emulate() for a single instruction. If you look at the mailing list, you'll see patches from myself and Guillaume. This

Re: [kvm-devel] [PATCH]: Fix MSR_K7_EVNTSEL{0,3} for SVM

2008-04-25 Thread Avi Kivity
Chris Lalancette wrote: Avi Kivity wrote: Now it uses %rsi instead of %esi, and any junk in the upper bits will cause the ja to be taken. We need to get a reduced testcase to the gcc folks, this is a serious bug. Any changes in the code to work around this would be fragile

Re: [kvm-devel] [PATCH 6/6] kvm: qemu: Enable EPT support for real mode

2008-04-24 Thread Avi Kivity
Yang, Sheng wrote: On Tuesday 22 April 2008 18:16:41 Avi Kivity wrote: Yang, Sheng wrote: From 73c33765f3d879001818cd0719038c78a0c65561 Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Fri, 18 Apr 2008 17:15:39 +0800 Subject: [PATCH] kvm: qemu: Enable EPT support

Re: [kvm-devel] [PATCH 6/6] kvm: qemu: Enable EPT support for real mode

2008-04-24 Thread Avi Kivity
Yang, Sheng wrote: Why not use ept_identity_pagetable != NULL to encode ept_identity_pagetable_done? ept_identity_pagetable_done was used to indicate if the pagetable was setted up, and ept_identity_pagetable was used to indicate if the page used for pagetable was allocated... I

Re: [kvm-devel] KVM Test result, kernel 873c05f.., userspace d102d75..

2008-04-24 Thread Avi Kivity
Yunfeng Zhao wrote: Hi All, This is today's KVM test result against kvm.git 873c05fa7e6fea27090b1bf0f67a073eadb04782 and kvm-userspace.git d102d750f397b543fe620a3c77a7e5e42c483865. I suspect 873c05fa7e6fea27090b1bf0f67a073eadb04782 itself, it's the only thing that has any chance of

Re: [kvm-devel] [kvm-ppc-devel] [PATCH] [RESEND] [v2] Make make sync in kernel dir work for multiple archs

2008-04-24 Thread Avi Kivity
Jerone Young wrote: 1 file changed, 37 insertions(+), 21 deletions(-) kernel/Makefile | 58 +++ - This adapts perviously sent patch to new changes to kernel/Makefile - Fixes improper check in conditional This patch add the

Re: [kvm-devel] [PATCH] Don't quit IO thread before all lvcpus stopped

2008-04-24 Thread Avi Kivity
Dor Laor wrote: while investigating the revert of fix sci irq set when acpi timer I discovered the reason. Please also re-revert the original patch. Applied, but system_powerdown still doesn't work with the sci acpi timer fix. -- error compiling committee.c: too many arguments to

[kvm-devel] Moving kvm lists to kernel.org?

2008-04-24 Thread Avi Kivity
I propose moving the kvm lists to vger.kernel.org, for the following benefits: - better spam control - faster service (I see significant lag with the sourceforge lists) - no ads appended to the end of each email If no objections are raised, and if the vger postmasters agree, I will mass

Re: [kvm-devel] KVM Test result, kernel 873c05f.., userspace d102d75..

2008-04-24 Thread Avi Kivity
Avi Kivity wrote: Yang, Sheng wrote: On Thursday 24 April 2008 19:37:03 Avi Kivity wrote: Yunfeng Zhao wrote: Hi All, This is today's KVM test result against kvm.git 873c05fa7e6fea27090b1bf0f67a073eadb04782 and kvm-userspace.git d102d750f397b543fe620a3c77a7e5e42c483865. I

Re: [kvm-devel] Moving kvm lists to kernel.org?

2008-04-24 Thread Avi Kivity
David Miller wrote: If no objections are raised, and if the vger postmasters agree, I will mass subscribe the current subscribers so that there will be no service interruption. I'm fine with adding the list, but we don't do mass subscribes like that, and this rule applies to every

Re: [kvm-devel] KVM Test result, kernel 873c05f.., userspace d102d75..

2008-04-24 Thread Avi Kivity
Chris Lalancette wrote: Avi Kivity wrote: Ok. __pit_timer_fn() is called from an interrupt, which then calls smp_call_function_single(), which calls spin_lock(). If we've already taken the lock, we hang. Ah. Just adding a me too; I didn't get a chance to debug it yesterday

Re: [kvm-devel] [PATCH]: Fix MSR_K7_EVNTSEL{0,3} for SVM

2008-04-24 Thread Avi Kivity
Chris Lalancette wrote: Avi Kivity wrote: You mean the gcc generates wrong code? It seems fine here (though wonderfully obfuscated). Can you attach an objdump -Sr svm.o? Also, what gcc version are you using? (sending attachment in private mail, so I don't spam the whole list

Re: [kvm-devel] [kvm-ppc-devel] Moving kvm lists to kernel.org?

2008-04-24 Thread Avi Kivity
Hollis Blanchard wrote: On Thursday 24 April 2008 07:54:10 Avi Kivity wrote: I propose moving the kvm lists to vger.kernel.org, for the following benefits: - better spam control - faster service (I see significant lag with the sourceforge lists) - no ads appended to the end of each

Re: [kvm-devel] [PATCH] Don't quit IO thread before all lvcpus stopped

2008-04-24 Thread Avi Kivity
Dor Laor wrote: On Thu, 2008-04-24 at 15:47 +0300, Avi Kivity wrote: Dor Laor wrote: while investigating the revert of fix sci irq set when acpi timer I discovered the reason. Please also re-revert the original patch. Applied, but system_powerdown still doesn't work

Re: [kvm-devel] Real Mode Improvement on Intel Hosts - GSoC Project

2008-04-24 Thread Avi Kivity
Mohammed Gamal wrote: Hi, My Project proposal Improving and Stabilizing Real-Mode Support for Intel Hosts has been accepted into Google Summer of Code under the Linux Foundation. You may have a look at the proposal abstract here:

Re: [kvm-devel] KVM Test result, kernel 873c05f.., userspace d102d75..

2008-04-24 Thread Avi Kivity
Marcelo Tosatti wrote: On Thu, Apr 24, 2008 at 04:44:27PM +0300, Avi Kivity wrote: Chris Lalancette wrote: Avi Kivity wrote: Ok. __pit_timer_fn() is called from an interrupt, which then calls smp_call_function_single(), which calls spin_lock(). If we've already taken

Re: [kvm-devel] Stupid Newbee Questions...

2008-04-23 Thread Avi Kivity
Stuart Sheldon wrote: 2) When I started writing the management scripts to start and stop the guests from the command line, I was using KVM-63 which allowed me to send a system_powerdown to the console, this would send a PWR to the guest's acpid that would bring the guest down gracefully. This

Re: [kvm-devel] WARNING: at /usr/src/modules/kvm/mmu.c:390 account_shadowed()

2008-04-23 Thread Avi Kivity
Thomas Cataldo wrote: On Mon, Apr 21, 2008 at 9:57 PM, Thomas Cataldo [EMAIL PROTECTED] wrote: Hi, I am running kvm-66 on top of a debian sid host with 2.6.24 (intel 32bit host). Got the following in my logs today : Apr 21 17:55:01 buffy kernel: WARNING: at

Re: [kvm-devel] [PATCH] Make virtio devices multi-function

2008-04-23 Thread Avi Kivity
Ian Kirk wrote: Avi Kivity wrote: For mass storage, we should follow the SCSI model with a single device serving multiple disks, similar to what you suggest. Not sure if the device should have a single queue or one queue per disk. Don't you just end up re-implementing SCSI

Re: [kvm-devel] [PATCH] Make virtio devices multi-function

2008-04-23 Thread Avi Kivity
Anthony Liguori wrote: BTW, I've never been that convinced that hotplugging devices is as useful as people make it out to be. I also think that's particularly true when it comes to hot adding/removing very large numbers of disks. On the contrary, the more disks you have, the more

Re: [kvm-devel] performance with guests running 2.4 kernels (specifically RHEL3)

2008-04-23 Thread Avi Kivity
David S. Ahern wrote: kvm_stat -1 is practically impossible to time correctly to get a good snippet. I've added a --log option to get vmstat-like output. I've also added --fields to select which fields are of interest, to avoid the need for 280-column displays. That's now pushed to

Re: [kvm-devel] performance with guests running 2.4 kernels (specifically RHEL3)

2008-04-23 Thread Avi Kivity
, and is there any memory pressure? mmu_topup_memory_caches() and emulate_instruction() were both run 214,270 times, most of them relatively quickly. b Note: I bumped the scheduling priority of the qemu threads to RR 1 so that few host processes could interrupt it. david Avi Kivity wrote

Re: [kvm-devel] What kernel options do I need to properly enable virtio net driver

2008-04-23 Thread Avi Kivity
Anthony Liguori wrote: Jerone Young wrote: What I am asking is do I have all the proper options in my kernel config set to use it? Yes. You just need CONFIG_VIRTIO_NET and CONFIG_VIRTIO_PCI. The remaining options will be automatically selected. We should make

Re: [kvm-devel] initiating linux guest shutdown from host

2008-04-23 Thread Avi Kivity
[EMAIL PROTECTED] wrote: On Wed, 23 Apr 2008, Luca Tettamanti wrote: libvirt sends system_powerdown to the monitor; is ACPI is enabled then the guest sees the event but it's free to ignore it (it's the same as pressing the power button on a real machine: the OS sees the event and may

Re: [kvm-devel] Stupid Newbee Questions...

2008-04-23 Thread Avi Kivity
Avi Kivity wrote: Stuart Sheldon wrote: 2) When I started writing the management scripts to start and stop the guests from the command line, I was using KVM-63 which allowed me to send a system_powerdown to the console, this would send a PWR to the guest's acpid that would bring the guest

Re: [kvm-devel] initiating linux guest shutdown from host

2008-04-23 Thread Avi Kivity
[EMAIL PROTECTED] wrote: Hi Avi, thanks for info. Can You tell me which commit has caused the problem so I can revert it in my testing sources? I don't see any reverts in git (yet). 6bb0805aeabd5c6ef5408f57c7da5ca6385dd0f5. -- Do not meddle in the internals of kernels, for they are

Re: [kvm-devel] [RFC PATCH] virtio: change config to guest endian.

2008-04-23 Thread Avi Kivity
Christian Borntraeger wrote: Am Dienstag, 22. April 2008 schrieb Rusty Russell: [...] diff -r a098f19a6da5 include/linux/virtio_config.h --- a/include/linux/virtio_config.h Sun Apr 20 14:41:02 2008 +1000 +++ b/include/linux/virtio_config.h Sun Apr 20 15:07:45 2008 +1000 @@ -16,7 +16,7

[kvm-devel] [ANNOUNCE] Preliminary KVM Forum 2008 Agenda

2008-04-23 Thread Avi Kivity
The preliminary KVM Forum 2008 agenda is now online at http://kforum.qumranet.com/KVMForum/agenda.php If you haven't done so already, please register! There is a big Register Now button on the page. Early bird registration ends May 1. Note we have a few more sessions in the pipeline; the

Re: [kvm-devel] [PATCH 1/2] kvm: Batch writes to MMIO

2008-04-23 Thread Avi Kivity
Laurent Vivier wrote: This patch is the kernel part of the batch writes to MMIO patch. When kernel has to send MMIO writes to userspace, it stores them in memory until it has to pass the hand to userspace for another reason. This avoids to have too many context switches on operations that

Re: [kvm-devel] [PATCH 0/2] Batch writes to MMIO

2008-04-23 Thread Avi Kivity
Laurent Vivier wrote: Le mercredi 23 avril 2008 à 17:05 +0300, Avi Kivity a écrit : Laurent Vivier wrote: These two patches allow to batch writes to MMIO. When kernel has to send MMIO writes to userspace, it stores them in memory until it has to pass the hand to userspace

Re: [kvm-devel] [PATCH 1/2] kvm: Batch writes to MMIO

2008-04-23 Thread Avi Kivity
Laurent Vivier wrote: This breaks ordering on smp guests. batch_data needs to be a kvm thing, not a vcpu thing, and locked, of course. - is ordering between vcpu important when we already delay operations ? Yes. Ordering is very different from delaying. Also, we will

Re: [kvm-devel] [PATCH 0/2] Batch writes to MMIO

2008-04-23 Thread Avi Kivity
Anthony Liguori wrote: The ne2k is pretty mmio heavy. You should be able to observe a boost with something like iperf (guest=host) I would think if this is a real savings. If we're just improving ne2k, the complexity isn't worth it. We have two better nics which are widely supported in

Re: [kvm-devel] performance with guests running 2.4 kernels (specifically RHEL3)

2008-04-23 Thread Avi Kivity
David S. Ahern wrote: I've continued drilling down with the tracers to answer that question. I have done runs with tracers in paging64_page_fault and it showed the overhead is with the fetch() function. On my last run the tracers are in paging64_fetch() as follows: 1. after

Re: [kvm-devel] [PATCH 0/2] Batch writes to MMIO

2008-04-23 Thread Avi Kivity
Laurent Vivier wrote: Le mercredi 23 avril 2008 à 10:10 -0500, Anthony Liguori a écrit : [...] The ne2k is pretty mmio heavy. You should be able to observe a boost with something like iperf (guest=host) I would think if this is a real savings. I like your advices :-D I use

<    1   2   3   4   5   6   7   8   9   10   >