Re: [PATCH] kvm: vmx: Rename vmx_instruction_info to vm_exit_instruction_info

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

 



On Mon, Nov 26, 2018 at 10:56:23AM -0800, Jim Mattson wrote:
> On Mon, Nov 26, 2018 at 8:31 AM Sean Christopherson
> <sean.j.christopherson@xxxxxxxxx> wrote:
> >
> > On Mon, Nov 19, 2018 at 09:50:52AM -0800, Jim Mattson wrote:
> > > I vaguely recall that at some time in the distant past, field 440EH of
> > > the VMCS was referred to as the "VMX instruction-information field."
> >
> > Very distant past :)  Internal documentation has referred to the field
> > as VM_EXIT_INTSTRUCTION_INFO since at least 2002.  Odds are this was a
> > SDM typo or a KVM quirk.
> 
> I'm not imagining it, I swear! See Appendix C of Intel's document
> C97063-002 (April 2005).

Ha, I don't doubt your memory at all.  I doubt the SDM's accuracy :-)

> > > However, this field now provides instruction-information for string
> > > PIO VM-exits, descriptor table VM-exits, RDRAND VM-exits, and RDSEED
> > > VM-exits. The SDM now refers to it as the "VM-exit
> > > instruction-information field." Since this field still is not yet
> > > exposed as part of a userspace API, let's rename it to match the SDM.
> > >
> > > Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx>
> > > Reviewed-by: Peter Shier <pshier@xxxxxxxxxx>
> > > ---
> >
> > ...
> >
> > > @@ -9122,7 +9123,7 @@ static int handle_vmread(struct kvm_vcpu *vcpu)
> > >       unsigned long field;
> > >       u64 field_value;
> > >       unsigned long exit_qualification = vmcs_readl(EXIT_QUALIFICATION);
> > > -     u32 vmx_instruction_info = vmcs_read32(VMX_INSTRUCTION_INFO);
> > > +     u32 vm_exit_instruction_info = vmcs_read32(VM_EXIT_INSTRUCTION_INFO);
> >
> > What about using "instr_info" when caching the field in a local variable?
> > It'd eliminate a bit of weird wrapping, and personally I always use
> > "instr info" when talking/thinking about the field.  handle_vmptrst()
> > already uses the shorthand and I find that to be much more readable.
> 
> Sure. V2 shortly.



[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