Re: [PATCH v5 04/11] target/i386/kvm: Only save/load kvmclock MSRs when kvmclock enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 24, 2024 at 04:31:28PM +0100, Paolo Bonzini wrote:
> Date: Tue, 24 Dec 2024 16:31:28 +0100
> From: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> Subject: Re: [PATCH v5 04/11] target/i386/kvm: Only save/load kvmclock MSRs
>  when kvmclock enabled
> 
> On 11/6/24 04:07, Zhao Liu wrote:
> > MSR_KVM_SYSTEM_TIME and MSR_KVM_WALL_CLOCK are attached with the (old)
> > kvmclock feature (KVM_FEATURE_CLOCKSOURCE).
> > 
> > So, just save/load them only when kvmclock (KVM_FEATURE_CLOCKSOURCE) is
> > enabled.
> > 
> > Signed-off-by: Zhao Liu <zhao1.liu@xxxxxxxxx>
> > 
> 
> The MSRs contains the same values as the "new" pair; QEMU only has to
> save/restore one of them but the code should be active for both feature bits
> and thus use
> 
> +        if (env->env.features[FEAT_KVM] & (CPUID_KVM_CLOCK |
> +                                           CPUID_KVM_CLOCK2)) {
> 

This is the correct way, thanks.

Regards,
Zhao






[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux