[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CABgObfZE+1AkEPyXzQQCV5Ssho5hMrBvAi5rFdTKNNAAijhRjw@mail.gmail.com>
Date: Thu, 7 Sep 2023 19:25:01 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Thomas Gleixner <tglx@...utronix.de>,
Dave Hansen <dave.hansen@...el.com>,
Borislav Petkov <bp@...en8.de>,
Andy Lutomirski <luto@...nel.org>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
Elena Reshetova <elena.reshetova@...el.com>,
Jun Nakajima <jun.nakajima@...el.com>, x86@...nel.org,
linux-coco@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86/tdx: Mark TSC reliable
On Fri, Aug 25, 2023 at 5:25 PM Sean Christopherson <seanjc@...gle.com> wrote:
> > > TDX aside it might be useful to have a mechanism to select TSC over KVM
> > > clock in general.
> >
> > Sean, Paolo, any comment on this?
>
> I would expect the VMM to not advertise KVM clock if the VM is going to run on
> hosts with stable TSCs, i.e. the guest really shouldn't need to do anything in.
> But I avoid clocks and timekeeping like the plague, so take that with a grain of
> salt, e.g. maybe there's a good reason to always advertise kvmclock.
Mostly because users avoid clocks and timekeeping _even more_;
advertising kvmclock is safe in general, so userspace does it in case
the VM is later migrated to a machine with unstable TSC.
> For TDX and other paranoid guests, I assume the kernel command line is captured
> as part of attestation. And so the existing "no-kvmclock" param should be
> sufficient to ensure the guest doesn't use KVM clock over the TSC, though IIRC
> TDX requires a constant, non-stop TSC, so it's likely not strictly necessary.
As Kirill said, the guest still has to protect itself, so the patch
makes sense (I see a v2 has been posted in the meanwhile).
Paolo
Powered by blists - more mailing lists