The Xen Para-virtual Frame Buffer Markus Armbruster, 2007 - - PowerPoint PPT Presentation

the xen para virtual frame buffer
SMART_READER_LITE
LIVE PREVIEW

The Xen Para-virtual Frame Buffer Markus Armbruster, 2007 - - PowerPoint PPT Presentation

The Xen Para-virtual Frame Buffer Markus Armbruster, 2007 armbru@redhat.com Red Hat GmbH What, Why and Who What? A para-virtual driver for a virtual frame buffer device Why? Want a graphical console Just like a real machine, just like FV


slide-1
SLIDE 1

The Xen Para-virtual Frame Buffer

Markus Armbruster, 2007

armbru@redhat.com

Red Hat GmbH

slide-2
SLIDE 2

What?

  • A para-virtual driver for a virtual frame buffer device

Why? Want a graphical console

Just like a real machine, just like FV

Whodunnit?

  • Anthony Liguori

Design and initial implementation

  • Markus Armbruster & others

Flesh out, fix, extend

What, Why and Who

slide-3
SLIDE 3

Architecture

Similar to common split driver architecture:

  • Frontend in domU:

xenfb and xenkbd kernel modules

  • Backend in dom0:

user space VNC server or built-in viewer

  • Communicate through

shared memory page and event channel shared frame buffer

  • Forward compatible protocol
slide-4
SLIDE 4

Status

Features:

  • VNC or built-in viewer (SDL)
  • Smart frame buffer update tracking
  • Partial support for funny keyboards
  • Support for absolute pointer
  • Support for save/restore
slide-5
SLIDE 5

Status

Non-features:

  • Dynamic resolution
  • Multiple frame buffers per guest

Misfeatures:

  • Should share more code with FV
  • and possibly other user space backends
  • PTE update race
slide-6
SLIDE 6

Availability

 Merged in Xen 3.0.4  Shipped in major distributions

slide-7
SLIDE 7

The situation:

  • User types on a real keyboard
  • System maps his keystrokes to key events
  • Virtualization software conjures up a virtual keyboard
  • Virtual system maps virtual keystrokes to key events

The problematic step: Mapping real key events to virtual keystrokes

Funny Keyboards: What's the problem?

slide-8
SLIDE 8

Idea: make virtual key events = real key events Need to know virtual mapping Unless virtual keyboard/keymap = real keyboard/keymap:

  • virtual keystrokes ≠ real keystrokes
  • virtual keystroke may not exist
  • may not be able to produce all virtual keys

Funny Keyboards: Preserve key events

slide-9
SLIDE 9

Idea: map real key to virtual key Virtual keys: Linux input layer key codes Identify real keys? X key code depends on hardware built-in viewer assumes Xorg & PC VNC's RFB protocol doesn't provide it VNC server maps from X keysym this needs to invert the real keymap choose one in domU config if multiple keys map to same keysym: guess

Funny Keyboards: Keys, not key events

slide-10
SLIDE 10

Lessons Learned: Protocol

Forward-compatible protocol sound so far, but dumb oversights:

  • Shared data-structures varied 32 vs. 64 bit
  • Shared pages not zeroed

Solved using excessive cleverness

slide-11
SLIDE 11

Lessons Learned: Implementation

 Playing VM games is subtle business  Split driver initialization and shutdown pitfalls  VNC's RFB protocol doesn't give us keys

slide-12
SLIDE 12

The Xen Para-virtual Frame Buffer

Markus Armbruster, 2007

armbru@redhat.com

Red Hat GmbH