* [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue
@ 2010-03-04 15:05 Marcelo Tosatti
2010-03-04 15:15 ` Anthony Liguori
0 siblings, 1 reply; 15+ messages in thread
From: Marcelo Tosatti @ 2010-03-04 15:05 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Marcelo Tosatti, qemu-devel, kvm
The following changes since commit 55b1e61f640bb2cf3bed0b4cc6d4ba1326c625d9:
Samuel Thibault (1):
(curses) Use more descriptive values
are available in the git repository at:
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master
Avi Kivity (1):
Allocate memory below 4GB as one chunk
Jan Kiszka (4):
KVM: Rework of guest debug state writing
KVM: Rework VCPU state writeback API
KVM: x86: Restrict writeback of VCPU state
x86: Extend validity of bsp_to_cpu
Marcelo Tosatti (1):
Add option to use file backed guest memory
cpu-all.h | 3 +
exec.c | 132 ++++++++++++++++++++++++++++++++++++++++--------
hw/apic.c | 2 -
hw/pc.c | 14 ++----
hw/ppc_newworld.c | 3 -
hw/ppc_oldworld.c | 3 -
hw/s390-virtio.c | 1 -
kvm-all.c | 43 +++++++++++-----
kvm.h | 26 +++++++++-
qemu-options.hx | 16 ++++++
savevm.c | 4 ++
sysemu.h | 4 ++
target-i386/kvm.c | 77 +++++++++++++++++++++++------
target-i386/machine.c | 11 ----
target-ppc/kvm.c | 2 +-
target-ppc/machine.c | 4 --
target-s390x/kvm.c | 3 +-
vl.c | 41 +++++++++++++++
18 files changed, 300 insertions(+), 89 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue
2010-03-04 15:05 Marcelo Tosatti
@ 2010-03-04 15:15 ` Anthony Liguori
0 siblings, 0 replies; 15+ messages in thread
From: Anthony Liguori @ 2010-03-04 15:15 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Anthony Liguori, qemu-devel, kvm
On 03/04/2010 09:05 AM, Marcelo Tosatti wrote:
> The following changes since commit 55b1e61f640bb2cf3bed0b4cc6d4ba1326c625d9:
> Samuel Thibault (1):
> (curses) Use more descriptive values
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master
>
> Avi Kivity (1):
> Allocate memory below 4GB as one chunk
>
> Jan Kiszka (4):
> KVM: Rework of guest debug state writing
> KVM: Rework VCPU state writeback API
> KVM: x86: Restrict writeback of VCPU state
> x86: Extend validity of bsp_to_cpu
>
> Marcelo Tosatti (1):
> Add option to use file backed guest memory
>
Pulled. Thanks.
Regards,
Anthony Liguori
> cpu-all.h | 3 +
> exec.c | 132 ++++++++++++++++++++++++++++++++++++++++--------
> hw/apic.c | 2 -
> hw/pc.c | 14 ++----
> hw/ppc_newworld.c | 3 -
> hw/ppc_oldworld.c | 3 -
> hw/s390-virtio.c | 1 -
> kvm-all.c | 43 +++++++++++-----
> kvm.h | 26 +++++++++-
> qemu-options.hx | 16 ++++++
> savevm.c | 4 ++
> sysemu.h | 4 ++
> target-i386/kvm.c | 77 +++++++++++++++++++++++------
> target-i386/machine.c | 11 ----
> target-ppc/kvm.c | 2 +-
> target-ppc/machine.c | 4 --
> target-s390x/kvm.c | 3 +-
> vl.c | 41 +++++++++++++++
> 18 files changed, 300 insertions(+), 89 deletions(-)
>
>
>
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue
@ 2011-04-16 22:10 Marcelo Tosatti
2011-04-16 23:57 ` Anthony Liguori
0 siblings, 1 reply; 15+ messages in thread
From: Marcelo Tosatti @ 2011-04-16 22:10 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Marcelo Tosatti, qemu-devel, kvm
The following changes since commit adc56dda0c4eed62149d28939b7d7e329ad95ae8:
migration: move some declarations to migration.h (2011-04-15 20:14:54 +0000)
are available in the git repository at:
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master
Glauber Costa (3):
kvm: use kernel-provided para_features instead of statically coming up with new capabilities
kvm: add kvmclock to its second bit
kvm: create kvmclock when one of the flags are present
Jan Kiszka (3):
Break up user and system cpu_interrupt implementations
Redirect cpu_interrupt to callback handler
kvm: Install specialized interrupt handler
cpu-all.h | 14 ++++++++-
exec.c | 18 ++++++++---
hw/kvmclock.c | 6 +++-
kvm-all.c | 11 +++++++
target-i386/cpuid.c | 3 +-
target-i386/kvm.c | 78 ++++++++++++++++++++++++++++++++-------------------
6 files changed, 92 insertions(+), 38 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue
2011-04-16 22:10 Marcelo Tosatti
@ 2011-04-16 23:57 ` Anthony Liguori
0 siblings, 0 replies; 15+ messages in thread
From: Anthony Liguori @ 2011-04-16 23:57 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Jan Kiszka, Glauber Costa, qemu-devel, kvm
On 04/16/2011 05:10 PM, Marcelo Tosatti wrote:
> The following changes since commit adc56dda0c4eed62149d28939b7d7e329ad95ae8:
>
> migration: move some declarations to migration.h (2011-04-15 20:14:54 +0000)
>
> are available in the git repository at:
> git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master
>
> Glauber Costa (3):
> kvm: use kernel-provided para_features instead of statically coming up with new capabilities
It's hard to follow this logic, but something in this series introduces
a ton of chatter on stdout. For instance:
anthony@titi:~/build/qemu$ x86_64-softmmu/qemu-system-x86_64 -hda
~/images/linux.img -snapshot
error: feature "sse2" not available in set
error: bad option value [feature_edx = sse2 sse fxsr mmx pat cmov pge
sep apic cx8 mce pae msr tsc pse de fpu mtrr clflush mca pse36]
error: feature "sse2" not available in set
error: bad option value [feature_edx = sse2 sse fxsr mmx pat cmov pge
sep apic cx8 mce pae msr tsc pse de fpu mtrr clflush mca pse36]
error: feature "sse2" not available in set
error: bad option value [feature_edx = sse2 sse fxsr mmx pat cmov pge
sep apic cx8 mce pae msr tsc pse de fpu mtrr clflush mca pse36]
error: feature "sse2" not available in set
error: bad option value [feature_edx = sse2 sse fxsr mmx pat cmov pge
sep apic cx8 mce pae msr tsc pse de fpu mtrr clflush mca pse36]
error: feature "sse2" not available in set
error: bad option value [feature_edx = sse2 sse fxsr mmx pat cmov pge
sep apic cx8 mce pae msr tsc pse de fpu mtrr clflush mca pse36]
error: feature "sse2" not available in set
error: bad option value [feature_edx = sse2 sse fxsr mmx pat cmov pge
sep apic cx8 mce pae msr tsc pse de fpu mtrr clflush mca pse36]
CPU feature hypervisor not found
This is with or without KVM enabled.
Regards,
Anthony Liguori
> kvm: add kvmclock to its second bit
> kvm: create kvmclock when one of the flags are present
>
> Jan Kiszka (3):
> Break up user and system cpu_interrupt implementations
> Redirect cpu_interrupt to callback handler
> kvm: Install specialized interrupt handler
>
> cpu-all.h | 14 ++++++++-
> exec.c | 18 ++++++++---
> hw/kvmclock.c | 6 +++-
> kvm-all.c | 11 +++++++
> target-i386/cpuid.c | 3 +-
> target-i386/kvm.c | 78 ++++++++++++++++++++++++++++++++-------------------
> 6 files changed, 92 insertions(+), 38 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue
@ 2011-08-05 20:55 Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 1/6] kvmclock: Fix feature detection Marcelo Tosatti
` (6 more replies)
0 siblings, 7 replies; 15+ messages in thread
From: Marcelo Tosatti @ 2011-08-05 20:55 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Marcelo Tosatti, qemu-devel, kvm
The following changes since commit 35d7ace74bd07e3d6983c1fd7cbfab4e11175689:
qcow2: Fix L1 table size after bdrv_snapshot_goto (2011-08-05 07:15:47 -0500)
are available in the git repository at:
git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master
Jan Kiszka (2):
kvmclock: Fix feature detection
kvm: Drop obsolete KVM_IOEVENTFD #ifdefs
Joerg Roedel (3):
qemu: Add strtosz_suffix_unit function
qemu-x86: Add tsc_freq option to -cpu
qemu-x86: Set tsc_khz in kvm when supported
Marcelo Tosatti (1):
Remove #ifdef KVM_CAP_TSC_CONTROL
cutils.c | 16 +++++++++++-----
hw/kvmclock.c | 7 ++-----
kvm-all.c | 8 --------
qemu-common.h | 2 ++
target-i386/cpu.h | 1 +
target-i386/cpuid.c | 13 +++++++++++++
target-i386/kvm.c | 16 +++++++++++++++-
7 files changed, 44 insertions(+), 19 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 1/6] kvmclock: Fix feature detection
2011-08-05 20:55 [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue Marcelo Tosatti
@ 2011-08-05 20:55 ` Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 2/6] kvm: Drop obsolete KVM_IOEVENTFD #ifdefs Marcelo Tosatti
` (5 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Marcelo Tosatti @ 2011-08-05 20:55 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Jan Kiszka, Marcelo Tosatti, qemu-devel, kvm
From: Jan Kiszka <jan.kiszka@siemens.com>
Bit-wise or the feature flags and drop the obsolete #ifdef.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
hw/kvmclock.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/hw/kvmclock.c b/hw/kvmclock.c
index 692ad18..b73aec4 100644
--- a/hw/kvmclock.c
+++ b/hw/kvmclock.c
@@ -101,11 +101,8 @@ static SysBusDeviceInfo kvmclock_info = {
void kvmclock_create(void)
{
if (kvm_enabled() &&
- first_cpu->cpuid_kvm_features & ((1ULL << KVM_FEATURE_CLOCKSOURCE)
-#ifdef KVM_FEATURE_CLOCKSOURCE2
- || (1ULL << KVM_FEATURE_CLOCKSOURCE2)
-#endif
- )) {
+ first_cpu->cpuid_kvm_features & ((1ULL << KVM_FEATURE_CLOCKSOURCE) |
+ (1ULL << KVM_FEATURE_CLOCKSOURCE2))) {
sysbus_create_simple("kvmclock", -1, NULL);
}
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 2/6] kvm: Drop obsolete KVM_IOEVENTFD #ifdefs
2011-08-05 20:55 [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 1/6] kvmclock: Fix feature detection Marcelo Tosatti
@ 2011-08-05 20:55 ` Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 3/6] qemu: Add strtosz_suffix_unit function Marcelo Tosatti
` (4 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Marcelo Tosatti @ 2011-08-05 20:55 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Jan Kiszka, Marcelo Tosatti, qemu-devel, kvm
From: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
kvm-all.c | 8 --------
1 files changed, 0 insertions(+), 8 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index cbc2532..b9c172b 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1328,7 +1328,6 @@ int kvm_set_signal_mask(CPUState *env, const sigset_t *sigset)
int kvm_set_ioeventfd_mmio_long(int fd, uint32_t addr, uint32_t val, bool assign)
{
-#ifdef KVM_IOEVENTFD
int ret;
struct kvm_ioeventfd iofd;
@@ -1353,14 +1352,10 @@ int kvm_set_ioeventfd_mmio_long(int fd, uint32_t addr, uint32_t val, bool assign
}
return 0;
-#else
- return -ENOSYS;
-#endif
}
int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr, uint16_t val, bool assign)
{
-#ifdef KVM_IOEVENTFD
struct kvm_ioeventfd kick = {
.datamatch = val,
.addr = addr,
@@ -1380,9 +1375,6 @@ int kvm_set_ioeventfd_pio_word(int fd, uint16_t addr, uint16_t val, bool assign)
return r;
}
return 0;
-#else
- return -ENOSYS;
-#endif
}
int kvm_on_sigbus_vcpu(CPUState *env, int code, void *addr)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 3/6] qemu: Add strtosz_suffix_unit function
2011-08-05 20:55 [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 1/6] kvmclock: Fix feature detection Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 2/6] kvm: Drop obsolete KVM_IOEVENTFD #ifdefs Marcelo Tosatti
@ 2011-08-05 20:55 ` Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 4/6] qemu-x86: Add tsc_freq option to -cpu Marcelo Tosatti
` (3 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Marcelo Tosatti @ 2011-08-05 20:55 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Joerg Roedel, Marcelo Tosatti, qemu-devel, kvm
From: Joerg Roedel <joerg.roedel@amd.com>
This function does the same as the strtosz_suffix function
except that it allows to specify the unit to which the
k/M/B/T suffixes apply. This function will be used later to
parse the tsc-frequency from the command-line.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
cutils.c | 16 +++++++++++-----
qemu-common.h | 2 ++
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/cutils.c b/cutils.c
index f9a7e36..28049e0 100644
--- a/cutils.c
+++ b/cutils.c
@@ -322,7 +322,8 @@ int fcntl_setfl(int fd, int flag)
* value must be terminated by whitespace, ',' or '\0'. Return -1 on
* error.
*/
-int64_t strtosz_suffix(const char *nptr, char **end, const char default_suffix)
+int64_t strtosz_suffix_unit(const char *nptr, char **end,
+ const char default_suffix, int64_t unit)
{
int64_t retval = -1;
char *endptr;
@@ -362,20 +363,20 @@ int64_t strtosz_suffix(const char *nptr, char **end, const char default_suffix)
}
break;
case STRTOSZ_DEFSUFFIX_KB:
- mul = 1 << 10;
+ mul = unit;
break;
case 0:
if (mul_required) {
goto fail;
}
case STRTOSZ_DEFSUFFIX_MB:
- mul = 1ULL << 20;
+ mul = unit * unit;
break;
case STRTOSZ_DEFSUFFIX_GB:
- mul = 1ULL << 30;
+ mul = unit * unit * unit;
break;
case STRTOSZ_DEFSUFFIX_TB:
- mul = 1ULL << 40;
+ mul = unit * unit * unit * unit;
break;
default:
goto fail;
@@ -405,6 +406,11 @@ fail:
return retval;
}
+int64_t strtosz_suffix(const char *nptr, char **end, const char default_suffix)
+{
+ return strtosz_suffix_unit(nptr, end, default_suffix, 1024);
+}
+
int64_t strtosz(const char *nptr, char **end)
{
return strtosz_suffix(nptr, end, STRTOSZ_DEFSUFFIX_MB);
diff --git a/qemu-common.h b/qemu-common.h
index afbd04d..389f4d2 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -157,6 +157,8 @@ int fcntl_setfl(int fd, int flag);
#define STRTOSZ_DEFSUFFIX_B 'B'
int64_t strtosz(const char *nptr, char **end);
int64_t strtosz_suffix(const char *nptr, char **end, const char default_suffix);
+int64_t strtosz_suffix_unit(const char *nptr, char **end,
+ const char default_suffix, int64_t unit);
/* path.c */
void init_paths(const char *prefix);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 4/6] qemu-x86: Add tsc_freq option to -cpu
2011-08-05 20:55 [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue Marcelo Tosatti
` (2 preceding siblings ...)
2011-08-05 20:55 ` [Qemu-devel] [PATCH 3/6] qemu: Add strtosz_suffix_unit function Marcelo Tosatti
@ 2011-08-05 20:55 ` Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 5/6] qemu-x86: Set tsc_khz in kvm when supported Marcelo Tosatti
` (2 subsequent siblings)
6 siblings, 0 replies; 15+ messages in thread
From: Marcelo Tosatti @ 2011-08-05 20:55 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Joerg Roedel, Marcelo Tosatti, qemu-devel, kvm
From: Joerg Roedel <joerg.roedel@amd.com>
To let the user configure the desired tsc frequency for the
guest if running in KVM.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
target-i386/cpu.h | 1 +
target-i386/cpuid.c | 13 +++++++++++++
2 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/target-i386/cpu.h b/target-i386/cpu.h
index dd6c5fa..dcdd95f 100644
--- a/target-i386/cpu.h
+++ b/target-i386/cpu.h
@@ -743,6 +743,7 @@ typedef struct CPUX86State {
uint32_t cpuid_kvm_features;
uint32_t cpuid_svm_features;
bool tsc_valid;
+ int tsc_khz;
/* in order to simplify APIC support, we leave this pointer to the
user */
diff --git a/target-i386/cpuid.c b/target-i386/cpuid.c
index e1ae3af..89e9623 100644
--- a/target-i386/cpuid.c
+++ b/target-i386/cpuid.c
@@ -224,6 +224,7 @@ typedef struct x86_def_t {
int family;
int model;
int stepping;
+ int tsc_khz;
uint32_t features, ext_features, ext2_features, ext3_features;
uint32_t kvm_features, svm_features;
uint32_t xlevel;
@@ -704,6 +705,17 @@ static int cpu_x86_find_by_name(x86_def_t *x86_cpu_def, const char *cpu_model)
} else if (!strcmp(featurestr, "model_id")) {
pstrcpy(x86_cpu_def->model_id, sizeof(x86_cpu_def->model_id),
val);
+ } else if (!strcmp(featurestr, "tsc_freq")) {
+ int64_t tsc_freq;
+ char *err;
+
+ tsc_freq = strtosz_suffix_unit(val, &err,
+ STRTOSZ_DEFSUFFIX_B, 1000);
+ if (!*val || *err) {
+ fprintf(stderr, "bad numerical value %s\n", val);
+ goto error;
+ }
+ x86_cpu_def->tsc_khz = tsc_freq / 1000;
} else {
fprintf(stderr, "unrecognized feature %s\n", featurestr);
goto error;
@@ -872,6 +884,7 @@ int cpu_x86_register (CPUX86State *env, const char *cpu_model)
env->cpuid_svm_features = def->svm_features;
env->cpuid_ext4_features = def->ext4_features;
env->cpuid_xlevel2 = def->xlevel2;
+ env->tsc_khz = def->tsc_khz;
if (!kvm_enabled()) {
env->cpuid_features &= TCG_FEATURES;
env->cpuid_ext_features &= TCG_EXT_FEATURES;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 5/6] qemu-x86: Set tsc_khz in kvm when supported
2011-08-05 20:55 [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue Marcelo Tosatti
` (3 preceding siblings ...)
2011-08-05 20:55 ` [Qemu-devel] [PATCH 4/6] qemu-x86: Add tsc_freq option to -cpu Marcelo Tosatti
@ 2011-08-05 20:55 ` Marcelo Tosatti
2011-08-05 21:28 ` Jan Kiszka
2011-08-05 20:55 ` [Qemu-devel] [PATCH 6/6] Remove #ifdef KVM_CAP_TSC_CONTROL Marcelo Tosatti
2011-08-08 20:07 ` [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue Anthony Liguori
6 siblings, 1 reply; 15+ messages in thread
From: Marcelo Tosatti @ 2011-08-05 20:55 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Joerg Roedel, Marcelo Tosatti, qemu-devel, kvm
From: Joerg Roedel <joerg.roedel@amd.com>
Make use of the KVM_TSC_CONTROL feature if available.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
target-i386/kvm.c | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 10fb2c4..923d2d5 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -354,6 +354,7 @@ int kvm_arch_init_vcpu(CPUState *env)
uint32_t unused;
struct kvm_cpuid_entry2 *c;
uint32_t signature[3];
+ int r;
env->cpuid_features &= kvm_arch_get_supported_cpuid(s, 1, 0, R_EDX);
@@ -499,7 +500,22 @@ int kvm_arch_init_vcpu(CPUState *env)
qemu_add_vm_change_state_handler(cpu_update_state, env);
- return kvm_vcpu_ioctl(env, KVM_SET_CPUID2, &cpuid_data);
+ r = kvm_vcpu_ioctl(env, KVM_SET_CPUID2, &cpuid_data);
+ if (r)
+ return r;
+
+#ifdef KVM_CAP_TSC_CONTROL
+ r = kvm_check_extension(env->kvm_state, KVM_CAP_TSC_CONTROL);
+ if (r && env->tsc_khz) {
+ r = kvm_vcpu_ioctl(env, KVM_SET_TSC_KHZ, env->tsc_khz);
+ if (r < 0) {
+ fprintf(stderr, "KVM_SET_TSC_KHZ failed\n");
+ return r;
+ }
+ }
+#endif
+
+ return 0;
}
void kvm_arch_reset_vcpu(CPUState *env)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 6/6] Remove #ifdef KVM_CAP_TSC_CONTROL
2011-08-05 20:55 [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue Marcelo Tosatti
` (4 preceding siblings ...)
2011-08-05 20:55 ` [Qemu-devel] [PATCH 5/6] qemu-x86: Set tsc_khz in kvm when supported Marcelo Tosatti
@ 2011-08-05 20:55 ` Marcelo Tosatti
2011-08-08 20:07 ` [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue Anthony Liguori
6 siblings, 0 replies; 15+ messages in thread
From: Marcelo Tosatti @ 2011-08-05 20:55 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Marcelo Tosatti, qemu-devel, kvm
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
---
target-i386/kvm.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 923d2d5..31b88b7 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -504,7 +504,6 @@ int kvm_arch_init_vcpu(CPUState *env)
if (r)
return r;
-#ifdef KVM_CAP_TSC_CONTROL
r = kvm_check_extension(env->kvm_state, KVM_CAP_TSC_CONTROL);
if (r && env->tsc_khz) {
r = kvm_vcpu_ioctl(env, KVM_SET_TSC_KHZ, env->tsc_khz);
@@ -513,7 +512,6 @@ int kvm_arch_init_vcpu(CPUState *env)
return r;
}
}
-#endif
return 0;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 5/6] qemu-x86: Set tsc_khz in kvm when supported
2011-08-05 20:55 ` [Qemu-devel] [PATCH 5/6] qemu-x86: Set tsc_khz in kvm when supported Marcelo Tosatti
@ 2011-08-05 21:28 ` Jan Kiszka
0 siblings, 0 replies; 15+ messages in thread
From: Jan Kiszka @ 2011-08-05 21:28 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: Joerg Roedel, Anthony Liguori, qemu-devel, kvm
[-- Attachment #1: Type: text/plain, Size: 1100 bytes --]
On 2011-08-05 22:55, Marcelo Tosatti wrote:
> From: Joerg Roedel <joerg.roedel@amd.com>
>
> Make use of the KVM_TSC_CONTROL feature if available.
>
> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
> ---
> target-i386/kvm.c | 18 +++++++++++++++++-
> 1 files changed, 17 insertions(+), 1 deletions(-)
>
> diff --git a/target-i386/kvm.c b/target-i386/kvm.c
> index 10fb2c4..923d2d5 100644
> --- a/target-i386/kvm.c
> +++ b/target-i386/kvm.c
> @@ -354,6 +354,7 @@ int kvm_arch_init_vcpu(CPUState *env)
> uint32_t unused;
> struct kvm_cpuid_entry2 *c;
> uint32_t signature[3];
> + int r;
>
> env->cpuid_features &= kvm_arch_get_supported_cpuid(s, 1, 0, R_EDX);
>
> @@ -499,7 +500,22 @@ int kvm_arch_init_vcpu(CPUState *env)
>
> qemu_add_vm_change_state_handler(cpu_update_state, env);
>
> - return kvm_vcpu_ioctl(env, KVM_SET_CPUID2, &cpuid_data);
> + r = kvm_vcpu_ioctl(env, KVM_SET_CPUID2, &cpuid_data);
> + if (r)
> + return r;
Coding style...
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue
2011-08-05 20:55 [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue Marcelo Tosatti
` (5 preceding siblings ...)
2011-08-05 20:55 ` [Qemu-devel] [PATCH 6/6] Remove #ifdef KVM_CAP_TSC_CONTROL Marcelo Tosatti
@ 2011-08-08 20:07 ` Anthony Liguori
6 siblings, 0 replies; 15+ messages in thread
From: Anthony Liguori @ 2011-08-08 20:07 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: qemu-devel, kvm
On 08/05/2011 03:55 PM, Marcelo Tosatti wrote:
> The following changes since commit 35d7ace74bd07e3d6983c1fd7cbfab4e11175689:
>
> qcow2: Fix L1 table size after bdrv_snapshot_goto (2011-08-05 07:15:47 -0500)
>
> are available in the git repository at:
> git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Jan Kiszka (2):
> kvmclock: Fix feature detection
> kvm: Drop obsolete KVM_IOEVENTFD #ifdefs
>
> Joerg Roedel (3):
> qemu: Add strtosz_suffix_unit function
> qemu-x86: Add tsc_freq option to -cpu
> qemu-x86: Set tsc_khz in kvm when supported
>
> Marcelo Tosatti (1):
> Remove #ifdef KVM_CAP_TSC_CONTROL
>
> cutils.c | 16 +++++++++++-----
> hw/kvmclock.c | 7 ++-----
> kvm-all.c | 8 --------
> qemu-common.h | 2 ++
> target-i386/cpu.h | 1 +
> target-i386/cpuid.c | 13 +++++++++++++
> target-i386/kvm.c | 16 +++++++++++++++-
> 7 files changed, 44 insertions(+), 19 deletions(-)
>
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue
@ 2011-10-27 12:10 Marcelo Tosatti
2011-10-31 16:52 ` Anthony Liguori
0 siblings, 1 reply; 15+ messages in thread
From: Marcelo Tosatti @ 2011-10-27 12:10 UTC (permalink / raw)
To: Anthony Liguori; +Cc: Marcelo Tosatti, qemu-devel, kvm
The following changes since commit 952e849c150b4f1b89f8728cba00f925c1d6e75b:
Merge remote-tracking branch 'bonzini/split-main-loop-for-anthony' into staging (2011-10-24 10:51:12 -0500)
are available in the git repository at:
git://github.com/avikivity/qemu.git uq/master
Avi Kivity (2):
kvm: avoid reentring kvm_flush_coalesced_mmio_buffer()
i386: wire up MSR_IA32_MISC_ENABLE
Jan Kiszka (2):
kvm: Add tool for querying VMX capabilities
kvm: Add top-like kvm statistics script
Liu, Jinsong (1):
kvm: support TSC deadline MSR with subsection
Marcelo Tosatti (1):
Revert "kvm: support TSC deadline MSR"
kvm-all.c | 10 +
scripts/kvm/kvm_stat | 480 +++++++++++++++++++++++++++++++++++++++++++++++
scripts/kvm/vmxcap | 224 ++++++++++++++++++++++
target-i386/cpu.h | 7 +-
target-i386/helper.c | 1 +
target-i386/kvm.c | 15 ++
target-i386/machine.c | 43 ++++-
target-i386/op_helper.c | 6 +
8 files changed, 784 insertions(+), 2 deletions(-)
create mode 100755 scripts/kvm/kvm_stat
create mode 100755 scripts/kvm/vmxcap
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue
2011-10-27 12:10 Marcelo Tosatti
@ 2011-10-31 16:52 ` Anthony Liguori
0 siblings, 0 replies; 15+ messages in thread
From: Anthony Liguori @ 2011-10-31 16:52 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: qemu-devel, kvm
On 10/27/2011 07:10 AM, Marcelo Tosatti wrote:
> The following changes since commit 952e849c150b4f1b89f8728cba00f925c1d6e75b:
>
> Merge remote-tracking branch 'bonzini/split-main-loop-for-anthony' into staging (2011-10-24 10:51:12 -0500)
>
> are available in the git repository at:
>
> git://github.com/avikivity/qemu.git uq/master
Pulled. Thanks.
Regards,
Anthony Liguori
>
> Avi Kivity (2):
> kvm: avoid reentring kvm_flush_coalesced_mmio_buffer()
> i386: wire up MSR_IA32_MISC_ENABLE
>
> Jan Kiszka (2):
> kvm: Add tool for querying VMX capabilities
> kvm: Add top-like kvm statistics script
>
> Liu, Jinsong (1):
> kvm: support TSC deadline MSR with subsection
>
> Marcelo Tosatti (1):
> Revert "kvm: support TSC deadline MSR"
>
> kvm-all.c | 10 +
> scripts/kvm/kvm_stat | 480 +++++++++++++++++++++++++++++++++++++++++++++++
> scripts/kvm/vmxcap | 224 ++++++++++++++++++++++
> target-i386/cpu.h | 7 +-
> target-i386/helper.c | 1 +
> target-i386/kvm.c | 15 ++
> target-i386/machine.c | 43 ++++-
> target-i386/op_helper.c | 6 +
> 8 files changed, 784 insertions(+), 2 deletions(-)
> create mode 100755 scripts/kvm/kvm_stat
> create mode 100755 scripts/kvm/vmxcap
>
>
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2011-10-31 17:05 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-05 20:55 [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 1/6] kvmclock: Fix feature detection Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 2/6] kvm: Drop obsolete KVM_IOEVENTFD #ifdefs Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 3/6] qemu: Add strtosz_suffix_unit function Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 4/6] qemu-x86: Add tsc_freq option to -cpu Marcelo Tosatti
2011-08-05 20:55 ` [Qemu-devel] [PATCH 5/6] qemu-x86: Set tsc_khz in kvm when supported Marcelo Tosatti
2011-08-05 21:28 ` Jan Kiszka
2011-08-05 20:55 ` [Qemu-devel] [PATCH 6/6] Remove #ifdef KVM_CAP_TSC_CONTROL Marcelo Tosatti
2011-08-08 20:07 ` [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2011-10-27 12:10 Marcelo Tosatti
2011-10-31 16:52 ` Anthony Liguori
2011-04-16 22:10 Marcelo Tosatti
2011-04-16 23:57 ` Anthony Liguori
2010-03-04 15:05 Marcelo Tosatti
2010-03-04 15:15 ` Anthony Liguori
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).