LE KVM support for 14.10

Bug #1362514 reported by bugproxy on 2014-08-28
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Tim Gardner
Utopic
Medium
Tim Gardner

Bug Description

== Comment: #0 - Cedric Le Goater <email address hidden> - 2014-08-27 02:32:18 ==
Hi,

Could you please apply the following patches to the utopic kernel to enable LE KVM support ?

6947f948f061 2014-07-28 15:22:26 +0200 Alexander Graf - KVM: PPC: Book3S HV: Enable for little endian hosts
9bf163f86d0d 2014-07-28 15:22:25 +0200 Alexander Graf - KVM: PPC: Book3S HV: Fix ABIv2 on LE
76d072fb05f6 2014-07-28 15:22:24 +0200 Alexander Graf - KVM: PPC: Book3S HV: Access XICS in BE
0865a583a488 2014-07-28 15:22:23 +0200 Alexander Graf - KVM: PPC: Book3S HV: Access host lppaca and shadow slb in BE
024075522561 2014-07-28 15:22:22 +0200 Alexander Graf - KVM: PPC: Book3S HV: Access guest VPA in BE
6f22bd3265fb 2014-07-28 15:22:22 +0200 Alexander Graf - KVM: PPC: Book3S HV: Make HTAB code LE host aware
8f6822c4b9fa 2014-07-28 15:22:21 +0200 Alexander Graf - PPC: Add asm helpers for BE 32bit load/store
f396df35188c 2014-07-28 15:22:16 +0200 Alexander Graf - KVM: PPC: Book3S PR: Fix sparse endian checks
05a308c72282 2014-07-28 15:22:13 +0200 Anton Blanchard - KVM: PPC: Book3S HV: Fix ABIv2 indirect branch issue
568fccc43f90 2014-07-28 15:22:12 +0200 Alexander Graf - KVM: PPC: Book3S PR: Handle hyp doorbell exits
f6bf3a662274 2014-07-28 15:22:12 +0200 Alexander Graf - KVM: PPC: Book3s HV: Fix tlbie compile error
fb4188bad02f 2014-07-28 15:22:11 +0200 Alexander Graf - KVM: PPC: Book3s PR: Disable AIL mode with OPAL

This set is also required for vhost (of same endian, cross endian vhost needs a few more
patches which were not sent to mainline yet)

25a2150bee00 2014-08-05 14:26:33 +0200 Paul Mackerras - KVM: PPC: Enable IRQFD support for the XICS interrupt controller
297e21053a52 2014-08-05 14:26:28 +0200 Paul Mackerras - KVM: Give IRQFD its own separate enabling Kconfig option
e4d57e1ee1ab 2014-08-05 14:26:24 +0200 Paul Mackerras - KVM: Move irq notifier implementation into eventfd.c
9957c86d659a 2014-08-05 14:26:20 +0200 Paul Mackerras - KVM: Move all accesses to kvm::irq_routing into irqchip.c
8ba918d488ca 2014-08-05 14:26:16 +0200 Paul Mackerras - KVM: irqchip: Provide and use accessors for irq routing table
56f89f3629ff 2014-08-05 14:24:23 +0200 Paul Mackerras - KVM: Don't keep reference to irq routing table in irqfd struct

I did a quick try on git's head (Ubuntu-3.16.0-11.16). All patches apply smoothly.

Thanks,

bugproxy (bugproxy) on 2014-08-28
tags: added: architecture-ppc64le bugnameltc-115309 severity-medium targetmilestone-inin1410

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1362514/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
Changed in ubuntu:
status: New → Confirmed
affects: ubuntu → linux (Ubuntu)
Changed in linux (Ubuntu):
assignee: nobody → Taco Screen team (taco-screen-team)
Adam Conrad (adconrad) on 2014-08-29
Changed in linux (Ubuntu):
assignee: Taco Screen team (taco-screen-team) → Canonical Kernel Team (canonical-kernel-team)
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key ppc64el
Changed in linux (Ubuntu):
status: Confirmed → Triaged
Tim Gardner (timg-tpi) on 2014-08-29
Changed in linux (Ubuntu Utopic):
assignee: Canonical Kernel Team (canonical-kernel-team) → Tim Gardner (timg-tpi)
status: Triaged → Fix Committed
Tim Gardner (timg-tpi) wrote :

This was the final patch set.

KVM: PPC: Book3S HV: Enable for little endian hosts
KVM: PPC: Book3S HV: Fix ABIv2 on LE
KVM: PPC: Book3S HV: Access XICS in BE
KVM: PPC: Book3S HV: Access host lppaca and shadow slb in BE
KVM: PPC: Book3S HV: Access guest VPA in BE
KVM: PPC: Book3S HV: Make HTAB code LE host aware
PPC: Add asm helpers for BE 32bit load/store
KVM: PPC: Book3S PR: Fix sparse endian checks
KVM: PPC: Book3S HV: Fix ABIv2 indirect branch issue
KVM: PPC: Book3S PR: Handle hyp doorbell exits
KVM: PPC: Book3s HV: Fix tlbie compile error
KVM: PPC: Book3s PR: Disable AIL mode with OPAL
KVM: PPC: Enable IRQFD support for the XICS interrupt controller
KVM: Give IRQFD its own separate enabling Kconfig option
KVM: Allow KVM_CHECK_EXTENSION on the vm fd
KVM: Rename and add argument to check_extension
KVM: PPC: Book3S: Controls for in-kernel sPAPR hypercall handling
KVM: prepare for KVM_(S|G)ET_MP_STATE on other architectures
KVM: Move irq notifier implementation into eventfd.c
KVM: Move all accesses to kvm::irq_routing into irqchip.c
KVM: irqchip: Provide and use accessors for irq routing table
KVM: Don't keep reference to irq routing table in irqfd struct

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.16.0-13.19

---------------
linux (3.16.0-13.19) utopic; urgency=low

  [ Tim Gardner ]

  * Release Tracking Bug
    - LP: #1365611
  * [Config] CONFIG_HAVE_KVM_IRQFD=y
    - LP: #1362514

  [ Paolo Pisati ]

  * [Config] armhf: SERIAL_SAMSUNG_CONSOLE=y
  * [Config] armhf: USB_[E|O]HCI_EXYNOS=y && SAMSUNG_USBPHY=y

  [ Upstream Kernel Changes ]

  * KVM: Don't keep reference to irq routing table in irqfd struct
    - LP: #1362514
  * KVM: irqchip: Provide and use accessors for irq routing table
    - LP: #1362514
  * KVM: Move all accesses to kvm::irq_routing into irqchip.c
    - LP: #1362514
  * KVM: Move irq notifier implementation into eventfd.c
    - LP: #1362514
  * KVM: prepare for KVM_(S|G)ET_MP_STATE on other architectures
    - LP: #1362514
  * KVM: PPC: Book3S: Controls for in-kernel sPAPR hypercall handling
    - LP: #1362514
  * KVM: Rename and add argument to check_extension
    - LP: #1362514
  * KVM: Allow KVM_CHECK_EXTENSION on the vm fd
    - LP: #1362514
  * KVM: Give IRQFD its own separate enabling Kconfig option
    - LP: #1362514
  * KVM: PPC: Enable IRQFD support for the XICS interrupt controller
    - LP: #1362514
  * KVM: PPC: Book3s PR: Disable AIL mode with OPAL
    - LP: #1362514
  * KVM: PPC: Book3s HV: Fix tlbie compile error
    - LP: #1362514
  * KVM: PPC: Book3S PR: Handle hyp doorbell exits
    - LP: #1362514
  * KVM: PPC: Book3S HV: Fix ABIv2 indirect branch issue
    - LP: #1362514
  * KVM: PPC: Book3S PR: Fix sparse endian checks
    - LP: #1362514
  * PPC: Add asm helpers for BE 32bit load/store
    - LP: #1362514
  * KVM: PPC: Book3S HV: Make HTAB code LE host aware
    - LP: #1362514
  * KVM: PPC: Book3S HV: Access guest VPA in BE
    - LP: #1362514
  * KVM: PPC: Book3S HV: Access host lppaca and shadow slb in BE
    - LP: #1362514
  * KVM: PPC: Book3S HV: Access XICS in BE
    - LP: #1362514
  * KVM: PPC: Book3S HV: Fix ABIv2 on LE
    - LP: #1362514
  * KVM: PPC: Book3S HV: Enable for little endian hosts
    - LP: #1362514
  * staging/lustre: disable virtual block device for 64K pages
  * drm/i915: read HEAD register back in init_ring_common() to enforce
    ordering
    - LP: #1355196
 -- Tim Gardner <email address hidden> Tue, 02 Sep 2014 19:07:50 -0400

Changed in linux (Ubuntu Utopic):
status: Fix Committed → Fix Released
Cédric Le Goater (clg) wrote :

I forgot to add that we also need the config options :

CONFIG_KVM_BOOK3S_64=m
CONFIG_KVM_BOOK3S_64_HV=m
CONFIG_KVM_BOOK3S_64_PR=m
CONFIG_KVM_XICS=y

Sorry about that.

Thanks

Tim Gardner (timg-tpi) wrote :

UBUNTU: [Config] CONFIG_KVM_BOOK3S_64=m for ppc64el
UBUNTU: [Config] CONFIG_KVM_BOOK3S_64_HV=m

Changed in linux (Ubuntu Utopic):
status: Fix Released → Fix Committed
Tim Gardner (timg-tpi) wrote :

Enabling these config options causes the following compile error:

ubuntu-utopic/arch/powerpc/kvm/book3s_hv_rmhandlers.S: Assembler messages:
ubuntu-utopic/arch/powerpc/kvm/book3s_hv_rmhandlers.S:1923: Error: operand out of range (0x0000000000008498 is not between 0xffffffffffff8000 and 0x0000000000007ffc)

I've checked that line and assume it is complaining about the value of KVM_ENABLED_HCALLS, e.g., 0x8498==33944

ubuntu-utopic/debian/build/build-generic/include/generated/asm-offsets.h:#define KVM_ENABLED_HCALLS 33944 /* offsetof(struct kvm, arch.enabled_hcalls) # */

I guess I'll not apply those configs until you figure out the compile error.

Changed in linux (Ubuntu Utopic):
status: Fix Committed → In Progress
Cédric Le Goater (clg) wrote :

This patch fixes the compile breakage :

1287cb3fa85c KVM: PPC: Book3S: Move vcore definition to end of kvm_arch

You might want to also add this one :

c77dcacb3975 KVM: Move more code under CONFIG_HAVE_KVM_IRQFD

With these two extra patches, utopic kernel 3.16.0-13.19 compiles, boots
and virtualizes KVM HV guests (LE and BE) as expected. I did not try PR
guests.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linux - 3.16.0-14.20

---------------
linux (3.16.0-14.20) utopic; urgency=low

  [ Tim Gardner ]

  * Release Tracking Bug
    - LP: #1366431

  [ dann frazier ]

  * [Config] CONFIG_HW_RANDOM_XGENE=m on arm64

  [ Manish Chopra ]

  * SAUCE: bnx2x: Configure device endianity on driver load and reset
    endianity on removal.
    - LP: #1356948

  [ Tim Gardner ]

  * [Config] CONFIG_XMON=y
    - LP: #1365655
  * [Config] CONFIG_KVM_BOOK3S_64=m for ppc64el
    - LP: #1362514
  * [Config] CONFIG_KVM_BOOK3S_64_HV=m
    - LP: #1362514

  [ Upstream Kernel Changes ]

  * hwrng: xgene - add support for APM X-Gene SoC RNG support
    - LP: #1365593
  * Documentation: rng: Add X-Gene SoC RNG driver documentation
    - LP: #1365593
  * arm64: dts: add random number generator dts node to APM X-Gene
    platform.
  * KVM: PPC: Book3S: Move vcore definition to end of kvm_arch struct
    - LP: #1362514
  * KVM: Move more code under CONFIG_HAVE_KVM_IRQFD
    - LP: #1362514

  [ Upstream Kernel Changes ]

  * rebase to v3.16.2
    - LP: #1358116
    - LP: #1334950
    - LP: #1350148
 -- Tim Gardner <email address hidden> Sat, 06 Sep 2014 07:52:15 -0700

Changed in linux (Ubuntu Utopic):
status: In Progress → Fix Released
Cédric Le Goater (clg) wrote :

All looks good. We might need a new qemu-slof though.

Thanks,

Breno Leitão (breno-leitao) wrote :

Cédric, what is the LP# for the qemu-slof update?

Thanks for this nice achievement.

C?dric, what is the LP# for the qemu-slof update?

Cédric Le Goater (clg) wrote :

the latest slof should reach Utopic soon :

https://launchpad.net/ubuntu/+source/slof/20140630+dfsg-1ubuntu1

bugproxy (bugproxy) wrote :

C?dric, what is the LP# for the qemu-slof update?

bugproxy (bugproxy) wrote :

C?dric, what is the LP# for the qemu-slof update?

------- Comment From <email address hidden> 2014-10-14 14:19 EDT-------
There is a Launchpad bug asking for slof update #1374568

bugproxy (bugproxy) wrote :

C?dric, what is the LP# for the qemu-slof update?

bugproxy (bugproxy) wrote :

C?dric, what is the LP# for the qemu-slof update?
C?dric, what is the LP# for the qemu-slof update?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers