22 Aug, 2012
5 commits
-
This set of functions is only used to read data from host space, in the
later patch, we will only get a readonly hva in gfn_to_hva_read, and
the function name is a good hint to let gfn_to_hva_read to pair with
kvm_read_hva()/kvm_read_hva_atomic()Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
It can instead of hva_to_pfn_atomic
Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
Quote Avi's comment:
| KVM_MEMSLOT_INVALID is actually an internal symbol, not used by
| userspace. Please move it to kvm_host.h.Also, we divide the memlsot->flags into two parts, the lower 16 bits
are visible for userspace, the higher 16 bits are internally used in
kvmSigned-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
Check flags when memslot is registered from userspace as Avi's suggestion
Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
Currently, we reexecute all unhandleable instructions if they do not
access on the mmio, however, it can not work if host map the readonly
memory to guest. If the instruction try to write this kind of memory,
it will fault again when guest retry it, then we will goto a infinite
loop: retry instruction -> write #PF -> emulation fail ->
retry instruction -> ...Fix it by retrying the instruction only when it faults on the writable
memorySigned-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity
16 Aug, 2012
1 commit
-
else, host continues to update stealtime after reboot,
which can corrupt e.g. initramfs area.
found when tracking down initramfs unpack error on initial reboot
(with qemu-kvm -smp 2, no problem with single-core).Signed-off-by: Florian Westphal
Signed-off-by: Marcelo Tosatti
15 Aug, 2012
1 commit
-
We validate irq pin number when routing is setup, so
code handling illegal irq # in pic and ioapic on each injection
is never called.
Drop it, replace with BUG_ON to catch out of bounds access bugs.Signed-off-by: Michael S. Tsirkin
Signed-off-by: Marcelo Tosatti
14 Aug, 2012
6 commits
-
All processors that support VMX have that feature, and guests (Xen) depend on
it. As we already implement it, advertize it to the guest.Signed-off-by: Avi Kivity
Signed-off-by: Marcelo Tosatti -
MSR_IA32_DEBUGCTLMSR is zeroed on VMEXIT. Restore it to the correct
value.Signed-off-by: Gleb Natapov
Signed-off-by: Marcelo Tosatti -
Signed-off-by: Alexander Graf
Signed-off-by: Raghavendra K T
Signed-off-by: Marcelo Tosatti -
Signed-off-by: Raghavendra K T
Signed-off-by: Marcelo Tosatti -
Thanks Alex for KVM_HC_FEATURES inputs and Jan for VAPIC_POLL_IRQ,
and Peter (HPA) for suggesting hypercall ABI addition.Signed-off-by: Raghavendra K T
Signed-off-by: Marcelo Tosatti -
kvm_guest_time_update unconditionally clears hv_clock.flags field,
so the notification never reaches the guest.Fix it by allowing PVCLOCK_GUEST_STOPPED to passthrough.
Reviewed-by: Eric B Munson
Reviewed-by: Amit Shah
Signed-off-by: Marcelo Tosatti
09 Aug, 2012
1 commit
-
For apic_set_spiv() to track APIC SW state correctly it needs to see
previous and next values of the spurious vector register, but currently
memset() overwrite the old value before apic_set_spiv() get a chance to
do tracking. Fix it by calling apic_set_spiv() before overwriting old
value.Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity
07 Aug, 2012
5 commits
-
Those functions are used during interrupt injection. When inlined they
become nops on the fast path.Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
Usually all vcpus have local apic pointer initialized, so the check may
be completely skipped.Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
Usually all APICs are SW enabled so the check can be optimized out.
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
Usually all APICs are HW enabled so the check can be optimized out.
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
CC: Jason Baron
CC: Ingo Molnar
CC: Peter Zijlstra
Signed-off-by: Gleb Natapov
Acked-by: Jason Baron
Signed-off-by: Avi Kivity
06 Aug, 2012
16 commits
-
According to SDM apic is enabled on start up.
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
Do not change apic_base directly. Use kvm_lapic_set_base() instead.
Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
kvm_get_apic_base() needlessly checks irqchip_in_kernel although it does
the same no matter what result of the check is. kvm_set_apic_base() also
checks for irqchip_in_kernel, but kvm_lapic_set_base() can handle this
case.Signed-off-by: Gleb Natapov
Signed-off-by: Avi Kivity -
Currently, we use the error code as error pfn to indicat the error
condition, it is not straightforward and it will not work on PAE
32-bit cpu with huge memory, since the valid physical address
can be at most 52 bitsFor the normal pfn, the highest 12 bits should be zero, so we can
mask these bits to indicate the error.Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
After commit a2766325cf9f9, the error page is replaced by the
error code, it need not be released anymore[ The patch has been compiling tested for powerpc ]
Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
After commit a2766325cf9f9, the error pfn is replaced by the
error code, it need not be released anymore[ The patch has been compiling tested for powerpc ]
Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
It is used to eliminate the overload of function call and cleanup
the codeSigned-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
Remove it since it is not used anymore
Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
These functions are exported and can not inline, move them
to kvm_host.h to eliminate the overload of function callSigned-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
Then, remove get_bad_pfn
Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
Then, get_hwpoison_pfn and is_hwpoison_pfn can be removed
Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
After that, the exported and un-inline function, get_fault_pfn,
can be removedSigned-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
There are two bugs:
- the 'error page' is forgot to be released
[ it is unneeded after commit a2766325cf9f9, for backport, we
still do kvm_release_pfn_clean for the error pfn ]- guest pages are always released regardless of the unmapped page
(e,g, caused by hwpoison)Signed-off-by: Xiao Guangrong
Signed-off-by: Avi Kivity -
Two reasons:
- x86 can integrate rmap and rmap_pde and remove heuristics in
__gfn_to_rmap().
- Some architectures do not need rmap.Since rmap is one of the most memory consuming stuff in KVM, ppc'd
better restrict the allocation to Book3S HV.Signed-off-by: Takuya Yoshikawa
Acked-by: Paul Mackerras
Signed-off-by: Avi Kivity -
This helps to make rmap architecture specific in a later patch.
Signed-off-by: Takuya Yoshikawa
Signed-off-by: Avi Kivity -
Instead, check npages consistently. This helps to make rmap
architecture specific in a later patch.Signed-off-by: Takuya Yoshikawa
Signed-off-by: Avi Kivity
05 Aug, 2012
1 commit
-
- bring back critical fixes (esp. aa67f6096c19bc)
- provide an updated base for development* upstream: (4334 commits)
missed mnt_drop_write() in do_dentry_open()
UBIFS: nuke pdflush from comments
gfs2: nuke pdflush from comments
drbd: nuke pdflush from comments
nilfs2: nuke write_super from comments
hfs: nuke write_super from comments
vfs: nuke pdflush from comments
jbd/jbd2: nuke write_super from comments
btrfs: nuke pdflush from comments
btrfs: nuke write_super from comments
ext4: nuke pdflush from comments
ext4: nuke write_super from comments
ext3: nuke write_super from comments
Documentation: fix the VM knobs descritpion WRT pdflush
Documentation: get rid of write_super
vfs: kill write_super and sync_supers
ACPI processor: Fix tick_broadcast_mask online/offline regression
ACPI: Only count valid srat memory structures
ACPI: Untangle a return statement for better readability
Linux 3.6-rc1
...Signed-off-by: Avi Kivity
04 Aug, 2012
4 commits
-
Pull VFS fixes and cleanups from Al Viro.
Most of this is the series to remove sync_supers() and the
->write_supers VFS callback from Artem Bityutskiy. One commit to do the
actual removal work, a whole series of commits to fix up stale comments
etc all over the tree.There's also a regression fix for an incorrect use of mnt_drop_write()
in do_dentry_open().* 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
missed mnt_drop_write() in do_dentry_open()
UBIFS: nuke pdflush from comments
gfs2: nuke pdflush from comments
drbd: nuke pdflush from comments
nilfs2: nuke write_super from comments
hfs: nuke write_super from comments
vfs: nuke pdflush from comments
jbd/jbd2: nuke write_super from comments
btrfs: nuke pdflush from comments
btrfs: nuke write_super from comments
ext4: nuke pdflush from comments
ext4: nuke write_super from comments
ext3: nuke write_super from comments
Documentation: fix the VM knobs descritpion WRT pdflush
Documentation: get rid of write_super
vfs: kill write_super and sync_supers -
This one ought to be __mnt_drop_write(), to match __mnt_want_write()
in the beginning...Signed-off-by: Al Viro
-
The pdflush thread is long gone, so this patch removes references to pdflush
from UBIFS comments.Signed-off-by: Artem Bityutskiy
Signed-off-by: Al Viro -
The pdflush thread is long gone, so this patch removes references to pdflush
from gfs comments.Cc: Steven Whitehouse
Signed-off-by: Artem Bityutskiy
Signed-off-by: Al Viro