Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-28 Thread Alexander Graf
On 28.06.2010, at 06:39, Matt Evans wrote: Howdy Alex! Alexander Graf wrote: We will soon start and replace instructions from the text section with other, paravirtualized versions. To ease the readability of those patches I split out the generic looping and magic page mapping code out.

Re: [PATCH v3] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Sheng Yang
On Monday 28 June 2010 11:56:08 Avi Kivity wrote: On 06/28/2010 06:36 AM, Sheng Yang wrote: Some guest device driver may leverage the Non-Snoop I/O, and explicitly WBINVD or CLFLUSH to a RAM space. Since migration may occur before WBINVD or CLFLUSH, we need to maintain data consistency

Re: [PATCH v3] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Avi Kivity
On 06/28/2010 09:42 AM, Sheng Yang wrote: +static void wbinvd_ipi(void *garbage) +{ + wbinvd(); +} Like Jan mentioned, this is quite heavy. What about a clflush() loop instead? That may take more time, but at least it's preemptible. Of course, it isn't preemptible in an IPI.

Re: [PATCH v3] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Sheng Yang
On Monday 28 June 2010 14:56:38 Avi Kivity wrote: On 06/28/2010 09:42 AM, Sheng Yang wrote: +static void wbinvd_ipi(void *garbage) +{ + wbinvd(); +} Like Jan mentioned, this is quite heavy. What about a clflush() loop instead? That may take more time, but at least it's

Re: [PATCH v3] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Avi Kivity
On 06/28/2010 09:56 AM, Sheng Yang wrote: On Monday 28 June 2010 14:56:38 Avi Kivity wrote: On 06/28/2010 09:42 AM, Sheng Yang wrote: +static void wbinvd_ipi(void *garbage) +{ + wbinvd(); +} Like Jan mentioned, this is quite heavy. What about a clflush() loop

RE: [PATCH v3] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Dong, Eddie
Avi Kivity wrote: On 06/28/2010 09:42 AM, Sheng Yang wrote: +static void wbinvd_ipi(void *garbage) +{ + wbinvd(); +} Like Jan mentioned, this is quite heavy. What about a clflush() loop instead? That may take more time, but at least it's preemptible. Of course, it isn't preemptible

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-28 Thread Milton Miller
On Sun Jun 27 around 19:33:52 EST 2010 Alexander Graf wrote: Am 27.06.2010 um 10:14 schrieb Avi Kivity avi at redhat.com: On 06/26/2010 02:25 AM, Alexander Graf wrote: + +PPC hypercalls +== + +The only viable ways to reliably get from guest context to host

Re: [PATCH v3] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Sheng Yang
On Monday 28 June 2010 15:08:56 Avi Kivity wrote: On 06/28/2010 09:56 AM, Sheng Yang wrote: On Monday 28 June 2010 14:56:38 Avi Kivity wrote: On 06/28/2010 09:42 AM, Sheng Yang wrote: +static void wbinvd_ipi(void *garbage) +{ + wbinvd(); +} Like Jan mentioned, this is quite

[PATCH 1/2] KVM Test: Update cmd() help function in kvm_monitor.py to support parameters.

2010-06-28 Thread Feng Yang
This function allow user send qmp command with parameters. e.g. balloon value=1073741824 Also log command to debug. Signed-off-by: Feng Yang fy...@redhat.com --- client/tests/kvm/kvm_monitor.py | 32 1 files changed, 24 insertions(+), 8 deletions(-) diff

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-28 Thread Alexander Graf
On 28.06.2010, at 09:18, Milton Miller wrote: On Sun Jun 27 around 19:33:52 EST 2010 Alexander Graf wrote: Am 27.06.2010 um 10:14 schrieb Avi Kivity avi at redhat.com: On 06/26/2010 02:25 AM, Alexander Graf wrote: + +PPC hypercalls +== + +The only viable ways to reliably

Re: [PATCH v3] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Avi Kivity
On 06/28/2010 10:41 AM, Sheng Yang wrote: Hm, the manual says (regarding clflush): Invalidates the cache line that contains the linear address specified with the source operand from all levels of the processor cache hierarchy (data and instruction). The invalidation is broadcast

Re: [PATCH v2 3/4] KVM: cleanup: remove kvm_get_dirty_log()

2010-06-28 Thread Takuya Yoshikawa
(2010/06/27 16:32), Avi Kivity wrote: On 06/25/2010 10:25 PM, Alexander Graf wrote: On 23.06.2010, at 08:01, Takuya Yoshikawa wrote: kvm_get_dirty_log() is a helper function for kvm_vm_ioctl_get_dirty_log() which is currently used by ia64 and ppc and the following is what it is doing: -

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-28 Thread Avi Kivity
On 06/28/2010 10:49 AM, Alexander Graf wrote: I don't believe we support the kernel actually doing a syscall to itself anymore, at least on powerpc. The callers call the underlying system call function, or kernel_thread. That said, I would suggest we allocate a syscall number for this, as it

Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-28 Thread Avi Kivity
On 06/28/2010 09:33 AM, Alexander Graf wrote: Could you do something similar in module_finalize() to patch loaded modules' .text sections? I could, but do we need it? I objdump -d | grep'ed all my modules and didn't find any need to do so. You mean even kvm.ko doesn't use

Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-28 Thread Alexander Graf
On 28.06.2010, at 10:15, Avi Kivity wrote: On 06/28/2010 09:33 AM, Alexander Graf wrote: Could you do something similar in module_finalize() to patch loaded modules' .text sections? I could, but do we need it? I objdump -d | grep'ed all my modules and didn't find any need to do

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Avi Kivity
On 06/26/2010 02:16 AM, Alexander Graf wrote: Currently the shadow paging code keeps an array of entries it knows about. Whenever the guest invalidates an entry, we loop through that entry, trying to invalidate matching parts. While this is a really simple implementation, it is probably the

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-28 Thread Avi Kivity
On 06/28/2010 11:21 AM, Alexander Graf wrote: The other alternative I'd see is to reuse an instruction that is not sc. We could for example pull the mfpvr trick again, but pass a different magic value in the register this time that tells the hypervisor this is a hypercall. Or we could

Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-28 Thread Avi Kivity
On 06/28/2010 11:23 AM, Alexander Graf wrote: You mean even kvm.ko doesn't use privileged instructions? It does, but I don't think it's worth speeding those up. There are only a couple. Most of the privileged instructions in PPC KVM are statically compiled into the kernel because we

[PATCH v4] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Sheng Yang
Some guest device driver may leverage the Non-Snoop I/O, and explicitly WBINVD or CLFLUSH to a RAM space. Since migration may occur before WBINVD or CLFLUSH, we need to maintain data consistency either by: 1: flushing cache (wbinvd) when the guest is scheduled out if there is no wbinvd exit, or 2:

Re: [PATCH v3] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Jan Kiszka
Dong, Eddie wrote: Avi Kivity wrote: On 06/28/2010 10:30 AM, Dong, Eddie wrote: Several milliseconds of non-responsiveness may not be acceptable for some applications. So I think queue_work_on() and a clflush loop is better than an IPI and wbinvd. Probably we should make it configurable.

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Alexander Graf
On 28.06.2010, at 10:28, Avi Kivity wrote: On 06/26/2010 02:16 AM, Alexander Graf wrote: Currently the shadow paging code keeps an array of entries it knows about. Whenever the guest invalidates an entry, we loop through that entry, trying to invalidate matching parts. While this is a

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Avi Kivity
On 06/28/2010 11:55 AM, Alexander Graf wrote: + +static inline u64 kvmppc_mmu_hash_pte(u64 eaddr) { + return hash_64(eaddr PTE_SIZE, HPTEG_HASH_BITS_PTE); +} + +static inline u64 kvmppc_mmu_hash_vpte(u64 vpage) { + return hash_64(vpage 0xfULL, HPTEG_HASH_BITS_VPTE); +}

Re: [PATCH v2 1/10] KVM: MMU: fix writable sync sp mapping

2010-06-28 Thread Avi Kivity
On 06/27/2010 10:59 AM, Xiao Guangrong wrote: Xiao Guangrong wrote: - /* -* Optimization: for pte sync, if spte was writable the hash -* lookup is unnecessary (and expensive). Write protection -* is responsibility of

Re: [Autotest] [PATCH 1/2] KVM Test: Update cmd() help function in kvm_monitor.py to support parameters.

2010-06-28 Thread Michael Goldish
On 06/28/2010 10:45 AM, Feng Yang wrote: This function allow user send qmp command with parameters. e.g. balloon value=1073741824 Also log command to debug. Signed-off-by: Feng Yang fy...@redhat.com --- client/tests/kvm/kvm_monitor.py | 32 1 files

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Alexander Graf
Am 28.06.2010 um 11:12 schrieb Avi Kivity a...@redhat.com: On 06/28/2010 11:55 AM, Alexander Graf wrote: + +static inline u64 kvmppc_mmu_hash_pte(u64 eaddr) { +return hash_64(eaddr PTE_SIZE, HPTEG_HASH_BITS_PTE); +} + +static inline u64 kvmppc_mmu_hash_vpte(u64 vpage) { +return

Re: [PATCH v4] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Avi Kivity
nOn 06/28/2010 11:42 AM, Sheng Yang wrote: Some guest device driver may leverage the Non-Snoop I/O, and explicitly WBINVD or CLFLUSH to a RAM space. Since migration may occur before WBINVD or CLFLUSH, we need to maintain data consistency either by: 1: flushing cache (wbinvd) when the guest is

Re: [PATCH v4] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Gleb Natapov
On Mon, Jun 28, 2010 at 12:27:22PM +0300, Avi Kivity wrote: nOn 06/28/2010 11:42 AM, Sheng Yang wrote: Some guest device driver may leverage the Non-Snoop I/O, and explicitly WBINVD or CLFLUSH to a RAM space. Since migration may occur before WBINVD or CLFLUSH, we need to maintain data

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Avi Kivity
On 06/28/2010 12:27 PM, Alexander Graf wrote: Am I looking at old code? Apparently. Check book3s_mmu_*.c I don't have that pattern. (another difference is using struct hlist_head instead of list_head, which I recommend since it saves space) Hrm. I thought about this quite a bit

Re: [PATCH v4] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Avi Kivity
On 06/28/2010 12:31 PM, Gleb Natapov wrote: On Mon, Jun 28, 2010 at 12:27:22PM +0300, Avi Kivity wrote: nOn 06/28/2010 11:42 AM, Sheng Yang wrote: Some guest device driver may leverage the Non-Snoop I/O, and explicitly WBINVD or CLFLUSH to a RAM space. Since migration may occur

Re: [PATCH v2 3/4] KVM: cleanup: remove kvm_get_dirty_log()

2010-06-28 Thread Avi Kivity
On 06/28/2010 11:14 AM, Takuya Yoshikawa wrote: Best to revert these patches and re-apply when fixed. Please revert. Sincerely sorry. I'll fix as soon as possible and re-submit when test on PPC gets OK. No problem, regressions happen all the time. Lucky Alex caught it so quickly. --

Re: [PATCH v2 2/10] KVM: MMU: fix conflict access permissions in direct sp

2010-06-28 Thread Avi Kivity
On 06/25/2010 03:05 PM, Xiao Guangrong wrote: In no-direct mapping, we mark sp is 'direct' when we mapping the guest's larger page, but its access is encoded form upper page-struct entire not include the last mapping, it will cause access conflict. For example, have this mapping: [W]

Re: [Autotest] [PATCH 1/2] KVM Test: Update cmd() help function in kvm_monitor.py to support parameters.

2010-06-28 Thread Feng Yang
- Michael Goldish mgold...@redhat.com wrote: From: Michael Goldish mgold...@redhat.com To: Feng Yang fy...@redhat.com Cc: autot...@test.kernel.org, kvm@vger.kernel.org Sent: Monday, June 28, 2010 5:18:29 PM GMT +08:00 Beijing / Chongqing / Hong Kong / Urumqi Subject: Re: [Autotest]

Re: [PATCH v2 1/10] KVM: MMU: fix writable sync sp mapping

2010-06-28 Thread Xiao Guangrong
Avi Kivity wrote: for_each_gfn_indirect_valid_sp(vcpu-kvm, s, gfn, node) { +if (!can_unsync) +return 1; + What if the page is already unsync? We don't need write protection in this case. Avi, The reason is when we sync children sps, we write-protected

Re: [PATCH v2 3/10] KVM: MMU: fix direct sp's access corruptted

2010-06-28 Thread Avi Kivity
On 06/25/2010 03:06 PM, Xiao Guangrong wrote: Consider using small page to fit guest's large page mapping: If the mapping is writable but the dirty flag is not set, we will find the read-only direct sp and setup the mapping, then if the write #PF occur, we will mark this mapping writable in the

Re: [PATCH v2 2/10] KVM: MMU: fix conflict access permissions in direct sp

2010-06-28 Thread Xiao Guangrong
Avi Kivity wrote: Looks good, but please split the cleanup from the fix (we'll want to backport the fix but not the cleanup). OK, will do it -- 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

Re: [PATCH v2 4/10] KVM: MMU: fix forgot to flush all vcpu's tlb

2010-06-28 Thread Avi Kivity
On 06/25/2010 03:06 PM, Xiao Guangrong wrote: After remove a rmap, we should flush all vcpu's tlb Signed-off-by: Xiao Guangrongxiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Alexander Graf
Avi Kivity wrote: On 06/28/2010 12:27 PM, Alexander Graf wrote: Am I looking at old code? Apparently. Check book3s_mmu_*.c I don't have that pattern. It's in this patch. +static void invalidate_pte(struct kvm_vcpu *vcpu, struct hpte_cache *pte) +{ + dprintk_mmu(KVM: Flushing SPT:

RE: [RFC PATCH v7 01/19] Add a new structure for skb buffer from external.

2010-06-28 Thread Xin, Xiaohui
-Original Message- From: Herbert Xu [mailto:herb...@gondor.apana.org.au] Sent: Sunday, June 27, 2010 2:15 PM To: Dong, Eddie Cc: Xin, Xiaohui; Stephen Hemminger; net...@vger.kernel.org; kvm@vger.kernel.org; linux-ker...@vger.kernel.org; m...@redhat.com; mi...@elte.hu;

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Avi Kivity
On 06/28/2010 12:55 PM, Alexander Graf wrote: Avi Kivity wrote: On 06/28/2010 12:27 PM, Alexander Graf wrote: Am I looking at old code? Apparently. Check book3s_mmu_*.c I don't have that pattern. It's in this patch. Yes. Silly me. +static void

Re: [RFC PATCH v7 01/19] Add a new structure for skb buffer from external.

2010-06-28 Thread Michael S. Tsirkin
On Mon, Jun 28, 2010 at 05:56:07PM +0800, Xin, Xiaohui wrote: -Original Message- From: Herbert Xu [mailto:herb...@gondor.apana.org.au] Sent: Sunday, June 27, 2010 2:15 PM To: Dong, Eddie Cc: Xin, Xiaohui; Stephen Hemminger; net...@vger.kernel.org; kvm@vger.kernel.org;

Re: [PATCH v2 3/10] KVM: MMU: fix direct sp's access corruptted

2010-06-28 Thread Xiao Guangrong
Avi Kivity wrote: Instead of adding a new bit, can you encode the protection in the direct sp's access bits? So we'll have one sp for read-only or writeable-but-not-dirty small pages, and another sp for writeable-and-dirty small pages. It looks like it can't solve all problems, it fix

[PATCHv2] vhost-net: add dhclient work-around from userspace

2010-06-28 Thread Michael S. Tsirkin
Userspace virtio server has the following hack so guests rely on it, and we have to replicate it, too: Use port number to detect incoming IPv4 DHCP response packets, and fill in the checksum for these. The issue we are solving is that on linux guests, some apps that use recvmsg with AF_PACKET

Re: [PATCH v2 3/10] KVM: MMU: fix direct sp's access corruptted

2010-06-28 Thread Avi Kivity
On 06/28/2010 01:02 PM, Xiao Guangrong wrote: Avi Kivity wrote: Instead of adding a new bit, can you encode the protection in the direct sp's access bits? So we'll have one sp for read-only or writeable-but-not-dirty small pages, and another sp for writeable-and-dirty small pages.

Re: [PATCH v2 7/10] KVM: MMU: introduce mmu_topup_memory_cache_atomic()

2010-06-28 Thread Avi Kivity
On 06/25/2010 03:06 PM, Xiao Guangrong wrote: Introduce mmu_topup_memory_cache_atomic(), it support topup memory cache in atomic context Can instead preallocate enough for all prefetches, isn't it simpler? -- error compiling committee.c: too many arguments to function -- To unsubscribe

Re: [PATCH v2 1/10] KVM: MMU: fix writable sync sp mapping

2010-06-28 Thread Avi Kivity
On 06/28/2010 12:40 PM, Xiao Guangrong wrote: Avi Kivity wrote: for_each_gfn_indirect_valid_sp(vcpu-kvm, s, gfn, node) { +if (!can_unsync) +return 1; + What if the page is already unsync? We don't need write protection in this case. Avi, The

Re: [PATCH v2 8/10] KVM: MMU: prefetch ptes when intercepted guest #PF

2010-06-28 Thread Marcelo Tosatti
On Fri, Jun 25, 2010 at 08:07:06PM +0800, Xiao Guangrong wrote: Support prefetch ptes when intercept guest #PF, avoid to #PF by later access If we meet any failure in the prefetch path, we will exit it and not try other ptes to avoid become heavy path Note: this speculative will mark page

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Alexander Graf
Avi Kivity wrote: On 06/28/2010 12:55 PM, Alexander Graf wrote: Avi Kivity wrote: On 06/28/2010 12:27 PM, Alexander Graf wrote: Am I looking at old code? Apparently. Check book3s_mmu_*.c I don't have that pattern. It's in this patch. Yes. Silly

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Avi Kivity
On 06/28/2010 04:25 PM, Alexander Graf wrote: Less and simpler code, better reporting through slabtop, less wastage of partially allocated slab pages. But it also means that one VM can spill the global slab cache and kill another VM's mm performance, no? What do you mean

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Alexander Graf
Avi Kivity wrote: On 06/28/2010 04:25 PM, Alexander Graf wrote: Less and simpler code, better reporting through slabtop, less wastage of partially allocated slab pages. But it also means that one VM can spill the global slab cache and kill another VM's mm performance, no?

[KVM-AUTOTEST PATCH] KVM test: Windows unattended_install: don't start the telnet service at startup

2010-06-28 Thread Michael Goldish
The telnet service isn't used by kvm-autotest (AFAIK) and may interfere with rss.exe (port 23). Signed-off-by: Michael Goldish mgold...@redhat.com --- client/tests/kvm/unattended/win2003-32.sif | 10 +++- client/tests/kvm/unattended/win2003-64.sif | 10 +++-

Re: [PATCHv2] vhost-net: add dhclient work-around from userspace

2010-06-28 Thread Michael S. Tsirkin
On Mon, Jun 28, 2010 at 01:08:07PM +0300, Michael S. Tsirkin wrote: Userspace virtio server has the following hack so guests rely on it, and we have to replicate it, too: Use port number to detect incoming IPv4 DHCP response packets, and fill in the checksum for these. The issue we are

Re: [PATCH] KVM: Simplify vcpu_enter_guest() mmu reload logic slightly

2010-06-28 Thread Marcelo Tosatti
On Wed, Jun 23, 2010 at 02:26:18PM +0300, Avi Kivity wrote: No need to reload the mmu in between two different vcpu-requests checks. kvm_mmu_reload() may trigger KVM_REQ_TRIPLE_FAULT, but that will be caught during atomic guest entry later. Signed-off-by: Avi Kivity a...@redhat.com ---

Re: [RFC] virtio: Support releasing lock during kick

2010-06-28 Thread Marcelo Tosatti
On Wed, Jun 23, 2010 at 10:24:02PM +0100, Stefan Hajnoczi wrote: The virtio block device holds a lock during I/O request processing. Kicking the virtqueue while the lock is held results in long lock hold times and increases contention for the lock. This patch modifies virtqueue_kick() to

[PATCH 7/7] kvm: Fix cpu_is_bsp() compilation warning

2010-06-28 Thread Marcelo Tosatti
From: Sheng Yang sh...@linux.intel.com Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Avi Kivity a...@redhat.com --- target-i386/kvm.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 576d3b5..a33d2fa 100644 ---

[PATCH 0/7] [PULL] qemu-kvm.git uq/master queue

2010-06-28 Thread Marcelo Tosatti
The following changes since commit 4972d592113c627d4b6ea1be5c94a85b56099afd: Stefan Weil (1): win32: Add missing function ffs are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master Andre Przywara (1): fix CPUID vendor override Jan

[PATCH 6/7] kvm: init mp_state

2010-06-28 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com Signed-off-by: Avi Kivity a...@redhat.com --- target-i386/kvm.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 436c0c4..576d3b5 100644 --- a/target-i386/kvm.c +++

[PATCH 3/7] kvm: Extend kvm_arch_get_supported_cpuid() to support index

2010-06-28 Thread Marcelo Tosatti
From: Sheng Yang sh...@linux.intel.com Would use it later for XSAVE related CPUID. Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- kvm.h |2 +- target-i386/kvm.c | 19 +++ 2 files changed, 12 insertions(+),

[PATCH 1/7] kvm: Switch kvm_update_guest_debug to run_on_cpu

2010-06-28 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com Guest debugging under KVM is currently broken once io-threads are enabled. Easily fixable by switching the fake on_vcpu to the real run_on_cpu implementation. Signed-off-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Avi Kivity a...@redhat.com ---

[PATCH 2/7] fix CPUID vendor override

2010-06-28 Thread Marcelo Tosatti
From: Andre Przywara andre.przyw...@amd.com the meaning of vendor_override is actually the opposite of how it is currently used :-( Fix it to allow KVM to export the non-native CPUID vendor if explicitly requested by the user. The intended behavior is: With TCG: - always inject the configured

[PATCH 5/7] kvm: Enable XSAVE live migration support

2010-06-28 Thread Marcelo Tosatti
From: Sheng Yang sh...@linux.intel.com Signed-off-by: Sheng Yang sh...@linux.intel.com Signed-off-by: Marcelo Tosatti mtosa...@redhat.com --- kvm-all.c | 21 +++ kvm.h |2 + target-i386/cpu.h |7 ++- target-i386/kvm.c | 139

Re: [PATCH 0/3][RFC] NUMA: add host side pinning

2010-06-28 Thread Anthony Liguori
On 06/24/2010 06:12 AM, Avi Kivity wrote: On 06/24/2010 01:58 PM, Andre Przywara wrote: So who would create the /dev/shm/nodeXX files? Currently it is QEMU. It creates a somewhat unique filename, opens and unlinks it. The difference would be to name the file after the option and to not

Re: [PATCH 0/3][RFC] NUMA: add host side pinning

2010-06-28 Thread Anthony Liguori
On 06/24/2010 06:42 AM, Avi Kivity wrote: On 06/24/2010 02:34 PM, Andre Przywara wrote: Non-anonymous memory doesn't work well with ksm and transparent hugepages. Is it possible to use anonymous memory rather than file backed? I'd prefer non-file backed, too. But that is how the current

Re: [PATCH 0/3][RFC] NUMA: add host side pinning

2010-06-28 Thread Alexander Graf
Anthony Liguori wrote: On 06/24/2010 06:42 AM, Avi Kivity wrote: On 06/24/2010 02:34 PM, Andre Przywara wrote: Non-anonymous memory doesn't work well with ksm and transparent hugepages. Is it possible to use anonymous memory rather than file backed? I'd prefer non-file backed, too. But

Re: [PATCH] vhost: break out of polling loop on error

2010-06-28 Thread Sridhar Samudrala
On Sun, 2010-06-27 at 11:59 +0300, Michael S. Tsirkin wrote: When ring parsing fails, we currently handle this as ring empty condition. This means that we enable kicks and recheck ring empty: if this not empty, we re-start polling which of course will fail again. Instead, let's return a

Re: [PATCH] vhost: break out of polling loop on error

2010-06-28 Thread Michael S. Tsirkin
On Mon, Jun 28, 2010 at 10:11:43AM -0700, Sridhar Samudrala wrote: On Sun, 2010-06-27 at 11:59 +0300, Michael S. Tsirkin wrote: When ring parsing fails, we currently handle this as ring empty condition. This means that we enable kicks and recheck ring empty: if this not empty, we re-start

Re: random crash in post_kvm_run()

2010-06-28 Thread Brian Jackson
On Monday, June 28, 2010 12:28:52 pm BuraphaLinux Server wrote: Hello, I have tried qemu_kvm 0.12.4 release and also git from about 1/2 an hour ago. In both cases, I crash in the post_kvm_run() function on the line about: pthread_mutex_lock(qemu_mutex); The command I use to run

KVM Call agenda for June 29

2010-06-28 Thread Juan Quintela
Please send in any agenda items you are interested in covering. If we have a lack of agenda items I'll cancel the week's call. After last week debacle, I will wait until 10 mins before call to cancel it. thanks, Juan. -- To unsubscribe from this list: send the line unsubscribe kvm in the body

Re: [Qemu-devel] [PATCH 0/7] [PULL] qemu-kvm.git uq/master queue

2010-06-28 Thread Anthony Liguori
On 06/28/2010 11:14 AM, Marcelo Tosatti wrote: The following changes since commit 4972d592113c627d4b6ea1be5c94a85b56099afd: Stefan Weil (1): win32: Add missing function ffs are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master

Re: [PATCH] qemu-kvm tests: Create make target for install tests

2010-06-28 Thread Marcelo Tosatti
On Thu, Jun 24, 2010 at 08:29:51PM -0300, Lucas Meneghel Rodrigues wrote: In order to make it convenient to run unit tests on KVM autotest, add rules to install the flat files to $(PREFIX)/share/qemu/tests. Also, add a unittests.cfg file, a simple .ini file that contains unittest

Re: [PATCHv2] make-release: fix mtime on rhel6 beta

2010-06-28 Thread Marcelo Tosatti
On Thu, Jun 24, 2010 at 08:19:02PM +0300, Michael S. Tsirkin wrote: With recent git versions (like one in rhel6 beta), git prints out tag info in addition to requested format, if passed a tag name. This breaks make-release. To get just the time as we want, we need to pass something that is

Re: [PATCHv2] vhost-net: add dhclient work-around from userspace

2010-06-28 Thread Sridhar Samudrala
On Mon, 2010-06-28 at 13:08 +0300, Michael S. Tsirkin wrote: Userspace virtio server has the following hack so guests rely on it, and we have to replicate it, too: Use port number to detect incoming IPv4 DHCP response packets, and fill in the checksum for these. The issue we are solving

Re: kvm networking part last

2010-06-28 Thread David S. Ahern
On 06/28/10 16:26, SuNeEl wrote: I have been trying desperately to achieve virtual networking with kvm, but = some how I failed each time.. rather lot of unclear tutorial using differen= t methods achieving common goals made me confuse like bridging, vmnet, tun,= etc etc routing ,iptable

Re: [PATCH v2 3/10] KVM: MMU: fix direct sp's access corruptted

2010-06-28 Thread Xiao Guangrong
Avi Kivity wrote: On 06/28/2010 01:02 PM, Xiao Guangrong wrote: Avi Kivity wrote: Instead of adding a new bit, can you encode the protection in the direct sp's access bits? So we'll have one sp for read-only or writeable-but-not-dirty small pages, and another sp for

Re: [PATCH v2 1/10] KVM: MMU: fix writable sync sp mapping

2010-06-28 Thread Xiao Guangrong
Avi Kivity wrote: I think I see. So, after A, the pages are write protected, but are still marked as unsync. In B, we're testing SP2-unsync, which we plan to sync soon, but haven't yet. So the test for s-unsync is incorrect. Right. So the patch is right. Thanks for the

Re: [KVM-AUTOTEST PATCH] KVM test: Windows unattended_install: don't start the telnet service at startup

2010-06-28 Thread Chen Cao
On Mon, Jun 28, 2010 at 05:54:18PM +0300, Michael Goldish wrote: The telnet service isn't used by kvm-autotest (AFAIK) and may interfere with rss.exe (port 23). Michael, I think it is better to leave the port 23 (and also 22) alone, people may want to use both telnet (e.g. telnet is

[PATCH v5] KVM: VMX: Execute WBINVD to keep data consistency with assigned devices

2010-06-28 Thread Sheng Yang
Some guest device driver may leverage the Non-Snoop I/O, and explicitly WBINVD or CLFLUSH to a RAM space. Since migration may occur before WBINVD or CLFLUSH, we need to maintain data consistency either by: 1: flushing cache (wbinvd) when the guest is scheduled out if there is no wbinvd exit, or 2:

KVM call agenda for June 29

2010-06-28 Thread Chris Wright
Please send in any agenda items you are interested in covering. If we have a lack of agenda items I'll cancel the week's call. thanks, -chris -- 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

KVM + VTd on a DX58SO reports No IOMMU found.

2010-06-28 Thread ewheeler
Hello, I have been scouring mailing lists, the wiki, and talked with iggy on freenode/#kvm who suggested that I ask on the list. KVM reports that I do not have an IOMMU, however, dmesg reports both DMAR and IOMMU. In addition, I know that this board supports VT-d. Something of note, ldd

Re: [PATCH] device-assignment: Rework name of assigned pci device

2010-06-28 Thread Markus Armbruster
Hidetoshi Seto seto.hideto...@jp.fujitsu.com writes: Hao, Xudong xudong@intel.com writes: When assign one PCI device, qemu fail to parse the command line: qemu-system_x86 -smp 2 -m 1024 -hda /path/to/img -pcidevice host=00:19.0 Error: qemu-system-x86_64: Parameter 'id' expects an

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-28 Thread Milton Miller
On Sun Jun 27 around 19:33:52 EST 2010 Alexander Graf wrote: Am 27.06.2010 um 10:14 schrieb Avi Kivity avi at redhat.com: On 06/26/2010 02:25 AM, Alexander Graf wrote: + +PPC hypercalls +== + +The only viable ways to reliably get from guest context to host

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-28 Thread Alexander Graf
On 28.06.2010, at 09:18, Milton Miller wrote: On Sun Jun 27 around 19:33:52 EST 2010 Alexander Graf wrote: Am 27.06.2010 um 10:14 schrieb Avi Kivity avi at redhat.com: On 06/26/2010 02:25 AM, Alexander Graf wrote: + +PPC hypercalls +== + +The only viable ways to reliably

Re: [PATCH v2 3/4] KVM: cleanup: remove kvm_get_dirty_log()

2010-06-28 Thread Takuya Yoshikawa
(2010/06/27 16:32), Avi Kivity wrote: On 06/25/2010 10:25 PM, Alexander Graf wrote: On 23.06.2010, at 08:01, Takuya Yoshikawa wrote: kvm_get_dirty_log() is a helper function for kvm_vm_ioctl_get_dirty_log() which is currently used by ia64 and ppc and the following is what it is doing: -

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-28 Thread Avi Kivity
On 06/28/2010 10:49 AM, Alexander Graf wrote: I don't believe we support the kernel actually doing a syscall to itself anymore, at least on powerpc. The callers call the underlying system call function, or kernel_thread. That said, I would suggest we allocate a syscall number for this, as it

Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-28 Thread Avi Kivity
On 06/28/2010 09:33 AM, Alexander Graf wrote: Could you do something similar in module_finalize() to patch loaded modules' .text sections? I could, but do we need it? I objdump -d | grep'ed all my modules and didn't find any need to do so. You mean even kvm.ko doesn't use

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-28 Thread Alexander Graf
On 28.06.2010, at 10:13, Avi Kivity wrote: On 06/28/2010 10:49 AM, Alexander Graf wrote: I don't believe we support the kernel actually doing a syscall to itself anymore, at least on powerpc. The callers call the underlying system call function, or kernel_thread. That said, I would

Re: [PATCH 26/26] KVM: PPC: Add Documentation about PV interface

2010-06-28 Thread Avi Kivity
On 06/28/2010 11:21 AM, Alexander Graf wrote: The other alternative I'd see is to reuse an instruction that is not sc. We could for example pull the mfpvr trick again, but pass a different magic value in the register this time that tells the hypervisor this is a hypercall. Or we could

Re: [PATCH 18/26] KVM: PPC: KVM PV guest stubs

2010-06-28 Thread Avi Kivity
On 06/28/2010 11:23 AM, Alexander Graf wrote: You mean even kvm.ko doesn't use privileged instructions? It does, but I don't think it's worth speeding those up. There are only a couple. Most of the privileged instructions in PPC KVM are statically compiled into the kernel because we

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Alexander Graf
On 28.06.2010, at 10:28, Avi Kivity wrote: On 06/26/2010 02:16 AM, Alexander Graf wrote: Currently the shadow paging code keeps an array of entries it knows about. Whenever the guest invalidates an entry, we loop through that entry, trying to invalidate matching parts. While this is a

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Avi Kivity
On 06/28/2010 11:55 AM, Alexander Graf wrote: + +static inline u64 kvmppc_mmu_hash_pte(u64 eaddr) { + return hash_64(eaddr PTE_SIZE, HPTEG_HASH_BITS_PTE); +} + +static inline u64 kvmppc_mmu_hash_vpte(u64 vpage) { + return hash_64(vpage 0xfULL, HPTEG_HASH_BITS_VPTE); +}

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Alexander Graf
Avi Kivity wrote: On 06/28/2010 12:27 PM, Alexander Graf wrote: Am I looking at old code? Apparently. Check book3s_mmu_*.c I don't have that pattern. It's in this patch. +static void invalidate_pte(struct kvm_vcpu *vcpu, struct hpte_cache *pte) +{ + dprintk_mmu(KVM: Flushing SPT:

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Avi Kivity
On 06/28/2010 12:55 PM, Alexander Graf wrote: Avi Kivity wrote: On 06/28/2010 12:27 PM, Alexander Graf wrote: Am I looking at old code? Apparently. Check book3s_mmu_*.c I don't have that pattern. It's in this patch. Yes. Silly me. +static void

Re: [PATCH] KVM: PPC: Add generic hpte management functions

2010-06-28 Thread Alexander Graf
Avi Kivity wrote: On 06/28/2010 12:55 PM, Alexander Graf wrote: Avi Kivity wrote: On 06/28/2010 12:27 PM, Alexander Graf wrote: Am I looking at old code? Apparently. Check book3s_mmu_*.c I don't have that pattern. It's in this patch. Yes. Silly