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

Re: [PATCH v11 12/17] vpci/header: emulate PCI_COMMAND register for guests


  • To: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Stewart Hildebrand <stewart.hildebrand@xxxxxxx>
  • Date: Mon, 4 Dec 2023 21:45:12 -0500
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=epam.com 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=88uRk3jdohLNmjxocnljUSXOZuC9n4eCPuzq0fnjPJ8=; b=bZ3lDNDKnxAf6GlFgxl+amXz7IqlwN9q5LzFk5QxuD2PLb5lOJecFPJN/7slC3fL1/1fb8OQsZoq0WhCEGIzqre3kxUfohdaP9wS5R46Vd2nWyqZr6/F19w7EWlSgQlGfnxhDtGB+aS7nBeT/QzbIA/fVBGaY/JckPUw7sOZ+Xi5PzbxrN98g9OA6olbvfbDnOMinzT1wP2XanuAfHo5a31R3/QPijhywBz+EZDrIliECIZMzcMTcIVOi88BKh2DoPoncyEAc8htTuf217FZcka+sVsV4/t7NLm313iBlKJm+Axu3g8+XVRyeCHZQ/Rl+y4UoXomZuym+wn48aAxBg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aSHbSQkoV+8vTrk0o+3lnuFOQPuqKt1WjgS5IqIxIMW/5ZA5C/oABS/2Q/y2ps1bKDBS65Wm/Xp2DYoPM1LygHJ+jYajPgvhaX/ewoyA4zJSCJS67AEezEv/Xfta2J8hpY7xjrbHSaQHz7zN32eH8MWvyjinjAQihX1ZXZ+9i5g9vQLFBx3XIK3ScPd0CE6p13Azmi+5eWIKcJ1sevoAK68A3nLElTnrJjB6d51SsM5q+DY1QdMuD5bx7e5hSN/Hu0JpwIZ4b/XXQD16oEHEs1f8su7cR5QnhfwbYd4HiyHARFLAsfACLaoBuOJqnFdFQf/HDeGuv4gDWcY3mcZ9Pg==
  • Cc: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 05 Dec 2023 02:45:43 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 12/1/23 20:27, Volodymyr Babchuk wrote:
> diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c
> index 21b3fb5579..bc2ebe125b 100644
> --- a/xen/drivers/vpci/header.c
> +++ b/xen/drivers/vpci/header.c
> @@ -167,6 +167,9 @@ static void modify_decoding(const struct pci_dev *pdev, 
> uint16_t cmd,
>      if ( !rom_only )
>      {
>          pci_conf_write16(pdev->sbdf, PCI_COMMAND, cmd);
> +        /* Show DomU that we updated P2M */
> +        header->guest_cmd &= ~PCI_COMMAND_MEMORY;
> +        header->guest_cmd = (val & PCI_COMMAND_MEMORY);

Was this assignment meant to be a bitwise operation (e.g. |= ) ?

Also, "val" doesn't appear to be declared in this scope? Maybe you meant "cmd"?



 


Rackspace

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