Add a helper function that appends new entries to the MSR buffer
and checks for the buffer size limit.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
target-i386/kvm.c | 262 ++
1 file changed, 125 insertions(+), 137 del
Simplify kvm_put_tscdeadline_msr() and
kvm_put_msr_feature_control() using kvm_msr_buf and the
kvm_msr_entry_add() helper.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
target-i386/kvm.c | 28 ++--
1 file changed, 6 insertions(+), 22 deletions(-)
diff
Inline the function inside kvm_msr_entry_add().
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
target-i386/kvm.c | 12 +++-
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 3550866..b328392 100644
--- a/target-i386
kvm_msr_entry
structs.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
target-i386/kvm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 660b2d9..1e82400 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -52,8
efinitions, and adding a helper macro to
keep track of the kvm_msr_entry_set() calls. The code can be
seen at:
https://gist.github.com/ehabkost/08d4177a33b8648a71ef
Eduardo Habkost (5):
target-i386: kvm: Allocate kvm_msrs struct once per VCPU
target-i386: kvm: Increase MSR_BUF_SIZE
target
Instead of using 2400 bytes in the stack for 150 MSR entries in
kvm_get_msrs() and kvm_put_msrs(), allocate a buffer once for
each VCPU.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
target-i386/cpu-qom.h | 4
target-i386/kvm.c | 37 +++---
On Mon, Dec 14, 2015 at 07:17:27PM -0500, Raj, Ashok wrote:
> On Mon, Dec 14, 2015 at 11:37:16PM +0100, Borislav Petkov wrote:
> > On Mon, Dec 14, 2015 at 02:11:46PM -0500, Raj, Ashok wrote:
> > > This is mostly harmless.. since the MCG_CAP space is shared and has no
> > > conflict between
Hi,
Comments below:
On Thu, Dec 10, 2015 at 02:41:21PM -0500, Ashok Raj wrote:
> This patch adds basic enumeration, control msr's required to support
> Local Machine Check Exception Support (LMCE).
>
> - Added Local Machine Check definitions, changed MCG_CAP
> - Added support for
On Mon, Dec 14, 2015 at 02:11:46PM -0500, Raj, Ashok wrote:
> On Mon, Dec 14, 2015 at 05:37:38PM +0100, Borislav Petkov wrote:
> >
> > ... and obviously LMCE is vendor-specific so it cannot be enabled on
> > !Intel guests with a define like that. mce_init() in qemu should check
> > vendor too.
>
-by: Eduardo Habkost <ehabk...@redhat.com>
---
Changes series v1 -> v2
* (none)
Changes series v2 -> v3:
* Added PKRU state
---
target-i386/cpu.c | 21 ++---
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index a3de18d..c4
eep the QEMU_BUILD_BUG_ON lines
Changes v2 -> v3:
* XMM_Q helper is now ZMM_Q
* Added PKRU state
Eduardo Habkost (3):
target-i386: Define structs for layout of xsave area
target-i386: Use xsave structs for ext_save_area
target-i386: kvm: Use X86XSaveArea struct for xsave save/load
target-i386/cpu.c
Add structs that define the layout of the xsave areas used by
Intel processors. Add some QEMU_BUILD_BUG_ON lines to ensure the
structs match the XSAVE_* macros in target-i386/kvm.c and the
offsets and sizes at target-i386/cpu.c:ext_save_areas.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.
Instead of using offset macros and bit operations in a uint32_t
array, use the X86XSaveArea struct to perform the loading/saving
operations in kvm_put_xsave() and kvm_get_xsave().
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
Changes v1 -> v2:
* Use uint8_t pointers when loadi
blic/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf.
Reviewed-by: Eduardo Habkost <ehabk...@redhat.com>
The patches were squashed together and queued in x86-next branch
for 2.6.
>
> Huaitong Han (3):
> target-i386: add pkeys support for
On Tue, Dec 01, 2015 at 09:09:47AM -0800, Richard Henderson wrote:
> On 11/30/2015 03:18 AM, Paolo Bonzini wrote:
> >Because this is always little endian, I would write it as uint8_t[16][16].
>
> Maybe. That isn't altogether handy for TCG, since we'll be wanting to bswap
> these buffers
On Tue, Dec 01, 2015 at 06:27:17PM +0100, Paolo Bonzini wrote:
> On 01/12/2015 18:20, Richard Henderson wrote:
> >>
> >> X86XSaveArea will be used only when loading/saving state using
> >> xsave, not for executing regular instructions.
> >
> > ... like the regular instruction xsave?
> >
> >
On Tue, Dec 01, 2015 at 11:22:31AM +0100, Paolo Bonzini wrote:
> On 30/11/2015 18:34, Eduardo Habkost wrote:
> > target-i386/cpu.c:ext_save_area uses magic numbers for the xsave
> > area offets and sizes, and target-i386/kvm.c:kvm_{put,get}_xsave()
> > uses offset macros
On Tue, Dec 01, 2015 at 04:09:44PM +0100, Paolo Bonzini wrote:
>
>
> On 30/11/2015 18:34, Eduardo Habkost wrote:
> > target-i386/cpu.c:ext_save_area uses magic numbers for the xsave
> > area offets and sizes, and target-i386/kvm.c:kvm_{put,get}_xsave()
> > uses offset
+8);
+env->xmm_regs[i].XMM_Q(4) = ldq_p(zmmh);
+ env->xmm_regs[i].XMM_Q(5) = ldq_p(zmmh+8);
+env->xmm_regs[i].XMM_Q(6) = ldq_p(zmmh+16);
+env->xmm_regs[i].XMM_Q(7) = ldq_p(zmmh+24);
}
#ifdef TARGET_X86_64
Eduardo Habkost (3):
target-i386:
Instead of using offset macros and bit operations in a uint32_t
array, use the X86XSaveArea struct to perform the loading/saving
operations in kvm_put_xsave() and kvm_get_xsave().
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
Changes v1 -> v2:
* Use uint8_t pointers when loadi
Add structs that define the layout of the xsave areas used by
Intel processors. Add some QEMU_BUILD_BUG_ON lines to ensure the
structs match the XSAVE_* macros in target-i386/kvm.c and the
offsets and sizes at target-i386/cpu.c:ext_save_areas.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.
-by: Eduardo Habkost <ehabk...@redhat.com>
---
target-i386/cpu.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 11e5e39..bc95437 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -458,17 +458,23 @@ typedef
On Mon, Nov 30, 2015 at 12:21:23PM +0100, Paolo Bonzini wrote:
>
>
> On 28/11/2015 20:56, Eduardo Habkost wrote:
> > I still need to figure out a way to write unit tests for the new
> > code. Maybe I will just copy and paste the new and old functions,
> > and
On Mon, Nov 30, 2015 at 12:18:33PM +0100, Paolo Bonzini wrote:
> On 28/11/2015 20:56, Eduardo Habkost wrote:
> > +/* Ext. save area 2: AVX State */
> > +typedef struct XSaveAVX {
> > +uint64_t ymmh[16][2];
> > +} XSaveAVX;
> > +
>
> Because this
On Fri, Nov 27, 2015 at 08:16:42AM +0800, Haozhong Zhang wrote:
> On 11/26/15 12:19, Eduardo Habkost wrote:
> > On Tue, Nov 24, 2015 at 11:33:57AM +0800, Haozhong Zhang wrote:
> > > This patch enables migrating vcpu's TSC rate. If KVM on the destination
> > > machine
Instead of using offset macros and bit operations in a uint32_t
array, use the X86XSaveArea struct to perform the loading/saving
operations in kvm_put_xsave() and kvm_get_xsave().
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
target-i386/kvm.c
Add structs that define the layout of the xsave areas used by
Intel processors. Add some QEMU_BUILD_BUG_ON lines to ensure the
structs match the XSAVE_* macros in target-i386/kvm.c and the
offsets and sizes at target-i386/cpu.c:ext_save_areas.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.
to write unit tests for the new
code. Maybe I will just copy and paste the new and old functions,
and test them locally (checking if they give the same results
when translating blobs of random bytes).
Eduardo Habkost (3):
target-i386: Define structs for layout of xsave area
target-i386: Use
-by: Eduardo Habkost <ehabk...@redhat.com>
---
target-i386/cpu.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 11e5e39..bc95437 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -458,17 +458,23 @@ typedef
tches to enable migrating vcpu's TSC rate.
>
> Signed-off-by: Haozhong Zhang <haozhong.zh...@intel.com>
Reviewed-by: Eduardo Habkost <ehabk...@redhat.com>
> ---
> target-i386/kvm.c | 14 ++
> 1 file changed, 14 insertions(+)
>
> diff --git a/targe
lack of TSC scaling never failed kvm_arch_init_vcpu(),
>* the failure of KVM_SET_TSC_KHZ failed kvm_arch_init_vcpu()
> unconditionally, even though the TSC rate to be set is identical
> to the value currently used by KVM.
>
> Signed-off-by: Haozhong Zhang <haoz
), because the patch will be included
after QEMU 2.5.0:
Reviewed-by: Eduardo Habkost <ehabk...@redhat.com>
One comment below:
> ---
[...]
> diff --git a/target-i386/kvm.c b/target-i386/kvm.c
> index 1e811ee..2a0fd54 100644
> --- a/target-i386/kvm.c
> +++ b/target-i386/kvm.c
&
On Wed, Nov 25, 2015 at 05:45:20PM +0100, Paolo Bonzini wrote:
> On 25/11/2015 16:49, Eduardo Habkost wrote:
> > Instead of silently clearing mcg_cap bits when the host doesn't
> > support them, print a warning when doing that.
> >
> > Signed-off-by: Eduardo H
Instead of silently clearing mcg_cap bits when the host doesn't
support them, print a warning when doing that.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
target-i386/kvm.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/target-i386/kvm.c b/targe
e_init() in the future, to implement different defaults
depending on CPU model, machine-type or command-line parameters.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
target-i386/cpu.h | 2 ++
target-i386/kvm.c | 11 ---
2 files changed, 6 insertions(+), 7 deletions(-)
diff --
KVM_CAP_MCE was introduced, so no behavior is being changed and
the error can't be triggered by any Linux version. The point of
the new check is to ensure we won't silently change the bank
count if we change MCE_BANKS_DEF or make the bank count
configurable in the future.
Signed-off-by: Eduardo Habkost
faults depending on CPU model, machine-type
or command-line parameters.
Eduardo Habkost (3):
target-i386: kvm: Abort if MCE bank count is not supported by host
target-i386: kvm: Use env->mcg_cap when setting up MCE
target-i386: kvm: Print warning when clearing mcg_cap bits
target-i386/
On Wed, Nov 25, 2015 at 05:46:38PM +0100, Paolo Bonzini wrote:
>
>
> On 25/11/2015 16:49, Eduardo Habkost wrote:
> > Instead of silently changing the number of banks in mcg_cap based
> > on kvm_get_mce_cap_supported(), abort initialization if the host
> > doesn't
tches to enable migrating vcpu's TSC rate.
>
> Signed-off-by: Haozhong Zhang <haozhong.zh...@intel.com>
Reviewed-by: Eduardo Habkost <ehabk...@redhat.com>
> ---
> target-i386/kvm.c | 14 ++
> 1 file changed, 14 insertions(+)
>
> diff --git a/targe
On Mon, Nov 23, 2015 at 05:43:14PM +0100, Borislav Petkov wrote:
> On Mon, Nov 23, 2015 at 01:11:27PM -0200, Eduardo Habkost wrote:
> > On Mon, Nov 23, 2015 at 11:22:37AM -0200, Eduardo Habkost wrote:
> > [...]
> > > In the case of this code, it looks like it's alre
On Mon, Nov 23, 2015 at 05:43:14PM +0100, Borislav Petkov wrote:
> On Mon, Nov 23, 2015 at 01:11:27PM -0200, Eduardo Habkost wrote:
> > On Mon, Nov 23, 2015 at 11:22:37AM -0200, Eduardo Habkost wrote:
> > [...]
> > > In the case of this code, it looks like it's alre
On Sat, Nov 21, 2015 at 02:09:25AM +0100, Borislav Petkov wrote:
> On Sat, Nov 21, 2015 at 12:11:35AM +0100, Andreas Färber wrote:
> > Hi,
> >
> > CC'ing qemu-devel.
>
> Ah, thanks.
>
> > Am 21.11.2015 um 00:01 schrieb Borislav Petkov:
> > > From: Borislav Petkov
> > >
> > >
On Mon, Nov 23, 2015 at 11:22:37AM -0200, Eduardo Habkost wrote:
[...]
> In the case of this code, it looks like it's already broken
> because the resulting mcg_cap depends on host kernel capabilities
> (the ones reported by kvm_get_mce_cap_supported()), and the data
> initialized by
On Thu, Nov 19, 2015 at 12:10:49PM +0100, Paolo Bonzini wrote:
>
>
> On 19/11/2015 07:36, Han, Huaitong wrote:
> > I understand it has always been that QEMU considers the feature of
> > cpuid_7_0_ecx_feature_name as migratable. If the feature is
> > unmigratable, it will been added to
On Wed, Nov 18, 2015 at 10:20:15AM +0800, Huaitong Han wrote:
[...]
> @@ -408,6 +420,13 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS]
> = {
> .cpuid_reg = R_EBX,
> .tcg_features = TCG_7_0_EBX_FEATURES,
> },
> +[FEAT_7_0_ECX] = {
> +.feat_names =
On Wed, Nov 18, 2015 at 10:20:14AM +0800, Huaitong Han wrote:
> Changes in v3:
> *Fix cpuid_7_0_ecx_feature_name error.
>
> Changes in v2:
> *Fix memcpy error for xsave state.
> *Fix TCG_7_0_ECX_FEATURES to 0.
> *Make subjects more readable.
>
> The protection-key feature provides an additional
On Wed, Nov 18, 2015 at 09:59:34AM +0800, Xiao Guangrong wrote:
>
> Ping...
>
> Do you have any comment on this patchset? Could it be applied to somewhere
> if it is okay for you?
I have no additional comments, as the memory-backend patches I
was reviewing are not included in this version. I
On Tue, Nov 17, 2015 at 01:20:38PM +0800, Haozhong Zhang wrote:
> Following two changes are made to the TSC rate setting code in
> kvm_arch_init_vcpu():
> * The code is moved to a new function kvm_arch_set_tsc_khz().
> * If setting user-specified TSC rate fails and the host TSC rate is
>
On Tue, Nov 17, 2015 at 01:20:37PM +0800, Haozhong Zhang wrote:
> If no user-specified TSC rate is present, we will try to set
> env->tsc_khz to the value returned by KVM_GET_TSC_KHZ.
>
> Signed-off-by: Haozhong Zhang
> ---
> target-i386/kvm.c | 12
> 1
Hi,
On Tue, Nov 17, 2015 at 01:20:39PM +0800, Haozhong Zhang wrote:
> This patch enables migrating vcpu's TSC rate. If KVM on the destination
> machine supports TSC scaling, guest programs will observe a consistent
> TSC rate across the migration.
>
> If TSC scaling is not supported on the
On Tue, Nov 17, 2015 at 10:07:53PM +0800, Haozhong Zhang wrote:
> On 11/17/15 11:32, Eduardo Habkost wrote:
> > On Tue, Nov 17, 2015 at 01:20:38PM +0800, Haozhong Zhang wrote:
> > > Following two changes are made to the TSC rate setting code in
> > > kvm_arch_ini
On Mon, Nov 16, 2015 at 10:30:08PM +0800, Haozhong Zhang wrote:
> On 11/16/15 11:43, Eduardo Habkost wrote:
> > On Mon, Nov 16, 2015 at 04:04:08PM +0800, Haozhong Zhang wrote:
> > > This patch enables migrating vcpu's TSC rate. If KVM on the destination
> > > machine
On Mon, Nov 16, 2015 at 04:04:08PM +0800, Haozhong Zhang wrote:
> This patch enables migrating vcpu's TSC rate. If KVM on the destination
> machine supports TSC scaling, guest programs will observe a consistent
> TSC rate across the migration.
>
> If TSC scaling is not supported on the
On Mon, Nov 16, 2015 at 04:04:07PM +0800, Haozhong Zhang wrote:
> If no user-specified TSC rate is present, we will try to set
> env->tsc_khz to the value returned by KVM_GET_TSC_KHZ.
>
> Signed-off-by: Haozhong Zhang
> ---
> target-i386/kvm.c | 25
On Fri, Nov 13, 2015 at 10:23:54AM +0800, Haozhong Zhang wrote:
> On 11/11/15 22:27, Haozhong Zhang wrote:
> > On 11/11/15 12:16, Eduardo Habkost wrote:
> [...]
> > > > diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> > > > index 2f8f396..858ed69 1
On Wed, Nov 11, 2015 at 12:57:44AM +0800, Haozhong Zhang wrote:
> On 11/09/15 14:01, Eduardo Habkost wrote:
> > On Mon, Nov 09, 2015 at 08:33:55AM +0800, haozhong.zh...@intel.com wrote:
> > > On 11/06/15 13:12, Eduardo Habkost wrote:
> > > > On Fri, Nov 06, 2015 at
On Tue, Nov 10, 2015 at 09:08:58AM +0800, Haozhong Zhang wrote:
> On 11/09/15 14:01, Eduardo Habkost wrote:
> > On Mon, Nov 09, 2015 at 08:33:55AM +0800, haozhong.zh...@intel.com wrote:
> > > On 11/06/15 13:12, Eduardo Habkost wrote:
> > > > On Fri, Nov 06, 2015 at
On Mon, Nov 02, 2015 at 05:26:41PM +0800, Haozhong Zhang wrote:
> A new subsection 'vmstate_tsc_khz' is added to migrate vcpu's TSC
> rate. For the backwards compatibility, this subsection is not migrated
> on pc-*-2.4 and older machine types.
>
> Signed-off-by: Haozhong Zhang
On Mon, Nov 09, 2015 at 12:36:36PM +0800, Xiao Guangrong wrote:
> On 11/06/2015 11:36 PM, Eduardo Habkost wrote:
> >On Mon, Nov 02, 2015 at 05:13:09PM +0800, Xiao Guangrong wrote:
> >>There are three places use the some logic to get the page size on
> >>the file path
On Mon, Nov 09, 2015 at 01:58:27PM +0800, Xiao Guangrong wrote:
>
>
> On 11/06/2015 11:54 PM, Eduardo Habkost wrote:
> >On Mon, Nov 02, 2015 at 05:13:14PM +0800, Xiao Guangrong wrote:
> >>lseek can not work for all block devices as the man page says:
> >>| Some
On Mon, Nov 09, 2015 at 07:55:33PM +0800, Huaitong Han wrote:
> This patch adds pkeys support for qemu xsave state handling.
>
> Signed-off-by: Huaitong Han
[...]
> @@ -1145,6 +1146,7 @@ static int kvm_put_xsave(X86CPU *cpu)
> #ifdef TARGET_X86_64
>
On Mon, Nov 09, 2015 at 08:33:55AM +0800, haozhong.zh...@intel.com wrote:
> On 11/06/15 13:12, Eduardo Habkost wrote:
> > On Fri, Nov 06, 2015 at 10:32:24AM +0800, haozhong.zh...@intel.com wrote:
> > > On 11/05/15 14:05, Eduardo Habkost wrote:
> > > > On Thu, No
On Mon, Nov 09, 2015 at 12:44:55PM +0800, Xiao Guangrong wrote:
> On 11/06/2015 11:50 PM, Eduardo Habkost wrote:
> >As this patch affects raw_getlength(), CCing the raw block driver
> >maintainer and the qemu-block mailing list.
>
> Eduardo, thanks for your reminder. I
On Fri, Nov 06, 2015 at 10:32:24AM +0800, haozhong.zh...@intel.com wrote:
> On 11/05/15 14:05, Eduardo Habkost wrote:
> > On Thu, Nov 05, 2015 at 09:30:51AM +0800, Haozhong Zhang wrote:
> > > On 11/04/15 19:42, Eduardo Habkost wrote:
[...]
> > > > >
On Fri, Nov 06, 2015 at 10:32:44AM +0800, Haozhong Zhang wrote:
> On 11/05/15 14:10, Eduardo Habkost wrote:
> > On Mon, Nov 02, 2015 at 05:26:43PM +0800, Haozhong Zhang wrote:
> > > Set vcpu's TSC rate to the migrated value if the user does not specify a
> > > TSC r
On Mon, Nov 02, 2015 at 05:13:09PM +0800, Xiao Guangrong wrote:
> There are three places use the some logic to get the page size on
> the file path or file fd
>
> Windows did not support file hugepage, so it will return normal page
> for this case. And this interface has not been used on windows
On Tue, Nov 03, 2015 at 12:21:30AM +0800, Xiao Guangrong wrote:
> On 11/03/2015 12:11 AM, Vladimir Sementsov-Ogievskiy wrote:
> >On 02.11.2015 12:13, Xiao Guangrong wrote:
> >>lseek can not work for all block devices as the man page says:
> >>| Some devices are incapable of seeking and POSIX does
As this patch affects raw_getlength(), CCing the raw block driver
maintainer and the qemu-block mailing list.
On Mon, Nov 02, 2015 at 05:13:14PM +0800, Xiao Guangrong wrote:
> lseek can not work for all block devices as the man page says:
> | Some devices are incapable of seeking and POSIX does
As this patch affects raw_getlength(), CCing the raw block driver
maintainer and the qemu-block mailing list.
On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote:
> It is used to get the size of the specified file, also qemu_fd_getlength()
> is introduced to unify the code with
On Mon, Nov 02, 2015 at 05:13:14PM +0800, Xiao Guangrong wrote:
> lseek can not work for all block devices as the man page says:
> | Some devices are incapable of seeking and POSIX does not specify
> | which devices must support lseek().
>
> This patch tries to add the support on Linux by using
On Fri, Nov 06, 2015 at 12:04:56PM +0100, Richard Henderson wrote:
> On 11/04/2015 10:24 PM, Eduardo Habkost wrote:
> >Accept the clwb instruction (66 0F AE /6) if its corresponding feature
> >flag is enabled on CPUID[7].
> >
> >Signed-off-by: Eduardo H
On Mon, Nov 02, 2015 at 05:26:43PM +0800, Haozhong Zhang wrote:
> Set vcpu's TSC rate to the migrated value if the user does not specify a
> TSC rate by cpu option 'tsc-freq' and a migrated TSC rate does exist. If
> KVM supports TSC scaling, guest programs will observe TSC increasing in
> the
On Thu, Nov 05, 2015 at 09:30:51AM +0800, Haozhong Zhang wrote:
> On 11/04/15 19:42, Eduardo Habkost wrote:
> > On Mon, Nov 02, 2015 at 05:26:42PM +0800, Haozhong Zhang wrote:
> > > The value of the migrated vcpu's TSC rate is determined as below.
> > > 1. If a TSC r
On Thu, Nov 05, 2015 at 08:51:24AM +0100, Richard Henderson wrote:
> On 11/04/2015 08:35 PM, Eduardo Habkost wrote:
> >On Fri, Oct 30, 2015 at 01:54:33PM -0700, Richard Henderson wrote:
> >>On 10/29/2015 12:31 AM, Xiao Guangrong wrote:
> >>>These instructi
On Mon, Nov 02, 2015 at 05:13:22PM +0800, Xiao Guangrong wrote:
[...]
> static MemoryRegion *pc_dimm_get_memory_region(DIMMDevice *dimm)
> {
> -return host_memory_backend_get_memory(dimm->hostmem, _abort);
> +Error *local_err = NULL;
> +MemoryRegion *mr;
> +
> +mr =
se opcodes.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
config/config-x86-common.mak | 2 +
config/config-x86_64.mak | 2 +-
x86/memory.c | 88
3 files changed, 91 insertions(+), 1 deletion(-)
create mode 100644 x8
On Mon, Nov 02, 2015 at 05:26:42PM +0800, Haozhong Zhang wrote:
> The value of the migrated vcpu's TSC rate is determined as below.
> 1. If a TSC rate is specified by the cpu option 'tsc-freq', then this
> user-specified value will be used.
> 2. If neither a user-specified TSC rate nor a
Accept the clwb instruction (66 0F AE /6) if its corresponding feature
flag is enabled on CPUID[7].
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
target-i386/translate.c | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/target-i386/translate.c b/
Detect the clflushopt and pcommit instructions and check their
corresponding feature flags, instead of checking CPUID_SSE and
CPUID_CLFLUSH.
Signed-off-by: Eduardo Habkost <ehabk...@redhat.com>
---
target-i386/translate.c | 28
1 file changed, 20 insertions
end-email-ehabk...@redhat.com>
Eduardo Habkost (2):
target-i386: tcg: Accept clwb instruction
target-i386: tcg: Check right CPUID bits for clflushopt/pcommit
target-i386/translate.c | 39 +++
1 file changed, 31 insertions(+), 8 deletions(-)
--
On Fri, Oct 30, 2015 at 01:54:33PM -0700, Richard Henderson wrote:
> On 10/29/2015 12:31 AM, Xiao Guangrong wrote:
> > These instructions are used by NVDIMM drivers and the specification
> > locates at:
> > https://software.intel.com/sites/default/files/managed/0d/53/319433-022.pdf
> >
> > There
On Wed, Nov 04, 2015 at 11:12:41AM +0800, Xiao Guangrong wrote:
> On 11/04/2015 07:00 AM, Eduardo Habkost wrote:
> >On Mon, Nov 02, 2015 at 05:13:10PM +0800, Xiao Guangrong wrote:
> >>Currently file_ram_alloc() is designed for hugetlbfs, however, the memory
> >>of nvdi
On Wed, Nov 04, 2015 at 11:17:09AM +0800, Xiao Guangrong wrote:
>
>
> On 11/04/2015 07:21 AM, Eduardo Habkost wrote:
> >On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote:
> >[...]
> >>+size_t qemu_file_getlength(const char *file, Error **errp
On Mon, Nov 02, 2015 at 05:13:10PM +0800, Xiao Guangrong wrote:
> Currently file_ram_alloc() is designed for hugetlbfs, however, the memory
> of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file
> locates at DAX enabled filesystem
>
> So this patch let it work on any kind of
On Mon, Nov 02, 2015 at 05:13:13PM +0800, Xiao Guangrong wrote:
[...]
> +size_t qemu_file_getlength(const char *file, Error **errp)
> +{
> +int64_t size;
[...]
> +return size;
Can you guarantee that SIZE_MAX >= INT64_MAX on all platforms supported
by QEMU?
--
Eduardo
--
To unsubscribe
On Sat, Oct 31, 2015 at 04:09:56PM +0800, Xiao Guangrong wrote:
> On 10/30/2015 11:54 PM, Eduardo Habkost wrote:
> >On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote:
> >>There are three places use the some logic to get the page size on
> >>the file path or
On Sat, Oct 31, 2015 at 04:46:05PM +0800, Xiao Guangrong wrote:
> On 10/31/2015 01:30 AM, Eduardo Habkost wrote:
> >On Fri, Oct 30, 2015 at 01:56:05PM +0800, Xiao Guangrong wrote:
> >>Use the whole file size if @size is not specified which is useful
> >>if we want to di
On Sat, Oct 31, 2015 at 03:44:39PM +0800, Xiao Guangrong wrote:
> On 10/30/2015 10:04 PM, Vladimir Sementsov-Ogievskiy wrote:
> >On 30.10.2015 08:56, Xiao Guangrong wrote:
> >>Currently file_ram_alloc() is designed for hugetlbfs, however, the memory
> >>of nvdimm can come from either raw pmem
On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote:
> There are three places use the some logic to get the page size on
> the file path or file fd
>
> This patch introduces qemu_file_get_page_size() to unify the code
>
> Signed-off-by: Xiao Guangrong
On Fri, Oct 30, 2015 at 01:56:05PM +0800, Xiao Guangrong wrote:
> Use the whole file size if @size is not specified which is useful
> if we want to directly pass a file to guest
>
> Signed-off-by: Xiao Guangrong
> ---
> backends/hostmem-file.c | 48
On Mon, Oct 26, 2015 at 10:09:13AM +0800, haozhong.zh...@intel.com wrote:
> On Fri, Oct 23, 2015 at 12:45:13PM -0200, Eduardo Habkost wrote:
> > On Fri, Oct 23, 2015 at 10:27:27AM +0800, Haozhong Zhang wrote:
> > > On Thu, Oct 22, 2015 at 04:45:21PM -0200, Eduardo Habkost wro
On Fri, Oct 23, 2015 at 08:35:20AM -0200, Marcelo Tosatti wrote:
> On Thu, Oct 22, 2015 at 04:45:21PM -0200, Eduardo Habkost wrote:
> > On Tue, Oct 20, 2015 at 03:22:51PM +0800, Haozhong Zhang wrote:
> > > This patchset enables QEMU to save/restore vcpu's TSC rate during the
>
On Fri, Oct 23, 2015 at 10:27:27AM +0800, Haozhong Zhang wrote:
> On Thu, Oct 22, 2015 at 04:45:21PM -0200, Eduardo Habkost wrote:
> > On Tue, Oct 20, 2015 at 03:22:51PM +0800, Haozhong Zhang wrote:
> > > This patchset enables QEMU to save/restore vcpu's TSC rate during the
>
On Fri, Oct 23, 2015 at 11:14:48AM +0800, Haozhong Zhang wrote:
> On Thu, Oct 22, 2015 at 04:11:37PM -0200, Eduardo Habkost wrote:
> > On Tue, Oct 20, 2015 at 03:22:54PM +0800, Haozhong Zhang wrote:
> > > Set vcpu's TSC rate to the migrated value (if any). If KVM supports TSC
&g
On Tue, Oct 20, 2015 at 03:22:51PM +0800, Haozhong Zhang wrote:
> This patchset enables QEMU to save/restore vcpu's TSC rate during the
> migration. When cooperating with KVM which supports TSC scaling, guest
> programs can observe a consistent guest TSC rate even though they are
> migrated among
On Tue, Oct 20, 2015 at 03:22:54PM +0800, Haozhong Zhang wrote:
> Set vcpu's TSC rate to the migrated value (if any). If KVM supports TSC
> scaling, guest programs will observe TSC increasing in the migrated rate
> other than the host TSC rate.
>
> The loading is controlled by a new cpu option
On Wed, Oct 14, 2015 at 10:50:40PM +0800, Xiao Guangrong wrote:
> On 10/14/2015 05:40 PM, Stefan Hajnoczi wrote:
> >On Sun, Oct 11, 2015 at 11:52:59AM +0800, Xiao Guangrong wrote:
> >> static void dsm_write(void *opaque, hwaddr addr,
> >>uint64_t val, unsigned size)
> >>
On Wed, Sep 30, 2015 at 08:32:26AM +0800, Haozhong Zhang wrote:
> > [...]
> > > > Or maybe we shouldn't treat this as VM state, but as configuration, and
> > > > let management configure the TSC frequency explicitly if the user really
> > > > needs it to stay the same during migration.
> > > >
> >
On Tue, Sep 29, 2015 at 11:43:34AM +0800, Haozhong Zhang wrote:
> On Mon, Sep 28, 2015 at 01:37:34PM -0300, Eduardo Habkost wrote:
> > On Mon, Sep 28, 2015 at 01:38:31PM +0800, Haozhong Zhang wrote:
[...]
> > > static void do_kvm_cpu_synchronize_post_init(void *arg)
> >
On Mon, Sep 28, 2015 at 01:38:31PM +0800, Haozhong Zhang wrote:
> When a vcpu is created in KVM, its TSC rate is initially identical to
> the host TSC rate. If its state is migrated to a vcpu on another
> machine (target machine) which may uses a different host TSC rate, QEMU
> on the target
1 - 100 of 610 matches
Mail list logo