qapi-schema.json 166 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374
  1. # -*- Mode: Python -*-
  2. ##
  3. # = Introduction
  4. #
  5. # This document describes all commands currently supported by QMP.
  6. #
  7. # Most of the time their usage is exactly the same as in the user Monitor, this
  8. # means that any other document which also describe commands (the manpage,
  9. # QEMU's manual, etc) can and should be consulted.
  10. #
  11. # QMP has two types of commands: regular and query commands. Regular commands
  12. # usually change the Virtual Machine's state someway, while query commands just
  13. # return information. The sections below are divided accordingly.
  14. #
  15. # It's important to observe that all communication examples are formatted in
  16. # a reader-friendly way, so that they're easier to understand. However, in real
  17. # protocol usage, they're emitted as a single line.
  18. #
  19. # Also, the following notation is used to denote data flow:
  20. #
  21. # Example:
  22. #
  23. # | -> data issued by the Client
  24. # | <- Server data response
  25. #
  26. # Please, refer to the QMP specification (docs/qmp-spec.txt) for
  27. # detailed information on the Server command and response formats.
  28. #
  29. # = Stability Considerations
  30. #
  31. # The current QMP command set (described in this file) may be useful for a
  32. # number of use cases, however it's limited and several commands have bad
  33. # defined semantics, specially with regard to command completion.
  34. #
  35. # These problems are going to be solved incrementally in the next QEMU releases
  36. # and we're going to establish a deprecation policy for badly defined commands.
  37. #
  38. # If you're planning to adopt QMP, please observe the following:
  39. #
  40. # 1. The deprecation policy will take effect and be documented soon, please
  41. # check the documentation of each used command as soon as a new release of
  42. # QEMU is available
  43. #
  44. # 2. DO NOT rely on anything which is not explicit documented
  45. #
  46. # 3. Errors, in special, are not documented. Applications should NOT check
  47. # for specific errors classes or data (it's strongly recommended to only
  48. # check for the "error" key)
  49. #
  50. ##
  51. { 'pragma': { 'doc-required': true } }
  52. # Whitelists to permit QAPI rule violations; think twice before you
  53. # add to them!
  54. { 'pragma': {
  55. # Commands allowed to return a non-dictionary:
  56. 'returns-whitelist': [
  57. 'human-monitor-command',
  58. 'qom-get',
  59. 'query-migrate-cache-size',
  60. 'query-tpm-models',
  61. 'query-tpm-types',
  62. 'ringbuf-read' ],
  63. 'name-case-whitelist': [
  64. 'ACPISlotType', # DIMM, visible through query-acpi-ospm-status
  65. 'CpuInfoMIPS', # PC, visible through query-cpu
  66. 'CpuInfoTricore', # PC, visible through query-cpu
  67. 'QapiErrorClass', # all members, visible through errors
  68. 'UuidInfo', # UUID, visible through query-uuid
  69. 'X86CPURegister32', # all members, visible indirectly through qom-get
  70. 'q_obj_CpuInfo-base' # CPU, visible through query-cpu
  71. ] } }
  72. # QAPI common definitions
  73. { 'include': 'qapi/common.json' }
  74. # QAPI crypto definitions
  75. { 'include': 'qapi/crypto.json' }
  76. # QAPI block definitions
  77. { 'include': 'qapi/block.json' }
  78. # QAPI event definitions
  79. { 'include': 'qapi/event.json' }
  80. # Tracing commands
  81. { 'include': 'qapi/trace.json' }
  82. # QAPI introspection
  83. { 'include': 'qapi/introspect.json' }
  84. ##
  85. # = QMP commands
  86. ##
  87. ##
  88. # @qmp_capabilities:
  89. #
  90. # Enable QMP capabilities.
  91. #
  92. # Arguments: None.
  93. #
  94. # Example:
  95. #
  96. # -> { "execute": "qmp_capabilities" }
  97. # <- { "return": {} }
  98. #
  99. # Notes: This command is valid exactly when first connecting: it must be
  100. # issued before any other command will be accepted, and will fail once the
  101. # monitor is accepting other commands. (see qemu docs/qmp-spec.txt)
  102. #
  103. # Since: 0.13
  104. #
  105. ##
  106. { 'command': 'qmp_capabilities' }
  107. ##
  108. # @LostTickPolicy:
  109. #
  110. # Policy for handling lost ticks in timer devices.
  111. #
  112. # @discard: throw away the missed tick(s) and continue with future injection
  113. # normally. Guest time may be delayed, unless the OS has explicit
  114. # handling of lost ticks
  115. #
  116. # @delay: continue to deliver ticks at the normal rate. Guest time will be
  117. # delayed due to the late tick
  118. #
  119. # @merge: merge the missed tick(s) into one tick and inject. Guest time
  120. # may be delayed, depending on how the OS reacts to the merging
  121. # of ticks
  122. #
  123. # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
  124. # guest time should not be delayed once catchup is complete.
  125. #
  126. # Since: 2.0
  127. ##
  128. { 'enum': 'LostTickPolicy',
  129. 'data': ['discard', 'delay', 'merge', 'slew' ] }
  130. ##
  131. # @add_client:
  132. #
  133. # Allow client connections for VNC, Spice and socket based
  134. # character devices to be passed in to QEMU via SCM_RIGHTS.
  135. #
  136. # @protocol: protocol name. Valid names are "vnc", "spice" or the
  137. # name of a character device (eg. from -chardev id=XXXX)
  138. #
  139. # @fdname: file descriptor name previously passed via 'getfd' command
  140. #
  141. # @skipauth: whether to skip authentication. Only applies
  142. # to "vnc" and "spice" protocols
  143. #
  144. # @tls: whether to perform TLS. Only applies to the "spice"
  145. # protocol
  146. #
  147. # Returns: nothing on success.
  148. #
  149. # Since: 0.14.0
  150. #
  151. # Example:
  152. #
  153. # -> { "execute": "add_client", "arguments": { "protocol": "vnc",
  154. # "fdname": "myclient" } }
  155. # <- { "return": {} }
  156. #
  157. ##
  158. { 'command': 'add_client',
  159. 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
  160. '*tls': 'bool' } }
  161. ##
  162. # @NameInfo:
  163. #
  164. # Guest name information.
  165. #
  166. # @name: The name of the guest
  167. #
  168. # Since: 0.14.0
  169. ##
  170. { 'struct': 'NameInfo', 'data': {'*name': 'str'} }
  171. ##
  172. # @query-name:
  173. #
  174. # Return the name information of a guest.
  175. #
  176. # Returns: @NameInfo of the guest
  177. #
  178. # Since: 0.14.0
  179. #
  180. # Example:
  181. #
  182. # -> { "execute": "query-name" }
  183. # <- { "return": { "name": "qemu-name" } }
  184. #
  185. ##
  186. { 'command': 'query-name', 'returns': 'NameInfo' }
  187. ##
  188. # @KvmInfo:
  189. #
  190. # Information about support for KVM acceleration
  191. #
  192. # @enabled: true if KVM acceleration is active
  193. #
  194. # @present: true if KVM acceleration is built into this executable
  195. #
  196. # Since: 0.14.0
  197. ##
  198. { 'struct': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
  199. ##
  200. # @query-kvm:
  201. #
  202. # Returns information about KVM acceleration
  203. #
  204. # Returns: @KvmInfo
  205. #
  206. # Since: 0.14.0
  207. #
  208. # Example:
  209. #
  210. # -> { "execute": "query-kvm" }
  211. # <- { "return": { "enabled": true, "present": true } }
  212. #
  213. ##
  214. { 'command': 'query-kvm', 'returns': 'KvmInfo' }
  215. ##
  216. # @RunState:
  217. #
  218. # An enumeration of VM run states.
  219. #
  220. # @debug: QEMU is running on a debugger
  221. #
  222. # @finish-migrate: guest is paused to finish the migration process
  223. #
  224. # @inmigrate: guest is paused waiting for an incoming migration. Note
  225. # that this state does not tell whether the machine will start at the
  226. # end of the migration. This depends on the command-line -S option and
  227. # any invocation of 'stop' or 'cont' that has happened since QEMU was
  228. # started.
  229. #
  230. # @internal-error: An internal error that prevents further guest execution
  231. # has occurred
  232. #
  233. # @io-error: the last IOP has failed and the device is configured to pause
  234. # on I/O errors
  235. #
  236. # @paused: guest has been paused via the 'stop' command
  237. #
  238. # @postmigrate: guest is paused following a successful 'migrate'
  239. #
  240. # @prelaunch: QEMU was started with -S and guest has not started
  241. #
  242. # @restore-vm: guest is paused to restore VM state
  243. #
  244. # @running: guest is actively running
  245. #
  246. # @save-vm: guest is paused to save the VM state
  247. #
  248. # @shutdown: guest is shut down (and -no-shutdown is in use)
  249. #
  250. # @suspended: guest is suspended (ACPI S3)
  251. #
  252. # @watchdog: the watchdog action is configured to pause and has been triggered
  253. #
  254. # @guest-panicked: guest has been panicked as a result of guest OS panic
  255. #
  256. # @colo: guest is paused to save/restore VM state under colo checkpoint,
  257. # VM can not get into this state unless colo capability is enabled
  258. # for migration. (since 2.8)
  259. ##
  260. { 'enum': 'RunState',
  261. 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
  262. 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
  263. 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
  264. 'guest-panicked', 'colo' ] }
  265. ##
  266. # @StatusInfo:
  267. #
  268. # Information about VCPU run state
  269. #
  270. # @running: true if all VCPUs are runnable, false if not runnable
  271. #
  272. # @singlestep: true if VCPUs are in single-step mode
  273. #
  274. # @status: the virtual machine @RunState
  275. #
  276. # Since: 0.14.0
  277. #
  278. # Notes: @singlestep is enabled through the GDB stub
  279. ##
  280. { 'struct': 'StatusInfo',
  281. 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
  282. ##
  283. # @query-status:
  284. #
  285. # Query the run status of all VCPUs
  286. #
  287. # Returns: @StatusInfo reflecting all VCPUs
  288. #
  289. # Since: 0.14.0
  290. #
  291. # Example:
  292. #
  293. # -> { "execute": "query-status" }
  294. # <- { "return": { "running": true,
  295. # "singlestep": false,
  296. # "status": "running" } }
  297. #
  298. ##
  299. { 'command': 'query-status', 'returns': 'StatusInfo' }
  300. ##
  301. # @UuidInfo:
  302. #
  303. # Guest UUID information (Universally Unique Identifier).
  304. #
  305. # @UUID: the UUID of the guest
  306. #
  307. # Since: 0.14.0
  308. #
  309. # Notes: If no UUID was specified for the guest, a null UUID is returned.
  310. ##
  311. { 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
  312. ##
  313. # @query-uuid:
  314. #
  315. # Query the guest UUID information.
  316. #
  317. # Returns: The @UuidInfo for the guest
  318. #
  319. # Since: 0.14.0
  320. #
  321. # Example:
  322. #
  323. # -> { "execute": "query-uuid" }
  324. # <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
  325. #
  326. ##
  327. { 'command': 'query-uuid', 'returns': 'UuidInfo' }
  328. ##
  329. # @ChardevInfo:
  330. #
  331. # Information about a character device.
  332. #
  333. # @label: the label of the character device
  334. #
  335. # @filename: the filename of the character device
  336. #
  337. # @frontend-open: shows whether the frontend device attached to this backend
  338. # (eg. with the chardev=... option) is in open or closed state
  339. # (since 2.1)
  340. #
  341. # Notes: @filename is encoded using the QEMU command line character device
  342. # encoding. See the QEMU man page for details.
  343. #
  344. # Since: 0.14.0
  345. ##
  346. { 'struct': 'ChardevInfo', 'data': {'label': 'str',
  347. 'filename': 'str',
  348. 'frontend-open': 'bool'} }
  349. ##
  350. # @query-chardev:
  351. #
  352. # Returns information about current character devices.
  353. #
  354. # Returns: a list of @ChardevInfo
  355. #
  356. # Since: 0.14.0
  357. #
  358. # Example:
  359. #
  360. # -> { "execute": "query-chardev" }
  361. # <- {
  362. # "return": [
  363. # {
  364. # "label": "charchannel0",
  365. # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
  366. # "frontend-open": false
  367. # },
  368. # {
  369. # "label": "charmonitor",
  370. # "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
  371. # "frontend-open": true
  372. # },
  373. # {
  374. # "label": "charserial0",
  375. # "filename": "pty:/dev/pts/2",
  376. # "frontend-open": true
  377. # }
  378. # ]
  379. # }
  380. #
  381. ##
  382. { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
  383. ##
  384. # @ChardevBackendInfo:
  385. #
  386. # Information about a character device backend
  387. #
  388. # @name: The backend name
  389. #
  390. # Since: 2.0
  391. ##
  392. { 'struct': 'ChardevBackendInfo', 'data': {'name': 'str'} }
  393. ##
  394. # @query-chardev-backends:
  395. #
  396. # Returns information about character device backends.
  397. #
  398. # Returns: a list of @ChardevBackendInfo
  399. #
  400. # Since: 2.0
  401. #
  402. # Example:
  403. #
  404. # -> { "execute": "query-chardev-backends" }
  405. # <- {
  406. # "return":[
  407. # {
  408. # "name":"udp"
  409. # },
  410. # {
  411. # "name":"tcp"
  412. # },
  413. # {
  414. # "name":"unix"
  415. # },
  416. # {
  417. # "name":"spiceport"
  418. # }
  419. # ]
  420. # }
  421. #
  422. ##
  423. { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
  424. ##
  425. # @DataFormat:
  426. #
  427. # An enumeration of data format.
  428. #
  429. # @utf8: Data is a UTF-8 string (RFC 3629)
  430. #
  431. # @base64: Data is Base64 encoded binary (RFC 3548)
  432. #
  433. # Since: 1.4
  434. ##
  435. { 'enum': 'DataFormat',
  436. 'data': [ 'utf8', 'base64' ] }
  437. ##
  438. # @ringbuf-write:
  439. #
  440. # Write to a ring buffer character device.
  441. #
  442. # @device: the ring buffer character device name
  443. #
  444. # @data: data to write
  445. #
  446. # @format: data encoding (default 'utf8').
  447. # - base64: data must be base64 encoded text. Its binary
  448. # decoding gets written.
  449. # - utf8: data's UTF-8 encoding is written
  450. # - data itself is always Unicode regardless of format, like
  451. # any other string.
  452. #
  453. # Returns: Nothing on success
  454. #
  455. # Since: 1.4
  456. #
  457. # Example:
  458. #
  459. # -> { "execute": "ringbuf-write",
  460. # "arguments": { "device": "foo",
  461. # "data": "abcdefgh",
  462. # "format": "utf8" } }
  463. # <- { "return": {} }
  464. #
  465. ##
  466. { 'command': 'ringbuf-write',
  467. 'data': {'device': 'str', 'data': 'str',
  468. '*format': 'DataFormat'} }
  469. ##
  470. # @ringbuf-read:
  471. #
  472. # Read from a ring buffer character device.
  473. #
  474. # @device: the ring buffer character device name
  475. #
  476. # @size: how many bytes to read at most
  477. #
  478. # @format: data encoding (default 'utf8').
  479. # - base64: the data read is returned in base64 encoding.
  480. # - utf8: the data read is interpreted as UTF-8.
  481. # Bug: can screw up when the buffer contains invalid UTF-8
  482. # sequences, NUL characters, after the ring buffer lost
  483. # data, and when reading stops because the size limit is
  484. # reached.
  485. # - The return value is always Unicode regardless of format,
  486. # like any other string.
  487. #
  488. # Returns: data read from the device
  489. #
  490. # Since: 1.4
  491. #
  492. # Example:
  493. #
  494. # -> { "execute": "ringbuf-read",
  495. # "arguments": { "device": "foo",
  496. # "size": 1000,
  497. # "format": "utf8" } }
  498. # <- { "return": "abcdefgh" }
  499. #
  500. ##
  501. { 'command': 'ringbuf-read',
  502. 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
  503. 'returns': 'str' }
  504. ##
  505. # @EventInfo:
  506. #
  507. # Information about a QMP event
  508. #
  509. # @name: The event name
  510. #
  511. # Since: 1.2.0
  512. ##
  513. { 'struct': 'EventInfo', 'data': {'name': 'str'} }
  514. ##
  515. # @query-events:
  516. #
  517. # Return a list of supported QMP events by this server
  518. #
  519. # Returns: A list of @EventInfo for all supported events
  520. #
  521. # Since: 1.2.0
  522. #
  523. # Example:
  524. #
  525. # -> { "execute": "query-events" }
  526. # <- {
  527. # "return": [
  528. # {
  529. # "name":"SHUTDOWN"
  530. # },
  531. # {
  532. # "name":"RESET"
  533. # }
  534. # ]
  535. # }
  536. #
  537. # Note: This example has been shortened as the real response is too long.
  538. #
  539. ##
  540. { 'command': 'query-events', 'returns': ['EventInfo'] }
  541. ##
  542. # @MigrationStats:
  543. #
  544. # Detailed migration status.
  545. #
  546. # @transferred: amount of bytes already transferred to the target VM
  547. #
  548. # @remaining: amount of bytes remaining to be transferred to the target VM
  549. #
  550. # @total: total amount of bytes involved in the migration process
  551. #
  552. # @duplicate: number of duplicate (zero) pages (since 1.2)
  553. #
  554. # @skipped: number of skipped zero pages (since 1.5)
  555. #
  556. # @normal: number of normal pages (since 1.2)
  557. #
  558. # @normal-bytes: number of normal bytes sent (since 1.2)
  559. #
  560. # @dirty-pages-rate: number of pages dirtied by second by the
  561. # guest (since 1.3)
  562. #
  563. # @mbps: throughput in megabits/sec. (since 1.6)
  564. #
  565. # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
  566. #
  567. # @postcopy-requests: The number of page requests received from the destination
  568. # (since 2.7)
  569. #
  570. # @page-size: The number of bytes per page for the various page-based
  571. # statistics (since 2.10)
  572. #
  573. # Since: 0.14.0
  574. ##
  575. { 'struct': 'MigrationStats',
  576. 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
  577. 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
  578. 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
  579. 'mbps' : 'number', 'dirty-sync-count' : 'int',
  580. 'postcopy-requests' : 'int', 'page-size' : 'int' } }
  581. ##
  582. # @XBZRLECacheStats:
  583. #
  584. # Detailed XBZRLE migration cache statistics
  585. #
  586. # @cache-size: XBZRLE cache size
  587. #
  588. # @bytes: amount of bytes already transferred to the target VM
  589. #
  590. # @pages: amount of pages transferred to the target VM
  591. #
  592. # @cache-miss: number of cache miss
  593. #
  594. # @cache-miss-rate: rate of cache miss (since 2.1)
  595. #
  596. # @overflow: number of overflows
  597. #
  598. # Since: 1.2
  599. ##
  600. { 'struct': 'XBZRLECacheStats',
  601. 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
  602. 'cache-miss': 'int', 'cache-miss-rate': 'number',
  603. 'overflow': 'int' } }
  604. ##
  605. # @MigrationStatus:
  606. #
  607. # An enumeration of migration status.
  608. #
  609. # @none: no migration has ever happened.
  610. #
  611. # @setup: migration process has been initiated.
  612. #
  613. # @cancelling: in the process of cancelling migration.
  614. #
  615. # @cancelled: cancelling migration is finished.
  616. #
  617. # @active: in the process of doing migration.
  618. #
  619. # @postcopy-active: like active, but now in postcopy mode. (since 2.5)
  620. #
  621. # @completed: migration is finished.
  622. #
  623. # @failed: some error occurred during migration process.
  624. #
  625. # @colo: VM is in the process of fault tolerance, VM can not get into this
  626. # state unless colo capability is enabled for migration. (since 2.8)
  627. #
  628. # Since: 2.3
  629. #
  630. ##
  631. { 'enum': 'MigrationStatus',
  632. 'data': [ 'none', 'setup', 'cancelling', 'cancelled',
  633. 'active', 'postcopy-active', 'completed', 'failed', 'colo' ] }
  634. ##
  635. # @MigrationInfo:
  636. #
  637. # Information about current migration process.
  638. #
  639. # @status: @MigrationStatus describing the current migration status.
  640. # If this field is not returned, no migration process
  641. # has been initiated
  642. #
  643. # @ram: @MigrationStats containing detailed migration
  644. # status, only returned if status is 'active' or
  645. # 'completed'(since 1.2)
  646. #
  647. # @disk: @MigrationStats containing detailed disk migration
  648. # status, only returned if status is 'active' and it is a block
  649. # migration
  650. #
  651. # @xbzrle-cache: @XBZRLECacheStats containing detailed XBZRLE
  652. # migration statistics, only returned if XBZRLE feature is on and
  653. # status is 'active' or 'completed' (since 1.2)
  654. #
  655. # @total-time: total amount of milliseconds since migration started.
  656. # If migration has ended, it returns the total migration
  657. # time. (since 1.2)
  658. #
  659. # @downtime: only present when migration finishes correctly
  660. # total downtime in milliseconds for the guest.
  661. # (since 1.3)
  662. #
  663. # @expected-downtime: only present while migration is active
  664. # expected downtime in milliseconds for the guest in last walk
  665. # of the dirty bitmap. (since 1.3)
  666. #
  667. # @setup-time: amount of setup time in milliseconds _before_ the
  668. # iterations begin but _after_ the QMP command is issued. This is designed
  669. # to provide an accounting of any activities (such as RDMA pinning) which
  670. # may be expensive, but do not actually occur during the iterative
  671. # migration rounds themselves. (since 1.6)
  672. #
  673. # @cpu-throttle-percentage: percentage of time guest cpus are being
  674. # throttled during auto-converge. This is only present when auto-converge
  675. # has started throttling guest cpus. (Since 2.7)
  676. #
  677. # @error-desc: the human readable error description string, when
  678. # @status is 'failed'. Clients should not attempt to parse the
  679. # error strings. (Since 2.7)
  680. #
  681. # Since: 0.14.0
  682. ##
  683. { 'struct': 'MigrationInfo',
  684. 'data': {'*status': 'MigrationStatus', '*ram': 'MigrationStats',
  685. '*disk': 'MigrationStats',
  686. '*xbzrle-cache': 'XBZRLECacheStats',
  687. '*total-time': 'int',
  688. '*expected-downtime': 'int',
  689. '*downtime': 'int',
  690. '*setup-time': 'int',
  691. '*cpu-throttle-percentage': 'int',
  692. '*error-desc': 'str'} }
  693. ##
  694. # @query-migrate:
  695. #
  696. # Returns information about current migration process. If migration
  697. # is active there will be another json-object with RAM migration
  698. # status and if block migration is active another one with block
  699. # migration status.
  700. #
  701. # Returns: @MigrationInfo
  702. #
  703. # Since: 0.14.0
  704. #
  705. # Example:
  706. #
  707. # 1. Before the first migration
  708. #
  709. # -> { "execute": "query-migrate" }
  710. # <- { "return": {} }
  711. #
  712. # 2. Migration is done and has succeeded
  713. #
  714. # -> { "execute": "query-migrate" }
  715. # <- { "return": {
  716. # "status": "completed",
  717. # "ram":{
  718. # "transferred":123,
  719. # "remaining":123,
  720. # "total":246,
  721. # "total-time":12345,
  722. # "setup-time":12345,
  723. # "downtime":12345,
  724. # "duplicate":123,
  725. # "normal":123,
  726. # "normal-bytes":123456,
  727. # "dirty-sync-count":15
  728. # }
  729. # }
  730. # }
  731. #
  732. # 3. Migration is done and has failed
  733. #
  734. # -> { "execute": "query-migrate" }
  735. # <- { "return": { "status": "failed" } }
  736. #
  737. # 4. Migration is being performed and is not a block migration:
  738. #
  739. # -> { "execute": "query-migrate" }
  740. # <- {
  741. # "return":{
  742. # "status":"active",
  743. # "ram":{
  744. # "transferred":123,
  745. # "remaining":123,
  746. # "total":246,
  747. # "total-time":12345,
  748. # "setup-time":12345,
  749. # "expected-downtime":12345,
  750. # "duplicate":123,
  751. # "normal":123,
  752. # "normal-bytes":123456,
  753. # "dirty-sync-count":15
  754. # }
  755. # }
  756. # }
  757. #
  758. # 5. Migration is being performed and is a block migration:
  759. #
  760. # -> { "execute": "query-migrate" }
  761. # <- {
  762. # "return":{
  763. # "status":"active",
  764. # "ram":{
  765. # "total":1057024,
  766. # "remaining":1053304,
  767. # "transferred":3720,
  768. # "total-time":12345,
  769. # "setup-time":12345,
  770. # "expected-downtime":12345,
  771. # "duplicate":123,
  772. # "normal":123,
  773. # "normal-bytes":123456,
  774. # "dirty-sync-count":15
  775. # },
  776. # "disk":{
  777. # "total":20971520,
  778. # "remaining":20880384,
  779. # "transferred":91136
  780. # }
  781. # }
  782. # }
  783. #
  784. # 6. Migration is being performed and XBZRLE is active:
  785. #
  786. # -> { "execute": "query-migrate" }
  787. # <- {
  788. # "return":{
  789. # "status":"active",
  790. # "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
  791. # "ram":{
  792. # "total":1057024,
  793. # "remaining":1053304,
  794. # "transferred":3720,
  795. # "total-time":12345,
  796. # "setup-time":12345,
  797. # "expected-downtime":12345,
  798. # "duplicate":10,
  799. # "normal":3333,
  800. # "normal-bytes":3412992,
  801. # "dirty-sync-count":15
  802. # },
  803. # "xbzrle-cache":{
  804. # "cache-size":67108864,
  805. # "bytes":20971520,
  806. # "pages":2444343,
  807. # "cache-miss":2244,
  808. # "cache-miss-rate":0.123,
  809. # "overflow":34434
  810. # }
  811. # }
  812. # }
  813. #
  814. ##
  815. { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
  816. ##
  817. # @MigrationCapability:
  818. #
  819. # Migration capabilities enumeration
  820. #
  821. # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
  822. # This feature allows us to minimize migration traffic for certain work
  823. # loads, by sending compressed difference of the pages
  824. #
  825. # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
  826. # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
  827. # Disabled by default. (since 2.0)
  828. #
  829. # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
  830. # essentially saves 1MB of zeroes per block on the wire. Enabling requires
  831. # source and target VM to support this feature. To enable it is sufficient
  832. # to enable the capability on the source VM. The feature is disabled by
  833. # default. (since 1.6)
  834. #
  835. # @compress: Use multiple compression threads to accelerate live migration.
  836. # This feature can help to reduce the migration traffic, by sending
  837. # compressed pages. Please note that if compress and xbzrle are both
  838. # on, compress only takes effect in the ram bulk stage, after that,
  839. # it will be disabled and only xbzrle takes effect, this can help to
  840. # minimize migration traffic. The feature is disabled by default.
  841. # (since 2.4 )
  842. #
  843. # @events: generate events for each migration state change
  844. # (since 2.4 )
  845. #
  846. # @auto-converge: If enabled, QEMU will automatically throttle down the guest
  847. # to speed up convergence of RAM migration. (since 1.6)
  848. #
  849. # @postcopy-ram: Start executing on the migration target before all of RAM has
  850. # been migrated, pulling the remaining pages along as needed. NOTE: If
  851. # the migration fails during postcopy the VM will fail. (since 2.6)
  852. #
  853. # @x-colo: If enabled, migration will never end, and the state of the VM on the
  854. # primary side will be migrated continuously to the VM on secondary
  855. # side, this process is called COarse-Grain LOck Stepping (COLO) for
  856. # Non-stop Service. (since 2.8)
  857. #
  858. # @release-ram: if enabled, qemu will free the migrated ram pages on the source
  859. # during postcopy-ram migration. (since 2.9)
  860. #
  861. # @block: If enabled, QEMU will also migrate the contents of all block
  862. # devices. Default is disabled. A possible alternative uses
  863. # mirror jobs to a builtin NBD server on the destination, which
  864. # offers more flexibility.
  865. # (Since 2.10)
  866. #
  867. # Since: 1.2
  868. ##
  869. { 'enum': 'MigrationCapability',
  870. 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks',
  871. 'compress', 'events', 'postcopy-ram', 'x-colo', 'release-ram',
  872. 'block' ] }
  873. ##
  874. # @MigrationCapabilityStatus:
  875. #
  876. # Migration capability information
  877. #
  878. # @capability: capability enum
  879. #
  880. # @state: capability state bool
  881. #
  882. # Since: 1.2
  883. ##
  884. { 'struct': 'MigrationCapabilityStatus',
  885. 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
  886. ##
  887. # @migrate-set-capabilities:
  888. #
  889. # Enable/Disable the following migration capabilities (like xbzrle)
  890. #
  891. # @capabilities: json array of capability modifications to make
  892. #
  893. # Since: 1.2
  894. #
  895. # Example:
  896. #
  897. # -> { "execute": "migrate-set-capabilities" , "arguments":
  898. # { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
  899. #
  900. ##
  901. { 'command': 'migrate-set-capabilities',
  902. 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
  903. ##
  904. # @query-migrate-capabilities:
  905. #
  906. # Returns information about the current migration capabilities status
  907. #
  908. # Returns: @MigrationCapabilitiesStatus
  909. #
  910. # Since: 1.2
  911. #
  912. # Example:
  913. #
  914. # -> { "execute": "query-migrate-capabilities" }
  915. # <- { "return": [
  916. # {"state": false, "capability": "xbzrle"},
  917. # {"state": false, "capability": "rdma-pin-all"},
  918. # {"state": false, "capability": "auto-converge"},
  919. # {"state": false, "capability": "zero-blocks"},
  920. # {"state": false, "capability": "compress"},
  921. # {"state": true, "capability": "events"},
  922. # {"state": false, "capability": "postcopy-ram"},
  923. # {"state": false, "capability": "x-colo"}
  924. # ]}
  925. #
  926. ##
  927. { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
  928. ##
  929. # @MigrationParameter:
  930. #
  931. # Migration parameters enumeration
  932. #
  933. # @compress-level: Set the compression level to be used in live migration,
  934. # the compression level is an integer between 0 and 9, where 0 means
  935. # no compression, 1 means the best compression speed, and 9 means best
  936. # compression ratio which will consume more CPU.
  937. #
  938. # @compress-threads: Set compression thread count to be used in live migration,
  939. # the compression thread count is an integer between 1 and 255.
  940. #
  941. # @decompress-threads: Set decompression thread count to be used in live
  942. # migration, the decompression thread count is an integer between 1
  943. # and 255. Usually, decompression is at least 4 times as fast as
  944. # compression, so set the decompress-threads to the number about 1/4
  945. # of compress-threads is adequate.
  946. #
  947. # @cpu-throttle-initial: Initial percentage of time guest cpus are throttled
  948. # when migration auto-converge is activated. The
  949. # default value is 20. (Since 2.7)
  950. #
  951. # @cpu-throttle-increment: throttle percentage increase each time
  952. # auto-converge detects that migration is not making
  953. # progress. The default value is 10. (Since 2.7)
  954. #
  955. # @tls-creds: ID of the 'tls-creds' object that provides credentials for
  956. # establishing a TLS connection over the migration data channel.
  957. # On the outgoing side of the migration, the credentials must
  958. # be for a 'client' endpoint, while for the incoming side the
  959. # credentials must be for a 'server' endpoint. Setting this
  960. # will enable TLS for all migrations. The default is unset,
  961. # resulting in unsecured migration at the QEMU level. (Since 2.7)
  962. #
  963. # @tls-hostname: hostname of the target host for the migration. This is
  964. # required when using x509 based TLS credentials and the
  965. # migration URI does not already include a hostname. For
  966. # example if using fd: or exec: based migration, the
  967. # hostname must be provided so that the server's x509
  968. # certificate identity can be validated. (Since 2.7)
  969. #
  970. # @max-bandwidth: to set maximum speed for migration. maximum speed in
  971. # bytes per second. (Since 2.8)
  972. #
  973. # @downtime-limit: set maximum tolerated downtime for migration. maximum
  974. # downtime in milliseconds (Since 2.8)
  975. #
  976. # @x-checkpoint-delay: The delay time (in ms) between two COLO checkpoints in
  977. # periodic mode. (Since 2.8)
  978. #
  979. # @block-incremental: Affects how much storage is migrated when the
  980. # block migration capability is enabled. When false, the entire
  981. # storage backing chain is migrated into a flattened image at
  982. # the destination; when true, only the active qcow2 layer is
  983. # migrated and the destination must already have access to the
  984. # same backing chain as was used on the source. (since 2.10)
  985. #
  986. # Since: 2.4
  987. ##
  988. { 'enum': 'MigrationParameter',
  989. 'data': ['compress-level', 'compress-threads', 'decompress-threads',
  990. 'cpu-throttle-initial', 'cpu-throttle-increment',
  991. 'tls-creds', 'tls-hostname', 'max-bandwidth',
  992. 'downtime-limit', 'x-checkpoint-delay', 'block-incremental' ] }
  993. ##
  994. # @migrate-set-parameters:
  995. #
  996. # Set various migration parameters.
  997. #
  998. # Since: 2.4
  999. #
  1000. # Example:
  1001. #
  1002. # -> { "execute": "migrate-set-parameters" ,
  1003. # "arguments": { "compress-level": 1 } }
  1004. #
  1005. ##
  1006. { 'command': 'migrate-set-parameters', 'boxed': true,
  1007. 'data': 'MigrationParameters' }
  1008. ##
  1009. # @MigrationParameters:
  1010. #
  1011. # Optional members can be omitted on input ('migrate-set-parameters')
  1012. # but most members will always be present on output
  1013. # ('query-migrate-parameters'), with the exception of tls-creds and
  1014. # tls-hostname.
  1015. #
  1016. # @compress-level: compression level
  1017. #
  1018. # @compress-threads: compression thread count
  1019. #
  1020. # @decompress-threads: decompression thread count
  1021. #
  1022. # @cpu-throttle-initial: Initial percentage of time guest cpus are
  1023. # throttledwhen migration auto-converge is activated.
  1024. # The default value is 20. (Since 2.7)
  1025. #
  1026. # @cpu-throttle-increment: throttle percentage increase each time
  1027. # auto-converge detects that migration is not making
  1028. # progress. The default value is 10. (Since 2.7)
  1029. #
  1030. # @tls-creds: ID of the 'tls-creds' object that provides credentials
  1031. # for establishing a TLS connection over the migration data
  1032. # channel. On the outgoing side of the migration, the credentials
  1033. # must be for a 'client' endpoint, while for the incoming side the
  1034. # credentials must be for a 'server' endpoint. Setting this
  1035. # will enable TLS for all migrations. The default is unset,
  1036. # resulting in unsecured migration at the QEMU level. (Since 2.7)
  1037. # An empty string means that QEMU will use plain text mode for
  1038. # migration, rather than TLS (Since 2.9)
  1039. #
  1040. # @tls-hostname: hostname of the target host for the migration. This
  1041. # is required when using x509 based TLS credentials and the
  1042. # migration URI does not already include a hostname. For
  1043. # example if using fd: or exec: based migration, the
  1044. # hostname must be provided so that the server's x509
  1045. # certificate identity can be validated. (Since 2.7)
  1046. # An empty string means that QEMU will use the hostname
  1047. # associated with the migration URI, if any. (Since 2.9)
  1048. #
  1049. # @max-bandwidth: to set maximum speed for migration. maximum speed in
  1050. # bytes per second. (Since 2.8)
  1051. #
  1052. # @downtime-limit: set maximum tolerated downtime for migration. maximum
  1053. # downtime in milliseconds (Since 2.8)
  1054. #
  1055. # @x-checkpoint-delay: the delay time between two COLO checkpoints. (Since 2.8)
  1056. #
  1057. # @block-incremental: Affects how much storage is migrated when the
  1058. # block migration capability is enabled. When false, the entire
  1059. # storage backing chain is migrated into a flattened image at
  1060. # the destination; when true, only the active qcow2 layer is
  1061. # migrated and the destination must already have access to the
  1062. # same backing chain as was used on the source. (since 2.10)
  1063. #
  1064. # Since: 2.4
  1065. ##
  1066. { 'struct': 'MigrationParameters',
  1067. 'data': { '*compress-level': 'int',
  1068. '*compress-threads': 'int',
  1069. '*decompress-threads': 'int',
  1070. '*cpu-throttle-initial': 'int',
  1071. '*cpu-throttle-increment': 'int',
  1072. '*tls-creds': 'str',
  1073. '*tls-hostname': 'str',
  1074. '*max-bandwidth': 'int',
  1075. '*downtime-limit': 'int',
  1076. '*x-checkpoint-delay': 'int',
  1077. '*block-incremental': 'bool' } }
  1078. ##
  1079. # @query-migrate-parameters:
  1080. #
  1081. # Returns information about the current migration parameters
  1082. #
  1083. # Returns: @MigrationParameters
  1084. #
  1085. # Since: 2.4
  1086. #
  1087. # Example:
  1088. #
  1089. # -> { "execute": "query-migrate-parameters" }
  1090. # <- { "return": {
  1091. # "decompress-threads": 2,
  1092. # "cpu-throttle-increment": 10,
  1093. # "compress-threads": 8,
  1094. # "compress-level": 1,
  1095. # "cpu-throttle-initial": 20,
  1096. # "max-bandwidth": 33554432,
  1097. # "downtime-limit": 300
  1098. # }
  1099. # }
  1100. #
  1101. ##
  1102. { 'command': 'query-migrate-parameters',
  1103. 'returns': 'MigrationParameters' }
  1104. ##
  1105. # @client_migrate_info:
  1106. #
  1107. # Set migration information for remote display. This makes the server
  1108. # ask the client to automatically reconnect using the new parameters
  1109. # once migration finished successfully. Only implemented for SPICE.
  1110. #
  1111. # @protocol: must be "spice"
  1112. # @hostname: migration target hostname
  1113. # @port: spice tcp port for plaintext channels
  1114. # @tls-port: spice tcp port for tls-secured channels
  1115. # @cert-subject: server certificate subject
  1116. #
  1117. # Since: 0.14.0
  1118. #
  1119. # Example:
  1120. #
  1121. # -> { "execute": "client_migrate_info",
  1122. # "arguments": { "protocol": "spice",
  1123. # "hostname": "virt42.lab.kraxel.org",
  1124. # "port": 1234 } }
  1125. # <- { "return": {} }
  1126. #
  1127. ##
  1128. { 'command': 'client_migrate_info',
  1129. 'data': { 'protocol': 'str', 'hostname': 'str', '*port': 'int',
  1130. '*tls-port': 'int', '*cert-subject': 'str' } }
  1131. ##
  1132. # @migrate-start-postcopy:
  1133. #
  1134. # Followup to a migration command to switch the migration to postcopy mode.
  1135. # The postcopy-ram capability must be set before the original migration
  1136. # command.
  1137. #
  1138. # Since: 2.5
  1139. #
  1140. # Example:
  1141. #
  1142. # -> { "execute": "migrate-start-postcopy" }
  1143. # <- { "return": {} }
  1144. #
  1145. ##
  1146. { 'command': 'migrate-start-postcopy' }
  1147. ##
  1148. # @COLOMessage:
  1149. #
  1150. # The message transmission between Primary side and Secondary side.
  1151. #
  1152. # @checkpoint-ready: Secondary VM (SVM) is ready for checkpointing
  1153. #
  1154. # @checkpoint-request: Primary VM (PVM) tells SVM to prepare for checkpointing
  1155. #
  1156. # @checkpoint-reply: SVM gets PVM's checkpoint request
  1157. #
  1158. # @vmstate-send: VM's state will be sent by PVM.
  1159. #
  1160. # @vmstate-size: The total size of VMstate.
  1161. #
  1162. # @vmstate-received: VM's state has been received by SVM.
  1163. #
  1164. # @vmstate-loaded: VM's state has been loaded by SVM.
  1165. #
  1166. # Since: 2.8
  1167. ##
  1168. { 'enum': 'COLOMessage',
  1169. 'data': [ 'checkpoint-ready', 'checkpoint-request', 'checkpoint-reply',
  1170. 'vmstate-send', 'vmstate-size', 'vmstate-received',
  1171. 'vmstate-loaded' ] }
  1172. ##
  1173. # @COLOMode:
  1174. #
  1175. # The colo mode
  1176. #
  1177. # @unknown: unknown mode
  1178. #
  1179. # @primary: master side
  1180. #
  1181. # @secondary: slave side
  1182. #
  1183. # Since: 2.8
  1184. ##
  1185. { 'enum': 'COLOMode',
  1186. 'data': [ 'unknown', 'primary', 'secondary'] }
  1187. ##
  1188. # @FailoverStatus:
  1189. #
  1190. # An enumeration of COLO failover status
  1191. #
  1192. # @none: no failover has ever happened
  1193. #
  1194. # @require: got failover requirement but not handled
  1195. #
  1196. # @active: in the process of doing failover
  1197. #
  1198. # @completed: finish the process of failover
  1199. #
  1200. # @relaunch: restart the failover process, from 'none' -> 'completed' (Since 2.9)
  1201. #
  1202. # Since: 2.8
  1203. ##
  1204. { 'enum': 'FailoverStatus',
  1205. 'data': [ 'none', 'require', 'active', 'completed', 'relaunch' ] }
  1206. ##
  1207. # @x-colo-lost-heartbeat:
  1208. #
  1209. # Tell qemu that heartbeat is lost, request it to do takeover procedures.
  1210. # If this command is sent to the PVM, the Primary side will exit COLO mode.
  1211. # If sent to the Secondary, the Secondary side will run failover work,
  1212. # then takes over server operation to become the service VM.
  1213. #
  1214. # Since: 2.8
  1215. #
  1216. # Example:
  1217. #
  1218. # -> { "execute": "x-colo-lost-heartbeat" }
  1219. # <- { "return": {} }
  1220. #
  1221. ##
  1222. { 'command': 'x-colo-lost-heartbeat' }
  1223. ##
  1224. # @MouseInfo:
  1225. #
  1226. # Information about a mouse device.
  1227. #
  1228. # @name: the name of the mouse device
  1229. #
  1230. # @index: the index of the mouse device
  1231. #
  1232. # @current: true if this device is currently receiving mouse events
  1233. #
  1234. # @absolute: true if this device supports absolute coordinates as input
  1235. #
  1236. # Since: 0.14.0
  1237. ##
  1238. { 'struct': 'MouseInfo',
  1239. 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
  1240. 'absolute': 'bool'} }
  1241. ##
  1242. # @query-mice:
  1243. #
  1244. # Returns information about each active mouse device
  1245. #
  1246. # Returns: a list of @MouseInfo for each device
  1247. #
  1248. # Since: 0.14.0
  1249. #
  1250. # Example:
  1251. #
  1252. # -> { "execute": "query-mice" }
  1253. # <- { "return": [
  1254. # {
  1255. # "name":"QEMU Microsoft Mouse",
  1256. # "index":0,
  1257. # "current":false,
  1258. # "absolute":false
  1259. # },
  1260. # {
  1261. # "name":"QEMU PS/2 Mouse",
  1262. # "index":1,
  1263. # "current":true,
  1264. # "absolute":true
  1265. # }
  1266. # ]
  1267. # }
  1268. #
  1269. ##
  1270. { 'command': 'query-mice', 'returns': ['MouseInfo'] }
  1271. ##
  1272. # @CpuInfoArch:
  1273. #
  1274. # An enumeration of cpu types that enable additional information during
  1275. # @query-cpus.
  1276. #
  1277. # Since: 2.6
  1278. ##
  1279. { 'enum': 'CpuInfoArch',
  1280. 'data': ['x86', 'sparc', 'ppc', 'mips', 'tricore', 'other' ] }
  1281. ##
  1282. # @CpuInfo:
  1283. #
  1284. # Information about a virtual CPU
  1285. #
  1286. # @CPU: the index of the virtual CPU
  1287. #
  1288. # @current: this only exists for backwards compatibility and should be ignored
  1289. #
  1290. # @halted: true if the virtual CPU is in the halt state. Halt usually refers
  1291. # to a processor specific low power mode.
  1292. #
  1293. # @qom_path: path to the CPU object in the QOM tree (since 2.4)
  1294. #
  1295. # @thread_id: ID of the underlying host thread
  1296. #
  1297. # @props: properties describing to which node/socket/core/thread
  1298. # virtual CPU belongs to, provided if supported by board (since 2.10)
  1299. #
  1300. # @arch: architecture of the cpu, which determines which additional fields
  1301. # will be listed (since 2.6)
  1302. #
  1303. # Since: 0.14.0
  1304. #
  1305. # Notes: @halted is a transient state that changes frequently. By the time the
  1306. # data is sent to the client, the guest may no longer be halted.
  1307. ##
  1308. { 'union': 'CpuInfo',
  1309. 'base': {'CPU': 'int', 'current': 'bool', 'halted': 'bool',
  1310. 'qom_path': 'str', 'thread_id': 'int',
  1311. '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' },
  1312. 'discriminator': 'arch',
  1313. 'data': { 'x86': 'CpuInfoX86',
  1314. 'sparc': 'CpuInfoSPARC',
  1315. 'ppc': 'CpuInfoPPC',
  1316. 'mips': 'CpuInfoMIPS',
  1317. 'tricore': 'CpuInfoTricore',
  1318. 'other': 'CpuInfoOther' } }
  1319. ##
  1320. # @CpuInfoX86:
  1321. #
  1322. # Additional information about a virtual i386 or x86_64 CPU
  1323. #
  1324. # @pc: the 64-bit instruction pointer
  1325. #
  1326. # Since: 2.6
  1327. ##
  1328. { 'struct': 'CpuInfoX86', 'data': { 'pc': 'int' } }
  1329. ##
  1330. # @CpuInfoSPARC:
  1331. #
  1332. # Additional information about a virtual SPARC CPU
  1333. #
  1334. # @pc: the PC component of the instruction pointer
  1335. #
  1336. # @npc: the NPC component of the instruction pointer
  1337. #
  1338. # Since: 2.6
  1339. ##
  1340. { 'struct': 'CpuInfoSPARC', 'data': { 'pc': 'int', 'npc': 'int' } }
  1341. ##
  1342. # @CpuInfoPPC:
  1343. #
  1344. # Additional information about a virtual PPC CPU
  1345. #
  1346. # @nip: the instruction pointer
  1347. #
  1348. # Since: 2.6
  1349. ##
  1350. { 'struct': 'CpuInfoPPC', 'data': { 'nip': 'int' } }
  1351. ##
  1352. # @CpuInfoMIPS:
  1353. #
  1354. # Additional information about a virtual MIPS CPU
  1355. #
  1356. # @PC: the instruction pointer
  1357. #
  1358. # Since: 2.6
  1359. ##
  1360. { 'struct': 'CpuInfoMIPS', 'data': { 'PC': 'int' } }
  1361. ##
  1362. # @CpuInfoTricore:
  1363. #
  1364. # Additional information about a virtual Tricore CPU
  1365. #
  1366. # @PC: the instruction pointer
  1367. #
  1368. # Since: 2.6
  1369. ##
  1370. { 'struct': 'CpuInfoTricore', 'data': { 'PC': 'int' } }
  1371. ##
  1372. # @CpuInfoOther:
  1373. #
  1374. # No additional information is available about the virtual CPU
  1375. #
  1376. # Since: 2.6
  1377. #
  1378. ##
  1379. { 'struct': 'CpuInfoOther', 'data': { } }
  1380. ##
  1381. # @query-cpus:
  1382. #
  1383. # Returns a list of information about each virtual CPU.
  1384. #
  1385. # Returns: a list of @CpuInfo for each virtual CPU
  1386. #
  1387. # Since: 0.14.0
  1388. #
  1389. # Example:
  1390. #
  1391. # -> { "execute": "query-cpus" }
  1392. # <- { "return": [
  1393. # {
  1394. # "CPU":0,
  1395. # "current":true,
  1396. # "halted":false,
  1397. # "qom_path":"/machine/unattached/device[0]",
  1398. # "arch":"x86",
  1399. # "pc":3227107138,
  1400. # "thread_id":3134
  1401. # },
  1402. # {
  1403. # "CPU":1,
  1404. # "current":false,
  1405. # "halted":true,
  1406. # "qom_path":"/machine/unattached/device[2]",
  1407. # "arch":"x86",
  1408. # "pc":7108165,
  1409. # "thread_id":3135
  1410. # }
  1411. # ]
  1412. # }
  1413. #
  1414. ##
  1415. { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
  1416. ##
  1417. # @IOThreadInfo:
  1418. #
  1419. # Information about an iothread
  1420. #
  1421. # @id: the identifier of the iothread
  1422. #
  1423. # @thread-id: ID of the underlying host thread
  1424. #
  1425. # @poll-max-ns: maximum polling time in ns, 0 means polling is disabled
  1426. # (since 2.9)
  1427. #
  1428. # @poll-grow: how many ns will be added to polling time, 0 means that it's not
  1429. # configured (since 2.9)
  1430. #
  1431. # @poll-shrink: how many ns will be removed from polling time, 0 means that
  1432. # it's not configured (since 2.9)
  1433. #
  1434. # Since: 2.0
  1435. ##
  1436. { 'struct': 'IOThreadInfo',
  1437. 'data': {'id': 'str',
  1438. 'thread-id': 'int',
  1439. 'poll-max-ns': 'int',
  1440. 'poll-grow': 'int',
  1441. 'poll-shrink': 'int' } }
  1442. ##
  1443. # @query-iothreads:
  1444. #
  1445. # Returns a list of information about each iothread.
  1446. #
  1447. # Note: this list excludes the QEMU main loop thread, which is not declared
  1448. # using the -object iothread command-line option. It is always the main thread
  1449. # of the process.
  1450. #
  1451. # Returns: a list of @IOThreadInfo for each iothread
  1452. #
  1453. # Since: 2.0
  1454. #
  1455. # Example:
  1456. #
  1457. # -> { "execute": "query-iothreads" }
  1458. # <- { "return": [
  1459. # {
  1460. # "id":"iothread0",
  1461. # "thread-id":3134
  1462. # },
  1463. # {
  1464. # "id":"iothread1",
  1465. # "thread-id":3135
  1466. # }
  1467. # ]
  1468. # }
  1469. #
  1470. ##
  1471. { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
  1472. ##
  1473. # @NetworkAddressFamily:
  1474. #
  1475. # The network address family
  1476. #
  1477. # @ipv4: IPV4 family
  1478. #
  1479. # @ipv6: IPV6 family
  1480. #
  1481. # @unix: unix socket
  1482. #
  1483. # @vsock: vsock family (since 2.8)
  1484. #
  1485. # @unknown: otherwise
  1486. #
  1487. # Since: 2.1
  1488. ##
  1489. { 'enum': 'NetworkAddressFamily',
  1490. 'data': [ 'ipv4', 'ipv6', 'unix', 'vsock', 'unknown' ] }
  1491. ##
  1492. # @VncBasicInfo:
  1493. #
  1494. # The basic information for vnc network connection
  1495. #
  1496. # @host: IP address
  1497. #
  1498. # @service: The service name of the vnc port. This may depend on the host
  1499. # system's service database so symbolic names should not be relied
  1500. # on.
  1501. #
  1502. # @family: address family
  1503. #
  1504. # @websocket: true in case the socket is a websocket (since 2.3).
  1505. #
  1506. # Since: 2.1
  1507. ##
  1508. { 'struct': 'VncBasicInfo',
  1509. 'data': { 'host': 'str',
  1510. 'service': 'str',
  1511. 'family': 'NetworkAddressFamily',
  1512. 'websocket': 'bool' } }
  1513. ##
  1514. # @VncServerInfo:
  1515. #
  1516. # The network connection information for server
  1517. #
  1518. # @auth: authentication method used for
  1519. # the plain (non-websocket) VNC server
  1520. #
  1521. # Since: 2.1
  1522. ##
  1523. { 'struct': 'VncServerInfo',
  1524. 'base': 'VncBasicInfo',
  1525. 'data': { '*auth': 'str' } }
  1526. ##
  1527. # @VncClientInfo:
  1528. #
  1529. # Information about a connected VNC client.
  1530. #
  1531. # @x509_dname: If x509 authentication is in use, the Distinguished
  1532. # Name of the client.
  1533. #
  1534. # @sasl_username: If SASL authentication is in use, the SASL username
  1535. # used for authentication.
  1536. #
  1537. # Since: 0.14.0
  1538. ##
  1539. { 'struct': 'VncClientInfo',
  1540. 'base': 'VncBasicInfo',
  1541. 'data': { '*x509_dname': 'str', '*sasl_username': 'str' } }
  1542. ##
  1543. # @VncInfo:
  1544. #
  1545. # Information about the VNC session.
  1546. #
  1547. # @enabled: true if the VNC server is enabled, false otherwise
  1548. #
  1549. # @host: The hostname the VNC server is bound to. This depends on
  1550. # the name resolution on the host and may be an IP address.
  1551. #
  1552. # @family: 'ipv6' if the host is listening for IPv6 connections
  1553. # 'ipv4' if the host is listening for IPv4 connections
  1554. # 'unix' if the host is listening on a unix domain socket
  1555. # 'unknown' otherwise
  1556. #
  1557. # @service: The service name of the server's port. This may depends
  1558. # on the host system's service database so symbolic names should not
  1559. # be relied on.
  1560. #
  1561. # @auth: the current authentication type used by the server
  1562. # 'none' if no authentication is being used
  1563. # 'vnc' if VNC authentication is being used
  1564. # 'vencrypt+plain' if VEncrypt is used with plain text authentication
  1565. # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
  1566. # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
  1567. # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
  1568. # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
  1569. # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
  1570. # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
  1571. # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
  1572. # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
  1573. #
  1574. # @clients: a list of @VncClientInfo of all currently connected clients
  1575. #
  1576. # Since: 0.14.0
  1577. ##
  1578. { 'struct': 'VncInfo',
  1579. 'data': {'enabled': 'bool', '*host': 'str',
  1580. '*family': 'NetworkAddressFamily',
  1581. '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
  1582. ##
  1583. # @VncPrimaryAuth:
  1584. #
  1585. # vnc primary authentication method.
  1586. #
  1587. # Since: 2.3
  1588. ##
  1589. { 'enum': 'VncPrimaryAuth',
  1590. 'data': [ 'none', 'vnc', 'ra2', 'ra2ne', 'tight', 'ultra',
  1591. 'tls', 'vencrypt', 'sasl' ] }
  1592. ##
  1593. # @VncVencryptSubAuth:
  1594. #
  1595. # vnc sub authentication method with vencrypt.
  1596. #
  1597. # Since: 2.3
  1598. ##
  1599. { 'enum': 'VncVencryptSubAuth',
  1600. 'data': [ 'plain',
  1601. 'tls-none', 'x509-none',
  1602. 'tls-vnc', 'x509-vnc',
  1603. 'tls-plain', 'x509-plain',
  1604. 'tls-sasl', 'x509-sasl' ] }
  1605. ##
  1606. # @VncServerInfo2:
  1607. #
  1608. # The network connection information for server
  1609. #
  1610. # @auth: The current authentication type used by the servers
  1611. #
  1612. # @vencrypt: The vencrypt sub authentication type used by the
  1613. # servers, only specified in case auth == vencrypt.
  1614. #
  1615. # Since: 2.9
  1616. ##
  1617. { 'struct': 'VncServerInfo2',
  1618. 'base': 'VncBasicInfo',
  1619. 'data': { 'auth' : 'VncPrimaryAuth',
  1620. '*vencrypt' : 'VncVencryptSubAuth' } }
  1621. ##
  1622. # @VncInfo2:
  1623. #
  1624. # Information about a vnc server
  1625. #
  1626. # @id: vnc server name.
  1627. #
  1628. # @server: A list of @VncBasincInfo describing all listening sockets.
  1629. # The list can be empty (in case the vnc server is disabled).
  1630. # It also may have multiple entries: normal + websocket,
  1631. # possibly also ipv4 + ipv6 in the future.
  1632. #
  1633. # @clients: A list of @VncClientInfo of all currently connected clients.
  1634. # The list can be empty, for obvious reasons.
  1635. #
  1636. # @auth: The current authentication type used by the non-websockets servers
  1637. #
  1638. # @vencrypt: The vencrypt authentication type used by the servers,
  1639. # only specified in case auth == vencrypt.
  1640. #
  1641. # @display: The display device the vnc server is linked to.
  1642. #
  1643. # Since: 2.3
  1644. ##
  1645. { 'struct': 'VncInfo2',
  1646. 'data': { 'id' : 'str',
  1647. 'server' : ['VncServerInfo2'],
  1648. 'clients' : ['VncClientInfo'],
  1649. 'auth' : 'VncPrimaryAuth',
  1650. '*vencrypt' : 'VncVencryptSubAuth',
  1651. '*display' : 'str' } }
  1652. ##
  1653. # @query-vnc:
  1654. #
  1655. # Returns information about the current VNC server
  1656. #
  1657. # Returns: @VncInfo
  1658. #
  1659. # Since: 0.14.0
  1660. #
  1661. # Example:
  1662. #
  1663. # -> { "execute": "query-vnc" }
  1664. # <- { "return": {
  1665. # "enabled":true,
  1666. # "host":"0.0.0.0",
  1667. # "service":"50402",
  1668. # "auth":"vnc",
  1669. # "family":"ipv4",
  1670. # "clients":[
  1671. # {
  1672. # "host":"127.0.0.1",
  1673. # "service":"50401",
  1674. # "family":"ipv4"
  1675. # }
  1676. # ]
  1677. # }
  1678. # }
  1679. #
  1680. ##
  1681. { 'command': 'query-vnc', 'returns': 'VncInfo' }
  1682. ##
  1683. # @query-vnc-servers:
  1684. #
  1685. # Returns a list of vnc servers. The list can be empty.
  1686. #
  1687. # Returns: a list of @VncInfo2
  1688. #
  1689. # Since: 2.3
  1690. ##
  1691. { 'command': 'query-vnc-servers', 'returns': ['VncInfo2'] }
  1692. ##
  1693. # @SpiceBasicInfo:
  1694. #
  1695. # The basic information for SPICE network connection
  1696. #
  1697. # @host: IP address
  1698. #
  1699. # @port: port number
  1700. #
  1701. # @family: address family
  1702. #
  1703. # Since: 2.1
  1704. ##
  1705. { 'struct': 'SpiceBasicInfo',
  1706. 'data': { 'host': 'str',
  1707. 'port': 'str',
  1708. 'family': 'NetworkAddressFamily' } }
  1709. ##
  1710. # @SpiceServerInfo:
  1711. #
  1712. # Information about a SPICE server
  1713. #
  1714. # @auth: authentication method
  1715. #
  1716. # Since: 2.1
  1717. ##
  1718. { 'struct': 'SpiceServerInfo',
  1719. 'base': 'SpiceBasicInfo',
  1720. 'data': { '*auth': 'str' } }
  1721. ##
  1722. # @SpiceChannel:
  1723. #
  1724. # Information about a SPICE client channel.
  1725. #
  1726. # @connection-id: SPICE connection id number. All channels with the same id
  1727. # belong to the same SPICE session.
  1728. #
  1729. # @channel-type: SPICE channel type number. "1" is the main control
  1730. # channel, filter for this one if you want to track spice
  1731. # sessions only
  1732. #
  1733. # @channel-id: SPICE channel ID number. Usually "0", might be different when
  1734. # multiple channels of the same type exist, such as multiple
  1735. # display channels in a multihead setup
  1736. #
  1737. # @tls: true if the channel is encrypted, false otherwise.
  1738. #
  1739. # Since: 0.14.0
  1740. ##
  1741. { 'struct': 'SpiceChannel',
  1742. 'base': 'SpiceBasicInfo',
  1743. 'data': {'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
  1744. 'tls': 'bool'} }
  1745. ##
  1746. # @SpiceQueryMouseMode:
  1747. #
  1748. # An enumeration of Spice mouse states.
  1749. #
  1750. # @client: Mouse cursor position is determined by the client.
  1751. #
  1752. # @server: Mouse cursor position is determined by the server.
  1753. #
  1754. # @unknown: No information is available about mouse mode used by
  1755. # the spice server.
  1756. #
  1757. # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
  1758. #
  1759. # Since: 1.1
  1760. ##
  1761. { 'enum': 'SpiceQueryMouseMode',
  1762. 'data': [ 'client', 'server', 'unknown' ] }
  1763. ##
  1764. # @SpiceInfo:
  1765. #
  1766. # Information about the SPICE session.
  1767. #
  1768. # @enabled: true if the SPICE server is enabled, false otherwise
  1769. #
  1770. # @migrated: true if the last guest migration completed and spice
  1771. # migration had completed as well. false otherwise. (since 1.4)
  1772. #
  1773. # @host: The hostname the SPICE server is bound to. This depends on
  1774. # the name resolution on the host and may be an IP address.
  1775. #
  1776. # @port: The SPICE server's port number.
  1777. #
  1778. # @compiled-version: SPICE server version.
  1779. #
  1780. # @tls-port: The SPICE server's TLS port number.
  1781. #
  1782. # @auth: the current authentication type used by the server
  1783. # 'none' if no authentication is being used
  1784. # 'spice' uses SASL or direct TLS authentication, depending on command
  1785. # line options
  1786. #
  1787. # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
  1788. # be determined by the client or the server, or unknown if spice
  1789. # server doesn't provide this information. (since: 1.1)
  1790. #
  1791. # @channels: a list of @SpiceChannel for each active spice channel
  1792. #
  1793. # Since: 0.14.0
  1794. ##
  1795. { 'struct': 'SpiceInfo',
  1796. 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
  1797. '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
  1798. 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
  1799. ##
  1800. # @query-spice:
  1801. #
  1802. # Returns information about the current SPICE server
  1803. #
  1804. # Returns: @SpiceInfo
  1805. #
  1806. # Since: 0.14.0
  1807. #
  1808. # Example:
  1809. #
  1810. # -> { "execute": "query-spice" }
  1811. # <- { "return": {
  1812. # "enabled": true,
  1813. # "auth": "spice",
  1814. # "port": 5920,
  1815. # "tls-port": 5921,
  1816. # "host": "0.0.0.0",
  1817. # "channels": [
  1818. # {
  1819. # "port": "54924",
  1820. # "family": "ipv4",
  1821. # "channel-type": 1,
  1822. # "connection-id": 1804289383,
  1823. # "host": "127.0.0.1",
  1824. # "channel-id": 0,
  1825. # "tls": true
  1826. # },
  1827. # {
  1828. # "port": "36710",
  1829. # "family": "ipv4",
  1830. # "channel-type": 4,
  1831. # "connection-id": 1804289383,
  1832. # "host": "127.0.0.1",
  1833. # "channel-id": 0,
  1834. # "tls": false
  1835. # },
  1836. # [ ... more channels follow ... ]
  1837. # ]
  1838. # }
  1839. # }
  1840. #
  1841. ##
  1842. { 'command': 'query-spice', 'returns': 'SpiceInfo' }
  1843. ##
  1844. # @BalloonInfo:
  1845. #
  1846. # Information about the guest balloon device.
  1847. #
  1848. # @actual: the number of bytes the balloon currently contains
  1849. #
  1850. # Since: 0.14.0
  1851. #
  1852. ##
  1853. { 'struct': 'BalloonInfo', 'data': {'actual': 'int' } }
  1854. ##
  1855. # @query-balloon:
  1856. #
  1857. # Return information about the balloon device.
  1858. #
  1859. # Returns: @BalloonInfo on success
  1860. #
  1861. # If the balloon driver is enabled but not functional because the KVM
  1862. # kernel module cannot support it, KvmMissingCap
  1863. #
  1864. # If no balloon device is present, DeviceNotActive
  1865. #
  1866. # Since: 0.14.0
  1867. #
  1868. # Example:
  1869. #
  1870. # -> { "execute": "query-balloon" }
  1871. # <- { "return": {
  1872. # "actual": 1073741824,
  1873. # }
  1874. # }
  1875. #
  1876. ##
  1877. { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
  1878. ##
  1879. # @PciMemoryRange:
  1880. #
  1881. # A PCI device memory region
  1882. #
  1883. # @base: the starting address (guest physical)
  1884. #
  1885. # @limit: the ending address (guest physical)
  1886. #
  1887. # Since: 0.14.0
  1888. ##
  1889. { 'struct': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
  1890. ##
  1891. # @PciMemoryRegion:
  1892. #
  1893. # Information about a PCI device I/O region.
  1894. #
  1895. # @bar: the index of the Base Address Register for this region
  1896. #
  1897. # @type: 'io' if the region is a PIO region
  1898. # 'memory' if the region is a MMIO region
  1899. #
  1900. # @size: memory size
  1901. #
  1902. # @prefetch: if @type is 'memory', true if the memory is prefetchable
  1903. #
  1904. # @mem_type_64: if @type is 'memory', true if the BAR is 64-bit
  1905. #
  1906. # Since: 0.14.0
  1907. ##
  1908. { 'struct': 'PciMemoryRegion',
  1909. 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
  1910. '*prefetch': 'bool', '*mem_type_64': 'bool' } }
  1911. ##
  1912. # @PciBusInfo:
  1913. #
  1914. # Information about a bus of a PCI Bridge device
  1915. #
  1916. # @number: primary bus interface number. This should be the number of the
  1917. # bus the device resides on.
  1918. #
  1919. # @secondary: secondary bus interface number. This is the number of the
  1920. # main bus for the bridge
  1921. #
  1922. # @subordinate: This is the highest number bus that resides below the
  1923. # bridge.
  1924. #
  1925. # @io_range: The PIO range for all devices on this bridge
  1926. #
  1927. # @memory_range: The MMIO range for all devices on this bridge
  1928. #
  1929. # @prefetchable_range: The range of prefetchable MMIO for all devices on
  1930. # this bridge
  1931. #
  1932. # Since: 2.4
  1933. ##
  1934. { 'struct': 'PciBusInfo',
  1935. 'data': {'number': 'int', 'secondary': 'int', 'subordinate': 'int',
  1936. 'io_range': 'PciMemoryRange',
  1937. 'memory_range': 'PciMemoryRange',
  1938. 'prefetchable_range': 'PciMemoryRange' } }
  1939. ##
  1940. # @PciBridgeInfo:
  1941. #
  1942. # Information about a PCI Bridge device
  1943. #
  1944. # @bus: information about the bus the device resides on
  1945. #
  1946. # @devices: a list of @PciDeviceInfo for each device on this bridge
  1947. #
  1948. # Since: 0.14.0
  1949. ##
  1950. { 'struct': 'PciBridgeInfo',
  1951. 'data': {'bus': 'PciBusInfo', '*devices': ['PciDeviceInfo']} }
  1952. ##
  1953. # @PciDeviceClass:
  1954. #
  1955. # Information about the Class of a PCI device
  1956. #
  1957. # @desc: a string description of the device's class
  1958. #
  1959. # @class: the class code of the device
  1960. #
  1961. # Since: 2.4
  1962. ##
  1963. { 'struct': 'PciDeviceClass',
  1964. 'data': {'*desc': 'str', 'class': 'int'} }
  1965. ##
  1966. # @PciDeviceId:
  1967. #
  1968. # Information about the Id of a PCI device
  1969. #
  1970. # @device: the PCI device id
  1971. #
  1972. # @vendor: the PCI vendor id
  1973. #
  1974. # Since: 2.4
  1975. ##
  1976. { 'struct': 'PciDeviceId',
  1977. 'data': {'device': 'int', 'vendor': 'int'} }
  1978. ##
  1979. # @PciDeviceInfo:
  1980. #
  1981. # Information about a PCI device
  1982. #
  1983. # @bus: the bus number of the device
  1984. #
  1985. # @slot: the slot the device is located in
  1986. #
  1987. # @function: the function of the slot used by the device
  1988. #
  1989. # @class_info: the class of the device
  1990. #
  1991. # @id: the PCI device id
  1992. #
  1993. # @irq: if an IRQ is assigned to the device, the IRQ number
  1994. #
  1995. # @qdev_id: the device name of the PCI device
  1996. #
  1997. # @pci_bridge: if the device is a PCI bridge, the bridge information
  1998. #
  1999. # @regions: a list of the PCI I/O regions associated with the device
  2000. #
  2001. # Notes: the contents of @class_info.desc are not stable and should only be
  2002. # treated as informational.
  2003. #
  2004. # Since: 0.14.0
  2005. ##
  2006. { 'struct': 'PciDeviceInfo',
  2007. 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
  2008. 'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
  2009. '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
  2010. 'regions': ['PciMemoryRegion']} }
  2011. ##
  2012. # @PciInfo:
  2013. #
  2014. # Information about a PCI bus
  2015. #
  2016. # @bus: the bus index
  2017. #
  2018. # @devices: a list of devices on this bus
  2019. #
  2020. # Since: 0.14.0
  2021. ##
  2022. { 'struct': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
  2023. ##
  2024. # @query-pci:
  2025. #
  2026. # Return information about the PCI bus topology of the guest.
  2027. #
  2028. # Returns: a list of @PciInfo for each PCI bus. Each bus is
  2029. # represented by a json-object, which has a key with a json-array of
  2030. # all PCI devices attached to it. Each device is represented by a
  2031. # json-object.
  2032. #
  2033. # Since: 0.14.0
  2034. #
  2035. # Example:
  2036. #
  2037. # -> { "execute": "query-pci" }
  2038. # <- { "return": [
  2039. # {
  2040. # "bus": 0,
  2041. # "devices": [
  2042. # {
  2043. # "bus": 0,
  2044. # "qdev_id": "",
  2045. # "slot": 0,
  2046. # "class_info": {
  2047. # "class": 1536,
  2048. # "desc": "Host bridge"
  2049. # },
  2050. # "id": {
  2051. # "device": 32902,
  2052. # "vendor": 4663
  2053. # },
  2054. # "function": 0,
  2055. # "regions": [
  2056. # ]
  2057. # },
  2058. # {
  2059. # "bus": 0,
  2060. # "qdev_id": "",
  2061. # "slot": 1,
  2062. # "class_info": {
  2063. # "class": 1537,
  2064. # "desc": "ISA bridge"
  2065. # },
  2066. # "id": {
  2067. # "device": 32902,
  2068. # "vendor": 28672
  2069. # },
  2070. # "function": 0,
  2071. # "regions": [
  2072. # ]
  2073. # },
  2074. # {
  2075. # "bus": 0,
  2076. # "qdev_id": "",
  2077. # "slot": 1,
  2078. # "class_info": {
  2079. # "class": 257,
  2080. # "desc": "IDE controller"
  2081. # },
  2082. # "id": {
  2083. # "device": 32902,
  2084. # "vendor": 28688
  2085. # },
  2086. # "function": 1,
  2087. # "regions": [
  2088. # {
  2089. # "bar": 4,
  2090. # "size": 16,
  2091. # "address": 49152,
  2092. # "type": "io"
  2093. # }
  2094. # ]
  2095. # },
  2096. # {
  2097. # "bus": 0,
  2098. # "qdev_id": "",
  2099. # "slot": 2,
  2100. # "class_info": {
  2101. # "class": 768,
  2102. # "desc": "VGA controller"
  2103. # },
  2104. # "id": {
  2105. # "device": 4115,
  2106. # "vendor": 184
  2107. # },
  2108. # "function": 0,
  2109. # "regions": [
  2110. # {
  2111. # "prefetch": true,
  2112. # "mem_type_64": false,
  2113. # "bar": 0,
  2114. # "size": 33554432,
  2115. # "address": 4026531840,
  2116. # "type": "memory"
  2117. # },
  2118. # {
  2119. # "prefetch": false,
  2120. # "mem_type_64": false,
  2121. # "bar": 1,
  2122. # "size": 4096,
  2123. # "address": 4060086272,
  2124. # "type": "memory"
  2125. # },
  2126. # {
  2127. # "prefetch": false,
  2128. # "mem_type_64": false,
  2129. # "bar": 6,
  2130. # "size": 65536,
  2131. # "address": -1,
  2132. # "type": "memory"
  2133. # }
  2134. # ]
  2135. # },
  2136. # {
  2137. # "bus": 0,
  2138. # "qdev_id": "",
  2139. # "irq": 11,
  2140. # "slot": 4,
  2141. # "class_info": {
  2142. # "class": 1280,
  2143. # "desc": "RAM controller"
  2144. # },
  2145. # "id": {
  2146. # "device": 6900,
  2147. # "vendor": 4098
  2148. # },
  2149. # "function": 0,
  2150. # "regions": [
  2151. # {
  2152. # "bar": 0,
  2153. # "size": 32,
  2154. # "address": 49280,
  2155. # "type": "io"
  2156. # }
  2157. # ]
  2158. # }
  2159. # ]
  2160. # }
  2161. # ]
  2162. # }
  2163. #
  2164. # Note: This example has been shortened as the real response is too long.
  2165. #
  2166. ##
  2167. { 'command': 'query-pci', 'returns': ['PciInfo'] }
  2168. ##
  2169. # @quit:
  2170. #
  2171. # This command will cause the QEMU process to exit gracefully. While every
  2172. # attempt is made to send the QMP response before terminating, this is not
  2173. # guaranteed. When using this interface, a premature EOF would not be
  2174. # unexpected.
  2175. #
  2176. # Since: 0.14.0
  2177. #
  2178. # Example:
  2179. #
  2180. # -> { "execute": "quit" }
  2181. # <- { "return": {} }
  2182. ##
  2183. { 'command': 'quit' }
  2184. ##
  2185. # @stop:
  2186. #
  2187. # Stop all guest VCPU execution.
  2188. #
  2189. # Since: 0.14.0
  2190. #
  2191. # Notes: This function will succeed even if the guest is already in the stopped
  2192. # state. In "inmigrate" state, it will ensure that the guest
  2193. # remains paused once migration finishes, as if the -S option was
  2194. # passed on the command line.
  2195. #
  2196. # Example:
  2197. #
  2198. # -> { "execute": "stop" }
  2199. # <- { "return": {} }
  2200. #
  2201. ##
  2202. { 'command': 'stop' }
  2203. ##
  2204. # @system_reset:
  2205. #
  2206. # Performs a hard reset of a guest.
  2207. #
  2208. # Since: 0.14.0
  2209. #
  2210. # Example:
  2211. #
  2212. # -> { "execute": "system_reset" }
  2213. # <- { "return": {} }
  2214. #
  2215. ##
  2216. { 'command': 'system_reset' }
  2217. ##
  2218. # @system_powerdown:
  2219. #
  2220. # Requests that a guest perform a powerdown operation.
  2221. #
  2222. # Since: 0.14.0
  2223. #
  2224. # Notes: A guest may or may not respond to this command. This command
  2225. # returning does not indicate that a guest has accepted the request or
  2226. # that it has shut down. Many guests will respond to this command by
  2227. # prompting the user in some way.
  2228. # Example:
  2229. #
  2230. # -> { "execute": "system_powerdown" }
  2231. # <- { "return": {} }
  2232. #
  2233. ##
  2234. { 'command': 'system_powerdown' }
  2235. ##
  2236. # @cpu:
  2237. #
  2238. # This command is a nop that is only provided for the purposes of compatibility.
  2239. #
  2240. # Since: 0.14.0
  2241. #
  2242. # Notes: Do not use this command.
  2243. ##
  2244. { 'command': 'cpu', 'data': {'index': 'int'} }
  2245. ##
  2246. # @cpu-add:
  2247. #
  2248. # Adds CPU with specified ID
  2249. #
  2250. # @id: ID of CPU to be created, valid values [0..max_cpus)
  2251. #
  2252. # Returns: Nothing on success
  2253. #
  2254. # Since: 1.5
  2255. #
  2256. # Example:
  2257. #
  2258. # -> { "execute": "cpu-add", "arguments": { "id": 2 } }
  2259. # <- { "return": {} }
  2260. #
  2261. ##
  2262. { 'command': 'cpu-add', 'data': {'id': 'int'} }
  2263. ##
  2264. # @memsave:
  2265. #
  2266. # Save a portion of guest memory to a file.
  2267. #
  2268. # @val: the virtual address of the guest to start from
  2269. #
  2270. # @size: the size of memory region to save
  2271. #
  2272. # @filename: the file to save the memory to as binary data
  2273. #
  2274. # @cpu-index: the index of the virtual CPU to use for translating the
  2275. # virtual address (defaults to CPU 0)
  2276. #
  2277. # Returns: Nothing on success
  2278. #
  2279. # Since: 0.14.0
  2280. #
  2281. # Notes: Errors were not reliably returned until 1.1
  2282. #
  2283. # Example:
  2284. #
  2285. # -> { "execute": "memsave",
  2286. # "arguments": { "val": 10,
  2287. # "size": 100,
  2288. # "filename": "/tmp/virtual-mem-dump" } }
  2289. # <- { "return": {} }
  2290. #
  2291. ##
  2292. { 'command': 'memsave',
  2293. 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
  2294. ##
  2295. # @pmemsave:
  2296. #
  2297. # Save a portion of guest physical memory to a file.
  2298. #
  2299. # @val: the physical address of the guest to start from
  2300. #
  2301. # @size: the size of memory region to save
  2302. #
  2303. # @filename: the file to save the memory to as binary data
  2304. #
  2305. # Returns: Nothing on success
  2306. #
  2307. # Since: 0.14.0
  2308. #
  2309. # Notes: Errors were not reliably returned until 1.1
  2310. #
  2311. # Example:
  2312. #
  2313. # -> { "execute": "pmemsave",
  2314. # "arguments": { "val": 10,
  2315. # "size": 100,
  2316. # "filename": "/tmp/physical-mem-dump" } }
  2317. # <- { "return": {} }
  2318. #
  2319. ##
  2320. { 'command': 'pmemsave',
  2321. 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
  2322. ##
  2323. # @cont:
  2324. #
  2325. # Resume guest VCPU execution.
  2326. #
  2327. # Since: 0.14.0
  2328. #
  2329. # Returns: If successful, nothing
  2330. # If QEMU was started with an encrypted block device and a key has
  2331. # not yet been set, DeviceEncrypted.
  2332. #
  2333. # Notes: This command will succeed if the guest is currently running. It
  2334. # will also succeed if the guest is in the "inmigrate" state; in
  2335. # this case, the effect of the command is to make sure the guest
  2336. # starts once migration finishes, removing the effect of the -S
  2337. # command line option if it was passed.
  2338. #
  2339. # Example:
  2340. #
  2341. # -> { "execute": "cont" }
  2342. # <- { "return": {} }
  2343. #
  2344. ##
  2345. { 'command': 'cont' }
  2346. ##
  2347. # @system_wakeup:
  2348. #
  2349. # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
  2350. #
  2351. # Since: 1.1
  2352. #
  2353. # Returns: nothing.
  2354. #
  2355. # Example:
  2356. #
  2357. # -> { "execute": "system_wakeup" }
  2358. # <- { "return": {} }
  2359. #
  2360. ##
  2361. { 'command': 'system_wakeup' }
  2362. ##
  2363. # @inject-nmi:
  2364. #
  2365. # Injects a Non-Maskable Interrupt into the default CPU (x86/s390) or all CPUs (ppc64).
  2366. # The command fails when the guest doesn't support injecting.
  2367. #
  2368. # Returns: If successful, nothing
  2369. #
  2370. # Since: 0.14.0
  2371. #
  2372. # Note: prior to 2.1, this command was only supported for x86 and s390 VMs
  2373. #
  2374. # Example:
  2375. #
  2376. # -> { "execute": "inject-nmi" }
  2377. # <- { "return": {} }
  2378. #
  2379. ##
  2380. { 'command': 'inject-nmi' }
  2381. ##
  2382. # @set_link:
  2383. #
  2384. # Sets the link status of a virtual network adapter.
  2385. #
  2386. # @name: the device name of the virtual network adapter
  2387. #
  2388. # @up: true to set the link status to be up
  2389. #
  2390. # Returns: Nothing on success
  2391. # If @name is not a valid network device, DeviceNotFound
  2392. #
  2393. # Since: 0.14.0
  2394. #
  2395. # Notes: Not all network adapters support setting link status. This command
  2396. # will succeed even if the network adapter does not support link status
  2397. # notification.
  2398. #
  2399. # Example:
  2400. #
  2401. # -> { "execute": "set_link",
  2402. # "arguments": { "name": "e1000.0", "up": false } }
  2403. # <- { "return": {} }
  2404. #
  2405. ##
  2406. { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
  2407. ##
  2408. # @balloon:
  2409. #
  2410. # Request the balloon driver to change its balloon size.
  2411. #
  2412. # @value: the target size of the balloon in bytes
  2413. #
  2414. # Returns: Nothing on success
  2415. # If the balloon driver is enabled but not functional because the KVM
  2416. # kernel module cannot support it, KvmMissingCap
  2417. # If no balloon device is present, DeviceNotActive
  2418. #
  2419. # Notes: This command just issues a request to the guest. When it returns,
  2420. # the balloon size may not have changed. A guest can change the balloon
  2421. # size independent of this command.
  2422. #
  2423. # Since: 0.14.0
  2424. #
  2425. # Example:
  2426. #
  2427. # -> { "execute": "balloon", "arguments": { "value": 536870912 } }
  2428. # <- { "return": {} }
  2429. #
  2430. ##
  2431. { 'command': 'balloon', 'data': {'value': 'int'} }
  2432. ##
  2433. # @Abort:
  2434. #
  2435. # This action can be used to test transaction failure.
  2436. #
  2437. # Since: 1.6
  2438. ##
  2439. { 'struct': 'Abort',
  2440. 'data': { } }
  2441. ##
  2442. # @ActionCompletionMode:
  2443. #
  2444. # An enumeration of Transactional completion modes.
  2445. #
  2446. # @individual: Do not attempt to cancel any other Actions if any Actions fail
  2447. # after the Transaction request succeeds. All Actions that
  2448. # can complete successfully will do so without waiting on others.
  2449. # This is the default.
  2450. #
  2451. # @grouped: If any Action fails after the Transaction succeeds, cancel all
  2452. # Actions. Actions do not complete until all Actions are ready to
  2453. # complete. May be rejected by Actions that do not support this
  2454. # completion mode.
  2455. #
  2456. # Since: 2.5
  2457. ##
  2458. { 'enum': 'ActionCompletionMode',
  2459. 'data': [ 'individual', 'grouped' ] }
  2460. ##
  2461. # @TransactionAction:
  2462. #
  2463. # A discriminated record of operations that can be performed with
  2464. # @transaction. Action @type can be:
  2465. #
  2466. # - @abort: since 1.6
  2467. # - @block-dirty-bitmap-add: since 2.5
  2468. # - @block-dirty-bitmap-clear: since 2.5
  2469. # - @blockdev-backup: since 2.3
  2470. # - @blockdev-snapshot: since 2.5
  2471. # - @blockdev-snapshot-internal-sync: since 1.7
  2472. # - @blockdev-snapshot-sync: since 1.1
  2473. # - @drive-backup: since 1.6
  2474. #
  2475. # Since: 1.1
  2476. ##
  2477. { 'union': 'TransactionAction',
  2478. 'data': {
  2479. 'abort': 'Abort',
  2480. 'block-dirty-bitmap-add': 'BlockDirtyBitmapAdd',
  2481. 'block-dirty-bitmap-clear': 'BlockDirtyBitmap',
  2482. 'blockdev-backup': 'BlockdevBackup',
  2483. 'blockdev-snapshot': 'BlockdevSnapshot',
  2484. 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal',
  2485. 'blockdev-snapshot-sync': 'BlockdevSnapshotSync',
  2486. 'drive-backup': 'DriveBackup'
  2487. } }
  2488. ##
  2489. # @TransactionProperties:
  2490. #
  2491. # Optional arguments to modify the behavior of a Transaction.
  2492. #
  2493. # @completion-mode: Controls how jobs launched asynchronously by
  2494. # Actions will complete or fail as a group.
  2495. # See @ActionCompletionMode for details.
  2496. #
  2497. # Since: 2.5
  2498. ##
  2499. { 'struct': 'TransactionProperties',
  2500. 'data': {
  2501. '*completion-mode': 'ActionCompletionMode'
  2502. }
  2503. }
  2504. ##
  2505. # @transaction:
  2506. #
  2507. # Executes a number of transactionable QMP commands atomically. If any
  2508. # operation fails, then the entire set of actions will be abandoned and the
  2509. # appropriate error returned.
  2510. #
  2511. # For external snapshots, the dictionary contains the device, the file to use for
  2512. # the new snapshot, and the format. The default format, if not specified, is
  2513. # qcow2.
  2514. #
  2515. # Each new snapshot defaults to being created by QEMU (wiping any
  2516. # contents if the file already exists), but it is also possible to reuse
  2517. # an externally-created file. In the latter case, you should ensure that
  2518. # the new image file has the same contents as the current one; QEMU cannot
  2519. # perform any meaningful check. Typically this is achieved by using the
  2520. # current image file as the backing file for the new image.
  2521. #
  2522. # On failure, the original disks pre-snapshot attempt will be used.
  2523. #
  2524. # For internal snapshots, the dictionary contains the device and the snapshot's
  2525. # name. If an internal snapshot matching name already exists, the request will
  2526. # be rejected. Only some image formats support it, for example, qcow2, rbd,
  2527. # and sheepdog.
  2528. #
  2529. # On failure, qemu will try delete the newly created internal snapshot in the
  2530. # transaction. When an I/O error occurs during deletion, the user needs to fix
  2531. # it later with qemu-img or other command.
  2532. #
  2533. # @actions: List of @TransactionAction;
  2534. # information needed for the respective operations.
  2535. #
  2536. # @properties: structure of additional options to control the
  2537. # execution of the transaction. See @TransactionProperties
  2538. # for additional detail.
  2539. #
  2540. # Returns: nothing on success
  2541. #
  2542. # Errors depend on the operations of the transaction
  2543. #
  2544. # Note: The transaction aborts on the first failure. Therefore, there will be
  2545. # information on only one failed operation returned in an error condition, and
  2546. # subsequent actions will not have been attempted.
  2547. #
  2548. # Since: 1.1
  2549. #
  2550. # Example:
  2551. #
  2552. # -> { "execute": "transaction",
  2553. # "arguments": { "actions": [
  2554. # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
  2555. # "snapshot-file": "/some/place/my-image",
  2556. # "format": "qcow2" } },
  2557. # { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
  2558. # "snapshot-file": "/some/place/my-image2",
  2559. # "snapshot-node-name": "node3432",
  2560. # "mode": "existing",
  2561. # "format": "qcow2" } },
  2562. # { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
  2563. # "snapshot-file": "/some/place/my-image2",
  2564. # "mode": "existing",
  2565. # "format": "qcow2" } },
  2566. # { "type": "blockdev-snapshot-internal-sync", "data" : {
  2567. # "device": "ide-hd2",
  2568. # "name": "snapshot0" } } ] } }
  2569. # <- { "return": {} }
  2570. #
  2571. ##
  2572. { 'command': 'transaction',
  2573. 'data': { 'actions': [ 'TransactionAction' ],
  2574. '*properties': 'TransactionProperties'
  2575. }
  2576. }
  2577. ##
  2578. # @human-monitor-command:
  2579. #
  2580. # Execute a command on the human monitor and return the output.
  2581. #
  2582. # @command-line: the command to execute in the human monitor
  2583. #
  2584. # @cpu-index: The CPU to use for commands that require an implicit CPU
  2585. #
  2586. # Returns: the output of the command as a string
  2587. #
  2588. # Since: 0.14.0
  2589. #
  2590. # Notes: This command only exists as a stop-gap. Its use is highly
  2591. # discouraged. The semantics of this command are not
  2592. # guaranteed: this means that command names, arguments and
  2593. # responses can change or be removed at ANY time. Applications
  2594. # that rely on long term stability guarantees should NOT
  2595. # use this command.
  2596. #
  2597. # Known limitations:
  2598. #
  2599. # * This command is stateless, this means that commands that depend
  2600. # on state information (such as getfd) might not work
  2601. #
  2602. # * Commands that prompt the user for data (eg. 'cont' when the block
  2603. # device is encrypted) don't currently work
  2604. #
  2605. # Example:
  2606. #
  2607. # -> { "execute": "human-monitor-command",
  2608. # "arguments": { "command-line": "info kvm" } }
  2609. # <- { "return": "kvm support: enabled\r\n" }
  2610. #
  2611. ##
  2612. { 'command': 'human-monitor-command',
  2613. 'data': {'command-line': 'str', '*cpu-index': 'int'},
  2614. 'returns': 'str' }
  2615. ##
  2616. # @migrate_cancel:
  2617. #
  2618. # Cancel the current executing migration process.
  2619. #
  2620. # Returns: nothing on success
  2621. #
  2622. # Notes: This command succeeds even if there is no migration process running.
  2623. #
  2624. # Since: 0.14.0
  2625. #
  2626. # Example:
  2627. #
  2628. # -> { "execute": "migrate_cancel" }
  2629. # <- { "return": {} }
  2630. #
  2631. ##
  2632. { 'command': 'migrate_cancel' }
  2633. ##
  2634. # @migrate_set_downtime:
  2635. #
  2636. # Set maximum tolerated downtime for migration.
  2637. #
  2638. # @value: maximum downtime in seconds
  2639. #
  2640. # Returns: nothing on success
  2641. #
  2642. # Notes: This command is deprecated in favor of 'migrate-set-parameters'
  2643. #
  2644. # Since: 0.14.0
  2645. #
  2646. # Example:
  2647. #
  2648. # -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
  2649. # <- { "return": {} }
  2650. #
  2651. ##
  2652. { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
  2653. ##
  2654. # @migrate_set_speed:
  2655. #
  2656. # Set maximum speed for migration.
  2657. #
  2658. # @value: maximum speed in bytes per second.
  2659. #
  2660. # Returns: nothing on success
  2661. #
  2662. # Notes: This command is deprecated in favor of 'migrate-set-parameters'
  2663. #
  2664. # Since: 0.14.0
  2665. #
  2666. # Example:
  2667. #
  2668. # -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
  2669. # <- { "return": {} }
  2670. #
  2671. ##
  2672. { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
  2673. ##
  2674. # @migrate-set-cache-size:
  2675. #
  2676. # Set cache size to be used by XBZRLE migration
  2677. #
  2678. # @value: cache size in bytes
  2679. #
  2680. # The size will be rounded down to the nearest power of 2.
  2681. # The cache size can be modified before and during ongoing migration
  2682. #
  2683. # Returns: nothing on success
  2684. #
  2685. # Since: 1.2
  2686. #
  2687. # Example:
  2688. #
  2689. # -> { "execute": "migrate-set-cache-size",
  2690. # "arguments": { "value": 536870912 } }
  2691. # <- { "return": {} }
  2692. #
  2693. ##
  2694. { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
  2695. ##
  2696. # @query-migrate-cache-size:
  2697. #
  2698. # Query migration XBZRLE cache size
  2699. #
  2700. # Returns: XBZRLE cache size in bytes
  2701. #
  2702. # Since: 1.2
  2703. #
  2704. # Example:
  2705. #
  2706. # -> { "execute": "query-migrate-cache-size" }
  2707. # <- { "return": 67108864 }
  2708. #
  2709. ##
  2710. { 'command': 'query-migrate-cache-size', 'returns': 'int' }
  2711. ##
  2712. # @ObjectPropertyInfo:
  2713. #
  2714. # @name: the name of the property
  2715. #
  2716. # @type: the type of the property. This will typically come in one of four
  2717. # forms:
  2718. #
  2719. # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
  2720. # These types are mapped to the appropriate JSON type.
  2721. #
  2722. # 2) A child type in the form 'child<subtype>' where subtype is a qdev
  2723. # device type name. Child properties create the composition tree.
  2724. #
  2725. # 3) A link type in the form 'link<subtype>' where subtype is a qdev
  2726. # device type name. Link properties form the device model graph.
  2727. #
  2728. # Since: 1.2
  2729. ##
  2730. { 'struct': 'ObjectPropertyInfo',
  2731. 'data': { 'name': 'str', 'type': 'str' } }
  2732. ##
  2733. # @qom-list:
  2734. #
  2735. # This command will list any properties of a object given a path in the object
  2736. # model.
  2737. #
  2738. # @path: the path within the object model. See @qom-get for a description of
  2739. # this parameter.
  2740. #
  2741. # Returns: a list of @ObjectPropertyInfo that describe the properties of the
  2742. # object.
  2743. #
  2744. # Since: 1.2
  2745. ##
  2746. { 'command': 'qom-list',
  2747. 'data': { 'path': 'str' },
  2748. 'returns': [ 'ObjectPropertyInfo' ] }
  2749. ##
  2750. # @qom-get:
  2751. #
  2752. # This command will get a property from a object model path and return the
  2753. # value.
  2754. #
  2755. # @path: The path within the object model. There are two forms of supported
  2756. # paths--absolute and partial paths.
  2757. #
  2758. # Absolute paths are derived from the root object and can follow child<>
  2759. # or link<> properties. Since they can follow link<> properties, they
  2760. # can be arbitrarily long. Absolute paths look like absolute filenames
  2761. # and are prefixed with a leading slash.
  2762. #
  2763. # Partial paths look like relative filenames. They do not begin
  2764. # with a prefix. The matching rules for partial paths are subtle but
  2765. # designed to make specifying objects easy. At each level of the
  2766. # composition tree, the partial path is matched as an absolute path.
  2767. # The first match is not returned. At least two matches are searched
  2768. # for. A successful result is only returned if only one match is
  2769. # found. If more than one match is found, a flag is return to
  2770. # indicate that the match was ambiguous.
  2771. #
  2772. # @property: The property name to read
  2773. #
  2774. # Returns: The property value. The type depends on the property
  2775. # type. child<> and link<> properties are returned as #str
  2776. # pathnames. All integer property types (u8, u16, etc) are
  2777. # returned as #int.
  2778. #
  2779. # Since: 1.2
  2780. ##
  2781. { 'command': 'qom-get',
  2782. 'data': { 'path': 'str', 'property': 'str' },
  2783. 'returns': 'any' }
  2784. ##
  2785. # @qom-set:
  2786. #
  2787. # This command will set a property from a object model path.
  2788. #
  2789. # @path: see @qom-get for a description of this parameter
  2790. #
  2791. # @property: the property name to set
  2792. #
  2793. # @value: a value who's type is appropriate for the property type. See @qom-get
  2794. # for a description of type mapping.
  2795. #
  2796. # Since: 1.2
  2797. ##
  2798. { 'command': 'qom-set',
  2799. 'data': { 'path': 'str', 'property': 'str', 'value': 'any' } }
  2800. ##
  2801. # @set_password:
  2802. #
  2803. # Sets the password of a remote display session.
  2804. #
  2805. # @protocol: `vnc' to modify the VNC server password
  2806. # `spice' to modify the Spice server password
  2807. #
  2808. # @password: the new password
  2809. #
  2810. # @connected: how to handle existing clients when changing the
  2811. # password. If nothing is specified, defaults to `keep'
  2812. # `fail' to fail the command if clients are connected
  2813. # `disconnect' to disconnect existing clients
  2814. # `keep' to maintain existing clients
  2815. #
  2816. # Returns: Nothing on success
  2817. # If Spice is not enabled, DeviceNotFound
  2818. #
  2819. # Since: 0.14.0
  2820. #
  2821. # Example:
  2822. #
  2823. # -> { "execute": "set_password", "arguments": { "protocol": "vnc",
  2824. # "password": "secret" } }
  2825. # <- { "return": {} }
  2826. #
  2827. ##
  2828. { 'command': 'set_password',
  2829. 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
  2830. ##
  2831. # @expire_password:
  2832. #
  2833. # Expire the password of a remote display server.
  2834. #
  2835. # @protocol: the name of the remote display protocol `vnc' or `spice'
  2836. #
  2837. # @time: when to expire the password.
  2838. # `now' to expire the password immediately
  2839. # `never' to cancel password expiration
  2840. # `+INT' where INT is the number of seconds from now (integer)
  2841. # `INT' where INT is the absolute time in seconds
  2842. #
  2843. # Returns: Nothing on success
  2844. # If @protocol is `spice' and Spice is not active, DeviceNotFound
  2845. #
  2846. # Since: 0.14.0
  2847. #
  2848. # Notes: Time is relative to the server and currently there is no way to
  2849. # coordinate server time with client time. It is not recommended to
  2850. # use the absolute time version of the @time parameter unless you're
  2851. # sure you are on the same machine as the QEMU instance.
  2852. #
  2853. # Example:
  2854. #
  2855. # -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
  2856. # "time": "+60" } }
  2857. # <- { "return": {} }
  2858. #
  2859. ##
  2860. { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
  2861. ##
  2862. # @change-vnc-password:
  2863. #
  2864. # Change the VNC server password.
  2865. #
  2866. # @password: the new password to use with VNC authentication
  2867. #
  2868. # Since: 1.1
  2869. #
  2870. # Notes: An empty password in this command will set the password to the empty
  2871. # string. Existing clients are unaffected by executing this command.
  2872. ##
  2873. { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
  2874. ##
  2875. # @change:
  2876. #
  2877. # This command is multiple commands multiplexed together.
  2878. #
  2879. # @device: This is normally the name of a block device but it may also be 'vnc'.
  2880. # when it's 'vnc', then sub command depends on @target
  2881. #
  2882. # @target: If @device is a block device, then this is the new filename.
  2883. # If @device is 'vnc', then if the value 'password' selects the vnc
  2884. # change password command. Otherwise, this specifies a new server URI
  2885. # address to listen to for VNC connections.
  2886. #
  2887. # @arg: If @device is a block device, then this is an optional format to open
  2888. # the device with.
  2889. # If @device is 'vnc' and @target is 'password', this is the new VNC
  2890. # password to set. If this argument is an empty string, then no future
  2891. # logins will be allowed.
  2892. #
  2893. # Returns: Nothing on success.
  2894. # If @device is not a valid block device, DeviceNotFound
  2895. # If the new block device is encrypted, DeviceEncrypted. Note that
  2896. # if this error is returned, the device has been opened successfully
  2897. # and an additional call to @block_passwd is required to set the
  2898. # device's password. The behavior of reads and writes to the block
  2899. # device between when these calls are executed is undefined.
  2900. #
  2901. # Notes: This interface is deprecated, and it is strongly recommended that you
  2902. # avoid using it. For changing block devices, use
  2903. # blockdev-change-medium; for changing VNC parameters, use
  2904. # change-vnc-password.
  2905. #
  2906. # Since: 0.14.0
  2907. #
  2908. # Example:
  2909. #
  2910. # 1. Change a removable medium
  2911. #
  2912. # -> { "execute": "change",
  2913. # "arguments": { "device": "ide1-cd0",
  2914. # "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
  2915. # <- { "return": {} }
  2916. #
  2917. # 2. Change VNC password
  2918. #
  2919. # -> { "execute": "change",
  2920. # "arguments": { "device": "vnc", "target": "password",
  2921. # "arg": "foobar1" } }
  2922. # <- { "return": {} }
  2923. #
  2924. ##
  2925. { 'command': 'change',
  2926. 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
  2927. ##
  2928. # @ObjectTypeInfo:
  2929. #
  2930. # This structure describes a search result from @qom-list-types
  2931. #
  2932. # @name: the type name found in the search
  2933. #
  2934. # Since: 1.1
  2935. ##
  2936. { 'struct': 'ObjectTypeInfo',
  2937. 'data': { 'name': 'str' } }
  2938. ##
  2939. # @qom-list-types:
  2940. #
  2941. # This command will return a list of types given search parameters
  2942. #
  2943. # @implements: if specified, only return types that implement this type name
  2944. #
  2945. # @abstract: if true, include abstract types in the results
  2946. #
  2947. # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
  2948. #
  2949. # Since: 1.1
  2950. ##
  2951. { 'command': 'qom-list-types',
  2952. 'data': { '*implements': 'str', '*abstract': 'bool' },
  2953. 'returns': [ 'ObjectTypeInfo' ] }
  2954. ##
  2955. # @DevicePropertyInfo:
  2956. #
  2957. # Information about device properties.
  2958. #
  2959. # @name: the name of the property
  2960. # @type: the typename of the property
  2961. # @description: if specified, the description of the property.
  2962. # (since 2.2)
  2963. #
  2964. # Since: 1.2
  2965. ##
  2966. { 'struct': 'DevicePropertyInfo',
  2967. 'data': { 'name': 'str', 'type': 'str', '*description': 'str' } }
  2968. ##
  2969. # @device-list-properties:
  2970. #
  2971. # List properties associated with a device.
  2972. #
  2973. # @typename: the type name of a device
  2974. #
  2975. # Returns: a list of DevicePropertyInfo describing a devices properties
  2976. #
  2977. # Since: 1.2
  2978. ##
  2979. { 'command': 'device-list-properties',
  2980. 'data': { 'typename': 'str'},
  2981. 'returns': [ 'DevicePropertyInfo' ] }
  2982. ##
  2983. # @migrate:
  2984. #
  2985. # Migrates the current running guest to another Virtual Machine.
  2986. #
  2987. # @uri: the Uniform Resource Identifier of the destination VM
  2988. #
  2989. # @blk: do block migration (full disk copy)
  2990. #
  2991. # @inc: incremental disk copy migration
  2992. #
  2993. # @detach: this argument exists only for compatibility reasons and
  2994. # is ignored by QEMU
  2995. #
  2996. # Returns: nothing on success
  2997. #
  2998. # Since: 0.14.0
  2999. #
  3000. # Notes:
  3001. #
  3002. # 1. The 'query-migrate' command should be used to check migration's progress
  3003. # and final result (this information is provided by the 'status' member)
  3004. #
  3005. # 2. All boolean arguments default to false
  3006. #
  3007. # 3. The user Monitor's "detach" argument is invalid in QMP and should not
  3008. # be used
  3009. #
  3010. # Example:
  3011. #
  3012. # -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
  3013. # <- { "return": {} }
  3014. #
  3015. ##
  3016. { 'command': 'migrate',
  3017. 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
  3018. ##
  3019. # @migrate-incoming:
  3020. #
  3021. # Start an incoming migration, the qemu must have been started
  3022. # with -incoming defer
  3023. #
  3024. # @uri: The Uniform Resource Identifier identifying the source or
  3025. # address to listen on
  3026. #
  3027. # Returns: nothing on success
  3028. #
  3029. # Since: 2.3
  3030. #
  3031. # Notes:
  3032. #
  3033. # 1. It's a bad idea to use a string for the uri, but it needs to stay
  3034. # compatible with -incoming and the format of the uri is already exposed
  3035. # above libvirt.
  3036. #
  3037. # 2. QEMU must be started with -incoming defer to allow migrate-incoming to
  3038. # be used.
  3039. #
  3040. # 3. The uri format is the same as for -incoming
  3041. #
  3042. # Example:
  3043. #
  3044. # -> { "execute": "migrate-incoming",
  3045. # "arguments": { "uri": "tcp::4446" } }
  3046. # <- { "return": {} }
  3047. #
  3048. ##
  3049. { 'command': 'migrate-incoming', 'data': {'uri': 'str' } }
  3050. ##
  3051. # @xen-save-devices-state:
  3052. #
  3053. # Save the state of all devices to file. The RAM and the block devices
  3054. # of the VM are not saved by this command.
  3055. #
  3056. # @filename: the file to save the state of the devices to as binary
  3057. # data. See xen-save-devices-state.txt for a description of the binary
  3058. # format.
  3059. #
  3060. # Returns: Nothing on success
  3061. #
  3062. # Since: 1.1
  3063. #
  3064. # Example:
  3065. #
  3066. # -> { "execute": "xen-save-devices-state",
  3067. # "arguments": { "filename": "/tmp/save" } }
  3068. # <- { "return": {} }
  3069. #
  3070. ##
  3071. { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
  3072. ##
  3073. # @xen-set-global-dirty-log:
  3074. #
  3075. # Enable or disable the global dirty log mode.
  3076. #
  3077. # @enable: true to enable, false to disable.
  3078. #
  3079. # Returns: nothing
  3080. #
  3081. # Since: 1.3
  3082. #
  3083. # Example:
  3084. #
  3085. # -> { "execute": "xen-set-global-dirty-log",
  3086. # "arguments": { "enable": true } }
  3087. # <- { "return": {} }
  3088. #
  3089. ##
  3090. { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
  3091. ##
  3092. # @device_add:
  3093. #
  3094. # @driver: the name of the new device's driver
  3095. #
  3096. # @bus: the device's parent bus (device tree path)
  3097. #
  3098. # @id: the device's ID, must be unique
  3099. #
  3100. # Additional arguments depend on the type.
  3101. #
  3102. # Add a device.
  3103. #
  3104. # Notes:
  3105. # 1. For detailed information about this command, please refer to the
  3106. # 'docs/qdev-device-use.txt' file.
  3107. #
  3108. # 2. It's possible to list device properties by running QEMU with the
  3109. # "-device DEVICE,help" command-line argument, where DEVICE is the
  3110. # device's name
  3111. #
  3112. # Example:
  3113. #
  3114. # -> { "execute": "device_add",
  3115. # "arguments": { "driver": "e1000", "id": "net1",
  3116. # "bus": "pci.0",
  3117. # "mac": "52:54:00:12:34:56" } }
  3118. # <- { "return": {} }
  3119. #
  3120. # TODO: This command effectively bypasses QAPI completely due to its
  3121. # "additional arguments" business. It shouldn't have been added to
  3122. # the schema in this form. It should be qapified properly, or
  3123. # replaced by a properly qapified command.
  3124. #
  3125. # Since: 0.13
  3126. ##
  3127. { 'command': 'device_add',
  3128. 'data': {'driver': 'str', '*bus': 'str', '*id': 'str'},
  3129. 'gen': false } # so we can get the additional arguments
  3130. ##
  3131. # @device_del:
  3132. #
  3133. # Remove a device from a guest
  3134. #
  3135. # @id: the device's ID or QOM path
  3136. #
  3137. # Returns: Nothing on success
  3138. # If @id is not a valid device, DeviceNotFound
  3139. #
  3140. # Notes: When this command completes, the device may not be removed from the
  3141. # guest. Hot removal is an operation that requires guest cooperation.
  3142. # This command merely requests that the guest begin the hot removal
  3143. # process. Completion of the device removal process is signaled with a
  3144. # DEVICE_DELETED event. Guest reset will automatically complete removal
  3145. # for all devices.
  3146. #
  3147. # Since: 0.14.0
  3148. #
  3149. # Example:
  3150. #
  3151. # -> { "execute": "device_del",
  3152. # "arguments": { "id": "net1" } }
  3153. # <- { "return": {} }
  3154. #
  3155. # -> { "execute": "device_del",
  3156. # "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
  3157. # <- { "return": {} }
  3158. #
  3159. ##
  3160. { 'command': 'device_del', 'data': {'id': 'str'} }
  3161. ##
  3162. # @DumpGuestMemoryFormat:
  3163. #
  3164. # An enumeration of guest-memory-dump's format.
  3165. #
  3166. # @elf: elf format
  3167. #
  3168. # @kdump-zlib: kdump-compressed format with zlib-compressed
  3169. #
  3170. # @kdump-lzo: kdump-compressed format with lzo-compressed
  3171. #
  3172. # @kdump-snappy: kdump-compressed format with snappy-compressed
  3173. #
  3174. # Since: 2.0
  3175. ##
  3176. { 'enum': 'DumpGuestMemoryFormat',
  3177. 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
  3178. ##
  3179. # @dump-guest-memory:
  3180. #
  3181. # Dump guest's memory to vmcore. It is a synchronous operation that can take
  3182. # very long depending on the amount of guest memory.
  3183. #
  3184. # @paging: if true, do paging to get guest's memory mapping. This allows
  3185. # using gdb to process the core file.
  3186. #
  3187. # IMPORTANT: this option can make QEMU allocate several gigabytes
  3188. # of RAM. This can happen for a large guest, or a
  3189. # malicious guest pretending to be large.
  3190. #
  3191. # Also, paging=true has the following limitations:
  3192. #
  3193. # 1. The guest may be in a catastrophic state or can have corrupted
  3194. # memory, which cannot be trusted
  3195. # 2. The guest can be in real-mode even if paging is enabled. For
  3196. # example, the guest uses ACPI to sleep, and ACPI sleep state
  3197. # goes in real-mode
  3198. # 3. Currently only supported on i386 and x86_64.
  3199. #
  3200. # @protocol: the filename or file descriptor of the vmcore. The supported
  3201. # protocols are:
  3202. #
  3203. # 1. file: the protocol starts with "file:", and the following
  3204. # string is the file's path.
  3205. # 2. fd: the protocol starts with "fd:", and the following string
  3206. # is the fd's name.
  3207. #
  3208. # @detach: if true, QMP will return immediately rather than
  3209. # waiting for the dump to finish. The user can track progress
  3210. # using "query-dump". (since 2.6).
  3211. #
  3212. # @begin: if specified, the starting physical address.
  3213. #
  3214. # @length: if specified, the memory size, in bytes. If you don't
  3215. # want to dump all guest's memory, please specify the start @begin
  3216. # and @length
  3217. #
  3218. # @format: if specified, the format of guest memory dump. But non-elf
  3219. # format is conflict with paging and filter, ie. @paging, @begin and
  3220. # @length is not allowed to be specified with non-elf @format at the
  3221. # same time (since 2.0)
  3222. #
  3223. # Note: All boolean arguments default to false
  3224. #
  3225. # Returns: nothing on success
  3226. #
  3227. # Since: 1.2
  3228. #
  3229. # Example:
  3230. #
  3231. # -> { "execute": "dump-guest-memory",
  3232. # "arguments": { "protocol": "fd:dump" } }
  3233. # <- { "return": {} }
  3234. #
  3235. ##
  3236. { 'command': 'dump-guest-memory',
  3237. 'data': { 'paging': 'bool', 'protocol': 'str', '*detach': 'bool',
  3238. '*begin': 'int', '*length': 'int',
  3239. '*format': 'DumpGuestMemoryFormat'} }
  3240. ##
  3241. # @DumpStatus:
  3242. #
  3243. # Describe the status of a long-running background guest memory dump.
  3244. #
  3245. # @none: no dump-guest-memory has started yet.
  3246. #
  3247. # @active: there is one dump running in background.
  3248. #
  3249. # @completed: the last dump has finished successfully.
  3250. #
  3251. # @failed: the last dump has failed.
  3252. #
  3253. # Since: 2.6
  3254. ##
  3255. { 'enum': 'DumpStatus',
  3256. 'data': [ 'none', 'active', 'completed', 'failed' ] }
  3257. ##
  3258. # @DumpQueryResult:
  3259. #
  3260. # The result format for 'query-dump'.
  3261. #
  3262. # @status: enum of @DumpStatus, which shows current dump status
  3263. #
  3264. # @completed: bytes written in latest dump (uncompressed)
  3265. #
  3266. # @total: total bytes to be written in latest dump (uncompressed)
  3267. #
  3268. # Since: 2.6
  3269. ##
  3270. { 'struct': 'DumpQueryResult',
  3271. 'data': { 'status': 'DumpStatus',
  3272. 'completed': 'int',
  3273. 'total': 'int' } }
  3274. ##
  3275. # @query-dump:
  3276. #
  3277. # Query latest dump status.
  3278. #
  3279. # Returns: A @DumpStatus object showing the dump status.
  3280. #
  3281. # Since: 2.6
  3282. #
  3283. # Example:
  3284. #
  3285. # -> { "execute": "query-dump" }
  3286. # <- { "return": { "status": "active", "completed": 1024000,
  3287. # "total": 2048000 } }
  3288. #
  3289. ##
  3290. { 'command': 'query-dump', 'returns': 'DumpQueryResult' }
  3291. ##
  3292. # @DumpGuestMemoryCapability:
  3293. #
  3294. # A list of the available formats for dump-guest-memory
  3295. #
  3296. # Since: 2.0
  3297. ##
  3298. { 'struct': 'DumpGuestMemoryCapability',
  3299. 'data': {
  3300. 'formats': ['DumpGuestMemoryFormat'] } }
  3301. ##
  3302. # @query-dump-guest-memory-capability:
  3303. #
  3304. # Returns the available formats for dump-guest-memory
  3305. #
  3306. # Returns: A @DumpGuestMemoryCapability object listing available formats for
  3307. # dump-guest-memory
  3308. #
  3309. # Since: 2.0
  3310. #
  3311. # Example:
  3312. #
  3313. # -> { "execute": "query-dump-guest-memory-capability" }
  3314. # <- { "return": { "formats":
  3315. # ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
  3316. #
  3317. ##
  3318. { 'command': 'query-dump-guest-memory-capability',
  3319. 'returns': 'DumpGuestMemoryCapability' }
  3320. ##
  3321. # @dump-skeys:
  3322. #
  3323. # Dump guest's storage keys
  3324. #
  3325. # @filename: the path to the file to dump to
  3326. #
  3327. # This command is only supported on s390 architecture.
  3328. #
  3329. # Since: 2.5
  3330. #
  3331. # Example:
  3332. #
  3333. # -> { "execute": "dump-skeys",
  3334. # "arguments": { "filename": "/tmp/skeys" } }
  3335. # <- { "return": {} }
  3336. #
  3337. ##
  3338. { 'command': 'dump-skeys',
  3339. 'data': { 'filename': 'str' } }
  3340. ##
  3341. # @netdev_add:
  3342. #
  3343. # Add a network backend.
  3344. #
  3345. # @type: the type of network backend. Current valid values are 'user', 'tap',
  3346. # 'vde', 'socket', 'dump' and 'bridge'
  3347. #
  3348. # @id: the name of the new network backend
  3349. #
  3350. # Additional arguments depend on the type.
  3351. #
  3352. # TODO: This command effectively bypasses QAPI completely due to its
  3353. # "additional arguments" business. It shouldn't have been added to
  3354. # the schema in this form. It should be qapified properly, or
  3355. # replaced by a properly qapified command.
  3356. #
  3357. # Since: 0.14.0
  3358. #
  3359. # Returns: Nothing on success
  3360. # If @type is not a valid network backend, DeviceNotFound
  3361. #
  3362. # Example:
  3363. #
  3364. # -> { "execute": "netdev_add",
  3365. # "arguments": { "type": "user", "id": "netdev1",
  3366. # "dnssearch": "example.org" } }
  3367. # <- { "return": {} }
  3368. #
  3369. ##
  3370. { 'command': 'netdev_add',
  3371. 'data': {'type': 'str', 'id': 'str'},
  3372. 'gen': false } # so we can get the additional arguments
  3373. ##
  3374. # @netdev_del:
  3375. #
  3376. # Remove a network backend.
  3377. #
  3378. # @id: the name of the network backend to remove
  3379. #
  3380. # Returns: Nothing on success
  3381. # If @id is not a valid network backend, DeviceNotFound
  3382. #
  3383. # Since: 0.14.0
  3384. #
  3385. # Example:
  3386. #
  3387. # -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
  3388. # <- { "return": {} }
  3389. #
  3390. ##
  3391. { 'command': 'netdev_del', 'data': {'id': 'str'} }
  3392. ##
  3393. # @object-add:
  3394. #
  3395. # Create a QOM object.
  3396. #
  3397. # @qom-type: the class name for the object to be created
  3398. #
  3399. # @id: the name of the new object
  3400. #
  3401. # @props: a dictionary of properties to be passed to the backend
  3402. #
  3403. # Returns: Nothing on success
  3404. # Error if @qom-type is not a valid class name
  3405. #
  3406. # Since: 2.0
  3407. #
  3408. # Example:
  3409. #
  3410. # -> { "execute": "object-add",
  3411. # "arguments": { "qom-type": "rng-random", "id": "rng1",
  3412. # "props": { "filename": "/dev/hwrng" } } }
  3413. # <- { "return": {} }
  3414. #
  3415. ##
  3416. { 'command': 'object-add',
  3417. 'data': {'qom-type': 'str', 'id': 'str', '*props': 'any'} }
  3418. ##
  3419. # @object-del:
  3420. #
  3421. # Remove a QOM object.
  3422. #
  3423. # @id: the name of the QOM object to remove
  3424. #
  3425. # Returns: Nothing on success
  3426. # Error if @id is not a valid id for a QOM object
  3427. #
  3428. # Since: 2.0
  3429. #
  3430. # Example:
  3431. #
  3432. # -> { "execute": "object-del", "arguments": { "id": "rng1" } }
  3433. # <- { "return": {} }
  3434. #
  3435. ##
  3436. { 'command': 'object-del', 'data': {'id': 'str'} }
  3437. ##
  3438. # @NetdevNoneOptions:
  3439. #
  3440. # Use it alone to have zero network devices.
  3441. #
  3442. # Since: 1.2
  3443. ##
  3444. { 'struct': 'NetdevNoneOptions',
  3445. 'data': { } }
  3446. ##
  3447. # @NetLegacyNicOptions:
  3448. #
  3449. # Create a new Network Interface Card.
  3450. #
  3451. # @netdev: id of -netdev to connect to
  3452. #
  3453. # @macaddr: MAC address
  3454. #
  3455. # @model: device model (e1000, rtl8139, virtio etc.)
  3456. #
  3457. # @addr: PCI device address
  3458. #
  3459. # @vectors: number of MSI-x vectors, 0 to disable MSI-X
  3460. #
  3461. # Since: 1.2
  3462. ##
  3463. { 'struct': 'NetLegacyNicOptions',
  3464. 'data': {
  3465. '*netdev': 'str',
  3466. '*macaddr': 'str',
  3467. '*model': 'str',
  3468. '*addr': 'str',
  3469. '*vectors': 'uint32' } }
  3470. ##
  3471. # @String:
  3472. #
  3473. # A fat type wrapping 'str', to be embedded in lists.
  3474. #
  3475. # Since: 1.2
  3476. ##
  3477. { 'struct': 'String',
  3478. 'data': {
  3479. 'str': 'str' } }
  3480. ##
  3481. # @NetdevUserOptions:
  3482. #
  3483. # Use the user mode network stack which requires no administrator privilege to
  3484. # run.
  3485. #
  3486. # @hostname: client hostname reported by the builtin DHCP server
  3487. #
  3488. # @restrict: isolate the guest from the host
  3489. #
  3490. # @ipv4: whether to support IPv4, default true for enabled
  3491. # (since 2.6)
  3492. #
  3493. # @ipv6: whether to support IPv6, default true for enabled
  3494. # (since 2.6)
  3495. #
  3496. # @ip: legacy parameter, use net= instead
  3497. #
  3498. # @net: IP network address that the guest will see, in the
  3499. # form addr[/netmask] The netmask is optional, and can be
  3500. # either in the form a.b.c.d or as a number of valid top-most
  3501. # bits. Default is 10.0.2.0/24.
  3502. #
  3503. # @host: guest-visible address of the host
  3504. #
  3505. # @tftp: root directory of the built-in TFTP server
  3506. #
  3507. # @bootfile: BOOTP filename, for use with tftp=
  3508. #
  3509. # @dhcpstart: the first of the 16 IPs the built-in DHCP server can
  3510. # assign
  3511. #
  3512. # @dns: guest-visible address of the virtual nameserver
  3513. #
  3514. # @dnssearch: list of DNS suffixes to search, passed as DHCP option
  3515. # to the guest
  3516. #
  3517. # @ipv6-prefix: IPv6 network prefix (default is fec0::) (since
  3518. # 2.6). The network prefix is given in the usual
  3519. # hexadecimal IPv6 address notation.
  3520. #
  3521. # @ipv6-prefixlen: IPv6 network prefix length (default is 64)
  3522. # (since 2.6)
  3523. #
  3524. # @ipv6-host: guest-visible IPv6 address of the host (since 2.6)
  3525. #
  3526. # @ipv6-dns: guest-visible IPv6 address of the virtual
  3527. # nameserver (since 2.6)
  3528. #
  3529. # @smb: root directory of the built-in SMB server
  3530. #
  3531. # @smbserver: IP address of the built-in SMB server
  3532. #
  3533. # @hostfwd: redirect incoming TCP or UDP host connections to guest
  3534. # endpoints
  3535. #
  3536. # @guestfwd: forward guest TCP connections
  3537. #
  3538. # Since: 1.2
  3539. ##
  3540. { 'struct': 'NetdevUserOptions',
  3541. 'data': {
  3542. '*hostname': 'str',
  3543. '*restrict': 'bool',
  3544. '*ipv4': 'bool',
  3545. '*ipv6': 'bool',
  3546. '*ip': 'str',
  3547. '*net': 'str',
  3548. '*host': 'str',
  3549. '*tftp': 'str',
  3550. '*bootfile': 'str',
  3551. '*dhcpstart': 'str',
  3552. '*dns': 'str',
  3553. '*dnssearch': ['String'],
  3554. '*ipv6-prefix': 'str',
  3555. '*ipv6-prefixlen': 'int',
  3556. '*ipv6-host': 'str',
  3557. '*ipv6-dns': 'str',
  3558. '*smb': 'str',
  3559. '*smbserver': 'str',
  3560. '*hostfwd': ['String'],
  3561. '*guestfwd': ['String'] } }
  3562. ##
  3563. # @NetdevTapOptions:
  3564. #
  3565. # Connect the host TAP network interface name to the VLAN.
  3566. #
  3567. # @ifname: interface name
  3568. #
  3569. # @fd: file descriptor of an already opened tap
  3570. #
  3571. # @fds: multiple file descriptors of already opened multiqueue capable
  3572. # tap
  3573. #
  3574. # @script: script to initialize the interface
  3575. #
  3576. # @downscript: script to shut down the interface
  3577. #
  3578. # @br: bridge name (since 2.8)
  3579. #
  3580. # @helper: command to execute to configure bridge
  3581. #
  3582. # @sndbuf: send buffer limit. Understands [TGMKkb] suffixes.
  3583. #
  3584. # @vnet_hdr: enable the IFF_VNET_HDR flag on the tap interface
  3585. #
  3586. # @vhost: enable vhost-net network accelerator
  3587. #
  3588. # @vhostfd: file descriptor of an already opened vhost net device
  3589. #
  3590. # @vhostfds: file descriptors of multiple already opened vhost net
  3591. # devices
  3592. #
  3593. # @vhostforce: vhost on for non-MSIX virtio guests
  3594. #
  3595. # @queues: number of queues to be created for multiqueue capable tap
  3596. #
  3597. # @poll-us: maximum number of microseconds that could
  3598. # be spent on busy polling for tap (since 2.7)
  3599. #
  3600. # Since: 1.2
  3601. ##
  3602. { 'struct': 'NetdevTapOptions',
  3603. 'data': {
  3604. '*ifname': 'str',
  3605. '*fd': 'str',
  3606. '*fds': 'str',
  3607. '*script': 'str',
  3608. '*downscript': 'str',
  3609. '*br': 'str',
  3610. '*helper': 'str',
  3611. '*sndbuf': 'size',
  3612. '*vnet_hdr': 'bool',
  3613. '*vhost': 'bool',
  3614. '*vhostfd': 'str',
  3615. '*vhostfds': 'str',
  3616. '*vhostforce': 'bool',
  3617. '*queues': 'uint32',
  3618. '*poll-us': 'uint32'} }
  3619. ##
  3620. # @NetdevSocketOptions:
  3621. #
  3622. # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
  3623. # socket connection.
  3624. #
  3625. # @fd: file descriptor of an already opened socket
  3626. #
  3627. # @listen: port number, and optional hostname, to listen on
  3628. #
  3629. # @connect: port number, and optional hostname, to connect to
  3630. #
  3631. # @mcast: UDP multicast address and port number
  3632. #
  3633. # @localaddr: source address and port for multicast and udp packets
  3634. #
  3635. # @udp: UDP unicast address and port number
  3636. #
  3637. # Since: 1.2
  3638. ##
  3639. { 'struct': 'NetdevSocketOptions',
  3640. 'data': {
  3641. '*fd': 'str',
  3642. '*listen': 'str',
  3643. '*connect': 'str',
  3644. '*mcast': 'str',
  3645. '*localaddr': 'str',
  3646. '*udp': 'str' } }
  3647. ##
  3648. # @NetdevL2TPv3Options:
  3649. #
  3650. # Connect the VLAN to Ethernet over L2TPv3 Static tunnel
  3651. #
  3652. # @src: source address
  3653. #
  3654. # @dst: destination address
  3655. #
  3656. # @srcport: source port - mandatory for udp, optional for ip
  3657. #
  3658. # @dstport: destination port - mandatory for udp, optional for ip
  3659. #
  3660. # @ipv6: force the use of ipv6
  3661. #
  3662. # @udp: use the udp version of l2tpv3 encapsulation
  3663. #
  3664. # @cookie64: use 64 bit coookies
  3665. #
  3666. # @counter: have sequence counter
  3667. #
  3668. # @pincounter: pin sequence counter to zero -
  3669. # workaround for buggy implementations or
  3670. # networks with packet reorder
  3671. #
  3672. # @txcookie: 32 or 64 bit transmit cookie
  3673. #
  3674. # @rxcookie: 32 or 64 bit receive cookie
  3675. #
  3676. # @txsession: 32 bit transmit session
  3677. #
  3678. # @rxsession: 32 bit receive session - if not specified
  3679. # set to the same value as transmit
  3680. #
  3681. # @offset: additional offset - allows the insertion of
  3682. # additional application-specific data before the packet payload
  3683. #
  3684. # Since: 2.1
  3685. ##
  3686. { 'struct': 'NetdevL2TPv3Options',
  3687. 'data': {
  3688. 'src': 'str',
  3689. 'dst': 'str',
  3690. '*srcport': 'str',
  3691. '*dstport': 'str',
  3692. '*ipv6': 'bool',
  3693. '*udp': 'bool',
  3694. '*cookie64': 'bool',
  3695. '*counter': 'bool',
  3696. '*pincounter': 'bool',
  3697. '*txcookie': 'uint64',
  3698. '*rxcookie': 'uint64',
  3699. 'txsession': 'uint32',
  3700. '*rxsession': 'uint32',
  3701. '*offset': 'uint32' } }
  3702. ##
  3703. # @NetdevVdeOptions:
  3704. #
  3705. # Connect the VLAN to a vde switch running on the host.
  3706. #
  3707. # @sock: socket path
  3708. #
  3709. # @port: port number
  3710. #
  3711. # @group: group owner of socket
  3712. #
  3713. # @mode: permissions for socket
  3714. #
  3715. # Since: 1.2
  3716. ##
  3717. { 'struct': 'NetdevVdeOptions',
  3718. 'data': {
  3719. '*sock': 'str',
  3720. '*port': 'uint16',
  3721. '*group': 'str',
  3722. '*mode': 'uint16' } }
  3723. ##
  3724. # @NetdevDumpOptions:
  3725. #
  3726. # Dump VLAN network traffic to a file.
  3727. #
  3728. # @len: per-packet size limit (64k default). Understands [TGMKkb]
  3729. # suffixes.
  3730. #
  3731. # @file: dump file path (default is qemu-vlan0.pcap)
  3732. #
  3733. # Since: 1.2
  3734. ##
  3735. { 'struct': 'NetdevDumpOptions',
  3736. 'data': {
  3737. '*len': 'size',
  3738. '*file': 'str' } }
  3739. ##
  3740. # @NetdevBridgeOptions:
  3741. #
  3742. # Connect a host TAP network interface to a host bridge device.
  3743. #
  3744. # @br: bridge name
  3745. #
  3746. # @helper: command to execute to configure bridge
  3747. #
  3748. # Since: 1.2
  3749. ##
  3750. { 'struct': 'NetdevBridgeOptions',
  3751. 'data': {
  3752. '*br': 'str',
  3753. '*helper': 'str' } }
  3754. ##
  3755. # @NetdevHubPortOptions:
  3756. #
  3757. # Connect two or more net clients through a software hub.
  3758. #
  3759. # @hubid: hub identifier number
  3760. #
  3761. # Since: 1.2
  3762. ##
  3763. { 'struct': 'NetdevHubPortOptions',
  3764. 'data': {
  3765. 'hubid': 'int32' } }
  3766. ##
  3767. # @NetdevNetmapOptions:
  3768. #
  3769. # Connect a client to a netmap-enabled NIC or to a VALE switch port
  3770. #
  3771. # @ifname: Either the name of an existing network interface supported by
  3772. # netmap, or the name of a VALE port (created on the fly).
  3773. # A VALE port name is in the form 'valeXXX:YYY', where XXX and
  3774. # YYY are non-negative integers. XXX identifies a switch and
  3775. # YYY identifies a port of the switch. VALE ports having the
  3776. # same XXX are therefore connected to the same switch.
  3777. #
  3778. # @devname: path of the netmap device (default: '/dev/netmap').
  3779. #
  3780. # Since: 2.0
  3781. ##
  3782. { 'struct': 'NetdevNetmapOptions',
  3783. 'data': {
  3784. 'ifname': 'str',
  3785. '*devname': 'str' } }
  3786. ##
  3787. # @NetdevVhostUserOptions:
  3788. #
  3789. # Vhost-user network backend
  3790. #
  3791. # @chardev: name of a unix socket chardev
  3792. #
  3793. # @vhostforce: vhost on for non-MSIX virtio guests (default: false).
  3794. #
  3795. # @queues: number of queues to be created for multiqueue vhost-user
  3796. # (default: 1) (Since 2.5)
  3797. #
  3798. # Since: 2.1
  3799. ##
  3800. { 'struct': 'NetdevVhostUserOptions',
  3801. 'data': {
  3802. 'chardev': 'str',
  3803. '*vhostforce': 'bool',
  3804. '*queues': 'int' } }
  3805. ##
  3806. # @NetClientDriver:
  3807. #
  3808. # Available netdev drivers.
  3809. #
  3810. # Since: 2.7
  3811. ##
  3812. { 'enum': 'NetClientDriver',
  3813. 'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde', 'dump',
  3814. 'bridge', 'hubport', 'netmap', 'vhost-user' ] }
  3815. ##
  3816. # @Netdev:
  3817. #
  3818. # Captures the configuration of a network device.
  3819. #
  3820. # @id: identifier for monitor commands.
  3821. #
  3822. # @type: Specify the driver used for interpreting remaining arguments.
  3823. #
  3824. # Since: 1.2
  3825. #
  3826. # 'l2tpv3' - since 2.1
  3827. ##
  3828. { 'union': 'Netdev',
  3829. 'base': { 'id': 'str', 'type': 'NetClientDriver' },
  3830. 'discriminator': 'type',
  3831. 'data': {
  3832. 'none': 'NetdevNoneOptions',
  3833. 'nic': 'NetLegacyNicOptions',
  3834. 'user': 'NetdevUserOptions',
  3835. 'tap': 'NetdevTapOptions',
  3836. 'l2tpv3': 'NetdevL2TPv3Options',
  3837. 'socket': 'NetdevSocketOptions',
  3838. 'vde': 'NetdevVdeOptions',
  3839. 'dump': 'NetdevDumpOptions',
  3840. 'bridge': 'NetdevBridgeOptions',
  3841. 'hubport': 'NetdevHubPortOptions',
  3842. 'netmap': 'NetdevNetmapOptions',
  3843. 'vhost-user': 'NetdevVhostUserOptions' } }
  3844. ##
  3845. # @NetLegacy:
  3846. #
  3847. # Captures the configuration of a network device; legacy.
  3848. #
  3849. # @vlan: vlan number
  3850. #
  3851. # @id: identifier for monitor commands
  3852. #
  3853. # @name: identifier for monitor commands, ignored if @id is present
  3854. #
  3855. # @opts: device type specific properties (legacy)
  3856. #
  3857. # Since: 1.2
  3858. ##
  3859. { 'struct': 'NetLegacy',
  3860. 'data': {
  3861. '*vlan': 'int32',
  3862. '*id': 'str',
  3863. '*name': 'str',
  3864. 'opts': 'NetLegacyOptions' } }
  3865. ##
  3866. # @NetLegacyOptionsType:
  3867. #
  3868. # Since: 1.2
  3869. ##
  3870. { 'enum': 'NetLegacyOptionsType',
  3871. 'data': ['none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
  3872. 'dump', 'bridge', 'netmap', 'vhost-user'] }
  3873. ##
  3874. # @NetLegacyOptions:
  3875. #
  3876. # Like Netdev, but for use only by the legacy command line options
  3877. #
  3878. # Since: 1.2
  3879. ##
  3880. { 'union': 'NetLegacyOptions',
  3881. 'base': { 'type': 'NetLegacyOptionsType' },
  3882. 'discriminator': 'type',
  3883. 'data': {
  3884. 'none': 'NetdevNoneOptions',
  3885. 'nic': 'NetLegacyNicOptions',
  3886. 'user': 'NetdevUserOptions',
  3887. 'tap': 'NetdevTapOptions',
  3888. 'l2tpv3': 'NetdevL2TPv3Options',
  3889. 'socket': 'NetdevSocketOptions',
  3890. 'vde': 'NetdevVdeOptions',
  3891. 'dump': 'NetdevDumpOptions',
  3892. 'bridge': 'NetdevBridgeOptions',
  3893. 'netmap': 'NetdevNetmapOptions',
  3894. 'vhost-user': 'NetdevVhostUserOptions' } }
  3895. ##
  3896. # @NetFilterDirection:
  3897. #
  3898. # Indicates whether a netfilter is attached to a netdev's transmit queue or
  3899. # receive queue or both.
  3900. #
  3901. # @all: the filter is attached both to the receive and the transmit
  3902. # queue of the netdev (default).
  3903. #
  3904. # @rx: the filter is attached to the receive queue of the netdev,
  3905. # where it will receive packets sent to the netdev.
  3906. #
  3907. # @tx: the filter is attached to the transmit queue of the netdev,
  3908. # where it will receive packets sent by the netdev.
  3909. #
  3910. # Since: 2.5
  3911. ##
  3912. { 'enum': 'NetFilterDirection',
  3913. 'data': [ 'all', 'rx', 'tx' ] }
  3914. ##
  3915. # @InetSocketAddressBase:
  3916. #
  3917. # @host: host part of the address
  3918. # @port: port part of the address
  3919. ##
  3920. { 'struct': 'InetSocketAddressBase',
  3921. 'data': {
  3922. 'host': 'str',
  3923. 'port': 'str' } }
  3924. ##
  3925. # @InetSocketAddress:
  3926. #
  3927. # Captures a socket address or address range in the Internet namespace.
  3928. #
  3929. # @numeric: true if the host/port are guaranteed to be numeric,
  3930. # false if name resolution should be attempted. Defaults to false.
  3931. # (Since 2.9)
  3932. #
  3933. # @to: If present, this is range of possible addresses, with port
  3934. # between @port and @to.
  3935. #
  3936. # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
  3937. #
  3938. # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
  3939. #
  3940. # Since: 1.3
  3941. ##
  3942. { 'struct': 'InetSocketAddress',
  3943. 'base': 'InetSocketAddressBase',
  3944. 'data': {
  3945. '*numeric': 'bool',
  3946. '*to': 'uint16',
  3947. '*ipv4': 'bool',
  3948. '*ipv6': 'bool' } }
  3949. ##
  3950. # @UnixSocketAddress:
  3951. #
  3952. # Captures a socket address in the local ("Unix socket") namespace.
  3953. #
  3954. # @path: filesystem path to use
  3955. #
  3956. # Since: 1.3
  3957. ##
  3958. { 'struct': 'UnixSocketAddress',
  3959. 'data': {
  3960. 'path': 'str' } }
  3961. ##
  3962. # @VsockSocketAddress:
  3963. #
  3964. # Captures a socket address in the vsock namespace.
  3965. #
  3966. # @cid: unique host identifier
  3967. # @port: port
  3968. #
  3969. # Note: string types are used to allow for possible future hostname or
  3970. # service resolution support.
  3971. #
  3972. # Since: 2.8
  3973. ##
  3974. { 'struct': 'VsockSocketAddress',
  3975. 'data': {
  3976. 'cid': 'str',
  3977. 'port': 'str' } }
  3978. ##
  3979. # @SocketAddressLegacy:
  3980. #
  3981. # Captures the address of a socket, which could also be a named file descriptor
  3982. #
  3983. # Note: This type is deprecated in favor of SocketAddress. The
  3984. # difference between SocketAddressLegacy and SocketAddress is that the
  3985. # latter is a flat union rather than a simple union. Flat is nicer
  3986. # because it avoids nesting on the wire, i.e. that form has fewer {}.
  3987. #
  3988. # Since: 1.3
  3989. ##
  3990. { 'union': 'SocketAddressLegacy',
  3991. 'data': {
  3992. 'inet': 'InetSocketAddress',
  3993. 'unix': 'UnixSocketAddress',
  3994. 'vsock': 'VsockSocketAddress',
  3995. 'fd': 'String' } }
  3996. ##
  3997. # @SocketAddressType:
  3998. #
  3999. # Available SocketAddress types
  4000. #
  4001. # @inet: Internet address
  4002. #
  4003. # @unix: Unix domain socket
  4004. #
  4005. # Since: 2.9
  4006. ##
  4007. { 'enum': 'SocketAddressType',
  4008. 'data': [ 'inet', 'unix', 'vsock', 'fd' ] }
  4009. ##
  4010. # @SocketAddress:
  4011. #
  4012. # Captures the address of a socket, which could also be a named file
  4013. # descriptor
  4014. #
  4015. # @type: Transport type
  4016. #
  4017. # Since: 2.9
  4018. ##
  4019. { 'union': 'SocketAddress',
  4020. 'base': { 'type': 'SocketAddressType' },
  4021. 'discriminator': 'type',
  4022. 'data': { 'inet': 'InetSocketAddress',
  4023. 'unix': 'UnixSocketAddress',
  4024. 'vsock': 'VsockSocketAddress',
  4025. 'fd': 'String' } }
  4026. ##
  4027. # @getfd:
  4028. #
  4029. # Receive a file descriptor via SCM rights and assign it a name
  4030. #
  4031. # @fdname: file descriptor name
  4032. #
  4033. # Returns: Nothing on success
  4034. #
  4035. # Since: 0.14.0
  4036. #
  4037. # Notes: If @fdname already exists, the file descriptor assigned to
  4038. # it will be closed and replaced by the received file
  4039. # descriptor.
  4040. #
  4041. # The 'closefd' command can be used to explicitly close the
  4042. # file descriptor when it is no longer needed.
  4043. #
  4044. # Example:
  4045. #
  4046. # -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
  4047. # <- { "return": {} }
  4048. #
  4049. ##
  4050. { 'command': 'getfd', 'data': {'fdname': 'str'} }
  4051. ##
  4052. # @closefd:
  4053. #
  4054. # Close a file descriptor previously passed via SCM rights
  4055. #
  4056. # @fdname: file descriptor name
  4057. #
  4058. # Returns: Nothing on success
  4059. #
  4060. # Since: 0.14.0
  4061. #
  4062. # Example:
  4063. #
  4064. # -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
  4065. # <- { "return": {} }
  4066. #
  4067. ##
  4068. { 'command': 'closefd', 'data': {'fdname': 'str'} }
  4069. ##
  4070. # @MachineInfo:
  4071. #
  4072. # Information describing a machine.
  4073. #
  4074. # @name: the name of the machine
  4075. #
  4076. # @alias: an alias for the machine name
  4077. #
  4078. # @is-default: whether the machine is default
  4079. #
  4080. # @cpu-max: maximum number of CPUs supported by the machine type
  4081. # (since 1.5.0)
  4082. #
  4083. # @hotpluggable-cpus: cpu hotplug via -device is supported (since 2.7.0)
  4084. #
  4085. # Since: 1.2.0
  4086. ##
  4087. { 'struct': 'MachineInfo',
  4088. 'data': { 'name': 'str', '*alias': 'str',
  4089. '*is-default': 'bool', 'cpu-max': 'int',
  4090. 'hotpluggable-cpus': 'bool'} }
  4091. ##
  4092. # @query-machines:
  4093. #
  4094. # Return a list of supported machines
  4095. #
  4096. # Returns: a list of MachineInfo
  4097. #
  4098. # Since: 1.2.0
  4099. ##
  4100. { 'command': 'query-machines', 'returns': ['MachineInfo'] }
  4101. ##
  4102. # @CpuDefinitionInfo:
  4103. #
  4104. # Virtual CPU definition.
  4105. #
  4106. # @name: the name of the CPU definition
  4107. #
  4108. # @migration-safe: whether a CPU definition can be safely used for
  4109. # migration in combination with a QEMU compatibility machine
  4110. # when migrating between different QMU versions and between
  4111. # hosts with different sets of (hardware or software)
  4112. # capabilities. If not provided, information is not available
  4113. # and callers should not assume the CPU definition to be
  4114. # migration-safe. (since 2.8)
  4115. #
  4116. # @static: whether a CPU definition is static and will not change depending on
  4117. # QEMU version, machine type, machine options and accelerator options.
  4118. # A static model is always migration-safe. (since 2.8)
  4119. #
  4120. # @unavailable-features: List of properties that prevent
  4121. # the CPU model from running in the current
  4122. # host. (since 2.8)
  4123. # @typename: Type name that can be used as argument to @device-list-properties,
  4124. # to introspect properties configurable using -cpu or -global.
  4125. # (since 2.9)
  4126. #
  4127. # @unavailable-features is a list of QOM property names that
  4128. # represent CPU model attributes that prevent the CPU from running.
  4129. # If the QOM property is read-only, that means there's no known
  4130. # way to make the CPU model run in the current host. Implementations
  4131. # that choose not to provide specific information return the
  4132. # property name "type".
  4133. # If the property is read-write, it means that it MAY be possible
  4134. # to run the CPU model in the current host if that property is
  4135. # changed. Management software can use it as hints to suggest or
  4136. # choose an alternative for the user, or just to generate meaningful
  4137. # error messages explaining why the CPU model can't be used.
  4138. # If @unavailable-features is an empty list, the CPU model is
  4139. # runnable using the current host and machine-type.
  4140. # If @unavailable-features is not present, runnability
  4141. # information for the CPU is not available.
  4142. #
  4143. # Since: 1.2.0
  4144. ##
  4145. { 'struct': 'CpuDefinitionInfo',
  4146. 'data': { 'name': 'str', '*migration-safe': 'bool', 'static': 'bool',
  4147. '*unavailable-features': [ 'str' ], 'typename': 'str' } }
  4148. ##
  4149. # @query-cpu-definitions:
  4150. #
  4151. # Return a list of supported virtual CPU definitions
  4152. #
  4153. # Returns: a list of CpuDefInfo
  4154. #
  4155. # Since: 1.2.0
  4156. ##
  4157. { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
  4158. ##
  4159. # @CpuModelInfo:
  4160. #
  4161. # Virtual CPU model.
  4162. #
  4163. # A CPU model consists of the name of a CPU definition, to which
  4164. # delta changes are applied (e.g. features added/removed). Most magic values
  4165. # that an architecture might require should be hidden behind the name.
  4166. # However, if required, architectures can expose relevant properties.
  4167. #
  4168. # @name: the name of the CPU definition the model is based on
  4169. # @props: a dictionary of QOM properties to be applied
  4170. #
  4171. # Since: 2.8.0
  4172. ##
  4173. { 'struct': 'CpuModelInfo',
  4174. 'data': { 'name': 'str',
  4175. '*props': 'any' } }
  4176. ##
  4177. # @CpuModelExpansionType:
  4178. #
  4179. # An enumeration of CPU model expansion types.
  4180. #
  4181. # @static: Expand to a static CPU model, a combination of a static base
  4182. # model name and property delta changes. As the static base model will
  4183. # never change, the expanded CPU model will be the same, independant of
  4184. # independent of QEMU version, machine type, machine options, and
  4185. # accelerator options. Therefore, the resulting model can be used by
  4186. # tooling without having to specify a compatibility machine - e.g. when
  4187. # displaying the "host" model. static CPU models are migration-safe.
  4188. #
  4189. # @full: Expand all properties. The produced model is not guaranteed to be
  4190. # migration-safe, but allows tooling to get an insight and work with
  4191. # model details.
  4192. #
  4193. # Note: When a non-migration-safe CPU model is expanded in static mode, some
  4194. # features enabled by the CPU model may be omitted, because they can't be
  4195. # implemented by a static CPU model definition (e.g. cache info passthrough and
  4196. # PMU passthrough in x86). If you need an accurate representation of the
  4197. # features enabled by a non-migration-safe CPU model, use @full. If you need a
  4198. # static representation that will keep ABI compatibility even when changing QEMU
  4199. # version or machine-type, use @static (but keep in mind that some features may
  4200. # be omitted).
  4201. #
  4202. # Since: 2.8.0
  4203. ##
  4204. { 'enum': 'CpuModelExpansionType',
  4205. 'data': [ 'static', 'full' ] }
  4206. ##
  4207. # @CpuModelExpansionInfo:
  4208. #
  4209. # The result of a cpu model expansion.
  4210. #
  4211. # @model: the expanded CpuModelInfo.
  4212. #
  4213. # Since: 2.8.0
  4214. ##
  4215. { 'struct': 'CpuModelExpansionInfo',
  4216. 'data': { 'model': 'CpuModelInfo' } }
  4217. ##
  4218. # @query-cpu-model-expansion:
  4219. #
  4220. # Expands a given CPU model (or a combination of CPU model + additional options)
  4221. # to different granularities, allowing tooling to get an understanding what a
  4222. # specific CPU model looks like in QEMU under a certain configuration.
  4223. #
  4224. # This interface can be used to query the "host" CPU model.
  4225. #
  4226. # The data returned by this command may be affected by:
  4227. #
  4228. # * QEMU version: CPU models may look different depending on the QEMU version.
  4229. # (Except for CPU models reported as "static" in query-cpu-definitions.)
  4230. # * machine-type: CPU model may look different depending on the machine-type.
  4231. # (Except for CPU models reported as "static" in query-cpu-definitions.)
  4232. # * machine options (including accelerator): in some architectures, CPU models
  4233. # may look different depending on machine and accelerator options. (Except for
  4234. # CPU models reported as "static" in query-cpu-definitions.)
  4235. # * "-cpu" arguments and global properties: arguments to the -cpu option and
  4236. # global properties may affect expansion of CPU models. Using
  4237. # query-cpu-model-expansion while using these is not advised.
  4238. #
  4239. # Some architectures may not support all expansion types. s390x supports
  4240. # "full" and "static".
  4241. #
  4242. # Returns: a CpuModelExpansionInfo. Returns an error if expanding CPU models is
  4243. # not supported, if the model cannot be expanded, if the model contains
  4244. # an unknown CPU definition name, unknown properties or properties
  4245. # with a wrong type. Also returns an error if an expansion type is
  4246. # not supported.
  4247. #
  4248. # Since: 2.8.0
  4249. ##
  4250. { 'command': 'query-cpu-model-expansion',
  4251. 'data': { 'type': 'CpuModelExpansionType',
  4252. 'model': 'CpuModelInfo' },
  4253. 'returns': 'CpuModelExpansionInfo' }
  4254. ##
  4255. # @CpuModelCompareResult:
  4256. #
  4257. # An enumeration of CPU model comparation results. The result is usually
  4258. # calculated using e.g. CPU features or CPU generations.
  4259. #
  4260. # @incompatible: If model A is incompatible to model B, model A is not
  4261. # guaranteed to run where model B runs and the other way around.
  4262. #
  4263. # @identical: If model A is identical to model B, model A is guaranteed to run
  4264. # where model B runs and the other way around.
  4265. #
  4266. # @superset: If model A is a superset of model B, model B is guaranteed to run
  4267. # where model A runs. There are no guarantees about the other way.
  4268. #
  4269. # @subset: If model A is a subset of model B, model A is guaranteed to run
  4270. # where model B runs. There are no guarantees about the other way.
  4271. #
  4272. # Since: 2.8.0
  4273. ##
  4274. { 'enum': 'CpuModelCompareResult',
  4275. 'data': [ 'incompatible', 'identical', 'superset', 'subset' ] }
  4276. ##
  4277. # @CpuModelCompareInfo:
  4278. #
  4279. # The result of a CPU model comparison.
  4280. #
  4281. # @result: The result of the compare operation.
  4282. # @responsible-properties: List of properties that led to the comparison result
  4283. # not being identical.
  4284. #
  4285. # @responsible-properties is a list of QOM property names that led to
  4286. # both CPUs not being detected as identical. For identical models, this
  4287. # list is empty.
  4288. # If a QOM property is read-only, that means there's no known way to make the
  4289. # CPU models identical. If the special property name "type" is included, the
  4290. # models are by definition not identical and cannot be made identical.
  4291. #
  4292. # Since: 2.8.0
  4293. ##
  4294. { 'struct': 'CpuModelCompareInfo',
  4295. 'data': {'result': 'CpuModelCompareResult',
  4296. 'responsible-properties': ['str']
  4297. }
  4298. }
  4299. ##
  4300. # @query-cpu-model-comparison:
  4301. #
  4302. # Compares two CPU models, returning how they compare in a specific
  4303. # configuration. The results indicates how both models compare regarding
  4304. # runnability. This result can be used by tooling to make decisions if a
  4305. # certain CPU model will run in a certain configuration or if a compatible
  4306. # CPU model has to be created by baselining.
  4307. #
  4308. # Usually, a CPU model is compared against the maximum possible CPU model
  4309. # of a certain configuration (e.g. the "host" model for KVM). If that CPU
  4310. # model is identical or a subset, it will run in that configuration.
  4311. #
  4312. # The result returned by this command may be affected by:
  4313. #
  4314. # * QEMU version: CPU models may look different depending on the QEMU version.
  4315. # (Except for CPU models reported as "static" in query-cpu-definitions.)
  4316. # * machine-type: CPU model may look different depending on the machine-type.
  4317. # (Except for CPU models reported as "static" in query-cpu-definitions.)
  4318. # * machine options (including accelerator): in some architectures, CPU models
  4319. # may look different depending on machine and accelerator options. (Except for
  4320. # CPU models reported as "static" in query-cpu-definitions.)
  4321. # * "-cpu" arguments and global properties: arguments to the -cpu option and
  4322. # global properties may affect expansion of CPU models. Using
  4323. # query-cpu-model-expansion while using these is not advised.
  4324. #
  4325. # Some architectures may not support comparing CPU models. s390x supports
  4326. # comparing CPU models.
  4327. #
  4328. # Returns: a CpuModelBaselineInfo. Returns an error if comparing CPU models is
  4329. # not supported, if a model cannot be used, if a model contains
  4330. # an unknown cpu definition name, unknown properties or properties
  4331. # with wrong types.
  4332. #
  4333. # Since: 2.8.0
  4334. ##
  4335. { 'command': 'query-cpu-model-comparison',
  4336. 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
  4337. 'returns': 'CpuModelCompareInfo' }
  4338. ##
  4339. # @CpuModelBaselineInfo:
  4340. #
  4341. # The result of a CPU model baseline.
  4342. #
  4343. # @model: the baselined CpuModelInfo.
  4344. #
  4345. # Since: 2.8.0
  4346. ##
  4347. { 'struct': 'CpuModelBaselineInfo',
  4348. 'data': { 'model': 'CpuModelInfo' } }
  4349. ##
  4350. # @query-cpu-model-baseline:
  4351. #
  4352. # Baseline two CPU models, creating a compatible third model. The created
  4353. # model will always be a static, migration-safe CPU model (see "static"
  4354. # CPU model expansion for details).
  4355. #
  4356. # This interface can be used by tooling to create a compatible CPU model out
  4357. # two CPU models. The created CPU model will be identical to or a subset of
  4358. # both CPU models when comparing them. Therefore, the created CPU model is
  4359. # guaranteed to run where the given CPU models run.
  4360. #
  4361. # The result returned by this command may be affected by:
  4362. #
  4363. # * QEMU version: CPU models may look different depending on the QEMU version.
  4364. # (Except for CPU models reported as "static" in query-cpu-definitions.)
  4365. # * machine-type: CPU model may look different depending on the machine-type.
  4366. # (Except for CPU models reported as "static" in query-cpu-definitions.)
  4367. # * machine options (including accelerator): in some architectures, CPU models
  4368. # may look different depending on machine and accelerator options. (Except for
  4369. # CPU models reported as "static" in query-cpu-definitions.)
  4370. # * "-cpu" arguments and global properties: arguments to the -cpu option and
  4371. # global properties may affect expansion of CPU models. Using
  4372. # query-cpu-model-expansion while using these is not advised.
  4373. #
  4374. # Some architectures may not support baselining CPU models. s390x supports
  4375. # baselining CPU models.
  4376. #
  4377. # Returns: a CpuModelBaselineInfo. Returns an error if baselining CPU models is
  4378. # not supported, if a model cannot be used, if a model contains
  4379. # an unknown cpu definition name, unknown properties or properties
  4380. # with wrong types.
  4381. #
  4382. # Since: 2.8.0
  4383. ##
  4384. { 'command': 'query-cpu-model-baseline',
  4385. 'data': { 'modela': 'CpuModelInfo',
  4386. 'modelb': 'CpuModelInfo' },
  4387. 'returns': 'CpuModelBaselineInfo' }
  4388. ##
  4389. # @AddfdInfo:
  4390. #
  4391. # Information about a file descriptor that was added to an fd set.
  4392. #
  4393. # @fdset-id: The ID of the fd set that @fd was added to.
  4394. #
  4395. # @fd: The file descriptor that was received via SCM rights and
  4396. # added to the fd set.
  4397. #
  4398. # Since: 1.2.0
  4399. ##
  4400. { 'struct': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
  4401. ##
  4402. # @add-fd:
  4403. #
  4404. # Add a file descriptor, that was passed via SCM rights, to an fd set.
  4405. #
  4406. # @fdset-id: The ID of the fd set to add the file descriptor to.
  4407. #
  4408. # @opaque: A free-form string that can be used to describe the fd.
  4409. #
  4410. # Returns: @AddfdInfo on success
  4411. #
  4412. # If file descriptor was not received, FdNotSupplied
  4413. #
  4414. # If @fdset-id is a negative value, InvalidParameterValue
  4415. #
  4416. # Notes: The list of fd sets is shared by all monitor connections.
  4417. #
  4418. # If @fdset-id is not specified, a new fd set will be created.
  4419. #
  4420. # Since: 1.2.0
  4421. #
  4422. # Example:
  4423. #
  4424. # -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
  4425. # <- { "return": { "fdset-id": 1, "fd": 3 } }
  4426. #
  4427. ##
  4428. { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
  4429. 'returns': 'AddfdInfo' }
  4430. ##
  4431. # @remove-fd:
  4432. #
  4433. # Remove a file descriptor from an fd set.
  4434. #
  4435. # @fdset-id: The ID of the fd set that the file descriptor belongs to.
  4436. #
  4437. # @fd: The file descriptor that is to be removed.
  4438. #
  4439. # Returns: Nothing on success
  4440. # If @fdset-id or @fd is not found, FdNotFound
  4441. #
  4442. # Since: 1.2.0
  4443. #
  4444. # Notes: The list of fd sets is shared by all monitor connections.
  4445. #
  4446. # If @fd is not specified, all file descriptors in @fdset-id
  4447. # will be removed.
  4448. #
  4449. # Example:
  4450. #
  4451. # -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
  4452. # <- { "return": {} }
  4453. #
  4454. ##
  4455. { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
  4456. ##
  4457. # @FdsetFdInfo:
  4458. #
  4459. # Information about a file descriptor that belongs to an fd set.
  4460. #
  4461. # @fd: The file descriptor value.
  4462. #
  4463. # @opaque: A free-form string that can be used to describe the fd.
  4464. #
  4465. # Since: 1.2.0
  4466. ##
  4467. { 'struct': 'FdsetFdInfo',
  4468. 'data': {'fd': 'int', '*opaque': 'str'} }
  4469. ##
  4470. # @FdsetInfo:
  4471. #
  4472. # Information about an fd set.
  4473. #
  4474. # @fdset-id: The ID of the fd set.
  4475. #
  4476. # @fds: A list of file descriptors that belong to this fd set.
  4477. #
  4478. # Since: 1.2.0
  4479. ##
  4480. { 'struct': 'FdsetInfo',
  4481. 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
  4482. ##
  4483. # @query-fdsets:
  4484. #
  4485. # Return information describing all fd sets.
  4486. #
  4487. # Returns: A list of @FdsetInfo
  4488. #
  4489. # Since: 1.2.0
  4490. #
  4491. # Note: The list of fd sets is shared by all monitor connections.
  4492. #
  4493. # Example:
  4494. #
  4495. # -> { "execute": "query-fdsets" }
  4496. # <- { "return": [
  4497. # {
  4498. # "fds": [
  4499. # {
  4500. # "fd": 30,
  4501. # "opaque": "rdonly:/path/to/file"
  4502. # },
  4503. # {
  4504. # "fd": 24,
  4505. # "opaque": "rdwr:/path/to/file"
  4506. # }
  4507. # ],
  4508. # "fdset-id": 1
  4509. # },
  4510. # {
  4511. # "fds": [
  4512. # {
  4513. # "fd": 28
  4514. # },
  4515. # {
  4516. # "fd": 29
  4517. # }
  4518. # ],
  4519. # "fdset-id": 0
  4520. # }
  4521. # ]
  4522. # }
  4523. #
  4524. ##
  4525. { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
  4526. ##
  4527. # @TargetInfo:
  4528. #
  4529. # Information describing the QEMU target.
  4530. #
  4531. # @arch: the target architecture (eg "x86_64", "i386", etc)
  4532. #
  4533. # Since: 1.2.0
  4534. ##
  4535. { 'struct': 'TargetInfo',
  4536. 'data': { 'arch': 'str' } }
  4537. ##
  4538. # @query-target:
  4539. #
  4540. # Return information about the target for this QEMU
  4541. #
  4542. # Returns: TargetInfo
  4543. #
  4544. # Since: 1.2.0
  4545. ##
  4546. { 'command': 'query-target', 'returns': 'TargetInfo' }
  4547. ##
  4548. # @QKeyCode:
  4549. #
  4550. # An enumeration of key name.
  4551. #
  4552. # This is used by the @send-key command.
  4553. #
  4554. # @unmapped: since 2.0
  4555. # @pause: since 2.0
  4556. # @ro: since 2.4
  4557. # @kp_comma: since 2.4
  4558. # @kp_equals: since 2.6
  4559. # @power: since 2.6
  4560. # @hiragana: since 2.9
  4561. # @henkan: since 2.9
  4562. # @yen: since 2.9
  4563. #
  4564. # Since: 1.3.0
  4565. #
  4566. ##
  4567. { 'enum': 'QKeyCode',
  4568. 'data': [ 'unmapped',
  4569. 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
  4570. 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
  4571. '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
  4572. 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
  4573. 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
  4574. 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
  4575. 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
  4576. 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
  4577. 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
  4578. 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
  4579. 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
  4580. 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
  4581. 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
  4582. 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
  4583. 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause',
  4584. 'ro', 'hiragana', 'henkan', 'yen',
  4585. 'kp_comma', 'kp_equals', 'power' ] }
  4586. ##
  4587. # @KeyValue:
  4588. #
  4589. # Represents a keyboard key.
  4590. #
  4591. # Since: 1.3.0
  4592. ##
  4593. { 'union': 'KeyValue',
  4594. 'data': {
  4595. 'number': 'int',
  4596. 'qcode': 'QKeyCode' } }
  4597. ##
  4598. # @send-key:
  4599. #
  4600. # Send keys to guest.
  4601. #
  4602. # @keys: An array of @KeyValue elements. All @KeyValues in this array are
  4603. # simultaneously sent to the guest. A @KeyValue.number value is sent
  4604. # directly to the guest, while @KeyValue.qcode must be a valid
  4605. # @QKeyCode value
  4606. #
  4607. # @hold-time: time to delay key up events, milliseconds. Defaults
  4608. # to 100
  4609. #
  4610. # Returns: Nothing on success
  4611. # If key is unknown or redundant, InvalidParameter
  4612. #
  4613. # Since: 1.3.0
  4614. #
  4615. # Example:
  4616. #
  4617. # -> { "execute": "send-key",
  4618. # "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
  4619. # { "type": "qcode", "data": "alt" },
  4620. # { "type": "qcode", "data": "delete" } ] } }
  4621. # <- { "return": {} }
  4622. #
  4623. ##
  4624. { 'command': 'send-key',
  4625. 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
  4626. ##
  4627. # @screendump:
  4628. #
  4629. # Write a PPM of the VGA screen to a file.
  4630. #
  4631. # @filename: the path of a new PPM file to store the image
  4632. #
  4633. # Returns: Nothing on success
  4634. #
  4635. # Since: 0.14.0
  4636. #
  4637. # Example:
  4638. #
  4639. # -> { "execute": "screendump",
  4640. # "arguments": { "filename": "/tmp/image" } }
  4641. # <- { "return": {} }
  4642. #
  4643. ##
  4644. { 'command': 'screendump', 'data': {'filename': 'str'} }
  4645. ##
  4646. # @ChardevCommon:
  4647. #
  4648. # Configuration shared across all chardev backends
  4649. #
  4650. # @logfile: The name of a logfile to save output
  4651. # @logappend: true to append instead of truncate
  4652. # (default to false to truncate)
  4653. #
  4654. # Since: 2.6
  4655. ##
  4656. { 'struct': 'ChardevCommon', 'data': { '*logfile': 'str',
  4657. '*logappend': 'bool' } }
  4658. ##
  4659. # @ChardevFile:
  4660. #
  4661. # Configuration info for file chardevs.
  4662. #
  4663. # @in: The name of the input file
  4664. # @out: The name of the output file
  4665. # @append: Open the file in append mode (default false to
  4666. # truncate) (Since 2.6)
  4667. #
  4668. # Since: 1.4
  4669. ##
  4670. { 'struct': 'ChardevFile', 'data': { '*in' : 'str',
  4671. 'out' : 'str',
  4672. '*append': 'bool' },
  4673. 'base': 'ChardevCommon' }
  4674. ##
  4675. # @ChardevHostdev:
  4676. #
  4677. # Configuration info for device and pipe chardevs.
  4678. #
  4679. # @device: The name of the special file for the device,
  4680. # i.e. /dev/ttyS0 on Unix or COM1: on Windows
  4681. #
  4682. # Since: 1.4
  4683. ##
  4684. { 'struct': 'ChardevHostdev', 'data': { 'device' : 'str' },
  4685. 'base': 'ChardevCommon' }
  4686. ##
  4687. # @ChardevSocket:
  4688. #
  4689. # Configuration info for (stream) socket chardevs.
  4690. #
  4691. # @addr: socket address to listen on (server=true)
  4692. # or connect to (server=false)
  4693. # @tls-creds: the ID of the TLS credentials object (since 2.6)
  4694. # @server: create server socket (default: true)
  4695. # @wait: wait for incoming connection on server
  4696. # sockets (default: false).
  4697. # @nodelay: set TCP_NODELAY socket option (default: false)
  4698. # @telnet: enable telnet protocol on server
  4699. # sockets (default: false)
  4700. # @tn3270: enable tn3270 protocol on server
  4701. # sockets (default: false) (Since: 2.10)
  4702. # @reconnect: For a client socket, if a socket is disconnected,
  4703. # then attempt a reconnect after the given number of seconds.
  4704. # Setting this to zero disables this function. (default: 0)
  4705. # (Since: 2.2)
  4706. #
  4707. # Since: 1.4
  4708. ##
  4709. { 'struct': 'ChardevSocket', 'data': { 'addr' : 'SocketAddressLegacy',
  4710. '*tls-creds' : 'str',
  4711. '*server' : 'bool',
  4712. '*wait' : 'bool',
  4713. '*nodelay' : 'bool',
  4714. '*telnet' : 'bool',
  4715. '*tn3270' : 'bool',
  4716. '*reconnect' : 'int' },
  4717. 'base': 'ChardevCommon' }
  4718. ##
  4719. # @ChardevUdp:
  4720. #
  4721. # Configuration info for datagram socket chardevs.
  4722. #
  4723. # @remote: remote address
  4724. # @local: local address
  4725. #
  4726. # Since: 1.5
  4727. ##
  4728. { 'struct': 'ChardevUdp', 'data': { 'remote' : 'SocketAddressLegacy',
  4729. '*local' : 'SocketAddressLegacy' },
  4730. 'base': 'ChardevCommon' }
  4731. ##
  4732. # @ChardevMux:
  4733. #
  4734. # Configuration info for mux chardevs.
  4735. #
  4736. # @chardev: name of the base chardev.
  4737. #
  4738. # Since: 1.5
  4739. ##
  4740. { 'struct': 'ChardevMux', 'data': { 'chardev' : 'str' },
  4741. 'base': 'ChardevCommon' }
  4742. ##
  4743. # @ChardevStdio:
  4744. #
  4745. # Configuration info for stdio chardevs.
  4746. #
  4747. # @signal: Allow signals (such as SIGINT triggered by ^C)
  4748. # be delivered to qemu. Default: true in -nographic mode,
  4749. # false otherwise.
  4750. #
  4751. # Since: 1.5
  4752. ##
  4753. { 'struct': 'ChardevStdio', 'data': { '*signal' : 'bool' },
  4754. 'base': 'ChardevCommon' }
  4755. ##
  4756. # @ChardevSpiceChannel:
  4757. #
  4758. # Configuration info for spice vm channel chardevs.
  4759. #
  4760. # @type: kind of channel (for example vdagent).
  4761. #
  4762. # Since: 1.5
  4763. ##
  4764. { 'struct': 'ChardevSpiceChannel', 'data': { 'type' : 'str' },
  4765. 'base': 'ChardevCommon' }
  4766. ##
  4767. # @ChardevSpicePort:
  4768. #
  4769. # Configuration info for spice port chardevs.
  4770. #
  4771. # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
  4772. #
  4773. # Since: 1.5
  4774. ##
  4775. { 'struct': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' },
  4776. 'base': 'ChardevCommon' }
  4777. ##
  4778. # @ChardevVC:
  4779. #
  4780. # Configuration info for virtual console chardevs.
  4781. #
  4782. # @width: console width, in pixels
  4783. # @height: console height, in pixels
  4784. # @cols: console width, in chars
  4785. # @rows: console height, in chars
  4786. #
  4787. # Since: 1.5
  4788. ##
  4789. { 'struct': 'ChardevVC', 'data': { '*width' : 'int',
  4790. '*height' : 'int',
  4791. '*cols' : 'int',
  4792. '*rows' : 'int' },
  4793. 'base': 'ChardevCommon' }
  4794. ##
  4795. # @ChardevRingbuf:
  4796. #
  4797. # Configuration info for ring buffer chardevs.
  4798. #
  4799. # @size: ring buffer size, must be power of two, default is 65536
  4800. #
  4801. # Since: 1.5
  4802. ##
  4803. { 'struct': 'ChardevRingbuf', 'data': { '*size' : 'int' },
  4804. 'base': 'ChardevCommon' }
  4805. ##
  4806. # @ChardevBackend:
  4807. #
  4808. # Configuration info for the new chardev backend.
  4809. #
  4810. # Since: 1.4 (testdev since 2.2, wctablet since 2.9)
  4811. ##
  4812. { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
  4813. 'serial' : 'ChardevHostdev',
  4814. 'parallel': 'ChardevHostdev',
  4815. 'pipe' : 'ChardevHostdev',
  4816. 'socket' : 'ChardevSocket',
  4817. 'udp' : 'ChardevUdp',
  4818. 'pty' : 'ChardevCommon',
  4819. 'null' : 'ChardevCommon',
  4820. 'mux' : 'ChardevMux',
  4821. 'msmouse': 'ChardevCommon',
  4822. 'wctablet' : 'ChardevCommon',
  4823. 'braille': 'ChardevCommon',
  4824. 'testdev': 'ChardevCommon',
  4825. 'stdio' : 'ChardevStdio',
  4826. 'console': 'ChardevCommon',
  4827. 'spicevmc' : 'ChardevSpiceChannel',
  4828. 'spiceport' : 'ChardevSpicePort',
  4829. 'vc' : 'ChardevVC',
  4830. 'ringbuf': 'ChardevRingbuf',
  4831. # next one is just for compatibility
  4832. 'memory' : 'ChardevRingbuf' } }
  4833. ##
  4834. # @ChardevReturn:
  4835. #
  4836. # Return info about the chardev backend just created.
  4837. #
  4838. # @pty: name of the slave pseudoterminal device, present if
  4839. # and only if a chardev of type 'pty' was created
  4840. #
  4841. # Since: 1.4
  4842. ##
  4843. { 'struct' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
  4844. ##
  4845. # @chardev-add:
  4846. #
  4847. # Add a character device backend
  4848. #
  4849. # @id: the chardev's ID, must be unique
  4850. # @backend: backend type and parameters
  4851. #
  4852. # Returns: ChardevReturn.
  4853. #
  4854. # Since: 1.4
  4855. #
  4856. # Example:
  4857. #
  4858. # -> { "execute" : "chardev-add",
  4859. # "arguments" : { "id" : "foo",
  4860. # "backend" : { "type" : "null", "data" : {} } } }
  4861. # <- { "return": {} }
  4862. #
  4863. # -> { "execute" : "chardev-add",
  4864. # "arguments" : { "id" : "bar",
  4865. # "backend" : { "type" : "file",
  4866. # "data" : { "out" : "/tmp/bar.log" } } } }
  4867. # <- { "return": {} }
  4868. #
  4869. # -> { "execute" : "chardev-add",
  4870. # "arguments" : { "id" : "baz",
  4871. # "backend" : { "type" : "pty", "data" : {} } } }
  4872. # <- { "return": { "pty" : "/dev/pty/42" } }
  4873. #
  4874. ##
  4875. { 'command': 'chardev-add', 'data': {'id' : 'str',
  4876. 'backend' : 'ChardevBackend' },
  4877. 'returns': 'ChardevReturn' }
  4878. ##
  4879. # @chardev-remove:
  4880. #
  4881. # Remove a character device backend
  4882. #
  4883. # @id: the chardev's ID, must exist and not be in use
  4884. #
  4885. # Returns: Nothing on success
  4886. #
  4887. # Since: 1.4
  4888. #
  4889. # Example:
  4890. #
  4891. # -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
  4892. # <- { "return": {} }
  4893. #
  4894. ##
  4895. { 'command': 'chardev-remove', 'data': {'id': 'str'} }
  4896. ##
  4897. # @TpmModel:
  4898. #
  4899. # An enumeration of TPM models
  4900. #
  4901. # @tpm-tis: TPM TIS model
  4902. #
  4903. # Since: 1.5
  4904. ##
  4905. { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
  4906. ##
  4907. # @query-tpm-models:
  4908. #
  4909. # Return a list of supported TPM models
  4910. #
  4911. # Returns: a list of TpmModel
  4912. #
  4913. # Since: 1.5
  4914. #
  4915. # Example:
  4916. #
  4917. # -> { "execute": "query-tpm-models" }
  4918. # <- { "return": [ "tpm-tis" ] }
  4919. #
  4920. ##
  4921. { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
  4922. ##
  4923. # @TpmType:
  4924. #
  4925. # An enumeration of TPM types
  4926. #
  4927. # @passthrough: TPM passthrough type
  4928. #
  4929. # Since: 1.5
  4930. ##
  4931. { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
  4932. ##
  4933. # @query-tpm-types:
  4934. #
  4935. # Return a list of supported TPM types
  4936. #
  4937. # Returns: a list of TpmType
  4938. #
  4939. # Since: 1.5
  4940. #
  4941. # Example:
  4942. #
  4943. # -> { "execute": "query-tpm-types" }
  4944. # <- { "return": [ "passthrough" ] }
  4945. #
  4946. ##
  4947. { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
  4948. ##
  4949. # @TPMPassthroughOptions:
  4950. #
  4951. # Information about the TPM passthrough type
  4952. #
  4953. # @path: string describing the path used for accessing the TPM device
  4954. #
  4955. # @cancel-path: string showing the TPM's sysfs cancel file
  4956. # for cancellation of TPM commands while they are executing
  4957. #
  4958. # Since: 1.5
  4959. ##
  4960. { 'struct': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
  4961. '*cancel-path' : 'str'} }
  4962. ##
  4963. # @TpmTypeOptions:
  4964. #
  4965. # A union referencing different TPM backend types' configuration options
  4966. #
  4967. # @type: 'passthrough' The configuration options for the TPM passthrough type
  4968. #
  4969. # Since: 1.5
  4970. ##
  4971. { 'union': 'TpmTypeOptions',
  4972. 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
  4973. ##
  4974. # @TPMInfo:
  4975. #
  4976. # Information about the TPM
  4977. #
  4978. # @id: The Id of the TPM
  4979. #
  4980. # @model: The TPM frontend model
  4981. #
  4982. # @options: The TPM (backend) type configuration options
  4983. #
  4984. # Since: 1.5
  4985. ##
  4986. { 'struct': 'TPMInfo',
  4987. 'data': {'id': 'str',
  4988. 'model': 'TpmModel',
  4989. 'options': 'TpmTypeOptions' } }
  4990. ##
  4991. # @query-tpm:
  4992. #
  4993. # Return information about the TPM device
  4994. #
  4995. # Returns: @TPMInfo on success
  4996. #
  4997. # Since: 1.5
  4998. #
  4999. # Example:
  5000. #
  5001. # -> { "execute": "query-tpm" }
  5002. # <- { "return":
  5003. # [
  5004. # { "model": "tpm-tis",
  5005. # "options":
  5006. # { "type": "passthrough",
  5007. # "data":
  5008. # { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
  5009. # "path": "/dev/tpm0"
  5010. # }
  5011. # },
  5012. # "id": "tpm0"
  5013. # }
  5014. # ]
  5015. # }
  5016. #
  5017. ##
  5018. { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
  5019. ##
  5020. # @AcpiTableOptions:
  5021. #
  5022. # Specify an ACPI table on the command line to load.
  5023. #
  5024. # At most one of @file and @data can be specified. The list of files specified
  5025. # by any one of them is loaded and concatenated in order. If both are omitted,
  5026. # @data is implied.
  5027. #
  5028. # Other fields / optargs can be used to override fields of the generic ACPI
  5029. # table header; refer to the ACPI specification 5.0, section 5.2.6 System
  5030. # Description Table Header. If a header field is not overridden, then the
  5031. # corresponding value from the concatenated blob is used (in case of @file), or
  5032. # it is filled in with a hard-coded value (in case of @data).
  5033. #
  5034. # String fields are copied into the matching ACPI member from lowest address
  5035. # upwards, and silently truncated / NUL-padded to length.
  5036. #
  5037. # @sig: table signature / identifier (4 bytes)
  5038. #
  5039. # @rev: table revision number (dependent on signature, 1 byte)
  5040. #
  5041. # @oem_id: OEM identifier (6 bytes)
  5042. #
  5043. # @oem_table_id: OEM table identifier (8 bytes)
  5044. #
  5045. # @oem_rev: OEM-supplied revision number (4 bytes)
  5046. #
  5047. # @asl_compiler_id: identifier of the utility that created the table
  5048. # (4 bytes)
  5049. #
  5050. # @asl_compiler_rev: revision number of the utility that created the
  5051. # table (4 bytes)
  5052. #
  5053. # @file: colon (:) separated list of pathnames to load and
  5054. # concatenate as table data. The resultant binary blob is expected to
  5055. # have an ACPI table header. At least one file is required. This field
  5056. # excludes @data.
  5057. #
  5058. # @data: colon (:) separated list of pathnames to load and
  5059. # concatenate as table data. The resultant binary blob must not have an
  5060. # ACPI table header. At least one file is required. This field excludes
  5061. # @file.
  5062. #
  5063. # Since: 1.5
  5064. ##
  5065. { 'struct': 'AcpiTableOptions',
  5066. 'data': {
  5067. '*sig': 'str',
  5068. '*rev': 'uint8',
  5069. '*oem_id': 'str',
  5070. '*oem_table_id': 'str',
  5071. '*oem_rev': 'uint32',
  5072. '*asl_compiler_id': 'str',
  5073. '*asl_compiler_rev': 'uint32',
  5074. '*file': 'str',
  5075. '*data': 'str' }}
  5076. ##
  5077. # @CommandLineParameterType:
  5078. #
  5079. # Possible types for an option parameter.
  5080. #
  5081. # @string: accepts a character string
  5082. #
  5083. # @boolean: accepts "on" or "off"
  5084. #
  5085. # @number: accepts a number
  5086. #
  5087. # @size: accepts a number followed by an optional suffix (K)ilo,
  5088. # (M)ega, (G)iga, (T)era
  5089. #
  5090. # Since: 1.5
  5091. ##
  5092. { 'enum': 'CommandLineParameterType',
  5093. 'data': ['string', 'boolean', 'number', 'size'] }
  5094. ##
  5095. # @CommandLineParameterInfo:
  5096. #
  5097. # Details about a single parameter of a command line option.
  5098. #
  5099. # @name: parameter name
  5100. #
  5101. # @type: parameter @CommandLineParameterType
  5102. #
  5103. # @help: human readable text string, not suitable for parsing.
  5104. #
  5105. # @default: default value string (since 2.1)
  5106. #
  5107. # Since: 1.5
  5108. ##
  5109. { 'struct': 'CommandLineParameterInfo',
  5110. 'data': { 'name': 'str',
  5111. 'type': 'CommandLineParameterType',
  5112. '*help': 'str',
  5113. '*default': 'str' } }
  5114. ##
  5115. # @CommandLineOptionInfo:
  5116. #
  5117. # Details about a command line option, including its list of parameter details
  5118. #
  5119. # @option: option name
  5120. #
  5121. # @parameters: an array of @CommandLineParameterInfo
  5122. #
  5123. # Since: 1.5
  5124. ##
  5125. { 'struct': 'CommandLineOptionInfo',
  5126. 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
  5127. ##
  5128. # @query-command-line-options:
  5129. #
  5130. # Query command line option schema.
  5131. #
  5132. # @option: option name
  5133. #
  5134. # Returns: list of @CommandLineOptionInfo for all options (or for the given
  5135. # @option). Returns an error if the given @option doesn't exist.
  5136. #
  5137. # Since: 1.5
  5138. #
  5139. # Example:
  5140. #
  5141. # -> { "execute": "query-command-line-options",
  5142. # "arguments": { "option": "option-rom" } }
  5143. # <- { "return": [
  5144. # {
  5145. # "parameters": [
  5146. # {
  5147. # "name": "romfile",
  5148. # "type": "string"
  5149. # },
  5150. # {
  5151. # "name": "bootindex",
  5152. # "type": "number"
  5153. # }
  5154. # ],
  5155. # "option": "option-rom"
  5156. # }
  5157. # ]
  5158. # }
  5159. #
  5160. ##
  5161. {'command': 'query-command-line-options', 'data': { '*option': 'str' },
  5162. 'returns': ['CommandLineOptionInfo'] }
  5163. ##
  5164. # @X86CPURegister32:
  5165. #
  5166. # A X86 32-bit register
  5167. #
  5168. # Since: 1.5
  5169. ##
  5170. { 'enum': 'X86CPURegister32',
  5171. 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
  5172. ##
  5173. # @X86CPUFeatureWordInfo:
  5174. #
  5175. # Information about a X86 CPU feature word
  5176. #
  5177. # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
  5178. #
  5179. # @cpuid-input-ecx: Input ECX value for CPUID instruction for that
  5180. # feature word
  5181. #
  5182. # @cpuid-register: Output register containing the feature bits
  5183. #
  5184. # @features: value of output register, containing the feature bits
  5185. #
  5186. # Since: 1.5
  5187. ##
  5188. { 'struct': 'X86CPUFeatureWordInfo',
  5189. 'data': { 'cpuid-input-eax': 'int',
  5190. '*cpuid-input-ecx': 'int',
  5191. 'cpuid-register': 'X86CPURegister32',
  5192. 'features': 'int' } }
  5193. ##
  5194. # @DummyForceArrays:
  5195. #
  5196. # Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally
  5197. #
  5198. # Since: 2.5
  5199. ##
  5200. { 'struct': 'DummyForceArrays',
  5201. 'data': { 'unused': ['X86CPUFeatureWordInfo'] } }
  5202. ##
  5203. # @RxState:
  5204. #
  5205. # Packets receiving state
  5206. #
  5207. # @normal: filter assigned packets according to the mac-table
  5208. #
  5209. # @none: don't receive any assigned packet
  5210. #
  5211. # @all: receive all assigned packets
  5212. #
  5213. # Since: 1.6
  5214. ##
  5215. { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
  5216. ##
  5217. # @RxFilterInfo:
  5218. #
  5219. # Rx-filter information for a NIC.
  5220. #
  5221. # @name: net client name
  5222. #
  5223. # @promiscuous: whether promiscuous mode is enabled
  5224. #
  5225. # @multicast: multicast receive state
  5226. #
  5227. # @unicast: unicast receive state
  5228. #
  5229. # @vlan: vlan receive state (Since 2.0)
  5230. #
  5231. # @broadcast-allowed: whether to receive broadcast
  5232. #
  5233. # @multicast-overflow: multicast table is overflowed or not
  5234. #
  5235. # @unicast-overflow: unicast table is overflowed or not
  5236. #
  5237. # @main-mac: the main macaddr string
  5238. #
  5239. # @vlan-table: a list of active vlan id
  5240. #
  5241. # @unicast-table: a list of unicast macaddr string
  5242. #
  5243. # @multicast-table: a list of multicast macaddr string
  5244. #
  5245. # Since: 1.6
  5246. ##
  5247. { 'struct': 'RxFilterInfo',
  5248. 'data': {
  5249. 'name': 'str',
  5250. 'promiscuous': 'bool',
  5251. 'multicast': 'RxState',
  5252. 'unicast': 'RxState',
  5253. 'vlan': 'RxState',
  5254. 'broadcast-allowed': 'bool',
  5255. 'multicast-overflow': 'bool',
  5256. 'unicast-overflow': 'bool',
  5257. 'main-mac': 'str',
  5258. 'vlan-table': ['int'],
  5259. 'unicast-table': ['str'],
  5260. 'multicast-table': ['str'] }}
  5261. ##
  5262. # @query-rx-filter:
  5263. #
  5264. # Return rx-filter information for all NICs (or for the given NIC).
  5265. #
  5266. # @name: net client name
  5267. #
  5268. # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
  5269. # Returns an error if the given @name doesn't exist, or given
  5270. # NIC doesn't support rx-filter querying, or given net client
  5271. # isn't a NIC.
  5272. #
  5273. # Since: 1.6
  5274. #
  5275. # Example:
  5276. #
  5277. # -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
  5278. # <- { "return": [
  5279. # {
  5280. # "promiscuous": true,
  5281. # "name": "vnet0",
  5282. # "main-mac": "52:54:00:12:34:56",
  5283. # "unicast": "normal",
  5284. # "vlan": "normal",
  5285. # "vlan-table": [
  5286. # 4,
  5287. # 0
  5288. # ],
  5289. # "unicast-table": [
  5290. # ],
  5291. # "multicast": "normal",
  5292. # "multicast-overflow": false,
  5293. # "unicast-overflow": false,
  5294. # "multicast-table": [
  5295. # "01:00:5e:00:00:01",
  5296. # "33:33:00:00:00:01",
  5297. # "33:33:ff:12:34:56"
  5298. # ],
  5299. # "broadcast-allowed": false
  5300. # }
  5301. # ]
  5302. # }
  5303. #
  5304. ##
  5305. { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
  5306. 'returns': ['RxFilterInfo'] }
  5307. ##
  5308. # @InputButton:
  5309. #
  5310. # Button of a pointer input device (mouse, tablet).
  5311. #
  5312. # @side: front side button of a 5-button mouse (since 2.9)
  5313. #
  5314. # @extra: rear side button of a 5-button mouse (since 2.9)
  5315. #
  5316. # Since: 2.0
  5317. ##
  5318. { 'enum' : 'InputButton',
  5319. 'data' : [ 'left', 'middle', 'right', 'wheel-up', 'wheel-down', 'side',
  5320. 'extra' ] }
  5321. ##
  5322. # @InputAxis:
  5323. #
  5324. # Position axis of a pointer input device (mouse, tablet).
  5325. #
  5326. # Since: 2.0
  5327. ##
  5328. { 'enum' : 'InputAxis',
  5329. 'data' : [ 'x', 'y' ] }
  5330. ##
  5331. # @InputKeyEvent:
  5332. #
  5333. # Keyboard input event.
  5334. #
  5335. # @key: Which key this event is for.
  5336. # @down: True for key-down and false for key-up events.
  5337. #
  5338. # Since: 2.0
  5339. ##
  5340. { 'struct' : 'InputKeyEvent',
  5341. 'data' : { 'key' : 'KeyValue',
  5342. 'down' : 'bool' } }
  5343. ##
  5344. # @InputBtnEvent:
  5345. #
  5346. # Pointer button input event.
  5347. #
  5348. # @button: Which button this event is for.
  5349. # @down: True for key-down and false for key-up events.
  5350. #
  5351. # Since: 2.0
  5352. ##
  5353. { 'struct' : 'InputBtnEvent',
  5354. 'data' : { 'button' : 'InputButton',
  5355. 'down' : 'bool' } }
  5356. ##
  5357. # @InputMoveEvent:
  5358. #
  5359. # Pointer motion input event.
  5360. #
  5361. # @axis: Which axis is referenced by @value.
  5362. # @value: Pointer position. For absolute coordinates the
  5363. # valid range is 0 -> 0x7ffff
  5364. #
  5365. # Since: 2.0
  5366. ##
  5367. { 'struct' : 'InputMoveEvent',
  5368. 'data' : { 'axis' : 'InputAxis',
  5369. 'value' : 'int' } }
  5370. ##
  5371. # @InputEvent:
  5372. #
  5373. # Input event union.
  5374. #
  5375. # @type: the input type, one of:
  5376. # - 'key': Input event of Keyboard
  5377. # - 'btn': Input event of pointer buttons
  5378. # - 'rel': Input event of relative pointer motion
  5379. # - 'abs': Input event of absolute pointer motion
  5380. #
  5381. # Since: 2.0
  5382. ##
  5383. { 'union' : 'InputEvent',
  5384. 'data' : { 'key' : 'InputKeyEvent',
  5385. 'btn' : 'InputBtnEvent',
  5386. 'rel' : 'InputMoveEvent',
  5387. 'abs' : 'InputMoveEvent' } }
  5388. ##
  5389. # @input-send-event:
  5390. #
  5391. # Send input event(s) to guest.
  5392. #
  5393. # @device: display device to send event(s) to.
  5394. # @head: head to send event(s) to, in case the
  5395. # display device supports multiple scanouts.
  5396. # @events: List of InputEvent union.
  5397. #
  5398. # Returns: Nothing on success.
  5399. #
  5400. # The @device and @head parameters can be used to send the input event
  5401. # to specific input devices in case (a) multiple input devices of the
  5402. # same kind are added to the virtual machine and (b) you have
  5403. # configured input routing (see docs/multiseat.txt) for those input
  5404. # devices. The parameters work exactly like the device and head
  5405. # properties of input devices. If @device is missing, only devices
  5406. # that have no input routing config are admissible. If @device is
  5407. # specified, both input devices with and without input routing config
  5408. # are admissible, but devices with input routing config take
  5409. # precedence.
  5410. #
  5411. # Since: 2.6
  5412. #
  5413. # Note: The consoles are visible in the qom tree, under
  5414. # /backend/console[$index]. They have a device link and head property,
  5415. # so it is possible to map which console belongs to which device and
  5416. # display.
  5417. #
  5418. # Example:
  5419. #
  5420. # 1. Press left mouse button.
  5421. #
  5422. # -> { "execute": "input-send-event",
  5423. # "arguments": { "device": "video0",
  5424. # "events": [ { "type": "btn",
  5425. # "data" : { "down": true, "button": "left" } } ] } }
  5426. # <- { "return": {} }
  5427. #
  5428. # -> { "execute": "input-send-event",
  5429. # "arguments": { "device": "video0",
  5430. # "events": [ { "type": "btn",
  5431. # "data" : { "down": false, "button": "left" } } ] } }
  5432. # <- { "return": {} }
  5433. #
  5434. # 2. Press ctrl-alt-del.
  5435. #
  5436. # -> { "execute": "input-send-event",
  5437. # "arguments": { "events": [
  5438. # { "type": "key", "data" : { "down": true,
  5439. # "key": {"type": "qcode", "data": "ctrl" } } },
  5440. # { "type": "key", "data" : { "down": true,
  5441. # "key": {"type": "qcode", "data": "alt" } } },
  5442. # { "type": "key", "data" : { "down": true,
  5443. # "key": {"type": "qcode", "data": "delete" } } } ] } }
  5444. # <- { "return": {} }
  5445. #
  5446. # 3. Move mouse pointer to absolute coordinates (20000, 400).
  5447. #
  5448. # -> { "execute": "input-send-event" ,
  5449. # "arguments": { "events": [
  5450. # { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
  5451. # { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
  5452. # <- { "return": {} }
  5453. #
  5454. ##
  5455. { 'command': 'input-send-event',
  5456. 'data': { '*device': 'str',
  5457. '*head' : 'int',
  5458. 'events' : [ 'InputEvent' ] } }
  5459. ##
  5460. # @NumaOptionsType:
  5461. #
  5462. # @node: NUMA nodes configuration
  5463. #
  5464. # @dist: NUMA distance configuration (since 2.10)
  5465. #
  5466. # @cpu: property based CPU(s) to node mapping (Since: 2.10)
  5467. #
  5468. # Since: 2.1
  5469. ##
  5470. { 'enum': 'NumaOptionsType',
  5471. 'data': [ 'node', 'dist', 'cpu' ] }
  5472. ##
  5473. # @NumaOptions:
  5474. #
  5475. # A discriminated record of NUMA options. (for OptsVisitor)
  5476. #
  5477. # Since: 2.1
  5478. ##
  5479. { 'union': 'NumaOptions',
  5480. 'base': { 'type': 'NumaOptionsType' },
  5481. 'discriminator': 'type',
  5482. 'data': {
  5483. 'node': 'NumaNodeOptions',
  5484. 'dist': 'NumaDistOptions',
  5485. 'cpu': 'NumaCpuOptions' }}
  5486. ##
  5487. # @NumaNodeOptions:
  5488. #
  5489. # Create a guest NUMA node. (for OptsVisitor)
  5490. #
  5491. # @nodeid: NUMA node ID (increase by 1 from 0 if omitted)
  5492. #
  5493. # @cpus: VCPUs belonging to this node (assign VCPUS round-robin
  5494. # if omitted)
  5495. #
  5496. # @mem: memory size of this node; mutually exclusive with @memdev.
  5497. # Equally divide total memory among nodes if both @mem and @memdev are
  5498. # omitted.
  5499. #
  5500. # @memdev: memory backend object. If specified for one node,
  5501. # it must be specified for all nodes.
  5502. #
  5503. # Since: 2.1
  5504. ##
  5505. { 'struct': 'NumaNodeOptions',
  5506. 'data': {
  5507. '*nodeid': 'uint16',
  5508. '*cpus': ['uint16'],
  5509. '*mem': 'size',
  5510. '*memdev': 'str' }}
  5511. ##
  5512. # @NumaDistOptions:
  5513. #
  5514. # Set the distance between 2 NUMA nodes.
  5515. #
  5516. # @src: source NUMA node.
  5517. #
  5518. # @dst: destination NUMA node.
  5519. #
  5520. # @val: NUMA distance from source node to destination node.
  5521. # When a node is unreachable from another node, set the distance
  5522. # between them to 255.
  5523. #
  5524. # Since: 2.10
  5525. ##
  5526. { 'struct': 'NumaDistOptions',
  5527. 'data': {
  5528. 'src': 'uint16',
  5529. 'dst': 'uint16',
  5530. 'val': 'uint8' }}
  5531. ##
  5532. # @NumaCpuOptions:
  5533. #
  5534. # Option "-numa cpu" overrides default cpu to node mapping.
  5535. # It accepts the same set of cpu properties as returned by
  5536. # query-hotpluggable-cpus[].props, where node-id could be used to
  5537. # override default node mapping.
  5538. #
  5539. # Since: 2.10
  5540. ##
  5541. { 'struct': 'NumaCpuOptions',
  5542. 'base': 'CpuInstanceProperties',
  5543. 'data' : {} }
  5544. ##
  5545. # @HostMemPolicy:
  5546. #
  5547. # Host memory policy types
  5548. #
  5549. # @default: restore default policy, remove any nondefault policy
  5550. #
  5551. # @preferred: set the preferred host nodes for allocation
  5552. #
  5553. # @bind: a strict policy that restricts memory allocation to the
  5554. # host nodes specified
  5555. #
  5556. # @interleave: memory allocations are interleaved across the set
  5557. # of host nodes specified
  5558. #
  5559. # Since: 2.1
  5560. ##
  5561. { 'enum': 'HostMemPolicy',
  5562. 'data': [ 'default', 'preferred', 'bind', 'interleave' ] }
  5563. ##
  5564. # @Memdev:
  5565. #
  5566. # Information about memory backend
  5567. #
  5568. # @id: backend's ID if backend has 'id' property (since 2.9)
  5569. #
  5570. # @size: memory backend size
  5571. #
  5572. # @merge: enables or disables memory merge support
  5573. #
  5574. # @dump: includes memory backend's memory in a core dump or not
  5575. #
  5576. # @prealloc: enables or disables memory preallocation
  5577. #
  5578. # @host-nodes: host nodes for its memory policy
  5579. #
  5580. # @policy: memory policy of memory backend
  5581. #
  5582. # Since: 2.1
  5583. ##
  5584. { 'struct': 'Memdev',
  5585. 'data': {
  5586. '*id': 'str',
  5587. 'size': 'size',
  5588. 'merge': 'bool',
  5589. 'dump': 'bool',
  5590. 'prealloc': 'bool',
  5591. 'host-nodes': ['uint16'],
  5592. 'policy': 'HostMemPolicy' }}
  5593. ##
  5594. # @query-memdev:
  5595. #
  5596. # Returns information for all memory backends.
  5597. #
  5598. # Returns: a list of @Memdev.
  5599. #
  5600. # Since: 2.1
  5601. #
  5602. # Example:
  5603. #
  5604. # -> { "execute": "query-memdev" }
  5605. # <- { "return": [
  5606. # {
  5607. # "id": "mem1",
  5608. # "size": 536870912,
  5609. # "merge": false,
  5610. # "dump": true,
  5611. # "prealloc": false,
  5612. # "host-nodes": [0, 1],
  5613. # "policy": "bind"
  5614. # },
  5615. # {
  5616. # "size": 536870912,
  5617. # "merge": false,
  5618. # "dump": true,
  5619. # "prealloc": true,
  5620. # "host-nodes": [2, 3],
  5621. # "policy": "preferred"
  5622. # }
  5623. # ]
  5624. # }
  5625. #
  5626. ##
  5627. { 'command': 'query-memdev', 'returns': ['Memdev'] }
  5628. ##
  5629. # @PCDIMMDeviceInfo:
  5630. #
  5631. # PCDIMMDevice state information
  5632. #
  5633. # @id: device's ID
  5634. #
  5635. # @addr: physical address, where device is mapped
  5636. #
  5637. # @size: size of memory that the device provides
  5638. #
  5639. # @slot: slot number at which device is plugged in
  5640. #
  5641. # @node: NUMA node number where device is plugged in
  5642. #
  5643. # @memdev: memory backend linked with device
  5644. #
  5645. # @hotplugged: true if device was hotplugged
  5646. #
  5647. # @hotpluggable: true if device if could be added/removed while machine is running
  5648. #
  5649. # Since: 2.1
  5650. ##
  5651. { 'struct': 'PCDIMMDeviceInfo',
  5652. 'data': { '*id': 'str',
  5653. 'addr': 'int',
  5654. 'size': 'int',
  5655. 'slot': 'int',
  5656. 'node': 'int',
  5657. 'memdev': 'str',
  5658. 'hotplugged': 'bool',
  5659. 'hotpluggable': 'bool'
  5660. }
  5661. }
  5662. ##
  5663. # @MemoryDeviceInfo:
  5664. #
  5665. # Union containing information about a memory device
  5666. #
  5667. # Since: 2.1
  5668. ##
  5669. { 'union': 'MemoryDeviceInfo', 'data': {'dimm': 'PCDIMMDeviceInfo'} }
  5670. ##
  5671. # @query-memory-devices:
  5672. #
  5673. # Lists available memory devices and their state
  5674. #
  5675. # Since: 2.1
  5676. #
  5677. # Example:
  5678. #
  5679. # -> { "execute": "query-memory-devices" }
  5680. # <- { "return": [ { "data":
  5681. # { "addr": 5368709120,
  5682. # "hotpluggable": true,
  5683. # "hotplugged": true,
  5684. # "id": "d1",
  5685. # "memdev": "/objects/memX",
  5686. # "node": 0,
  5687. # "size": 1073741824,
  5688. # "slot": 0},
  5689. # "type": "dimm"
  5690. # } ] }
  5691. #
  5692. ##
  5693. { 'command': 'query-memory-devices', 'returns': ['MemoryDeviceInfo'] }
  5694. ##
  5695. # @ACPISlotType:
  5696. #
  5697. # @DIMM: memory slot
  5698. # @CPU: logical CPU slot (since 2.7)
  5699. ##
  5700. { 'enum': 'ACPISlotType', 'data': [ 'DIMM', 'CPU' ] }
  5701. ##
  5702. # @ACPIOSTInfo:
  5703. #
  5704. # OSPM Status Indication for a device
  5705. # For description of possible values of @source and @status fields
  5706. # see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec.
  5707. #
  5708. # @device: device ID associated with slot
  5709. #
  5710. # @slot: slot ID, unique per slot of a given @slot-type
  5711. #
  5712. # @slot-type: type of the slot
  5713. #
  5714. # @source: an integer containing the source event
  5715. #
  5716. # @status: an integer containing the status code
  5717. #
  5718. # Since: 2.1
  5719. ##
  5720. { 'struct': 'ACPIOSTInfo',
  5721. 'data' : { '*device': 'str',
  5722. 'slot': 'str',
  5723. 'slot-type': 'ACPISlotType',
  5724. 'source': 'int',
  5725. 'status': 'int' } }
  5726. ##
  5727. # @query-acpi-ospm-status:
  5728. #
  5729. # Return a list of ACPIOSTInfo for devices that support status
  5730. # reporting via ACPI _OST method.
  5731. #
  5732. # Since: 2.1
  5733. #
  5734. # Example:
  5735. #
  5736. # -> { "execute": "query-acpi-ospm-status" }
  5737. # <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
  5738. # { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
  5739. # { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
  5740. # { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
  5741. # ]}
  5742. #
  5743. ##
  5744. { 'command': 'query-acpi-ospm-status', 'returns': ['ACPIOSTInfo'] }
  5745. ##
  5746. # @WatchdogExpirationAction:
  5747. #
  5748. # An enumeration of the actions taken when the watchdog device's timer is
  5749. # expired
  5750. #
  5751. # @reset: system resets
  5752. #
  5753. # @shutdown: system shutdown, note that it is similar to @powerdown, which
  5754. # tries to set to system status and notify guest
  5755. #
  5756. # @poweroff: system poweroff, the emulator program exits
  5757. #
  5758. # @pause: system pauses, similar to @stop
  5759. #
  5760. # @debug: system enters debug state
  5761. #
  5762. # @none: nothing is done
  5763. #
  5764. # @inject-nmi: a non-maskable interrupt is injected into the first VCPU (all
  5765. # VCPUS on x86) (since 2.4)
  5766. #
  5767. # Since: 2.1
  5768. ##
  5769. { 'enum': 'WatchdogExpirationAction',
  5770. 'data': [ 'reset', 'shutdown', 'poweroff', 'pause', 'debug', 'none',
  5771. 'inject-nmi' ] }
  5772. ##
  5773. # @IoOperationType:
  5774. #
  5775. # An enumeration of the I/O operation types
  5776. #
  5777. # @read: read operation
  5778. #
  5779. # @write: write operation
  5780. #
  5781. # Since: 2.1
  5782. ##
  5783. { 'enum': 'IoOperationType',
  5784. 'data': [ 'read', 'write' ] }
  5785. ##
  5786. # @GuestPanicAction:
  5787. #
  5788. # An enumeration of the actions taken when guest OS panic is detected
  5789. #
  5790. # @pause: system pauses
  5791. #
  5792. # Since: 2.1 (poweroff since 2.8)
  5793. ##
  5794. { 'enum': 'GuestPanicAction',
  5795. 'data': [ 'pause', 'poweroff' ] }
  5796. ##
  5797. # @GuestPanicInformationType:
  5798. #
  5799. # An enumeration of the guest panic information types
  5800. #
  5801. # Since: 2.9
  5802. ##
  5803. { 'enum': 'GuestPanicInformationType',
  5804. 'data': [ 'hyper-v'] }
  5805. ##
  5806. # @GuestPanicInformation:
  5807. #
  5808. # Information about a guest panic
  5809. #
  5810. # Since: 2.9
  5811. ##
  5812. {'union': 'GuestPanicInformation',
  5813. 'base': {'type': 'GuestPanicInformationType'},
  5814. 'discriminator': 'type',
  5815. 'data': { 'hyper-v': 'GuestPanicInformationHyperV' } }
  5816. ##
  5817. # @GuestPanicInformationHyperV:
  5818. #
  5819. # Hyper-V specific guest panic information (HV crash MSRs)
  5820. #
  5821. # Since: 2.9
  5822. ##
  5823. {'struct': 'GuestPanicInformationHyperV',
  5824. 'data': { 'arg1': 'uint64',
  5825. 'arg2': 'uint64',
  5826. 'arg3': 'uint64',
  5827. 'arg4': 'uint64',
  5828. 'arg5': 'uint64' } }
  5829. ##
  5830. # @rtc-reset-reinjection:
  5831. #
  5832. # This command will reset the RTC interrupt reinjection backlog.
  5833. # Can be used if another mechanism to synchronize guest time
  5834. # is in effect, for example QEMU guest agent's guest-set-time
  5835. # command.
  5836. #
  5837. # Since: 2.1
  5838. #
  5839. # Example:
  5840. #
  5841. # -> { "execute": "rtc-reset-reinjection" }
  5842. # <- { "return": {} }
  5843. #
  5844. ##
  5845. { 'command': 'rtc-reset-reinjection' }
  5846. # Rocker ethernet network switch
  5847. { 'include': 'qapi/rocker.json' }
  5848. ##
  5849. # @ReplayMode:
  5850. #
  5851. # Mode of the replay subsystem.
  5852. #
  5853. # @none: normal execution mode. Replay or record are not enabled.
  5854. #
  5855. # @record: record mode. All non-deterministic data is written into the
  5856. # replay log.
  5857. #
  5858. # @play: replay mode. Non-deterministic data required for system execution
  5859. # is read from the log.
  5860. #
  5861. # Since: 2.5
  5862. ##
  5863. { 'enum': 'ReplayMode',
  5864. 'data': [ 'none', 'record', 'play' ] }
  5865. ##
  5866. # @xen-load-devices-state:
  5867. #
  5868. # Load the state of all devices from file. The RAM and the block devices
  5869. # of the VM are not loaded by this command.
  5870. #
  5871. # @filename: the file to load the state of the devices from as binary
  5872. # data. See xen-save-devices-state.txt for a description of the binary
  5873. # format.
  5874. #
  5875. # Since: 2.7
  5876. #
  5877. # Example:
  5878. #
  5879. # -> { "execute": "xen-load-devices-state",
  5880. # "arguments": { "filename": "/tmp/resume" } }
  5881. # <- { "return": {} }
  5882. #
  5883. ##
  5884. { 'command': 'xen-load-devices-state', 'data': {'filename': 'str'} }
  5885. ##
  5886. # @xen-set-replication:
  5887. #
  5888. # Enable or disable replication.
  5889. #
  5890. # @enable: true to enable, false to disable.
  5891. #
  5892. # @primary: true for primary or false for secondary.
  5893. #
  5894. # @failover: true to do failover, false to stop. but cannot be
  5895. # specified if 'enable' is true. default value is false.
  5896. #
  5897. # Returns: nothing.
  5898. #
  5899. # Example:
  5900. #
  5901. # -> { "execute": "xen-set-replication",
  5902. # "arguments": {"enable": true, "primary": false} }
  5903. # <- { "return": {} }
  5904. #
  5905. # Since: 2.9
  5906. ##
  5907. { 'command': 'xen-set-replication',
  5908. 'data': { 'enable': 'bool', 'primary': 'bool', '*failover' : 'bool' } }
  5909. ##
  5910. # @ReplicationStatus:
  5911. #
  5912. # The result format for 'query-xen-replication-status'.
  5913. #
  5914. # @error: true if an error happened, false if replication is normal.
  5915. #
  5916. # @desc: the human readable error description string, when
  5917. # @error is 'true'.
  5918. #
  5919. # Since: 2.9
  5920. ##
  5921. { 'struct': 'ReplicationStatus',
  5922. 'data': { 'error': 'bool', '*desc': 'str' } }
  5923. ##
  5924. # @query-xen-replication-status:
  5925. #
  5926. # Query replication status while the vm is running.
  5927. #
  5928. # Returns: A @ReplicationResult object showing the status.
  5929. #
  5930. # Example:
  5931. #
  5932. # -> { "execute": "query-xen-replication-status" }
  5933. # <- { "return": { "error": false } }
  5934. #
  5935. # Since: 2.9
  5936. ##
  5937. { 'command': 'query-xen-replication-status',
  5938. 'returns': 'ReplicationStatus' }
  5939. ##
  5940. # @xen-colo-do-checkpoint:
  5941. #
  5942. # Xen uses this command to notify replication to trigger a checkpoint.
  5943. #
  5944. # Returns: nothing.
  5945. #
  5946. # Example:
  5947. #
  5948. # -> { "execute": "xen-colo-do-checkpoint" }
  5949. # <- { "return": {} }
  5950. #
  5951. # Since: 2.9
  5952. ##
  5953. { 'command': 'xen-colo-do-checkpoint' }
  5954. ##
  5955. # @GICCapability:
  5956. #
  5957. # The struct describes capability for a specific GIC (Generic
  5958. # Interrupt Controller) version. These bits are not only decided by
  5959. # QEMU/KVM software version, but also decided by the hardware that
  5960. # the program is running upon.
  5961. #
  5962. # @version: version of GIC to be described. Currently, only 2 and 3
  5963. # are supported.
  5964. #
  5965. # @emulated: whether current QEMU/hardware supports emulated GIC
  5966. # device in user space.
  5967. #
  5968. # @kernel: whether current QEMU/hardware supports hardware
  5969. # accelerated GIC device in kernel.
  5970. #
  5971. # Since: 2.6
  5972. ##
  5973. { 'struct': 'GICCapability',
  5974. 'data': { 'version': 'int',
  5975. 'emulated': 'bool',
  5976. 'kernel': 'bool' } }
  5977. ##
  5978. # @query-gic-capabilities:
  5979. #
  5980. # This command is ARM-only. It will return a list of GICCapability
  5981. # objects that describe its capability bits.
  5982. #
  5983. # Returns: a list of GICCapability objects.
  5984. #
  5985. # Since: 2.6
  5986. #
  5987. # Example:
  5988. #
  5989. # -> { "execute": "query-gic-capabilities" }
  5990. # <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
  5991. # { "version": 3, "emulated": false, "kernel": true } ] }
  5992. #
  5993. ##
  5994. { 'command': 'query-gic-capabilities', 'returns': ['GICCapability'] }
  5995. ##
  5996. # @CpuInstanceProperties:
  5997. #
  5998. # List of properties to be used for hotplugging a CPU instance,
  5999. # it should be passed by management with device_add command when
  6000. # a CPU is being hotplugged.
  6001. #
  6002. # @node-id: NUMA node ID the CPU belongs to
  6003. # @socket-id: socket number within node/board the CPU belongs to
  6004. # @core-id: core number within socket the CPU belongs to
  6005. # @thread-id: thread number within core the CPU belongs to
  6006. #
  6007. # Note: currently there are 4 properties that could be present
  6008. # but management should be prepared to pass through other
  6009. # properties with device_add command to allow for future
  6010. # interface extension. This also requires the filed names to be kept in
  6011. # sync with the properties passed to -device/device_add.
  6012. #
  6013. # Since: 2.7
  6014. ##
  6015. { 'struct': 'CpuInstanceProperties',
  6016. 'data': { '*node-id': 'int',
  6017. '*socket-id': 'int',
  6018. '*core-id': 'int',
  6019. '*thread-id': 'int'
  6020. }
  6021. }
  6022. ##
  6023. # @HotpluggableCPU:
  6024. #
  6025. # @type: CPU object type for usage with device_add command
  6026. # @props: list of properties to be used for hotplugging CPU
  6027. # @vcpus-count: number of logical VCPU threads @HotpluggableCPU provides
  6028. # @qom-path: link to existing CPU object if CPU is present or
  6029. # omitted if CPU is not present.
  6030. #
  6031. # Since: 2.7
  6032. ##
  6033. { 'struct': 'HotpluggableCPU',
  6034. 'data': { 'type': 'str',
  6035. 'vcpus-count': 'int',
  6036. 'props': 'CpuInstanceProperties',
  6037. '*qom-path': 'str'
  6038. }
  6039. }
  6040. ##
  6041. # @query-hotpluggable-cpus:
  6042. #
  6043. # Returns: a list of HotpluggableCPU objects.
  6044. #
  6045. # Since: 2.7
  6046. #
  6047. # Example:
  6048. #
  6049. # For pseries machine type started with -smp 2,cores=2,maxcpus=4 -cpu POWER8:
  6050. #
  6051. # -> { "execute": "query-hotpluggable-cpus" }
  6052. # <- {"return": [
  6053. # { "props": { "core": 8 }, "type": "POWER8-spapr-cpu-core",
  6054. # "vcpus-count": 1 },
  6055. # { "props": { "core": 0 }, "type": "POWER8-spapr-cpu-core",
  6056. # "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
  6057. # ]}'
  6058. #
  6059. # For pc machine type started with -smp 1,maxcpus=2:
  6060. #
  6061. # -> { "execute": "query-hotpluggable-cpus" }
  6062. # <- {"return": [
  6063. # {
  6064. # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
  6065. # "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
  6066. # },
  6067. # {
  6068. # "qom-path": "/machine/unattached/device[0]",
  6069. # "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
  6070. # "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}
  6071. # }
  6072. # ]}
  6073. #
  6074. ##
  6075. { 'command': 'query-hotpluggable-cpus', 'returns': ['HotpluggableCPU'] }
  6076. ##
  6077. # @GuidInfo:
  6078. #
  6079. # GUID information.
  6080. #
  6081. # @guid: the globally unique identifier
  6082. #
  6083. # Since: 2.9
  6084. ##
  6085. { 'struct': 'GuidInfo', 'data': {'guid': 'str'} }
  6086. ##
  6087. # @query-vm-generation-id:
  6088. #
  6089. # Show Virtual Machine Generation ID
  6090. #
  6091. # Since 2.9
  6092. ##
  6093. { 'command': 'query-vm-generation-id', 'returns': 'GuidInfo' }