public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [GIT PULL] KVM: x86: Changes for 6.15
Date: Wed, 19 Mar 2025 12:42:50 -0700	[thread overview]
Message-ID: <Z9seOpLCVfAqHife@google.com> (raw)
In-Reply-To: <CABgObfbMDAtaLvaLrDA7ptU+9kjej_LVArp3dCNao8+qtiEDww@mail.gmail.com>

On Wed, Mar 19, 2025, Paolo Bonzini wrote:
> On Tue, Mar 18, 2025 at 7:03 PM Sean Christopherson <seanjc@google.com> wrote:
> > There are two conflicts between the PV clock pull request and the Xen
> > pull request.
> >
> > 1. The Xen branch moves Xen TSC leaf updates to CPUID emulation, and the PV
> >    clock branch renames the fields in kvm_vcpu_arch that are used to update
> >    the Xen leafs.  After the dust settles, kvm_cpuid() should look like:
> >
> >                 } else if (IS_ENABLED(CONFIG_KVM_XEN) &&
> >                            kvm_xen_is_tsc_leaf(vcpu, function)) {
> >                         /*
> >                          * Update guest TSC frequency information if necessary.
> >                          * Ignore failures, there is no sane value that can be
> >                          * provided if KVM can't get the TSC frequency.
> >                          */
> >                         if (kvm_check_request(KVM_REQ_CLOCK_UPDATE, vcpu))
> >                                 kvm_guest_time_update(vcpu);
> >
> >                         if (index == 1) {
> >                                 *ecx = vcpu->arch.pvclock_tsc_mul;
> >                                 *edx = vcpu->arch.pvclock_tsc_shift;
> >                         } else if (index == 2) {
> >                                 *eax = vcpu->arch.hw_tsc_khz;
> >                         }
> >                 }
> >
> > 2. The Xen branch moves and renames xen_hvm_config so that its xen.hvm_config,
> >    while PV clock branch shuffles use of xen_hvm_config/xen.hvm_config flags.
> >    The resulting code in kvm_guest_time_update() should look like:
> >
> > #ifdef CONFIG_KVM_XEN
> >         /*
> >          * For Xen guests we may need to override PVCLOCK_TSC_STABLE_BIT as unless
> >          * explicitly told to use TSC as its clocksource Xen will not set this bit.
> >          * This default behaviour led to bugs in some guest kernels which cause
> >          * problems if they observe PVCLOCK_TSC_STABLE_BIT in the pvclock flags.
> >          *
> >          * Note!  Clear TSC_STABLE only for Xen clocks, i.e. the order matters!
> >          */
> >         if (ka->xen.hvm_config.flags & KVM_XEN_HVM_CONFIG_PVCLOCK_TSC_UNSTABLE)
> >                 hv_clock.flags &= ~PVCLOCK_TSC_STABLE_BIT;
> >
> >         if (vcpu->xen.vcpu_info_cache.active)
> >                 kvm_setup_guest_pvclock(&hv_clock, v, &vcpu->xen.vcpu_info_cache,
> >                                         offsetof(struct compat_vcpu_info, time));
> >         if (vcpu->xen.vcpu_time_info_cache.active)
> >                 kvm_setup_guest_pvclock(&hv_clock, v, &vcpu->xen.vcpu_time_info_cache, 0);
> > #endif
> 
> Thanks, pulled everything to kvm/queue. I assume you want me to put
> the following on top:
> 
> * KVM: Drop kvm_arch_sync_events() now that all implementations are nops
> * KVM: x86: Fold guts of kvm_arch_sync_events() into kvm_arch_pre_destroy_vm()
> * KVM: x86: Unload MMUs during vCPU destruction, not before
> * KVM: Assert that a destroyed/freed vCPU is no longer visible
> * KVM: x86: Don't load/put vCPU when unloading its MMU during teardown

Sure, or wait until 6.16.  The urgent changes in that series already got into
6.14.  AFAIK there's no need to get the rest into 6.15 (not sure if waiting would
make TDX enabling more annoying).

      reply	other threads:[~2025-03-19 19:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 18:02 [GIT PULL] KVM: x86: Changes for 6.15 Sean Christopherson
2025-03-18 18:02 ` [GIT PULL] KVM: x86: Misc changes " Sean Christopherson
2025-03-18 18:02 ` [GIT PULL] KVM: x86: MMU " Sean Christopherson
2025-03-18 18:02 ` [GIT PULL] KVM: x86: PV clock " Sean Christopherson
2025-03-18 18:02 ` [GIT PULL] KVM: Selftests changes for 6.15, part 2 Sean Christopherson
2025-03-18 18:03 ` [GIT PULL] KVM: Selftests changes for 6.15, part 1 Sean Christopherson
2025-03-18 18:03 ` [GIT PULL] KVM: x86: SVM changes for 6.15 Sean Christopherson
2025-03-18 18:03 ` [GIT PULL] KVM: x86: VMX " Sean Christopherson
2025-03-18 18:03 ` [GIT PULL] KVM: x86: Xen " Sean Christopherson
2025-03-19 17:53 ` [GIT PULL] KVM: x86: Changes " Paolo Bonzini
2025-03-19 19:42   ` Sean Christopherson [this message]

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=Z9seOpLCVfAqHife@google.com \
    --to=seanjc@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /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