Basic framework for A/D bit logging

This patch builds a basic framework for A/D bit logging, whichi contains:
1. Memslot based SPT walking: walk every gfn registered in KVM memslots
2. SPT based walking: walk SPT directly from EPTP (vcpu->arch.mmu.root_hpa)
3. Add an interface to control logging mode, defines kvm_record_mode, which
contains two mode: KVM_RECORD_HARDWARE_WALK_MMU and KVM_RECORD_HARDWARE_WALK_MEMSLOT,
according to 1 and 2. This interface is not propagated to userspace API. Do it in
following patches.
4. Add a compiling macro RECORD_DEBUG which controls memory access msg pringing.
Please turn off when comparing the speed of hardware and software mode currently,
because hardware mode will log some additional message. After A/D bit logging
supported, the output of these two modes are expected the same.

Besides, two hardware logging modes cannot log memory accesses out of guest memory
range, while software mode can. KVM tends to map these gfn to an illegal hpa
(e.g. 0x8000000000000000).

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
Bug fix: Add a switch in sync type

Add a switch of software/hardware logging mode in sync commit type.

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
Add userspace interface to control kvm_record_mode and print_log

Add userspace interface for record_ctrl.c to control record mode
and the switch of print memory access log to kernel log.

See details in ./record_ctrl.

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
Bug Fix : kvm_record_mode confused in sync/unsync type

Fix bugs:
1. tm_walk_mmu should be off in SOFT mode
2. tm_walk_mmu should be added in PREEMPTION type
3. mmu should be zapped periodically in unsync type

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
A test patch with the correction of AD_bit

Test patch.

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
Remove test information and change printk to print_record

Remove test information, change message printing to print_record.

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
Bug Fix: Error setting spte in memslot_walk_spt

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>
Remove printing log of UNTOUCHED spte entry

Signed-off-by: Arthur Chunqi Li <yzt356@gmail.com>