diff mbox series

[V2,15/45] pci: export msix_is_pending

Message ID 1739542467-226739-16-git-send-email-steven.sistare@oracle.com (mailing list archive)
State New
Headers show
Series Live update: vfio and iommufd | expand

Commit Message

Steven Sistare Feb. 14, 2025, 2:13 p.m. UTC
Export msix_is_pending for use by cpr.  No functional change.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
---
 hw/pci/msix.c         | 2 +-
 include/hw/pci/msix.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Steven Sistare Feb. 14, 2025, 2:45 p.m. UTC | #1
Hi Michael,

You previously acked "pci: export msix_is_pending" -- thank you!

This patch also needs your attention.

There are no other changes in the core pci area.

- Steve

On 2/14/2025 9:13 AM, Steve Sistare wrote:
> Export msix_is_pending for use by cpr.  No functional change.
> 
> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
> ---
>   hw/pci/msix.c         | 2 +-
>   include/hw/pci/msix.h | 1 +
>   2 files changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/pci/msix.c b/hw/pci/msix.c
> index 57ec708..c7b40cd 100644
> --- a/hw/pci/msix.c
> +++ b/hw/pci/msix.c
> @@ -71,7 +71,7 @@ static uint8_t *msix_pending_byte(PCIDevice *dev, int vector)
>       return dev->msix_pba + vector / 8;
>   }
>   
> -static int msix_is_pending(PCIDevice *dev, int vector)
> +int msix_is_pending(PCIDevice *dev, unsigned int vector)
>   {
>       return *msix_pending_byte(dev, vector) & msix_pending_mask(vector);
>   }
> diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h
> index 0e6f257..11ef945 100644
> --- a/include/hw/pci/msix.h
> +++ b/include/hw/pci/msix.h
> @@ -32,6 +32,7 @@ int msix_present(PCIDevice *dev);
>   bool msix_is_masked(PCIDevice *dev, unsigned vector);
>   void msix_set_pending(PCIDevice *dev, unsigned vector);
>   void msix_clr_pending(PCIDevice *dev, int vector);
> +int msix_is_pending(PCIDevice *dev, unsigned vector);
>   
>   void msix_vector_use(PCIDevice *dev, unsigned vector);
>   void msix_vector_unuse(PCIDevice *dev, unsigned vector);
Steven Sistare Feb. 14, 2025, 2:46 p.m. UTC | #2
On 2/14/2025 9:45 AM, Steven Sistare wrote:
> Hi Michael,
> 
> You previously acked "pci: export msix_is_pending" -- thank you!
> 
> This patch also needs your attention.

Off by one -- patch 16/45 "pci: skip reset during cpr" needs your attention.

- Steve

> There are no other changes in the core pci area.
> 
> - Steve
> 
> On 2/14/2025 9:13 AM, Steve Sistare wrote:
>> Export msix_is_pending for use by cpr.  No functional change.
>>
>> Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
>> Acked-by: Michael S. Tsirkin <mst@redhat.com>
>> ---
>>   hw/pci/msix.c         | 2 +-
>>   include/hw/pci/msix.h | 1 +
>>   2 files changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/hw/pci/msix.c b/hw/pci/msix.c
>> index 57ec708..c7b40cd 100644
>> --- a/hw/pci/msix.c
>> +++ b/hw/pci/msix.c
>> @@ -71,7 +71,7 @@ static uint8_t *msix_pending_byte(PCIDevice *dev, int vector)
>>       return dev->msix_pba + vector / 8;
>>   }
>> -static int msix_is_pending(PCIDevice *dev, int vector)
>> +int msix_is_pending(PCIDevice *dev, unsigned int vector)
>>   {
>>       return *msix_pending_byte(dev, vector) & msix_pending_mask(vector);
>>   }
>> diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h
>> index 0e6f257..11ef945 100644
>> --- a/include/hw/pci/msix.h
>> +++ b/include/hw/pci/msix.h
>> @@ -32,6 +32,7 @@ int msix_present(PCIDevice *dev);
>>   bool msix_is_masked(PCIDevice *dev, unsigned vector);
>>   void msix_set_pending(PCIDevice *dev, unsigned vector);
>>   void msix_clr_pending(PCIDevice *dev, int vector);
>> +int msix_is_pending(PCIDevice *dev, unsigned vector);
>>   void msix_vector_use(PCIDevice *dev, unsigned vector);
>>   void msix_vector_unuse(PCIDevice *dev, unsigned vector);
>
diff mbox series

Patch

diff --git a/hw/pci/msix.c b/hw/pci/msix.c
index 57ec708..c7b40cd 100644
--- a/hw/pci/msix.c
+++ b/hw/pci/msix.c
@@ -71,7 +71,7 @@  static uint8_t *msix_pending_byte(PCIDevice *dev, int vector)
     return dev->msix_pba + vector / 8;
 }
 
-static int msix_is_pending(PCIDevice *dev, int vector)
+int msix_is_pending(PCIDevice *dev, unsigned int vector)
 {
     return *msix_pending_byte(dev, vector) & msix_pending_mask(vector);
 }
diff --git a/include/hw/pci/msix.h b/include/hw/pci/msix.h
index 0e6f257..11ef945 100644
--- a/include/hw/pci/msix.h
+++ b/include/hw/pci/msix.h
@@ -32,6 +32,7 @@  int msix_present(PCIDevice *dev);
 bool msix_is_masked(PCIDevice *dev, unsigned vector);
 void msix_set_pending(PCIDevice *dev, unsigned vector);
 void msix_clr_pending(PCIDevice *dev, int vector);
+int msix_is_pending(PCIDevice *dev, unsigned vector);
 
 void msix_vector_use(PCIDevice *dev, unsigned vector);
 void msix_vector_unuse(PCIDevice *dev, unsigned vector);