[Android-virt] [PATCH] target-arm/kvm.c: Pass CPU index to KVM_IRQ_LINE ioctl

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

 



On Sun, Dec 11, 2011 at 4:37 PM, Christoffer Dall
<c.dall at virtualopensystems.com> wrote:
> On Sun, Dec 11, 2011 at 3:30 PM, Peter Maydell <peter.maydell at linaro.org> wrote:
>> Pass the CPU index number to the KVM_IRQ_LINE ioctl
>> in the format the kernel expects.
>>
>> Signed-off-by: Peter Maydell <peter.maydell at linaro.org>
>> ---
>> ?target-arm/kvm.c | ? ?6 +++---
>> ?1 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/target-arm/kvm.c b/target-arm/kvm.c
>> index 6ea96e5..f0899f6 100644
>> --- a/target-arm/kvm.c
>> +++ b/target-arm/kvm.c
>> @@ -122,7 +122,7 @@ int kvm_arch_get_registers(CPUState *env)
>> ?int kvm_arch_interrupt(CPUState *env, int irq, int level)
>> ?{
>> ? ? struct kvm_irq_level irq_level;
>> - ? ?int vcpu_idx = 0; /* Assume non-SMP for now */
>> + ? ?int vcpu_idx = env->cpu_index;
>> ? ? KVMState *s = kvm_state;
>> ? ? int ret;
>>
>> @@ -133,10 +133,10 @@ int kvm_arch_interrupt(CPUState *env, int irq, int level)
>>
>> ? ? switch (irq) {
>> ? ? case ARM_PIC_CPU_IRQ:
>> - ? ? ? ?irq_level.irq = KVM_ARM_IRQ_LINE * vcpu_idx;
>> + ? ? ? ?irq_level.irq = KVM_ARM_IRQ_LINE | (vcpu_idx << 1);
>> ? ? ? ? break;
>> ? ? case ARM_PIC_CPU_FIQ:
>> - ? ? ? ?irq_level.irq = (KVM_ARM_FIQ_LINE * vcpu_idx) + 1;
>> + ? ? ? ?irq_level.irq = KVM_ARM_FIQ_LINE | (vcpu_idx << 1);
>> ? ? ? ? brea
>
> so as per the other e-mail thread, this is not what the api
> documentation describes... we should agree on something...
>
please completely ignore this comment.



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux