[PATCH] KVM: Document basic API

2009-06-09 Thread Avi Kivity
Document the basic API corresponding to the 2.6.22 release. Please review! Signed-off-by: Avi Kivity --- Documentation/kvm/api.txt | 683 + 1 files changed, 683 insertions(+), 0 deletions(-) create mode 100644 Documentation/kvm/api.txt diff --git

Re: [patch 1/4] KVM: MMU audit: update count_writable_mappings / count_rmaps

2009-06-09 Thread Avi Kivity
Marcelo Tosatti wrote: Semi-related: we should set up a new exit code to halt the VM so it can be inspected, otherwise all those printks and dump_stack()s will quickly overwhelm the logging facilities. Can you clarify on the halt exit code? set a bit that tells KVM_RUN to quit (lik

Re: KVM & VServer coexistence

2009-06-09 Thread Avi Kivity
Ajay EP wrote: Hi , I would like to know if both container based (Vserver ) and para virtualization (KVM) co-exist at the same time on the host machine ( INTEL VT) ? As far as I know, yes. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list:

Re: BUG at mmu.c:615 from localhost migration using ept+hugetlbfs

2009-06-09 Thread Avi Kivity
Marcelo Tosatti wrote: Ryan, On Fri, May 29, 2009 at 11:43:26AM -0500, Ryan Harper wrote: Testing latest qemu-kvm.git and kvm-kmod.git, ept enabled and backing guests with large pages trips a BUG in the mmu code. If I disable ept, but still use large pages, migration succeeds. Reproduce wi

Re: BUG at mmu.c:615 from localhost migration using ept+hugetlbfs

2009-06-10 Thread Avi Kivity
Avi Kivity wrote: Not really. One thing, migration should transition the shadow pagetables from large pages to small ones, maybe that bit is broken. Maybe we're looking at a largepage spte and interpreting it as a normal L2 spte, and interpreting a guest page as the L1 spt. I tri

Re: [PATCH RFC] qemu: fix hot remove assigned device

2009-06-10 Thread Avi Kivity
Han, Weidong wrote: -int pci_unregister_device(PCIDevice *pci_dev) +int pci_unregister_device(PCIDevice *pci_dev, int assigned) { int ret = 0; @@ -377,7 +377,11 @@ int pci_unregister_device(PCIDevice *pci_dev) qemu_free_irqs(pci_dev->irq); pci_irq_index--; pci_dev->bus->

Re: [PATCH RFC] qemu: fix hot remove assigned device

2009-06-10 Thread Avi Kivity
Han, Weidong wrote: I tried to find an easy and clean way to check it, but I found the members of struct PCIDevice and DeviceState were not suitable for this checking, and qdev is not pointer in struct PCIDevice. Yes, of course. I applied the patch, thanks. -- error compiling committee.c

Re: [PATCH] KVM: MCE: Fix compiling without CONFIG_X86_MCE

2009-06-10 Thread Avi Kivity
Huang Ying wrote: Enclose do_machine_check with #ifdef CONFIG_X86_MCE. Reported-by: Marcelo Tosatti Signed-off-by: Huang Ying Applied, thanks. I would have preferred to select X86_MCE instead, but that doesn't do anything (need to select X86_MCE_INTEL as well, and that becomes fragile)

Re: [patch 2/5] KVM: MMU: make for_each_shadow_entry aware of largepages

2009-06-10 Thread Avi Kivity
Marcelo Tosatti wrote: This way there is no need to add explicit checks in every for_each_shadow_entry user. Signed-off-by: Marcelo Tosatti Index: kvm/arch/x86/kvm/mmu.c === --- kvm.orig/arch/x86/kvm/mmu.c +++ kvm/arch/x86/kvm/mmu

Re: [patch 3/5] KVM: MMU: add kvm_mmu_shadow_walk helper

2009-06-10 Thread Avi Kivity
Marcelo Tosatti wrote: Required by EPT misconfiguration handler. Signed-off-by: Marcelo Tosatti Index: kvm/arch/x86/kvm/mmu.c === --- kvm.orig/arch/x86/kvm/mmu.c +++ kvm/arch/x86/kvm/mmu.c @@ -3013,6 +3013,26 @@ out: retur

Re: [patch 5/5] KVM: VMX: conditionally disable 2M pages

2009-06-10 Thread Avi Kivity
Marcelo Tosatti wrote: Disable usage of 2M pages if VMX_EPT_2MB_PAGE_BIT (bit 16) is clear in MSR_IA32_VMX_EPT_VPID_CAP and EPT is enabled. Index: kvm/virt/kvm/kvm_main.c === --- kvm.orig/virt/kvm/kvm_main.c +++ kvm/virt/kvm/kvm_mai

Re: [patch 2/5] KVM: MMU: make for_each_shadow_entry aware of largepages

2009-06-10 Thread Avi Kivity
Avi Kivity wrote: Marcelo Tosatti wrote: This way there is no need to add explicit checks in every for_each_shadow_entry user. Signed-off-by: Marcelo Tosatti Index: kvm/arch/x86/kvm/mmu.c === --- kvm.orig/arch/x86/kvm/mmu.c

[ANNOUNCE] kvm-kmod-2.6.30

2009-06-10 Thread Avi Kivity
This is a package containing the kvm external module, based on the 2.6.30 series. kvm-kmod-2.6.30 contains the kvm code that is present in Linux 2.6.30, except that it can run on older kernels. It is a good companion to the qemu-kvm-0.10 series. Note that performance and features will vary with

[PATCH 0/3] pte accessor fixes

2009-06-10 Thread Avi Kivity
A minor fix to the pte accessors, followed by a cosmetic fix so we don't hit the same problem next time, followed by a cosmetic patch just because I had my search-and-replace warmed up. Please review. Avi Kivity (3): KVM: MMU: Fix is_dirty_pte() KVM: MMU: Adjust pte accessors to expli

[PATCH 1/3] KVM: MMU: Fix is_dirty_pte()

2009-06-10 Thread Avi Kivity
is_dirty_pte() is used on guest ptes, not shadow ptes, so it needs to avoid shadow_dirty_mask and use PT_DIRTY_MASK instead. Misdetecting dirty pages could lead to unnecessarily setting the dirty bit under EPT. Signed-off-by: Avi Kivity --- arch/x86/kvm/mmu.c |2 +- 1 files changed, 1

[PATCH 2/3] KVM: MMU: Adjust pte accessors to explicitly indicate guest or shadow pte

2009-06-10 Thread Avi Kivity
Since the guest and host ptes can have wildly different format, adjust the pte accessor names to indicate on which type of pte they operate on. No functional changes. Signed-off-by: Avi Kivity --- arch/x86/kvm/mmu.c | 16 arch/x86/kvm/mmu.h |2 +- arch

[PATCH 3/3] KVM: MMU: s/shadow_pte/spte/

2009-06-10 Thread Avi Kivity
We use shadow_pte and spte inconsistently, switch to the shorter spelling. Rename set_shadow_pte() to __set_spte() to avoid a conflict with the existing set_spte(), and to indicate its lowlevelness. Signed-off-by: Avi Kivity --- arch/x86/kvm/mmu.c | 102

Re: [PATCH 1/2] kvm: fix dirty bit tracking for slots with large pages

2009-06-10 Thread Avi Kivity
Izik Eidus wrote: When slot is already allocted and being asked to be tracked we need to break the large pages. This code flush the mmu when someone ask a slot to start dirty bit tracking. Signed-off-by: Izik Eidus --- virt/kvm/kvm_main.c |2 ++ 1 files changed, 2 insertions(+), 0 deletio

Re: [patch 3/5] KVM: MMU: add kvm_mmu_shadow_walk helper

2009-06-10 Thread Avi Kivity
Marcelo Tosatti wrote: Isn't it simpler to invoke for_each_shadow_entry(), instead of defining a callback and calling it? We had those callbacks once, then switched to for_each. The point is its exported to use in a external module (kvm-intel.ko), so you hide the details (such as lockin

Re: [PATCH 1/2] Clean up MADT Table Creation (v2)

2009-06-10 Thread Avi Kivity
Beth Kon wrote: This patch is based on the recent patch from Vincent Minet. I split Vincent's changes into 2 patches (to separate MADT and RSDT table cleanup, as suggested by Marcelo) and added a bit to them. There has been much ado over the acpi_bios_init function recently. I had actually done

Re: [PATCH 0/3] pte accessor fixes

2009-06-10 Thread Avi Kivity
Marcelo Tosatti wrote: On Wed, Jun 10, 2009 at 02:28:19PM +0300, Avi Kivity wrote: A minor fix to the pte accessors, followed by a cosmetic fix so we don't hit the same problem next time, followed by a cosmetic patch just because I had my search-and-replace warmed up. Please r

Re: TODO list for qemu+KVM networking performance v2

2009-06-10 Thread Avi Kivity
Michael S. Tsirkin wrote: But I don't understand how aio will make implementing it easier - or are you merely saying that it will make it worthwhile? If you have aio, the the NIC and the guest proceed in parallel. If the guest is faster (likely), then when it sends the next packet it will

Re: [patch 3/5] KVM: MMU: add kvm_mmu_shadow_walk helper

2009-06-10 Thread Avi Kivity
Marcelo Tosatti wrote: Ah, you're right. I don't think it's worthwhile to add all this just for debugging. You can add a function that dumps the spte chain as well as the features MSR, and we can decode it by hand when we see it. Disadvantage is more work for us when we hit the bug,

Re: [PATCHv2 0/4] decouple vcpu index from apic id

2009-06-10 Thread Avi Kivity
Gleb Natapov wrote: Currently vcpu_id is used as an index into vcpus array and as apic id on x86. This is incorrect since apic ids not have to be continuous (they can also encode cpu hierarchy information) and may have values bigger then vcpu array in case of x2apic. This series removes use of v

Re: TODO list for qemu+KVM networking performance v2

2009-06-10 Thread Avi Kivity
Michael S. Tsirkin wrote: On Wed, Jun 10, 2009 at 06:18:01PM +0300, Avi Kivity wrote: Michael S. Tsirkin wrote: But I don't understand how aio will make implementing it easier - or are you merely saying that it will make it worthwhile? If you have aio, the the NIC an

Re: [patch 3/5] KVM: MMU: add kvm_mmu_shadow_walk helper

2009-06-10 Thread Avi Kivity
On 06/10/2009 06:24 PM, Avi Kivity wrote: I just don't want to introduce yet another function-callback pair for such a small thing. No objection to the code itself. Printing out the spte hierarchy seems a good idea in other bug contexts, so at least that function is reusable. H

[GIT PULL] KVM updates for 2.6.31

2009-06-11 Thread Avi Kivity
Kleen (1): KVM: Add VT-x machine check support Andre Przywara (1): KVM: SVM: Fix cross vendor migration issue in segment segment descriptor Avi Kivity (18): KVM: VMX: Don't use highmem pages for the msr and pio bitmaps KVM: VMX: Don't intercept MSR_KERNEL_GS_BASE

Re: Network throughput limits for local VM <-> VM communication

2009-06-11 Thread Avi Kivity
Fischer, Anna wrote: I am using two bridges, and yes, in theory, the router should be the only connection between the two guests. However, without VLANs, the tun interface will pass packets to all tap interfaces. It has to, as it doesn't know to which one the packet has to go to. It does not l

Re: KVM won't compile on 2.6.29

2009-06-11 Thread Avi Kivity
Bike & Snow wrote: Hello I've compiled and installed KVM on kernel 2.6.28-11. It worked perfectly. I'm using Ubuntu 9.04. I'm now trying to compile on kernel 2.6.29-4. It fails on compiling the kernel module with this error message: /usr/src/kvm-kmod-devel-86/x86/iommu.c: In function âkvm_iom

Re: Network throughput limits for local VM <-> VM communication

2009-06-11 Thread Avi Kivity
Fischer, Anna wrote: Not sure I understand. As far as I can see the packets are replicated on the tun/tap interface before they actually enter the bridge. So this is not about the bridge learning MAC addresses and flooding frames to unknown destinations. So I think this is different. Okay

Re: [PATCH 0/2] get rid of libkvm-common.h

2009-06-11 Thread Avi Kivity
Glauber Costa wrote: There is no place in the world for this sad header. This is part of the patch series I sent the other day (about KVMState), but it is an independent cleanup. Since that was not merged, I'm sending this part separetedly. Applied, thanks. -- error compiling committee.c:

Re: [PATCH 0/4] qemu-kvm cleanup

2009-06-11 Thread Avi Kivity
Glauber Costa wrote: This series do some more cleanups in qemu-kvm.c I decided it is better to clean it up in place a little bit before merging it to kvm-all.c it is dependant on my previous patch: "move libkvm-all.c code to qemu-kvm.c" I don't see that patch. Where is it? -- error compil

Re: [PATCH 2/4] cleanup mmio coalescing functions

2009-06-11 Thread Avi Kivity
Glauber Costa wrote: remove wrappers that existed only due to qemu/libkvm separation. Use qemu types for function definitions. -int kvm_register_coalesced_mmio(kvm_context_t kvm, uint64_t addr, uint32_t size) +int kvm_coalesce_mmio_region(target_phys_addr_t addr, ram_addr_t size) { #ifdef K

Re: [PATCH 0/4] qemu-kvm cleanup

2009-06-11 Thread Avi Kivity
Avi Kivity wrote: Glauber Costa wrote: This series do some more cleanups in qemu-kvm.c I decided it is better to clean it up in place a little bit before merging it to kvm-all.c it is dependant on my previous patch: "move libkvm-all.c code to qemu-kvm.c" I don't see that p

Re: [PATCH 2/2] kvm: change the dirty page tracking to work with dirty bity

2009-06-11 Thread Avi Kivity
Izik Eidus wrote: change the dirty page tracking to work with dirty bity instead of page fault. right now the dirty page tracking work with the help of page faults, when we want to track a page for being dirty, we write protect it and we mark it dirty when we have write page fault, this code move

Re: [PATCH 2/2] kvm: change the dirty page tracking to work with dirty bity

2009-06-11 Thread Avi Kivity
Izik Eidus wrote: Avi Kivity wrote: Izik Eidus wrote: change the dirty page tracking to work with dirty bity instead of page fault. right now the dirty page tracking work with the help of page faults, when we want to track a page for being dirty, we write protect it and we mark it dirty when

Re: [GIT PULL] Merge latest qemu.git

2009-06-11 Thread Avi Kivity
Mark McLoughlin wrote: Hi Avi, The conflicts with the networking changes just pushed to qemu.git are fairly involved to resolve, so I thought I'd try and save you the pain. Below is a pull request which merges in the latest, and does it in the way we recently discussed - each con

Re: [patch 2/5] KVM: MMU: make for_each_shadow_entry aware of largepages

2009-06-11 Thread Avi Kivity
Marcelo Tosatti wrote: @@ -1273,6 +1273,11 @@ static bool shadow_walk_okay(struct kvm_ { if (iterator->level < PT_PAGE_TABLE_LEVEL) return false; + +if (iterator->level == PT_PAGE_TABLE_LEVEL) +if (is_large_pte(*iterator->sptep)) +return false;

Re: [patch 0/6] mmu audit update v4

2009-06-11 Thread Avi Kivity
Marcelo Tosatti wrote: Addressing comments, introducing a new helper, handling largepages. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.or

Re: [PATCH] move libkvm-all.c code to qemu-kvm.c

2009-06-11 Thread Avi Kivity
Glauber Costa wrote: Ultimately, goal is to put it in kvm-all.c, so we can start sharing things. This is put here first to allow for preparation. It is almost a cut and paste. Only needed adaptation goes with kvm_has_sync_mmu(), which had a conflicting definition. Applied, thanks. -- error

Re: [patch 3/5] KVM: MMU: add kvm_mmu_get_spte_hierarchy helper

2009-06-11 Thread Avi Kivity
Marcelo Tosatti wrote: Required by EPT misconfiguration handler. Signed-off-by: Marcelo Tosatti Index: kvm/arch/x86/kvm/mmu.c === --- kvm.orig/arch/x86/kvm/mmu.c +++ kvm/arch/x86/kvm/mmu.c @@ -3013,6 +3013,24 @@ out: retur

Re: [PATCH 0/4] qemu-kvm cleanup

2009-06-11 Thread Avi Kivity
Glauber Costa wrote: Same series as before, but with avi's little comment addressed. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More

Re: [PATCH 3/4] remove callbacks structure

2009-06-11 Thread Avi Kivity
Glauber Costa wrote: The purpose of that was only to allow the user of libkvm to register functions pointers that corresponded to possible actions. We don't need that anymore. This crashes badly without flexpriority. I've dropped the entire series in case the bug was introduced earlier but

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-14 Thread Avi Kivity
Anthony Liguori wrote: What's the problem with parsing the device config and modifying it? Is it just complexity? Two-way modification. Management wants to store the configuration in their database and tell the hypervisor what the machine looks like. If qemu also tells management what th

Re: [PATCH] move performance counter MSR access interception to generic x86 KVM path

2009-06-14 Thread Avi Kivity
Andre Przywara wrote: The performance counter MSRs are different for AMD and Intel CPUs and they are chosen mainly by the CPUID vendor string. This patch catches writes to all addresses (regardless of VMX/SVM path) and handles them in the generic MSR handler routine. Writing a 0 into the event se

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-14 Thread Avi Kivity
Mark McLoughlin wrote: I think the point is that you don't need version numbers if you have a proper device tree. How do you add a new attribute to the device tree and, when a supplied device tree lacking said attribute, distinguish between a device tree from an old version of qemu (i.

[PATCH 2/3] Rearrange io_mem_init()

2009-06-14 Thread Avi Kivity
Move io_mem_init() downwards to avoid a forward declaration. No code change. Signed-off-by: Avi Kivity --- exec.c | 47 +-- 1 files changed, 21 insertions(+), 26 deletions(-) diff --git a/exec.c b/exec.c index fb99486..a6852a4 100644 --- a/exec.c

[PATCH 0/3][RESEND] I/O memory registration simplification

2009-06-14 Thread Avi Kivity
for othe things. The diffstat looks frightening, but the changes are quite simple. Changes from original submission - sent as a single offering instead of two patchsets - rebased to latest upstream Avi Kivity (3): Remove io_index argument from cpu_register_io_memory() Rearrange io_mem_init

[PATCH 3/3] Rename pci_register_io_region() to pci_register_bar()

2009-06-14 Thread Avi Kivity
This function is used to manage a PCI BAR, so make the more generic pci_register_io_region() available to other uses. Signed-off-by: Avi Kivity --- hw/ac97.c |4 ++-- hw/cirrus_vga.c |4 ++-- hw/e1000.c|4 ++-- hw/eepro100.c |6 +++--- hw/es1370.c

Re: [PATCH 1/5] Userspace changes for configuring irq0->inti2 override (v6)

2009-06-14 Thread Avi Kivity
Beth Kon wrote: These patches resolve the irq0->inti2 override issue, and get the hpet working on kvm. Override and HPET changes are sent as a series because HPET depends on the override. Win2k8 expects the HPET interrupt on inti2, regardless of whether an override exists in the BIOS. And the HP

Re: [PATCH 5/5] HPET interaction with in-kernel PIT (v6)

2009-06-14 Thread Avi Kivity
Beth Kon wrote: Signed-off-by: Beth Kon Please write a few words on what this patch does and why. --- arch/x86/include/asm/kvm.h |1 + arch/x86/kvm/i8254.c | 24 +++- arch/x86/kvm/i8254.h |3 ++- arch/x86/kvm/x86.c |5 - 4 files

Re: [PATCH 4/5] Userspace changes for KVM HPET (v6)

2009-06-14 Thread Avi Kivity
Beth Kon wrote: The big change here is handling of enabling/disabling of hpet legacy mode. When hpet enters legacy mode, the spec says that the pit stops generating interrupts. In practice, we want to stop the pit periodic timer from running because it is wasteful in a virtual environment. W

Re: [PATCH 4/5] Userspace changes for KVM HPET (v6)

2009-06-14 Thread Avi Kivity
Avi Kivity wrote: Beth Kon wrote: The big change here is handling of enabling/disabling of hpet legacy mode. When hpet enters legacy mode, the spec says that the pit stops generating interrupts. In practice, we want to stop the pit periodic timer from running because it is wasteful in a

Re: [libvirt] qemu-kvm-0.10.5, kvm-kmod-2.6.30, libvirt-0.6.4 - save/restore still unreliable

2009-06-14 Thread Avi Kivity
Nikola Ciprich wrote: Hmm, I just noticed that dump file saved using virsh contains some libvirt related headers, so I guess I can't just feed it directly to qemu-kvm. So I guess best way to test save/restore without libvirt is to save vm state using monitor and then restore it again. But I ca

Re: Wiki updates

2009-06-14 Thread Avi Kivity
Brian Jackson wrote: I've made some changes to the wiki to hopefully improve it's usefulness. Especially to new kvm users. I table-ized the management tools page info I added some links to the main page for commonly used pages (inside and outside the wiki) Some of those links duplicate some o

Re: slow guest performance with build load, looking for ideas

2009-06-14 Thread Avi Kivity
Erik Jacobson wrote: We have been trying to test qemu-kvm virtual machines under an IO load. The IO load is quite simple: A timed build of the linux kernel and modules. I have found that virtual machines take more than twice as long to do this build as the host. It doesn't seem to matter if I us

Re: [PATCH 5/5] HPET interaction with in-kernel PIT (v6)

2009-06-14 Thread Avi Kivity
Jan Kiszka wrote: Unfortunate. But on the one hand, nothing technically prevents defining the IOCTL base on existing kvm_pit_state, but passing down extended kvm_pit_state2 if that negotiation took place. On the other hand, we are not yet running out of IOCTL numbers... Right, and we are not

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-14 Thread Avi Kivity
Michael S. Tsirkin wrote: If we want to remove a device from under a running guest, you need hotplug. So we can't just remove several lines from the config and hope that it'll work simply because the PCI address is stable. Why not? OTOH, if you reboot the guest, it's ok for addresses to c

Re: [PATCH 5/5] HPET interaction with in-kernel PIT (v6)

2009-06-14 Thread Avi Kivity
Jan Kiszka wrote: struct kvm_pit_state { struct kvm_pit_channel_state channels[3]; +u8 hpet_legacy_mode; }; This changes the ABI, breaking older binaries running on newer kernels, or newer binaries running on older kernels. As we have KVM_CREATE_PIT2 now, which incl

Re: extboot and qemu-kvm-0.10.x

2009-06-14 Thread Avi Kivity
Brian Jackson wrote: Is it expected that qemu-kvm-0.10.x doesn't build/install extboot.bin? It's unexpected, but true. This came up on the IRC channel last night. I would expect it to, but the person in the IRC channel didn't get extboot.bin from the tarball and none of the tags of 0.10.x I

Re: [patch 0/5] VMX EPT misconfiguration handler v3

2009-06-14 Thread Avi Kivity
Marcelo Tosatti wrote: Addressing comments. Applied all, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kern

Re: [PATCH] Replace pending exception by PF if it happens serially.

2009-06-14 Thread Avi Kivity
Gleb Natapov wrote: Replace previous exception with a new one in a hope that instruction re-execution will regenerate lost exception. Applied, thanks. + switch(vcpu->arch.exception.nr) { + case DF_VECTOR: /* triple fault -> shutdown */

Re: [PATCHv2] [APIC] Optimize searching for highest IRR

2009-06-14 Thread Avi Kivity
Gleb Natapov wrote: Most of the time IRR is empty, so instead of scanning the whole IRR on each VM entry keep a variable that tells us if IRR is not empty. IRR will have to be scanned twice on each IRQ delivery, but this is much more rare than VM entry. Applied, thanks. -- error compiling

Re: [PATCH 1/2] kvm: fix dirty bit tracking for slots with large pages

2009-06-14 Thread Avi Kivity
Izik Eidus wrote: When slot is already allocted and being asked to be tracked we need to break the large pages. This code flush the mmu when someone ask a slot to start dirty bit tracking. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe f

Re: qemu-kvm broken after ./configure --disable-kvm

2009-06-14 Thread Avi Kivity
Jan Kiszka wrote: Beth Kon wrote: Building latest git with ./configure --disable-kvm breaks with errors in pcspk.c With latest git, things break much earlier in case your host does not provide linux/kvm.h because libkvm-all.h includes it unconditionally. But qemu-kvm carries linu

Re: [PATCH v2 1/2] kvm: x86: Fix racy event propagation in kmv timer

2009-06-14 Thread Avi Kivity
Marcelo Tosatti wrote: On Tue, Jun 09, 2009 at 03:37:01PM +0200, Jan Kiszka wrote: v2 as requested in private discussion: Broken into two pieces, and the second one will not change the original semantic. --> Minor issue that likely had no practical relevance: The kvm timer funct

Re: qemu-kvm broken after ./configure --disable-kvm

2009-06-14 Thread Avi Kivity
Jan Kiszka wrote: Building latest git with ./configure --disable-kvm breaks with errors in pcspk.c With latest git, things break much earlier in case your host does not provide linux/kvm.h because libkvm-all.h includes it unconditionally. But qemu-kvm carries linux/kvm.

Re: ESX on KVM requirements

2009-06-14 Thread Avi Kivity
Ben Sanders wrote: I'm looking to reproduce the results of Alexander Graf earlier this year when he said that he was able to get ESX to run a ReactOS guest all on top of KVM. More information on that can be found here: http://kerneltrap.org/mailarchive/linux-kvm/2009/1/5/4600354/thread So far,

Re: [PATCH 3/3] kvm-s390: streamline memslot handling - rebased

2009-06-14 Thread Avi Kivity
Marcelo Tosatti wrote: (continued below) Anyway, yeah, the set request / wait mechanism you implement here is quite similar to the idea mentioned earlier that could be used for x86. Just get rid of this explicit KVM_REQ_MMU_RELOAD knowledge in arch-independent code please (if you want t

Re: [KVM PATCH v2 0/2] irqfd: use POLLHUP notification for close()

2009-06-14 Thread Avi Kivity
Gregory Haskins wrote: Michael S. Tsirkin wrote: [ Resending with correct address for Davide. Pls don't reply to the original one, you'll get bounces. ] On Thu, Jun 04, 2009 at 08:48:02AM -0400, Gregory Haskins wrote: (Applies to kvm.git/master:25deed73) Please see the header for

Re: qemu-kvm broken after ./configure --disable-kvm

2009-06-14 Thread Avi Kivity
Jan Kiszka wrote: 2. Upstream does not, and it's unclear if it ever will (if we push recent headers into kvm-kmod, I think there is no urgent need anymore). At least for code to-be-pushed upstream, we must not rely in this anyway. Yes. Adding the headers to kvm-kmod.h is the rig

Re: qemu-kvm broken after ./configure --disable-kvm

2009-06-14 Thread Avi Kivity
Jan Kiszka wrote: That could (and probably should - independent of in-tree headers) be caught by making all KVM_CAPs mandatory, ie. check for the latest and greatest ones during configure and drop all the #ifdefs from the code. Not with out-of-tree headers. qemu-kvm-0.10.x ought

Re: [KVM PATCH v10] kvm: add support for irqfd

2009-06-14 Thread Avi Kivity
Michael S. Tsirkin wrote: I think Avi asked for this specific feature during review which is the reason why its there today. However, I agree that it would probably be a good idea to put an upper limit on the number of supported aliases that can be registered. Will fix. Thanks Michael, -G

Re: [KVM PATCH v10] kvm: add support for irqfd

2009-06-14 Thread Avi Kivity
Michael S. Tsirkin wrote: I don't want to assume that the eventfds all come from the same source. That said, we have a workaround, allocate a new gsi with the same routes and attach the excess eventfds there. Right. So you are ok with 1:1 irqfd:gsi requirement for now? This seems ni

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 12:08 PM, Mark McLoughlin wrote: This last option makes sense to me: in a real world the user has control over where he places the device on the bus, so why not with qemu? Yep, most people seem to agree that it makes sense to allow this, but some believe it should only be vi

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/14/2009 12:47 PM, Michael S. Tsirkin wrote: Michael S. Tsirkin wrote: If we want to remove a device from under a running guest, you need hotplug. So we can't just remove several lines from the config and hope that it'll work simply because the PCI address is stable. Why not?

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/14/2009 12:50 PM, Michael S. Tsirkin wrote: On Fri, Jun 12, 2009 at 05:48:23PM +0100, Mark McLoughlin wrote: However, in order to retain compat for that SCSI device (e.g. ensuring the PCI address doesn't change as other devices are added an removed), we're back to the same problem ...

Re: [PATCH 1/6] env->kvm_cpu_state.init is always zero here.

2009-06-15 Thread Avi Kivity
On 06/14/2009 01:52 PM, Gleb Natapov wrote: Signed-off-by: Gleb Natapov --- qemu-kvm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 2aeb17c..ec911ef 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -412,7 +412,7 @@ static int kvm_main_loop_

Re: [PATCH 4/6] Handle vcpu init/sipi by calling a function on vcpu

2009-06-15 Thread Avi Kivity
On 06/14/2009 01:52 PM, Gleb Natapov wrote: Instead of having special case in vcpu event loop. I'm a little worried about two vcpus INITing each other simultaneously and deadlocking. INIT/SIPI are async events, the initiator should not wait for them. -- error compiling committee.c: to

Re: [PATCH 1/6] env->kvm_cpu_state.init is always zero here.

2009-06-15 Thread Avi Kivity
On 06/15/2009 12:58 PM, Gleb Natapov wrote: On Mon, Jun 15, 2009 at 12:55:27PM +0300, Avi Kivity wrote: On 06/14/2009 01:52 PM, Gleb Natapov wrote: Signed-off-by: Gleb Natapov --- qemu-kvm.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-kvm.c b

Re: [PATCH 4/6] Handle vcpu init/sipi by calling a function on vcpu

2009-06-15 Thread Avi Kivity
On 06/15/2009 01:11 PM, Gleb Natapov wrote: On Mon, Jun 15, 2009 at 01:03:39PM +0300, Avi Kivity wrote: On 06/14/2009 01:52 PM, Gleb Natapov wrote: Instead of having special case in vcpu event loop. I'm a little worried about two vcpus INITing each other simultaneousl

Re: [PATCH 4/6] Handle vcpu init/sipi by calling a function on vcpu

2009-06-15 Thread Avi Kivity
On 06/15/2009 01:16 PM, Gleb Natapov wrote: A generic on_vcpu_async() would need to allocate, that might be expoitable. Then what about processing events while waiting in on_vcpu()? Could work, but prefer a simpler solution. -- error compiling committee.c: too many arguments to fu

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 01:32 PM, Michael S. Tsirkin wrote: You do need to export available slot numbers from qemu. Why would a slot be unavailable? A slot needs to be configured in ACPI, and not be taken by onboard chips (piix takes slot 0, for example). -- error compiling committee.c: to

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 12:09 PM, Mark McLoughlin wrote: I think the point is that you don't need version numbers if you have a proper device tree. How do you add a new attribute to the device tree and, when a supplied device tree lacking said attribute, distinguish between a device tree from a

Re: Configuration vs. compat hints

2009-06-15 Thread Avi Kivity
(adding cc) On 06/15/2009 02:35 PM, Markus Armbruster wrote: Not really. QEMU gives just the host bridge a fixed slot[*]. All the other slots are available. qemu needs to export these two bits of information: the first free slot and the number of slots. More generally, which slots are

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 02:48 PM, Michael S. Tsirkin wrote: A slot needs to be configured in ACPI, Can we configure all possible 32 slots? That's what we do. But one is always taken. In the future, perhaps more. and not be taken by onboard chips (piix takes slot 0, for example). p

Re: [PATCH] KVM: x86: Ignore reads to K7 EVNTSEL MSRs

2009-06-15 Thread Avi Kivity
On 06/15/2009 10:55 AM, Amit Shah wrote: In commit 7fe29e0faacb650d31b9e9f538203a157bec821d we ignored the reads to the P6 EVNTSEL MSRs. That fixed crashes on Intel machines. Ignore the reads to K7 EVNTSEL MSRs as well to fix this on AMD hosts. This fixes Kaspersky antivirus crashing Windows gu

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 03:41 PM, Michael S. Tsirkin wrote: We should just tell the user which slots are open. This might be tricky if the config is passed in with the command line flags. qemu -show-available-pci-slots (the qemu equivalent to KVM_CHECK_EXTENSION) -- error compiling committee.

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 03:41 PM, Anthony Liguori wrote: Yep, most people seem to agree that it makes sense to allow this, but some believe it should only be via a machine description file, not the command line. I don't understand this opposition. It's clear a machine config file is a long way in our f

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 03:45 PM, Anthony Liguori wrote: This last option makes sense to me: in a real world the user has control over where he places the device on the bus, so why not with qemu? Yes, the user build the machine using the command line and monitor (or, in 2017, the machine configuration f

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 03:52 PM, Anthony Liguori wrote: Avi Kivity wrote: On 06/15/2009 03:41 PM, Michael S. Tsirkin wrote: We should just tell the user which slots are open. This might be tricky if the config is passed in with the command line flags. qemu -show-available-pci-slots Why does the

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 03:48 PM, Anthony Liguori wrote: device tree lacking said attribute, distinguish between a device tree from an old version of qemu (i.e. use the old default) and a partial device tree from the VM manager (i.e. use the new default) ? -baseline 0.10 That's a version number :-) (I

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 04:20 PM, Anthony Liguori wrote: then turns on the power. Command line options are the parts lying around when we start. btw, -drive needs to be separated: -controller type=lsi1234,pci_addr=foobar,name=blah -drive file=foo.img,controller=blah,index=0 -drive file=bar.img,

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 04:23 PM, Anthony Liguori wrote: Avi Kivity wrote: On 06/15/2009 03:52 PM, Anthony Liguori wrote: Avi Kivity wrote: On 06/15/2009 03:41 PM, Michael S. Tsirkin wrote: We should just tell the user which slots are open. This might be tricky if the config is passed in with the

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 04:24 PM, Anthony Liguori wrote: Avi Kivity wrote: Certainly preferable to -baseline. This is pretty easy to maintain with config files. Let's not tie the two together. I mentioned it because it suggests a good transition. We at least have to think through how thing

Re: [PATCH 0/8] Small cpu loop cleanups

2009-06-15 Thread Avi Kivity
On 06/15/2009 04:23 PM, Gleb Natapov wrote: Also fix "info cpus" to show correct halt status with in kernel irq chip. Applied all, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a mess

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 04:45 PM, Anthony Liguori wrote: Avi Kivity wrote: On 06/15/2009 04:20 PM, Anthony Liguori wrote: It's not at all that simple. SCSI has a hierarchical address mechanism with 0-7 targets but then potentially multiple LUNs per target. Today, we always emulate a single LU

Re: slow guest performance with build load, looking for ideas

2009-06-15 Thread Avi Kivity
On 06/15/2009 05:15 PM, Erik Jacobson wrote: What is the host cpu type? On pre-Nehalem/Barcelona processors kvm has poor scalability in mmu intensive workloads like kernel builds. Thanks for getting back to me. Today is pretty booked but I'm going to go find a Nehalem system and try to

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 05:24 PM, Anthony Liguori wrote: Dor Laor wrote: Libvirt does not support r2d. I hope it won't start to support it. It supports mips, sparc, and ppc machines now. I don't see why it wouldn't support r2d. For ppcemb, I expect this same problem to occur. This sort of restricti

Re: Configuration vs. compat hints [was Re: [Qemu-devel] [PATCHv3 03/13] qemu: add routines to manage PCI capabilities]

2009-06-15 Thread Avi Kivity
On 06/15/2009 06:07 PM, Anthony Liguori wrote: Avi Kivity wrote: I'd object to any implicit addressing rules. If we have to say target=2,lun=7,street=8,city=9,state=99,zip=12345 instead of index=8345345235 so be it. The next observation is that while we expand the SCSI addressing

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