[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8c17bd811a533a062a9dd33f39f5183a306df3e9.camel@intel.com>
Date: Thu, 29 May 2025 11:41:09 +0000
From: "Huang, Kai" <kai.huang@...el.com>
To: "pbonzini@...hat.com" <pbonzini@...hat.com>, "seanjc@...gle.com"
<seanjc@...gle.com>, "vkuznets@...hat.com" <vkuznets@...hat.com>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 08/15] KVM: x86: Don't clear PIT's IRQ line status when
destroying PIT
On Mon, 2025-05-19 at 16:28 -0700, Sean Christopherson wrote:
> Don't bother clearing the PIT's IRQ line status when destroying the PIT,
> as userspace can't possibly rely on KVM to lower the IRQ line in any sane
> use case, and it's not at all obvious that clearing the PIT's IRQ line is
> correct/desirable in kvm_create_pit()'s error path.
>
> When called from kvm_arch_pre_destroy_vm(), the entire VM is being torn
> down and thus {kvm_pic,kvm_ioapic}.irq_states are unreachable.
>
> As for the error path in kvm_create_pit(), the only way the PIT's bit in
> irq_states can be set is if userspace raises the associated IRQ before
> KVM_CREATE_PIT{2} completes. Forcefully clearing the bit would clobber's
^
clobber
> userspace's input, nonsensical though that input may be. Not to mention
> that no known VMM will continue on if PIT creation fails.
Powered by blists - more mailing lists