* [PATCH] kvm-userspace: Add missing KVM string in the signature of CPUID
@ 2008-12-02 10:29 Guillaume Thouvenin
2008-12-09 13:23 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Guillaume Thouvenin @ 2008-12-02 10:29 UTC (permalink / raw)
To: kvm; +Cc: Avi Kivity
It adds a missing "KVM" string in the signature of the CPUID. Without
it signature[2] is not well defined.
Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net>
---
qemu/qemu-kvm-x86.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c
index 671b5b3..e9b200a 100644
--- a/qemu/qemu-kvm-x86.c
+++ b/qemu/qemu-kvm-x86.c
@@ -573,7 +573,7 @@ int kvm_arch_qemu_init_env(CPUState *cenv)
#ifdef KVM_CPUID_SIGNATURE
/* Paravirtualization CPUIDs */
- memcpy(signature, "KVMKVMKVM", 12);
+ memcpy(signature, "KVMKVMKVMKVM", 12);
pv_ent = &cpuid_ent[cpuid_nent++];
memset(pv_ent, 0, sizeof(*pv_ent));
pv_ent->function = KVM_CPUID_SIGNATURE;
--
1.6.0.4.623.g171d7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kvm-userspace: Add missing KVM string in the signature of CPUID
2008-12-02 10:29 [PATCH] kvm-userspace: Add missing KVM string in the signature of CPUID Guillaume Thouvenin
@ 2008-12-09 13:23 ` Avi Kivity
2008-12-09 14:13 ` [PATCH] kvm-userspace: Add '\0' at the end of " Guillaume Thouvenin
0 siblings, 1 reply; 4+ messages in thread
From: Avi Kivity @ 2008-12-09 13:23 UTC (permalink / raw)
To: Guillaume Thouvenin; +Cc: kvm
Guillaume Thouvenin wrote:
> It adds a missing "KVM" string in the signature of the CPUID. Without
> it signature[2] is not well defined.
>
>
> #ifdef KVM_CPUID_SIGNATURE
> /* Paravirtualization CPUIDs */
> - memcpy(signature, "KVMKVMKVM", 12);
> + memcpy(signature, "KVMKVMKVMKVM", 12);
> pv_ent = &cpuid_ent[cpuid_nent++];
> memset(pv_ent, 0, sizeof(*pv_ent));
> pv_ent->function = KVM_CPUID_SIGNATURE;
>
That's not what the kernel is looking for. Add three '\0's instead.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] kvm-userspace: Add '\0' at the end of the signature of CPUID
2008-12-09 13:23 ` Avi Kivity
@ 2008-12-09 14:13 ` Guillaume Thouvenin
2008-12-09 14:16 ` Avi Kivity
0 siblings, 1 reply; 4+ messages in thread
From: Guillaume Thouvenin @ 2008-12-09 14:13 UTC (permalink / raw)
To: Avi Kivity; +Cc: kvm
Add '\0' at the end of the signature of CPUID
in order to fill the signature with known values.
Signed-off-by: Guillaume Thouvenin <guillaume.thouvenin@ext.bull.net>
---
qemu/qemu-kvm-x86.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c
index 671b5b3..2e68ace 100644
--- a/qemu/qemu-kvm-x86.c
+++ b/qemu/qemu-kvm-x86.c
@@ -573,7 +573,7 @@ int kvm_arch_qemu_init_env(CPUState *cenv)
#ifdef KVM_CPUID_SIGNATURE
/* Paravirtualization CPUIDs */
- memcpy(signature, "KVMKVMKVM", 12);
+ memcpy(signature, "KVMKVMKVM\0\0\0", 12);
pv_ent = &cpuid_ent[cpuid_nent++];
memset(pv_ent, 0, sizeof(*pv_ent));
pv_ent->function = KVM_CPUID_SIGNATURE;
--
1.6.0.4.623.g171d7
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kvm-userspace: Add '\0' at the end of the signature of CPUID
2008-12-09 14:13 ` [PATCH] kvm-userspace: Add '\0' at the end of " Guillaume Thouvenin
@ 2008-12-09 14:16 ` Avi Kivity
0 siblings, 0 replies; 4+ messages in thread
From: Avi Kivity @ 2008-12-09 14:16 UTC (permalink / raw)
To: Guillaume Thouvenin; +Cc: kvm
Guillaume Thouvenin wrote:
> Add '\0' at the end of the signature of CPUID
> in order to fill the signature with known values.
>
Applied, thanks.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-12-09 14:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-02 10:29 [PATCH] kvm-userspace: Add missing KVM string in the signature of CPUID Guillaume Thouvenin
2008-12-09 13:23 ` Avi Kivity
2008-12-09 14:13 ` [PATCH] kvm-userspace: Add '\0' at the end of " Guillaume Thouvenin
2008-12-09 14:16 ` Avi Kivity
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).