qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] virtio: i2c: Check notifier helpers for VIRTIO_CONFIG_IRQ_ID


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] virtio: i2c: Check notifier helpers for VIRTIO_CONFIG_IRQ_IDX
Date: Mon, 17 Apr 2023 09:36:49 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.0

On 17/4/23 08:02, Viresh Kumar wrote:
Since the driver doesn't support interrupts, we must return early when
index is set to VIRTIO_CONFIG_IRQ_IDX.

Fixes: 544f0278afca ("virtio: introduce macro VIRTIO_CONFIG_IRQ_IDX")
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
  hw/virtio/vhost-user-i2c.c | 20 ++++++++++++++++++++
  1 file changed, 20 insertions(+)

diff --git a/hw/virtio/vhost-user-i2c.c b/hw/virtio/vhost-user-i2c.c
index 60eaf0d95be0..45100a24953c 100644
--- a/hw/virtio/vhost-user-i2c.c
+++ b/hw/virtio/vhost-user-i2c.c
@@ -128,6 +128,16 @@ static void vu_i2c_guest_notifier_mask(VirtIODevice *vdev, 
int idx, bool mask)
  {
      VHostUserI2C *i2c = VHOST_USER_I2C(vdev);
+ /*
+     * Add the check for configure interrupt, Use VIRTIO_CONFIG_IRQ_IDX -1
+     * as the Marco of configure interrupt's IDX, If this driver does not

Copy/paste of pre-existing comment, still I wonder who is "the Marco of configure" :P

+     * support, the function will return
+     */




reply via email to

[Prev in Thread] Current Thread [Next in Thread]