Skip to contentSkip to conversation

Removing support for 32bit KVM/arm host

RFC PATCH Daniel Golle 3 participants 4 messages Feb 18, 2020 – Feb 20, 2020 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 10 lines

Message-ID: <[email protected]>

KVM/arm was merged just over 7 years ago, and has lived a very quiet life so far. It mostly works if you're prepared to deal with its limitations, it has been a good prototype for the arm64 version, but it suffers a few problems:

- It is incomplete (no debug support, no PMU)
- It hasn't followed any of the architectural evolutions
- It has zero users (I don't count myself here)

Not true. At least I'm using KVM on CortexA7 (sun7i aka. Allwinner A20) and it has been quite useful until now (running low memory footprint OpenWrt-based guests on yocto/OpenEmbedded host)

Quoted 1 line

- It is more and more getting in the way of new arm64 developments

Can you elaborate more on how it is getting in the way? Just in terms of effort to maintain the necessary abstractions or does something really block ARM64 KVM support?

Quoted 6 lines

So here it is: unless someone screams and shows that they rely on KVM/arm to be maintained upsteam, I'll remove 32bit host support form the tree. One of the reasons that makes me confident nobody is using it is that I never receive *any* bug report. Yes, it is perfect. But if you depend on KVM/arm being available in mainline, please shout.

I cetainly don't depend on it, meaning I'd have to replace hardware worth less than $100 in the near future, that's not too bad. And yes, it has just been working perfectly ;)

Cheers

Daniel

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#2 lore raw

On Tue, 18 Feb 2020 22:37:12 +0100
Daniel Golle <[email protected]> wrote:

Daniel,

Please keep people on cc, it helps with the discussion.

Quoted 7 lines
Quoted 7 lines

Message-ID: <[email protected]>

KVM/arm was merged just over 7 years ago, and has lived a very quiet life so far. It mostly works if you're prepared to deal with its limitations, it has been a good prototype for the arm64 version, but it suffers a few problems:

Quoted 7 lines
Quoted 3 lines

- It is incomplete (no debug support, no PMU)
- It hasn't followed any of the architectural evolutions
- It has zero users (I don't count myself here)

Not true. At least I'm using KVM on CortexA7 (sun7i aka. Allwinner A20) and it has been quite useful until now (running low memory footprint OpenWrt-based guests on yocto/OpenEmbedded host)

OK, so we have a user!

Quoted 5 lines
Quoted 1 line

- It is more and more getting in the way of new arm64 developments

Can you elaborate more on how it is getting in the way? Just in terms of effort to maintain the necessary abstractions or does something really block ARM64 KVM support?

Useless abstractions are indeed one of the problems. Essentially, KVM/arm has become a pile of empty stubs that are added to make the thing compile. This doesn't bode well for the future.

The other aspect is that new features appearing on arm64 (nested virt, enclaves, and potentially some more) are tearing the code-base apart, and doing so while keeping 32bit alive and kicking would be a challenge. I'm not saying it is impossible, just that it is hard, and for very little gain, specially given that *nobody* contributes to the port.

Quoted 9 lines
Quoted 5 lines

So here it is: unless someone screams and shows that they rely on KVM/arm to be maintained upsteam, I'll remove 32bit host support form the tree. One of the reasons that makes me confident nobody is using it is that I never receive *any* bug report. Yes, it is perfect. But if you depend on KVM/arm being available in mainline, please shout.

I cetainly don't depend on it, meaning I'd have to replace hardware worth less than $100 in the near future, that's not too bad. And yes, it has just been working perfectly ;)

I'm really glad it works well. Note that it isn't like we are taking it away from you. 5.6 will still have it, and I will still maintain it as part of the stable tree. It is just that I've come to the sad conclusion that as a community, we need to move on.

	M.

PS: and if you find a decent, reliable machine to replace your A20, please let me know. All the arm64 SBCs I've seen are utter crap compared to my Cubietruck...

Signature · 6 lines
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#3 lore raw

Hi Marc,

Quoted 18 lines · Marc Zyngier

On Tue, 18 Feb 2020 22:37:12 +0100
Daniel Golle <[email protected]> wrote:

Daniel,

Please keep people on cc, it helps with the discussion.

Quoted 11 lines
Quoted 10 lines

Message-ID: <[email protected]>

KVM/arm was merged just over 7 years ago, and has lived a very quiet life so far. It mostly works if you're prepared to deal with its limitations, it has been a good prototype for the arm64 version, but it suffers a few problems:

- It is incomplete (no debug support, no PMU)
- It hasn't followed any of the architectural evolutions
- It has zero users (I don't count myself here)

Quoted 5 lines
Quoted 3 lines

Not true. At least I'm using KVM on CortexA7 (sun7i aka. Allwinner A20) and it has been quite useful until now (running low memory footprint OpenWrt-based guests on yocto/OpenEmbedded host)

OK, so we have a user!

We have also started using it recently (as described by Marek in
https://lore.kernel.org/linux-arm-kernel/[email protected]/#t
).

Quoted 10 lines
Quoted 5 lines
Quoted 1 line

- It is more and more getting in the way of new arm64 developments

Can you elaborate more on how it is getting in the way? Just in terms of effort to maintain the necessary abstractions or does something really block ARM64 KVM support?

Useless abstractions are indeed one of the problems. Essentially, KVM/arm has become a pile of empty stubs that are added to make the thing compile. This doesn't bode well for the future.

Quoted 6 lines

The other aspect is that new features appearing on arm64 (nested virt, enclaves, and potentially some more) are tearing the code-base apart, and doing so while keeping 32bit alive and kicking would be a challenge. I'm not saying it is impossible, just that it is hard, and for very little gain, specially given that *nobody* contributes to the port.

I have very basic knowledge of virt/kvm/arm/ codebase (so my question may be quite stupid) but wouldn't it be possible to split the codebase into legacy virt/kvm/arm32/ and virt/kvm/arm64/ parts (this would cause some code duplication but at the same time would stop 32bit port from blocking new developments for 64bit one)?

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

Quoted 15 lines
Quoted 9 lines
Quoted 5 lines

So here it is: unless someone screams and shows that they rely on KVM/arm to be maintained upsteam, I'll remove 32bit host support form the tree. One of the reasons that makes me confident nobody is using it is that I never receive *any* bug report. Yes, it is perfect. But if you depend on KVM/arm being available in mainline, please shout.

I cetainly don't depend on it, meaning I'd have to replace hardware worth less than $100 in the near future, that's not too bad. And yes, it has just been working perfectly ;)

I'm really glad it works well. Note that it isn't like we are taking it away from you. 5.6 will still have it, and I will still maintain it as part of the stable tree. It is just that I've come to the sad conclusion that as a community, we need to move on.

Quoted 5 lines
	M.

PS: and if you find a decent, reliable machine to replace your A20, please let me know. All the arm64 SBCs I've seen are utter crap compared to my Cubietruck...

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#4 lore raw
Quoted 25 lines · Bartlomiej Zolnierkiewicz

Hi Marc,

Quoted 22 lines · Marc Zyngier

On Tue, 18 Feb 2020 22:37:12 +0100
Daniel Golle <[email protected]> wrote:

Daniel,

Please keep people on cc, it helps with the discussion.

Quoted 14 lines
Quoted 10 lines

Message-ID: <[email protected]>

KVM/arm was merged just over 7 years ago, and has lived a very quiet life so far. It mostly works if you're prepared to deal with its limitations, it has been a good prototype for the arm64 version, but it suffers a few problems:

- It is incomplete (no debug support, no PMU)
- It hasn't followed any of the architectural evolutions
- It has zero users (I don't count myself here)

Not true. At least I'm using KVM on CortexA7 (sun7i aka. Allwinner A20) and it has been quite useful until now (running low memory footprint OpenWrt-based guests on yocto/OpenEmbedded host)

Quoted 5 lines
Quoted 1 line

OK, so we have a user!

We have also started using it recently (as described by Marek in
https://lore.kernel.org/linux-arm-kernel/[email protected]/#t
).

As I said in reply to Marek, that's not much of an explanation on *how* you're using it, and how dependent you are on the feature being available. "We use it internally" means nothing to me.

Quoted 17 lines
Quoted 10 lines
Quoted 5 lines
Quoted 1 line

- It is more and more getting in the way of new arm64 developments

Can you elaborate more on how it is getting in the way? Just in terms of effort to maintain the necessary abstractions or does something really block ARM64 KVM support?

Useless abstractions are indeed one of the problems. Essentially, KVM/arm has become a pile of empty stubs that are added to make the thing compile. This doesn't bode well for the future.

Quoted 6 lines

The other aspect is that new features appearing on arm64 (nested virt, enclaves, and potentially some more) are tearing the code-base apart, and doing so while keeping 32bit alive and kicking would be a challenge. I'm not saying it is impossible, just that it is hard, and for very little gain, specially given that *nobody* contributes to the port.

Quoted 5 lines

I have very basic knowledge of virt/kvm/arm/ codebase (so my question may be quite stupid) but wouldn't it be possible to split the codebase into legacy virt/kvm/arm32/ and virt/kvm/arm64/ parts (this would cause some code duplication but at the same time would stop 32bit port from blocking new developments for 64bit one)?

Sigh... "some code duplication" is a wee bit of an understatement:

$ find virt/kvm/arm -name '*.[ch]'| xargs wc -l
  2449 virt/kvm/arm/mmu.c
   378 virt/kvm/arm/trace.h
   988 virt/kvm/arm/vgic/vgic-mmio.c
   543 virt/kvm/arm/vgic/vgic-init.c
  2776 virt/kvm/arm/vgic/vgic-its.c
   546 virt/kvm/arm/vgic/vgic-mmio-v2.c
   321 virt/kvm/arm/vgic/vgic.h
   141 virt/kvm/arm/vgic/vgic-irqfd.c
    38 virt/kvm/arm/vgic/trace.h
   693 virt/kvm/arm/vgic/vgic-v3.c
  1011 virt/kvm/arm/vgic/vgic.c
   741 virt/kvm/arm/vgic/vgic-kvm-device.c
  1047 virt/kvm/arm/vgic/vgic-mmio-v3.c
   451 virt/kvm/arm/vgic/vgic-v4.c
   300 virt/kvm/arm/vgic/vgic-debug.c
   208 virt/kvm/arm/vgic/vgic-mmio.h
   504 virt/kvm/arm/vgic/vgic-v2.c
   200 virt/kvm/arm/mmio.c
   869 virt/kvm/arm/pmu.c
   525 virt/kvm/arm/psci.c
    71 virt/kvm/arm/hypercalls.c
  1180 virt/kvm/arm/arch_timer.c
   131 virt/kvm/arm/pvtime.c
  1723 virt/kvm/arm/arm.c
   204 virt/kvm/arm/aarch32.c
    57 virt/kvm/arm/perf.c
  1130 virt/kvm/arm/hyp/vgic-v3-sr.c
    49 virt/kvm/arm/hyp/timer-sr.c
   136 virt/kvm/arm/hyp/aarch32.c
 19410 total

The most complicated parts (the MMU code, the GIC support, the timers) will all go through drastic changes in the coming months (just go through the NV series, for example). Do I want to duplicate this and maintain it as a separate port? The answer is obviously *NO WAY*.

If someone volunteers and wants to do that, that's their call. But somehow I doubt you'll find anyone willing to do this.

The alternative is to mark KVM/arm as orphaned, let it bit-rot, and then remove it, ia64 style. The benefit? None whatsoever. I'd rather remove it while it is in a good state and maintained in all stable kernels.

        M.
Signature · 6 lines
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel