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

Re: [PATCH v9 10/16] 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: Fri, 1 Sep 2023 01:23:31 -0400
  • 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
  • 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=Xn88MwuMqvRm9L17DSJ6UxuL5FMJtpVnGRfdeS2PdlY=; b=XAK/UOsC33OkHkfPxYo7kvAPtKJxiFE245zpqVDMFEfp6jpDLWB3bcd46sS3l7Bv3l5tTssyRB8HVKBHT9ZU1NwXv/9kf1jnxFNmfuvMVVQVBhvLYxA0mWxjFJe0oCAnWVPLDLLMds6NDxlWjPTcb6NbKeMrm426DUqAPv9so3kNRgPuQdwgYkr4AoDdcM7qzFrk0dgkMFT909JuK0Qr5tk6u+bzpnbvAkt5QPz/YzjnlL4BsdwqOuHTrhRjuPuLnv1OxLwMRlxO/JHfvvMpmptXM8TjqFL92LsbHeyoIDOOi+5ZlfWEPd2zk+AwXzDMQfZt3YjTTt6XKfhDsxQ+qg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K11Fjs44LYfa19+Cw9dFAAibzJemG839nQZXO650L1pvQHZyrZ0WIjY5/7vu6lVH8SBg6a4TF70QiUyTkPQbPIZhZLsQfM+OT4NAiduGLNhYGSCCNww6jS+wy7Hf1kRzI6KliVss8e/BTcBDJzZLwZ9zj/Y9lYM5WLk47avMHC12jMY6RJdHe4zc6d/y7rfwqL3rxUrfdQaJTZW0MJurzPF96qdPhTYWhBmSuTJYZmCpMiJBHszzzLu3ab/o1VEki7d+zG4kDGD+OLhtW01UoUTWAGdUPu+bqk/SKH2PILYJlvN4KFNkLUwfXYoAAYTOmU5J+2R5IIn3Fh3pN37ZvQ==
  • Cc: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 01 Sep 2023 05:24:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 8/29/23 19:19, Volodymyr Babchuk wrote:
> diff --git a/xen/drivers/vpci/header.c b/xen/drivers/vpci/header.c
> index 1e82217200..e351db4620 100644
> --- a/xen/drivers/vpci/header.c
> +++ b/xen/drivers/vpci/header.c
> @@ -523,6 +546,14 @@ static void cf_check cmd_write(
>          pci_conf_write16(pdev->sbdf, reg, cmd);
>  }
> 
> +static uint32_t guest_cmd_read(const struct pci_dev *pdev, unsigned int reg,

As this function is called indirectly, it needs a cf_check attribute

> +                               void *data)
> +{
> +    const struct vpci_header *header = data;
> +
> +    return header->guest_cmd;
> +}
> +
>  static void cf_check bar_write(
>      const struct pci_dev *pdev, unsigned int reg, uint32_t val, void *data)
>  {



 


Rackspace

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