lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 3 May 2023 10:39:55 -0700
From:   Sean Christopherson <seanjc@...gle.com>
To:     Jim Mattson <jmattson@...gle.com>
Cc:     Mingwei Zhang <mizhang@...gle.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, kvm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: VMX: add MSR_IA32_TSX_CTRL into msrs_to_save

On Wed, May 03, 2023, Jim Mattson wrote:
> On Wed, May 3, 2023 at 9:25 AM Sean Christopherson <seanjc@...gle.com> wrote:
> >
> > On Wed, May 03, 2023, Mingwei Zhang wrote:
> > > Add MSR_IA32_TSX_CTRL into msrs_to_save[] to explicitly tell userspace to
> > > save/restore the register value during migration. Missing this may cause
> > > userspace that relies on KVM ioctl(KVM_GET_MSR_INDEX_LIST) fail to port the
> > > value to the target VM.
> > >
> > > Fixes: b07a5c53d42a ("KVM: vmx: use MSR_IA32_TSX_CTRL to hard-disable TSX on guest that lack it")
> > > Reported-by: Jim Mattson <jmattson@...gle.com>
> > > Signed-off-by: Mingwei Zhang <mizhang@...gle.com>
> > > ---
> > >  arch/x86/kvm/x86.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> > > index 237c483b1230..2236cfee4b7a 100644
> > > --- a/arch/x86/kvm/x86.c
> > > +++ b/arch/x86/kvm/x86.c
> > > @@ -1431,7 +1431,7 @@ static const u32 msrs_to_save_base[] = {
> > >  #endif
> > >       MSR_IA32_TSC, MSR_IA32_CR_PAT, MSR_VM_HSAVE_PA,
> > >       MSR_IA32_FEAT_CTL, MSR_IA32_BNDCFGS, MSR_TSC_AUX,
> > > -     MSR_IA32_SPEC_CTRL,
> > > +     MSR_IA32_SPEC_CTRL, MSR_IA32_TSX_CTRL,
> > >       MSR_IA32_RTIT_CTL, MSR_IA32_RTIT_STATUS, MSR_IA32_RTIT_CR3_MATCH,
> > >       MSR_IA32_RTIT_OUTPUT_BASE, MSR_IA32_RTIT_OUTPUT_MASK,
> > >       MSR_IA32_RTIT_ADDR0_A, MSR_IA32_RTIT_ADDR0_B,
> > > --
> >
> > Hmm, KVM shouldn't report the MSR if it can't be written by the guest.  Over-
> 
> I think you mean to say that KVM shouldn't report the MSR if it can't
> be written by *any* guest. KVM_GET_MSR_INDEX_LIST is a device ioctl,
> so it isn't capable of filtering out MSRs that can't be written by
> *the* guest, for some occurrence of "the."

Doh, yes, "the guest" was a handwavy reference to any/all guests.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ