On 08/31/2015 03:46 PM, Michael S. Tsirkin wrote:
On Mon, Aug 31, 2015 at 10:53:58AM +0800, Xiao Guangrong wrote:
On 08/30/2015 05:12 PM, Michael S. Tsirkin wrote:
Even when we skip data decoding, MMIO is slightly slower
than port IO because it uses the page-tables, so the CPU
must do
Linus, I am sorry for the annoyance.
On 09/01/2015 08:47 AM, Linus Torvalds wrote:
Hmm:
On Fri, Aug 14, 2015 at 4:57 PM, Paolo Bonzini <pbonz...@redhat.com> wrote:
Xiao Guangrong (9):
KVM: MMU: fully check zero bits for sptes
The above commit causes an annoying new compiler w
On 08/31/2015 07:27 PM, Michael S. Tsirkin wrote:
On Mon, Aug 31, 2015 at 04:32:52PM +0800, Xiao Guangrong wrote:
On 08/31/2015 03:46 PM, Michael S. Tsirkin wrote:
On Mon, Aug 31, 2015 at 10:53:58AM +0800, Xiao Guangrong wrote:
On 08/30/2015 05:12 PM, Michael S. Tsirkin wrote:
Even
On 08/30/2015 05:12 PM, Michael S. Tsirkin wrote:
Even when we skip data decoding, MMIO is slightly slower
than port IO because it uses the page-tables, so the CPU
must do a pagewalk on each access.
This overhead is normally masked by using the TLB cache:
but not so for KVM MMIO, where PTEs
On 08/30/2015 05:12 PM, Michael S. Tsirkin wrote:
Even when we skip data decoding, MMIO is slightly slower
than port IO because it uses the page-tables, so the CPU
must do a pagewalk on each access.
This overhead is normally masked by using the TLB cache:
but not so for KVM MMIO, where PTEs
Pass PCOMMIT CPU feature to guest to enable PCOMMIT instruction
Currently we do not catch pcommit instruction for L1 guest and
allow L1 to catch this instruction for L2
The specification locates at:
https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf
Signed-off-by: Xiao
if vmx_rdtscp_supported() is true SECONDARY_EXEC_RDTSCP must
have already been set in current vmcs by
vmx_secondary_exec_control()
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/vmx.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch
SECONDARY_EXEC_RDTSCP set for L2 guest comes from vmcs12
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/vmx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index b526c61..f7a721e 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm
-by: Xiao Guangrong
---
arch/x86/kvm/vmx.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 99f638e..0d68140 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -8684,20 +8684,13 @@ static void vmx_cpuid_update
It's used to clean up the code
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/vmx.c | 42 +++---
1 file changed, 19 insertions(+), 23 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4f238b7..58f7b89 100644
--- a/arch/x86/kvm/vmx.c
Unify the update in vmx_cpuid_update()
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/vmx.c | 21 +++--
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 0d68140..4f238b7 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86
Check cpuid bit instead of it
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/cpuid.h | 8
arch/x86/kvm/vmx.c | 19 ++-
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h
index aed7bfe..d434ee9 100644
these three instructions for guest
patch 4 ~ patch 9 simplify current VMX code
Xiao Guangrong (9):
KVM: MMU: fix use uninitialized value
KVM: x86: allow guest to use cflushopt anc clwb
KVM: x86: add pcommit support
KVM: VMX: drop rdtscp_enabled check in prepare_vmcs02()
KVM: VMX: simplify
ere
int root, leaf;
It's true as shadow_walk_init() may stop the loop
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 70c375f..a8a5b8d 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/
Pass its CPU feature to guest to enable them in guest
These are needed by nvdimm drivers
The specification locates at:
https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/cpuid.c | 2 +-
1 file changed, 1 insertion(+), 1
Pass PCOMMIT CPU feature to guest to enable PCOMMIT instruction
Currently we do not catch pcommit instruction for L1 guest and
allow L1 to catch this instruction for L2
The specification locates at:
https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf
Signed-off-by: Xiao
if vmx_rdtscp_supported() is true SECONDARY_EXEC_RDTSCP must
have already been set in current vmcs by
vmx_secondary_exec_control()
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/vmx.c | 17 -
1 file changed, 8 insertions(+), 9 deletions(-)
diff
SECONDARY_EXEC_RDTSCP set for L2 guest comes from vmcs12
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/vmx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index b526c61..f7a721e 100644
--- a/arch/x86
root, leaf;
It's true as shadow_walk_init() may stop the loop
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 70c375f..a8a5b8d 100644
--- a/arch
-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/vmx.c | 19 ++-
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 99f638e..0d68140 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -8684,20 +8684,13
It's used to clean up the code
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/vmx.c | 42 +++---
1 file changed, 19 insertions(+), 23 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 4f238b7..58f7b89
Unify the update in vmx_cpuid_update()
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/vmx.c | 21 +++--
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 0d68140..4f238b7 100644
--- a/arch
Check cpuid bit instead of it
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/cpuid.h | 8
arch/x86/kvm/vmx.c | 19 ++-
2 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/arch/x86/kvm/cpuid.h b/arch/x86/kvm/cpuid.h
index
these three instructions for guest
patch 4 ~ patch 9 simplify current VMX code
Xiao Guangrong (9):
KVM: MMU: fix use uninitialized value
KVM: x86: allow guest to use cflushopt anc clwb
KVM: x86: add pcommit support
KVM: VMX: drop rdtscp_enabled check in prepare_vmcs02()
KVM: VMX: simplify
Pass its CPU feature to guest to enable them in guest
These are needed by nvdimm drivers
The specification locates at:
https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/cpuid.c | 2 +-
1
On 08/05/2015 06:12 PM, Paolo Bonzini wrote:
On 05/08/2015 06:04, Xiao Guangrong wrote:
- for_each_shadow_entry_lockless(vcpu, addr, iterator, spte)
+ for_each_shadow_entry_lockless(vcpu, addr, iterator, spte) {
+ leaf = iterator.level;
+
+ if (!root
On 08/05/2015 06:12 PM, Paolo Bonzini wrote:
On 05/08/2015 06:04, Xiao Guangrong wrote:
- for_each_shadow_entry_lockless(vcpu, addr, iterator, spte)
+ for_each_shadow_entry_lockless(vcpu, addr, iterator, spte) {
+ leaf = iterator.level;
+
+ if (!root
FNAME(is_rsvd_bits_set) does not depend on guest mmu mode, move it
to mmu.c to stop being compiled multiple times
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 8
arch/x86/kvm/paging_tmpl.h | 13 ++---
2 files changed, 10 insertions(+), 11 deletions(-)
diff
only check the
reserved bits on hardware but also check other bits that spte never used
Xiao Guangrong (9):
KVM: MMU: fix validation of mmio page fault
KVM: MMU: move FNAME(is_rsvd_bits_set) to mmu.c
KVM: MMU: introduce rsvd_bits_validate
KVM: MMU: split reset_rsvds_bits_mask
KVM:
These two fields, rsvd_bits_mask and bad_mt_xwr, in "struct kvm_mmu" are
used to check if reserved bits set on guest ptes, move them to a data
struct so that the approach can be applied to check host shadow page
table entries as well
Signed-off-by: Xiao Guangrong
---
arch/x86/i
Since shdow ept page tables and intel nested guest page tables have the
same format, split reset_rsvds_bits_mask_ept so that the logic can be
reused by later patches which check zero bits on sptes
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 14 ++
1 file changed, 10
We have abstracted the data struct and functions which are used to check
reserved bit on guest page tables, now we extend the logic to check
zero bits on shadow page tables
The zero bits on sptes include not only reserved bits on hardware but also
the bits sptes nerve used
Signed-off-by: Xiao
r backport. Full check will be introduced in later patches
Reported-by: Pavel Shirshov
Tested-by: Pavel Shirshov
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 45 -
1 file changed, 45 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/m
but also
the bits spte never used, then dump the shadow page table hierarchy
if the real bug is detected
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 41 +++--
1 file changed, 35 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch
The logic used to check ept misconfig is completely contained in common
reserved bits check for sptes, so it can be removed
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 22
arch/x86/kvm/mmu.h | 1 -
arch/x86/kvm/vmx.c | 74
Since softmmu & AMD nested shadow page tables and guest page tables have
the same format, split reset_rsvds_bits_mask so that the logic can be
reused by later patches which check zero bits on sptes
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 26 ++
1
We have the same data struct to check reserved bits on guest page tables
and shadow page tables, split is_rsvd_bits_set() so that the logic can be
shared between these two paths
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 28 +++-
1 file changed, 19 insertions
On 08/05/2015 12:58 AM, Alex Williamson wrote:
The patch was munged on commit to re-order these tests resulting in
excessive warnings when trying to do device assignment. Return to
original ordering: https://lkml.org/lkml/2015/7/15/769
Reviewed-by: Xiao Guangrong
--
To unsubscribe from
On 08/04/2015 09:23 PM, Paolo Bonzini wrote:
On 04/08/2015 15:10, Xiao Guangrong wrote:
This should be cpu_has_nx, I think.
cpu_has_nx() checks the feature on host CPU, however, this is the shadow
page table which completely follow guest's features.
E.g, if guest does not execution
On 08/04/2015 08:14 PM, Paolo Bonzini wrote:
On 04/08/2015 12:59, Xiao Guangrong wrote:
+/*
+ * the page table on host is the shadow page table for the page
+ * table in guest or amd nested guest, its mmu features completely
+ * follow the features in guest.
+ */
+void
CCed Pavel Shirshov
Sorry, git tool missed to CC mail to the person tagged with "Reported-by"
and "Tested-by". :(
On 08/04/2015 06:59 PM, Xiao Guangrong wrote:
Current code validating mmio #PF is buggy, it was spotted by Pavel
Shirshov, the bug is that qemu complained wit
FNAME(is_rsvd_bits_set) does not depend on guest mmu mode, move it
to mmu.c to stop being compiled multiple times
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 8
arch/x86/kvm/paging_tmpl.h | 13 ++---
2 files changed, 10 insertions(+), 11 deletions(-)
diff
Since softmmu & AMD nested shadow page tables and guest page tables have
the same format, split reset_rsvds_bits_mask so that the logic can be
reused by later patches which check reserved bits on sptes
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 26 ++
1
s on
guest pte to check sptes
Xiao Guangrong (9):
KVM: MMU: fix validation of mmio page fault
KVM: MMU: move FNAME(is_rsvd_bits_set) to mmu.c
KVM: MMU: introduce rsvd_bits_validate
KVM: MMU: split reset_rsvds_bits_mask
KVM: MMU: split reset_rsvds_bits_mask_ept
KVM: MMU: introduce the
r backport. Full check will be introduced in later patches
Reported-by: Pavel Shirshov
Tested-by: Pavel Shirshov
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 45 -
1 file changed, 45 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/m
These two fields, rsvd_bits_mask and bad_mt_xwr, in "struct kvm_mmu" are
used to check if reserved bits set on guest ptes, move them to a data
struct so that the approach can be applied to check reserved bits on host
shadow page table entries
Signed-off-by: Xiao Guangrong
---
arch/x
We have abstracted the data struct and functions which are used to check
reserved bit on guest page tables, now we extend the logic to check
reserved bits on shadow page tables
Signed-off-by: Xiao Guangrong
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm/mmu.c | 51
We have the same data struct to check reserved bits on guest page tables
and shadow page tables, split is_rsvd_bits_set() so that the logic can be
shared between these two paths
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 28 +++-
1 file changed, 19 insertions
is the real bug is
detected
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 41 +++--
1 file changed, 35 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 3f9ce29..6b0e9c9 100644
--- a/arch/x86/kvm/mmu.c
+++ b/arch/x86
The logic used to check ept misconfig is completely contained in common
reserved bits check for sptes, so it can be removed
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 22
arch/x86/kvm/mmu.h | 1 -
arch/x86/kvm/vmx.c | 74
Since shdow ept page tables and intel nested guest page tables have the
same format, split reset_rsvds_bits_mask_ept so that the logic can be
reused by later patches which check reserved bits on sptes
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mmu.c | 14 ++
1 file changed, 10
CCed Pavel Shirshov ru.pc...@gmail.com
Sorry, git tool missed to CC mail to the person tagged with Reported-by
and Tested-by. :(
On 08/04/2015 06:59 PM, Xiao Guangrong wrote:
Current code validating mmio #PF is buggy, it was spotted by Pavel
Shirshov, the bug is that qemu complained with KVM
Since shdow ept page tables and intel nested guest page tables have the
same format, split reset_rsvds_bits_mask_ept so that the logic can be
reused by later patches which check reserved bits on sptes
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 14
The logic used to check ept misconfig is completely contained in common
reserved bits check for sptes, so it can be removed
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 22
arch/x86/kvm/mmu.h | 1 -
arch/x86/kvm/vmx.c | 74
is the real bug is
detected
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 41 +++--
1 file changed, 35 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c
index 3f9ce29..6b0e9c9 100644
--- a/arch
We have the same data struct to check reserved bits on guest page tables
and shadow page tables, split is_rsvd_bits_set() so that the logic can be
shared between these two paths
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 28
check will be introduced in later patches
Reported-by: Pavel Shirshov ru.pc...@gmail.com
Tested-by: Pavel Shirshov ru.pc...@gmail.com
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 45 -
1 file changed, 45 deletions
These two fields, rsvd_bits_mask and bad_mt_xwr, in struct kvm_mmu are
used to check if reserved bits set on guest ptes, move them to a data
struct so that the approach can be applied to check reserved bits on host
shadow page table entries
Signed-off-by: Xiao Guangrong guangrong.x
We have abstracted the data struct and functions which are used to check
reserved bit on guest page tables, now we extend the logic to check
reserved bits on shadow page tables
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/kvm
FNAME(is_rsvd_bits_set) does not depend on guest mmu mode, move it
to mmu.c to stop being compiled multiple times
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 8
arch/x86/kvm/paging_tmpl.h | 13 ++---
2 files changed, 10
Since softmmu AMD nested shadow page tables and guest page tables have
the same format, split reset_rsvds_bits_mask so that the logic can be
reused by later patches which check reserved bits on sptes
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 26
pte to check sptes
Xiao Guangrong (9):
KVM: MMU: fix validation of mmio page fault
KVM: MMU: move FNAME(is_rsvd_bits_set) to mmu.c
KVM: MMU: introduce rsvd_bits_validate
KVM: MMU: split reset_rsvds_bits_mask
KVM: MMU: split reset_rsvds_bits_mask_ept
KVM: MMU: introduce the framework
On 08/04/2015 09:23 PM, Paolo Bonzini wrote:
On 04/08/2015 15:10, Xiao Guangrong wrote:
This should be cpu_has_nx, I think.
cpu_has_nx() checks the feature on host CPU, however, this is the shadow
page table which completely follow guest's features.
E.g, if guest does not execution
On 08/04/2015 08:14 PM, Paolo Bonzini wrote:
On 04/08/2015 12:59, Xiao Guangrong wrote:
+/*
+ * the page table on host is the shadow page table for the page
+ * table in guest or amd nested guest, its mmu features completely
+ * follow the features in guest.
+ */
+void
On 08/05/2015 12:58 AM, Alex Williamson wrote:
The patch was munged on commit to re-order these tests resulting in
excessive warnings when trying to do device assignment. Return to
original ordering: https://lkml.org/lkml/2015/7/15/769
Reviewed-by: Xiao Guangrong guangrong.x
We have the same data struct to check reserved bits on guest page tables
and shadow page tables, split is_rsvd_bits_set() so that the logic can be
shared between these two paths
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 28
These two fields, rsvd_bits_mask and bad_mt_xwr, in struct kvm_mmu are
used to check if reserved bits set on guest ptes, move them to a data
struct so that the approach can be applied to check host shadow page
table entries as well
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
the
reserved bits on hardware but also check other bits that spte never used
Xiao Guangrong (9):
KVM: MMU: fix validation of mmio page fault
KVM: MMU: move FNAME(is_rsvd_bits_set) to mmu.c
KVM: MMU: introduce rsvd_bits_validate
KVM: MMU: split reset_rsvds_bits_mask
KVM: MMU: split
Since shdow ept page tables and intel nested guest page tables have the
same format, split reset_rsvds_bits_mask_ept so that the logic can be
reused by later patches which check zero bits on sptes
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 14
FNAME(is_rsvd_bits_set) does not depend on guest mmu mode, move it
to mmu.c to stop being compiled multiple times
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 8
arch/x86/kvm/paging_tmpl.h | 13 ++---
2 files changed, 10
Since softmmu AMD nested shadow page tables and guest page tables have
the same format, split reset_rsvds_bits_mask so that the logic can be
reused by later patches which check zero bits on sptes
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 26
We have abstracted the data struct and functions which are used to check
reserved bit on guest page tables, now we extend the logic to check
zero bits on shadow page tables
The zero bits on sptes include not only reserved bits on hardware but also
the bits sptes nerve used
Signed-off-by: Xiao
check will be introduced in later patches
Reported-by: Pavel Shirshov ru.pc...@gmail.com
Tested-by: Pavel Shirshov ru.pc...@gmail.com
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 45 -
1 file changed, 45 deletions
but also
the bits spte never used, then dump the shadow page table hierarchy
if the real bug is detected
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 41 +++--
1 file changed, 35 insertions(+), 6 deletions(-)
diff --git
The logic used to check ept misconfig is completely contained in common
reserved bits check for sptes, so it can be removed
Signed-off-by: Xiao Guangrong guangrong.x...@linux.intel.com
---
arch/x86/kvm/mmu.c | 22
arch/x86/kvm/mmu.h | 1 -
arch/x86/kvm/vmx.c | 74
On 07/23/2015 02:26 PM, Paolo Bonzini wrote:
Make them clearly architecture-dependent; the capability is valid for
all architectures, but the argument is not.
Reviewed-by: Xiao Guangrong
Okay, i saw you already have adjusted and merged my patchset, thanks for your
work
On 07/23/2015 02:21 PM, Paolo Bonzini wrote:
On 16/07/2015 06:10, Alex Williamson wrote:
On Thu, 2015-07-16 at 03:25 +0800, Xiao Guangrong wrote:
From: Xiao Guangrong
Currently code uses default memory type if MTRR is fully disabled,
fix it by using UC instead
Signed-off-by: Xiao
On 07/23/2015 01:56 PM, Paolo Bonzini wrote:
On 15/07/2015 21:25, Xiao Guangrong wrote:
From: Xiao Guangrong
Current firmware depends on WB to fast boot, please refer to
https://lkml.org/lkml/2015/7/12/115
Let's us WB if CR0.CD is set to make this kind of firmware happy
On 07/23/2015 01:56 PM, Paolo Bonzini wrote:
On 15/07/2015 21:25, Xiao Guangrong wrote:
From: Xiao Guangrong guangrong.x...@intel.com
Current firmware depends on WB to fast boot, please refer to
https://lkml.org/lkml/2015/7/12/115
Let's us WB if CR0.CD is set to make this kind
On 07/23/2015 02:21 PM, Paolo Bonzini wrote:
On 16/07/2015 06:10, Alex Williamson wrote:
On Thu, 2015-07-16 at 03:25 +0800, Xiao Guangrong wrote:
From: Xiao Guangrong guangrong.x...@intel.com
Currently code uses default memory type if MTRR is fully disabled,
fix it by using UC instead
On 07/23/2015 02:26 PM, Paolo Bonzini wrote:
Make them clearly architecture-dependent; the capability is valid for
all architectures, but the argument is not.
Reviewed-by: Xiao Guangrong guangrong.x...@linux.intel.com
Okay, i saw you already have adjusted and merged my patchset, thanks
Hi,
I have posted the pachset to make OVMF happy and have CCed you guys,
could you please check it if it works for you?
On 07/15/2015 05:15 AM, Paolo Bonzini wrote:
The long delay that Alex reported (for the case when all guest memory
was set to UC up-front) is due to the fact that the SEC
From: Xiao Guangrong
Current firmware depends on WB to fast boot, please refer to
https://lkml.org/lkml/2015/7/12/115
Let's us WB if CR0.CD is set to make this kind of firmware happy
This quirk can be dropped by using KVM_ENABLE_CAP API with
KVM_CAP_DISABLE_QUIRKS if the broken firmware
From: Xiao Guangrong
Currently code uses default memory type if MTRR is fully disabled,
fix it by using UC instead
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mtrr.c | 21 -
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kvm/mtrr.c b/arch/x86/kvm
From: Xiao Guangrong
kvm_mtrr_get_guest_memory_type never returns -1 which is implied
in the current code since if @type = -1 (means no MTRR contains the
range), iter.partial_map must be true
Simplify the code to indicate this fact
Signed-off-by: Xiao Guangrong
---
arch/x86/kvm/mtrr.c | 19
From: Xiao Guangrong guangrong.x...@intel.com
kvm_mtrr_get_guest_memory_type never returns -1 which is implied
in the current code since if @type = -1 (means no MTRR contains the
range), iter.partial_map must be true
Simplify the code to indicate this fact
Signed-off-by: Xiao Guangrong
From: Xiao Guangrong guangrong.x...@intel.com
Currently code uses default memory type if MTRR is fully disabled,
fix it by using UC instead
Signed-off-by: Xiao Guangrong guangrong.x...@intel.com
---
arch/x86/kvm/mtrr.c | 21 -
1 file changed, 20 insertions(+), 1 deletion
Hi,
I have posted the pachset to make OVMF happy and have CCed you guys,
could you please check it if it works for you?
On 07/15/2015 05:15 AM, Paolo Bonzini wrote:
The long delay that Alex reported (for the case when all guest memory
was set to UC up-front) is due to the fact that the SEC
From: Xiao Guangrong guangrong.x...@intel.com
Current firmware depends on WB to fast boot, please refer to
https://lkml.org/lkml/2015/7/12/115
Let's us WB if CR0.CD is set to make this kind of firmware happy
This quirk can be dropped by using KVM_ENABLE_CAP API with
KVM_CAP_DISABLE_QUIRKS
On 07/13/2015 11:13 PM, Paolo Bonzini wrote:
On 13/07/2015 16:45, Xiao Guangrong wrote:
+/* MTRR is completely disabled, use UC for all of physical
memory. */
+if (!(mtrr_state->enabled & 0x2))
+return MTRR_TYPE_UNCACHABLE;
actually disappears in commit fa61213746
On 07/13/2015 03:32 PM, Paolo Bonzini wrote:
I'm seeing a significant regression in boot performance on Intel
hardware with assigned devices that bisects back to this patch. There's
a long delay with Seabios between the version splash and execution of
option ROMs, and a _very_ long delay with
On 07/13/2015 03:32 PM, Paolo Bonzini wrote:
I'm seeing a significant regression in boot performance on Intel
hardware with assigned devices that bisects back to this patch. There's
a long delay with Seabios between the version splash and execution of
option ROMs, and a _very_ long delay with
On 07/13/2015 11:13 PM, Paolo Bonzini wrote:
On 13/07/2015 16:45, Xiao Guangrong wrote:
+/* MTRR is completely disabled, use UC for all of physical
memory. */
+if (!(mtrr_state-enabled 0x2))
+return MTRR_TYPE_UNCACHABLE;
actually disappears in commit fa61213746a7 (KVM: MTRR
On 07/13/2015 01:33 AM, Alex Williamson wrote:
On Wed, 2015-05-13 at 14:42 +0800, Xiao Guangrong wrote:
There are some bugs in current get_mtrr_type();
1: bit 1 of mtrr_state->enabled is corresponding bit 11 of
IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablem
On 07/13/2015 01:33 AM, Alex Williamson wrote:
On Wed, 2015-05-13 at 14:42 +0800, Xiao Guangrong wrote:
There are some bugs in current get_mtrr_type();
1: bit 1 of mtrr_state-enabled is corresponding bit 11 of
IA32_MTRR_DEF_TYPE MSR which completely control MTRR's enablement
tables. This behavior is consistent with VMX,
where CD/NW are not touched by vmentry/vmexit.
Note that buggy firmware that does not clear CD/NW is _seriously_
old: SeaBIOS for example has been doing it since October 2008.
Reviewed-by: Xiao Guangrong
--
To unsubscribe from this list: send
On 07/10/2015 06:47 PM, Paolo Bonzini wrote:
On 10/07/2015 03:19, Xiao Guangrong wrote:
yes, this is correct. QEMU still does not have support for disabling
"quirks", so gCR0.CD is currently hidden on SVM. I would like to
include this series in 4.2, while for 4.3 I will disable
On 07/10/2015 06:47 PM, Paolo Bonzini wrote:
On 10/07/2015 03:19, Xiao Guangrong wrote:
yes, this is correct. QEMU still does not have support for disabling
quirks, so gCR0.CD is currently hidden on SVM. I would like to
include this series in 4.2, while for 4.3 I will disable the quirk
tables. This behavior is consistent with VMX,
where CD/NW are not touched by vmentry/vmexit.
Note that buggy firmware that does not clear CD/NW is _seriously_
old: SeaBIOS for example has been doing it since October 2008.
Reviewed-by: Xiao Guangrong guangrong.x...@linux.intel.com
On 07/09/2015 11:18 PM, Paolo Bonzini wrote:
On 09/07/2015 04:30, Xiao Guangrong wrote:
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 602b974a60a6..0f125c1860ec 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1085,6 +1085,47 @@ static u64 svm_compute_tsc_offset
401 - 500 of 2152 matches
Mail list logo