[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 09/13] vpci/header: emulate PCI_COMMAND register for guests
- To: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
- From: Jan Beulich <jbeulich@xxxxxxxx>
- Date: Mon, 24 Jul 2023 13:03:06 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
- 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=HRqRIWSw/+qjfthOL/y9AHdHG6EDej1B561NpI8uduk=; b=oTd4vv9NpF62zNVUYbxCtFMK8RLNN5eSAJrR7A1g09OWJcijsSW9Bx9Ueiy6Rf6FTC1E4LDY6bcZGiLUYNlCCq4ml2qgdeISd44tNgyH2Vi0o+ac0w/+eOHlYuEn6TSKbCwM2B4uHRDT9FFFWIiQkz7cdEzQQMhwW9bOAtnHbYJnu34EYF64C7sqVqGmO3lbWCj3/Sxhlj1xlW52LhvCWl7itoNFCUgLdRsCPCnjIXVNRI0VUXPl8qgs9ndn3t1v8rFZYZx+4fSe8mtJN46L6FUZ+yxsXAIySENxD3AFz6IDttaPPA8/Xw7oT5Ynf4i7VilEn93i3kc4ZC1Dxv8o/g==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JzLXYt9BAHZ7ZrCmErCM6KXRgPQ0g7uLiqavI8pTdBkbJ5W8EH/8F5vAY2It6OrqslY3/6+GaDalpDjzeYpK2dSHnVBovE2P8mIvJUxcGsof0Eah8fX/s90MgsewQsoYZM68T17BZUn3qXK//V830ffxdwBjsyf5A5bn/dxjiJLmqOrQFAg8x8m8eky5xMlMc0chqiWlKQRBv7QwGlzQQVwx1Xydd35ZNKz/Hd1HD22wE9FVo6qoJbNUf6ZpB4g8E2fmMVzVoEwYv0Ug0W/nWsFWa334WNPhyS/W4Plntq+SsKxwsJExK0ml649IhzNO9dwB7LwaZiWF8GW7CF1OhA==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
- Cc: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Mon, 24 Jul 2023 11:03:12 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 20.07.2023 02:32, Volodymyr Babchuk wrote:
> --- a/xen/drivers/vpci/msi.c
> +++ b/xen/drivers/vpci/msi.c
> @@ -70,6 +70,10 @@ static void cf_check control_write(
>
> if ( vpci_msi_arch_enable(msi, pdev, vectors) )
> return;
> +
> + /* Make sure guest doesn't enable INTx while enabling MSI. */
> + if ( !is_hardware_domain(pdev->domain) )
> + pci_intx(pdev, false);
Neither this nor ...
> --- a/xen/drivers/vpci/msix.c
> +++ b/xen/drivers/vpci/msix.c
> @@ -97,6 +97,10 @@ static void cf_check control_write(
> for ( i = 0; i < msix->max_entries; i++ )
> if ( !msix->entries[i].masked && msix->entries[i].updated )
> update_entry(&msix->entries[i], pdev, i);
> +
> + /* Make sure guest doesn't enable INTx while enabling MSI-X. */
> + if ( !is_hardware_domain(pdev->domain) )
> + pci_intx(pdev, false);
... this has a counterpart passing true, to restore pin-based IRQs.
While it looks like we have a pre-existing issue here as well
(see __pci_disable_msi() vs __pci_disable_msix()), could you clarify
how this is meant to work for DomU-s?
Jan
|