Kernel panic running latest ubuntu 12.10 kernel version (3.5.0-17-generic) under xen.

Bug #1081054 reported by Stefano Panella
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Fix Released
Medium
Unassigned
Quantal
Fix Released
Medium
Stefan Bader

Bug Description

There is a problem running latest ubuntu 12.10 kernel version (3.5.0-17-generic) under xen.

Basically there has been a patch cousing a problem with drivers/xen/platform_pci.c

commit b9136d207f0c05c96c6b9c980fa7f7fd541a65a8 introduces a bug under xen
commit 38ad4f4b6cc713b3c42cb4252688ef5c296d7455 fixes it.

Kernel 3.5.0-17-generic has b9136d207f0c05c96c6b9c980fa7f7fd541a65a8 but not 38ad4f4b6cc713b3c42cb4252688ef5c296d7455

In order to fix the xen bug introduced with b9136d207f0c05c96c6b9c980fa7f7fd541a65a8 we need 38ad4f4b6cc713b3c42cb4252688ef5c296d7455 as well.

Stefan Bader (smb)
Changed in linux (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Stefan Bader (smb)
Changed in linux (Ubuntu Quantal):
importance: Undecided → Medium
status: New → Triaged
Changed in linux (Ubuntu):
status: Triaged → Fix Released
tags: added: kernel-fixed-upstream quantal
Revision history for this message
Stefan Bader (smb) wrote :

Stefano, it would help if you could add details about the circumstances this problem is triggering. The fix prevents initializing platform_pci if not a Xen guest, so I assume this would be the case for running a kernel in dom0. But I seem unable to see a crash when doing so.

Revision history for this message
Stefano Panella (stefano-panella) wrote :

The panic is happening if we but the ubuntu kernel as HVM but we disable XEN flag from cpuid.
This scenario is useful if we want to boot the guest as a pure non XEN awere HVM guest. In this case qemu is still emulating platform_pci and since there is the driver in the kernel for it the probe gets called.

Commit b9136d207f0c05c96c6b9c980fa7f7fd541a65a8 allow the driver to be probed in any case (even if we do not tell the guest is running under xen) and in the probe try to use xen structures which are uninitialised.

Commit 38ad4f4b6cc713b3c42cb4252688ef5c296d7455 adds a check in platform_pci driver code to exit if the guest is not running in xen environment (cpuid does not report XEN).

In bare metal case there is no bug because platform_pci device does not exist and can only be emulated by qemu under xen.

Hope this helps, if not I can clarify more.

Revision history for this message
Stefan Bader (smb) wrote :

Ah ok, that makes sense and explains why I never had any issues, yet. :)

Revision history for this message
Stefan Bader (smb) wrote :

SRU Justification:

Impact: It is possible to mask off the cpuid bits that would tell a guest it is running as HVM domU for testing purposes. With the current kernel code this causes a crash because the pci platform device is still present in that case.

Fix: A cherry picked patch that prevents the pci platform driver from initializing when the cpuid test claims not to be a Xen guest.

Testcase: Using the right cpuid masking the guest will crash (unfortunately the actual values have not yet been revealed).

Tim Gardner (timg-tpi)
Changed in linux (Ubuntu Quantal):
assignee: nobody → Stefan Bader (stefan-bader-canonical)
status: Triaged → Fix Committed
Revision history for this message
Luis Henriques (henrix) wrote :

This bug is awaiting verification that the kernel for Quantal in -proposed solves the problem (3.5.0-20.31). Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-quantal' to 'verification-done-quantal'.

If verification is not done by one week from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-quantal
Revision history for this message
Stefano Panella (stefano-panella) wrote :

Hi I have just tried last proposed kernel (3.5.0-20.31) and the problem is not showing anymore.

Revision history for this message
Stefano Panella (stefano-panella) wrote :

Thanks for fixing this :)

Revision history for this message
Herton R. Krzesinski (herton) wrote :

Thanks for the testing, marking as verified.

tags: added: verification-done-quantal
removed: verification-needed-quantal
Revision history for this message
Adam Conrad (adconrad) wrote : Update Released

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (24.2 KiB)

This bug was fixed in the package linux - 3.5.0-21.32

---------------
linux (3.5.0-21.32) quantal-proposed; urgency=low

  [ Luis Henriques ]

  * Release Tracking Bug
    - LP: #1088979
  * SAUCE: i915_hsw: move i915_hsw_enabled symbol to intel_ips
    - LP: #1087622

linux (3.5.0-20.31) quantal-proposed; urgency=low

  [Luis Henriques]

  * Release Tracking Bug
    - LP: #1086759

  [ Ben Widawsky ]

  * SAUCE: i915_hsw: Include #define I915_PARAM_HAS_WAIT_TIMEOUT
    - LP: #1085245
  * SAUCE: i915_hsw: Include #define DRM_I915_GEM_CONTEXT_[CREATE,DESTROY]
    - LP: #1085245
  * SAUCE: i915_hsw: drm/i915: add register read IOCTL
    - LP: #1085245
  * SAUCE: i915_hsw: Include #define i915_execbuffer2_[set,get]_context_id
    - LP: #1085245

  [ Chris Wilson ]

  * SAUCE: i915_hsw: Include #define I915_GEM_PARAM_HAS_SEMAPHORES
    - LP: #1085245
  * SAUCE: i915_hsw: Include #define I915_PARAM_HAS_SECURE_BATCHES
    - LP: #1085245

  [ Daniel Vetter ]

  * SAUCE: i915_hsw: drm/i915: call intel_enable_gtt
    - LP: #1085245
  * SAUCE: i915_hsw: drm: add helper to sort panels to the head of the
    connector list
    - LP: #1085245
  * SAUCE: i915_hsw: drm: extract dp link bw helpers
    - LP: #1085245
  * SAUCE: i915_hsw: drm: extract drm_dp_max_lane_count helper
    - LP: #1085245
  * SAUCE: i915_hsw: drm: dp helper: extract drm_dp_channel_eq_ok
    - LP: #1085245
  * SAUCE: i915_hsw: drm: extract helpers to compute new training values
    from sink request
    - LP: #1085245
  * SAUCE: i915_hsw: drm: dp helper: extract drm_dp_clock_recovery_ok
    - LP: #1085245

  [ Dave Airlie ]

  * SAUCE: i915_hsw: Include #define I915_PARAM_HAS_PRIME_VMAP_FLUSH
    - LP: #1085245

  [ Leann Ogasawara ]

  * SAUCE: i915_hsw: Provide an ubuntu/i915 driver for Haswell graphics
    - LP: #1085245
  * SAUCE: i915_hsw: Revert "drm: Make the .mode_fixup() operations mode
    argument a const pointer" for ubuntu/i915 driver
    - LP: #1085245
  * SAUCE: i915_hsw: Rename ubuntu/i915 driver i915_hsw
    - LP: #1085245
  * SAUCE: i915_hsw: Only support Haswell with ubuntu/i915 driver
    - LP: #1085245
  * SAUCE: i915_hsw: Include #define DRM_I915_GEM_WAIT
    - LP: #1085245
  * SAUCE: i915_hsw: drm: extract dp link train delay functions from radeon
    - LP: #1085245
  * SAUCE: i915_hsw: drm/dp: Update DPCD defines
    - LP: #1085245
  * SAUCE: i915_hsw: Update intel_ips.h file location
    - LP: #1085245
  * SAUCE: i915_hsw: Provide updated drm_mm.h and drm_mm.c for ubuntu/i915
    - LP: #1085245
  * SAUCE: i915_hsw: drm/i915: Replace the array of pages with a
    scatterlist
    - LP: #1085245
  * SAUCE: i915_hsw: drm/i915: Replace the array of pages with a
    scatterlist
    - LP: #1085245
  * SAUCE: i915_hsw: drm/i915: Stop using AGP layer for GEN6+
    - LP: #1085245
  * SAUCE: i915_hsw: Add i915_hsw_gpu_*() calls for ubuntu/i915
    - LP: #1085245
  * i915_hsw: [Config] Enable CONFIG_DRM_I915_HSW=m
    - LP: #1085245

  [ Paulo Zanoni ]

  * SAUCE: drm/i915: fix hsw_fdi_link_train "retry" code
    - LP: #1085245
  * SAUCE: drm/i915: reject modes the LPT FDI receiver can't handle
    - LP: #1085245
  * SAUCE: drm/i915: add support for mPHY destination on i...

Changed in linux (Ubuntu Quantal):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.