- Feb 04, 2013
-
-
Avi Kivity authored
It's somewhat complicated due to the red zone, but there's no way around it.
-
Guy Zana authored
-
Avi Kivity authored
With this change, every cpu has its own independent runqueue. Since we don't support thread migration yet, and since threads inherit the cpu from their parent, all threads except the smp bringup thread will still run on the boot cpu.
-
Avi Kivity authored
With the current implementation, where the current cpu is a thread-local variable, we cannot change the cpu pointer atomically during a context switch, as we cannot obtain a pointer to a thread-local variable before the thread has been run. By moving the cpu pointer to the thread structure, we can change it atomically by switching the thread-local base register (%fs on x64).
-
Avi Kivity authored
-
Avi Kivity authored
We need a per-cpu interrupt stack to allow smp interrupts; because we use the IST mechanism, this requires a per-cpu TSS, which in turn suggests a per-cpu GDT (this last could have been avoided at the expense of some complexity).
-
Avi Kivity authored
-
Avi Kivity authored
We play with the tss, which is supposedly per-cpu, but this has not been implemented yet. Disable it temporarily. Meanwhile, interrupts and exceptions may not nest.
-
- Feb 03, 2013
-
-
Avi Kivity authored
During initialization, we create a thread and switch to it immediately. In smp bringup, we must create the thread on the boot cpu (since thread local storage is only initialized there so far), but obviously want to switch into it on the new cpu. To avoid too many variants, we simply create a thread that is off the runqueue, and then either switch to it immediately with switch_to_first(), or defer it to the smp bringup.
-
Christoph Hellwig authored
This has no functional benefit, it just allows testing the async block layer and can be reverted later.
-
Avi Kivity authored
Use more common functionality, and don't attempt to preserve too much state (tcb/tls) from the non-threaded boot environment. Later we can unify this with smp boot as well.
-
Christoph Hellwig authored
Struct bio gains a condition variable and a mutex to allow waiting for I/O completions. Still no support for returning errors, but that can be added fairly easily.
-
Christoph Hellwig authored
-
Avi Kivity authored
-
Avi Kivity authored
Need to replace with something cleverer later.
-
Avi Kivity authored
We want the scheduler up when we launch smp, so we need to be in a thread (mainly so s_current is valid).
-
Avi Kivity authored
Saves storage and removes a size depdendency.
-
Avi Kivity authored
The console is now smp safe.
-
Avi Kivity authored
A console driver that wraps another with a spinlock. We usually don't want spinlocks, but if we want to debug the scheduler, we have to use them here.
-
Avi Kivity authored
-
Avi Kivity authored
This removes the limit on the number of cpus we can boot.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
Local APIC ID is different on x2apic, so we need a virtual function.
-
Avi Kivity authored
Used to initialize the APIC on non-boot processors.
-
Avi Kivity authored
for use in special cases only; normal threaded use should prefer mutex.
-
Avi Kivity authored
-
Avi Kivity authored
-
Avi Kivity authored
-
- Feb 01, 2013
-
-
Dor Laor authored
* 'master' of github.com:cloudius-systems/osv: bench: add context switch benchmark runtime: implement __cxa_guard_acquire() math: implement __isnan() mmu: implement page protection
-
Dor Laor authored
While it works, it needs to move to the virtio layer
-
Dor Laor authored
This isn't the right discovery mechnism and this should be simplified later on
-
- Jan 31, 2013
-
-
Avi Kivity authored
-
Avi Kivity authored
osv: 147 NanoTime 574 context switch fedora: 322 NanoTime 2484 context switch (nanoseconds, on kvm, on my laptop)
-
Avi Kivity authored
Otherwise, static constructors in functions are never called. This manifested itself in the jit generating wrong code when compiling a function, as the register calling convention was not initialized, and the jvm tried to load all method arguments into %rax.
-
Avi Kivity authored
Not 100% it is right wrt SNaN, but it will fault if incorrect.
-
Guy Zana authored
-
Avi Kivity authored
-
Guy Zana authored
-
Guy Zana authored
-