Merge branch 'x86-next', remote-tracking branch 'upstream/master' into x86-next
[DRIVERS] mmc: Implement polling based card detection

This patch adds optional polling based card detection for mmc host
controller who don't have (or have buggy) card detection mechanism.

To use this feature, mmc host controller driver have to specify
MMC_CAP_NEEDS_POLL capability when adding mmc host instance.

Signed-off-by: Anup Patel <anup@brainfault.org>
[DRIVERS] mmc: Better location for mmc_core.h and sdhci.h

This patch moves mmc related driver headers to drivers/include/drv/mmc
from drivers/include/drv

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] scheduler: Fix potential issue when Orphan VCPU paused

To pause an Orphan VCPU, we typically expire its timeslice which
causes a forced timer interrupt giving scheduler a chance to
schedule out the Orphan VCPU.

Till now, this Orphan VCPU used to be scheduled out via
vmm_scheduler_timer_event() or vmm_scheduler_irq_exit().

This patch schedule out paused Orphan VCPU from vmm_scheduler_irq_enter()
instead of vmm_scheduler_timer_event() or vmm_scheduler_irq_exit().

We do this in vmm_scheduler_irq_enter() because someone other entity
can resume back the paused Orphan VCPU before vmm_scheduler_timer_event()
or vmm_scheduler_irq_exit() in which case the context of Orphan VCPU will
not be saved.

Signed-off-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[TESTS] Improve documentation for Busybox based root filesystem

This patch improves documentation for Busybox based root filesystem
which we use for guest RAMDISK or guest NFS.

The patch also adds defconfig for busybox-1.21.0.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] More optimization in ARM inst emulation for guest

This patch optimizes instruction decoding in ARM inst emulation for
ARM guest but using switch cases wherever possible.

Signed-off-by: Anup Patel <anup@brainfault.org>
Merge branch 'master', remote-tracking branch 'upstream/master'
Merge branch 'x86-next', remote-tracking branch 'upstream/master' into x86-next
[x86] Fix in HPET mult/shift calculation.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Fix in VCPU register initialization.

Also added dump of registers.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
[x86] Beautification of lock functions.

Signed-off-by: Himanshu Chauhan <hschauhan@nulltrace.org>
Merge pull request #15 from hschauhan/x86-next

X86 next
[DRIVERS] i8042: Replace CONFIG_X86 with CONFIG_ARCH_x86

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Do VCPU state transitions in vmm_scheduler only

Till now, vmm_manager_vcpu_state_change() used to control
VCPU state transitions and notify vmm_scheduler using
vmm_scheduler_state_change() API.

This unifies the VCPU state transition and moves it to
vmm_scheduler_state_change() API.

The vmm_manager_vcpu_state_change() would be still required
for SMP to do vmm_scheduler_state_change() on appropriate
host CPU.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Minor bug fix in vmm_scheduler_state_change() API

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] net: More debug prints in netswitch source

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] Maintain preempt count in all flavours of spinlock APIs

This patch makes our spinlock APIs more consistent with spinlock API
semantics in linux.

In linux, all flavours of spinlock APIs call preempt_enable() and
preempt_disable() for both UP and SMP.

Signed-off-by: Anup Patel <anup@brainfault.org>
[CORE] scheduler: Introduce arch_vcpu_orphan_preempt() for Orphan VCPUs

This patch introduces arch_vcpu_orphan_preempt() API which can be
optionally provided by architecture specific code to have faster
yielding/preemption of Orphan VCPUs

Till now we were dependent on vmm_timer_event_expire() for yielding or
preempting Orphan VCPUs. The issue with this approach is that not all
hardware clockchips are accurate, robust and fast so, implementing an
expire callback is always tricky. Usually, the clockchip expier callback
will have a polling loop which will potentially waste lot of CPU cycles.

Once all architectures (primarily ARM & x86) move from
vmm_timer_event_expire() to arch_vcpu_preempt_orphan(), the
arch_vcpu_preempt_orphan() will be mandated for all architecture supports.

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32: Implement arch_vcpu_preempt_orphan() for Orphan VCPUs

Signed-off-by: Anup Patel <anup@brainfault.org>
[ARM] arm32ve: Implement arch_vcpu_preempt_orphan() for Orphan VCPUs

Signed-off-by: Anup Patel <anup@brainfault.org>