Emulace konkrétního stroje pomocí QEMU

xdub

Emulace konkrétního stroje pomocí QEMU
« kdy: 19. 03. 2019, 11:36:26 »
Zdravím všechny.
Zajímalo by mě jestli se dá v QEMU emulovat specificky konkrétní stroj, který se v minulosti vyráběl. Když jsem koukal na některé kouzla s QEMU, tak jsem nabyl dojmu, že by to mělo jít...
Chápu, že asi nebude možné emulovat nějaké výkoné grafické karty a akcelerátory, ale o to mi ani nejde.
Přesněji bych rád emuloval hlavně konkrétní procesor a to Pentium 4 (buď nějaký poslední Northwood, případně nějaký Prescott).
Jde to? Případně existuje někde nějaký seznam podporovaných zařízení do konfigurace, které QEMU umí emulovat?


k3dAR

  • *****
  • 2 982
  • porad nemam telo, ale uz mam hlavu... nobody
    • Zobrazit profil
    • E-mail
Re:Emulace konkrétního stroje pomocí QEMU
« Odpověď #1 kdy: 19. 03. 2019, 12:52:48 »
Kód: [Vybrat]
$ qemu-system-x86_64 -cpu help
Available CPUs:
x86              486                                                 
x86   Broadwell-IBRS  Intel Core Processor (Broadwell, IBRS)         
x86 Broadwell-noTSX-IBRS  Intel Core Processor (Broadwell, no TSX, IBRS) 
x86  Broadwell-noTSX  Intel Core Processor (Broadwell, no TSX)       
x86        Broadwell  Intel Core Processor (Broadwell)               
x86           Conroe  Intel Celeron_4x0 (Conroe/Merom Class Core 2)   
x86        EPYC-IBPB  AMD EPYC Processor (with IBPB)                 
x86             EPYC  AMD EPYC Processor                             
x86     Haswell-IBRS  Intel Core Processor (Haswell, IBRS)           
x86 Haswell-noTSX-IBRS  Intel Core Processor (Haswell, no TSX, IBRS)   
x86    Haswell-noTSX  Intel Core Processor (Haswell, no TSX)         
x86          Haswell  Intel Core Processor (Haswell)                 
x86   IvyBridge-IBRS  Intel Xeon E3-12xx v2 (Ivy Bridge, IBRS)       
x86        IvyBridge  Intel Xeon E3-12xx v2 (Ivy Bridge)             
x86     Nehalem-IBRS  Intel Core i7 9xx (Nehalem Core i7, IBRS update)
x86          Nehalem  Intel Core i7 9xx (Nehalem Class Core i7)       
x86       Opteron_G1  AMD Opteron 240 (Gen 1 Class Opteron)           
x86       Opteron_G2  AMD Opteron 22xx (Gen 2 Class Opteron)         
x86       Opteron_G3  AMD Opteron 23xx (Gen 3 Class Opteron)         
x86       Opteron_G4  AMD Opteron 62xx class CPU                     
x86       Opteron_G5  AMD Opteron 63xx class CPU                     
x86           Penryn  Intel Core 2 Duo P9xxx (Penryn Class Core 2)   
x86 SandyBridge-IBRS  Intel Xeon E312xx (Sandy Bridge, IBRS update)   
x86      SandyBridge  Intel Xeon E312xx (Sandy Bridge)               
x86 Skylake-Client-IBRS  Intel Core Processor (Skylake, IBRS)           
x86   Skylake-Client  Intel Core Processor (Skylake)                 
x86 Skylake-Server-IBRS  Intel Xeon Processor (Skylake, IBRS)           
x86   Skylake-Server  Intel Xeon Processor (Skylake)                 
x86    Westmere-IBRS  Westmere E56xx/L56xx/X56xx (IBRS update)       
x86         Westmere  Westmere E56xx/L56xx/X56xx (Nehalem-C)         
x86           athlon  QEMU Virtual CPU version 2.5+                   
x86         core2duo  Intel(R) Core(TM)2 Duo CPU     T7700  @ 2.40GHz
x86          coreduo  Genuine Intel(R) CPU           T2600  @ 2.16GHz
x86            kvm32  Common 32-bit KVM processor                     
x86            kvm64  Common KVM processor                           
x86             n270  Intel(R) Atom(TM) CPU N270   @ 1.60GHz         
x86          pentium                                                 
x86         pentium2                                                 
x86         pentium3                                                 
x86           phenom  AMD Phenom(tm) 9550 Quad-Core Processor         
x86           qemu32  QEMU Virtual CPU version 2.5+                   
x86           qemu64  QEMU Virtual CPU version 2.5+                   
x86             base  base CPU model type with no features enabled   
x86             host  KVM processor with all supported host features (only available in KVM mode)
x86              max  Enables all features supported by the accelerator in the current host

xdub

Re:Emulace konkrétního stroje pomocí QEMU
« Odpověď #2 kdy: 19. 03. 2019, 14:38:44 »
Kód: [Vybrat]
$ qemu-system-x86_64 -cpu help
Available CPUs:
x86              486                                                 
x86   Broadwell-IBRS  Intel Core Processor (Broadwell, IBRS)         
x86 Broadwell-noTSX-IBRS  Intel Core Processor (Broadwell, no TSX, IBRS) 
x86  Broadwell-noTSX  Intel Core Processor (Broadwell, no TSX)       
x86        Broadwell  Intel Core Processor (Broadwell)               
x86           Conroe  Intel Celeron_4x0 (Conroe/Merom Class Core 2)   
x86        EPYC-IBPB  AMD EPYC Processor (with IBPB)                 
x86             EPYC  AMD EPYC Processor                             
x86     Haswell-IBRS  Intel Core Processor (Haswell, IBRS)           
x86 Haswell-noTSX-IBRS  Intel Core Processor (Haswell, no TSX, IBRS)   
x86    Haswell-noTSX  Intel Core Processor (Haswell, no TSX)         
x86          Haswell  Intel Core Processor (Haswell)                 
x86   IvyBridge-IBRS  Intel Xeon E3-12xx v2 (Ivy Bridge, IBRS)       
x86        IvyBridge  Intel Xeon E3-12xx v2 (Ivy Bridge)             
x86     Nehalem-IBRS  Intel Core i7 9xx (Nehalem Core i7, IBRS update)
x86          Nehalem  Intel Core i7 9xx (Nehalem Class Core i7)       
x86       Opteron_G1  AMD Opteron 240 (Gen 1 Class Opteron)           
x86       Opteron_G2  AMD Opteron 22xx (Gen 2 Class Opteron)         
x86       Opteron_G3  AMD Opteron 23xx (Gen 3 Class Opteron)         
x86       Opteron_G4  AMD Opteron 62xx class CPU                     
x86       Opteron_G5  AMD Opteron 63xx class CPU                     
x86           Penryn  Intel Core 2 Duo P9xxx (Penryn Class Core 2)   
x86 SandyBridge-IBRS  Intel Xeon E312xx (Sandy Bridge, IBRS update)   
x86      SandyBridge  Intel Xeon E312xx (Sandy Bridge)               
x86 Skylake-Client-IBRS  Intel Core Processor (Skylake, IBRS)           
x86   Skylake-Client  Intel Core Processor (Skylake)                 
x86 Skylake-Server-IBRS  Intel Xeon Processor (Skylake, IBRS)           
x86   Skylake-Server  Intel Xeon Processor (Skylake)                 
x86    Westmere-IBRS  Westmere E56xx/L56xx/X56xx (IBRS update)       
x86         Westmere  Westmere E56xx/L56xx/X56xx (Nehalem-C)         
x86           athlon  QEMU Virtual CPU version 2.5+                   
x86         core2duo  Intel(R) Core(TM)2 Duo CPU     T7700  @ 2.40GHz
x86          coreduo  Genuine Intel(R) CPU           T2600  @ 2.16GHz
x86            kvm32  Common 32-bit KVM processor                     
x86            kvm64  Common KVM processor                           
x86             n270  Intel(R) Atom(TM) CPU N270   @ 1.60GHz         
x86          pentium                                                 
x86         pentium2                                                 
x86         pentium3                                                 
x86           phenom  AMD Phenom(tm) 9550 Quad-Core Processor         
x86           qemu32  QEMU Virtual CPU version 2.5+                   
x86           qemu64  QEMU Virtual CPU version 2.5+                   
x86             base  base CPU model type with no features enabled   
x86             host  KVM processor with all supported host features (only available in KVM mode)
x86              max  Enables all features supported by the accelerator in the current host
Dík moc, že to bude takhle jednoduchý mě nenapadlo :-D
Ale Northwood tam stejně neni. :-D Dokonce je ta Pentium 4 vynechaná celá...

Re:Emulace konkrétního stroje pomocí QEMU
« Odpověď #3 kdy: 19. 03. 2019, 14:40:02 »
Kromě možnosti nastavit CPU je také možnost nastavit architekturu. U platformy x86 je možnost nastavit I440FX (default) nebo Q35. Q35 je modernější a vychází z reálného HW. https://wiki.qemu.org/Features/Q35