Re: [kvm-unit-tests PATCH v5 2/2] x86: nvmx: test max atomic switch MSRs

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

 



> > +static void atomic_switch_msr_limit_test_guest(void)
> > +{
> > +     vmcall();
>
> I finally dug into the weird double-enter_guest().  Rather than re-enter
> the guest to cleanup, just remove this vmcall() so that the first VM-Enter
> invokes hypercall() with HYPERCALL_VMEXIT to set guest_finished.
>
> enter_guest() will verify VM-Enter succeeded, and the guest_finished check
> verifies the guest did a VMCALL.  I don't see any added value in an extra
> VMCALL.

Done. To be consistent with Krish's review, I utilized the existing
v2_null_test_guest() function, which is empty.

> > +     if (count <= max_allowed) {
> > +             enter_guest();
> > +             skip_exit_vmcall();
>
> If vmcall() is removed, this skip and the one in the else{} can be dropped.

Done.

> > +             /*
> > +              * Re-enter the guest with valid counts
> > +              * and proceed past the single vmcall instruction.
> > +              */
>
> Nit: "Re-enter the guest" should either be "Retry VM-Enter" or simply
>      "Enter".  The reason this code exists is that we never actually
>      entered the guest :-)
>
>      E.g. if you drop the vmcall():
>
>                 /* Enter the guest (with valid counts) to set guest_finished. */

Done.



[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