Re: [PATCH -v3] Monitor command: x-gpa2hva, translate guest physical address to host virtual address

2010-11-19 Thread Huang Ying
On Tue, 2010-11-16 at 10:23 +0800, Huang Ying wrote: Author: Max Asbock masb...@linux.vnet.ibm.com Add command x-gpa2hva to translate guest physical address to host virtual address. Because gpa to hva translation is not consistent, so this command is only used for debugging. The x-gpa2hva

Re: [RFC PATCH 2/2] KVM: selective write protection using dirty bitmap

2010-11-19 Thread Takuya Yoshikawa
(2010/11/18 22:06), Avi Kivity wrote: On 11/18/2010 07:15 AM, Takuya Yoshikawa wrote: We can also use this to selectively write protect pages to reduce unwanted page faults in the future. Looks like a good approach. Any measurements? OK, I'll do some tests to select a right approach.

[PATCH v3 1/6] KVM: MMU: fix forgot flush tlbs on sync_page path

2010-11-19 Thread Xiao Guangrong
We should flush all tlbs after drop spte on sync_page path since: Quote from Avi: | sync_page | drop_spte | kvm_mmu_notifier_invalidate_page | kvm_unmap_rmapp | spte doesn't exist - no flush | page is freed | guest can write into freed page? Signed-off-by: Xiao Guangrong

[PATCH v3 2/6] KVM: MMU: don't drop spte if overwrite it from W to RO

2010-11-19 Thread Xiao Guangrong
We just need flush tlb if overwrite a writable spte with a read-only one. And we should move this operation to set_spte() for sync_page path Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c | 20 +--- 1 files changed, 9 insertions(+), 11

[PATCH v3 3/6] KVM: MMU: rename 'reset_host_protection' to 'host_writable'

2010-11-19 Thread Xiao Guangrong
From: Lai Jiangshan la...@cn.fujitsu.com Rename it to fit its sense better Signed-off-by: Lai Jiangshan la...@cn.fujitsu.com Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |8 arch/x86/kvm/paging_tmpl.h | 10 +- 2 files changed,

[PATCH v3 4/6] KVM: MMU: remove 'clear_unsync' parameter

2010-11-19 Thread Xiao Guangrong
Remove it since we can jude it by using sp-unsync Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/include/asm/kvm_host.h |2 +- arch/x86/kvm/mmu.c |8 arch/x86/kvm/paging_tmpl.h |5 ++--- 3 files changed, 7 insertions(+), 8

[PATCH v3 5/6] KVM: MMU: abstract invalid guest pte mapping

2010-11-19 Thread Xiao Guangrong
Introduce a common function to map invalid gpte Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com --- arch/x86/kvm/mmu.c |3 -- arch/x86/kvm/paging_tmpl.h | 71 +++- 2 files changed, 37 insertions(+), 37 deletions(-) diff --git

[PATCH v3 6/6] KVM: MMU: delay flush all tlbs on sync_page path

2010-11-19 Thread Xiao Guangrong
Quote from Avi: | I don't think we need to flush immediately; set a tlb dirty bit somewhere | that is cleareded when we flush the tlb. kvm_mmu_notifier_invalidate_page() | can consult the bit and force a flush if set. Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com ---

Re: ppc32 build failed

2010-11-19 Thread Alexander Graf
On 19.11.2010, at 07:24, Takuya Yoshikawa wrote: (2010/11/19 15:01), Yang Rui Rui wrote: Hi, I searched the archive found some discutions about this, not fixed yet? could someone tell, is g4 kvm available now? Hi, (added kvm-ppc to Cc) I'm using g4 (Mac mini box) to run KVM. -

Re: seabios 0.6.1 regression

2010-11-19 Thread Avi Kivity
On 11/16/2010 04:17 PM, Alexander Graf wrote: On 16.11.2010, at 15:15, Avi Kivity wrote: On 11/16/2010 03:19 PM, Alexander Graf wrote: Rewriting it to use inb / stos works (jecxz ; insb; loop doesn't) so it looks like a kernel bug in insb emulation. Turns out is was a

Re: [PATCH v3 6/6] KVM: MMU: delay flush all tlbs on sync_page path

2010-11-19 Thread Marcelo Tosatti
On Fri, Nov 19, 2010 at 05:05:38PM +0800, Xiao Guangrong wrote: Quote from Avi: | I don't think we need to flush immediately; set a tlb dirty bit somewhere | that is cleareded when we flush the tlb. kvm_mmu_notifier_invalidate_page() | can consult the bit and force a flush if set.

Re: [PATCH] kvm: fast-path msi injection with irqfd

2010-11-19 Thread Marcelo Tosatti
On Thu, Nov 18, 2010 at 07:09:08PM +0200, Michael S. Tsirkin wrote: Store irq routing table pointer in the irqfd object, and use that to inject MSI directly without bouncing out to a kernel thread. While we touch this structure, rearrange irqfd fields to make fastpath better packed for

Re: [PATCH] kvm: fast-path msi injection with irqfd

2010-11-19 Thread Gregory Haskins
On 11/19/2010 at 10:54 AM, in message 20101119155427.ga20...@amt.cnet, Marcelo Tosatti mtosa...@redhat.com wrote: On Thu, Nov 18, 2010 at 07:09:08PM +0200, Michael S. Tsirkin wrote: Store irq routing table pointer in the irqfd object, and use that to inject MSI directly without bouncing out

limit conectivity of a VM

2010-11-19 Thread hadi golestani
Hello, I need to limit the port speed of a VM to 10 mbps ( or 5 mbps if it's possible). What's the way of doing so? Regards -- 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: limit conectivity of a VM

2010-11-19 Thread Javier Guerra Giraldez
On Fri, Nov 19, 2010 at 2:47 PM, hadi golestani hadi.golest...@gmail.com wrote: Hello, I need to limit the port speed of a VM to 10 mbps ( or 5 mbps if it's possible). What's the way of doing so? tc check http://lartc.org/howto/lartc.qdisc.html -- Javier -- To unsubscribe from this list:

[RFC PATCH] kvm: PCI error stub driver

2010-11-19 Thread Etienne Martineau
When a devices is driven by userspace (like in the cases of KVM's device assignment) it's essential to provide proper PCI error handling support to the corresponding driver. Implementation == The PCI error stub driver is implemented on top of the uio framework. PCI errors are

[PATCH v3 0/9] PCI capability and device assignment improvements

2010-11-19 Thread Alex Williamson
v3: - Rework to avoid introducing conflicts with qemu.git hw/pci - Drop capability lookup table - Add back minimal device assignment PM, EXP, X, VPD, VNDR capabilities This version should do a much better job at not introducing new differences between qemu-kvm.git and qemu.git hw/pci. The

[PATCH v3 1/9] pci: pci_default_cap_write_config ignores wmask

2010-11-19 Thread Alex Williamson
Make use of wmask, just like the rest of config space. This duplicates code in pci_default_write_config, but we plan to get rid of this function anyway, so avoid the code churn. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/pci.c | 19 --- 1 files changed,

[PATCH v3 2/9] pci: Remove pci_enable_capability_support()

2010-11-19 Thread Alex Williamson
This interface doesn't make much sense, adding a capability can take care of everything, just provide a means to register capability read/write handlers. Device assignment does it's own thing, so requires a couple ugly hacks that will be cleaned by subsequent patches. Signed-off-by: Alex

[PATCH v3 3/9] device-assignment: Use PCI capabilities support

2010-11-19 Thread Alex Williamson
Convert to use common pci_add_capabilities() rather than creating our own mess. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c | 112 +++- 1 files changed, 63 insertions(+), 49 deletions(-) diff --git

[PATCH v3 4/9] pci: Replace used bitmap with config byte map

2010-11-19 Thread Alex Williamson
Capabilities are allocated in bytes, so we can track both whether a byte is used and by what capability in the same structure. Remove pci_reserve_capability() as there are no users, remove pci_access_cap_config() since it's now a trivial lookup. Signed-off-by: Alex Williamson

[PATCH v3 5/9] pci: Remove cap.length, cap.start, cap.supported

2010-11-19 Thread Alex Williamson
Capabilities aren't required to be contiguous, so cap.length never really made much sense. Likewise, cap.start is mostly meaningless too. Both of these are better served by the capability map. We can also get rid of cap.supported, since it's really now unused and redundant with flag in the

[PATCH v3 6/9] device-assignment: Move PCI capabilities to match physical hardware

2010-11-19 Thread Alex Williamson
Now that common PCI code doesn't have a hangup on capabilities being contiguous, move assigned device capabilities to match their offset on physical hardware. This helps for drivers that assume a capability configuration and don't bother searching. We can also remove several calls to

[PATCH v3 7/9] pci: Remove capability specific handlers

2010-11-19 Thread Alex Williamson
Drivers can break these out on their own if they need to. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c | 16 - hw/pci.c | 61 ++-- hw/pci.h | 19 --- 3

[PATCH v3 8/9] device-assignment: Make use of config_map

2010-11-19 Thread Alex Williamson
We can figure out the capability being touched much more quickly and efficiently with the config_map. Use it. Signed-off-by: Alex Williamson alex.william...@redhat.com --- hw/device-assignment.c | 32 +++- 1 files changed, 19 insertions(+), 13 deletions(-) diff

[PATCH v3 9/9] device-assignment: pass through and stub more PCI caps

2010-11-19 Thread Alex Williamson
Some drivers depend on finding capabilities like power management, PCI express/X, vital product data, or vendor specific fields. Now that we have better capability support, we can pass more of these tables through to the guest. Note that VPD and VNDR are direct pass through capabilies, the rest

Re: [PATCH v2] device-assignment: register a reset function

2010-11-19 Thread Alex Williamson
On Tue, 2010-11-16 at 15:05 +0100, Bernhard Kohl wrote: This is necessary because during reboot of a VM the assigned devices continue DMA transfers which causes memory corruption. Signed-off-by: Thomas Ostler thomas.ost...@nsn.com Signed-off-by: Bernhard Kohl bernhard.k...@nsn.com ---

Re: limit conectivity of a VM

2010-11-19 Thread Markus Breitländer
Hello, you may also have a look at VDE (Virtual Distributed Ethernet). You can connect your VMs to virtual switches and then use the tool 'wirefilter'[1] to modify different attributes (bandwidth, loss, delay, etc) of the virtual network. [1] http://wiki.virtualsquare.org/wiki/index.php/VDE

Re: [PATCHv4 15/15] Pass boot device list to firmware.

2010-11-19 Thread Kevin O'Connor
On Tue, Nov 16, 2010 at 09:22:45AM +0200, Gleb Natapov wrote: On Mon, Nov 15, 2010 at 09:52:19PM -0500, Kevin O'Connor wrote: I also have an ulterior motive here. If the boot order is exposed as a newline separated list via an entry in QEMU_CFG_FILE_DIR, then this becomes free for coreboot

Re: [PATCHv4 15/15] Pass boot device list to firmware.

2010-11-19 Thread Gleb Natapov
On Mon, Nov 15, 2010 at 08:29:24PM +, Blue Swirl wrote: 2010/11/15 Gleb Natapov g...@redhat.com: On Sun, Nov 14, 2010 at 10:50:13PM +, Blue Swirl wrote: On Sun, Nov 14, 2010 at 3:39 PM, Gleb Natapov g...@redhat.com wrote: Signed-off-by: Gleb Natapov g...@redhat.com ---