RE: [PATCH] KVM: Qemu: Enable kvm/ia64's network.

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

 



Avi Kivity wrote:
> Zhang, Xiantao wrote:
>> Hi, Avi
>>    Please help to apply this patch. It will fix kvm/ia64's
>> networking issue. Thanks
>> Xiantao
>> From fe6e28ce9295acba107438979fe6ead0d24f7e20 Mon Sep 17 00:00:00
>> 2001 From: Xiantao Zhang <xiantao.zhang@xxxxxxxxx>
>> Date: Fri, 22 Aug 2008 17:14:15 +0800
>> Subject: [PATCH] KVM: Qemu: Enable kvm/ia64's network.
>> 
>> kvm/ia64's IRQ may >16, but current Qemu can't support it.
>> Here we implment a IRQ map function to solve this issue to
>> enable its networking.
>> 
>> Signed-off-by: Anthony Xu <anthony.xu@xxxxxxxxx>
>> Signed-off-by: Xiantao Zhang <xiantao.zhang@xxxxxxxxx> ---
>>  qemu/hw/ipf.c |   24 ++++++++++++++++++++++++
>>  qemu/hw/pci.c |    9 +++++++++
>>  2 files changed, 33 insertions(+), 0 deletions(-)
>> 
>> diff --git a/qemu/hw/ipf.c b/qemu/hw/ipf.c
>> index b11e328..ffa7843 100644
>> --- a/qemu/hw/ipf.c
>> +++ b/qemu/hw/ipf.c
>> @@ -672,3 +672,27 @@ QEMUMachine ipf_machine = {
>>      ipf_init_pci,
>>      VGA_RAM_SIZE + VGA_RAM_SIZE,
>>  };
>> +
>> +#define IOAPIC_NUM_PINS 48
>> +
>> +static int ioapic_irq_count[IOAPIC_NUM_PINS];
>> +
>> +int ioapic_map_irq(int devfn, int irq_num)
>> +{
>> +    int irq, dev;
>> +    dev = devfn >> 3;
>> +    irq = ((((dev << 2) + (dev >> 3) + irq_num) & 31) + 16); +   
>> return irq; +}
>> +
>> +void ioapic_set_irq(void *opaque, int vector, int level) +{
>> +    if( level )
>> 
> 
> if (level)
> 
>> +        ioapic_irq_count[vector] += 1;
>> +    else
>> +        ioapic_irq_count[vector] -= 1;
>> +
>> +    if (kvm_enabled())
>> +	if (kvm_set_irq(vector, ioapic_irq_count[vector] == 0)) +

>> return; +}
>> 
> 
> Please move this to pci.c.  This can be made to work for x86 too.

So, we should change X86 bios's dsdt also ? 
Thanks
Xiantao
--
To unsubscribe from this list: send the line "unsubscribe kvm-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux KVM Devel]     [Linux Virtualization]     [Big List of Linux Books]     [Linux SCSI]     [Yosemite Forum]

  Powered by Linux