Page MenuHomeFreeBSD

Remove Xen PV domU support for i386.
ClosedPublic

Authored by jhb on Apr 24 2015, 5:23 PM.
Tags
None
Referenced Files
F102818327: D2362.id4986.diff
Sun, Nov 17, 2:20 PM
Unknown Object (File)
Fri, Nov 15, 6:59 PM
Unknown Object (File)
Fri, Nov 15, 6:58 PM
Unknown Object (File)
Thu, Nov 14, 6:10 PM
Unknown Object (File)
Thu, Nov 14, 4:56 PM
Unknown Object (File)
Thu, Nov 14, 4:38 PM
Unknown Object (File)
Thu, Nov 14, 3:41 PM
Unknown Object (File)
Thu, Nov 14, 10:13 AM
Subscribers

Details

Summary

Remove support for Xen PV domU kernels. Support for HVM domU kernels remains. Xen is planning to remove support for PV upstream since it is harder to maintain and has more overhead. Modern x86 CPUs include virtualization extensions that support HVM guests instead of PV guests. In addition, the PV code was i386 only and not as well maintained recently as the HVM code.

Test Plan
  • universe builds (done)
  • run-time testing of HVM kernels (I don't have a Xen host setup, so would appreciate it if someone else could just boot a GENERIC kernel with this patch applied and verify it still works ok)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jhb retitled this revision from to Remove older, non-hvm Xen support for i386..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added reviewers: kib, royger.
jhb edited edge metadata.

First sweep through sys/i386.

Remove assembly macro helpers.

Pass through kern and remove PT_UPDATES_FLUSH.

First pass through sys/x86.

One general note is that I haven't gone through and audited for XENHVM. Meaning, should we remove !XENHVM code in places like sys/dev/xen, or in the sys/{amd64,i386}/include/xen headers? I think we can also probably wholesale remove at least <machine/xen/xenpmap.h>. For now I'm going to do a universe build and see what breaks.

sys/i386/include/xen/xenvar.h
34 ↗(On Diff #4987)

The amd64 version of this file exposes a bit of this stuff that was only under XEN on i386.

A few more "native" stragglers to fix tinderbox.

Ok, I think this is ready for the first round of reviews at least. Are there things I am missing or things I should put back?

At least xen(4) also needs updating. Not sure if there are any other manpages to update?

First cut at updating the xen(4) manpage.

Purge !XENHVM bits from amd64 and i386.

wblock added inline comments.
share/man/man4/xen.4
31 ↗(On Diff #5032)

The document date should be updated when non-trivial changes are made.

71 ↗(On Diff #5032)

s/The follow/These/

Trim non-HVM bits from PV drivers.

Do the !XENHVM pass over sys/x86.

Purge phys_to_machine_mapping_valid().

Purge set_phys_to_machine().

Axe PFNTOMFN() and MFNTOPFN().

Remove duplicate features.h, unused xenstored.h.

Remove 'xen' from sys/conf/files.

Can the pvcpu driver be removed? It claims to only be needed for PV, but was compiled in when xenhvm was enabled as well.

Actually, should I remove anything that depend on xen_pv_domain() returning true? (E.g. the shutdown hook in the console driver)

In D2362#43480, @jhb wrote:

Can the pvcpu driver be removed? It claims to only be needed for PV, but was compiled in when xenhvm was enabled as well.

No, the pvcpu driver is needed for PVH support which is the mode that we use to run as Dom0.

In D2362#43481, @jhb wrote:

Actually, should I remove anything that depend on xen_pv_domain() returning true? (E.g. the shutdown hook in the console driver)

No, we still use xen_pv_domain() together with XENHVM code in order to run as PVH.

Ok, then I think this is ready for review. Can you double check that none of my changes (esp. in sys/dev/xen or sys/x86/xen) will break PVH? Also, can you review my changes to xen(4)? If my updates regarding HVM on i386 are correct then I may do those first as a separate commit.

jhb edited edge metadata.

Manpage fix from Warren.

jhb marked an inline comment as done.Apr 28 2015, 1:15 PM
jhb added inline comments.
share/man/man4/xen.4
31 ↗(On Diff #5032)

I will. I'm never optimistic enough to expect one day turnarounds on changes, so I wait until it's ok'd and then I bump it before committing.

jhb retitled this revision from Remove older, non-hvm Xen support for i386. to Remove Xen PV domU support for i386..Apr 28 2015, 1:21 PM
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)

Roger, I just updated the summary to be a candidate commit message. Please feel free to review that to ensure that it is accurate, in particular in regards to what Xen's plans are for PV going forward (I believe what I've written matches what you told me in person at BSDCan last year, but I'd like to make certain).

royger edited edge metadata.
In D2362#43648, @jhb wrote:

Roger, I just updated the summary to be a candidate commit message. Please feel free to review that to ensure that it is accurate, in particular in regards to what Xen's plans are for PV going forward (I believe what I've written matches what you told me in person at BSDCan last year, but I'd like to make certain).

I would change s/remove/phase out/ in the commit message. The Hypervisor itself is probably going to still support PV for quite some time, although the recommendation is to use PVH.

The rest looks fine to me, I've tested both a amd64/i386 guest and a PVH Dom0 and so far no problems :).

This revision is now accepted and ready to land.Apr 30 2015, 10:14 AM
This revision was automatically updated to reflect the committed changes.