Re: [RFC PATCH v3 05/19] target/arm/kvm: enable writable implementation ID registers
Khushit Shah <[email protected]>
| Newsgroups | gmane.comp.emulators.qemu |
|---|---|
| Message-ID | <[email protected]> |
> On 21 Jul 2026, at 8:33 PM, Eric Auger <[email protected]> wrote: > > !-------------------------------------------------------------------| > CAUTION: External Email > > |-------------------------------------------------------------------! > > Hi Khushit, > > On 7/16/26 11:38 PM, Khushit Shah wrote: >> Enable KVM_CAP_ARM_WRITABLE_IMP_ID_REGS if the host kernel supports it. >> This allows QEMU to write implementation-defined ID registers (MIDR, >> REVIDR) so that named CPU models can present the correct values to the >> guest instead of inheriting the host's identity. > This is a subset of > [RFC PATCH RESEND 0/4] hw/arm/virt: Add support for Target > Implementation CPUs > https://urldefense.proofpoint.com/v2/url?u=https-3A__lore.kernel.org_all_20250801074730.28329-2D1-2Dshameerkolothum-40gmail.com_&d=DwIDaQ&c=s883GpUCOChKOHiocYtGcg&r=PGWMyignA0NiDmTlyP7vOTHozBws_VN86yrVmSMkBp0&m=pBBhKggpCKeDS4Sd7cXd8E5Cqhh-WjEbkh5Q-cSe_INp0NjOj69sFVBbwOAg7Pp1&s=Q-vKi5MLWdCzdKdXMUZ3wONnjAI6zV0Riawwl4UuVyo&e= > > and especially 1/4 Okay, interesting! I will look into the series. Warm Regards, Khushit. > > > Thanks > > Eric >> >> Signed-off-by: Khushit Shah <[email protected]> >> --- >> target/arm/kvm.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/target/arm/kvm.c b/target/arm/kvm.c >> index 76583db3f0..63b3727e05 100644 >> --- a/target/arm/kvm.c >> +++ b/target/arm/kvm.c >> @@ -741,6 +741,13 @@ int kvm_arch_init(MachineState *ms, KVMState *s) >> } >> } >> >> + if (kvm_check_extension(s, KVM_CAP_ARM_WRITABLE_IMP_ID_REGS)) { >> + if (kvm_vm_enable_cap(s, KVM_CAP_ARM_WRITABLE_IMP_ID_REGS, 0)) { >> + error_report("Failed to enable " >> + "KVM_CAP_ARM_WRITABLE_IMP_ID_REGS cap"); >> + } >> + } >> + >> if (s->kvm_eager_split_size) { >> uint32_t sizes; >> >