共 21 篇文章 |
|
2 KVM的内部实现概述2.1 KVM的抽象对象2.2 KVM的vcpu2.3 KVM的IO虚拟化2.3.1 IO的虚拟化2.3.2 VirtIO.KVM同应用程序(Qemu)的交互接口为/dev/kvm,通过open以及ioctl系统调用可以获取并操作KVM抽象出来的三个对象,Guest的虚拟处理器(fd_vcpu[N]), Guest的地址空间(fd_vm), KVM本身(fd_kvm)。其中fd_kvm主要用于Qemu同KVM本身的交互,比如获取KV... 阅236 转5 评0 公众公开 13-01-28 15:50 |
raw格式对于未分区镜像文件直接使用loop:mount -o loop image.img /mnt/image已分区的镜像文件:如果已知分区的起始位置mount -o loop,offset=32256 image.img /mnt/image或者使用losetup + kpartxlosetup /dev/loop0 image.imgkpartx -a /dev/loop0mount /dev/mapper/loop0p1 /mnt/imagekpartx命令的作用,是让Linux內核读取一个设备上的分区... 阅1461 转6 评0 公众公开 12-08-24 15:01 |
而qemu-kvm是为了针对KVM专门做了修改和优化的QEMU分支[注7],在本书写作的2012年,qemu-kvm分支里面的小部分特性还没有完全合并进入到qemu的主干代码之中,所以本书中采用qemu-kvm来讲解。[root@jay-linux kvm_demo]# git clone\ git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git qemu-kvm.git.由于qemu-kvm是用户空间的程序,安装之后不... 阅557 转3 评0 公众公开 12-08-22 12:07 |
而且,根据输出信息中cpu2和cpu3上运行的线程信息(也包括进程在内),分别有migration进程(用于进程在不同CPU间迁移)、两个kworker进程(用于处理workqueues)、ksoftirqd进程(用于调度CPU软中断的进程),这些进程都是内核对各个CPU的一些守护进程,而没有其他的普通进程在cup2和cpu3上运行,说明对其的隔离是生效的。使用taskset命令将QE... 阅1035 转5 评0 公众公开 12-08-22 10:47 |
进入KVM中第一个执行的函数名字相同,也叫kvm_vcpu_ioctl,最终会调用到kvm_x86_ops->run()进入到Guest OS,如果Guest OS要写某个端口,会产生一条IO instruction,这时会从Guest OS中退出,调用kvm_x86_ops->handle_exit函数,其实这个函数被赋值为vmx_handle_exit,最终会调用到kvm_vmx_exit_handlers[exit_reason](vcpu),kvm_vmx_exi... 阅1582 转7 评0 公众公开 12-06-19 13:56 |
vhost: Enable vhost-blk support.+int vhost_blk_start(struct vhost_blk *blk, VirtIODevice *device)+{+#endif /* VHOST_BLK_H */diff --git a/hw/virtio-blk.c b/hw/virtio-blk.cindex 6471ac8..a5f3a27 100644--- a/hw/virtio-blk.c+++ b/hw/virtio-blk.c@@ -16,23 +16,32 @@ #include "trace.h" #include "blockdev.h&quo... 阅970 转1 评0 公众公开 12-06-12 15:33 |
if (unlikely(error))@@ -366,14 +369,12 @@ static void vmx_load_host_state(struct kvm_vcpu *vcpu) * Switches to specified vcpu, until a matching vcpu_put(), but assumes * vcpu mutex is already taken. */-static void vmx_vcpu_load(struct kvm_vcpu *vcpu)+static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) { u64 phys... 阅212 转1 评0 公众公开 12-06-12 15:26 |
孔建军的博客:KVM网络模型图 (KVM Network Model)KVM网络模型图 (KVM Network Model)画了半天,拿出来晒晒 ;)[1] Userspace Virtio network architecture[2] Vd-t,sriov architecture[3] Vhost_net architecture[4] Vhost over sriov &macvtap architecture。涉及: virtio, vhost, macvtap,sriov. 阅306 转2 评0 公众公开 12-06-11 15:56 |
ubuntu下kvm的简单使用ubuntu下kvm的简单使用。sudo apt-get install kvm libvirt-bin ubuntu-vm-builder bridge-utils kvm-pxe uml-utilities.yum install kvm kmod-kvm qemu libvirt python-virtinst.$ lsmod | grep kvmkvm_amd 50452 0kvm 109264 1 kvm_amd.这个是 RedHat 开发,大家想了解可以到 http://virt- manager.et.redhat.com/ 上... 阅2559 转13 评0 公众公开 12-04-28 17:20 |
Unlike Xen, it is not necessary to run a special version of the kernel in order to support KVM. As a result KVM support is already available for use with the standard kernel via the installation of a KVM kernel module, thereby negating the need to install and boot from a special kernel.Note that if the system contains... 阅199 转2 评0 公众公开 12-04-25 22:06 |