- Feb 28, 2013
-
-
Avi Kivity authored
IDT vectors are an extra level of indirection on the way to the msix_vector, which is what we really want. Convert assigned_vectors to be std::vector<msix_vector*>; this leads to a considerable simplification of the code.
-
Avi Kivity authored
Since the interrupt manager is now local to a device, we can initialize the device pointer once and remember it. This simplifies the API.
-
Avi Kivity authored
There's no reason for it.
-
Avi Kivity authored
There are actually no interactions between msix registrations of different drivers, so it doesn't help to use a global instance. We can simplify the interface by making it local, and also remove locking considerations.
-
Avi Kivity authored
These are subsumed into the driver constructor/destrutor.
-
Avi Kivity authored
Driver enumeration requires instantiating a driver even for devices which are not present; and if a device is present multiple times, we need to pre-create multiple driver instances, which is awkward. Further, driver life-cycle is complicated, with separation between instantiation and binding to a device. Switch (back) to the traditional device-driven model, where we iterate over all devices, try to find a matching driver factory, and when found, call it to instantiate the driver and bind to the device.
-
Avi Kivity authored
-
Avi Kivity authored
Don't do this in header files.
-
Avi Kivity authored
The main thread has a bogus wait_for_interrupts() which consumed wakeups, so the scheduler on the cpu running it could not schedule stuff. This manifested itself in lots of zombies from bsd callouts not getting reaped. Drop.
- Feb 27, 2013
-
-
Avi Kivity authored
If the user forgot to do this, do them a favour.
-
Avi Kivity authored
-
Avi Kivity authored
We also make the deleter configurable so we can use munmap() or similar to destroy the stack of payload threads.
-
Guy Zana authored
-
Avi Kivity authored
-
Guy Zana authored
-
Avi Kivity authored
Mutex is much better now and should be sufficient. To avoid overflowing sem_t, we have to use a pointer instead of embedding the mutex.
-
Avi Kivity authored
This reverts commit e917ab25. If we have an assert, it can break badly, as printf() inside the assert allocates. Will reinstate after adding emergency allocators.
-
Avi Kivity authored
Mutexes are now allocation free and thus safe for use within the allocator.
-
Avi Kivity authored
wait_until(mutex, ...) must be called with the mutex held.
-
Avi Kivity authored
-
Avi Kivity authored
Use the new wait_until() variant that supports dropping a mutex while sleeping.
-
Avi Kivity authored
We need to make them a little more complicated.
-
Avi Kivity authored
-
Avi Kivity authored
Previously, we performed idle processing in the scheduler, in the context of the thread that is being scheudled out. This makes preemption more complicated, since every thread can potentially be in the idle loop simultaneously, having been preempted there some time in the past. Obviously we can't disable interrupts in the idle loop. Move idle processing to its own thread to fix this problem. This is currently sub-optimal since we don't have priority classes yet (or even just priorities), so the idle thread can be scheduled before workload threads. If that happens it will examine the runqueue and yield if there's anything there.
-
- Feb 26, 2013
-
-
Avi Kivity authored
These variants unlock a mutex while sleeping (but keep it locked while evaluating the predicate) and thus are suitable for more complicated predicates that cannot be evaluated atomically.
-
Avi Kivity authored
Will need more interaction with the scheduler.
-
Avi Kivity authored
-
Avi Kivity authored
Otherwise, expect memory corruption.
-
Avi Kivity authored
Make sure sched::tls is initialized before we create objects of type 'cpu', so that any threads in those objects (idle thread, etc.) are initialized correctly.
-
Guy Zana authored
-
Guy Zana authored
-
Avi Kivity authored
-
Avi Kivity authored
-
Guy Zana authored
-
Guy Zana authored
-
Guy Zana authored
-