On 27 June 2013 15:33, Paolo Bonzini pbonz...@redhat.com wrote:
Il 26/06/2013 20:36, Mathias Krause ha scritto:
Use a const pointer type instead of casting away the const qualifier
from const arrays. Keep the pointer array on the stack, nonetheless.
Making it static just increases the object
Hi,
this small series contains a few type and style cleanups. It has no
impact on the generated code but removes a few small nits from the
code.
Please apply!
Thanks,
Mathias Krause (3):
KVM: VMX: Use proper types to access const arrays
KVM: VMX: Use size_t to store sizeof() values
KVM
The type for storing values of the sizeof operator should be size_t.
No semantical changes, only type correctness.
Signed-off-by: Mathias Krause mini...@googlemail.com
---
arch/x86/kvm/vmx.c |4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/vmx.c b/arch/x86
Void pointers don't need no casting, drop it.
Signed-off-by: Mathias Krause mini...@googlemail.com
---
arch/x86/kvm/x86.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index e8ba99c..472350c 100644
--- a/arch/x86/kvm/x86.c
+++ b
Use a const pointer type instead of casting away the const qualifier
from const arrays. Keep the pointer array on the stack, nonetheless.
Making it static just increases the object size.
Signed-off-by: Mathias Krause mini...@googlemail.com
---
arch/x86/kvm/vmx.c | 15 +++
1 file
On Tue, Sep 4, 2012 at 2:13 PM, Avi Kivity a...@redhat.com wrote:
On 09/04/2012 03:09 PM, Avi Kivity wrote:
On 08/30/2012 02:30 AM, Mathias Krause wrote:
As the the compiler ensures that the memory operand is always aligned
to a 16 byte memory location,
I'm not sure it does. Is V4SI aligned
in
a cache line together with data that gets written to. The latter should
speed up the emulation of SSE register moves as the aligned variant of
MOVDQ has lower latencies and higher throughput than the unaligned one.
Regards,
Mathias Krause (8):
KVM: x86: minor size optimization
KVM: x86
Some fields can be constified and/or made static to reduce code and data
size.
Numbers for a 32 bit build:
textdata bss dec hex filename
before: 3351 80 03431 d67 cpuid.o
after: 3391 0 03391 d3f cpuid.o
Signed-off-by: Mathias
The opcode tables never change at runtime, therefor mark them const.
Signed-off-by: Mathias Krause mini...@googlemail.com
---
arch/x86/kvm/emulate.c | 40
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/arch/x86/kvm/emulate.c b/arch/x86
Signed-off-by: Mathias Krause mini...@googlemail.com
---
arch/x86/kvm/lapic.c |2 +-
arch/x86/kvm/x86.c |2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index 18d149d..07ad628 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch
We never modify direct_access_msrs[], msrpm_ranges[],
svm_exit_handlers[] or x86_intercept_map[] at runtime.
Mark them r/o.
Signed-off-by: Mathias Krause mini...@googlemail.com
Cc: Joerg Roedel joerg.roe...@amd.com
---
arch/x86/kvm/svm.c |8
1 file changed, 4 insertions(+), 4
We use vmcs_field_to_offset_table[], kvm_vmx_segment_fields[] and
kvm_vmx_exit_handlers[] as lookup tables only -- make them r/o.
Signed-off-by: Mathias Krause mini...@googlemail.com
---
arch/x86/kvm/vmx.c | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/arch
As the the compiler ensures that the memory operand is always aligned
to a 16 byte memory location, use the aligned variant of MOVDQ for
read_sse_reg() and write_sse_reg().
Signed-off-by: Mathias Krause mini...@googlemail.com
---
arch/x86/kvm/emulate.c | 64
We never change emulate_ops[] at runtime so it should be r/o.
Signed-off-by: Mathias Krause mini...@googlemail.com
---
arch/x86/include/asm/kvm_emulate.h |2 +-
arch/x86/kvm/emulate.c | 22 +++---
arch/x86/kvm/x86.c |2 +-
3 files changed, 13
We never change those, make them r/o.
Signed-off-by: Mathias Krause mini...@googlemail.com
---
arch/x86/kvm/x86.c |8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f8b0148..79ac03c 100644
--- a/arch/x86/kvm/x86.c
+++ b
15 matches
Mail list logo