Re: [PATCH 03/15] KVM: PPC: Allow userspace to unset the IRQ line

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

 



Avi Kivity wrote:
> On 03/05/2010 06:50 PM, Alexander Graf wrote:
>> Userspace can tell us that it wants to trigger an interrupt. But
>> so far it can't tell us that it wants to stop triggering one.
>>
>> So let's interpret the parameter to the ioctl that we have anyways
>> to tell us if we want to raise or lower the interrupt line.
>>
>> Signed-off-by: Alexander Graf<agraf@xxxxxxx>
>> ---
>>   arch/powerpc/include/asm/kvm.h     |    3 +++
>>   arch/powerpc/include/asm/kvm_ppc.h |    2 ++
>>   arch/powerpc/kvm/book3s.c          |    6 ++++++
>>   arch/powerpc/kvm/powerpc.c         |    5 ++++-
>>   4 files changed, 15 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/powerpc/include/asm/kvm.h
>> b/arch/powerpc/include/asm/kvm.h
>> index 19bae31..6c5547d 100644
>> --- a/arch/powerpc/include/asm/kvm.h
>> +++ b/arch/powerpc/include/asm/kvm.h
>> @@ -84,4 +84,7 @@ struct kvm_guest_debug_arch {
>>   #define KVM_REG_QPR        0x0040
>>   #define KVM_REG_FQPR        0x0060
>>
>> +#define KVM_INTERRUPT_SET    -1U
>> +#define KVM_INTERRUPT_UNSET    -2U
>>    
>
> Funny choice of numbers.

Qemu currently does explicitly set -1U and is the only user.

> How does userspace know they exist?

#ifdef KVM_INTERRUPT_SET? MOL is the only user of this so far. And that
won't work without the hypervisor call anyways.

> Can you use KVM_IRQ_LINE?

I'd rather like to keep that around for when we get an in-kernel-mpic,
which is what we probably ultimately want for qemu.



Alex
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux