[COMMIT master] kvm: Correct kernel headers for PIT2

2009-06-02 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/kvm/include/linux/kvm.h b/kvm/include/linux/kvm.h index 5b4b90c..ca93871 100644 --- a/kvm/include/linux/kvm.h +++ b/kvm/include/linux/kvm.h @@ -463,7 +463,7 @@ struct kvm_trace_rec { #define

[COMMIT master] kvm: bios: Read MADT entries from memory in processors _MAT method.

2009-06-02 Thread Avi Kivity
From: Gleb Natapov g...@redhat.com Also use enable/disable bit from ACPI MADT entries to track CPU hot plug. This removes assumptions about APIC ids from AML code and simplify cpu hotplug handling. Signed-off-by: Gleb Natapov g...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git

[COMMIT master] Provide a kvm-free pic implementation

2009-06-02 Thread Avi Kivity
From: Glauber Costa glom...@redhat.com This patch separates all i8259 specific kvm implementation in separate functions. This way, qemu can have an i8259 device free from any kvm interference. kvm can have a simpler code path (we may even be able to compile out qemu's pic in the future if we want

[COMMIT master] Add dummy eventfd.h for older kernels

2009-06-02 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/include-compat/linux/eventfd.h b/include-compat/linux/eventfd.h new file mode 100644 index 000..c3580fb --- /dev/null +++ b/include-compat/linux/eventfd.h @@ -0,0 +1 @@ +/* Dummy file */ -- To unsubscribe

[COMMIT master] If syncing from git, use 'git describe' as the version.

2009-06-02 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com diff --git a/Makefile b/Makefile index f51b491..95e4c81 100644 --- a/Makefile +++ b/Makefile @@ -37,8 +37,13 @@ include $(MAKEFILE_PRE) .PHONY: sync +KVM_VERSION_GIT = $(if $(and $(filter kvm-devel,$(KVM_VERSION)), \

[COMMIT master] KVM: SVM: Fold kvm_svm.h info svm.c

2009-06-02 Thread Avi Kivity
From: Avi Kivity a...@redhat.com kvm_svm.h is only included from svm.c, so fold it in. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/kvm_svm.h b/arch/x86/kvm/kvm_svm.h deleted file mode 100644 index 39fddc0..000 --- a/arch/x86/kvm/kvm_svm.h +++ /dev/null @@ -1,54 +0,0

[COMMIT master] KVM: Clean up coalesced_mmio destruction

2009-06-02 Thread Avi Kivity
From: Gregory Haskins ghask...@novell.com We invoke kfree() on a data member instead of the structure. This works today because the kvm_io_device is the first element of the private structure, but this could change in the future, so lets clean this up. Signed-off-by: Gregory Haskins

[COMMIT master] KVM: powerpc: fix some init/exit annotations

2009-06-02 Thread Avi Kivity
From: Stephen Rothwell s...@canb.auug.org.au Fixes a couple of warnings like this one: WARNING: arch/powerpc/kvm/kvm-440.o(.text+0x1e8c): Section mismatch in reference from the function kvmppc_44x_exit() to the function .exit.text:kvmppc_booke_exit() The function kvmppc_44x_exit() references a

[COMMIT master] KVM: do not register i8254 PIO regions until we are initialized

2009-06-02 Thread Avi Kivity
From: Gregory Haskins ghask...@novell.com We currently publish the i8254 resources to the pio_bus before the devices are fully initialized. Since we hold the pit_lock, its probably not a real issue. But lets clean this up anyway. Reported-by: Avi Kivity a...@redhat.com Signed-off-by: Gregory

[COMMIT master] KVM: cleanup io_device code

2009-06-02 Thread Avi Kivity
From: Gregory Haskins ghask...@novell.com We modernize the io_device code so that we use container_of() instead of dev-private, and move the vtable to a separate ops structure (theoretically allows better caching for multiple instances of the same ops structure) Signed-off-by: Gregory Haskins

[COMMIT master] KVM: VMX: Avoid duplicate ept tlb flush when setting cr3

2009-06-02 Thread Avi Kivity
From: Avi Kivity a...@redhat.com vmx_set_cr3() will call vmx_tlb_flush(), which will flush the ept context. So there is no need to call ept_sync_context() explicitly. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 25f1239..5607de8 100644 ---

[COMMIT master] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Instead of reading the PDPTRs from memory after every exit (which is slow and wrong, as the PDPTRs are stored on the cpu), sync the PDPTRs from memory to the VMCS before entry, and from the VMCS to memory after exit. Do the same for cr3. Signed-off-by: Avi Kivity

[COMMIT master] KVM: Cache pdptrs

2009-06-02 Thread Avi Kivity
From: Avi Kivity a...@redhat.com Instead of reloading the pdptrs on every entry and exit (vmcs writes on vmx, guest memory access on svm) extract them on demand. Signed-off-by: Avi Kivity a...@redhat.com diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index

[PATCH] provide a kvm-free pic implementation

2009-06-02 Thread Glauber Costa
This patch separates all i8259 specific kvm implementation in separate functions. This way, qemu can have an i8259 device free from any kvm interference. kvm can have a simpler code path (we may even be able to compile out qemu's pic in the future if we want to), and everybody gets happy.

Re: [PATCH][KVM-AUTOTEST] TAP network support in kvm-autotest

2009-06-02 Thread sudhir kumar
On Thu, May 14, 2009 at 4:10 PM, Michael Goldish mgold...@redhat.com wrote: Hi Jason, We already have patches that implement similar functionality here in TLV, as mentioned in the to-do list (item #4 under 'Framework'). They're not yet committed upstream because they're still quite fresh.

Re: Fwd: kvm-autotest: False PASS results

2009-06-02 Thread sudhir kumar
On Mon, Jun 1, 2009 at 8:33 PM, Uri Lublin u...@redhat.com wrote: On 05/10/2009 08:15 PM, sudhir kumar wrote: Hi Uri, Any comments? -- Forwarded message -- From: sudhir kumarsmalik...@gmail.com The kvm-autotest shows the following PASS results for migration, while the VM

Re: [PATCH 3/3] KVM: Cache pdptrs

2009-06-02 Thread Joerg Roedel
On Mon, Jun 01, 2009 at 04:22:03PM +0300, Avi Kivity wrote: +static void svm_cache_reg(struct kvm_vcpu *vcpu, enum kvm_reg reg) +{ + switch (reg) { + case VCPU_EXREG_PDPTR: + BUG_ON(!npt_enabled); + load_pdptrs(vcpu, vcpu-arch.cr3); + break; +

Re: [PATCH 3/3] KVM: Cache pdptrs

2009-06-02 Thread Avi Kivity
Joerg Roedel wrote: On Mon, Jun 01, 2009 at 04:22:03PM +0300, Avi Kivity wrote: +static void svm_cache_reg(struct kvm_vcpu *vcpu, enum kvm_reg reg) +{ + switch (reg) { + case VCPU_EXREG_PDPTR: + BUG_ON(!npt_enabled); + load_pdptrs(vcpu, vcpu-arch.cr3);

Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Sheng Yang
On Monday 01 June 2009 21:22:02 Avi Kivity wrote: Instead of reading the PDPTRs from memory after every exit (which is slow and wrong, as the PDPTRs are stored on the cpu), sync the PDPTRs from memory to the VMCS before entry, and from the VMCS to memory after exit. Do the same for cr3.

Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Avi Kivity
Sheng Yang wrote: On Monday 01 June 2009 21:22:02 Avi Kivity wrote: Instead of reading the PDPTRs from memory after every exit (which is slow and wrong, as the PDPTRs are stored on the cpu), sync the PDPTRs from memory to the VMCS before entry, and from the VMCS to memory after exit. Do the

Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Sheng Yang
On Tuesday 02 June 2009 17:26:27 Avi Kivity wrote: Sheng Yang wrote: On Monday 01 June 2009 21:22:02 Avi Kivity wrote: Instead of reading the PDPTRs from memory after every exit (which is slow and wrong, as the PDPTRs are stored on the cpu), sync the PDPTRs from memory to the VMCS before

Re: [PATCH 3/3] KVM: Cache pdptrs

2009-06-02 Thread Joerg Roedel
On Tue, Jun 02, 2009 at 12:09:17PM +0300, Avi Kivity wrote: Joerg Roedel wrote: On Mon, Jun 01, 2009 at 04:22:03PM +0300, Avi Kivity wrote: +static void svm_cache_reg(struct kvm_vcpu *vcpu, enum kvm_reg reg) +{ + switch (reg) { + case VCPU_EXREG_PDPTR: +

Re: [PATCH 3/3] KVM: Cache pdptrs

2009-06-02 Thread Avi Kivity
Joerg Roedel wrote: On Tue, Jun 02, 2009 at 12:09:17PM +0300, Avi Kivity wrote: Joerg Roedel wrote: On Mon, Jun 01, 2009 at 04:22:03PM +0300, Avi Kivity wrote: +static void svm_cache_reg(struct kvm_vcpu *vcpu, enum kvm_reg reg) +{ + switch (reg) { + case

Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Avi Kivity
Sheng Yang wrote: No, no, not with the new code. For CPU can load pdptrs if EPT enabled with PAE from VM exit, there should not be necessary load it explicitly. So I estimate the ept_load_pdptr() in exit handler, and put it in CR0 handling. Just tried to optimize load-pdptr according to the

Re: physical memory dump problem

2009-06-02 Thread Avi Kivity
Matteo Signorini wrote: Hi! I have a problem with both kvm pmemsave and memsave functions. (I know that both invoke the cpu_physical_memory_rw function) I'm trying to dump a guest physical memory region (sys_call_table for example). I know that , for example, the sys_call_table is stored at

Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Sheng Yang
On Tuesday 02 June 2009 17:46:39 Avi Kivity wrote: Sheng Yang wrote: No, no, not with the new code. For CPU can load pdptrs if EPT enabled with PAE from VM exit, there should not be necessary load it explicitly. So I estimate the ept_load_pdptr() in exit handler, and put it in CR0

Re: [PATCH] powerpc/kvm: fix some init/exit annotations

2009-06-02 Thread Avi Kivity
Stephen Rothwell wrote: Fixes a couple of warnings like this one: WARNING: arch/powerpc/kvm/kvm-440.o(.text+0x1e8c): Section mismatch in reference from the function kvmppc_44x_exit() to the function .exit.text:kvmppc_booke_exit() The function kvmppc_44x_exit() references a function in an exit

Re: [KVM PATCH v3 0/3] mmio/pio cleanup

2009-06-02 Thread Avi Kivity
Gregory Haskins wrote: (This is v3 of the series, applies to kvm.git/master:7ff90748) This is in prep for some more substantial mmio/pio work for iosignalfd, coming later. [ Changelog: v3: *) Addressed feedback from Chris Wright w.r.t. patch 2/3 *) Rebased to

Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Avi Kivity
Sheng Yang wrote: On Tuesday 02 June 2009 17:46:39 Avi Kivity wrote: Sheng Yang wrote: No, no, not with the new code. For CPU can load pdptrs if EPT enabled with PAE from VM exit, there should not be necessary load it explicitly. So I estimate the ept_load_pdptr() in exit handler, and

Re: [PATCH] Read MADT entries from memory in processors _MAT method.

2009-06-02 Thread Avi Kivity
Gleb Natapov wrote: Also use enable/disable bit from ACPI MADT entries to track CPU hot plug. This removes assumptions about APIC ids from AML code and simplify cup hotplug handling. Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from

Re: [PATCH] qemu-kvm: Flush icache after dma operations for ia64

2009-06-02 Thread Jes Sorensen
Avi Kivity wrote: Zhang, Xiantao wrote: Fine to me. But seems the change in qemu_iovec_from_buffer is lost in this patch or that change is also not unnecessary ? I think the fixed unmap handles that case. Can you test to make sure? Avi and I went through the code and verified that it was

Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Sheng Yang
On Tuesday 02 June 2009 18:16:14 Avi Kivity wrote: Sheng Yang wrote: On Tuesday 02 June 2009 17:46:39 Avi Kivity wrote: Sheng Yang wrote: No, no, not with the new code. For CPU can load pdptrs if EPT enabled with PAE from VM exit, there should not be necessary load it explicitly. So I

Re: [PATCH 2/3] KVM: VMX: Simplify pdptr and cr3 management

2009-06-02 Thread Avi Kivity
Sheng Yang wrote: Yes, you are right. Quite beautiful. :) Thanks :) It's basically a continuation of RIP/RSP caching. I plan to continue it for cr0/cr3. Sorry for misunderstood the meaning of on demand without looking at the patch carefully... Looks fine now. Thanks! BTW: one extra

Re: [PATCH 3/3] KVM: Cache pdptrs

2009-06-02 Thread Avi Kivity
Avi Kivity wrote: + static void svm_set_vintr(struct vcpu_svm *svm) { svm-vmcb-control.intercept |= 1ULL INTERCEPT_VINTR; @@ -2286,12 +2298,6 @@ static int handle_exit(struct kvm_run *kvm_run, struct kvm_vcpu *vcpu) } vcpu-arch.cr0 = svm-vmcb-save.cr0;

[PATCH] Fix tpr patching to get cpu index from Windows per cpu area.

2009-06-02 Thread Gleb Natapov
Using cpu_index for this purpose work only by luck. Signed-off-by: Gleb Natapov g...@redhat.com diff --git a/kvm-tpr-opt.c b/kvm-tpr-opt.c index 246e08d..bdbc742 100644 --- a/kvm-tpr-opt.c +++ b/kvm-tpr-opt.c @@ -220,13 +220,29 @@ static int bios_is_mapped(CPUState *env, uint64_t rip) return

Re: [PATCH] Fix tpr patching to get cpu index from Windows per cpu area.

2009-06-02 Thread Avi Kivity
Gleb Natapov wrote: Using cpu_index for this purpose work only by luck. 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 majordomo

Re: [PATCH] clean up cpu hotplug code

2009-06-02 Thread Avi Kivity
Glauber Costa wrote: There's nothing kvm specific in get_cpu function. Remove it from kvm ifdef. Buy us a cleaner code, and may help us with any attempt of integrating this on the future. Signed-off-by: Glauber Costa glom...@redhat.com --- hw/acpi.c | 12 +++- 1 files changed, 3

Re: [PATCH] provide a kvm-free pic implementation

2009-06-02 Thread Avi Kivity
Glauber Costa wrote: This patch separates all i8259 specific kvm implementation in separate functions. This way, qemu can have an i8259 device free from any kvm interference. kvm can have a simpler code path (we may even be able to compile out qemu's pic in the future if we want to), and

Re: [PATCH RFC v3 3/4] Break dependency between vcpu index in vcpus array and vcpu_id.

2009-06-02 Thread Marcelo Tosatti
On Thu, May 28, 2009 at 12:54:46PM +0300, Gleb Natapov wrote: Archs are free to use vcpu_id as they see fit. For x86 it is used as vcpu's apic id. New ioctl is added to configure boot vcpu id that was assumed to be 0 till now. Signed-off-by: Gleb Natapov g...@redhat.com ---

Re: [PATCH 4/4] kvm-s390: streamline memslot handling - v6

2009-06-02 Thread Marcelo Tosatti
On Sun, May 31, 2009 at 11:22:58AM +0300, Avi Kivity wrote: ehrha...@linux.vnet.ibm.com wrote: From: Christian Ehrhardt ehrha...@linux.vnet.ibm.com *updates in v6* - ensure the wait_on_bit waiter is notified - move the reset of requests to kvm_vcpu_release to drop them early *updates in

Re: [PATCH RFC v3 3/4] Break dependency between vcpu index in vcpus array and vcpu_id.

2009-06-02 Thread Gleb Natapov
On Tue, Jun 02, 2009 at 09:38:08AM -0300, Marcelo Tosatti wrote: @@ -2223,6 +2226,10 @@ static long kvm_vm_ioctl(struct file *filp, r = kvm_irqfd(kvm, data.fd, data.gsi, data.flags); break; } + case KVM_SET_BOOT_CPU_ID: + kvm-bsp_vcpu_id = arg;

[PATCH RFC] Do not use cpu_index in interface between libkvm and qemu

2009-06-02 Thread Gleb Natapov
On vcpu creation cookie is returned which is used in future communication. Signed-off-by: Gleb Natapov g...@redhat.com diff --git a/cpu-defs.h b/cpu-defs.h index 1e071e7..5f541e0 100644 --- a/cpu-defs.h +++ b/cpu-defs.h @@ -147,6 +147,7 @@ struct KVMCPUState { int stop; int stopped;

Re: [PATCH 4/4] kvm-s390: streamline memslot handling - v6

2009-06-02 Thread Christian Ehrhardt
Marcelo Tosatti wrote: On Sun, May 31, 2009 at 11:22:58AM +0300, Avi Kivity wrote: ehrha...@linux.vnet.ibm.com wrote: From: Christian Ehrhardt ehrha...@linux.vnet.ibm.com *updates in v6* - ensure the wait_on_bit waiter is notified - move the reset of requests to kvm_vcpu_release to

[PATCH 1/3] kvm-s390: infrastructure to kick vcpus out of guest state - rebased

2009-06-02 Thread ehrhardt
From: Christian Ehrhardt ehrha...@linux.vnet.ibm.com As requested this is a rebased patch on top of the already applied v3 of the patch series. *updates to already applied version* - ensure allocations (might_sleep) are out of atomic context - centralize consumption of vcpu-request bits To

[PATCH 0/3] kvm-s390: revised version of kvm-s390 guest memory handling - rebased

2009-06-02 Thread ehrhardt
From: Christian Ehrhardt ehrha...@de.ibm.com As requested this is a rebased patch on top of the already applied v3 of the patch series. *updates to already applied version* - ensure the wait_on_bit waiter is notified - move the reset of requests to kvm_vcpu_release to drop them early - ensure

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

2009-06-02 Thread ehrhardt
From: Christian Ehrhardt ehrha...@linux.vnet.ibm.com As requested this is a rebased patch on top of the already applied v3 of the patch series. *updates to applied version* - ensure the wait_on_bit waiter is notified - ensure dropping vcpu all requests while freeing a vcpu - kickout only

[PATCH 2/3] kvm-s390: update vcpu-cpu - rebased

2009-06-02 Thread ehrhardt
From: Christian Ehrhardt ehrha...@linux.vnet.ibm.com As requested this is a rebased patch on top of the already applied v3 of the patch series. kvm on s390 formerly ignored vcpu-cpu. This patch adds set/unset vcpu-cpu in kvm_arch_vcpu_load/put to allow further architecture unification e.g. let

Re: [PATCH v7 1/2] qemu-kvm: add irqfd support

2009-06-02 Thread Gregory Haskins
Avi Kivity wrote: Gregory Haskins wrote: irqfd lets you create an eventfd based file-desriptor to inject interrupts to a kvm guest. We associate one gsi per fd for fine-grained routing. Sorry, getting to userspace a little late in the game. Np.. I need to re-work this for the POLLHUP

[PATCHv2 00/13] qemu: MSI-X support

2009-06-02 Thread Michael S. Tsirkin
Resending. Incorporated a minor fix pointed out by Isaku Yamahata. Here is the port of MSI-X support patches to upstream qemu. Please comment or commit. This patchset adds generic support for MSI-X, adds implementation in APIC, and uses MSI-X in virtio-net. At Paul's suggestion, I use stl_phy to

[PATCHv2 01/13] qemu: make default_write_config use mask table

2009-06-02 Thread Michael S. Tsirkin
Change much of hw/pci to use symbolic constants and a table-driven design: add a mask table with writable bits set and readonly bits unset. Detect change by comparing original and new registers. This makes it easy to support capabilities where read-only/writeable bit layout differs between

[PATCHv2 03/13] qemu: add routines to manage PCI capabilities

2009-06-02 Thread Michael S. Tsirkin
Add routines to manage PCI capability list. First user will be MSI-X. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci.c | 98 -- hw/pci.h | 18 +++- 2 files changed, 106 insertions(+), 10 deletions(-) diff

[PATCHv2 04/13] qemu: helper routines for pci access.

2009-06-02 Thread Michael S. Tsirkin
Add inline routines for convenient access to pci devices with correct (little) endianness. Will be used by MSI-X support. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci.h | 30 +++--- 1 files changed, 27 insertions(+), 3 deletions(-) diff --git a/hw/pci.h

[PATCHv2 05/13] qemu: MSI-X support functions

2009-06-02 Thread Michael S. Tsirkin
Add functions implementing MSI-X support. First user will be virtio-pci. Note that platform must set a flag to declare MSI supported. For PC this will be set by APIC. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Makefile.target |2 +- hw/msix.c | 423

[PATCHv2 02/13] qemu: capability bits in pci save/restore

2009-06-02 Thread Michael S. Tsirkin
Add support for capability bits in save/restore for pci. These will be used for MSI, where the capability might be present or not as requested by user, which does not map well into a single version number. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci.c | 14 --

[PATCHv2 06/13] qemu: add flag to disable MSI-X by default

2009-06-02 Thread Michael S. Tsirkin
Add global flag to disable MSI-X by default. This is useful primarily to make images loadable by older qemu (without msix). Even when MSI-X is disabled by flag, you can still load images that have MSI-X enabled. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/msix.c |3 +++

[PATCHv2 07/13] qemu: minimal MSI/MSI-X implementation for PC

2009-06-02 Thread Michael S. Tsirkin
Implement MSI support in APIC. Note that MSI and MMIO APIC registers are at the same memory location, but actually not on the global bus: MSI is on PCI bus, APIC is connected directly to the CPU. We map them on the global bus at the same address which happens to work because MSI registers are

[PATCHv2 08/13] qemu: add support for resizing regions

2009-06-02 Thread Michael S. Tsirkin
Make it possible to resize PCI regions. This will be used by virtio with MSI-X, where the region size depends on whether MSI-X is enabled, and can change across load/save. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci.c | 54

[PATCHv2 09/13] qemu: virtio support for many interrupt vectors

2009-06-02 Thread Michael S. Tsirkin
Extend virtio to support many interrupt vectors, and rearrange code in preparation for multi-vector support (mostly move reset out to bindings, because we will have to reset the vectors in transport-specific code). Actual bindings in pci, and use in net, to follow. Load and save are not connected

[PATCHv2 10/13] qemu: MSI-X support in virtio PCI

2009-06-02 Thread Michael S. Tsirkin
This enables actual support for MSI-X in virtio PCI. First user will be virtio-net. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio-pci.c | 152 -- 1 files changed, 112 insertions(+), 40 deletions(-) diff --git

[PATCHv2 11/13] qemu: request 3 vectors in virtio-net

2009-06-02 Thread Michael S. Tsirkin
Request up to 3 vectors in virtio-net. Actual bindings might supply less. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio-net.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index 60aa6da..6118fe3 100644 ---

[PATCHv2 12/13] qemu: virtio save/load bindings

2009-06-02 Thread Michael S. Tsirkin
Implement bindings for virtio save/load. Use them in virtio pci. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio-pci.c | 49 - hw/virtio.c | 31 ++- hw/virtio.h |4 3 files changed,

[PATCHv2 13/13] qemu: add pci_get/set_byte

2009-06-02 Thread Michael S. Tsirkin
Add pci_get/set_byte to keep *_word and *_long access functions company. They are unused for now. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci.h | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/pci.h b/hw/pci.h index 4072f16..e1e4fb4 100644

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

2009-06-02 Thread Gregory Haskins
(Applies to kvm.git/master:25deed73) Please see the header for 2/2 for a description. This patch series has been fully tested and appears to be working correctly. I have it as an RFC for now because it needs Davide's official submission/SOB for patch 1/2, and it should get some eyeballs/acks on

[KVM-RFC PATCH 1/2] eventfd: send POLLHUP on f_ops-release

2009-06-02 Thread Gregory Haskins
From: Davide Libenzi davi...@xmailserver.org Return-path: davi...@xmailserver.org Received: from novell.com ([:::130.57.1.153]) by soto.provo.novell.com with ESMTP; Wed, 27 May 2009 13:35:04 -0600 Received: from x35.xmailserver.org not authenticated [64.71.152.41] by

[KVM-RFC PATCH 2/2] kvm: use POLLHUP to close an irqfd instead of an explicit ioctl

2009-06-02 Thread Gregory Haskins
Assigning an irqfd object to a kvm object creates a relationship that we currently manage by having the kvm oject acquire/hold a file* reference to the underlying eventfd. The lifetime of these objects is properly maintained by decoupling the two objects whenever the irqfd is closed or kvm is

RE: [PATCH] qemu-kvm: Flush icache after dma operations for ia64

2009-06-02 Thread Zhang, Xiantao
Hi, Jes Have you verified whether it works for you ? You may run kernel build in the guest with 4 vcpus, if it can be done successfully without any error, it should be Okay I think, otherwise, we may need to investigate it further. :) Xiantao -Original Message-

[PATCH v8] qemu-kvm: add irqfd support

2009-06-02 Thread Gregory Haskins
irqfd lets you create an eventfd based file-desriptor to inject interrupts to a kvm guest. We associate one gsi per fd for fine-grained routing. [note: this is meant to work in conjunction with the POLLHUP version of irqfd, which has not yet been accepted into kvm.git] [ Changelog: v8:

Re: [PATCH v8] qemu-kvm: add irqfd support

2009-06-02 Thread Gregory Haskins
Gregory Haskins wrote: irqfd lets you create an eventfd based file-desriptor to inject interrupts to a kvm guest. We associate one gsi per fd for fine-grained routing. [note: this is meant to work in conjunction with the POLLHUP version of irqfd, which has not yet been accepted into

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

2009-06-02 Thread Michael S. Tsirkin
On Tue, Jun 02, 2009 at 11:15:28AM -0400, Gregory Haskins wrote: (Applies to kvm.git/master:25deed73) Please see the header for 2/2 for a description. This patch series has been fully tested and appears to be working correctly. I have it as an RFC for now because it needs Davide's official

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

2009-06-02 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Tue, Jun 02, 2009 at 11:15:28AM -0400, Gregory Haskins wrote: (Applies to kvm.git/master:25deed73) Please see the header for 2/2 for a description. This patch series has been fully tested and appears to be working correctly. I have it as an RFC for now

out of memory error leads to unbootable VM

2009-06-02 Thread Ross Boylan
I had a VM running Linux. While running that SAS installer the kernel ran out of memory and killed the installer. After that, any attempt to run a binary inside the VM produced cannot execute binary file. The log (inside the VM) also showed messages like Buffer I/O error on device hda1, logical

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

2009-06-02 Thread Michael S. Tsirkin
On Tue, Jun 02, 2009 at 12:14:15PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Tue, Jun 02, 2009 at 11:15:28AM -0400, Gregory Haskins wrote: (Applies to kvm.git/master:25deed73) Please see the header for 2/2 for a description. This patch series has been fully tested

Re: out of memory error leads to unbootable VM

2009-06-02 Thread Avi Kivity
Ross Boylan wrote: I had a VM running Linux. While running that SAS installer the kernel ran out of memory and killed the installer. After that, any attempt to run a binary inside the VM produced cannot execute binary file. The log (inside the VM) also showed messages like Buffer I/O error on

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

2009-06-02 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Tue, Jun 02, 2009 at 12:14:15PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Tue, Jun 02, 2009 at 11:15:28AM -0400, Gregory Haskins wrote: (Applies to kvm.git/master:25deed73) Please see the header for 2/2 for a description.

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

2009-06-02 Thread Michael S. Tsirkin
On Tue, Jun 02, 2009 at 12:34:12PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Tue, Jun 02, 2009 at 12:14:15PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Tue, Jun 02, 2009 at 11:15:28AM -0400, Gregory Haskins wrote: (Applies to

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

2009-06-02 Thread Michael S. Tsirkin
On Tue, Jun 02, 2009 at 07:59:49PM +0300, Michael S. Tsirkin wrote: On Tue, Jun 02, 2009 at 12:34:12PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Tue, Jun 02, 2009 at 12:14:15PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Tue, Jun 02, 2009

Re: out of memory error leads to unbootable VM

2009-06-02 Thread Ross Boylan
On Tue, 2009-06-02 at 19:27 +0300, Avi Kivity wrote: Ross Boylan wrote: I had a VM running Linux. While running that SAS installer the kernel ran out of memory and killed the installer. After that, any attempt to run a binary inside the VM produced cannot execute binary file. The log

Re: [KVM-RFC PATCH 2/2] kvm: use POLLHUP to close an irqfd instead of an explicit ioctl

2009-06-02 Thread Davide Libenzi
On Tue, 2 Jun 2009, Gregory Haskins wrote: @@ -64,12 +101,28 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key) { struct _irqfd *irqfd = container_of(wait, struct _irqfd, wait); - /* - * The wake_up is called with interrupts disabled. Therefore we

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

2009-06-02 Thread Gregory Haskins
Michael S. Tsirkin wrote: On Tue, Jun 02, 2009 at 12:34:12PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Tue, Jun 02, 2009 at 12:14:15PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: On Tue, Jun 02, 2009 at 11:15:28AM -0400,

Re: [KVM-RFC PATCH 2/2] kvm: use POLLHUP to close an irqfd instead of an explicit ioctl

2009-06-02 Thread Gregory Haskins
Davide Libenzi wrote: On Tue, 2 Jun 2009, Gregory Haskins wrote: @@ -64,12 +101,28 @@ irqfd_wakeup(wait_queue_t *wait, unsigned mode, int sync, void *key) { struct _irqfd *irqfd = container_of(wait, struct _irqfd, wait); -/* - * The wake_up is called with interrupts

Re: [KVM-RFC PATCH 2/2] kvm: use POLLHUP to close an irqfd instead of an explicit ioctl

2009-06-02 Thread Paul E. McKenney
On Tue, Jun 02, 2009 at 11:15:38AM -0400, Gregory Haskins wrote: Assigning an irqfd object to a kvm object creates a relationship that we currently manage by having the kvm oject acquire/hold a file* reference to the underlying eventfd. The lifetime of these objects is properly maintained by

Re: [KVM-RFC PATCH 2/2] kvm: use POLLHUP to close an irqfd instead of an explicit ioctl

2009-06-02 Thread Gregory Haskins
Paul E. McKenney wrote: On Tue, Jun 02, 2009 at 11:15:38AM -0400, Gregory Haskins wrote: Assigning an irqfd object to a kvm object creates a relationship that we currently manage by having the kvm oject acquire/hold a file* reference to the underlying eventfd. The lifetime of these

[PATCH 0/4] Provide kvm-free implementations of apic/ioapic

2009-06-02 Thread Glauber Costa
In the same way as the previous i8259 patch, this patch cleans up the apic and ioapic code to provide an implementation that is kvm free. This reduces the impact of kvm on normal qemu. Also, provides a simpler code base for kvm devices. -- To unsubscribe from this list: send the line

[PATCH 1/4] always halt non-bsp cpu.

2009-06-02 Thread Glauber Costa
This is not kvm specific, and should do fine in plain qemu Signed-off-by: Glauber Costa glom...@redhat.com --- hw/apic.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/apic.c b/hw/apic.c index 86aa6b6..2eddba0 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -467,8 +467,7

[PATCH 2/4] sipi and init: move common code

2009-06-02 Thread Glauber Costa
provide functions to query and reset the state of sipi and init in cpu's apic. This way we can move the kvm specific functions out of the apic path. Signed-off-by: Glauber Costa glom...@redhat.com --- cpu-defs.h |2 -- hw/apic.c | 49 -

[PATCH 3/4] provide a kvm-free implementation of apic

2009-06-02 Thread Glauber Costa
Also, provide a kvm_apic that does not depend highly on common code. Signed-off-by: Glauber Costa glom...@redhat.com --- hw/apic.c | 249 ++-- hw/pc.c|7 ++- hw/pc.h|1 + qemu-kvm-x86.c |5 +- 4 files changed,

[PATCH 4/4] provide a kvm-free implementation of ioapic

2009-06-02 Thread Glauber Costa
Also, provide a kvm_ioapic that does not depend highly on common code. Signed-off-by: Glauber Costa glom...@redhat.com --- hw/ioapic.c | 162 +- hw/pc.c |7 ++- hw/pc.h |1 + 3 files changed, 110 insertions(+), 60

Re: [PATCH 1/4] always halt non-bsp cpu.

2009-06-02 Thread Jan Kiszka
Glauber Costa wrote: This is not kvm specific, and should do fine in plain qemu This is fine with plain qemu already. The problem, IIUC, is that in-kernel kvm irqchip does not have a chance to remove the halted state again. Did you test the effect of this patch on that scenario? What makes it

Windows Server 2008 VM performance

2009-06-02 Thread Andrew Theurer
I've been looking at how KVM handles windows guests, and I am a little concerned with the CPU overhead. My test case is as follows: I am running 4 instances of a J2EE benchmark. Each instance needs one application server and one DB server. 8 VMs in total are used. I have the same App and

Re: [PATCH 1/4] always halt non-bsp cpu.

2009-06-02 Thread Glauber Costa
On Tue, Jun 02, 2009 at 10:35:47PM +0200, Jan Kiszka wrote: Glauber Costa wrote: This is not kvm specific, and should do fine in plain qemu This is fine with plain qemu already. The problem, IIUC, is that in-kernel kvm irqchip does not have a chance to remove the halted state again. Did

Re: Windows Server 2008 VM performance

2009-06-02 Thread Avi Kivity
Andrew Theurer wrote: I've been looking at how KVM handles windows guests, and I am a little concerned with the CPU overhead. My test case is as follows: I am running 4 instances of a J2EE benchmark. Each instance needs one application server and one DB server. 8 VMs in total are used. I

[patch 2/4] KVM: MMU audit: update audit_write_protection

2009-06-02 Thread Marcelo Tosatti
- Unsync pages contain writable sptes in the rmap. - rmaps do not exclusively contain writable sptes anymore. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: kvm/arch/x86/kvm/mmu.c === --- kvm.orig/arch/x86/kvm/mmu.c +++

[patch 3/4] KVM: MMU audit: nontrapping ptes in nonleaf level

2009-06-02 Thread Marcelo Tosatti
update_pte sets nonleaf sptes as notrap, so either it or the audit code is broken. Choose the audit code. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index: kvm/arch/x86/kvm/mmu.c === --- kvm.orig/arch/x86/kvm/mmu.c +++

[patch 0/4] mmu audit update

2009-06-02 Thread Marcelo Tosatti
Some updates to the MMU audit code. The third patch is guessy because I could not find the notrap spte documentation, all I can see is the page-fault error code mask and match fields in the VMCS, but can't see the link of that to sptes. Can someone point it out please? -- -- To unsubscribe

[patch 4/4] KVM: MMU audit: audit_mappings tweaks

2009-06-02 Thread Marcelo Tosatti
- Fail early in case gfn_to_pfn returns is_error_pfn. - For the pre pte write case, avoid spurious gva is valid but spte is notrap messages (the emulation code does the guest write first, so this particular case is OK). Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Index:

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

2009-06-02 Thread Marcelo Tosatti
Under testing, count_writable_mappings returns a value that is 2 integers larger than what count_rmaps returns. Suspicion is that either of the two functions is counting a duplicate (either positively or negatively). Modifying check_writable_mappings_rmap to check for rmap existance on all

Re: Windows Server 2008 VM performance

2009-06-02 Thread Javier Guerra
On Tue, Jun 2, 2009 at 4:38 PM, Avi Kivity a...@redhat.com wrote: Andrew Theurer wrote: P.S. Here is the qemu cmd line for the windows VMs: /usr/local/bin/qemu-system-x86_64 -name newcastle-xdbt01 -hda /dev/disk/by-id/scsi-3600a0b8f1eb1074f4a02b08a Use: -drive

Re: Windows Server 2008 VM performance

2009-06-02 Thread Avi Kivity
Javier Guerra wrote: On Tue, Jun 2, 2009 at 4:38 PM, Avi Kivity a...@redhat.com wrote: Andrew Theurer wrote: P.S. Here is the qemu cmd line for the windows VMs: /usr/local/bin/qemu-system-x86_64 -name newcastle-xdbt01 -hda /dev/disk/by-id/scsi-3600a0b8f1eb1074f4a02b08a

Re: [PATCH 1/4] always halt non-bsp cpu.

2009-06-02 Thread Jan Kiszka
Glauber Costa wrote: On Tue, Jun 02, 2009 at 10:35:47PM +0200, Jan Kiszka wrote: Glauber Costa wrote: This is not kvm specific, and should do fine in plain qemu This is fine with plain qemu already. The problem, IIUC, is that in-kernel kvm irqchip does not have a chance to remove the halted

Re: [PATCH 1/4] always halt non-bsp cpu.

2009-06-02 Thread Glauber Costa
On Wed, Jun 03, 2009 at 12:01:00AM +0200, Jan Kiszka wrote: Glauber Costa wrote: On Tue, Jun 02, 2009 at 10:35:47PM +0200, Jan Kiszka wrote: Glauber Costa wrote: This is not kvm specific, and should do fine in plain qemu This is fine with plain qemu already. The problem, IIUC, is that

  1   2   >