From: Marcelo Tosatti mtosa...@redhat.com
* upstream-merge: (60 commits)
etraxfs_eth: correct use of ! and
Sparc: update OpenBIOS images to r859
ppc4xx: load Bamboo kernel, initrd, and fdt at fixed addresses
ppc4xx: don't unregister RAM at reset
ppc4xx: correct SDRAM controller warning
From: Wei Yongjun yj...@cn.fujitsu.com
Add LDS/LES/LFS/LGS/LSS instruction emulation.
(opcode 0xc4, 0xc5, 0x0f 0xb2, 0x0f 0xb4~0xb5)
Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
From: Xiaotian Feng df...@redhat.com
Latest kvm mmu_shrink code rework makes kernel changes
kvm-arch.n_used_mmu_pages/
kvm-arch.n_max_mmu_pages at kvm_mmu_free_page/kvm_mmu_alloc_page, which is
called
by kvm_mmu_commit_zap_page. So the kvm-arch.n_used_mmu_pages or
From: Wei Yongjun yj...@cn.fujitsu.com
commit ad05c88266b4cce1c820928ce8a0fb7690912ba1
(KVM: create aggregate kvm_total_used_mmu_pages value)
introduce percpu counter kvm_total_used_mmu_pages but never
destroy it, this may cause oops when rmmod modprobe.
Signed-off-by: Wei Yongjun
From: Wei Yongjun yj...@cn.fujitsu.com
Add JrCXZ instruction emulation (opcode 0xe3)
Used by FreeBSD boot loader.
Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index
From: Zachary Amsden zams...@redhat.com
The VMCB is reset whenever we receive a startup IPI, so Linux is setting
TSC back to zero happens very late in the boot process and destabilizing
the TSC. Instead, just set TSC to zero once at VCPU creation time.
Why the separate patch? So git-bisect is
From: Zachary Amsden zams...@redhat.com
Change svm / vmx to be the same internally and write TSC offset
instead of bare TSC in helper functions. Isolated as a single
patch to contain code movement.
Signed-off-by: Zachary Amsden zams...@redhat.com
Signed-off-by: Marcelo Tosatti
From: Zachary Amsden zams...@redhat.com
If creating an SMP guest with unstable host TSC, issue a warning
Signed-off-by: Zachary Amsden zams...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 3381e9c..5ad4c75 100644
---
From: Zachary Amsden zams...@redhat.com
Attempt to synchronize TSCs which are reset to the same value. In the
case of a reliable hardware TSC, we can just re-use the same offset, but
on non-reliable hardware, we can get closer by adjusting the offset to
match the elapsed time.
Signed-off-by:
From: Zachary Amsden zams...@redhat.com
When CPUs with unstable TSCs enter deep C-state, TSC may stop
running. This causes us to require resynchronization. Since
we can't tell when this may potentially happen, we assume the
worst by forcing re-compensation for it at every point the VCPU
task is
From: Zachary Amsden zams...@redhat.com
Also, ensure that the storing of the offset and the reading of the TSC
are never preempted by taking a spinlock. While the lock is overkill
now, it is useful later in this patch series.
Signed-off-by: Zachary Amsden zams...@redhat.com
Signed-off-by:
From: Zachary Amsden zams...@redhat.com
This simplifies much of the init code; we can now simply always
call tsc_khz_changed, optionally passing it a new value, or letting
it figure out the existing value (while interrupts are disabled, and
thus, by inference from the rule, not raceful against
From: Zachary Amsden zams...@redhat.com
Move the TSC control logic from the vendor backends into x86.c
by adding adjust_tsc_offset to x86 ops. Now all TSC decisions
can be done in one place.
Signed-off-by: Zachary Amsden zams...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
From: Zachary Amsden zams...@redhat.com
Add a helper function to compute the kernel time and convert nanoseconds
back to CPU specific cycles. Note that these must not be called in preemptible
context, as that would mean the kernel could enter software suspend state,
which would cause non-atomic
From: Zachary Amsden zams...@redhat.com
Make the match of TSC find TSC writes that are close to each other
instead of perfectly identical; this allows the compensator to also
work in migration / suspend scenarios.
Signed-off-by: Zachary Amsden zams...@redhat.com
Signed-off-by: Marcelo Tosatti
From: Zachary Amsden zams...@redhat.com
If there are active VCPUs which are marked as belonging to
a particular hardware CPU, request a clock sync for them when
enabling hardware; the TSC could be desynchronized on a newly
arriving CPU, and we need to recompute guests system time
relative to boot
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
Combine guest pte read between guest pte check in the fetch path and pte
prefetch
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/paging_tmpl.h
From: Zachary Amsden zams...@redhat.com
The scale_delta function for shift / multiply with 31-bit
precision moves to a common header so it can be used by both
kernel and kvm module.
Signed-off-by: Zachary Amsden zams...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
Introduce hva_to_pfn_atomic(), it's the fast path and can used in atomic
context, the later patch will use it
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git
From: Zachary Amsden zams...@redhat.com
Kernel time, which advances in discrete steps may progress much slower
than TSC. As a result, when kvmclock is adjusted to a new base, the
apparent time to the guest, which runs at a much higher, nsec scaled
rate based on the current TSC, may have already
From: Alexander Graf ag...@suse.de
The one big missing feature in s390-virtio was hotplugging. This is no more.
This patch implements hotplug add support, so you can on the fly add new devices
in the guest.
Keep in mind that this needs a patch for qemu to actually leverage the
functionality.
From: Gleb Natapov g...@redhat.com
Signed-off-by: Gleb Natapov g...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index c5f4761..f219803 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2934,6
From: Alexander Graf ag...@suse.de
As suggested by Christian, we should expose headers to user space with
information that might be valuable there. The s390 virtio interface is
one of those cases. It defines an ABI between hypervisor and guest, so
it should be exposed to user space.
Reported-by:
From: Zachary Amsden zams...@redhat.com
Basic informational document about x86 timekeeping and how KVM
is affected.
Signed-off-by: Zachary Amsden zams...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/Documentation/kvm/timekeeping.txt
From: Zachary Amsden zams...@redhat.com
The CPU_STARTING callback was added upstream with the intention
of being used for KVM, specifically for the hardware enablement
that must be done before we can run in hardware virt. It had
bugs on the x86_64 architecture at the time, where it was called
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
Introduce this function to get consecutive gfn's pages, it can reduce
gup's overload, used by later patch
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
This function is used by KVM to pin process's page in the atomic context.
Define the 'weak' function to avoid other architecture not support it
Acked-by: Nick Piggin npig...@suse.de
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
From: Avi Kivity a...@redhat.com
Use the new byte/word dual opcode decode.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 921d265..0163150 100644
--- a/arch/x86/kvm/emulate.c
+++
From: Avi Kivity a...@redhat.com
Many x86 instructions come in byte and word variants distinguished with bit
0 of the opcode. Add macros to aid in defining them.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c
From: Avi Kivity a...@redhat.com
Use the new byte/word dual opcode decode.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index ac76a14..204be81 100644
--- a/arch/x86/kvm/emulate.c
+++
From: Wei Yongjun yj...@cn.fujitsu.com
Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 79d23b4..d613690 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@
From: Avi Kivity a...@redhat.com
Use the new byte/word dual opcode decode.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 204be81..dd41b06 100644
--- a/arch/x86/kvm/emulate.c
+++
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
Support prefetch ptes when intercept guest #PF, avoid to #PF by later
access
If we meet any failure in the prefetch path, we will exit it and
not try other ptes to avoid become heavy path
Signed-off-by: Xiao Guangrong
From: Avi Kivity a...@redhat.com
Use the new byte/word dual opcode decode.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index dd41b06..ab78474 100644
--- a/arch/x86/kvm/emulate.c
+++
From: Gleb Natapov g...@redhat.com
x86_emulate_insn() will return 1 if instruction can be restarted
without re-entering a guest.
Signed-off-by: Gleb Natapov g...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/include/asm/kvm_emulate.h
From: Avi Kivity a...@redhat.com
Use the new byte/word dual opcode decode.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index ab78474..51a2803 100644
--- a/arch/x86/kvm/emulate.c
+++
From: Avi Kivity a...@redhat.com
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index fe4e2cc..4ff870c 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -504,6 +504,12 @@
From: Avi Kivity a...@redhat.com
Like DIV and IDIV.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 5a39c47..fe4e2cc 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
From: Avi Kivity a...@redhat.com
operand::val and operand::orig_val are 32-bit on i386, whereas cmpxchg8b
operands are 64-bit.
Fix by adding val64 and orig_val64 union members to struct operand, and
using them where needed.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo
From: Avi Kivity a...@redhat.com
The ALU opcode block is very regular; introduce D6ALU() to define decode
flags for 6 instructions at a time.
Suggested by Paolo Bonzini.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git
From: Avi Kivity a...@redhat.com
Use the new byte/word dual opcode decode.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 51a2803..5a39c47 100644
--- a/arch/x86/kvm/emulate.c
+++
From: Avi Kivity a...@redhat.com
SrcMemFAddr is not defined with the modrm operand designating a register
instead of a memory address.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index
From: Jason Wang jasow...@redhat.com
Pit interrupt injection was done by workqueue, so no need to check
pending pit timer in vcpu thread which could lead unnecessary
unblocking of vcpu.
Signed-off-by: Jason Wang jasow...@redhat.com
Signed-off-by: Avi Kivity a...@redhat.com
diff --git
From: Marcelo Tosatti mtosa...@redhat.com
Conflicts:
arch/s390/include/asm/Kbuild
arch/x86/kvm/svm.c
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
--
To unsubscribe from this list: send the line unsubscribe kvm-commits in
the body of a message to majord...@vger.kernel.org
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
There is a bugs in this function, we call gfn_to_pfn() and
kvm_mmu_gva_to_gpa_read() in
atomic context(kvm_mmu_audit() is called under the spinlock(mmu_lock)'s
protection).
This patch fix it by:
- introduce gfn_to_pfn_atomic instead of
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
Nothing is checked in count_rmaps(), so remove it
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
Signed-off-by: Avi Kivity a...@redhat.com
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 0d91f60..0bff4d5 100644
---
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
The read-only spte also has reverse mapping, so fix the code to check them,
also modify the function name to fit its doing
Signed-off-by: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
Signed-off-by: Avi Kivity a...@redhat.com
diff --git
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
The audit code reports some sp not write protected in current code, it's just
the
bug in audit_write_protection(), since:
- the invalid sp not need write protected
- using uninitialize local variable('gfn')
- call kvm_mmu_audit() out of
From: Avi Kivity a...@redhat.com
Use the new byte/word dual opcode decode.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 0163150..ac76a14 100644
--- a/arch/x86/kvm/emulate.c
+++
From: Alexander Graf ag...@suse.de
Currenty the ext_param field only distinguishes between config change and
vring interrupt. We can do a lot more with it though, so let's enable a
full byte of possible values and constants to #defines while at it.
Signed-off-by: Alexander Graf ag...@suse.de
From: Xiao Guangrong xiaoguangr...@cn.fujitsu.com
fix:
arch/x86/kvm/mmu.c: In function ‘kvm_mmu_unprotect_page’:
arch/x86/kvm/mmu.c:1741: warning: format ‘%lx’ expects type ‘long unsigned
int’, but argument 3 has type ‘gfn_t’
arch/x86/kvm/mmu.c:1745: warning: format ‘%lx’ expects type ‘long
From: Zachary Amsden zams...@redhat.com
Add a kernel call to get the number of nanoseconds since boot. This
is generally useful enough to make it a generic call.
Signed-off-by: Zachary Amsden zams...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git
From: Wei Yongjun yj...@cn.fujitsu.com
Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/x86/realmode.c b/x86/realmode.c
index b69e474..8c771fc 100644
--- a/x86/realmode.c
+++ b/x86/realmode.c
@@ -1184,6 +1184,64 @@ void
From: Wei Yongjun yj...@cn.fujitsu.com
Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/x86/realmode.c b/x86/realmode.c
index 8c771fc..a833829 100644
--- a/x86/realmode.c
+++ b/x86/realmode.c
@@ -1242,6 +1242,47 @@ void
From: Avi Kivity a...@redhat.com
Test divide-by-zero and normal cases.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/x86/emulator.c b/x86/emulator.c
index 5d1659f..845e7a0 100644
--- a/x86/emulator.c
+++ b/x86/emulator.c
@@ -577,6
From: Avi Kivity a...@redhat.com
Some instructions trap on execution, we need a way to see if they raise an
exception as expected.
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/config-x86-common.mak b/config-x86-common.mak
index
From: Avi Kivity a...@redhat.com
Signed-off-by: Avi Kivity a...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/x86/idt.c b/x86/idt.c
index 590839f..4480833 100644
--- a/x86/idt.c
+++ b/x86/idt.c
@@ -100,6 +100,11 @@ asm (.pushsection .text \n\t
pushq $13 \n\t
From: Jason Wang jasow...@redhat.com
config.mak was generated by configure and kvmtrace were compiled
throuh makefile.
Signed-off-by: Jason Wang jasow...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/config.mak b/config.mak
deleted file mode 100644
index
From: Jason Wang jasow...@redhat.com
Remove the obsoleted target and directories.
Signed-off-by: Jason Wang jasow...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/Makefile b/Makefile
index 5347ce8..d25e6f2 100644
--- a/Makefile
+++ b/Makefile
@@ -30,10 +30,6 @@
From: Jason Wang jasow...@redhat.com
CR8 is only available in long mode.
Signed-off-by: Jason Wang jasow...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/x86/vmexit.c b/x86/vmexit.c
index 819c24b..84c384d 100644
--- a/x86/vmexit.c
+++ b/x86/vmexit.c
@@ -49,6 +49,7
From: Wei Yongjun yj...@cn.fujitsu.com
Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/x86/realmode.c b/x86/realmode.c
index a833829..d171a56 100644
--- a/x86/realmode.c
+++ b/x86/realmode.c
@@ -437,6 +437,7 @@ void test_call(void)
From: Jason Wang jasow...@redhat.com
Signed-off-by: Jason Wang jasow...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/x86/msr.c b/x86/msr.c
index 9c85369..c3e0014 100644
--- a/x86/msr.c
+++ b/x86/msr.c
@@ -49,9 +49,11 @@ struct msr_info msr_info[] =
{ .index =
From: Jason Wang jasow...@redhat.com
We've already had lib/printf.c.
Signed-off-by: Jason Wang jasow...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/config-x86-common.mak b/config-x86-common.mak
index 76e36c3..fdb9e3e 100644
--- a/config-x86-common.mak
+++
From: Jason Wang jasow...@redhat.com
Signed-off-by: Jason Wang jasow...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/config-x86-common.mak b/config-x86-common.mak
index 0ed13e4..76e36c3 100644
--- a/config-x86-common.mak
+++ b/config-x86-common.mak
@@ -32,18 +32,18
From: Jason Wang jasow...@redhat.com
They have been implemented in lib/x86/processor.h. Also rename the
cpuid to cpuid_test because cpuid have been defined.
Signed-off-by: Jason Wang jasow...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/x86/msr.c b/x86/msr.c
index
From: Jason Wang jasow...@redhat.com
Add smp initlaization codes for 32bit. This would make the 32bit
smp tests available.
Signed-off-by: Jason Wang jasow...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/x86/cstart.S b/x86/cstart.S
index 1bdf789..ae1fdbb 100644
---
From: Jason Wang jasow...@redhat.com
TSS size should be 104 bytes.
Signed-off-by: Jason Wang jasow...@redhat.com
Signed-off-by: Marcelo Tosatti mtosa...@redhat.com
diff --git a/x86/cstart64.S b/x86/cstart64.S
index 5d358ad..ef09d82 100644
--- a/x86/cstart64.S
+++ b/x86/cstart64.S
@@ -68,7 +68,7
67 matches
Mail list logo