|
|
|
Re: [PATCH 3/4] kvm: Extend irqfd to support level interrupts | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
|
On Mon, Jun 25, 2012 at 10:17:14AM -0600, Alex Williamson wrote:
> On Mon, 2012-06-25 at 02:02 +0300, Michael S. Tsirkin wrote:
> > On Sun, Jun 24, 2012 at 03:59:27PM -0600, Alex Williamson wrote:
> > > On Sun, 2012-06-24 at 18:49 +0300, Michael S. Tsirkin wrote:
> > > > On Sun, Jun 24, 2012 at 09:18:38AM -0600, Alex Williamson wrote:
> > > > > > > @@ -242,7 +299,8 @@ kvm_irqfd_assign(struct kvm *kvm, struct kvm_irqfd *args)
> > > > > > >
> > > > > > > ret = 0;
> > > > > > > list_for_each_entry(tmp, &kvm->irqfds.items, list) {
> > > > > > > - if (irqfd->eventfd != tmp->eventfd)
> > > > > > > + if (irqfd->eventfd != tmp->eventfd &&
> > > > > > > + irqfd->eventfd != tmp->eoi_eventfd)
> > > > > > > continue;
> > > > > >
> > > > > > So we allow duplicate irqfd with differing eoifd (or edge-triggered and
> > > > > > level-triggered irqfd on the same context).
> > > > > >
> > > > > > (why the check in the first place? just so we can have a reliable
> > > > > > deassign or is it avoiding a deeper problem?)
> > > > >
> > > > > I really wasn't sure to what extent we wanted to prevent duplicates. My
> > > > > guess was that we don't want to have an irqfd trigger more than one
> > > > > thing. That seems to be what the current code does. I don't see any
> > > > > problems with multiple irqfds triggering the same eventfd though. I
> > > > > only added a test that a new irqfd can't be triggered by an existing
> > > > > eoi_eventfd as that could make a nasty loop.
> > > >
> > > > How would that make a loop? You can have the same thing
> > > > with e.g. ioeventfd - why isn't it a problem there?
> > >
> > > eoi_eventfd1 -> irqfd2 [eoi] eoi_eventfd2 -> irqfd1 [eoi] eoi_eventfd1 ->...
> >
> > Sorry I don't understand.
> > What does this [eoi] mean? How is eoi eventfd different from ioeventfd?
>
> [eoi] is simply the guest doing an EOI write.
So you trigger irq, later guest does an eoi etc. Why is this a loop?
> There's some interaction
> required from the guest which could rate limit the loop. I'm not really
> following your comparison to an ioeventfd. If the question is can you
> create loops with an ioeventfd, I imagine the answer is probably so.
I think the answer is no.
> I
> certainly don't plan on adding code to test every fd in use by a vm and
> validate it can't do crazy things, so if even this minor sanity test
> could prevent useful things, I'll happily remove it. Thanks,
>
> Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Other Archives] [Linux Kernel Newbies] [Linux Driver Development] [Linux Kbuild] [Fedora Kernel] [Linux Kernel Testers] [Linux SH] [Linux Omap] [Linux Tape] [Linux Input] [Linux Kernel Janitors] [Linux Kernel Packagers] [Linux Doc] [Linux Man Pages] [Linux API] [Linux Memory Management] [Linux Modules] [Linux Standards] [Kernel Announce] [Netdev] [Git] [Linux PCI] Linux CAN Development [Linux I2C] [Linux RDMA] [Linux NUMA] [Netfilter] [Netfilter Devel] [SELinux] [Bugtraq] [FIO] [Linux Perf Users] [Linux Serial] [Linux PPP] [Linux ISDN] [Linux Next] [Kernel Stable Commits] [Linux Tip Commits] [Kernel MM Commits] [Linux Security Module] [AutoFS] [Filesystem Development] [Ext3 Filesystem] [Linux bcache] [Ext4 Filesystem] [Linux BTRFS] [Linux CEPH Filesystem] [Linux XFS] [XFS] [Linux NFS] [Linux CIFS] [Ecryptfs] [Linux NILFS] [Linux Cachefs] [Reiser FS] [Initramfs] [Linux FB Devel] [Linux OpenGL] [DRI Devel] [Fastboot] [Linux RT Users] [Linux RT Stable] [eCos] [Corosync] [Linux Clusters] [LVS Devel] [Hot Plug] [Linux Virtualization] [KVM] [KVM PPC] [KVM ia64] [Linux Containers] [Linux Hexagon] [Linux Cgroups] [Util Linux] [Wireless] [Linux Bluetooth] [Bluez Devel] [Ethernet Bridging] [Embedded Linux] [Barebox] [Linux MMC] [Linux IIO] [Sparse] [Smatch] [Linux Arch] [x86 Platform Driver] [Linux ACPI] [Linux IBM ACPI] [LM Sensors] [CPU Freq] [Linux Power Management] [Linmodems] [Linux DCCP] [Linux SCTP] [ALSA Devel] [Linux USB] [Linux PA RISC] [Linux Samsung SOC] [MIPS Linux] [IBM S/390 Linux] [ARM Linux] [ARM Kernel] [ARM MSM] [Tegra Devel] [Sparc Linux] [Linux Security] [Linux Sound] [Linux Media] [Video 4 Linux] [Linux IRDA Users] [Linux for the blind] [Linux RAID] [Linux ATA RAID] [Device Mapper] [Linux SCSI] [SCSI Target Devel] [Linux SCSI Target Infrastructure] [Linux IDE] [Linux SMP] [Linux AXP] [Linux Alpha] [Linux M68K] [Linux ia64] [Linux 8086] [Linux x86_64] [Linux Config] [Linux Apps] [Linux MSDOS] [Linux X.25] [Linux Crypto] [DM Crypt] [Linux Trace Users] [Linux Btrace] [Linux Watchdog] [Utrace Devel] [Linux C Programming] [Linux Assembly] [Dash] [DWARVES] [Hail Devel] [Linux Kernel Debugger] [Linux gcc] [Gcc Help] [X.Org] [Wine]
![]() |
![]() |
[Older Kernel Discussion] [Yosemite National Park Forum] [Large Format Photos] [Gimp] [Yosemite Photos] [Stuff]