All of lore.kernel.org
 help / color / mirror / Atom feed
* target/arm: "define_arm_cp_regs" and similar for KVM
@ 2021-02-26 17:27 Claudio Fontana
  2021-03-02 12:02 ` Peter Maydell
  0 siblings, 1 reply; 3+ messages in thread
From: Claudio Fontana @ 2021-02-26 17:27 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel

Hi Peter,

I am trying to find out how to split properly KVM and TCG in target/arm, among other things.

I skipped or stubbed all define_arm_cp_regs and similar functions,

and made a cpregs module that is TCG-only.

Thought it is fine, as we have a kvm_arm_init_cpreg_list that throws away everything TCG-related anyway later:

target/arm/kvm.c:

/* Initialize the ARMCPU cpreg list according to the kernel's                                                                               
 * definition of what CPU registers it knows about (and throw away                                                                          
 * the previous TCG-created cpreg list).                                                                                                    
 */
int kvm_arm_init_cpreg_list(ARMCPU *cpu)

Can you confirm that it is ok to do so?

But I found something peculiar in hw/intc/arm_gicv3_kvm.c:

here we have explictly for a "kvm" module a reginfo definition, and a call to

define_arm_cp_regs(cpu, gicv3_cpuif_reginfo);

/*                                                                                                                                          
 * CPU interface registers of GIC needs to be reset on CPU reset.                                                                           
 * For the calling arm_gicv3_icc_reset() on CPU reset, we register                                                                          
 * below ARMCPRegInfo. As we reset the whole cpu interface under single                                                                     
 * register reset, we define only one register of CPU interface instead                                                                     
 * of defining all the registers.                                                                                                           
 */
static const ARMCPRegInfo gicv3_cpuif_reginfo[] = {



Is this actually an exception, and possibly the only use of define_arm_cp_regs that would be required on KVM too?

Am I under some wrong assumption?

Thank you for any help in clarifying this..

commit 07a5628cb89f13b98fe526117fd07e5e273b5a52
Author: Vijaya Kumar K <Vijaya.Kumar@cavium.com>
Date:   Thu Feb 23 17:21:13 2017 +0530

Thanks,

Claudio


-- 
Claudio Fontana
Engineering Manager Virtualization, SUSE Labs Core

SUSE Software Solutions Italy Srl


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-02 12:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 17:27 target/arm: "define_arm_cp_regs" and similar for KVM Claudio Fontana
2021-03-02 12:02 ` Peter Maydell
2021-03-02 12:04   ` Claudio Fontana

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.