* [PATCH] get rid of MSR_COUNT
@ 2009-10-15 20:26 Glauber Costa
2009-10-19 18:20 ` Marcelo Tosatti
0 siblings, 1 reply; 2+ messages in thread
From: Glauber Costa @ 2009-10-15 20:26 UTC (permalink / raw)
To: kvm; +Cc: avi
qemu.git uses an array of 100 entries for the msr list, which is arguably large
enough (tm).
I propose we follow the same path, for two reasons:
1) ease future merge.
2) avoid stack overflow problems that had already began to appear
Signed-off-by: Glauber Costa <glommer@redhat.com>
---
qemu-kvm-x86.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c
index c8e37ed..350e5fd 100644
--- a/qemu-kvm-x86.c
+++ b/qemu-kvm-x86.c
@@ -808,12 +808,6 @@ static int get_msr_entry(struct kvm_msr_entry *entry, CPUState *env)
return 0;
}
-#ifdef TARGET_X86_64
-#define MSR_COUNT 9
-#else
-#define MSR_COUNT 5
-#endif
-
static void set_v8086_seg(struct kvm_segment *lhs, const SegmentCache *rhs)
{
lhs->selector = rhs->selector;
@@ -868,7 +862,7 @@ void kvm_arch_load_regs(CPUState *env)
struct kvm_regs regs;
struct kvm_fpu fpu;
struct kvm_sregs sregs;
- struct kvm_msr_entry msrs[MSR_COUNT];
+ struct kvm_msr_entry msrs[100];
int rc, n, i;
regs.rax = env->regs[R_EAX];
@@ -1021,7 +1015,7 @@ void kvm_arch_save_regs(CPUState *env)
struct kvm_regs regs;
struct kvm_fpu fpu;
struct kvm_sregs sregs;
- struct kvm_msr_entry msrs[MSR_COUNT];
+ struct kvm_msr_entry msrs[100];
uint32_t hflags;
uint32_t i, n, rc;
--
1.6.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] get rid of MSR_COUNT
2009-10-15 20:26 [PATCH] get rid of MSR_COUNT Glauber Costa
@ 2009-10-19 18:20 ` Marcelo Tosatti
0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2009-10-19 18:20 UTC (permalink / raw)
To: Glauber Costa; +Cc: kvm, avi
On Thu, Oct 15, 2009 at 05:26:31PM -0300, Glauber Costa wrote:
> qemu.git uses an array of 100 entries for the msr list, which is arguably large
> enough (tm).
>
> I propose we follow the same path, for two reasons:
> 1) ease future merge.
> 2) avoid stack overflow problems that had already began to appear
>
> Signed-off-by: Glauber Costa <glommer@redhat.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-19 18:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-15 20:26 [PATCH] get rid of MSR_COUNT Glauber Costa
2009-10-19 18:20 ` Marcelo Tosatti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).