Re: [patch V4 07/36] rseq, virt: Retrigger RSEQ after vcpu_run()

Thomas Gleixner
2025-09-09T12:10:51Z

On Mon, Sep 08 2025 at 17:00, Sean Christopherson wrote:
> On Mon, Sep 08, 2025, Thomas Gleixner wrote:
>> --- a/virt/kvm/kvm_main.c
>> +++ b/virt/kvm/kvm_main.c
>> @@ -49,6 +49,7 @@
>> #include <linux/lockdep.h>
>> #include <linux/kthread.h>
>> #include <linux/suspend.h>
>> +#include <linux/rseq.h>
>>
>> #include <asm/processor.h>
>> #include <asm/ioctl.h>
>> @@ -4466,6 +4467,8 @@ static long kvm_vcpu_ioctl(struct file *
>> r = kvm_arch_vcpu_ioctl_run(vcpu);
>> vcpu->wants_to_run = false;
>>
>
> Finally had a lightbulb moment as to how to eat this hack while not stonewalling
> the entire series. Can you add something like:
>
> /*
> * FIXME: Remove this hack once all KVM architectures support
> * the generic TIF bits, i.e. a dedicated TIF_RSEQ.
> */
>
> to discourage further abuse, and to make it clear that such ugliness isn't anyone's
> first choice. With that,

Fair enough.