mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Arnd Bergmann <arnd@arndb.de>, Arnd Bergmann <arnd@kernel.org>,
	kvm@vger.kernel.org
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Huacai Chen <chenhuacai@kernel.org>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Nicholas Piggin <npiggin@gmail.com>,
	Naveen N Rao <naveen@kernel.org>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	Alexander Graf <graf@amazon.com>,
	Crystal Wood <crwood@redhat.com>,
	Anup Patel <anup@brainfault.org>,
	Atish Patra <atishp@atishpatra.org>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Sean Christopherson <seanjc@google.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Paul Durrant <paul@xen.org>, Marc Zyngier <maz@kernel.org>,
	linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org,
	linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org,
	linux-riscv@lists.infradead.org
Subject: Re: [RFC 2/5] powerpc: kvm: drop 32-bit booke
Date: Fri, 13 Dec 2024 07:25:01 +0100	[thread overview]
Message-ID: <1f1beb34-65cc-4038-a8b2-de8af3e0703e@csgroup.eu> (raw)
In-Reply-To: <1633f30e-d885-4f31-a14d-11881e16deb9@app.fastmail.com>



Le 12/12/2024 à 22:08, Arnd Bergmann a écrit :
> On Thu, Dec 12, 2024, at 19:35, Christophe Leroy wrote:
>> Le 12/12/2024 à 13:55, Arnd Bergmann a écrit :
>>> From: Arnd Bergmann <arnd@arndb.de>
> 
>>>
>>> Support for 64-bit hosts remains unchanged, for both 32-bit and
>>> 64-bit guests.
>>>
> 
>>>    arch/powerpc/include/asm/kvm_book3s_32.h    |  36 --
>>>    arch/powerpc/include/asm/kvm_booke.h        |   4 -
>>>    arch/powerpc/include/asm/kvm_booke_hv_asm.h |   2 -
>>>    arch/powerpc/kvm/Kconfig                    |  22 +-
>>>    arch/powerpc/kvm/Makefile                   |  15 -
>>>    arch/powerpc/kvm/book3s_32_mmu_host.c       | 396 --------------
>>>    arch/powerpc/kvm/booke.c                    | 268 ----------
>>>    arch/powerpc/kvm/booke.h                    |   8 -
>>>    arch/powerpc/kvm/booke_emulate.c            |  44 --
>>>    arch/powerpc/kvm/booke_interrupts.S         | 535 -------------------
>>>    arch/powerpc/kvm/bookehv_interrupts.S       | 102 ----
>>>    arch/powerpc/kvm/e500.c                     | 553 --------------------
>>>    arch/powerpc/kvm/e500.h                     |  40 --
>>>    arch/powerpc/kvm/e500_emulate.c             | 100 ----
>>>    arch/powerpc/kvm/e500_mmu_host.c            |  54 --
>>>    arch/powerpc/kvm/e500mc.c                   |   5 +-
>>>    arch/powerpc/kvm/trace_booke.h              |  14 -
>>>    17 files changed, 4 insertions(+), 2194 deletions(-)
>>>    delete mode 100644 arch/powerpc/include/asm/kvm_book3s_32.h
>>>    delete mode 100644 arch/powerpc/kvm/book3s_32_mmu_host.c
>>>    delete mode 100644 arch/powerpc/kvm/booke_interrupts.S
>>>    delete mode 100644 arch/powerpc/kvm/e500.c
>>
>> Left over ?
>>
>> arch/powerpc/kernel/head_booke.h:#include <asm/kvm_asm.h>
>> arch/powerpc/kernel/head_booke.h:#include <asm/kvm_booke_hv_asm.h>
>> arch/powerpc/kernel/head_booke.h:       b
>> kvmppc_handler_\intno\()_\srr1
> 
> As far as I can tell, these are still needed for e5500/e6500,
> but you know more about the platform than I do.

$ git grep kvmppc_handler_ arch/powerpc/
arch/powerpc/kvm/bookehv_interrupts.S: 
_GLOBAL(kvmppc_handler_\intno\()_\srr1)

In your patch you remove the include of head_booke.h from there:

diff --git a/arch/powerpc/kvm/bookehv_interrupts.S 
b/arch/powerpc/kvm/bookehv_interrupts.S
index 8b4a402217ba..c75350fc449e 100644
--- a/arch/powerpc/kvm/bookehv_interrupts.S
+++ b/arch/powerpc/kvm/bookehv_interrupts.S
@@ -18,13 +18,9 @@
  #include <asm/asm-offsets.h>
  #include <asm/bitsperlong.h>

-#ifdef CONFIG_64BIT
  #include <asm/exception-64e.h>
  #include <asm/hw_irq.h>
  #include <asm/irqflags.h>
-#else
-#include "../kernel/head_booke.h" /* for THREAD_NORMSAVE() */
-#endif

  #define LONGBYTES		(BITS_PER_LONG / 8)

$ git grep head_booke.h
arch/powerpc/kernel/asm-offsets.c:#include "head_booke.h"
arch/powerpc/kernel/head_44x.S:#include "head_booke.h"
arch/powerpc/kernel/head_85xx.S:#include "head_booke.h"

$ git grep head_85xx.o
arch/powerpc/kernel/Makefile:obj-$(CONFIG_PPC_85xx)             += 
head_85xx.o

CONFIG_PPC_85xx depends on CONFIG_PPC32.

CONFIG_E5500_CPU and CONFIG_E6500_CPU both depend on CONFIG_PPC64.

So yes it is used on e5500/e6500 but only when they run a 32 bits kernel 
built with CONFIG_PPC_85xx. Isn't it what you want to get rid of with 
this patch ?

Am I missing something ?

Christophe

  reply	other threads:[~2024-12-13  6:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 12:55 [RFC 0/5] KVM: drop 32-bit host support on all architectures Arnd Bergmann
2024-12-12 12:55 ` [RFC 1/5] mips: kvm: drop support for 32-bit hosts Arnd Bergmann
2024-12-12 13:20   ` Andreas Schwab
2024-12-13  9:23     ` Arnd Bergmann
2024-12-12 12:55 ` [RFC 2/5] powerpc: kvm: drop 32-bit booke Arnd Bergmann
2024-12-12 18:35   ` Christophe Leroy
2024-12-12 21:08     ` Arnd Bergmann
2024-12-13  6:25       ` Christophe Leroy [this message]
2024-12-13 10:20         ` Arnd Bergmann
2024-12-12 12:55 ` [RFC 3/5] powerpc: kvm: drop 32-bit book3s Arnd Bergmann
2024-12-12 18:34   ` Christophe Leroy
2024-12-13 10:04     ` Arnd Bergmann
2024-12-13 10:27       ` Christophe Leroy
2024-12-13 10:39         ` Arnd Bergmann
2024-12-13  8:02   ` Christophe Leroy
2024-12-12 12:55 ` [RFC 4/5] riscv: kvm: drop 32-bit host support Arnd Bergmann
2024-12-12 12:55 ` [RFC 5/5] x86: kvm " Arnd Bergmann
2024-12-12 16:27   ` Paolo Bonzini
2024-12-13  9:22     ` Arnd Bergmann
2024-12-13  3:51 ` [RFC 0/5] KVM: drop 32-bit host support on all architectures A. Wilcox
2024-12-13  8:03   ` Arnd Bergmann
2024-12-13  8:20     ` Paolo Bonzini
2024-12-13  8:42       ` A. Wilcox
2024-12-13  9:01         ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1f1beb34-65cc-4038-a8b2-de8af3e0703e@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=anup@brainfault.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=atishp@atishpatra.org \
    --cc=bp@alien8.de \
    --cc=chenhuacai@kernel.org \
    --cc=crwood@redhat.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=graf@amazon.com \
    --cc=hpa@zytor.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=kvm-riscv@lists.infradead.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    --cc=maz@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mpe@ellerman.id.au \
    --cc=naveen@kernel.org \
    --cc=npiggin@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=paul@xen.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=tsbogend@alpha.franken.de \
    --cc=vkuznets@redhat.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®