Skip to content
Nicolas DI PRIMA edited this page Aug 20, 2014 · 4 revisions

This page contains updates for QEMU upstream (1.4) in OpenXT.

Table of Contents

Abstract

Here are the patches for QEMU 1.4. The aim is to port the patches from IOEMU (the old version of QEMU used in XEN) to a newer version of QEMU (easier to maintain and more reliable).

Even if there are already good progress, there is still one very missing patch : surfman.

What's new in QEMU1.4

  • Inter-hda emulation
  • 64 bits support for PCI Bar (some patches was submitted in QEMU/Xen mailing)
  • MemoryRegion API: offer a usefull way to manage MMIO and PCI Bar
  • PCI-PASSTHROUGH:
    • don't need a patch to enable it. There is now an option
    • use a -device xen-pci-pt,hostaddr=xxxx:yy:zz.f to provide a device

Dependances

This section might be obsolete

Build Script

  • in .config file use BRANCH="qemu-1.4" instead of master.

Packages

  • xenclient-oe (branch qemu-dm)
  • dm-agent (branch qemu-dm (use option -q))
    • src/dm-agent
    • scripts/qemu-wrapper

List of patches

static-fix

QEMU with --enable-xen doesn't allow static compilation. We use static compilation for the stubdomain.

ioreq-server-upstream

ioreq-server

logging-syslog

Enable QEMU to log in syslog.

dmbus

Add wrapper for dmbus connection. It will be use for input event.

surfman

This patch was used to setup the XenGFX mode. Which is no longer used in XT.

  • TODO:
    • Erase this patch
    • implements some hooks to send the surface to surfman

switcher

Handle input keyboard and mouse.

acpi

  • Support of ACPI state;
  • Enable ACPI by default otherwise Windows will BSOD (In recent Xen's versions this part is made in hvmloader. See comment below)
  • Send state to the Input Server
Comments: acpi.c: from Xen4.2, we may need remove this line from this patch:
  apm_ctrl_changed(ACPI_ENABLE, s);

Warning:

  • Hibernation: Win7 doesn't leave the hibernation state properly. The RTL8139 driver for Window7 is no longer supported and let the guest in a bad status. Use e1000 netwotk device instead of rtl8139 to avoid any issue (see VM configuration).

xc-emulated-nic-link-state-propagation

Propagate network link status to the guest. This patch:

  • add a support to be notify when network is up/down via XenStore;
  • modify rt8189 card (use by default in XT) to handle link state.

Battery

Re-write the old patch from Kamala Narasimhan:

  • use memory_region to add new IOPORT
  • depends of hvmloader/acpi/ssdt.asl
Missing features:
  • It doesn't implement the GPE yet.
  • The patch implements the multiple batteries management, it doesn't allow to hotplug a battery

audio-alsa

  • enable volume controle

xenmou

  • Mouse emulation via a PCI device.

ATAPI-PASSTHROUGH

This is a re-implementation of the original ATAPI-Passthrough patch for IOEMU. Even if the logic has been kept (directly forward the SYSCall to the disk drive), the design has been changed.

Now there are 2 parts:

  • the device emulation
  • the device drivers
    • directly execute the IOCTL
    • one for the stubdom (It implements IOCTL over v4v)
Command line
  -drive file=/dev/bsg/1:0:0:0,media=cdrom,if=atapi-pt,format=pt