Re: [kvm-devel] [PATCH RFC 2/5] Create relay channels and add trace data

2008-04-03 Thread Avi Kivity
Liu, Eric E wrote: From 41d65b55580d3f07f9f1c50e89e3d64c5d10fbaf Mon Sep 17 00:00:00 2001 From: Feng (Eric) Liu [EMAIL PROTECTED] Date: Tue, 1 Apr 2008 07:26:14 -0400 Subject: [PATCH] KVM: Add kvm trace support. when config KVM_TRACE, it allows userspace app to read the trace of kvm_related

Re: [kvm-devel] [patch 0/3] separate thread for IO handling V3

2008-04-03 Thread Avi Kivity
Marcelo Tosatti wrote: This version fixes the vmdk problems found by the regression testing. Dor, regarding the option to disable the IO thread, it would require duplicating most of the changed code. For now I believe its better to get the patch into a state where its considered stable

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-03 Thread Avi Kivity
Andrea Arcangeli wrote: On Wed, Apr 02, 2008 at 02:16:41PM +0300, Avi Kivity wrote: Ugh, there's still mark_page_accessed() and SetPageDirty(). btw, like PG_dirty is only set if the spte is writeable, mark_page_accessed should only run if the accessed bit is set in the spte

Re: [kvm-devel] [patch 0/3] separate thread for IO handling V3

2008-04-03 Thread Avi Kivity
Avi Kivity wrote: There's still something wrong. When I start Windows with these patches applied, Windows startup consumes ~50 sec of cpu time, compared to ~12 sec without. Pinning qemu into cpu 0 seems to fix this. I'll investigate some more. Changing GUI_REFRESH_INTERVAL to 1000

Re: [kvm-devel] [patch 0/3] separate thread for IO handling V3

2008-04-03 Thread Avi Kivity
Avi Kivity wrote: Avi Kivity wrote: There's still something wrong. When I start Windows with these patches applied, Windows startup consumes ~50 sec of cpu time, compared to ~12 sec without. Pinning qemu into cpu 0 seems to fix this. I'll investigate some more. Changing

[kvm-devel] [PATCH 17/35] KVM: Add reset support for in kernel PIT

2008-04-03 Thread Avi Kivity
From: Sheng Yang [EMAIL PROTECTED] Separate the reset part and prepare for reset support. Signed-off-by: Sheng Yang [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/i8254.c | 30 +++--- arch/x86/kvm/i8254.h |1 + 2 files changed, 20

[kvm-devel] [PATCH 11/35] KVM: detect if VCPU triple faults

2008-04-03 Thread Avi Kivity
it should triple fault. This patch detects this condition and handles it with an KVM_SHUTDOWN exit to userspace. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86.c | 20 +++- include/linux/kvm_host.h |1 + 2

[kvm-devel] [PATCH 20/35] KVM: Provide unlocked version of emulator_write_phys()

2008-04-03 Thread Avi Kivity
Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86.c | 21 ++--- include/asm-x86/kvm_host.h |3 +++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 1b9e695..03ba402 100644 --- a/arch/x86/kvm

[kvm-devel] [PATCH 19/35] x86: KVM guest: add basic paravirt support

2008-04-03 Thread Avi Kivity
From: Marcelo Tosatti [EMAIL PROTECTED] Add basic KVM paravirt support. Avoid vm-exits on IO delays. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/Kconfig |8 ++ arch/x86/kernel/Makefile |1 + arch/x86/kernel

[kvm-devel] [PATCH 12/35] KVM: replace remaining __FUNCTION__ occurances

2008-04-03 Thread Avi Kivity
From: Harvey Harrison [EMAIL PROTECTED] __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/lapic.c |8 arch/x86/kvm/mmu.c | 35

[kvm-devel] [PATCH 18/35] KVM: add basic paravirt support

2008-04-03 Thread Avi Kivity
From: Marcelo Tosatti [EMAIL PROTECTED] Add basic KVM paravirt support. Avoid vm-exits on IO delays. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86.c |1 + include/asm-x86/kvm_para.h |3 ++- include/linux/kvm.h

[kvm-devel] [PATCH 25/35] x86: make native_machine_shutdown non-static

2008-04-03 Thread Avi Kivity
] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kernel/reboot.c |2 +- include/asm-x86/reboot.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 708d6f8..1481d85 100644 --- a/arch/x86/kernel/reboot.c +++ b

[kvm-devel] [PATCH 15/35] KVM: In kernel PIT model

2008-04-03 Thread Avi Kivity
From: Sheng Yang [EMAIL PROTECTED] The patch moved PIT from userspace to kernel, and increase the timer accuracy greatly. Signed-off-by: Sheng Yang [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/Makefile |3 +- arch/x86/kvm/i8254.c | 585

[kvm-devel] [PATCH 22/35] x86: KVM guest: hypercall based pte updates and TLB flushes

2008-04-03 Thread Avi Kivity
] Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kernel/kvm.c | 137 + 1 files changed, 137 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index

[kvm-devel] [PATCH 21/35] KVM: MMU: hypercall based pte updates and TLB flushes

2008-04-03 Thread Avi Kivity
on hypercall - don't pass host errors (-ENOMEM) to guest] [akpm: warning fix on i386] Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/mmu.c | 136

[kvm-devel] [PATCH 33/35] KVM: VMX: Add module option to disable flexpriority

2008-04-03 Thread Avi Kivity
Useful for debugging. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/vmx.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index fb0389d..0155931 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c

[kvm-devel] [PATCH 29/35] KVM: Move some x86 specific constants and structures to include/asm-x86

2008-04-03 Thread Avi Kivity
Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- include/asm-x86/kvm_host.h | 13 + include/linux/kvm_host.h | 13 - 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index 52e276c..2773f91 100644

[kvm-devel] [PATCH 31/35] KVM: MMU: Introduce and use spte_to_page()

2008-04-03 Thread Avi Kivity
Encapsulate the pte mask'n'shift in a function. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/mmu.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index dd4b95b..6fc3421 100644 --- a/arch/x86/kvm

[kvm-devel] [PATCH 32/35] KVM: no longer EXPERIMENTAL

2008-04-03 Thread Avi Kivity
Long overdue. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 41962e7..76c70ab 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@ -19,7

[kvm-devel] [PATCH 28/35] KVM: MMU: Set the accessed bit on non-speculative shadow ptes

2008-04-03 Thread Avi Kivity
If we populate a shadow pte due to a fault (and not speculatively due to a pte write) then we can set the accessed bit on it, as we know it will be set immediately on the next guest instruction. This saves a read-modify-write operation. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86

[kvm-devel] [PATCH 30/35] KVM: MMU: fix dirty bit setting when removing write permissions

2008-04-03 Thread Avi Kivity
mmu_set_spte will release the pages as clean. This patch fix this issue by marking the page as dirty inside rmap_write_protect(). Signed-off-by: Izik Eidus [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/mmu.c |8 1 files changed, 8 insertions(+), 0

[kvm-devel] [PATCH 26/35] x86: KVM guest: disable clock before rebooting.

2008-04-03 Thread Avi Kivity
the functions shutdown, used in the path of kernel_kexec() (sys.c) and crash_shutdown, used in the path of crash_kexec() (kexec.c) Signed-off-by: Glauber Costa [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kernel/kvmclock.c | 27 +++ 1 files changed

[kvm-devel] [PATCH 08/35] KVM: MMU: large page support

2008-04-03 Thread Avi Kivity
filesystem, without NPT/EPT. Anthony measures a 4% improvement on 4-way kernbench, with NPT. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/mmu.c | 222 +++- arch/x86/kvm/paging_tmpl.h

[kvm-devel] [PATCH 34/35] KVM: x86: add functions to get the cpl of vcpu

2008-04-03 Thread Avi Kivity
From: Izik Eidus [EMAIL PROTECTED] Signed-off-by: Izik Eidus [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/svm.c |8 arch/x86/kvm/vmx.c | 15 +++ include/asm-x86/kvm_host.h |1 + 3 files changed, 24 insertions(+), 0

[kvm-devel] [PATCH 35/35] KVM: x86: hardware task switching support

2008-04-03 Thread Avi Kivity
From: Izik Eidus [EMAIL PROTECTED] This emulates the x86 hardware task switch mechanism in software, as it is unsupported by either vmx or svm. It allows operating systems which use it, like freedos, to run as kvm guests. Signed-off-by: Izik Eidus [EMAIL PROTECTED] Signed-off-by: Avi Kivity

[kvm-devel] [PATCH 24/35] x86: allow machine_crash_shutdown to be replaced

2008-04-03 Thread Avi Kivity
From: Glauber Costa [EMAIL PROTECTED] This patch a llows machine_crash_shutdown to be replaced, just like any of the other functions in machine_ops Signed-off-by: Glauber Costa [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kernel/crash.c |3 ++- arch/x86/kernel

[kvm-devel] [PATCH 09/35] KVM: Prefix control register accessors with kvm_ to avoid namespace pollution

2008-04-03 Thread Avi Kivity
Names like 'set_cr3()' look dangerously close to affecting the host. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/vmx.c | 14 ++-- arch/x86/kvm/x86.c | 46 ++-- include/asm-x86/kvm_host.h | 12 +- 3

[kvm-devel] [PATCH 27/35] KVM: kvm.h: __user requires compiler.h

2008-04-03 Thread Avi Kivity
on x86 only coincidentally due to other include files. This patch makes kvm.h compile in all cases. Signed-off-by: Christian Borntraeger [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- include/linux/kvm.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

[kvm-devel] [PATCH 07/35] KVM: MMU: ignore zapped root pagetables

2008-04-03 Thread Avi Kivity
be emulated. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Cc: Anthony Liguori [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/mmu.c | 12 ++-- arch/x86/kvm/x86.c | 12 include/asm-x86/kvm_host.h |1 + include/linux

[kvm-devel] [PATCH 02/35] KVM: Add stat counter for hypercalls

2008-04-03 Thread Avi Kivity
From: Amit Shah [EMAIL PROTECTED] Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86.c |2 ++ include/asm-x86/kvm_host.h |1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm

[kvm-devel] [PATCH 00/35] KVM updates for the 2.6.26 merge window (part II)

2008-04-03 Thread Avi Kivity
These thirty-five patches comprise the second batch of the updates I have queued for 2.6.26. Please review. arch/x86/Kconfig |8 + arch/x86/kernel/Makefile |1 + arch/x86/kernel/crash.c |3 +- arch/x86/kernel/kvm.c | 247

[kvm-devel] [PATCH 03/35] KVM: x86 emulator: fix sparse warnings in x86_emulate.c

2008-04-03 Thread Avi Kivity
of __emulate_2op arch/x86/kvm/x86_emulate.c:1091:3: warning: symbol '_tmp' shadows an earlier one arch/x86/kvm/x86_emulate.c:1091:3: originally declared here [18 more warnings suppressed] Signed-off-by: Harvey Harrison [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86_emulate.c

[kvm-devel] [PATCH 10/35] KVM: Use kzalloc to avoid allocating kvm_regs from kernel stack

2008-04-03 Thread Avi Kivity
From: Xiantao Zhang [EMAIL PROTECTED] Since the size of kvm_regs is too big to allocate from kernel stack on ia64, use kzalloc to allocate it. Signed-off-by: Xiantao Zhang [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- virt/kvm/kvm_main.c | 33

[kvm-devel] [PATCH 01/35] KVM: Use x86's segment descriptor struct instead of private definition

2008-04-03 Thread Avi Kivity
The x86 desc_struct unification allows us to remove segment_descriptor.h. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/segment_descriptor.h | 29 - arch/x86/kvm/vmx.c|3 +-- arch/x86/kvm/x86.c| 15

[kvm-devel] [PATCH 14/35] KVM: Remove pointless desc_ptr #ifdef

2008-04-03 Thread Avi Kivity
The desc_struct changes left an unnecessary #ifdef; remove it. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/svm.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index b2c667f..51741f9 100644 --- a/arch/x86/kvm

[kvm-devel] [PATCH 06/35] KVM: Implement dummy values for MSR_PERF_STATUS

2008-04-03 Thread Avi Kivity
From: Alexander Graf [EMAIL PROTECTED] Darwin relies on this and ceases to work without. Signed-off-by: Alexander Graf [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/x86

[kvm-devel] [PATCH 04/35] KVM: SVM: make iopm_base static

2008-04-03 Thread Avi Kivity
From: Harvey Harrison [EMAIL PROTECTED] Fixes sparse warning as well. arch/x86/kvm/svm.c:69:15: warning: symbol 'iopm_base' was not declared. Should it be static? Signed-off-by: Harvey Harrison [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/svm.c |2 +- 1

[kvm-devel] [PATCH 05/35] KVM: sparse fixes for kvm/x86.c

2008-04-03 Thread Avi Kivity
: warning: returning void-valued expression Signed-off-by: Harvey Harrison [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86.c | 26 +- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86

[kvm-devel] [PATCH 23/35] x86: KVM guest: hypercall batching

2008-04-03 Thread Avi Kivity
From: Marcelo Tosatti [EMAIL PROTECTED] Batch pte updates and tlb flushes in lazy MMU mode. [avi: - adjust to mmu_op - helper for getting para_state without debug warnings] Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kernel/kvm.c

Re: [kvm-devel] Ubuntu Gutsy host / XP guest / -smp 2

2008-04-02 Thread Avi Kivity
David Abrahams wrote: With the title combination, the guest takes nearly 100% of my real CPU time and still only sees one CPU. Is this a known problem, and does it have a known solution? Can you send the output of 'kvm_stat -1'? Also, what does the guest think it is doing (in task

Re: [kvm-devel] [PATCH] Fix endianness for virtio-blk config space

2008-04-02 Thread Avi Kivity
Anthony Liguori wrote: The virtio config space is little endian. Make sure that in virtio-blk we store the values in little endian format. Applied, thanks. -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-02 Thread Avi Kivity
Andrea Arcangeli wrote: On Wed, Apr 02, 2008 at 07:32:35AM +0300, Avi Kivity wrote: It ought to work. gfn_to_hfn() (old gfn_to_page) will still need to take a refcount if possible. This reminds me, that mmu notifiers we could implement gfn_to_hfn only with follow_page and skip

Re: [kvm-devel] [PATCH 2/2] Move in-kernel PIT device to separate file

2008-04-02 Thread Avi Kivity
Anthony Liguori wrote: This patch is mostly code motion to move the newly refactored in-kernel PIT device to a separate file. Applied both, thanks. -- error compiling committee.c: too many arguments to function -

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-02 Thread Avi Kivity
Andrea Arcangeli wrote: On Wed, Apr 02, 2008 at 12:50:50PM +0300, Avi Kivity wrote: Isn't it faster though? We don't need to pull in the cacheline containing the struct page anymore. Exactly, not only that, get_user_pages is likely a bit slower that we need for just kvm pte

Re: [kvm-devel] [PATCH] KVM: add kvm_get_kvm and kvm_put_kvm functions

2008-04-02 Thread Avi Kivity
Izik Eidus wrote: From ebb9fe4765f1572314d2249e29a7ef4d0de07273 Mon Sep 17 00:00:00 2001 From: Izik Eidus [EMAIL PROTECTED] Date: Sun, 30 Mar 2008 15:48:35 +0300 Subject: [PATCH] KVM: add kvm_get_kvm and kvm_put_kvm functions, the main purpose of adding this functions is the abilaty to

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
[EMAIL PROTECTED] wrote: From: Ben-Ami Yassour [EMAIL PROTECTED] Enable a guest to access a device's memory mapped I/O regions directly. Userspace sends the mmio regions that the guest can access. On the first page fault for an access to an mmio address the host translates the gva to hpa,

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
Anthony Liguori wrote: Regardless of whether we can use /dev/mem, I think we should introduce a new char device anyway. We only need to mmap() MMIO regions which are mapped by the PCI bus, presumably, the kernel should know about these mappings. The driver should only allow mappings

Re: [kvm-devel] KVM hangs with windows XP guest - help with debugging?

2008-04-01 Thread Avi Kivity
Jonathan Underwood wrote: Hi, I am trying to run Windows XP pro as a guest under kvm. The host system is Fedora 8. I have seen this behaviour with kvm-60 (as currently packaged for Fedora 8) and kvm-64 (using the rawhide package). Essentially, I install XP Pro successfuly. When I then try

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
Anthony Liguori wrote: I looked at Andrea's patches and I didn't see any special handling for non-RAM pages. Something Muli mentioned that kept them from doing /sys/devices/pci/.../region to begin with was the fact that IO pages do not have a struct page backing them so get_user_pages()

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
Ben-Ami Yassour1 wrote: Can you explain why you're not using the regular memory slot mechanism? i.e. have userspace mmap(/dev/mem) and create a memslot containing that at the appropriate guest physical address? Our initial approach was to mmap /sys/bus/pci/devices/.../resource# and

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
Anthony Liguori wrote: You could get away with supporting reserved RAM another way though. If we refactored the MMU to use hfn_t instead of struct page, you would then need a mechanism to mmap() reserved ram into userspace (similar to ioremap I guess). In fact, you may be able to just

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
Anthony Liguori wrote: What about switching the KVM MMU code to use hfn_t instead of struct page? The initial conversion is pretty straight forward as the places where you actually need a struct page you can always get it from pfn_to_page() (like in kvm_release_page_dirty). We can then

Re: [kvm-devel] [PATCH] KVM: MMU: Fix rmap_remove() race

2008-03-31 Thread Avi Kivity
Andrea Arcangeli wrote: I thought some more about this. BTW, for completeness: normally (with exception of vm_destroy) the put_page run by rmap_remove won't be the last one, but still the page can go in the freelist a moment after put_page runs (leading to the same problem). The VM is

Re: [kvm-devel] [kvm-ppc-devel] virtio-net working on PowerPC KVM

2008-03-31 Thread Avi Kivity
Alexander Graf wrote: I am experiencing 7-8ms ping latencies (native 0.1ms) on x86_64 as well, when pinging the virtual machine. Maybe it's not related to PowerPC? Is it supposed to be that slow? If you have a really old host kernel, or a misconfigured one, it can happen. What's your host

Re: [kvm-devel] [kvm-ppc-devel] virtio-net working on PowerPC KVM

2008-03-31 Thread Avi Kivity
Alexander Graf wrote: On Mar 31, 2008, at 9:43 AM, Avi Kivity wrote: Alexander Graf wrote: I am experiencing 7-8ms ping latencies (native 0.1ms) on x86_64 as well, when pinging the virtual machine. Maybe it's not related to PowerPC? Is it supposed to be that slow? If you have a really

Re: [kvm-devel] kvm-64 hang

2008-03-31 Thread Avi Kivity
Farkas Levente wrote: hi, while kvm-62 works for us kmv-64 is hang at random position and even if it's start it's not able to login neither from net (can't connect) nor from console (through virt-manager's vnc i can give root username but after the password nothing happened). attached a

[kvm-devel] [PATCH 07/40] KVM: x86 emulator: add group 7 decoding

2008-03-31 Thread Avi Kivity
This adds group decoding for opcode 0x0f 0x01 (group 7). Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86_emulate.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index 7310368..ef6de16

[kvm-devel] [PATCH 06/40] KVM: x86 emulator: Group decoding for groups 4 and 5

2008-03-31 Thread Avi Kivity
Add group decoding support for opcode 0xfe (group 4) and 0xff (group 5). Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86_emulate.c | 40 ++-- 1 files changed, 10 insertions(+), 30 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch

[kvm-devel] [PATCH 05/40] KVM: x86 emulator: Group decoding for group 3

2008-03-31 Thread Avi Kivity
This adds group decoding support for opcodes 0xf6, 0xf7 (group 3). Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86_emulate.c | 34 ++ 1 files changed, 10 insertions(+), 24 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm

[kvm-devel] [PATCH 13/40] KVM: VMX: Enable Virtual Processor Identification (VPID)

2008-03-31 Thread Avi Kivity
Yang [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/vmx.c | 80 +--- arch/x86/kvm/vmx.h |6 +++ include/asm-x86/kvm_host.h |1 + 3 files changed, 82 insertions(+), 5 deletions(-) diff --git a/arch/x86

[kvm-devel] [PATCH 09/40] KVM: Only x86 has pio

2008-03-31 Thread Avi Kivity
Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- virt/kvm/kvm_main.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 04595fe..121e65c 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -678,8 +678,10 @@ static int

[kvm-devel] [PATCH 11/40] KVM: MMU: Decouple mmio from shadow page tables

2008-03-31 Thread Avi Kivity
are instantiated, so the shadow code is never invoked for ptes that reference mmio. The code is simpler, and with future work, can be made to handle mmio concurrently. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/mmu.c | 34 +++--- arch/x86/kvm

[kvm-devel] [PATCH 04/40] KVM: x86 emulator: group decoding for group 1A

2008-03-31 Thread Avi Kivity
This adds group decode support for opcode 0x8f. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86_emulate.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index 46ecf34..cf1ce7c 100644

[kvm-devel] [PATCH 32/40] KVM: paravirtualized clocksource: host part

2008-03-31 Thread Avi Kivity
PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86.c | 113 +++- include/asm-x86/kvm_host.h |7 +++ include/asm-x86/kvm_para.h | 25 ++ include/linux/kvm.h|1 + 4 files changed, 145 insertions(+), 1

[kvm-devel] [PATCH 24/40] KVM: MMU: make the __nonpaging_map function generic

2008-03-31 Thread Avi Kivity
From: Joerg Roedel [EMAIL PROTECTED] The mapping function for the nonpaging case in the softmmu does basically the same as required for Nested Paging. Make this function generic so it can be used for both. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED

[kvm-devel] [PATCH 34/40] KVM: x86 emulator: add ad_mask static inline

2008-03-31 Thread Avi Kivity
From: Harvey Harrison [EMAIL PROTECTED] Replaces open-coded mask calculation in macros. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86_emulate.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git

[kvm-devel] [PATCH 35/40] KVM: x86 emulator: make register_address, address_mask static inlines

2008-03-31 Thread Avi Kivity
From: Harvey Harrison [EMAIL PROTECTED] Signed-off-by: Harvey Harrison [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86_emulate.c | 48 ++- 1 files changed, 29 insertions(+), 19 deletions(-) diff --git a/arch/x86/kvm

[kvm-devel] [PATCH 37/40] KVM: Add API to retrieve the number of supported vcpus per vm

2008-03-31 Thread Avi Kivity
Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 256c0fc..955d2ee 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c

[kvm-devel] [PATCH 36/40] KVM: x86 emulator: make register_address_increment and JMP_REL static inlines

2008-03-31 Thread Avi Kivity
From: Harvey Harrison [EMAIL PROTECTED] Change jmp_rel() to a function as well. Signed-off-by: Harvey Harrison [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86_emulate.c | 56 --- 1 files changed, 26 insertions(+), 30

[kvm-devel] [PATCH 38/40] KVM: Increase vcpu count to 16

2008-03-31 Thread Avi Kivity
With NPT support, scalability is much improved. Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- include/linux/kvm_host.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index b90ca36..f4deb99 100644 --- a/include/linux

[kvm-devel] [PATCH 25/40] KVM: export the load_pdptrs() function to modules

2008-03-31 Thread Avi Kivity
From: Joerg Roedel [EMAIL PROTECTED] The load_pdptrs() function is required in the SVM module for NPT support. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86.c |1 + include/asm-x86/kvm_host.h |2 ++ 2 files changed

[kvm-devel] [PATCH 33/40] x86: KVM guest: paravirtualized clocksource

2008-03-31 Thread Avi Kivity
that, time comes from the host. [randy dunlap: add missing include] [randy dunlap: disallow on Voyager or Visual WS] Signed-off-by: Glauber de Oliveira Costa [EMAIL PROTECTED] Signed-off-by: Randy Dunlap [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/Kconfig

[kvm-devel] [PATCH 40/40] KVM: Increase the number of user memory slots per vm

2008-03-31 Thread Avi Kivity
Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- include/linux/kvm_host.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index f4deb99..eb88d32 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h

[kvm-devel] [PATCH 39/40] KVM: Add API for determining the number of supported memory slots

2008-03-31 Thread Avi Kivity
Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86.c |3 +++ include/linux/kvm.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 955d2ee..b7c32f6 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c

[kvm-devel] [PATCH 31/40] KVM: SVM: enable LBR virtualization

2008-03-31 Thread Avi Kivity
world switch overhead when the guest doesn't use these MSRs. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Signed-off-by: Markus Rechberger [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/svm.c | 39 +-- 1 files changed, 37

[kvm-devel] [PATCH 16/40] KVM: make EFER_RESERVED_BITS configurable for architecture code

2008-03-31 Thread Avi Kivity
From: Joerg Roedel [EMAIL PROTECTED] This patch give the SVM and VMX implementations the ability to add some bits the guest can set in its EFER register. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/x86.c | 11

[kvm-devel] [PATCH 21/40] KVM: SVM: add detection of Nested Paging feature

2008-03-31 Thread Avi Kivity
From: Joerg Roedel [EMAIL PROTECTED] Let SVM detect if the Nested Paging feature is available on the hardware. Disable it to keep this patch series bisectable. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/svm.c |8 1

[kvm-devel] [PATCH 17/40] KVM: align valid EFER bits with the features of the host system

2008-03-31 Thread Avi Kivity
-by: Joerg Roedel [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/svm.c |3 +++ arch/x86/kvm/vmx.c |4 arch/x86/kvm/x86.c | 10 +- 3 files changed, 16 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 1a582f1

[kvm-devel] [PATCH 22/40] KVM: SVM: add module parameter to disable Nested Paging

2008-03-31 Thread Avi Kivity
From: Joerg Roedel [EMAIL PROTECTED] To disable the use of the Nested Paging feature even if it is available in hardware this patch adds a module parameter. Nested Paging can be disabled by passing npt=0 to the kvm_amd module. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Signed-off-by: Avi

[kvm-devel] [PATCH 23/40] KVM: export information about NPT to generic x86 code

2008-03-31 Thread Avi Kivity
the availability of TDP to the generic x86 code. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/mmu.c | 15 +++ arch/x86/kvm/svm.c |4 +++- include/asm-x86/kvm_host.h |2 ++ 3 files changed, 20 insertions(+), 1

[kvm-devel] [PATCH 27/40] KVM: SVM: add support for Nested Paging

2008-03-31 Thread Avi Kivity
From: Joerg Roedel [EMAIL PROTECTED] This patch contains the SVM architecture dependent changes for KVM to enable support for the Nested Paging feature of AMD Barcelona and Phenom processors. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86

[kvm-devel] [PATCH 18/40] KVM: VMX: unifdef the EFER specific code

2008-03-31 Thread Avi Kivity
] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/vmx.c | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a509910..76944f2 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -1335,14 +1335,14 @@ static

[kvm-devel] [PATCH 20/40] KVM: SVM: move feature detection to hardware setup code

2008-03-31 Thread Avi Kivity
-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/svm.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index ff3bc74..5f527dc 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -302,7 +302,6 @@ static void

[kvm-devel] [PATCH 14/40] KVM: Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier

2008-03-31 Thread Avi Kivity
From: Hollis Blanchard [EMAIL PROTECTED] This allows kvm_host.h to be #included even when struct preempt_notifier is undefined. This is needed to build ppc asm-offsets.h. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- include/linux/kvm_host.h

[kvm-devel] [PATCH 30/40] KVM: SVM: allocate the MSR permission map per VCPU

2008-03-31 Thread Avi Kivity
. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] Signed-off-by: Markus Rechberger [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/kvm_svm.h |2 + arch/x86/kvm/svm.c | 67 +++- 2 files changed, 34 insertions(+), 35

[kvm-devel] [PATCH 00/40] KVM updates for the 2.6.26 merge window (part I)

2008-03-31 Thread Avi Kivity
These are the first forty of about a hundred patches I have queued for 2.6.26. Note that a few will go through git-s390, maybe a couple through x86.git, and a few to 2.6.25-rc. The ia64 patches are not included as they are being reviewed, but I hope to have them merged in time for the 2.6.26

[kvm-devel] [PATCH 02/40] KVM: MMU: Simplify hash table indexing

2008-03-31 Thread Avi Kivity
From: Dong, Eddie [EMAIL PROTECTED] Signed-off-by: Yaozu (Eddie) Dong [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- arch/x86/kvm/mmu.c | 10 +- include/asm-x86/kvm_host.h |3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm

[kvm-devel] [PATCH 03/40] KVM: x86 emulator: add support for group decoding

2008-03-31 Thread Avi Kivity
Certain x86 instructions use bits 3:5 of the byte following the opcode as an opcode extension, with the decode sometimes depending on bits 6:7 as well. Add support for this in the main decoding table rather than an ad-hock adaptation per opcode. Signed-off-by: Avi Kivity [EMAIL PROTECTED

[kvm-devel] [PATCH 08/40] KVM: constify function pointer tables

2008-03-31 Thread Avi Kivity
From: Jan Engelhardt [EMAIL PROTECTED] Signed-off-by: Jan Engelhardt [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] --- virt/kvm/kvm_main.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index b2e1289..04595fe

Re: [kvm-devel] hugetlbfs not working

2008-03-31 Thread Avi Kivity
Marcelo Tosatti wrote: QEMU/KVM: ftruncate() is not supported by hugetlbfs on older hosts Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] Applied, thanks. -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] [patch 0/2] separate thread for IO handling V2

2008-03-30 Thread Avi Kivity
Marcelo Tosatti wrote: - Fix reset, powerdown and shutdown. - Fix kvmctl. Unfortunately, this is still broken: - typing into a linux guest console, qemu locked up waiting for a signal - the regression tests still fail due to guest slowdown. I haven't isolated the cause yet (doesn't

Re: [kvm-devel] [PATCH] qemu: use ARRAY_SIZE macro as provided by osdep.h

2008-03-30 Thread Avi Kivity
Carlo Marcelo Arenas Belon wrote: included through qemu-kvm.h - cpu.h - cpu-defs.h for all architectures and resulting otherwise in : qemu/qemu-kvm-x86.c:23:1: warning: ARRAY_SIZE redefined In file included from ../cpu-defs.h:30, from qemu/target-i386/cpu.h:45, from

Re: [kvm-devel] [PATCH] qemu: remove conflicting dependency to linux/pci.h

2008-03-30 Thread Avi Kivity
Carlo Marcelo Arenas Belon wrote: remove dependency to the pci linux headers added since c10bf6159ff24501852c91a342c3077d5388b184 and that was generating the following conflict : qemu/hw/cirrus_vga.c:193:1: warning: PCI_COMMAND_SERR redefined In file included from

Re: [kvm-devel] [PATCH 2/6] PCI DMA API

2008-03-30 Thread Avi Kivity
Anthony Liguori wrote: This patch introduces a PCI DMA API and some generic code to support other DMA APIs. Two types are introduced: PhysIOVector and IOVector. A DMA API maps a PhysIOVector, which is composed of target_phys_addr_t, into an IOVector, which is composed of void *. This

Re: [kvm-devel] virtio-net working on PowerPC KVM

2008-03-30 Thread Avi Kivity
Hollis Blanchard wrote: I'm pleased to report that we now have working network support in the guest, via the virtio-net driver. In fact, we can use NFS for the guest's root filesystem. :) Boot log attached. Congrats! The bad news is that it's very slow, but the good news is that it's

Re: [kvm-devel] windows guest shows 15 virtual CPU´s i n device manager

2008-03-30 Thread Avi Kivity
Martin Maurer wrote: Hi all, I am running on kernel 2.6.24, KVM 63 – trying windows guests – working quite well. …but why tells the device manager that I have 15 CPU`s (QEMU Virtual CPU version 0.9.1)? The windows task manager is just showing one as expected. kvm

Re: [kvm-devel] [PATCH] Use QEMU functions to access guest memory for virtio

2008-03-30 Thread Avi Kivity
Anthony Liguori wrote: I converted everything to use offsetof but left the accessors. You need a fair number of macros to handle the various data sizes and even then, I think it ends up looking nicer with the macros. See my patch series on qemu-devel and let me know if you agree/disagree.

Re: [kvm-devel] [kvm-ia64-devel] [02/17][PATCH] Implement smp_call_function_mask for ia64

2008-03-30 Thread Avi Kivity
Zhang, Xiantao wrote: diff --git a/include/linux/smp.h b/include/linux/smp.h index 55232cc..b71820b 100644 --- a/include/linux/smp.h +++ b/include/linux/smp.h @@ -56,6 +56,9 @@ int smp_call_function(void(*func)(void *info), void *info, int retry, int wait); int

Re: [kvm-devel] [Qemu-devel] [PATCH 2/6] PCI DMA API

2008-03-30 Thread Avi Kivity
Anthony Liguori wrote: This looks like it wouldn't scale to handle the Sparc systems. There we want to make more translation steps from DVMA addresses to physical in DMA controller and IOMMU and only in the final stage to void *. To handle this, probably there should be an opaque parameter

Re: [kvm-devel] [PATCH 1/3] [PATCH] passthrough

2008-03-27 Thread Avi Kivity
Glauber Costa wrote: add -passthrough usage string Signed-off-by: Glauber Costa [EMAIL PROTECTED] --- qemu/vl.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/vl.c b/qemu/vl.c index f5b2665..d36cfe3 100644 --- a/qemu/vl.c +++ b/qemu/vl.c @@ -8053,6

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