irq enable/disable

18 views
Skip to first unread message

Hong-Seok Kim

unread,
Jun 30, 2019, 11:10:33 AM6/30/19
to hafnium...@googlegroups.com
struct cpu has a field called irp_disable_count. There are also functions that increment and decrement this value (cpu_irq_enable/disable()). When this value becomes zero, arch_irq_disable() is called. When this becomes positive, arch_irq_enable() is called.

But, I cannot find any place that cpq_irq_enable/disable() is called. Is this feature being used? Or is there a plan?

Andrew Scull

unread,
Jul 1, 2019, 6:13:42 AM7/1/19
to Hong-Seok Kim, Hafnium
It looks like those have been there from the start but weren't even used then. I assume they were put there as a means for letting VMs vote on whether the disable interrupts but that isn't how things are going to work in Hafnium for a while. There aren't any plans in the near future for their use.

On Sun, 30 Jun 2019 at 16:10, 'Hong-Seok Kim' via Hafnium <hafnium...@googlegroups.com> wrote:
struct cpu has a field called irp_disable_count. There are also functions that increment and decrement this value (cpu_irq_enable/disable()). When this value becomes zero, arch_irq_disable() is called. When this becomes positive, arch_irq_enable() is called.

But, I cannot find any place that cpq_irq_enable/disable() is called. Is this feature being used? Or is there a plan?

--
You received this message because you are subscribed to the Google Groups "Hafnium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hafnium-discu...@googlegroups.com.
To post to this group, send email to hafnium...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/hafnium-discuss/CAHvD%3DH_LK%2BzLBu3C0Zzop3b1UhRjrR59TAur8vk9ifiNS-GXfQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Andrew Walbran

unread,
Jul 3, 2019, 6:48:21 AM7/3/19
to Andrew Scull, Hong-Seok Kim, Hafnium
It could have been intended for use by Hafnium rather than VMs, for disabling interrupts during critical sections. But I think currently we just disable interrupts the whole time Hafnium code is running, so it's not needed. We should probably delete the unused code.

Hong-Seok Kim

unread,
Jul 3, 2019, 8:19:58 AM7/3/19
to Andrew Walbran, Andrew Scull, hafnium...@googlegroups.com
Yes, I agree. 

2019년 7월 3일 (수) 오전 3:48, Andrew Walbran <qwa...@google.com>님이 작성:
Reply all
Reply to author
Forward
0 new messages