虚拟化Virtualization
文章平均质量分 60
shirleylinyuer
kvm qemu libvirt
展开
-
How to debug qemu and libvirt using gdb
Think about this: you are going to start a virtual machine using qemu command line or libvirt xml or virt-install command line, but fails due to some errors. Now you would like to see what is going on原创 2018-01-20 18:07:10 · 580 阅读 · 0 评论 -
QEMU/Libvirt xml/virt-install: Three common ways(virbr0/macvtap/bridge) to add the netdev for the vm
方法一:借助于libvirt自带的virbr0。特征:采用NAT方式,让虚拟机拥有内部IP地址。- 前提:在host上启动‘default’网络设备。如果已经安装了libvirt,会默认在系统中创建一个名为virbr0的bridge以及一个名为default的网络设备。# brctl showbridge name bridge id STP enabled interf...原创 2018-02-27 16:45:19 · 1013 阅读 · 0 评论 -
Introduce ipmi device emulations via qemu/virsh cmd line for the power management of the hypervisor
Introduce ipmi device emulations for the power management of the hypervisorI. IPMI (intelligent platform maintenance interface)II. Use the qemu & virsh command line as the "startcmd" parameter for...原创 2018-03-09 11:41:22 · 1756 阅读 · 0 评论 -
How to debug qemu using trace-event?
The following steps is an example to use trace-event (the tracing infrastrucure) to print useful qemu logs.1. git clone git://git.qemu-project.org/qemu.git2. cd qemu3. Make sure you add trace_xxx(args...原创 2018-05-11 16:13:03 · 950 阅读 · 0 评论 -
Qemu内存管理代码分析1:qemu (tag: v3.0.0-rc1) 命令行配置guest ram及machine_class_init的QOM调用
基于qemu (tag: v3.0.0-rc1)的代码分析,本文主要讲述两部分:一、概述qemu命令行配置guest ram (e.g. -m size=?,slot=n,maxmem=??)涉及的主要函数和调用过程二、默认的guest ram配置是在machine_class_init()函数中,代码分析QOM中.class_init()的初始化及调用过程。最后分别给出...原创 2018-10-31 23:14:33 · 489 阅读 · 0 评论 -
Qemu内存管理主要结构体分析2:MemoryRegion/AddressSpace/FlatView
文章主要分析qemu在guest内存管理中用到的主要结构体MemoryRegion、AddressSpace、FlatView、MemoryListener一、简介1. Multiple types of MemoryRegion (MemoryRegion直接操作内存,每一棵MR树的树根对应一个RAMBlock,其host即为通过mmap()分配的HVA) - RAM: a rang...原创 2018-10-31 23:40:37 · 2260 阅读 · 0 评论 -
Qemu内存管理代码分析3:guest ram 的初始化及分配
文章根据qemu (tag: v3.0.0-rc1) 的代码讲解,主要讲述函数过程调用,隐去具体细节。一、1. 全局MemoryRegion: system_memory以及system_io的初始化 2. GPA (guest physical address) 与HVA (host virtual address)的公共代码的分析,稍后会分别针对x86_64架构以及s39...原创 2018-11-01 00:36:53 · 818 阅读 · 0 评论 -
Qemu: How to create the bridge device, bus, and pci device.
How to create bridge device, bus, and pci device.As we all know, the "device and bus" architecture in qemu is that, a pcidevice should attach to a pci bus, and a pci bus should add to a bridgedevi...原创 2018-11-05 21:18:32 · 697 阅读 · 0 评论 -
vfio-pci-passthrough (代码分析,已上传PDF:https://download.csdn.net/download/shirleylinyuer/1089846。博客中慢慢添加)
PS:尚未有时间从PDF中整理出来,如着急查看全文版请参考https://download.csdn.net/download/shirleylinyuer/10898465Summary➢ What is VFIO/IOMMU? Why want them?➢ VFIO – qemu part➢ VFIO – kernel part➢ VFIO usage: how to p...原创 2019-01-05 22:54:53 · 1175 阅读 · 0 评论