* [PATCH 1/4] kvm: qemu: Remove the useless parameter of assigned_dev_update_irq
@ 2008-12-10 9:44 Han, Weidong
2008-12-10 10:11 ` Mark McLoughlin
0 siblings, 1 reply; 3+ messages in thread
From: Han, Weidong @ 2008-12-10 9:44 UTC (permalink / raw)
To: 'Avi Kivity'; +Cc: kvm@vger.kernel.org
[-- Attachment #1: Type: text/plain, Size: 1775 bytes --]
Should pass &assigned_dev->dev to ipf_map_irq in while loop.
Signed-off-by: Weidong Han <weidong.han@intel.com>
---
qemu/hw/device-assignment.c | 4 ++--
qemu/hw/pci.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
index 4a38a22..7240158 100644
--- a/qemu/hw/device-assignment.c
+++ b/qemu/hw/device-assignment.c
@@ -491,7 +491,7 @@ static uint32_t calc_assigned_dev_id(uint8_t bus, uint8_t devfn)
/* The pci config space got updated. Check if irq numbers have changed
* for our devices
*/
-void assigned_dev_update_irq(PCIDevice *d)
+void assigned_dev_update_irq()
{
AssignedDevInfo *adev;
@@ -505,7 +505,7 @@ void assigned_dev_update_irq(PCIDevice *d)
irq = piix_get_irq(irq);
#ifdef TARGET_IA64
- irq = ipf_map_irq(d, irq);
+ irq = ipf_map_irq(&assigned_dev->dev, irq);
#endif
if (irq != assigned_dev->girq) {
diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c
index c93758d..d777794 100644
--- a/qemu/hw/pci.c
+++ b/qemu/hw/pci.c
@@ -51,7 +51,7 @@ struct PCIBus {
static void pci_update_mappings(PCIDevice *d);
static void pci_set_irq(void *opaque, int irq_num, int level);
-void assigned_dev_update_irq(PCIDevice *d);
+void assigned_dev_update_irq(void);
target_phys_addr_t pci_mem_base;
static int pci_irq_index;
@@ -459,7 +459,7 @@ void pci_default_write_config(PCIDevice *d,
if (kvm_enabled() && qemu_kvm_irqchip_in_kernel() &&
address >= PIIX_CONFIG_IRQ_ROUTE &&
address < PIIX_CONFIG_IRQ_ROUTE + 4)
- assigned_dev_update_irq(d);
+ assigned_dev_update_irq();
#endif /* USE_KVM_DEVICE_ASSIGNMENT */
end = address + len;
--
1.6.0.4
[-- Attachment #2: 0001-Remove-the-useless-parameter-of-assigned_dev_update_.patch --]
[-- Type: application/octet-stream, Size: 1947 bytes --]
From 90b73b745335ba05be5b53411ebbaa0a97334429 Mon Sep 17 00:00:00 2001
From: Weidong Han <weidong.han@intel.com>
Date: Wed, 10 Dec 2008 15:12:34 +0800
Subject: [PATCH] Remove the useless parameter of assigned_dev_update_irq
Should pass &assigned_dev->dev to ipf_map_irq in while loop.
Signed-off-by: Weidong Han <weidong.han@intel.com>
---
qemu/hw/device-assignment.c | 4 ++--
qemu/hw/pci.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
index 4a38a22..7240158 100644
--- a/qemu/hw/device-assignment.c
+++ b/qemu/hw/device-assignment.c
@@ -491,7 +491,7 @@ static uint32_t calc_assigned_dev_id(uint8_t bus, uint8_t devfn)
/* The pci config space got updated. Check if irq numbers have changed
* for our devices
*/
-void assigned_dev_update_irq(PCIDevice *d)
+void assigned_dev_update_irq()
{
AssignedDevInfo *adev;
@@ -505,7 +505,7 @@ void assigned_dev_update_irq(PCIDevice *d)
irq = piix_get_irq(irq);
#ifdef TARGET_IA64
- irq = ipf_map_irq(d, irq);
+ irq = ipf_map_irq(&assigned_dev->dev, irq);
#endif
if (irq != assigned_dev->girq) {
diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c
index c93758d..d777794 100644
--- a/qemu/hw/pci.c
+++ b/qemu/hw/pci.c
@@ -51,7 +51,7 @@ struct PCIBus {
static void pci_update_mappings(PCIDevice *d);
static void pci_set_irq(void *opaque, int irq_num, int level);
-void assigned_dev_update_irq(PCIDevice *d);
+void assigned_dev_update_irq(void);
target_phys_addr_t pci_mem_base;
static int pci_irq_index;
@@ -459,7 +459,7 @@ void pci_default_write_config(PCIDevice *d,
if (kvm_enabled() && qemu_kvm_irqchip_in_kernel() &&
address >= PIIX_CONFIG_IRQ_ROUTE &&
address < PIIX_CONFIG_IRQ_ROUTE + 4)
- assigned_dev_update_irq(d);
+ assigned_dev_update_irq();
#endif /* USE_KVM_DEVICE_ASSIGNMENT */
end = address + len;
--
1.6.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/4] kvm: qemu: Remove the useless parameter of assigned_dev_update_irq
2008-12-10 9:44 [PATCH 1/4] kvm: qemu: Remove the useless parameter of assigned_dev_update_irq Han, Weidong
@ 2008-12-10 10:11 ` Mark McLoughlin
2008-12-10 10:21 ` Han, Weidong
0 siblings, 1 reply; 3+ messages in thread
From: Mark McLoughlin @ 2008-12-10 10:11 UTC (permalink / raw)
To: Han, Weidong; +Cc: 'Avi Kivity', kvm@vger.kernel.org
On Wed, 2008-12-10 at 17:44 +0800, Han, Weidong wrote:
> Should pass &assigned_dev->dev to ipf_map_irq in while loop.
>
> Signed-off-by: Weidong Han <weidong.han@intel.com>
> ---
> qemu/hw/device-assignment.c | 4 ++--
> qemu/hw/pci.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/qemu/hw/device-assignment.c b/qemu/hw/device-assignment.c
> index 4a38a22..7240158 100644
> --- a/qemu/hw/device-assignment.c
> +++ b/qemu/hw/device-assignment.c
> @@ -491,7 +491,7 @@ static uint32_t calc_assigned_dev_id(uint8_t bus, uint8_t devfn)
> /* The pci config space got updated. Check if irq numbers have changed
> * for our devices
> */
> -void assigned_dev_update_irq(PCIDevice *d)
> +void assigned_dev_update_irq()
Yes, but perhaps also rename to update_assigned_device_irqs() ?
(i.e. the current name implies that it's an operation on a single
assigned device, rather than an operation on all assigned devices)
Cheers,
Mark.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH 1/4] kvm: qemu: Remove the useless parameter of assigned_dev_update_irq
2008-12-10 10:11 ` Mark McLoughlin
@ 2008-12-10 10:21 ` Han, Weidong
0 siblings, 0 replies; 3+ messages in thread
From: Han, Weidong @ 2008-12-10 10:21 UTC (permalink / raw)
To: 'Mark McLoughlin'
Cc: 'Avi Kivity', 'kvm@vger.kernel.org'
Mark McLoughlin wrote:
> On Wed, 2008-12-10 at 17:44 +0800, Han, Weidong wrote:
>> Should pass &assigned_dev->dev to ipf_map_irq in while loop.
>>
>> Signed-off-by: Weidong Han <weidong.han@intel.com>
>> ---
>> qemu/hw/device-assignment.c | 4 ++--
>> qemu/hw/pci.c | 4 ++--
>> 2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/qemu/hw/device-assignment.c
>> b/qemu/hw/device-assignment.c
>> index 4a38a22..7240158 100644
>> --- a/qemu/hw/device-assignment.c
>> +++ b/qemu/hw/device-assignment.c
>> @@ -491,7 +491,7 @@ static uint32_t calc_assigned_dev_id(uint8_t
>> bus, uint8_t devfn) /* The pci config space got updated. Check if
>> irq numbers have changed
>> * for our devices
>> */
>> -void assigned_dev_update_irq(PCIDevice *d)
>> +void assigned_dev_update_irq()
>
> Yes, but perhaps also rename to update_assigned_device_irqs() ?
>
> (i.e. the current name implies that it's an operation on a single
> assigned device, rather than an operation on all assigned devices)
>
Will rename it.
Regards,
Weidong
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-10 10:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-10 9:44 [PATCH 1/4] kvm: qemu: Remove the useless parameter of assigned_dev_update_irq Han, Weidong
2008-12-10 10:11 ` Mark McLoughlin
2008-12-10 10:21 ` Han, Weidong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.