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

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

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

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

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

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

[PATCH v3] kvm tool: Change kvm-ram_size to real mapped size.

2012-01-05 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com If a guest's ram_size exceeds KVM_32BIT_GAP_START, the corresponding kvm tool's virtual address size should be (ram_size + KVM_32BIT_GAP_SIZE), rather than ram_size. Use macro define KVM_32BIT_MAX_MEM_SIZE instead of magic number 0x1ULL.

[PATCH v2] kvm tool: Change kvm-ram_size to real mapped size.

2011-12-18 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com If a guest's ram_size exceeds KVM_32BIT_GAP_START, the corresponding kvm tool's virtual address size should be (ram_size + KVM_32BIT_GAP_SIZE), rather than ram_size. Signed-off-by: Hongyong Zang zanghongy...@huawei.com --- tools/kvm/x86/bios.c |2

[PATCH] kvm tools: Make the whole guest memory mergeable

2011-12-15 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com If a guest's ram_size exceeds KVM_32BIT_GAP_START, the corresponding kvm tool's virtual address size should be (ram_size + KVM_32BIT_GAP_SIZE), rather than ram_size. Signed-off-by: Hongyong Zang zanghongy...@huawei.com --- tools/kvm/x86/kvm.c |4

[Qemu-devel] [PATCH] virtio-serial: Allow one MSI-X vector per virtqueue

2011-12-15 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com In pci_enable_msix(), the guest's virtio-serial driver tries to set msi-x with one vector per queue. But it fails and eventually all virtio-serial ports share one MSI-X vector. Because every virtio-serial port has *two* virtqueues, virtio-serial needs

[PATCH 0/2] vhot-net: Use kvm_memslots instead of vhost_memory to translate GPA to HVA

2011-12-15 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com Vhost-net uses its own vhost_memory, which results from user space (qemu) info, to translate GPA to HVA. Since kernel's kvm structure already maintains the address relationship in its member *kvm_memslots*, these patches use kernel's kvm_memslots

[PATCH 2/2] vhost-net: Use kvm_memslots for address translation

2011-12-15 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com Use kvm's memslots instead of vhost_memory to traslate address from GPA to HVA. Signed-off-by: Hongyong Zang zanghongy...@huawei.com --- drivers/vhost/vhost.c | 53 ++-- 1 files changed, 20 insertions(+),

[PATCH 1/2] kvm: Introduce get_kvm_from_task

2011-12-15 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com This function finds the kvm structure from its corresponding user space process, such as qemu process. Signed-off-by: Hongyong Zang zanghongy...@huawei.com --- include/linux/kvm_host.h |2 +- virt/kvm/kvm_main.c | 13 + 2 files

[Qemu-devel] [PATCH v3 0/3] ivshmem: add a new PIO BAR4(Doorbell) besides MMIO BAR0 to reduce notification time

2011-12-12 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com This patch series, adds a PIO BAR4 for guest notifying qemu. And the new notification way of PIO BAR4 reduces 30% time in comparison with the original MMIO BAR0 way. Meantime, this patch adds a memory API named kvm_set_ioeventfd_pio_long which is about

[Qemu-devel] [PATCH v3 2/3] ivshmem: add a new PIO BAR4(Doorbell) to reduce notification time

2011-12-12 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com This patch adds a PIO BAR4 for guest notifying qemu to reduce notification time. And the new notification way of PIO BAR4 reduces 30% time in comparison with the original MMIO BAR0 way. Also, this patch introduces a new feature named IVSHMEM_PIO_NOTIFY

[Qemu-devel] [PATCH v3 3/3] ivshmem: update the spec

2011-12-12 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com Signed-off-by: Hongyong Zang zanghongy...@huawei.com --- docs/specs/ivshmem_device_spec.txt |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/specs/ivshmem_device_spec.txt b/docs/specs/ivshmem_device_spec.txt index

[Qemu-devel] [PATCH v3 1/3] memory: add a memory API about ioeventfd for PIO long

2011-12-12 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com The new memory API, named kvm_set_ioeventfd_pio_long, is about ioeventfd for PIO long. Signed-off-by: Hongyong Zang zanghongy...@huawei.com --- kvm-all.c | 23 +++ kvm-stub.c |5 + kvm.h |1 + memory.c | 20

[Qemu-devel] [PATCH] ivshmem: fix guest unable to start with ioeventfd

2011-11-24 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com When a guest boots with ioeventfd, an error (by gdb) occurs: Program received signal SIGSEGV, Segmentation fault. 0x006009cc in setup_ioeventfds (s=0x171dc40) at /home/louzhengwei/git_source/qemu-kvm/hw/ivshmem.c:363 363

[Qemu-devel] [PATCH] ivshmem: fix PCI BAR2 registration during initialization

2011-11-21 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com Ivshmem cannot work, and the command lspci cannot show ivshmem BAR2 in the guest. As for pci_register_bar(), parameter MemoryRegion should be s-bar instead of s-ivshmem. Signed-off-by: Hongyong Zang zanghongy...@huawei.com --- hw/ivshmem.c |2 +-

[Qemu-devel] [PATCH v2] ivshmem: add a new PIO BAR3(Doorbell) besides MMIO BAR0 to reduce notification time

2011-11-17 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com This patch, adds a PIO BAR3 for guest notifying qemu. And we find the new notification way of PIO BAR3 reduces 30% time in comparison with the original MMIO BAR0 way. Signed-off-by: Hongyong Zang zanghongy...@huawei.com --- hw/ivshmem.c | 24

[Qemu-devel] [PATCH] ivshmem: use PIO for BAR0(Doorbell) instead of MMIO to reduce notification time

2011-11-13 Thread zanghongyong
From: Hongyong Zang zanghongy...@huawei.com Ivshmem(nahanni) is a mechanism for sharing host memory with VMs running on the same host. Currently, guest notifies qemu by reading or writing ivshmem device's PCI MMIO BAR0(Doorbell). This patch, changes this PCI MMIO BAR0(Doorbell) to PIO. And we