+struct shm_signal_irq {Some ABIs may choose to pad this, suggest explicit padding.
+ __u8 enabled;
+ __u8 pending;
+ __u8 dirty;
+};
Yeah, good idea. What is the official way to do this these days? Are
GCC pragmas allowed?
+Eww. Must we involve strings and printf formats?
+struct shm_signal;
+
+struct shm_signal_ops {
+ int (*inject)(struct shm_signal *s);
+ void (*fault)(struct shm_signal *s, const char *fmt, ...);
This is still somewhat of a immature part of the design. Its supposed
to be used so that by default, its a panic. But on the host side, we
can do something like inject a machine-check. That way malicious/broken
guests cannot (should not? ;) be able to take down the host. Note today
I do not map this to anything other than the default panic, so this
needs some love.
But given the asynchronous nature of the fault, I want to be sure we
have decent accounting to avoid bug reports like "silent MCE kills the
guest" ;) At least this way, we can log the fault string somewhere to
get a clue.