How to use code to create a new GuestVM

2012-01-11 Thread 吴锐
Hi, everyone I am a newbie about KVM. I am new want to write a module to create a GuestVM in demand. Which function should I look into. And which struct is corresponding to a GuestVM, Shadow page table? Thanks for your help. R -- To unsubscribe from this list: send the line

Re: [PATCH 1/3] net: use this_cpu_xxx replace percpu_xxx funcs

2012-01-11 Thread Alex,Shi
percpu_xxx funcs are duplicated with this_cpu_xxx funcs, so replace them for further code clean up. And in preempt safe scenario, __this_cpu_xxx funcs has a bit better performance since __this_cpu_xxx has no redundant preempt_disable() Signed-off-by: Alex Shi alex@intel.com ---

Re: [PATCH 2/3] kvm: use this_cpu_xxx replace percpu_xxx funcs

2012-01-11 Thread Alex,Shi
Acked-by: Avi Kivity a...@redhat.com And this one, picking up or comments are all appreciated. :) Just to be clear, you want this applied in kvm.git? Thanks Avi! I saw it is in your 3.3 submit list. -- To unsubscribe from this list: send the line unsubscribe kvm in the

Re: [PATCH 1/3] net: use this_cpu_xxx replace percpu_xxx funcs

2012-01-11 Thread David Miller
From: Alex,Shi alex@intel.com Date: Wed, 11 Jan 2012 16:45:33 +0800 percpu_xxx funcs are duplicated with this_cpu_xxx funcs, so replace them for further code clean up. And in preempt safe scenario, __this_cpu_xxx funcs has a bit better performance since __this_cpu_xxx has no

Re: [PATCH 3/3] Code clean up for percpu_xxx() functions

2012-01-11 Thread Alex,Shi
On Mon, 2011-11-21 at 17:06 -0700, t...@kernel.org wrote: (cc'ing hpa and quoting whole body) Signed-off-by: Alex Shi alex@intel.com Acked-by: Christoph Lameter c...@gentwo.org Acked-by: Tejun Heo t...@kernel.org hpa, I suppose this should go through x86? The original patch can

Re: [PATCH 1/3] net: use this_cpu_xxx replace percpu_xxx funcs

2012-01-11 Thread Alex,Shi
On Wed, 2012-01-11 at 01:03 -0800, David Miller wrote: From: Alex,Shi alex@intel.com Date: Wed, 11 Jan 2012 16:45:33 +0800 percpu_xxx funcs are duplicated with this_cpu_xxx funcs, so replace them for further code clean up. And in preempt safe scenario, __this_cpu_xxx funcs

Re: [PATCH] KVM: Allow host IRQ sharing for assigned PCI 2.3 devices

2012-01-11 Thread Michael S. Tsirkin
On Tue, Jan 10, 2012 at 04:41:50PM -0700, Alex Williamson wrote: The guest driver will never see such an interrupt as we will notice on its arrival that there is some mask pending. Right, I was thinking more about the affect at the hardware level. In theory a broken device might assume

kvm-s390: prep cleanup for sync registers patch series

2012-01-11 Thread Christian Borntraeger
Avi, Marcelo, here is a patch that reworks the setting of the prefix register. It is a prereq for the prefix patch in the following patch series about the sync registers in kvm_run. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

[PATCH] kvm-s390: rework code that sets the prefix

2012-01-11 Thread Christian Borntraeger
From: Christian Borntraeger borntrae...@de.ibm.com There are several places in the kvm module, which set the prefix register. Since we need to flush the cpu, lets combine this operation into a helper function. This helper will also explicitely mask out the unused bits. Signed-off-by: Christian

[PATCH 2/4] kvm-s390: provide the prefix register via kvm_run

2012-01-11 Thread Christian Borntraeger
Add the prefix register to the synced register field in kvm_run. While we need the prefix register most of the time read-only, this patch also adds handling for guest dirtying of the prefix register. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/kvm.h |

[PATCH 4/4] kvm-s390: provide access guest registers via kvm_run

2012-01-11 Thread Christian Borntraeger
This patch adds the access registers to the kvm_run structure. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/kvm.h |2 ++ arch/s390/include/asm/kvm_host.h |1 - arch/s390/kvm/kvm-s390.c | 16 +--- 3 files changed, 11

kvm: provide synchronous registers in kvm_run

2012-01-11 Thread Christian Borntraeger
Avi, Marcelo, here is the next version of the sync register patch series. -- 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.kernel.org/majordomo-info.html

[PATCH 3/4] kvm-s390: provide general purpose guest registers via kvm_run

2012-01-11 Thread Christian Borntraeger
This patch adds the general purpose registers to the kvm_run structure. Signed-off-by: Christian Borntraeger borntrae...@de.ibm.com --- arch/s390/include/asm/kvm.h |2 ++ arch/s390/include/asm/kvm_host.h |3 +-- arch/s390/kvm/diag.c |6 +++---

Re: [PATCH 3/3] stop the periodic RTC update timer

2012-01-11 Thread Marcelo Tosatti
On Fri, Jan 06, 2012 at 07:37:31AM +, Zhang, Yang Z wrote: change the RTC update logic to use host time with offset to calculate RTC clock. There have no need to use two periodic timers to maintain an internal timer for RTC clock update and alarm check. Instead, we calculate the

[regression] virtio net locks up

2012-01-11 Thread Bernd Schubert
No idea what is going on, but recent kernels lock up here after transferring some amount of data. So far I only know that 2.6.32 is the last working kernel I have tested and 3.0 is the first non-working version I tested. How to reproduce: vm1: iperf -c vm2 vm2: iperf -s vm1 After some time

Re: [regression] virtio net locks up

2012-01-11 Thread Bernd Schubert
On 01/11/2012 04:24 PM, Bernd Schubert wrote: No idea what is going on, but recent kernels lock up here after transferring some amount of data. So far I only know that 2.6.32 is the last working kernel I have tested and 3.0 is the first non-working version I tested. Sorry forgot to tell the

Re: [regression] virtio net locks up

2012-01-11 Thread Stefan Hajnoczi
On Wed, Jan 11, 2012 at 3:24 PM, Bernd Schubert bernd.schub...@itwm.fraunhofer.de wrote: Any idea what is going on or how to debug it? Here are a couple of ideas that would yield more information: Since the console still works I suggest checking dmesg output inside the guest. Are there any

Re: [PATCH RFC 2/2] kvm: set affinity hint for assigned device msi

2012-01-11 Thread Marcelo Tosatti
On Mon, Oct 17, 2011 at 07:04:40PM +0200, Michael S. Tsirkin wrote: On Mon, Oct 17, 2011 at 02:07:41PM -0200, Marcelo Tosatti wrote: Configurations to consider, all common ones used for assigned devices? I mean, besides round robin, any other modes that have an issue? Interrupts can

Re: [regression] virtio net locks up

2012-01-11 Thread Bernd Schubert
Hello Stefan, thanks for your help! On 01/11/2012 05:04 PM, Stefan Hajnoczi wrote: On Wed, Jan 11, 2012 at 3:24 PM, Bernd Schubert bernd.schub...@itwm.fraunhofer.de wrote: Any idea what is going on or how to debug it? Here are a couple of ideas that would yield more information: Since the

[PATCH v2] KVM: fix mov immediate emulation for 64-bit operands

2012-01-11 Thread Nadav Amit
MOV immediate instruction (opcodes 0xB8-0xBF) may take 64-bit operand. The previous emulation implementation assumes the operand is no longer than 32. Adding OpImm64 for this matter. Signed-off-by: Nadav Amit nadav.a...@gmail.com --- arch/x86/kvm/emulate.c | 12 ++-- 1 files changed,

Re: [PATCH v5 00/13] KVM/ARM Implementation

2012-01-11 Thread Peter Maydell
On 11 December 2011 19:23, Christoffer Dall c.d...@virtualopensystems.com wrote: On Sun, Dec 11, 2011 at 6:32 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 11 December 2011 10:24, Christoffer Dall c.d...@virtualopensystems.com wrote: Still on the to-do list:  - Reuse VMIDs  - Fix

[PATCH 1/2] KVM: Exception during emulation decode should propagate

2012-01-11 Thread Nadav Amit
An exception might occur during decode (e.g., #PF during fetch). Currently, the exception is ignored and emulation is performed. Instead, emulation should be skipped and the fault should be injected. Skipping instruction should report a failure in this case. Signed-off-by: Nadav Amit

[PATCH 2/2] KVM: Fix writeback on page boundary that propagate changes in spite of #PF

2012-01-11 Thread Nadav Amit
Consider the case in which an instruction emulation writeback is performed on a page boundary. In such case, if a #PF occurs on the second page, the write to the first page already occurred and cannot be retracted. Therefore, validation of the second page access must be performed prior to

Re: [PATCH] vhost-net: add module alias

2012-01-11 Thread Stephen Hemminger
On Wed, 11 Jan 2012 15:43:42 +0800 Amos Kong kongjian...@gmail.com wrote: On Wed, Jan 11, 2012 at 12:54 PM, Stephen Hemminger shemmin...@vyatta.comwrote: By adding the a module alias, programs (or users) won't have to explicitly call modprobe. Vhost-net will always be available if built

Re: [PATCH] vhost-net: add module alias

2012-01-11 Thread Stephen Hemminger
On Wed, 11 Jan 2012 11:07:47 +0400 Michael Tokarev m...@tls.msk.ru wrote: On 11.01.2012 08:54, Stephen Hemminger wrote: By adding the a module alias, programs (or users) won't have to explicitly call modprobe. Vhost-net will always be available if built into the kernel. It does require

Re: [PATCH] vhost-net: add module alias

2012-01-11 Thread Michael Tokarev
On 11.01.2012 20:58, Stephen Hemminger wrote: On Wed, 11 Jan 2012 11:07:47 +0400 Michael Tokarev m...@tls.msk.ru wrote: On 11.01.2012 08:54, Stephen Hemminger wrote: By adding the a module alias, programs (or users) won't have to explicitly call modprobe. Vhost-net will always be available

Re: [PATCH] vhost-net: add module alias

2012-01-11 Thread Kay Sievers
On Wed, Jan 11, 2012 at 17:58, Stephen Hemminger shemmin...@vyatta.com wrote: On Wed, 11 Jan 2012 11:07:47 +0400 Michael Tokarev m...@tls.msk.ru wrote: On 11.01.2012 08:54, Stephen Hemminger wrote: By adding the a module alias, programs (or users) won't have to explicitly call modprobe.

Re: [regression] virtio net locks up

2012-01-11 Thread Stefan Hajnoczi
On Wed, Jan 11, 2012 at 4:18 PM, Bernd Schubert bernd.schub...@itwm.fraunhofer.de wrote: On 01/11/2012 05:04 PM, Stefan Hajnoczi wrote: Try pinging the host's IP address from inside the guest.  Run tcpdump on the guest's tap interface from the host and observe whether or not you see any

[PATCH] vhost-net: add module alias (v2)

2012-01-11 Thread Stephen Hemminger
By adding the correct module alias, programs won't have to explicitly call modprobe. Vhost-net will always be available if built into the kernel. It does require assigning a permanent minor number for depmod to work. Choose one next to TUN since this driver is related to it. Also, use C99 style

Re: [PATCH 3/3] Code clean up for percpu_xxx() functions

2012-01-11 Thread t...@kernel.org
On Wed, Jan 11, 2012 at 05:08:41PM +0800, Alex,Shi wrote: On Mon, 2011-11-21 at 17:06 -0700, t...@kernel.org wrote: (cc'ing hpa and quoting whole body) Signed-off-by: Alex Shi alex@intel.com Acked-by: Christoph Lameter c...@gentwo.org Acked-by: Tejun Heo t...@kernel.org

[PATCH 2/4 V8] Add functions to check if the host has stopped the vm

2012-01-11 Thread Eric B Munson
When a host stops or suspends a VM it will set a flag to show this. The watchdog will use these functions to determine if a softlockup is real, or the result of a suspended VM. Signed-off-by: Eric B Munson emun...@mgebm.net asm-generic changes Acked-by: Arnd Bergmann a...@arndb.de Cc:

[PATCH 0/4 V8] Avoid soft lockup message when KVM is stopped by host

2012-01-11 Thread Eric B Munson
Changes from V7: Define KVM_CAP_GUEST_PAUSED and support check Call mark_page_dirty () after setting PVCLOCK_GUEST_STOPPED Changes from V6: Use __this_cpu_and when clearing the PVCLOCK_GUEST_STOPPED flag Changes from V5: Collapse generic check_and_clear_guest_stopped into patch 2 Include

[PATCH 1/4 V8] Add flag to indicate that a vm was stopped by the host

2012-01-11 Thread Eric B Munson
This flag will be used to check if the vm was stopped by the host when a soft lockup was detected. The host will set the flag when it stops the guest. On resume, the guest will check this flag if a soft lockup is detected and skip issuing the warning. Signed-off-by: Eric B Munson

[PATCH V5] Guest stop notification

2012-01-11 Thread Eric B Munson
Often when a guest is stopped from the qemu console, it will report spurious soft lockup warnings on resume. There are kernel patches being discussed that will give the host the ability to tell the guest that it is being stopped and should ignore the soft lockup warning that generates. This

[PATCH 4/4 V8] Add check for suspended vm in softlockup detector

2012-01-11 Thread Eric B Munson
A suspended VM can cause spurious soft lockup warnings. To avoid these, the watchdog now checks if the kernel knows it was stopped by the host and skips the warning if so. When the watchdog is reset successfully, clear the guest paused flag. Signed-off-by: Eric B Munson emun...@mgebm.net Cc:

[PATCH 3/4 V8] Add ioctl for KVMCLOCK_GUEST_STOPPED

2012-01-11 Thread Eric B Munson
Now that we have a flag that will tell the guest it was suspended, create an interface for that communication using a KVM ioctl. Signed-off-by: Eric B Munson emun...@mgebm.net Cc: mi...@redhat.com Cc: h...@zytor.com Cc: ry...@linux.vnet.ibm.com Cc: aligu...@us.ibm.com Cc: mtosa...@redhat.com Cc:

Re: [PATCH V5] Guest stop notification

2012-01-11 Thread Jan Kiszka
On 2012-01-11 19:17, Eric B Munson wrote: Often when a guest is stopped from the qemu console, it will report spurious soft lockup warnings on resume. There are kernel patches being discussed that will give the host the ability to tell the guest that it is being stopped and should ignore the

State of KVM bits in linux-headers

2012-01-11 Thread Jan Kiszka
Hi, I'm a bit unhappy about the current state of our supposed to be automatically sync'ed linux-headers directory in qemu. It has been updated several times against undefined kernel trees, means against neither a released version nor kvm.git. Now, if I run an update against kvm.git + some local

Re: __direct_map() questions

2012-01-11 Thread Marcelo Tosatti
Hi, See Documentation/virtual/kvm/mmu.txt in the kernel source tree. On Tue, Jan 10, 2012 at 11:41:41AM -0800, Nick H wrote: Hello All, I am preparing for a presentation for my community college, newbie to the kvm world. I am trying to understand kvm implementation. I am interested in

Re: [PATCH 2/2] KVM: fix missing illegal instruction-trap in protected modes

2012-01-11 Thread Marcelo Tosatti
On Tue, Jan 10, 2012 at 03:26:49PM +0100, Stephan Bärwolf wrote: From 2168285ffb30716f30e129c3ce98ce42d19c4d4e Mon Sep 17 00:00:00 2001 From: Stephan Baerwolf stephan.baerw...@tu-ilmenau.de Date: Sun, 8 Jan 2012 02:03:47 + Subject: [PATCH 2/2] KVM: fix missing illegal instruction-trap in

[RFC][PATCH] Update linux headers against kvm.git

2012-01-11 Thread Jan Kiszka
On 2012-01-11 20:16, Jan Kiszka wrote: Hi, I'm a bit unhappy about the current state of our supposed to be automatically sync'ed linux-headers directory in qemu. It has been updated several times against undefined kernel trees, means against neither a released version nor kvm.git. Now, if I

Re: State of KVM bits in linux-headers

2012-01-11 Thread Alexander Graf
On 11.01.2012, at 20:16, Jan Kiszka wrote: Hi, I'm a bit unhappy about the current state of our supposed to be automatically sync'ed linux-headers directory in qemu. It has been updated several times against undefined kernel trees, means against neither a released version nor kvm.git.

Re: [PATCH] vhost-net: add module alias (v2)

2012-01-11 Thread Michael S. Tsirkin
On Wed, Jan 11, 2012 at 09:16:53AM -0800, Stephen Hemminger wrote: By adding the correct module alias, programs won't have to explicitly call modprobe. Vhost-net will always be available if built into the kernel. It does require assigning a permanent minor number for depmod to work. Choose one

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Anthony Liguori
On 01/11/2012 01:32 PM, Alexander Graf wrote: On 11.01.2012, at 20:16, Jan Kiszka wrote: Hi, I'm a bit unhappy about the current state of our supposed to be automatically sync'ed linux-headers directory in qemu. It has been updated several times against undefined kernel trees, means against

Re: State of KVM bits in linux-headers

2012-01-11 Thread Jan Kiszka
On 2012-01-11 20:32, Alexander Graf wrote: On 11.01.2012, at 20:16, Jan Kiszka wrote: Hi, I'm a bit unhappy about the current state of our supposed to be automatically sync'ed linux-headers directory in qemu. It has been updated several times against undefined kernel trees, means against

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Anthony Liguori
On 01/11/2012 01:38 PM, Jan Kiszka wrote: I would like to see us avoiding this in the future. Headers update patches should mention the source and should not be merged until the ABI changes actually made it at least into kvm.git. Same applies, of course, to the functional changes related to

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Alexander Graf
On 11.01.2012, at 20:38, Anthony Liguori wrote: On 01/11/2012 01:32 PM, Alexander Graf wrote: On 11.01.2012, at 20:16, Jan Kiszka wrote: Hi, I'm a bit unhappy about the current state of our supposed to be automatically sync'ed linux-headers directory in qemu. It has been updated

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Alexander Graf
On 11.01.2012, at 20:41, Anthony Liguori wrote: On 01/11/2012 01:38 PM, Jan Kiszka wrote: I would like to see us avoiding this in the future. Headers update patches should mention the source and should not be merged until the ABI changes actually made it at least into kvm.git. Same

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Jan Kiszka
On 2012-01-11 20:38, Anthony Liguori wrote: On 01/11/2012 01:32 PM, Alexander Graf wrote: On 11.01.2012, at 20:16, Jan Kiszka wrote: Hi, I'm a bit unhappy about the current state of our supposed to be automatically sync'ed linux-headers directory in qemu. It has been updated several times

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Alexander Graf
On 11.01.2012, at 20:46, Jan Kiszka wrote: On 2012-01-11 20:38, Anthony Liguori wrote: On 01/11/2012 01:32 PM, Alexander Graf wrote: On 11.01.2012, at 20:16, Jan Kiszka wrote: Hi, I'm a bit unhappy about the current state of our supposed to be automatically sync'ed linux-headers

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Jan Kiszka
On 2012-01-11 20:46, Alexander Graf wrote: On 11.01.2012, at 20:41, Anthony Liguori wrote: On 01/11/2012 01:38 PM, Jan Kiszka wrote: I would like to see us avoiding this in the future. Headers update patches should mention the source and should not be merged until the ABI changes

Re: [PATCH] vhost-net: add module alias

2012-01-11 Thread Michael S. Tsirkin
On Wed, Jan 11, 2012 at 08:54:26AM -0800, Stephen Hemminger wrote: On Wed, 11 Jan 2012 15:43:42 +0800 Amos Kong kongjian...@gmail.com wrote: On Wed, Jan 11, 2012 at 12:54 PM, Stephen Hemminger shemmin...@vyatta.comwrote: By adding the a module alias, programs (or users) won't have to

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Anthony Liguori
On 01/11/2012 01:48 PM, Jan Kiszka wrote: On 2012-01-11 20:46, Alexander Graf wrote: On 11.01.2012, at 20:41, Anthony Liguori wrote: On 01/11/2012 01:38 PM, Jan Kiszka wrote: I would like to see us avoiding this in the future. Headers update patches should mention the source and should

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Alexander Graf
On 11.01.2012, at 20:52, Anthony Liguori wrote: On 01/11/2012 01:48 PM, Jan Kiszka wrote: On 2012-01-11 20:46, Alexander Graf wrote: On 11.01.2012, at 20:41, Anthony Liguori wrote: On 01/11/2012 01:38 PM, Jan Kiszka wrote: I would like to see us avoiding this in the future. Headers

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Jan Kiszka
On 2012-01-11 20:52, Anthony Liguori wrote: On 01/11/2012 01:48 PM, Jan Kiszka wrote: On 2012-01-11 20:46, Alexander Graf wrote: On 11.01.2012, at 20:41, Anthony Liguori wrote: On 01/11/2012 01:38 PM, Jan Kiszka wrote: I would like to see us avoiding this in the future. Headers update

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Anthony Liguori
On 01/11/2012 01:53 PM, Alexander Graf wrote: On 11.01.2012, at 20:52, Anthony Liguori wrote: IIRC, we never had this problem with qemu-kvm - as the merges were coordinated with the kernel (subsystem) tree. Are you suggesting that kvm header updates go through uq/master? That seems

Re: [PATCH 2/2] KVM: fix missing illegal instruction-trap in protected modes

2012-01-11 Thread Stephan Bärwolf
On 01/11/12 20:09, Marcelo Tosatti wrote: On Tue, Jan 10, 2012 at 03:26:49PM +0100, Stephan Bärwolf wrote: From 2168285ffb30716f30e129c3ce98ce42d19c4d4e Mon Sep 17 00:00:00 2001 From: Stephan Baerwolf stephan.baerw...@tu-ilmenau.de Date: Sun, 8 Jan 2012 02:03:47 + Subject: [PATCH 2/2]

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Alexander Graf
On 11.01.2012, at 20:59, Anthony Liguori wrote: On 01/11/2012 01:53 PM, Alexander Graf wrote: On 11.01.2012, at 20:52, Anthony Liguori wrote: IIRC, we never had this problem with qemu-kvm - as the merges were coordinated with the kernel (subsystem) tree. Are you suggesting that kvm

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Anthony Liguori
On 01/11/2012 02:05 PM, Alexander Graf wrote: On 11.01.2012, at 20:59, Anthony Liguori wrote: On 01/11/2012 01:53 PM, Alexander Graf wrote: On 11.01.2012, at 20:52, Anthony Liguori wrote: IIRC, we never had this problem with qemu-kvm - as the merges were coordinated with the kernel

use of PMU in guest generates messages in host

2012-01-11 Thread David Ahern
Using latest kernel tree (e343a895a9f342f239c5e3c5ffc6c0b1707e6244) which has KVM bits for using PMU in the guest. Host and guest are both running Fedora 16, 64-bit, with this kernel. Running this command in the guest: perf stat -ddd -- openssl speed aes Generates this in the host:

Re: [PATCH] vhost-net: add module alias (v2)

2012-01-11 Thread Ben Hutchings
On Wed, 2012-01-11 at 09:16 -0800, Stephen Hemminger wrote: By adding the correct module alias, programs won't have to explicitly call modprobe. Vhost-net will always be available if built into the kernel. It does require assigning a permanent minor number for depmod to work. Choose one next

Re: [PATCH 2/2] KVM: fix missing illegal instruction-trap in protected modes

2012-01-11 Thread Marcelo Tosatti
On Wed, Jan 11, 2012 at 09:01:10PM +0100, Stephan Bärwolf wrote: On 01/11/12 20:09, Marcelo Tosatti wrote: On Tue, Jan 10, 2012 at 03:26:49PM +0100, Stephan Bärwolf wrote: From 2168285ffb30716f30e129c3ce98ce42d19c4d4e Mon Sep 17 00:00:00 2001 From: Stephan Baerwolf

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Alexander Graf
On 11.01.2012, at 21:16, Anthony Liguori wrote: On 01/11/2012 02:05 PM, Alexander Graf wrote: On 11.01.2012, at 20:59, Anthony Liguori wrote: On 01/11/2012 01:53 PM, Alexander Graf wrote: On 11.01.2012, at 20:52, Anthony Liguori wrote: IIRC, we never had this problem with qemu-kvm -

Re: [PATCH 1/2] KVM: Exception during emulation decode should propagate

2012-01-11 Thread Takuya Yoshikawa
On Wed, 11 Jan 2012 18:53:30 +0200 Nadav Amit na...@cs.technion.ac.il wrote: An exception might occur during decode (e.g., #PF during fetch). Currently, the exception is ignored and emulation is performed. When I cleaned up insn_fetch(), I thought that fetching the instruction which is being

Re: [PATCH 2/2] KVM: fix missing illegal instruction-trap in protected modes

2012-01-11 Thread Stephan Bärwolf
On 01/11/12 22:21, Marcelo Tosatti wrote: On Wed, Jan 11, 2012 at 09:01:10PM +0100, Stephan Bärwolf wrote: On 01/11/12 20:09, Marcelo Tosatti wrote: On Tue, Jan 10, 2012 at 03:26:49PM +0100, Stephan Bärwolf wrote: From 2168285ffb30716f30e129c3ce98ce42d19c4d4e Mon Sep 17 00:00:00 2001 From:

[PATCH] KVM: PPC: refer to paravirt docs in header file

2012-01-11 Thread Scott Wood
Instead of keeping separate copies of struct kvm_vcpu_arch_shared (one in the code, one in the docs) that inevitably fail to be kept in sync (already sr[] is missing from the doc version), just point to the header file as the source of documentation on the contents of the magic page.

Re: [PATCH] KVM: PPC: refer to paravirt docs in header file

2012-01-11 Thread Alexander Graf
On 12.01.2012, at 00:37, Scott Wood wrote: Instead of keeping separate copies of struct kvm_vcpu_arch_shared (one in the code, one in the docs) that inevitably fail to be kept in sync (already sr[] is missing from the doc version), just point to the header file as the source of documentation

RE: [PATCH 3/3] stop the periodic RTC update timer

2012-01-11 Thread Zhang, Yang Z
-Original Message- From: Marcelo Tosatti [mailto:mtosa...@redhat.com] Regarding the UIP bit, a guest could read it in a loop and wait for the value to change. But you can emulate it in cmos_ioport_read by reading the host time, that is, return 1 during 244us, 0 for remaining of

Re: [PATCH 1/2] KVM: Exception during emulation decode should propagate

2012-01-11 Thread Takuya Yoshikawa
(2012/01/12 7:11), Takuya Yoshikawa wrote: On Wed, 11 Jan 2012 18:53:30 +0200 Nadav Amitna...@cs.technion.ac.il wrote: An exception might occur during decode (e.g., #PF during fetch). Currently, the exception is ignored and emulation is performed. Note that the decode/emulation will not be

Re: [PATCH 3/3] Code clean up for percpu_xxx() functions

2012-01-11 Thread H. Peter Anvin
On 01/11/2012 09:19 AM, t...@kernel.org wrote: Alex, can you please collect all patches into a single patchset? Please split it such that, usage changes are per-system so that they can be routed through respective subsystems (x86 or net) and updates to percpu proper which can be applied after

RE: [PATCH 3/3] stop the periodic RTC update timer

2012-01-11 Thread Zhang, Yang Z
-Original Message- From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo Bonzini Because it's not in the spec because some engineer thought it was cool. It not cool. We need to do some optimizations to get Better Performance. It's in the spec because it gives you a

[PATCH 0/2] virtio-serial: set up vqs on demand

2012-01-11 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com Virtio-serial set up (max_ports+1)*2 vqs when device probes, but may not all io_ports are used. These patches create vqs of port0 and control port when probing the device, then create io-vqs when called add_port(). Hongyong Zang (2): virtio-pci:

[PATCH 1/2] virtio-pci: add setup_vqs flag in vp_try_to_find_vqs

2012-01-11 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com changes in vp_try_to_find_vqs: Virtio-serial's probe() calls it to request irqs and setup vqs of port0 and controls; add_port() calls it to set up vqs of io_port. it will not create virtqueue if the name is null. Signed-off-by: Hongyong Zang

[PATCH 2/2] virtio-serial: setup_port_vq when adding port

2012-01-11 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com Add setup_port_vq(). Create the io ports' vqs when add_port. Signed-off-by: Hongyong Zang zanghongy...@huawei.com --- drivers/char/virtio_console.c | 65 ++-- 1 files changed, 61 insertions(+), 4 deletions(-)

Re: [PATCH 3/3] Code clean up for percpu_xxx() functions

2012-01-11 Thread Alex,Shi
On Wed, 2012-01-11 at 16:44 -0800, H. Peter Anvin wrote: On 01/11/2012 09:19 AM, t...@kernel.org wrote: Alex, can you please collect all patches into a single patchset? Please split it such that, usage changes are per-system so that they can be routed through respective subsystems (x86 or

Re: [PATCH] vhost-net: add module alias (v2)

2012-01-11 Thread Zhi Yong Wu
On Thu, Jan 12, 2012 at 1:16 AM, Stephen Hemminger shemmin...@vyatta.com wrote: By adding the correct module alias, programs won't have to explicitly call modprobe. Vhost-net will always be available if built into the kernel. It does require assigning a permanent minor number for depmod to

Re: [PATCH v5 00/13] KVM/ARM Implementation

2012-01-11 Thread Christoffer Dall
On Jan 11, 2012, at 8:48 AM, Peter Maydell wrote: On 11 December 2011 19:23, Christoffer Dall c.d...@virtualopensystems.com wrote: On Sun, Dec 11, 2011 at 6:32 AM, Peter Maydell peter.mayd...@linaro.org wrote: On 11 December 2011 10:24, Christoffer Dall c.d...@virtualopensystems.com

Re: [RFC PATCH 04/16] KVM: PPC: factor out lpid allocator from book3s_64_mmu_hv

2012-01-11 Thread Paul Mackerras
On Mon, Jan 09, 2012 at 04:35:52PM +0100, Alexander Graf wrote: Paul, does this work for you? IIRC you need this code to be available from real mode, which powerpc.c isn't in, right? We don't need to allocated LPIDs from real mode, so it should be OK. book3s_64_mmu_hv.c is not real mode code,

Could anybody give some description about the implement of hyercall in kvm?

2012-01-11 Thread Liu ping fan
Hi, Could anybody give some description about the implement of hyercall in kvm? Or give some links about it? Thanks, ping fan -- 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

[PATCH] vhost-net: add module alias (v2.1)

2012-01-11 Thread Stephen Hemminger
Subject: vhost-net: add module alias (v2.1) By adding some module aliases, programs (or users) won't have to explicitly call modprobe. Vhost-net will always be available if built into the kernel. It does require assigning a permanent minor number for depmod to work. Also: - use C99 style

Re: use of PMU in guest generates messages in host

2012-01-11 Thread Gleb Natapov
On Wed, Jan 11, 2012 at 01:47:55PM -0700, David Ahern wrote: Using latest kernel tree (e343a895a9f342f239c5e3c5ffc6c0b1707e6244) which has KVM bits for using PMU in the guest. Host and guest are both running Fedora 16, 64-bit, with this kernel. Running this command in the guest: perf

Re: [Qemu-devel] State of KVM bits in linux-headers

2012-01-11 Thread Gleb Natapov
On Wed, Jan 11, 2012 at 08:46:38PM +0100, Alexander Graf wrote: On 11.01.2012, at 20:41, Anthony Liguori wrote: On 01/11/2012 01:38 PM, Jan Kiszka wrote: I would like to see us avoiding this in the future. Headers update patches should mention the source and should not be merged

Re: [RFC PATCH 14/16] KVM: PPC: booke: category E.HV (GS-mode) support

2012-01-11 Thread Benjamin Herrenschmidt
On Tue, 2012-01-10 at 04:11 +0100, Alexander Graf wrote: This is what book3s does: case EMULATE_FAIL: printk(KERN_CRIT %s: emulation at %lx failed (%08x)\n, __func__, kvmppc_get_pc(vcpu), kvmppc_get_last_inst(vcpu));

Re: [RFC PATCH 14/16] KVM: PPC: booke: category E.HV (GS-mode) support

2012-01-11 Thread Alexander Graf
On 12.01.2012, at 07:44, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Tue, 2012-01-10 at 04:11 +0100, Alexander Graf wrote: This is what book3s does: case EMULATE_FAIL: printk(KERN_CRIT %s: emulation at %lx failed (%08x)\n,

Re: [PATCH] KVM: PPC: refer to paravirt docs in header file

2012-01-11 Thread Alexander Graf
On 12.01.2012, at 00:37, Scott Wood wrote: Instead of keeping separate copies of struct kvm_vcpu_arch_shared (one in the code, one in the docs) that inevitably fail to be kept in sync (already sr[] is missing from the doc version), just point to the header file as the source of documentation

Re: [RFC PATCH 04/16] KVM: PPC: factor out lpid allocator from book3s_64_mmu_hv

2012-01-11 Thread Paul Mackerras
On Mon, Jan 09, 2012 at 04:35:52PM +0100, Alexander Graf wrote: Paul, does this work for you? IIRC you need this code to be available from real mode, which powerpc.c isn't in, right? We don't need to allocated LPIDs from real mode, so it should be OK. book3s_64_mmu_hv.c is not real mode code,

Re: [RFC PATCH 14/16] KVM: PPC: booke: category E.HV (GS-mode) support

2012-01-11 Thread Benjamin Herrenschmidt
On Tue, 2012-01-10 at 04:11 +0100, Alexander Graf wrote: This is what book3s does: case EMULATE_FAIL: printk(KERN_CRIT %s: emulation at %lx failed (%08x)\n, __func__, kvmppc_get_pc(vcpu), kvmppc_get_last_inst(vcpu));

Re: [RFC PATCH 14/16] KVM: PPC: booke: category E.HV (GS-mode) support

2012-01-11 Thread Alexander Graf
On 12.01.2012, at 07:44, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Tue, 2012-01-10 at 04:11 +0100, Alexander Graf wrote: This is what book3s does: case EMULATE_FAIL: printk(KERN_CRIT %s: emulation at %lx failed (%08x)\n,