[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 02/15] xen/arm/gic: Enable interrupt assignment to running VM


  • To: Julien Grall <julien@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <xin.wang2@xxxxxxx>
  • Date: Sat, 11 May 2024 16:35:27 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=xen.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JDpgzmes3wIY3sYaKYUQcA9ltTQSQkPL7jlEx+Brflk=; b=BWNL/PVaWdgtsgCGFToLPtMqb8tiEbsj8GjLMgyggbEF0i3aCMqJcUXqyJMr3UjCdjAZPGMTqAWbcarow0GA6UqHsOetJUz+oM2fGRjewph84zChDuxRStzMNwPZRriOa/MsfdR1PflPWQglRhzbOsgvmBfQsxW6cTlNvFRR6ZPPExdzRuuG2nUvKAXqITW6kmdO/nQVtZkQLmwHHCADYzHxQRxhgayyEOyoRTbTmvOGBdjJ+gFiSeVr6RjDxar5I1uGc0eRfprmI1fvX8tc5nXJv1rGkKwJykx0SXm6eBFB8m2CBzfPRShEydAIf/hZGQn61py1iOx6O7n7FsnoUg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GAAXROwKecQIuKBmSX7OxN5ruENGQa8qwQAlakNxbBw3IN1olielxQOfcAoB++3CxALl4W0NvHd+GG8yB63KvwVTEOxSZbHc+h0YcH/mJaOiPXVDPYu5/Nq7+5qAPw7USd8EluV1BnNFkHoo5j/iPlsHcTXlcAOEqASQbtHXSX1YMc2FRw9tT9JO4R9+Rb5erSH/a9qAgg30H6TFpl8hbxRW3nokHEd0NUVpLBWJ/UIq/NVp0YU12/izMVjCVLCaAfOqzaRhhFC/tD7kT8UVTz2BPBeO1tNp57DdMAAt2jUNhA+wmKo1uG1a2+fiKmJ4bpJlBSPyM0M9Eu3Wb10nXQ==
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>
  • Delivery-date: Sat, 11 May 2024 08:35:51 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Julien,

On 5/11/2024 4:22 PM, Julien Grall wrote:
Hi Henry,

On 11/05/2024 08:29, Henry Wang wrote:
+        /*
+         * Handle the LR where the physical interrupt is de-assigned from the
+         * guest before it was EOIed
+         */
+        struct vcpu *v_target = vgic_get_target_vcpu(d->vcpu[0], virq);

This will return a vCPU from the current affinity. This may not be where the interrupt was injected. From a brief look, I can't tell whether we have an easy way to know where the interrupt was injected (other than the pending_irq is in the list lr_queue/inflight)

I doubt if we need to handle more than this - I think if the pending_irq is not in the lr_queue/inflight list, it would not belong to the corner case we are talking about (?).

I didn't suggest we would need to handle the case where the pending_irq is not any of the queues. I was pointing out that I think we don't directly store the vCPU ID where we injected the IRQ. Instead, the pending_irq is just in list, so we will possibly need to store the vCPU ID for convenience.

Sorry for misunderstanding. Yeah you are definitely correct. Also thank you so much for the suggestion! Before seeing this suggestion, I was struggling in finding the correct vCPU by "for_each_vcpus" and comparison... but now I realized your suggestion is way more clever :)

Kind regards,
Henry



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.