Re: [PATCH v2 1/3] KVM: x86: implement KVM_{GET|SET}_TSC_STATE

From: Andy Lutomirski
Date: Thu Dec 10 2020 - 18:06:38 EST


On Thu, Dec 10, 2020 at 1:25 PM Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>
> Andy,
>

>
> I'm still convinced that a notification about 'we take a nap' will be
> more robust, less complex and more trivial to backport.

What do you have in mind? Suppose the host kernel sends the guest an
interrupt on all vCPUs saying "I'm about to take a nap". What happens
if the guest is busy with IRQs off for a little bit? Does the host
guarantee the guest a certain about of time to try to get the
interrupt delivered before allowing the host to enter S3? How about
if the host wants to reboot for a security fix -- how long is a guest
allowed to delay the process?

I'm sure this can all be made to work 99% of time, but I'm a bit
concerned about that last 1%.

--Andy