Using vmx msr store/load mechanism and msr intercept bitmap
to implement LBR virtualization.
Signed-off-by: Jian Zhou
Signed-off-by: Stephen He
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 2beee03..244f68c 100644
--- a/arch/x86/include/asm/kvm_host.h
ping...
> Using vmx msr store/load mechanism and msr intercept bitmap
> to implement LBR virtualization.
>
> Signed-off-by: Jian Zhou
> Signed-off-by: Stephen He
>
> diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> index 2beee03..244
On 12/10/2015 20:44, Paolo Bonzini wrote:
On 12/10/2015 14:10, Jian Zhou wrote:
ping...
I think your expectations for review RTT are a bit too optimistic.
I have only worked 4 hours since you posted the patch... But it was on
my list anyway, so let's do it.
Thank for Paolo'
On 2015/10/14 19:30, Paolo Bonzini wrote:
On 14/10/2015 13:26, Jian Zhou wrote:
On 12/10/2015 20:44, Paolo Bonzini wrote:
In addition, the MSR numbers may differ between the guest and the host,
because it is possible to emulate e.g. a Core CPU on a Core 2 CPU. So I
recommend against using
Does it depend on vPMU _for Linux guests_ or in general? My impression
is that LBR can be used by the guest independent of the PMU.
I think only for Linux guests.
I googled how to enable LBR on other guests(except Linux guests),
e.g. Windows, and got no developer manuals about it.
Macros about LBR MSRs.
Signed-off-by: Jian Zhou
Signed-off-by: Stephen He
---
arch/x86/include/asm/msr-index.h | 26 --
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index b98b471
reorgnized, LBRV
can be enabled or not according to the guest CPUID
Jian Zhou (4):
KVM: X86: Add arrays to save/restore LBR MSRs
KVM: X86: LBR MSRs of supported CPU types
KVM: X86: Migration is supported
KVM: VMX: details of LBR virtualization implementation
arch/x86/include/asm/kvm_host.h
Supported bits of MSR_IA32_DEBUGCTLMSR are DEBUGCTLMSR_LBR(bit 0),
DEBUGCTLMSR_BTF(bit 1) and DEBUGCTLMSR_FREEZE_LBRS_ON_PMI(bit 11).
Qemu can get/set contents of LBR MSRs and LBR status in order to
support migration.
Signed-off-by: Jian Zhou
Signed-off-by: Stephen He
---
arch/x86/kvm/x86.c
Add arrays in kvm_vcpu_arch struct to save/restore
LBR MSRs at vm exit/entry time.
Add new hooks to set/get DEBUGCTLMSR and LBR MSRs.
Signed-off-by: Jian Zhou
Signed-off-by: Stephen He
---
arch/x86/include/asm/kvm_host.h | 26 --
1 file changed, 20 insertions(+), 6
Using msr intercept bitmap and arrays(save/restore LBR MSRs)
in kvm_vcpu_arch struct to support LBR virtualization.
Add a parameter of kvm_intel module to permanently disable
LBRV.
Reorgnized the table of supported CPUs, LBRV can be enabled
or not according to the guest CPUID.
Signed-off-by: Jian
Add arrays in kvm_vcpu_arch struct to save/restore
LBR MSRs at vm exit/entry time.
Add new hooks to set/get DEBUGCTLMSR and LBR MSRs.
Signed-off-by: Jian Zhou
Signed-off-by: Stephen He
---
arch/x86/include/asm/kvm_host.h | 26 --
1 file changed, 20 insertions(+), 6
reorgnized, LBRV
can be enabled or not according to the guest CPUID
Jian Zhou (4):
KVM: X86: Add arrays to save/restore LBR MSRs
KVM: X86: LBR MSRs of supported CPU types
KVM: X86: Migration is supported
KVM: VMX: details of LBR virtualization implementation
arch/x86/include/asm/kvm_host.h
Using msr intercept bitmap and arrays(save/restore LBR MSRs)
in kvm_vcpu_arch struct to support LBR virtualization.
Add a parameter of kvm_intel module to permanently disable
LBRV.
Reorgnized the table of supported CPUs, LBRV can be enabled
or not according to the guest CPUID.
Signed-off-by: Jian
Supported bits of MSR_IA32_DEBUGCTLMSR are DEBUGCTLMSR_LBR(bit 0),
DEBUGCTLMSR_BTF(bit 1) and DEBUGCTLMSR_FREEZE_LBRS_ON_PMI(bit 11).
Qemu can get/set contents of LBR MSRs and LBR status in order to
support migration.
Signed-off-by: Jian Zhou
Signed-off-by: Stephen He
---
arch/x86/kvm/x86.c
Macros about LBR MSRs.
Signed-off-by: Jian Zhou
Signed-off-by: Stephen He
---
arch/x86/include/asm/msr-index.h | 26 --
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index b98b471
tested core2duo, Nehalem, Westmere, SandyBridge,
IvyBridge, Haswell and Broadwell.
Because LBR depends on the CPU model, it needs to add '-cpu ...'
in the command line of x86-run bash script.
Signed-off-by: Jian Zhou
---
x86/msr.c | 88
Hi Paolo,
May I ask that any suggestion about the version 2 of VMX LBRV?
This version is updated following your advices in version 1.
BTW the kvm-unit-test for this feature has sent too, and I
have tested the CPUs emulated by QEMU.
Thanks,
Jian
On 2015/10/23 17:15, Jian Zhou wrote:
Changelog
On 2015/11/9 17:06, Paolo Bonzini wrote:
On 09/11/2015 02:33, Jian Zhou wrote:
Hi Paolo,
May I ask that any suggestion about the version 2 of VMX LBRV?
This version is updated following your advices in version 1.
BTW the kvm-unit-test for this feature has sent too, and I
have tested the CPUs
On 2015/11/11 23:15, Paolo Bonzini wrote:
On 23/10/2015 11:15, Jian Zhou wrote:
data *msr_info)
}
break;
case MSR_IA32_DEBUGCTLMSR:
- if (!data) {
- /* We support the non-activated case already
On 2015/11/11 23:23, Paolo Bonzini wrote:
On 23/10/2015 11:15, Jian Zhou wrote:
Changelog in v2:
(1) move the implementation into vmx.c
(2) migraton is supported
(3) add arrays in kvm_vcpu_arch struct to save/restore
LBR MSRs at vm exit/entry time.
(4) add a parameter of
On 2015/11/12 17:00, Paolo Bonzini wrote:
On 12/11/2015 08:06, Jian Zhou wrote:
I think you can just do this in kvm_x86_ops->set_msr. The old
implementation for DEBUGCTL MSR can be moved to svm.c.
I think you mean "moved to vmx.c"?
No, the old implementation is moved
Signed-off-by: Jian Zhou
Signed-off-by: Stephen He
---
arch/x86/include/asm/msr-index.h | 26 --
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
index b98b471..942af1f 100644
--- a/arch
CPUs is reorgnized, LBRV
can be enabled or not according to the guest CPUID
Jian Zhou (4):
KVM: X86: Names and addresses of LBR MSRs
KVM: X86: Add arrays to save/restore LBR MSRs
KVM: X86: Implementation of DEBUGCTLMSR is moved
KVM: VMX: Implementation of DEBUGCTLMSR and LBRV
arch/x86
Add arrays in kvm_vcpu_arch struct to save/restore
host/guest LBR MSRs at vm exit/entry time.
Signed-off-by: Jian Zhou
Signed-off-by: Stephen He
---
arch/x86/include/asm/kvm_host.h | 22 --
1 file changed, 16 insertions(+), 6 deletions(-)
diff --git a/arch/x86/include/asm
Move the old implementation of DEBUGCTLMSR from x86.c to vmx.c
Signed-off-by: Jian Zhou
Signed-off-by: Stephen He
---
arch/x86/kvm/x86.c | 24 +---
1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 9a9a198..9133c48
the migration is supported.
Signed-off-by: Jian Zhou
Signed-off-by: Stephen He
---
arch/x86/kvm/vmx.c | 335 +
1 file changed, 335 insertions(+)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6a8bc64..2d4e90b 100644
--- a/arch/x86
26 matches
Mail list logo