Re: [PATCH 3/9] kvm tools: Allow giving instance names

2011-06-30 Thread Pekka Enberg
On Wed, 29 Jun 2011, Sasha Levin wrote: This will allow tracking instance names and sending commands to specific instances if multiple instances are running. Signed-off-by: Sasha Levin I skipped this and related patches because I really would like to hear what Ingo thinks about the '/var/run

Re: [PATCH v2] block/raw-posix: Linux compat-ioctl warning workaround

2011-06-30 Thread Kevin Wolf
Am 29.06.2011 16:25, schrieb Johannes Stezenbach: > On Linux x86_64 host with 32bit userspace, running > qemu or even just "qemu-img create -f qcow2 some.img 1G" > causes a kernel warning: > > ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(5326){t:'S';sz:0} > arg(7fff) on some.img > ioctl3

[PATCH v3 01/19] KVM: MMU: fix walking shadow page table

2011-06-30 Thread Xiao Guangrong
Properly check the last mapping, and do not walk to the next level if last spte is met Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c |9 + 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index da0f3b0..03323dc 100644 --- a

[PATCH v3 02/19] KVM: MMU: do not update slot bitmap if spte is nonpresent

2011-06-30 Thread Xiao Guangrong
Set slot bitmap only if the spte is present Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 15 +++ 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 03323dc..02c839f 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kv

[PATCH v3 03/19] KVM: x86: introduce vcpu_mmio_gva_to_gpa to cleanup the code

2011-06-30 Thread Xiao Guangrong
Introduce vcpu_mmio_gva_to_gpa to translate the gva to gpa, we can use it to cleanup the code between read emulation and write emulation Signed-off-by: Xiao Guangrong --- arch/x86/kvm/x86.c | 42 +++--- 1 files changed, 31 insertions(+), 11 deletions(-) dif

[PATCH v3 04/19] KVM: MMU: cache mmio info on page fault path

2011-06-30 Thread Xiao Guangrong
If the page fault is caused by mmio, we can cache the mmio info, later, we do not need to walk guest page table and quickly know it is a mmio fault while we emulate the mmio instruction Signed-off-by: Xiao Guangrong --- arch/x86/include/asm/kvm_host.h |5 + arch/x86/kvm/mmu.c

[PATCH v3 05/19] KVM: MMU: optimize to handle dirty bit

2011-06-30 Thread Xiao Guangrong
If dirty bit is not set, we can make the pte access read-only to avoid handing dirty bit everywhere Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 13 +-- arch/x86/kvm/paging_tmpl.h | 46 ++- 2 files changed, 25 insertions(+), 3

[PATCH v3 06/19] KVM: MMU: cleanup for FNAME(fetch)

2011-06-30 Thread Xiao Guangrong
gw->pte_access is the final access permission, since it is unified with gw->pt_access when we walked guest page table: FNAME(walk_addr_generic): pte_access = pt_access & FNAME(gpte_access)(vcpu, pte, true); Signed-off-by: Xiao Guangrong --- arch/x86/kvm/paging_tmpl.h |4 ++-- 1 file

[PATCH v3 07/19] KVM: MMU: rename 'pt_write' to 'emulate'

2011-06-30 Thread Xiao Guangrong
If 'pt_write' is true, we need to emulate the fault. And in later patch, we need to emulate the fault even though it is not a pt_write event, so rename it to better fit the meaning Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 10 +- arch/x86/kvm/paging_tmpl.h | 16 +

[PATCH v3 08/19] KVM: MMU: count used shadow pages on prepareing path

2011-06-30 Thread Xiao Guangrong
Move counting used shadow pages from commiting path to preparing path to reduce tlb flush on some paths Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index a62ba46..91

[PATCH v3 09/19] KVM: MMU: split kvm_mmu_free_page

2011-06-30 Thread Xiao Guangrong
Split kvm_mmu_free_page to kvm_mmu_isolate_page and kvm_mmu_free_page One is used to remove the page from cache under mmu lock and the other is used to free page table out of mmu lock Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 21 ++--- 1 files changed, 18 insertio

[PATCH v3 10/19] KVM: MMU: remove bypass_guest_pf

2011-06-30 Thread Xiao Guangrong
The idea is from Avi: | Maybe it's time to kill off bypass_guest_pf=1. It's not as effective as | it used to be, since unsync pages always use shadow_trap_nonpresent_pte, | and since we convert between the two nonpresent_ptes during sync and unsync. Signed-off-by: Xiao Guangrong --- Documentati

[PATCH v3 11/19] KVM: MMU: filter out the mmio pfn from the fault pfn

2011-06-30 Thread Xiao Guangrong
If the page fault is caused by mmio, the gfn can not be found in memslots, and 'bad_pfn' is returned on gfn_to_hva path, so we can use 'bad_pfn' to identify the mmio page fault. And, to clarify the meaning of mmio pfn, we return fault page instead of bad page when the gfn is not allowd to prefetch

[PATCH v3 12/19] KVM: MMU: abstract some functions to handle fault pfn

2011-06-30 Thread Xiao Guangrong
Introduce handle_abnormal_pfn to handle fault pfn on page fault path, introduce mmu_invalid_pfn to handle fault pfn on prefetch path It is the preparing work for mmio page fault support Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 47 -

[PATCH v3 13/19] KVM: MMU: introduce the rules to modify shadow page table

2011-06-30 Thread Xiao Guangrong
Introduce some interfaces to modify spte as linux kernel does: - mmu_spte_clear_track_bits, it set the spte from present to nonpresent, and track the stat bits(accessed/dirty) of spte - mmu_spte_clear_no_track, the same as mmu_spte_clear_track_bits except tracking the stat bits - mmu_spte_set,

[PATCH v3 15/19] KVM: MMU: do not need atomicly to set/clear spte

2011-06-30 Thread Xiao Guangrong
Now, the spte is just from nonprsent to present or present to nonprsent, so we can use some trick to set/clear spte non-atomicly as linux kernel does Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 82 +++ 1 files changed, 69 insertions(+)

[PATCH v3 14/19] KVM: MMU: clean up spte updating and clearing

2011-06-30 Thread Xiao Guangrong
Clean up the code between mmu_spte_clear_* and mmu_spte_update Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c | 75 +++- 1 files changed, 39 insertions(+), 36 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 48c0a45.

[PATCH v3 16/19] KVM: MMU: lockless walking shadow page table

2011-06-30 Thread Xiao Guangrong
Use rcu to protect shadow pages table to be freed, so we can safely walk it, it should run fastly and is needed by mmio page fault Signed-off-by: Xiao Guangrong --- arch/x86/include/asm/kvm_host.h |8 +++ arch/x86/kvm/mmu.c | 132 --- 2 files

[PATCH v3 17/19] KVM: MMU: reorganize struct kvm_shadow_walk_iterator

2011-06-30 Thread Xiao Guangrong
Reorganize it for good using the cache Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index cf02f0e..2ecbffb 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -172,8

[PATCH v3 18/19] KVM: MMU: mmio page fault support

2011-06-30 Thread Xiao Guangrong
The idea is from Avi: | We could cache the result of a miss in an spte by using a reserved bit, and | checking the page fault error code (or seeing if we get an ept violation or | ept misconfiguration), so if we get repeated mmio on a page, we don't need to | search the slot list/tree. | (https://

[PATCH v3 19/19] KVM: MMU: trace mmio page fault

2011-06-30 Thread Xiao Guangrong
Add tracepoints to trace mmio page fault Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c |5 arch/x86/kvm/mmutrace.h | 48 +++ arch/x86/kvm/trace.h| 23 ++ arch/x86/kvm/x86.c |5 +++- 4 files chan

Re: [PATCH 3/9] kvm tools: Allow giving instance names

2011-06-30 Thread Avi Kivity
On 06/30/2011 10:53 AM, Pekka Enberg wrote: On Wed, 29 Jun 2011, Sasha Levin wrote: This will allow tracking instance names and sending commands to specific instances if multiple instances are running. Signed-off-by: Sasha Levin I skipped this and related patches because I really would like

Re: [PATCH v3 2/9] KVM-HDR Add constant to represent KVM MSRs enabled bit

2011-06-30 Thread Avi Kivity
On 06/30/2011 12:56 AM, Eric B Munson wrote: My mail provider seems to have dropped patch 1 of the series so I can't reply directly to it, please add my Tested-by there as well. How did you test it then? -- error compiling committee.c: too many arguments to function -- To unsubscribe from thi

Re: [RFC PATCH 17/17] KVM: PPC: Add an ioctl for userspace to select which platform to emulate

2011-06-30 Thread Avi Kivity
On 06/29/2011 02:58 PM, Josh Boyer wrote: >> This makes me wonder if a similar thing might eventually be usable for >> running an i686 or x32 guest on an x86_64 KVM host. I have no idea if >> that is even theoretically possible, but if it is it might be better to >> rename the ioctl to be ar

[PATCH v2 00/31] Implement user mode network for kvm tools

2011-06-30 Thread Asias He
This patch series implement user mode network for kvm tools. This is a from-scratch, lightweight, 1K LOC, implementation of the {TCP,UDP}/IP protocal stack in user mode. Usr mode network enables plain user without special privileges to have network access in guest OS. Zero-configuration is needed

[PATCH v2 02/31] kvm tools: Add ARP support for uip

2011-06-30 Thread Asias He
- Introduce struct uip_arp to present ARP package - uip_tx_do_arp() Clone incoming ARP ethernet frame, if ARP is requesting host IP address, tell guest host MAC address. Signed-off-by: Asias He --- tools/kvm/Makefile |1 + tools/kvm/include/kvm/uip.h | 15 +++ tool

[PATCH v2 01/31] kvm tools: Introduce ethernet frame buffer system for uip

2011-06-30 Thread Asias He
- uip_buf_get_free() Get a free buffer from buffer pool, sleep if there is no free buffer. - uip_buf_get_used() Get a used buffer from buffer pool, sleep if there is no used buffer. - uip_buf_set_free() Set a buffer as free, so it can be reused by the buffer producer. - uip_buf_set_used()

[PATCH v2 03/31] kvm tools: Add IPV4 support for uip

2011-06-30 Thread Asias He
- Introduce struct uip_ip to present IP package - Add a helper uip_ip_len() to return totoal length of a IP package - Add a helper uip_ip_hdrlen() to return the IP header length - Currently, uip does not support IP options Drop IP package if IP header length is not 20 bytes which means it co

[PATCH v2 04/31] kvm tools: Implement IP checksum for uip

2011-06-30 Thread Asias He
Other protocal, e.g. TCP, UDP, ICMP, can use uip_csum() to make checsksum as well. Signed-off-by: Asias He --- tools/kvm/Makefile |1 + tools/kvm/include/kvm/uip.h |2 ++ tools/kvm/uip/csum.c| 25 + 3 files changed, 28 insertions(+), 0 deletions

[PATCH v2 05/31] kvm tools: Add ICMP support for uip

2011-06-30 Thread Asias He
- Introduce struct uip_icmp to present ICMP package - Implement uip_csum_icmp() to calculate ICMP checksum - Current ICMP implementation in uip does not really send ICMP package to remote host in question, instead it just fake a ICMP reply to fool guest. Signed-off-by: Asias He --- tools/kvm

[PATCH v2 06/31] kvm tools: Introduce struct uip_udp to present UDP package

2011-06-30 Thread Asias He
Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index b9fa932..e220403 100644 --- a/tools/kvm/include/kvm/uip.h +++ b/tools/kvm/include/kvm/uip

[PATCH v2 07/31] kvm tools: Introduce struct uip_pseudo_hdr to present UDP pseudo header

2011-06-30 Thread Asias He
This pseudo header is used for UDP checksum. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index e220403..35c7c23 100644 --- a/tools/kvm/include/kvm

[PATCH v2 08/31] kvm tools: Introduce struct uip_udp_socket

2011-06-30 Thread Asias He
struct uip_udp_socket is used to present every "connection" between guest and remote host. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index 35c7

[PATCH v2 09/31] kvm tools: Add two helpers to return UDP {header, total} length

2011-06-30 Thread Asias He
Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index 473b9c7..e79cc4b 100644 --- a/tools/kvm/include/kvm/uip.h +++ b/tools/kvm/include/kvm/uip.h @@

[PATCH v2 10/31] kvm tools: Add helper to return ethernet header length

2011-06-30 Thread Asias He
Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index e79cc4b..979e2b0 100644 --- a/tools/kvm/include/kvm/uip.h +++ b/tools/kvm/include/kvm/uip.h @@ -151,

[PATCH v2 11/31] kvm tools: Implement uip_csum_udp() to calculate UDP checksum

2011-06-30 Thread Asias He
Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h |1 + tools/kvm/uip/csum.c| 29 + 2 files changed, 30 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index 979e2b0..e2ad66a 100644 --- a/tools/k

[PATCH v2 12/31] kvm tools: Add UDP support for uip

2011-06-30 Thread Asias He
- Implement uip_tx_do_ipv4_udp() to send UDP package to remote host. - Implement uip_udp_socket_thread() to receive UDP package from remote host. Signed-off-by: Asias He --- tools/kvm/Makefile |1 + tools/kvm/include/kvm/uip.h | 15 +++ tools/kvm/uip/ipv4.c|3 + too

[PATCH v2 13/31] kvm tools: Introduce struct uip_tcp to present TCP package.

2011-06-30 Thread Asias He
Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index ccc1698..1368694 100644 --- a/tools/kvm/include/kvm/uip.h +++ b/tools/kvm/include/kvm/ui

[PATCH v2 14/31] kvm tools: Introduce struct uip_tcp_socket

2011-06-30 Thread Asias He
struct uip_tcp_socket is used to present every session between guest and remote host. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h i

[PATCH v2 15/31] kvm tools: Add helpers to return TCP {header, total, payload} length

2011-06-30 Thread Asias He
This patch adds three helpers uip_tcp_hdrlen(), uip_tcp_len(), uip_tcp_payloadlen() to return TCP header length, TCP totoal length, and tcp payload length. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff

[PATCH v2 16/31] kvm tools: Add helper to return start address of TCP payload

2011-06-30 Thread Asias He
uip_tcp_payload() returns start address of TCP payload in a TCP package. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index 2ac48d7..a3fd1b0 100644 --

[PATCH v2 17/31] kvm tools: Add helpers to test whether SYN or FIN bit is set.

2011-06-30 Thread Asias He
This patch adds too helpers uip_tcp_is_syn(), uip_tcp_is_fin() to check if SYN and FIN bit is set. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kv

[PATCH v2 18/31] kvm tools: Add helper to allocate and get TCP initial sequence number

2011-06-30 Thread Asias He
Guest's initial sequence number can be found in the SYN package that guest send to us to intialize a TCP session. Remote server's initial sequence number is faked. RFC 793 specifies that the ISN should be viewed as a 32-bit counter that increments by one every 4 microseconds. For simplicity's sake

[PATCH v2 19/31] kvm tools: Implement uip_csum_tcp() to calculate TCP checksum

2011-06-30 Thread Asias He
Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h |3 +++ tools/kvm/uip/csum.c| 30 ++ 2 files changed, 33 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index 46cec20..37c87c6 100644 --- a/tool

[PATCH v2 20/31] kvm tools: Add TCP support for uip

2011-06-30 Thread Asias He
- Implement uip_tx_do_ipv4_tcp() to send TCP package to remote host. - Implement uip_tcp_socket_thread() to receive TCP package from remote host. Signed-off-by: Asias He --- tools/kvm/Makefile |1 + tools/kvm/include/kvm/uip.h |4 + tools/kvm/uip/ipv4.c|3 + tools

[PATCH v2 21/31] kvm tools: Introduce uip_init() for uip

2011-06-30 Thread Asias He
- Initialize TCP/UDP socket list, ethernet buffer list. - Allocate memory for ethernet buffer. Signed-off-by: Asias He --- tools/kvm/Makefile |1 + tools/kvm/include/kvm/uip.h |2 + tools/kvm/uip/core.c| 58 +++ 3 files changed,

[PATCH v2 22/31] kvm tools: Introduce uip_tx() for uip

2011-06-30 Thread Asias He
This patch implement tx interface for uip. uip_tx() can be called in virtio_net_tx_thread(). It dispatches ethernet frame to ARP or IP handling code. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h |2 + tools/kvm/uip/core.c| 69 +++

[PATCH v2 23/31] kvm tools: Introduce uip_rx() for uip

2011-06-30 Thread Asias He
This patch implement rx interface for uip. uip_rx() can be called in virtio_net_rx_thread(). It is a consumer of the ethernet used buffer. It sleeps until there is used buffer avaiable and copy ethernet data into virtio iov buffers which provided by virtio_net_rx_thread(). Signed-off-by: Asias He

[PATCH v2 24/31] kvm tools: Add MACRO for user and tap mode for virtio net

2011-06-30 Thread Asias He
This patch prepares the user and tap mode for virtio net. Signed-off-by: Asias He --- tools/kvm/include/kvm/virtio-net.h |4 tools/kvm/virtio/net.c |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/virtio-net.h b/tools/kvm/incl

[PATCH v2 25/31] kvm tools: Reanme net_device to net_dev

2011-06-30 Thread Asias He
This patch makes virtio net device's name convention consistent with others in virtio/*.c. struct {net_dev, blk_dev, con_dev, rng_dev, p9_dev}. Signed-off-by: Asias He --- tools/kvm/virtio/net.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/kvm/virtio/net.

[PATCH v2 26/31] kvm tools: Introduce -net {user, tap, none} options for virtio net

2011-06-30 Thread Asias He
Use '-net user' to enable user model network, which enables plain user without speical privileges to use network in guest. Use '-net tap' to enable tap based network, which requres special privileges. Use '-net none' to disable virtio net. Signed-off-by: Asias He --- tools/kvm/kvm-run.c | 34

[PATCH v2 27/31] kvm tools: Change default guest MAC address to 00:15:15:15:15:15

2011-06-30 Thread Asias He
This patch makes guest MAC address the last portion of default guest IP address which is 192.168.33.15. Signed-off-by: Asias He --- tools/kvm/kvm-run.c|2 +- tools/kvm/virtio/net.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kvm/kvm-run.c b/tools/kvm/k

[PATCH v2 28/31] kvm tools: Make virtio net work with user mode network

2011-06-30 Thread Asias He
- Call uip_rx() and uip_tx() in virtio_net_rx_thread() and virtio_net_tx_thread() if user mode network is enabled. - Initialize uip in virtio_net__init() if user mode network is enabled. Signed-off-by: Asias He --- tools/kvm/virtio/net.c | 100 +---

[PATCH v2 29/31] kvm tools: Make default network mode to user mode

2011-06-30 Thread Asias He
Signed-off-by: Asias He --- tools/kvm/kvm-run.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/kvm-run.c b/tools/kvm/kvm-run.c index a16a482..c293b49 100644 --- a/tools/kvm/kvm-run.c +++ b/tools/kvm/kvm-run.c @@ -42,7 +42,7 @@ #define DEFAULT_KVM_DEV

[PATCH v2 30/31] kvm tools: Make default host ip address to 192.168.33.1

2011-06-30 Thread Asias He
Signed-off-by: Asias He --- tools/kvm/kvm-run.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/kvm-run.c b/tools/kvm/kvm-run.c index c293b49..efae3c0 100644 --- a/tools/kvm/kvm-run.c +++ b/tools/kvm/kvm-run.c @@ -43,7 +43,7 @@ #define DEFAULT_KVM_DEV

[PATCH v2 31/31] kvm tools: Introduce struct net_dev_operations

2011-06-30 Thread Asias He
virtio_net_{tx, rx}_thread can use ops->{tx, rx} to send and recevie network package in both tap mode and user mode. Suggested-by: Pekka Enberg Signed-off-by: Asias He --- tools/kvm/virtio/net.c | 56 ++- 1 files changed, 45 insertions(+), 11 deleti

Re: [PATCH v2 00/31] Implement user mode network for kvm tools

2011-06-30 Thread Stefan Hajnoczi
On Thu, Jun 30, 2011 at 9:40 AM, Asias He wrote: > uip stands for user mode {TCP,UDP}/IP. Currently, uip supports ARP, ICMP, > IPV4, UDP, TCP. So any network protocols above UDP/TCP should work as well, > e.g., HTTP, FTP, SSH, DNS. There is an existing uIP which might cause confusion, not sure if

[PATCH] compat_ioctl: fix warning caused by qemu

2011-06-30 Thread Johannes Stezenbach
On Linux x86_64 host with 32bit userspace, running qemu or even just "qemu-img create -f qcow2 some.img 1G" causes a kernel warning: ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(5326){t:'S';sz:0} arg(7fff) on some.img ioctl32(qemu-img:5296): Unknown cmd fd(3) cmd(801c0204){t:02;sz:28} a

Re: KVM call agenda for June 28

2011-06-30 Thread Stefan Hajnoczi
On Wed, Jun 29, 2011 at 4:41 PM, Marcelo Tosatti wrote: > On Wed, Jun 29, 2011 at 11:08:23AM +0100, Stefan Hajnoczi wrote: >> In the future we could add a 'base' argument to block_stream.  If base >> is specified then data contained in the base image will not be copied. > > This is a present requi

Re: KVM call agenda for June 28

2011-06-30 Thread Kevin Wolf
Am 30.06.2011 13:48, schrieb Stefan Hajnoczi: > On Wed, Jun 29, 2011 at 4:41 PM, Marcelo Tosatti wrote: >> On Wed, Jun 29, 2011 at 11:08:23AM +0100, Stefan Hajnoczi wrote: >>> In the future we could add a 'base' argument to block_stream. If base >>> is specified then data contained in the base im

Re: KVM call agenda for June 28

2011-06-30 Thread Stefan Hajnoczi
On Wed, Jun 29, 2011 at 4:41 PM, Marcelo Tosatti wrote: > On Wed, Jun 29, 2011 at 11:08:23AM +0100, Stefan Hajnoczi wrote: >>  This can be used to merge data from an intermediate image without >> merging the base image.  When streaming completes the backing file >> will be set to the base image.  

Re: [PATCH v3 2/9] KVM-HDR Add constant to represent KVM MSRs enabled bit

2011-06-30 Thread Eric B Munson
On Thu, 30 Jun 2011, Avi Kivity wrote: > On 06/30/2011 12:56 AM, Eric B Munson wrote: > >My mail provider seems to have dropped patch 1 of the series so I can't reply > >directly to it, please add my Tested-by there as well. > > How did you test it then? > I built host and guest kernels with th

Re: [PATCH v3 2/9] KVM-HDR Add constant to represent KVM MSRs enabled bit

2011-06-30 Thread Glauber Costa
On 06/30/2011 09:59 AM, Eric B Munson wrote: On Thu, 30 Jun 2011, Avi Kivity wrote: On 06/30/2011 12:56 AM, Eric B Munson wrote: My mail provider seems to have dropped patch 1 of the series so I can't reply directly to it, please add my Tested-by there as well. How did you test it then? I

Re: [Qemu-devel] KVM call agenda for June 28

2011-06-30 Thread Anthony Liguori
On 06/28/2011 08:48 AM, Avi Kivity wrote: On 06/28/2011 04:43 PM, Anthony Liguori wrote: FYI, I'm in an all-day meeting so I can't attend. Did you do something really bad? I named some variables with a leading underscore and now have to be re-educated. Regards, Anthony Liguori -- To un

Re: [PATCH v3 2/9] KVM-HDR Add constant to represent KVM MSRs enabled bit

2011-06-30 Thread Eric B Munson
On Thu, 30 Jun 2011, Glauber Costa wrote: > On 06/30/2011 09:59 AM, Eric B Munson wrote: > >On Thu, 30 Jun 2011, Avi Kivity wrote: > > > >>On 06/30/2011 12:56 AM, Eric B Munson wrote: > >>>My mail provider seems to have dropped patch 1 of the series so I can't > >>>reply > >>>directly to it, plea

Re: KVM call agenda for June 28

2011-06-30 Thread Marcelo Tosatti
On Thu, Jun 30, 2011 at 01:54:09PM +0100, Stefan Hajnoczi wrote: > On Wed, Jun 29, 2011 at 4:41 PM, Marcelo Tosatti wrote: > > On Wed, Jun 29, 2011 at 11:08:23AM +0100, Stefan Hajnoczi wrote: > >>  This can be used to merge data from an intermediate image without > >> merging the base image.  When

Re: KVM call agenda for June 28

2011-06-30 Thread Kevin Wolf
Am 30.06.2011 16:36, schrieb Marcelo Tosatti: >> 4. Live block copy API and high-level control - the main code that >> adds the live block copy feature. Existing patches by Marcelo, can be >> restructured to use common core by Marcelo. > > Can use your proposed block_stream interface, with a "blo

Re: [PATCH 3/9] kvm tools: Allow giving instance names

2011-06-30 Thread Sasha Levin
On Thu, 2011-06-30 at 11:30 +0300, Avi Kivity wrote: > On 06/30/2011 10:53 AM, Pekka Enberg wrote: > > On Wed, 29 Jun 2011, Sasha Levin wrote: > >> This will allow tracking instance names and sending commands > >> to specific instances if multiple instances are running. > >> > >> Signed-off-by: Sas

Re: [PATCH 3/9] kvm tools: Allow giving instance names

2011-06-30 Thread Sasha Levin
On Thu, 2011-06-30 at 10:53 +0300, Pekka Enberg wrote: > On Wed, 29 Jun 2011, Sasha Levin wrote: > > This will allow tracking instance names and sending commands > > to specific instances if multiple instances are running. > > > > Signed-off-by: Sasha Levin > > I skipped this and related patches

Re: [PATCH 3/9] kvm tools: Allow giving instance names

2011-06-30 Thread Avi Kivity
On 06/30/2011 06:00 PM, Sasha Levin wrote: On Thu, 2011-06-30 at 11:30 +0300, Avi Kivity wrote: > On 06/30/2011 10:53 AM, Pekka Enberg wrote: > > On Wed, 29 Jun 2011, Sasha Levin wrote: > >> This will allow tracking instance names and sending commands > >> to specific instances if multiple

Re: [RFC PATCH 17/17] KVM: PPC: Add an ioctl for userspace to select which platform to emulate

2011-06-30 Thread Alexander Graf
On 06/29/2011 12:41 PM, Paul Mackerras wrote: This new ioctl allows userspace to specify what paravirtualization interface (if any) KVM should implement, what architecture version the guest virtual processors should conform to, and whether the guest can be permitted to use a real supervisor mode.

Re: [RFC PATCH 17/17] KVM: PPC: Add an ioctl for userspace to select which platform to emulate

2011-06-30 Thread Avi Kivity
On 06/30/2011 06:04 PM, Alexander Graf wrote: +4.64 KVM_PPC_SET_PLATFORM + +Capability: none +Architectures: powerpc +Type: vm ioctl +Parameters: struct kvm_ppc_set_platform (in) +Returns: 0, or -1 on error + +This is used by userspace to tell KVM what sort of platform it should +emulate. The re

Re: [RFC PATCH 17/17] KVM: PPC: Add an ioctl for userspace to select which platform to emulate

2011-06-30 Thread Alexander Graf
On 06/30/2011 05:16 PM, Avi Kivity wrote: On 06/30/2011 06:04 PM, Alexander Graf wrote: +4.64 KVM_PPC_SET_PLATFORM + +Capability: none +Architectures: powerpc +Type: vm ioctl +Parameters: struct kvm_ppc_set_platform (in) +Returns: 0, or -1 on error + +This is used by userspace to tell KVM what s

Re: [PATCH v2 00/31] Implement user mode network for kvm tools

2011-06-30 Thread Anthony Liguori
On 06/30/2011 03:56 AM, Stefan Hajnoczi wrote: On Thu, Jun 30, 2011 at 9:40 AM, Asias He wrote: uip stands for user mode {TCP,UDP}/IP. Currently, uip supports ARP, ICMP, IPV4, UDP, TCP. So any network protocols above UDP/TCP should work as well, e.g., HTTP, FTP, SSH, DNS. There is an existing

Re: [RFC PATCH 17/17] KVM: PPC: Add an ioctl for userspace to select which platform to emulate

2011-06-30 Thread Avi Kivity
On 06/30/2011 06:22 PM, Alexander Graf wrote: Regarding that. There's another option - the ioctl code embeds the structure size. So if we extend the ioctl parsing to pad up (or truncate down) from the user's size to our size, and similarly in the other direction, we can get away from this ugl

Re: [PATCH V7 4/4 net-next] vhost: vhost TX zero-copy support

2011-06-30 Thread Shirley Ma
On Wed, 2011-06-29 at 12:13 +0300, Michael S. Tsirkin wrote: > Assuming you mean vhost_zerocopy_signal_used, here's how I would do > it: > add a kref and a completion, signal completion in kref_put > callback, when backend is set - kref_get, on cleanup, > kref_put and then wait_for_completion_inter

[PATCH 0/3] KVM: MMU: Clean up walk_addr_generic() v4

2011-06-30 Thread Takuya Yoshikawa
This is the v4 of my walk_addr_generic() cleanup. Changelog v3-v4: fixed v3's reversed present mask. This time, I have tested the patch set with kvm-unit-tests/x86/access.flat. npt=0 --- enabling apic starting test run 1572866 tests, 0 failures --- npt=1 --- enabling apic starting test run

Re: [RFC PATCH 17/17] KVM: PPC: Add an ioctl for userspace to select which platform to emulate

2011-06-30 Thread Alexander Graf
On 30.06.2011, at 18:00, Avi Kivity wrote: > On 06/30/2011 06:22 PM, Alexander Graf wrote: >>> Regarding that. There's another option - the ioctl code embeds the >>> structure size. So if we extend the ioctl parsing to pad up (or truncate >>> down) from the user's size to our size, and simil

[PATCH 1/3] KVM: MMU: Clean up the error handling of walk_addr_generic()

2011-06-30 Thread Takuya Yoshikawa
From: Takuya Yoshikawa Avoid two step jump to the error handling part. This eliminates the use of the variables present and rsvd_fault. We also use the const type qualifier to show that write/user/fetch_fault do not change in the function. Both of these were suggested by Ingo Molnar. Cc: Ingo

[PATCH 2/3] KVM: MMU: Rename the walk label in walk_addr_generic()

2011-06-30 Thread Takuya Yoshikawa
From: Takuya Yoshikawa The current name does not explain the meaning well. So give it a better name "retry_walk" to show that we are trying the walk again. This was suggested by Ingo Molnar. Cc: Ingo Molnar Signed-off-by: Takuya Yoshikawa --- arch/x86/kvm/paging_tmpl.h |6 +++--- 1 file

[PATCH 3/3] KVM: MMU: Introduce is_last_gpte() to clean up walk_addr_generic()

2011-06-30 Thread Takuya Yoshikawa
From: Takuya Yoshikawa Suggested by Ingo and Avi. Cc: Ingo Molnar Signed-off-by: Takuya Yoshikawa --- arch/x86/kvm/paging_tmpl.h | 26 +++--- 1 files changed, 19 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h index 9c0

Re: [Qemu-devel] KVM call agenda for June 28

2011-06-30 Thread Marcelo Tosatti
On Thu, Jun 30, 2011 at 04:52:00PM +0200, Kevin Wolf wrote: > Am 30.06.2011 16:36, schrieb Marcelo Tosatti: > >> 4. Live block copy API and high-level control - the main code that > >> adds the live block copy feature. Existing patches by Marcelo, can be > >> restructured to use common core by Mar

[PATCH v2] staging: zcache: support multiple clients, prep for KVM and RAMster

2011-06-30 Thread Dan Magenheimer
Hi Greg -- I think this patch is now ready for staging-next and for merging when the 3.1 window opens. Please let me know if you need any logistics done differently. Thanks, Dan === >From: Dan Magenheimer Subject: staging: zcache: support multiple clients, prep for KVM and RAMster This is ve

Re: [PATCH v2] staging: zcache: support multiple clients, prep for KVM and RAMster

2011-06-30 Thread Greg KH
On Thu, Jun 30, 2011 at 12:01:08PM -0700, Dan Magenheimer wrote: > Hi Greg -- > > I think this patch is now ready for staging-next and for merging when > the 3.1 window opens. Please let me know if you need any logistics > done differently. Ok, thanks, I'll queue it up later this week for 3.1 g

Re: [PATCH v3 8/9] KVM-GST: adjust scheduler cpu power

2011-06-30 Thread Peter Zijlstra
On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote: > + return __touch_steal_time(is_idle, UINT_MAX, NULL); That wants to be ULLONG_MAX, because max_steal is a u64, with UINT_MAX the comparison: + if (steal > max_steal) Isn't true per-se and the compiler cannot optimize t

Re: [PATCH v3 8/9] KVM-GST: adjust scheduler cpu power

2011-06-30 Thread Peter Zijlstra
On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote: > +#ifdef CONFIG_PARAVIRT_TIME_ACCOUNTING > + if (static_branch((¶virt_steal_rq_enabled))) { > + int is_idle; > + u64 st; > + > + is_idle = ((rq->curr != rq->idle) || > +

Re: [PATCH v3 8/9] KVM-GST: adjust scheduler cpu power

2011-06-30 Thread Peter Zijlstra
On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote: > @@ -2063,12 +2092,7 @@ static int irqtime_account_si_update(void) > > #define sched_clock_irqtime(0) > > -static void update_rq_clock_task(struct rq *rq, s64 delta) > -{ > - rq->clock_task += delta; > -} > - > -#endif /* CONF

Re: [PATCH v3 7/9] KVM-GST: KVM Steal time accounting

2011-06-30 Thread Peter Zijlstra
On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote: > This patch accounts steal time time in kernel/sched. > I kept it from last proposal, because I still see advantages > in it: Doing it here will give us easier access from scheduler > variables such as the cpu rq. The next patch shows an exam

Re: [PATCH v3 7/9] KVM-GST: KVM Steal time accounting

2011-06-30 Thread Peter Zijlstra
On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote: > + if (static_branch(¶virt_steal_enabled)) { How is that going to compile on !CONFIG_PARAVIRT or !x86 in general? Only x86-PARAVIRT will provide that variable. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the

Re: [PATCH v3 7/9] KVM-GST: KVM Steal time accounting

2011-06-30 Thread Peter Zijlstra
On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote: > +static inline u64 steal_ticks(u64 steal) > +{ > + if (unlikely(steal > NSEC_PER_SEC)) > + return steal / TICK_NSEC; That won't compile on a number of 32bit architecture, use div_u64 or something similar. > + > +

Re: [PATCH v3 3/9] KVM-HDR: KVM Steal time implementation

2011-06-30 Thread Peter Zijlstra
On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote: > + version: guest has to check version before and after grabbing > + time information and check that they are both equal and even. > + An odd version indicates an in-progress update. That's generall

Re: [PATCH v3 7/9] KVM-GST: KVM Steal time accounting

2011-06-30 Thread Peter Zijlstra
On Wed, 2011-06-29 at 11:29 -0400, Glauber Costa wrote: > +static noinline bool touch_steal_time(int is_idle) That noinline is very unlucky there, > +{ > + u64 steal, st = 0; > + > + if (static_branch(¶virt_steal_enabled)) { > + > + steal = paravirt_steal_clock(smp_proce

Re: [PATCH v2] staging: zcache: support multiple clients, prep for KVM and RAMster

2011-06-30 Thread Dan Carpenter
On Thu, Jun 30, 2011 at 12:01:08PM -0700, Dan Magenheimer wrote: > +static int zv_curr_dist_counts_show(char *buf) > +{ > + unsigned long i, n, chunks = 0, sum_total_chunks = 0; > + char *p = buf; > + > + for (i = 0; i <= NCHUNKS - 1; i++) { It's more common to write the condition as:

Re: [RFC PATCH 17/17] KVM: PPC: Add an ioctl for userspace to select which platform to emulate

2011-06-30 Thread Benjamin Herrenschmidt
> Regarding that. There's another option - the ioctl code embeds the > structure size. So if we extend the ioctl parsing to pad up (or > truncate down) from the user's size to our size, and similarly in the > other direction, we can get away from this ugliness. I don't like relying on that m

RE: [PATCH v2] staging: zcache: support multiple clients, prep for KVM and RAMster

2011-06-30 Thread Dan Magenheimer
> > + for (i = 0; i <= NCHUNKS - 1; i++) { > > It's more common to write the condition as: i < NCHUNKS. > > > + n = zv_curr_dist_counts[i]; > > zv_curr_dist_counts has NCHUNKS + 1 elements so we never print > display the final element. I don't know this coe, so I could be > wrong b

Re: [PATCH v2 00/31] Implement user mode network for kvm tools

2011-06-30 Thread Asias He
On 06/30/2011 04:56 PM, Stefan Hajnoczi wrote: > On Thu, Jun 30, 2011 at 9:40 AM, Asias He wrote: >> uip stands for user mode {TCP,UDP}/IP. Currently, uip supports ARP, ICMP, >> IPV4, UDP, TCP. So any network protocols above UDP/TCP should work as well, >> e.g., HTTP, FTP, SSH, DNS. > > There is

Re: [PATCH v2 00/31] Implement user mode network for kvm tools

2011-06-30 Thread Asias He
On 06/30/2011 11:32 PM, Anthony Liguori wrote: > On 06/30/2011 03:56 AM, Stefan Hajnoczi wrote: >> On Thu, Jun 30, 2011 at 9:40 AM, Asias He wrote: >>> uip stands for user mode {TCP,UDP}/IP. Currently, uip supports ARP, >>> ICMP, >>> IPV4, UDP, TCP. So any network protocols above UDP/TCP should wo

buildbot failure in qemu-kvm on default_i386_out_of_tree

2011-06-30 Thread qemu-kvm
The Buildbot has detected a new failure on builder default_i386_out_of_tree while building qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_i386_out_of_tree/builds/827 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Buil

buildbot failure in qemu-kvm on default_x86_64_out_of_tree

2011-06-30 Thread qemu-kvm
The Buildbot has detected a new failure on builder default_x86_64_out_of_tree while building qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_x86_64_out_of_tree/builds/829 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this

buildbot failure in qemu-kvm on default_x86_64_debian_5_0

2011-06-30 Thread qemu-kvm
The Buildbot has detected a new failure on builder default_x86_64_debian_5_0 while building qemu-kvm. Full details are available at: http://buildbot.b1-systems.de/qemu-kvm/builders/default_x86_64_debian_5_0/builds/888 Buildbot URL: http://buildbot.b1-systems.de/qemu-kvm/ Buildslave for this Bu

  1   2   >