Re: [PATCH] kvm tools: Signal only one thread when injecting console interrupts

2011-06-24 Thread Asias He
On 06/16/2011 03:29 PM, Ingo Molnar wrote: > * Asias He wrote: > >> On 06/16/2011 05:33 AM, Sasha Levin wrote: >>> Send signals only to the thread which handles console injection >>> instead of the entire process. >>> >>> This prevents every sin

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

2011-06-30 Thread Asias He
user mode network) -> remote server: 94.5 Mbps (CPU 99.90%) host(where guest runs on) -> remote server: 95.7 Mbps (CPU 25.51%) Asias He (31): kvm tools: Introduce ethernet frame buffer system for uip kvm tools: Add ARP support for uip kvm tools: Add IPV4 support for uip kvm t

[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

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

2011-06-30 Thread Asias He
() Set a buffer as used, uip rx code will inject the ethernet frame in this buffer into guest. - uip_buf_clone() Get a free buffer, and clone data into it. Signed-off-by: Asias He --- tools/kvm/Makefile |1 + tools/kvm/include/kvm/uip.h | 69 ++ tools

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

2011-06-30 Thread Asias He
contains IP options. Signed-off-by: Asias He --- tools/kvm/Makefile |1 + tools/kvm/include/kvm/uip.h | 28 tools/kvm/uip/ipv4.c| 15 +++ 3 files changed, 44 insertions(+), 0 deletions(-) create mode 100644 tools/kvm/uip/ipv4.c

[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

[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

[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

[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

[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/u

[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

[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

[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

[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

[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

[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

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

2011-06-30 Thread Asias He
mplicity's sake, current implementation in uip just returns a constant. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index 5585680..46cec

[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

[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

[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

[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

[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/v

[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: Asia

[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

[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(+),

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, SS

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 ne

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

2011-07-01 Thread Asias He
On 07/01/2011 07:46 PM, Ingo Molnar wrote: > > * Asias He wrote: > >> +static void *uip_udp_socket_thread(void *p) >> +{ >> +struct epoll_event events[UIP_UDP_MAX_EVENTS]; >> +struct uip_udp_socket *sk; >> +struct uip_info *info; >> +

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

2011-07-01 Thread Asias He
On 07/02/2011 04:36 AM, Pekka Enberg wrote: > On Fri, Jul 1, 2011 at 7:50 PM, Stefan Hajnoczi wrote: >> On Fri, Jul 1, 2011 at 12:38 AM, Asias He wrote: >>> On 06/30/2011 04:56 PM, Stefan Hajnoczi wrote: >>>> On Thu, Jun 30, 2011 at 9:40 AM, Asias He wrote: >&

[PATCH 00/16] Implement DHCP support for user mode network

2011-07-17 Thread Asias He
This patch set implements DHCP support for user mode network. This patch set complements the "Implement user mode network for kvm tools" patch set and makes the Zero-Configuration Network happen. To use this: No configuration is needed in host side, just enable DHCP in your guest OS.

[PATCH 01/16] kvm tools: Introduce uip_udp_make_pkg()

2011-07-17 Thread Asias He
This helper cooks a ethernet package and virtio header for UDP. This patch also makes uip_udp_socket_thread() shorter. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h |1 + tools/kvm/net/uip/udp.c | 100 +++--- 2 files changed, 56 insertions

[PATCH 02/16] kvm tools: Introduce struct uip_dhcp

2011-07-17 Thread Asias He
struct uip_dhcp is used to present DHCP package Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include/kvm/uip.h index 8333004..c414267 100644

[PATCH 03/16] kvm tools: Add helper to tell if a UDP package is a DHCP package

2011-07-17 Thread Asias He
This patch checks: - sport and dport - magic cookie to detemine whether a UDP package is a DHCP package. Signed-off-by: Asias He --- tools/kvm/Makefile |1 + tools/kvm/include/kvm/uip.h |4 tools/kvm/net/uip/dhcp.c| 17 + 3 files changed, 22

[PATCH 04/16] kvm tools: Add helpers to tell the type of a DHCP message

2011-07-17 Thread Asias He
If DHCP DISCOVER or DHCP REQUEST is found, reply with DHCP OFFER or DHCP ACK respectively. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h |6 ++ tools/kvm/net/uip/dhcp.c| 14 ++ 2 files changed, 20 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include

[PATCH 05/16] kvm tools: Get domain name and nameserver from host

2011-07-17 Thread Asias He
This patch get domain name and nameserver information from host config file /etc/resolv.conf. Guest can obtain DNS information through DHCP. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h |6 ++ tools/kvm/net/uip/dhcp.c| 34 ++ 2 files

[PATCH 06/16] kvm tools: Fill DHCP options with domain name and DNS server IP

2011-07-17 Thread Asias He
Domain name and DNS server IP address are filled. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h |4 tools/kvm/net/uip/dhcp.c| 27 +++ 2 files changed, 31 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include/kvm/uip.h b/tools/kvm/include

[PATCH 07/16] kvm tools: Fill all DHCP options

2011-07-17 Thread Asias He
The following DHCP options are filled. - MSG_TYPE - SERVER_ID - LEASE_TIME - SUBMASK - ROUTER - DNS_SERVER - DOMAIN_NAME Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h | 12 tools/kvm/net/uip/dhcp.c| 42

[PATCH 08/16] kvm tools: Introduce uip_dhcp_make_pkg()

2011-07-17 Thread Asias He
This patch cooks a DHCP package. Signed-off-by: Asias He --- tools/kvm/net/uip/dhcp.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/tools/kvm/net/uip/dhcp.c b/tools/kvm/net/uip/dhcp.c index 42e354c..612e024 100644 --- a/tools/kvm/net/uip/dhcp.c

[PATCH 09/16] kvm tools: Introduce uip_tx_do_ipv4_udp_dhcp()

2011-07-17 Thread Asias He
uip_tx_do_ipv4_udp_dhcp() is used to handle DHCP packages from guest. Signed-off-by: Asias He --- tools/kvm/include/kvm/uip.h |4 tools/kvm/net/uip/dhcp.c| 38 ++ 2 files changed, 42 insertions(+), 0 deletions(-) diff --git a/tools/kvm/include

[PATCH 10/16] kvm tools: Get DNS information from host in uip_init()

2011-07-17 Thread Asias He
Use uip_dhcp_get_dns() in uip_init() to get DNS information from host for DHCP. Signed-off-by: Asias He --- tools/kvm/net/uip/core.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/tools/kvm/net/uip/core.c b/tools/kvm/net/uip/core.c index 7a4b824..2e7603c 100644 --- a

[PATCH 11/16] kvm tools: Handle DHCP package in gernal UDP processing path

2011-07-17 Thread Asias He
DHCP packages are handled by the hypervisor, they are not sent to remote servers. In contrast, all other non-DHCP UDP packages are sent to remote servers. Signed-off-by: Asias He --- tools/kvm/net/uip/udp.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/tools/kvm

[PATCH 12/16] kvm tools: Introduce --guest-ip option

2011-07-17 Thread Asias He
The --guest-ip option tells which IP address to give guest through DHCP. Signed-off-by: Asias He --- tools/kvm/builtin-run.c|8 tools/kvm/include/kvm/virtio-net.h |5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/tools/kvm/builtin-run.c b

[PATCH 13/16] kvm tools: Introduce --host-mac option

2011-07-17 Thread Asias He
The --host-mac option sets up MAC address of host. Signed-off-by: Asias He --- tools/kvm/builtin-run.c| 14 ++ tools/kvm/include/kvm/virtio-net.h |1 + 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c

[PATCH 14/16] kvm tools: Rename --host-ip-addr to --host-ip

2011-07-17 Thread Asias He
This patch makes the network options more consistent. We are having: --host-ip --host-mac --guest-ip --guest-mac now. Signed-off-by: Asias He --- tools/kvm/builtin-run.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/kvm/builtin-run.c b

[PATCH 15/16] kvm tools: Initialize MAC address for virtio net properly

2011-07-17 Thread Asias He
- Drop static initialization - Move the initializtion out of tap init Signed-off-by: Asias He --- tools/kvm/virtio/net.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/tools/kvm/virtio/net.c b/tools/kvm/virtio/net.c index f4ba79a..af9b740 100644 --- a/tools

[PATCH 16/16] kvm tools: Initialize MAC and IP address for uip properly

2011-07-17 Thread Asias He
- Drop static initialization - Use {host,guet}_{ip,mac} to initialize Signed-off-by: Asias He --- tools/kvm/virtio/net.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/kvm/virtio/net.c b/tools/kvm/virtio/net.c index af9b740..739f157 100644 --- a

Re: [PATCH 05/16] kvm tools: Get domain name and nameserver from host

2011-07-17 Thread Asias He
On 07/17/2011 05:36 PM, Sasha Levin wrote: > On Sun, 2011-07-17 at 16:56 +0800, Asias He wrote: >> This patch get domain name and nameserver information from host config >> file /etc/resolv.conf. >> >> Guest can obtain DNS information through DHCP. >> >> Sign

Re: [PATCH v2 2/2] kvm tools: Add '--rootfs' and '--binsh'

2011-08-03 Thread Asias He
It seems that it is a permission related problem, however, the warning message is "/root/a: No such file or directory", any ideas? -- Best Regards, Asias He -- 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 1/4] kvm tools: Make --kvm-dev option shorter

2011-08-07 Thread Asias He
This patch changes --kvm-dev to --dev. Signed-off-by: Asias He --- tools/kvm/Documentation/kvm-run.txt |3 +-- tools/kvm/builtin-run.c | 10 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/kvm/Documentation/kvm-run.txt b/tools/kvm/Documentation

[PATCH 2/4] kvm tools: Make --virtio-9p option shorter

2011-08-07 Thread Asias He
This patch changes --virtio-9p to --9p because: 1. It's shorter 2. No need to add virtio prior to 9p since we use virtio by default Signed-off-by: Asias He --- tools/kvm/builtin-run.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/kvm/builtin-run.c b/

[PATCH 3/4] kvm tools: Sort options of kvm run command

2011-08-07 Thread Asias He
This patch sort options of kvm run command to make it look tidier and cleaner. Signed-off-by: Asias He --- tools/kvm/builtin-run.c | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin-run.c index a4988aa..4279cb3 100644

[PATCH 4/4] kvm tools: Tune --disk option usage information

2011-08-07 Thread Asias He
This patch makes --disk option usage information include rootfs direcotry, since --disk supports both iamges and rootfs dir. Signed-off-by: Asias He --- tools/kvm/builtin-run.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/tools/kvm/builtin-run.c b/tools/kvm/builtin

[PATCH] kvm tools: Sanitize output characters in serial console

2011-08-09 Thread Asias He
16550A [1.294000] serial8250: ttyS2 at I/O 0x3e8 (irq = 0) is a 16550A [1.309000] Non-volatile memory driver v1.3 Signed-off-by: Asias He --- tools/kvm/term.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/kvm/term.c b/tools/kvm/term.c index 2a3e1f0

Re: [PATCH] kvm tools: Enable kernel DHCP autoconf by default

2011-08-09 Thread Asias He
On 08/10/2011 01:53 AM, Pekka Enberg wrote: > As we boot to '/bin/sh' by default, enable kernel DHCP autoconfiguration too. > The guest kernel needs to be configured with the following configuration > options: > > CONFIG_IP_PNP=y > CONFIG_IP_PNP_DHCP=y > &

Re: [PATCH] kvm tools: Sanitize output characters in serial console

2011-08-09 Thread Asias He
On 08/10/2011 01:30 PM, Pekka Enberg wrote: > On 8/10/11 2:56 AM, Asias He wrote: >> This patch fixes strange characters in serial console. >> >> Before: >> >> [0.448000] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled >> �[0.695000] serial

Re: [PATCH] kvm tools: Sanitize output characters in serial console

2011-08-09 Thread Asias He
On 08/10/2011 01:55 PM, Pekka Enberg wrote: > On Wed, Aug 10, 2011 at 8:43 AM, Asias He wrote: >> On 08/10/2011 01:30 PM, Pekka Enberg wrote: >>> On 8/10/11 2:56 AM, Asias He wrote: >>>> This patch fixes strange characters in serial console. >>>> >>

Re: [PATCH] kvm tools: Sanitize output characters in serial console

2011-08-10 Thread Asias He
On 08/10/2011 02:53 PM, walimis wrote: > On Wed, Aug 10, 2011 at 02:15:45PM +0800, Asias He wrote: >> On 08/10/2011 01:55 PM, Pekka Enberg wrote: >>> On Wed, Aug 10, 2011 at 8:43 AM, Asias He wrote: >>>> On 08/10/2011 01:30 PM, Pekka Enberg wrote: >>&g

Re: [PATCH 2/2] kvm tools: handle failure of command

2011-08-10 Thread Asias He
ping 192.168.33.1 That's it. If you want to access the real world in guest, try NAT or Bridge the tap device. -- Best Regards, Asias He -- 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

Re: [PATCH] kvm tools: Print only serial output to the terminal

2011-08-10 Thread Asias He
enable something like: T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 in guest's /etc/inittab. -- Best Regards, Asias He -- 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

Re: [PATCH] kvm tools: Fix IRQ mapping

2011-08-11 Thread Asias He
eing mapped, since it's the link between slave and master >> IRQCHIPs it shouldn't be. >> >> Signed-off-by: Sasha Levin > > Asias, does this fix the VNC mouse problem for you? Yup. But gpm still can not work, it complains can not open /dev/psaux. -- Best Rega

Re: [PATCH] kvm tools: Add 'kvm memstat' command

2011-08-15 Thread Asias He
tify a separate builtin as > opposed to an command line option in a 'kvm stat' command. Yes. the command I am proposing is 'kvm info'. We can have a lot of thing in 'kvm info', like register info, network info ,disk info. mem info. Actually, Pekka suggested to have kvm

[PATCH 1/2] kvm tools: Fix VHOST_SET_MEM_TABLE failure

2012-07-11 Thread Asias He
VHOST_SET_MEM_TABLE failed: Operation not supported In vhost_set_memory(), We have if (mem.padding) return -EOPNOTSUPP; So, we need to zero struct vhost_memory. Signed-off-by: Asias He --- tools/kvm/virtio/net.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 2/2] kvm tools: Do not poll ioeventfd if vhost is enabled

2012-07-11 Thread Asias He
If vhost is enabled for a virtio device, vhost will poll the ioeventfd in kernel side and there is no need to poll it in userspace. Otherwise, both vhost kernel and userspace will race to poll. Signed-off-by: Asias He --- tools/kvm/include/kvm/ioeventfd.h |2 +- tools/kvm/ioeventfd.c

[PATCH v2 1/2] kvm tools: Fix VHOST_SET_MEM_TABLE failure

2012-07-11 Thread Asias He
VHOST_SET_MEM_TABLE failed: Operation not supported In vhost_set_memory(), We have if (mem.padding) return -EOPNOTSUPP; So, we need to zero struct vhost_memory. Signed-off-by: Asias He --- tools/kvm/virtio/net.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v2 2/2] kvm tools: Do not poll ioeventfd if vhost is enabled

2012-07-11 Thread Asias He
If vhost is enabled for a virtio device, vhost will poll the ioeventfd in kernel side and there is no need to poll it in userspace. Otherwise, both vhost kernel and userspace will race to poll. Signed-off-by: Asias He --- tools/kvm/include/kvm/ioeventfd.h |2 +- tools/kvm/include/kvm

[PATCH 1/1] kvm tools: Introduce struct disk_image_params

2012-07-11 Thread Asias He
Introduce struct disk_image_params to contain all the disk image parameters. This is useful for adding more disk image parameters, e.g. disk image cache mode. Signed-off-by: Asias He --- tools/kvm/builtin-run.c| 11 +-- tools/kvm/disk/core.c | 15

Re: [PATCH v2 1/2] kvm tools: Fix VHOST_SET_MEM_TABLE failure

2012-07-11 Thread Asias He
On Thu, Jul 12, 2012 at 12:09 AM, Avi Kivity wrote: > On 07/11/2012 07:08 PM, Asias He wrote: >> VHOST_SET_MEM_TABLE failed: Operation not supported >> >> In vhost_set_memory(), We have >> >> if (mem.padding) >> return -EOPNO

[PATCH 1/1] kvm tools: Enable O_DIRECT support

2012-07-12 Thread Asias He
Open a disk image with O_DIRECT: $ lkvm run -d ~/img/test.img,direct The original readonly flag is still supported. Open a disk image with O_DIRECT and readonly: $ lkvm run -d ~/img/test.img,direct,ro Signed-off-by: Asias He --- tools/kvm/builtin-run.c| 20

[PATCH V2] kvm tools: Enable O_DIRECT support

2012-07-12 Thread Asias He
readonly flag is still supported. Open a disk image with O_DIRECT and readonly: $ lkvm run -d ~/img/test.img,direct,ro Signed-off-by: Asias He --- tools/kvm/builtin-run.c| 23 +++ tools/kvm/disk/blk.c |4 ++-- tools/kvm/disk/core.c

[PATCH 0/5] Add vhost-blk support

2012-07-12 Thread Asias He
Hi folks, This patchset adds vhost-blk support. vhost-blk is a in kernel virito-blk device accelerator. Compared to userspace virtio-blk implementation, vhost-blk gives about 5% to 15% performance improvement. Asias He (5): aio: Export symbols and struct kiocb_batch for in kernel aio usage

[PATCH 1/5] aio: Export symbols and struct kiocb_batch for in kernel aio usage

2012-07-12 Thread Asias He
This is useful for people who want to use aio in kernel, e.g. vhost-blk. Signed-off-by: Asias He --- fs/aio.c| 37 ++--- include/linux/aio.h | 21 + 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/fs/aio.c b/fs

[PATCH 2/5] eventfd: Export symbol eventfd_file_create()

2012-07-12 Thread Asias He
This is useful for people who want to create an eventfd in kernel, e.g. vhost-blk. Signed-off-by: Asias He --- fs/eventfd.c |1 + 1 file changed, 1 insertion(+) diff --git a/fs/eventfd.c b/fs/eventfd.c index d81b9f6..b288963 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -402,6 +402,7

[PATCH 3/5] vhost: Make vhost a separate module

2012-07-12 Thread Asias He
. Signed-off-by: Asias He --- drivers/vhost/Kconfig | 10 +- drivers/vhost/Makefile |4 +++- drivers/vhost/vhost.c | 48 drivers/vhost/vhost.h |1 + 4 files changed, 61 insertions(+), 2 deletions(-) diff --git a/drivers/vhost

[PATCH 4/5] vhost-net: Use VHOST_NET_FEATURES for vhost-net

2012-07-12 Thread Asias He
vhost-net's feature does not deseve the name VHOST_FEATURES. Use VHOST_NET_FEATURES instead. Signed-off-by: Asias He --- drivers/vhost/net.c |4 ++-- drivers/vhost/test.c |4 ++-- drivers/vhost/vhost.h | 12 ++-- 3 files changed, 10 insertions(+), 10 deletions(-)

[PATCH 5/5] vhost-blk: Add vhost-blk support

2012-07-12 Thread Asias He
IOPS boost : 8.4%, 15.3%, 10.4%, 14.6% Latency improvement: 8.5%, 15.4%, 10.4%, 15.1% 2) Fio with vsync ioengine on Fusion IO device With bio-based IO path, sequential read/write, random read/write IOPS boost : 10.5%, 4.8%, 5.2%, 5.6% Latency improvement: 11.4%, 5.0%, 5.2%, 5.8% Signed-off-by

[PATCH 1/1] kvm tools: Add vhost-blk support

2012-07-12 Thread Asias He
: 8.4%, 15.3%, 10.4%, 14.6% Latency improvement: 8.5%, 15.4%, 10.4%, 15.1% 2) Fio with vsync ioengine on Fusion IO device With bio-based IO path, sequential read/write, random read/write IOPS boost : 10.5%, 4.8%, 5.2%, 5.6% Latency improvement: 11.4%, 5.0%, 5.2%, 5.8% Signed-off-by: Asi

Re: [PATCH 0/5] Add vhost-blk support

2012-07-12 Thread Asias He
Hello Jeff, On 07/13/2012 12:06 AM, Jeff Moyer wrote: Asias He writes: Hi folks, This patchset adds vhost-blk support. vhost-blk is a in kernel virito-blk device accelerator. Compared to userspace virtio-blk implementation, vhost-blk gives about 5% to 15% performance improvement. Asias He

Re: [PATCH 1/5] aio: Export symbols and struct kiocb_batch for in kernel aio usage

2012-07-12 Thread Asias He
Hi James, On 07/13/2012 01:50 AM, James Bottomley wrote: On Thu, 2012-07-12 at 23:35 +0800, Asias He wrote: This is useful for people who want to use aio in kernel, e.g. vhost-blk. Signed-off-by: Asias He --- fs/aio.c| 37 ++--- include/linux

Re: [PATCH 1/1] kvm tools: Add vhost-blk support

2012-07-12 Thread Asias He
On Fri, Jul 13, 2012 at 12:02 AM, Pekka Enberg wrote: > On Thu, Jul 12, 2012 at 6:46 PM, Asias He wrote: >> vhost-blk is a in kernel virito-blk device accelerator. vhost-blk is >> similar with vhost-net. It handles virito-blk's request and completion >> in host ker

[PATCH V3 1/3] block: Introduce __blk_segment_map_sg() helper

2012-07-13 Thread Asias He
: Asias He --- block/blk-merge.c | 80 ++--- 1 file changed, 45 insertions(+), 35 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index 160035f..576b68e 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -110,6 +110,49

[PATCH V3 0/3] Improve virtio-blk performance

2012-07-13 Thread Asias He
% Latency improvement: 32%, 17%, 21%, 16% 2) Fusion IO device With bio-based IO path, sequential read/write, random read/write IOPS boost : 11%, 11%, 13%, 10% Latency improvement: 10%, 10%, 12%, 10% Asias He (3): block: Introduce __blk_segment_map_sg() helper block: Add

[PATCH V3 2/3] block: Add blk_bio_map_sg() helper

2012-07-13 Thread Asias He
ens Axboe Cc: Tejun Heo Cc: Shaohua Li Cc: linux-ker...@vger.kernel.org Signed-off-by: Christoph Hellwig Signed-off-by: Minchan Kim Signed-off-by: Asias He --- block/blk-merge.c | 37 + include/linux/blkdev.h |2 ++ 2 files changed, 39 inserti

[PATCH V3 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-13 Thread Asias He
by: Christoph Hellwig Signed-off-by: Minchan Kim Signed-off-by: Asias He --- drivers/block/virtio_blk.c | 203 +++- 1 file changed, 163 insertions(+), 40 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 774c31d

[PATCH RESEND 2/5] eventfd: Export symbol eventfd_file_create()

2012-07-13 Thread Asias He
: Asias He --- fs/eventfd.c |1 + 1 file changed, 1 insertion(+) diff --git a/fs/eventfd.c b/fs/eventfd.c index d81b9f6..b288963 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c @@ -402,6 +402,7 @@ struct file *eventfd_file_create(unsigned int count, int flags) return file

[PATCH RESEND 5/5] vhost-blk: Add vhost-blk support

2012-07-13 Thread Asias He
S. Tsirkin Cc: linux-ker...@vger.kernel.org Cc: kvm@vger.kernel.org Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Asias He --- drivers/vhost/Kconfig | 10 + drivers/vhost/Makefile |2 + drivers/vhost/blk.c| 600 dri

[PATCH RESEND 1/5] aio: Export symbols and struct kiocb_batch for in kernel aio usage

2012-07-13 Thread Asias He
: virtualizat...@lists.linux-foundation.org Signed-off-by: Asias He --- fs/aio.c| 37 ++--- include/linux/aio.h | 21 + 2 files changed, 39 insertions(+), 19 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index 55c4c76..93dfbdd 100644

[PATCH RESEND 4/5] vhost-net: Use VHOST_NET_FEATURES for vhost-net

2012-07-13 Thread Asias He
vhost-net's feature does not deseve the name VHOST_FEATURES. Use VHOST_NET_FEATURES instead. Cc: Michael S. Tsirkin Cc: linux-ker...@vger.kernel.org Cc: kvm@vger.kernel.org Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Asias He --- drivers/vhost/net.c |4 ++-- dr

[PATCH RESEND 3/5] vhost: Make vhost a separate module

2012-07-13 Thread Asias He
: Michael S. Tsirkin Cc: linux-ker...@vger.kernel.org Cc: kvm@vger.kernel.org Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Asias He --- drivers/vhost/Kconfig | 10 +- drivers/vhost/Makefile |4 +++- drivers/vhost/vhost.c | 48

[PATCH RESEND 0/5] Add vhost-blk support

2012-07-13 Thread Asias He
Hi folks, [I am resending to fix the broken thread in the previous one.] This patchset adds vhost-blk support. vhost-blk is a in kernel virito-blk device accelerator. Compared to userspace virtio-blk implementation, vhost-blk gives about 5% to 15% performance improvement. Asias He (5): aio

Re: [PATCH V2] kvm tools: Enable O_DIRECT support

2012-07-13 Thread Asias He
On Fri, Jul 13, 2012 at 12:05 AM, Pekka Enberg wrote: > On Thu, Jul 12, 2012 at 6:18 PM, Asias He wrote: >> With Direct I/O, file reads and writes go directly from the applications >> to the storage device, bypassing the operating system read and write >> caches. This is us

Re: [PATCH RESEND 0/5] Add vhost-blk support

2012-07-16 Thread Asias He
Hi Christoph, On 07/14/2012 03:49 PM, Christoph Hellwig wrote: Please send a version that does direct block I/O similar to xen-blkback for now. Seems xen-blkback converts the guest IO request to host bio and submit them directly. I was wondering whether this has a performance gain compared t

Re: [PATCH 0/5] Add vhost-blk support

2012-07-17 Thread Asias He
On 07/16/2012 07:58 PM, Stefan Hajnoczi wrote: On Thu, Jul 12, 2012 at 4:35 PM, Asias He wrote: This patchset adds vhost-blk support. vhost-blk is a in kernel virito-blk device accelerator. Compared to userspace virtio-blk implementation, vhost-blk gives about 5% to 15% performance improvement

  1   2   3   4   5   6   7   8   9   >