KVMandCPUfeatureenablementEduardoHabkostDeveloperConference2014AgendaBasicconceptsExistingmechanismsandcurrentchallengesCurrentworkandfutureplans!
2BasicsIntroduction:Basics!
4HostCPU(management)KernelQEMUKVMVMGuestOSlibvirtIntroduction:Basics!
4command-line,monitor(QMP)HostCPU(management)KernelQEMUKVMVMGuestOSlibvirtIntroduction:StableguestABIGuestOSshouldseethe"same"machine,evenifthehostsystemhaschangedHardrequirementforlivemigrationSoftrequirementfornon-livemigrationHostsystemmaychangealot,butVMshouldlookthesame!
5x86CPUIDinstructionReturnsinformationabouttherunningCPUMostinformationshownon/proc/cpuinfoFeatureagsindicatingafeatureispresentOthermorecomplexdatae.
g.
:cacheandtopologyinformationCPUIDdataispartofguestABI!
6ExistingMechanismsCPUIDhandling!
8HOSTCPUQEMUGuestOSKernelCPUIDhandling!
8HOSTCPUQEMUGuestOSKernelGET_SUPPORTED_CPUIDHostCPUIDinstructionCPUIDhandling!
8HOSTCPUQEMUGuestOSCPUIDtableSET_CPUIDKernelGET_SUPPORTED_CPUIDHostCPUIDinstructionCPUIDhandling!
8HOSTCPUQEMUGuestOSCPUIDtableSET_CPUIDKernelGET_SUPPORTED_CPUIDHostCPUIDinstructionemulateCPUIDGuestCPUIDinstructionHostCPU(management)KernelQEMUKVMVMGuestOSlibvirtTheStack!
9Decisiontoenableafeature(shouldbe)takenintheupperlayersLowerlayersaffecttheabilitytoenableafeatureEnablingnewfeaturesWecan'tsilentlyenableordisableafeature:ItbreaksguestABIMayunexpectedlypreventmigrationtoother(lesspowerful)hosts!
10CPUmodelsCPUmodeltable,differentCPUIDdataoneachentryqemu-system-x86_64-cpuSandyBridgeqemu-system-x86_64-cpuHaswellControllingindividualfeatures.
e.
g.
:-cpuNehalem,+aesCPUmodelentriesmaychange,machine-typeskeepcompatibilityqemu-system-x86_64-machinepc-1.
6-cpuSandyBridgeqemu-system-x86_64-machinepc-1.
7-cpuSandyBridgeenforceag.
e.
g.
:-cpuSandyBridge,enforceRequiredtoensurepredictableresults!
11CPUmodelsSpecialCPUmodel:-cpuhostWillenableeverythingthat'ssupportedbythehostNostableguestABI!
12ManagementrequirementsEnsuringthattheresultingCPUIDdataiswhatwasaskedforKnowingwhichCPUmodelscanbeenabledinahostKnowingwhichfeaturesareavailableinahostKnowingtowhichhostsaVMcanbemigrated!
13IssuesHostCPU(management)KernelQEMUKVMVMGuestOSlibvirtProblem:queryingCPUmodelinformationlibvirthasitsownlistofCPUmodelslibvirtdoesn'tknowQEMUCPUmodelscanchangeovertimeQEMU'sfault,there'snogoodAPIforthat(yet!
)!
15CPUmodellistQEMUCPUmodellistHostCPU(management)KernelQEMUKVMVMGuestOSlibvirtProblem:no"enforce"modelibvirtdoesn'tusetheenforceagErrorreportingnotmachine-friendlyMostseriousissuesofarFixinvolvesimplementingCPUmodelandhostcapabilityAPIs!
16X,Z-cpu…,+X,+Y,+ZX!
(noY)!
(noZ)X,YHostCPU(management)KernelQEMUKVMVMGuestOSlibvirtProblem:queryinghostcapabilitieslibvirtquerieshostCPUfeaturesdirectlyusingCPUIDinstructionIgnoresKVMcapabilitiesIgnoresQEMUcapabilitiesIgnoresfeaturesthatrequireextraCPUcapabilitiesQEMU'sfault,there'snogoodAPIforthat(yet!
)!
17SolutionsSolutionsExistinginterfaces:CPU-specicoptionsandcommands-cpu,cpu-add,query-cpu-definitionsNewinterfaces:basedoncommoninfrastructure(QDev,QOM)!
19QDevQDev=QEMUDeviceModelQOM=QEMUObjectModelQDevdevicesareQOMobjects-devicecommand-lineoptionQMPcommands:Addingdevices/objects(device_add,object-add)Removingdevices/objects(device_del,object-del)Getting/settingdevicesproperties(qom-get,qom-set)Listingobjectsandobjectclasses(qom-list,qom-list-types)!
20QDev-basedsolutionCPUsareQDevdevices(done)CPUdevicesanditspropertiesvisiblethroughQMPfeature-wordsproperty(done)QueryCPUmodelinfoQueryhostcapabilities("host"CPUmodel)Incomplete:nomachine-type-specicdatafiltered-featuresproperty(done)Usedtoemulate"enforce"modewithbettererrorreportingNotusedbylibvirtyet!
21What'smissing(1/2)QueryingCPUmodelinformationwithoutre-runningQEMUSolution:separateQOMtypesforeachCPUmodelExposingmachine-type-specicdataNodenedsolutionyetUseQOMpropertiestocontrolallfeatureagsChanginglibvirttousethenewstuff!
22What'smissing(2/2)Longtermplans:Deprecate-cpu,cpu-addanduseonlyQDevcommands(-device,device_add)BetterinterfacestospecifyCPUtopology(NUMAnodes,sockets,cores,threads)!
23FutureReportingcapabilitiesreliablysmartermanagementsystemsUsability(automaticallychoosinggooddefaults)SmarterVMschedulingMayrequireextendinglibvirtAPI!
24ThanksFeedback:http://devconf.
cz/f/34!
Additionalinfo/pointers:http://wiki.
qemu.
org/Features/CPUModelsehabkost@redhat.
com!
Questions!
25
gigsgigsCloud日本东京软银VPS的大带宽配置有100Mbps、150Mbps和200Mbps三种,三网都走软银直连,售价最低9.8美元/月、年付98美元。gigsgigscloud带宽较大延迟低,联通用户的好选择!Gigsgigscloud 日本软银(BBTEC, SoftBank)线路,在速度/延迟/价格方面,是目前联通用户海外VPS的最佳选择,与美国VPS想比,日本软银VPS延迟更...
妮妮云的来历妮妮云是 789 陈总 张总 三方共同投资建立的网站 本着“良心 便宜 稳定”的初衷 为小白用户避免被坑妮妮云的市场定位妮妮云主要代理市场稳定速度的云服务器产品,避免新手购买云服务器的时候众多商家不知道如何选择,妮妮云就帮你选择好了产品,无需承担购买风险,不用担心出现被跑路 被诈骗的情况。妮妮云的售后保证妮妮云退款 通过于合作商的友好协商,云服务器提供2天内全额退款到网站余额,超过2天...
pacificrack怎么样?pacificrack商家发布了七月最新优惠VPS云服务器计划方案,推出新款优惠便宜VPS云服务器采用的是国产魔方管理系统,也就是PR-M系列,全系基于KVM虚拟架构,这次支持Windows server 2003、2008R2、2012R2、2016、2019、Windows 7、Windows 10以及Linux等操作系统,最低配置为1核心2G内存1Gbps带宽1...
sandybridge为你推荐
funnymudpee京东的显卡什么时候能降回正常价格啊,想买个1060梦之队官网梦之队是什么呢?是那个国家的呢?他们又是参加那个项目的呢?得了几块金牌呢?阿丽克丝·布莱肯瑞吉阿丽克斯布莱肯瑞吉演的美国恐怖故事哪两集seo优化工具seo优化软件有哪些?百度关键词分析百度关键字分析是什么意思?www.javmoo.comjavimdb怎么看33tutu.comDnf绝望100鬼泣怎么过66smsm.comffff66com手机可以观看视频吗?hao.rising.cn如何解除瑞星主页锁定(hao.rising.cn). 不想用瑞星安全助手彪言彪语( )言( )语的词语
上海vps 花生壳免费域名申请 华为云服务 香港vps99idc burstnet 标准机柜尺寸 大容量存储器 admit的用法 200g硬盘 nerds 100m独享 河南移动网 能外链的相册 万网空间管理 1元域名 宏讯 空间申请 国内空间 重庆服务器 网络速度 更多