Effective Virtual CPU Configuration in Nova Kashyap Chamarthy - - PowerPoint PPT Presentation

effective virtual cpu configuration in nova
SMART_READER_LITE
LIVE PREVIEW

Effective Virtual CPU Configuration in Nova Kashyap Chamarthy - - PowerPoint PPT Presentation

Effective Virtual CPU Configuration in Nova Kashyap Chamarthy <kashyap@redhat.com> OpenStack Summit Berlin, 2018 1 / 39 Timeline of recent CPU flaws, 2018 (a) Jan 03 Spectre v1 : Bounds Check Bypass Jan 03 Spectre v2 : Branch


slide-1
SLIDE 1

Effective Virtual CPU Configuration in Nova

Kashyap Chamarthy <kashyap@redhat.com> OpenStack Summit Berlin, 2018

1 / 39

slide-2
SLIDE 2

Timeline of recent CPU flaws, 2018 (a)

Jan 03 • Spectre v1: Bounds Check Bypass Jan 03 • Spectre v2: Branch Target Injection Jan 03 • Meltdown: Rogue Data Cache Load May 21 • Spectre-NG: Speculative Store Bypass Jun 21 • TLBleed: Side-channel attack over shared TLBs

2 / 39

slide-3
SLIDE 3

Timeline of recent CPU flaws, 2018 (b)

Jun 29 • NetSpectre: Side-channel attack

  • ver local network

Jul 10 • Spectre-NG: Bounds Check Bypass Store Aug 14 • L1TF: “L1 Terminal Fault” Nov 01 • PortSmash: Impacts SMT processors . . . • ?

3 / 39

slide-4
SLIDE 4

What this talk is not about

4 / 39

slide-5
SLIDE 5

What this talk is not about

Out of scope: Internals of various side-channel attacks How to exploit Meltdown & Spectre variants Detailed performance analysis

4 / 39

slide-6
SLIDE 6

What this talk is not about

Out of scope: Internals of various side-channel attacks How to exploit Meltdown & Spectre variants Detailed performance analysis Related talks in the ‘References’ section

4 / 39

slide-7
SLIDE 7

KVM-based virtualization components

Linux with KVM

5 / 39

slide-8
SLIDE 8

KVM-based virtualization components

Linux with KVM QEMU VM1 QEMU VM2

Disk1 Disk2 ioctl()

5 / 39

slide-9
SLIDE 9

KVM-based virtualization components

Linux with KVM QEMU VM1 QEMU VM2

Disk1 Disk2

libvirtd

QMP QMP ioctl()

5 / 39

slide-10
SLIDE 10

KVM-based virtualization components

Linux with KVM QEMU VM1 QEMU VM2

Disk1 Disk2

libvirtd OpenStack, Nova

Virt Driver QMP QMP ioctl()

5 / 39

slide-11
SLIDE 11

KVM-based virtualization components

Linux with KVM QEMU VM1 QEMU VM2

Disk1 Disk2

libvirtd OpenStack, Nova libguestfs

Custom Appliance Virt Driver QMP QMP ioctl()

5 / 39

slide-12
SLIDE 12

QEMU and KVM

QEMU Host kernel Hardware: Intel VMX extensions Guest RAM e1000e NVMe Virtio-SCSI vCPU-1 vCPU-2 [kvm.ko; kvm-intel.ko] VMX modes: guest↔host Emulation: CPUID, irqchip

ioctl()→/dev/kvm VMLAUNCH, ...

6 / 39

slide-13
SLIDE 13

QEMU and KVM

QEMU Host kernel Hardware: Intel VMX extensions Guest RAM e1000e NVMe Virtio-SCSI vCPU-1 vCPU-2 [kvm.ko; kvm-intel.ko] VMX modes: guest↔host Emulation: CPUID, irqchip

ioctl()→/dev/kvm VMLAUNCH, ...

To inspect, use Linux tools: top, kill, ...

6 / 39

slide-14
SLIDE 14

Hardware-based virtualization with KVM

KVM prepares to enter CPU ‘Guest Mode’ Perform in-kernel emulation Emulate in-kernel? QEMU issues ioctl(KVM_RUN) QEMU emulates hardware Execute natively in ‘Guest Mode’. (CPU with VMX) No Yes VMENTER VMEXIT

7 / 39

slide-15
SLIDE 15

Part I

Interfaces to configure vCPUs

8 / 39

slide-16
SLIDE 16

x86: QEMU’s default CPU models (a)

The default models (qemu32, qemu64) work on any host CPU

9 / 39

slide-17
SLIDE 17

x86: QEMU’s default CPU models (a)

The default models (qemu32, qemu64) work on any host CPU But they are dreadful choices!

9 / 39

slide-18
SLIDE 18

x86: QEMU’s default CPU models (a)

The default models (qemu32, qemu64) work on any host CPU But they are dreadful choices! No AES / AES-NI: critical for TLS performance No RDRAND: important for entropy No PCID: performance- & security-critical (thanks, Meltdown)

9 / 39

slide-19
SLIDE 19

x86: QEMU’s default CPU models (b)

$ cd /sys/devices/system/cpu/vulnerabilities/ $ grep . * l1tf:Mitigation: PTE Inversion meltdown:Mitigation: PTI spec_store_bypass:Vulnerable spectre_v1:Mitigation: __user pointer sanitization spectre_v2:Mitigation: Full generic retpoline

10 / 39

slide-20
SLIDE 20

x86: QEMU’s default CPU models (b)

$ cd /sys/devices/system/cpu/vulnerabilities/ cd /sys/devices/system/cpu/vulnerabilities/ $ grep . * grep . * l1tf:Mitigation: PTE Inversion meltdown:Mitigation: PTI spec_store_bypass:Vulnerable spectre_v1:Mitigation: __user pointer sanitization spectre_v2:Mitigation: Full generic retpoline

10 / 39

On a guest running with qemu64

slide-21
SLIDE 21

x86: QEMU’s default CPU models (b)

$ cd /sys/devices/system/cpu/vulnerabilities/ $ grep . * l1tf:Mitigation: PTE Inversion meltdown:Mitigation: PTI spec_store_bypass:Vulnerable spec_store_bypass:Vulnerable spectre_v1:Mitigation: __user pointer sanitization spectre_v2:Mitigation: Full generic retpoline

10 / 39

Spectre-NG

slide-22
SLIDE 22

x86: QEMU’s default CPU models (b)

$ cd /sys/devices/system/cpu/vulnerabilities/ $ grep . * l1tf:Mitigation: PTE Inversion meltdown:Mitigation: PTI spec_store_bypass:Vulnerable spectre_v1:Mitigation: __user pointer sanitization spectre_v2:Mitigation: Full generic retpoline

Always specify an explicit CPU model;

  • r use Nova’s default, host-model

10 / 39

slide-23
SLIDE 23

Defaults of other architectures?

AArch64: Doesn’t provide a default guest CPU $ qemu-system-aarch64 -machine virt -cpu help

11 / 39

slide-24
SLIDE 24

Defaults of other architectures?

AArch64: Doesn’t provide a default guest CPU $ qemu-system-aarch64 -machine virt

  • machine virt -cpu help

11 / 39

Default CPU depends on the machine type

slide-25
SLIDE 25

Defaults of other architectures?

AArch64: Doesn’t provide a default guest CPU $ qemu-system-aarch64 -machine virt -cpu help ppc64 — host for KVM; power8 for TCG (pure emulation) s390x — host for KVM; qemu for TCG

11 / 39

slide-26
SLIDE 26

Configure CPU on the command-line

On x86, by default, the qemu64 model is used: $ qemu-system-x86_64 [...]

12 / 39

slide-27
SLIDE 27

Configure CPU on the command-line

On x86, by default, the qemu64 model is used: $ qemu-system-x86_64 [...] Specify a particular CPU model: $ qemu-system-x86_64 -cpu IvyBridge-IBRS [...]

12 / 39

slide-28
SLIDE 28

Configure CPU on the command-line

On x86, by default, the qemu64 model is used: $ qemu-system-x86_64 [...] Specify a particular CPU model: $ qemu-system-x86_64 -cpu IvyBridge-IBRS

  • cpu IvyBridge-IBRS [...]

12 / 39

Named CPU model

slide-29
SLIDE 29

Control guest CPU features

Enable or disable specific features for a vCPU model: $ qemu-system-x86_64 \

  • cpu Skylake-Client-IBRS,vmx=off,pcid=on [...]

13 / 39

slide-30
SLIDE 30

Control guest CPU features

Enable or disable specific features for a vCPU model: $ qemu-system-x86_64 \

  • cpu Skylake-Client-IBRS
  • cpu Skylake-Client-IBRS,vmx=off,pcid=on [...]

13 / 39

Named CPU model

slide-31
SLIDE 31

Control guest CPU features

Enable or disable specific features for a vCPU model: $ qemu-system-x86_64 \

  • cpu Skylake-Client-IBRS,vmx=off

vmx=off,pcid=on pcid=on [...]

13 / 39

Granular CPU flags

slide-32
SLIDE 32

Control guest CPU features

Enable or disable specific features for a vCPU model: $ qemu-system-x86_64 \

  • cpu Skylake-Client-IBRS,vmx=off,pcid=on [...]

For a list of supported vCPU models, refer to: $ qemu-system-x86_64 -cpu help Or libvirt’s — ‘virsh cpu-models x86_64’

13 / 39

slide-33
SLIDE 33

QEMU’s CPU-related run-time interfaces

Granular details about vCPU models, their capabilities & more: query-cpu-definitions query-cpu-model-expansion query-hotpluggable-cpus query-cpus-fast; device_{add,del} libvirt runs some of these at its daemon start-up time, and caches the results

14 / 39

slide-34
SLIDE 34

Run-time: E.g. probe for CPU model specifics

Executed at libvirtd start-up:

(QMP) query-cpu-definitions ... "return": [ { "typename": "Westmere-IBRS-x86_64-cpu", "unavailable-features": [], "migration-safe": true, "static": false, "name": "Westmere-IBRS" }] ... # Snip other CPU variants

15 / 39

slide-35
SLIDE 35

Part II

CPU modes, models and flags

16 / 39

slide-36
SLIDE 36

Host passthrough

Exposes the host CPU model, features, etc. as-is to the VM $ qemu-system-x86_64 -cpu host [...]

17 / 39

slide-37
SLIDE 37

Host passthrough

Exposes the host CPU model, features, etc. as-is to the VM $ qemu-system-x86_64 -cpu host [...] Caveats: No guarantee of a predictable CPU for the guest

17 / 39

slide-38
SLIDE 38

Host passthrough

Exposes the host CPU model, features, etc. as-is to the VM $ qemu-system-x86_64 -cpu host [...] Caveats: No guarantee of a predictable CPU for the guest Live migration is a no go with mixed host CPUs

17 / 39

slide-39
SLIDE 39

Host passthrough

Exposes the host CPU model, features, etc. as-is to the VM $ qemu-system-x86_64 -cpu host [...] Caveats: No guarantee of a predictable CPU for the guest Live migration is a no go with mixed host CPUs Most performant; ideal if live migration is not required

17 / 39

slide-40
SLIDE 40

Host passthrough – when else to use it?

Data Center (Intel host CPUs) Broadwell Broadwell Broadwell Broadwell Broadwell Broadwell Broadwell Broadwell

18 / 39

slide-41
SLIDE 41

Host passthrough – when else to use it?

Data Center (Intel host CPUs) Broadwell Broadwell Broadwell Broadwell Broadwell Broadwell Broadwell Broadwell Along with identical CPUs, identical kernel and microcode are a must for VM live migration!

18 / 39

slide-42
SLIDE 42

QEMU’s named CPU models (a)

Virtual CPUs typically model physical CPUs From a Nova instance’s QEMU log:

[...] qemu-system-x86_64 -cpu Broadwell-IBRS,\ vme=on,f16c=on,rdrand=on, \ tsc_adjust=on,xsaveopt=on,\ hypervisor=on,arat=off, \ pdpe1gb=on,abm=on [...]

19 / 39

slide-43
SLIDE 43

QEMU’s named CPU models (a)

Virtual CPUs typically model physical CPUs From a Nova instance’s QEMU log:

[...] qemu-system-x86_64 -cpu Broadwell-IBRS,\ vme=on,f16c=on,rdrand=on, \ tsc_adjust=on,xsaveopt=on,\ hypervisor=on,arat=off, \ pdpe1gb=on,abm=on [...]

More flexible in live migration than ‘host passthrough’

19 / 39

slide-44
SLIDE 44

QEMU’s named CPU models (b)

QEMU is built with a number of pre-defined models:

$ qemu-system-x86_64 -cpu help Available CPUs: ... x86 Broadwell-IBRS Intel Core Processor (Broadwell, IBRS) ... x86 EPYC AMD EPYC Processor x86 EPYC-IBPB AMD EPYC Processor (with IBPB) x86 Haswell Intel Core Processor (Haswell) ... Recognized CPUID flags: amd-ssbd apic arat arch-capabilities avx avx2 avx512-4fmaps ...

20 / 39

slide-45
SLIDE 45

‘host-model’ – a libvirt abstraction

Tackles a few things: Maximum possible CPU features from the host Live migration compatibility—with caveats Auto-adds critical guest CPU flags (e.g. spec-ctrl)

21 / 39

slide-46
SLIDE 46

‘host-model’ – a libvirt abstraction

Tackles a few things: Maximum possible CPU features from the host Live migration compatibility—with caveats Auto-adds critical guest CPU flags (e.g. spec-ctrl); provided—microcode, kernel, QEMU & libvirt are updated!

21 / 39

slide-47
SLIDE 47

‘host-model’ – a libvirt abstraction

Tackles a few things: Maximum possible CPU features from the host Live migration compatibility—with caveats Auto-adds critical guest CPU flags (e.g. spec-ctrl); provided—microcode, kernel, QEMU & libvirt are updated! Targets for the best of ‘host passthrough’ & named CPU models; it’s the default of Nova

21 / 39

slide-48
SLIDE 48

‘host-model’ – example libvirt config

From a Nova guest definition:

<cpu mode=’host-model’> <feature policy=’require’ name=’vmx’/> <feature policy=’disable’ name=’pdpe1gb’/> ... </cpu>

libvirt will translate it into a suitable CPU model; based on: /usr/share/libvirt/cpu_map/*.xml

22 / 39

slide-49
SLIDE 49

‘host-model’ and live migration

As done by libvirt: Source vCPU definition is transferred as-is to the target On target: Migrated guest sees the same vCPU model

23 / 39

slide-50
SLIDE 50

‘host-model’ and live migration

As done by libvirt: Source vCPU definition is transferred as-is to the target On target: Migrated guest sees the same vCPU model But: When the guest ‘cold-reboots’, it may pick up extra CPU features—prevents migrating back to the source host Use host-model, if live migration in both directions is not a requirement

23 / 39

slide-51
SLIDE 51

Nova and CPU models

Provides relevant config attributes: cpu_mode

Can be: custom, host-passthrough, or host-model

cpu_model & cpu_model_extra_flags

Refer to libvirt’s /usr/share/libvirt/cpu_map/*.xml Or QEMU’s: ‘qemu-system-x86_64 -cpu help’

Refer to the docs of the above config attributes

https://docs.openstack.org/nova/rocky/configuration/config.html

24 / 39

slide-52
SLIDE 52

Nova and CPU models – example config

On a Compute node:

$ cat /etc/nova/nova.conf ... [libvirt] cpu_mode = custom cpu_model = IvyBridge-IBRS cpu_model_extra_flags = ssbd, pdpe1gb ...

25 / 39

slide-53
SLIDE 53

Part III

Choosing CPU models & features

26 / 39

slide-54
SLIDE 54

Finding compatible CPU models

Data Center (Intel host CPUs) Haswell Westmere IvyBridge SandyBridge Nehalem Broadwell Westmere Nehalem-IBRS

27 / 39

slide-55
SLIDE 55

Finding compatible CPU models

Problem: Determine a compatible model among CPU variants

28 / 39

slide-56
SLIDE 56

Finding compatible CPU models

Problem: Determine a compatible model among CPU variants Enter libvirt’s APIs: compareCPU() and baselineCPU() compareHypervisorCPU() and baselineHypervisorCPU() տ New in libvirt 4.4.0 TODO: Make Nova use these

28 / 39

slide-57
SLIDE 57

Intersection between these two host CPUs?

$ cat Multiple-Host-CPUs.xml <cpu mode=’custom’ match=’exact’> <model fallback=’forbid’>Haswell-noTSX-IBRS</model> <vendor>Intel</vendor> <feature policy=’require’ name=’vmx’/> <feature policy=’require’ name=’rdrand’/> </cpu> <!–- Second CPU –-> <cpu mode=’custom’ match=’exact’> <model fallback=’forbid’>Skylake-Client-IBRS</model> <vendor>Intel</vendor> <feature policy=’disable’ name=’pdpe1gb’/> <feature policy=’disable’ name=’pcid’/> </cpu>

29 / 39

slide-58
SLIDE 58

Intersection between these two host CPUs?

$ cat Multiple-Host-CPUs.xml <cpu mode=’custom’ match=’exact’> <model fallback=’forbid’>Haswell-noTSX-IBRS Haswell-noTSX-IBRS</model> <vendor>Intel</vendor> <feature policy=’require’ name=’vmx’/> <feature policy=’require’ name=’rdrand’/> </cpu> <!–- Second CPU –-> <cpu mode=’custom’ match=’exact’> <model fallback=’forbid’>Skylake-Client-IBRS Skylake-Client-IBRS</model> <vendor>Intel</vendor> <feature policy=’disable’ name=’pdpe1gb’/> <feature policy=’disable’ name=’pcid’/> </cpu>

29 / 39

Two CPU models

slide-59
SLIDE 59

Use baselineHypervisorCPU() to determine it

$ virsh hypervisor-cpu-baseline Multiple-Host-CPUs.xml <cpu mode=’custom’ match=’exact’> <model fallback=’forbid’>Haswell-noTSX-IBRS</model> <vendor>Intel</vendor> <feature policy=’require’ name=’rdrand’/> <feature policy=’disable’ name=’pcid’/> </cpu>

30 / 39

slide-60
SLIDE 60

Use baselineHypervisorCPU() to determine it

$ virsh hypervisor-cpu-baseline Multiple-Host-CPUs.xml <cpu mode=’custom’ match=’exact’> <model fallback=’forbid’>Haswell-noTSX-IBRS</model> <vendor>Intel</vendor> <feature policy=’require’ name=’rdrand’/> <feature policy=’require’ name=’rdrand’/> <feature policy=’disable’ name=’pcid’/> <feature policy=’disable’ name=’pcid’/> </cpu>

30 / 39

Intersection between our Haswell & Skylake variants

slide-61
SLIDE 61

Use baselineHypervisorCPU() to determine it

$ virsh hypervisor-cpu-baseline Multiple-Host-CPUs.xml <cpu mode=’custom’ match=’exact’> <model fallback=’forbid’>Haswell-noTSX-IBRS</model> <vendor>Intel</vendor> <feature policy=’require’ name=’rdrand’/> <feature policy=’disable’ name=’pcid’/> </cpu>

A “baseline” CPU model that permits live migration

30 / 39

slide-62
SLIDE 62

x86: QEMU’s “machine types”

31 / 39

slide-63
SLIDE 63

x86: QEMU’s “machine types”

Two main purposes: Emulate different chipsets (and related devices)—e.g. Intel’s i440FX (a.k.a ‘pc’) and Q35

31 / 39

slide-64
SLIDE 64

x86: QEMU’s “machine types”

Two main purposes: Emulate different chipsets (and related devices)—e.g. Intel’s i440FX (a.k.a ‘pc’) and Q35 Provide a stable guest ABI—virtual hardware remains identical regardless of changes in host software / hardware

31 / 39

slide-65
SLIDE 65

x86: QEMU’s “machine types” – versioned

$ qemu-system-x86_64 -machine help ... pc

Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-3.0)

pc-i440fx-3.0

Standard PC (i440FX + PIIX, 1996) (default)

pc-i440fx-2.9

Standard PC (i440FX + PIIX, 1996)

... q35

Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-3.0)

pc-q35-3.0

Standard PC (Q35 + ICH9, 2009)

pc-q35-2.9

Standard PC (Q35 + ICH9, 2009)

pc-q35-2.8

Standard PC (Q35 + ICH9, 2009)

...

32 / 39

slide-66
SLIDE 66

x86: QEMU’s “machine types” – versioned

$ qemu-system-x86_64 -machine help ... pc pc

Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-3.0) (alias of pc-i440fx-3.0)

pc-i440fx-3.0 pc-i440fx-3.0

Standard PC (i440FX + PIIX, 1996) (default) (default)

pc-i440fx-2.9

Standard PC (i440FX + PIIX, 1996)

... q35

Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-3.0)

pc-q35-3.0

Standard PC (Q35 + ICH9, 2009)

pc-q35-2.9

Standard PC (Q35 + ICH9, 2009)

pc-q35-2.8

Standard PC (Q35 + ICH9, 2009)

...

32 / 39

Traditional

slide-67
SLIDE 67

x86: QEMU’s “machine types” – versioned

$ qemu-system-x86_64 -machine help ... pc

Standard PC (i440FX + PIIX, 1996) (alias of pc-i440fx-3.0)

pc-i440fx-3.0

Standard PC (i440FX + PIIX, 1996) (default)

pc-i440fx-2.9

Standard PC (i440FX + PIIX, 1996)

... q35 q35

Standard PC (Q35 + ICH9, 2009) (alias of pc-q35-3.0) (alias of pc-q35-3.0)

pc-q35-3.0

Standard PC (Q35 + ICH9, 2009)

pc-q35-2.9

Standard PC (Q35 + ICH9, 2009)

pc-q35-2.8

Standard PC (Q35 + ICH9, 2009)

...

Versioned machine types provide stable guest ABI

32 / 39

Recommended

slide-68
SLIDE 68

Machine types and CPU features

Changing machine types is guest-visible

33 / 39

slide-69
SLIDE 69

Machine types and CPU features

Changing machine types is guest-visible After a QEMU upgrade, when using libvirt: Explicitly request Nova to change machine type

33 / 39

slide-70
SLIDE 70

Machine types and CPU features

Changing machine types is guest-visible After a QEMU upgrade, when using libvirt: Explicitly request Nova to change machine type The guest needs a ‘cold-reboot’ (i.e. an explicit stop + start)—only then it picks up a new machine type

33 / 39

slide-71
SLIDE 71

Machine types and CPU features

Changing machine types is guest-visible After a QEMU upgrade, when using libvirt: Explicitly request Nova to change machine type The guest needs a ‘cold-reboot’ (i.e. an explicit stop + start)—only then it picks up a new machine type Change machine types only after guest workload evaluation—CPU features & devices can differ

33 / 39

slide-72
SLIDE 72

x86: Updating to patched vCPU models

First, update microcode, host & guest kernels; refer to—/sys/devices/system/cpu/vulnerabilities/

34 / 39

slide-73
SLIDE 73

x86: Updating to patched vCPU models

First, update microcode, host & guest kernels; refer to—/sys/devices/system/cpu/vulnerabilities/ Next, update libvirt & QEMU

34 / 39

slide-74
SLIDE 74

x86: Updating to patched vCPU models

First, update microcode, host & guest kernels; refer to—/sys/devices/system/cpu/vulnerabilities/ Next, update libvirt & QEMU Then explicitly tell Nova to update guest CPUs to their patched variants—e.g. the *-IBRS models Cold-reboot the guests—to pick up new CPUID bits Guidance: qemu/docs/qemu-cpu-models.texi

34 / 39

slide-75
SLIDE 75

x86: Important CPU flags

To mitigate guests from multiple Spectre & Meltdown variants: Intel: ssbd, pcid, spec-ctrl AMD: virt-ssbd, amd-ssbd, amd-no-ssb, ibpb Some are built into QEMU’s *-IBRS & *-IBPB CPU models

35 / 39

slide-76
SLIDE 76

x86: Important CPU flags

To mitigate guests from multiple Spectre & Meltdown variants: Intel: ssbd, pcid, spec-ctrl AMD: virt-ssbd, amd-ssbd, amd-no-ssb, ibpb Some are built into QEMU’s *-IBRS & *-IBPB CPU models

Details:

qemu/docs/qemu-cpu-models.texi https://www.qemu.org/2018/02/14/qemu-2-11-1-and-spectre-update

35 / 39

slide-77
SLIDE 77

‘Expectations’ from applications like Nova?

“QEMU and libvirt took the joint decision to stop adding new named CPU models when CPU vulnerabilities are discovered from this point forwards. Applications / users would be expected to turn on CPU features explicitly as needed and are considered broken if they don’t provide this functionality.”

— “CPU model versioning separate from machine type versioning” From ‘qemu-devel’ & libvirt mailing lists

36 / 39

slide-78
SLIDE 78

Summary

Identical host CPUs? Go with “host passthrough” With mixed host CPUs: if host-model doesn’t suit, work out a custom ‘baseline’ model Evaluate workloads before changing machine types Systematically update all relevant host & guest components—only then update guest CPU models+flags

37 / 39

slide-79
SLIDE 79

References

CPU model configuration for QEMU/KVM x86 hosts, by Daniel Berrangé

https://www.berrange.com/posts/2018/06/29/cpu-model-configuration-for-qemu-kvm-on-x86-hosts

Mitigating Spectre and Meltdown (and L1TF), by David Woodhouse

https://kernel-recipes.org/en/2018/talks/mitigating-spectre-and-meltdown-vulnerabilities/

Exploiting modern microarchitectures—Meltdown, Spectre, and other hardware attacks, by Jon Masters

https://archive.fosdem.org/2018/schedule/event/closing_keynote

KVM and CPU feature enablement, by Eduardo Habkost

https://wiki.qemu.org/images/c/c8/Cpu-models-and-libvirt-devconf-2014.pdf

38 / 39

slide-80
SLIDE 80

Questions?

E-mail: kashyap@redhat.com IRC: kashyap – Freenode & OFTC

39 / 39