* [Qemu-devel] [PATCH qemu] i386, linux-headers: Add support for kvm_get_rng_seed
@ 2014-07-16 15:52 Andy Lutomirski
2014-07-16 16:17 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Andy Lutomirski @ 2014-07-16 15:52 UTC (permalink / raw)
To: kvm, H. Peter Anvin, Theodore Ts'o, linux-kernel, Kees Cook,
x86, qemu-devel
Cc: Daniel Borkmann, Raghavendra K T, Srivatsa Vaddagiri,
Andy Lutomirski
This updates x86's kvm_para.h for the feature bit definition and
target-i386/cpu.c for the feature name and default.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
---
| 2 ++
target-i386/cpu.c | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
--git a/linux-headers/asm-x86/kvm_para.h b/linux-headers/asm-x86/kvm_para.h
index e41c5c1..a9b27ce 100644
--- a/linux-headers/asm-x86/kvm_para.h
+++ b/linux-headers/asm-x86/kvm_para.h
@@ -24,6 +24,7 @@
#define KVM_FEATURE_STEAL_TIME 5
#define KVM_FEATURE_PV_EOI 6
#define KVM_FEATURE_PV_UNHALT 7
+#define KVM_FEATURE_GET_RNG_SEED 8
/* The last 8 bits are used to indicate how to interpret the flags field
* in pvclock structure. If no bits are set, all flags are ignored.
@@ -40,6 +41,7 @@
#define MSR_KVM_ASYNC_PF_EN 0x4b564d02
#define MSR_KVM_STEAL_TIME 0x4b564d03
#define MSR_KVM_PV_EOI_EN 0x4b564d04
+#define MSR_KVM_GET_RNG_SEED 0x4b564d05
struct kvm_steal_time {
__u64 steal;
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 8fd1497..4ea7e6c 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -236,7 +236,7 @@ static const char *ext4_feature_name[] = {
static const char *kvm_feature_name[] = {
"kvmclock", "kvm_nopiodelay", "kvm_mmu", "kvmclock",
"kvm_asyncpf", "kvm_steal_time", "kvm_pv_eoi", "kvm_pv_unhalt",
- NULL, NULL, NULL, NULL,
+ "kvm_get_rng_seed", NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
@@ -368,7 +368,8 @@ static uint32_t kvm_default_features[FEATURE_WORDS] = {
(1 << KVM_FEATURE_ASYNC_PF) |
(1 << KVM_FEATURE_STEAL_TIME) |
(1 << KVM_FEATURE_PV_EOI) |
- (1 << KVM_FEATURE_CLOCKSOURCE_STABLE_BIT),
+ (1 << KVM_FEATURE_CLOCKSOURCE_STABLE_BIT) |
+ (1 << KVM_FEATURE_GET_RNG_SEED),
[FEAT_1_ECX] = CPUID_EXT_X2APIC,
};
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH qemu] i386, linux-headers: Add support for kvm_get_rng_seed
2014-07-16 15:52 [Qemu-devel] [PATCH qemu] i386, linux-headers: Add support for kvm_get_rng_seed Andy Lutomirski
@ 2014-07-16 16:17 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2014-07-16 16:17 UTC (permalink / raw)
To: Andy Lutomirski, kvm, H. Peter Anvin, Theodore Ts'o,
linux-kernel, Kees Cook, x86, qemu-devel
Cc: Daniel Borkmann, Raghavendra K T, Srivatsa Vaddagiri
Il 16/07/2014 17:52, Andy Lutomirski ha scritto:
> This updates x86's kvm_para.h for the feature bit definition and
> target-i386/cpu.c for the feature name and default.
>
> Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Thanks, looks good---assuming the kernel side will make it into 3.17,
I'll sync the headers once 3.17 is released and then apply the patch.
As mentioned in kvm@ someone will have to add the pc-2.2 machine type too.
Paolo
> ---
> linux-headers/asm-x86/kvm_para.h | 2 ++
> target-i386/cpu.c | 5 +++--
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/linux-headers/asm-x86/kvm_para.h b/linux-headers/asm-x86/kvm_para.h
> index e41c5c1..a9b27ce 100644
> --- a/linux-headers/asm-x86/kvm_para.h
> +++ b/linux-headers/asm-x86/kvm_para.h
> @@ -24,6 +24,7 @@
> #define KVM_FEATURE_STEAL_TIME 5
> #define KVM_FEATURE_PV_EOI 6
> #define KVM_FEATURE_PV_UNHALT 7
> +#define KVM_FEATURE_GET_RNG_SEED 8
>
> /* The last 8 bits are used to indicate how to interpret the flags field
> * in pvclock structure. If no bits are set, all flags are ignored.
> @@ -40,6 +41,7 @@
> #define MSR_KVM_ASYNC_PF_EN 0x4b564d02
> #define MSR_KVM_STEAL_TIME 0x4b564d03
> #define MSR_KVM_PV_EOI_EN 0x4b564d04
> +#define MSR_KVM_GET_RNG_SEED 0x4b564d05
>
> struct kvm_steal_time {
> __u64 steal;
> diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> index 8fd1497..4ea7e6c 100644
> --- a/target-i386/cpu.c
> +++ b/target-i386/cpu.c
> @@ -236,7 +236,7 @@ static const char *ext4_feature_name[] = {
> static const char *kvm_feature_name[] = {
> "kvmclock", "kvm_nopiodelay", "kvm_mmu", "kvmclock",
> "kvm_asyncpf", "kvm_steal_time", "kvm_pv_eoi", "kvm_pv_unhalt",
> - NULL, NULL, NULL, NULL,
> + "kvm_get_rng_seed", NULL, NULL, NULL,
> NULL, NULL, NULL, NULL,
> NULL, NULL, NULL, NULL,
> NULL, NULL, NULL, NULL,
> @@ -368,7 +368,8 @@ static uint32_t kvm_default_features[FEATURE_WORDS] = {
> (1 << KVM_FEATURE_ASYNC_PF) |
> (1 << KVM_FEATURE_STEAL_TIME) |
> (1 << KVM_FEATURE_PV_EOI) |
> - (1 << KVM_FEATURE_CLOCKSOURCE_STABLE_BIT),
> + (1 << KVM_FEATURE_CLOCKSOURCE_STABLE_BIT) |
> + (1 << KVM_FEATURE_GET_RNG_SEED),
> [FEAT_1_ECX] = CPUID_EXT_X2APIC,
> };
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-16 16:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-16 15:52 [Qemu-devel] [PATCH qemu] i386, linux-headers: Add support for kvm_get_rng_seed Andy Lutomirski
2014-07-16 16:17 ` Paolo Bonzini
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).