[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <008f79a7bc1bc8a942897e56824019c9aba02955.camel@intel.com>
Date: Thu, 10 Jul 2025 22:54:42 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "pbonzini@...hat.com" <pbonzini@...hat.com>, "seanjc@...gle.com"
<seanjc@...gle.com>, "nikunj@....com" <nikunj@....com>
CC: "thomas.lendacky@....com" <thomas.lendacky@....com>, "kvm@...r.kernel.org"
<kvm@...r.kernel.org>, "Li, Xiaoyao" <xiaoyao.li@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "Edgecombe,
Rick P" <rick.p.edgecombe@...el.com>, "bp@...en8.de" <bp@...en8.de>,
"Yamahata, Isaku" <isaku.yamahata@...el.com>
Subject: Re: [PATCH 2/2] KVM: x86: Reject KVM_SET_TSC_KHZ VM ioctl when vCPU
has been created
On Wed, 2025-07-09 at 14:21 +0530, Nikunj A. Dadhania wrote:
>
> On 7/9/2025 11:08 AM, Kai Huang wrote:
> > Reject the KVM_SET_TSC_KHZ VM ioctl when there's vCPU has already been
> > created.
>
> Probably the below is clear:
>
> Reject KVM_SET_TSC_KHZ VM ioctl when vCPUs have been created
Will do. Thanks.
>
> >
> > The VM scope KVM_SET_TSC_KHZ ioctl is used to set up the default TSC
> > frequency that all subsequent created vCPUs use. It is only intended to
> > be called before any vCPU is created. Allowing it to be called after
> > that only results in confusion but nothing good.
> >
> > Note this is an ABI change. But currently in Qemu (the de facto
> > userspace VMM) only TDX uses this VM ioctl, and it is only called once
> > before creating any vCPU, therefore the risk of breaking userspace is
> > pretty low.
> >
> > Suggested-by: Sean Christopherson <seanjc@...gle.com>
> > Signed-off-by: Kai Huang <kai.huang@...el.com>
>
> Reviewed-by: Nikunj A Dadhania <nikunj@....com>
Thanks. I'll keep you guys RB anyway after adding the mutex. Let me know
if you are not OK.
Powered by blists - more mailing lists