All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laszlo Ersek <lersek@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org
Cc: qemu-stable@nongnu.org
Subject: Re: [PATCH v2 1/3] x86: Use common variable range MTRR counts
Date: Thu, 14 Aug 2014 22:47:27 +0200	[thread overview]
Message-ID: <53ED205F.3030202@redhat.com> (raw)
In-Reply-To: <20140814192403.13303.69084.stgit@gimli.home>

On 08/14/14 21:24, Alex Williamson wrote:
> We currently define the number of variable range MTRR registers as 8
> in the CPUX86State structure and vmstate, but use MSR_MTRRcap_VCNT
> (also 8) to report to guests the number available.  Change this to
> use MSR_MTRRcap_VCNT consistently.
> 
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: qemu-stable@nongnu.org
> ---
> 
>  target-i386/cpu.h     |    2 +-
>  target-i386/machine.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target-i386/cpu.h b/target-i386/cpu.h
> index e634d83..d37d857 100644
> --- a/target-i386/cpu.h
> +++ b/target-i386/cpu.h
> @@ -930,7 +930,7 @@ typedef struct CPUX86State {
>      /* MTRRs */
>      uint64_t mtrr_fixed[11];
>      uint64_t mtrr_deftype;
> -    MTRRVar mtrr_var[8];
> +    MTRRVar mtrr_var[MSR_MTRRcap_VCNT];
>  
>      /* For KVM */
>      uint32_t mp_state;
> diff --git a/target-i386/machine.c b/target-i386/machine.c
> index 16d2f6a..fb89065 100644
> --- a/target-i386/machine.c
> +++ b/target-i386/machine.c
> @@ -677,7 +677,7 @@ VMStateDescription vmstate_x86_cpu = {
>          /* MTRRs */
>          VMSTATE_UINT64_ARRAY_V(env.mtrr_fixed, X86CPU, 11, 8),
>          VMSTATE_UINT64_V(env.mtrr_deftype, X86CPU, 8),
> -        VMSTATE_MTRR_VARS(env.mtrr_var, X86CPU, 8, 8),
> +        VMSTATE_MTRR_VARS(env.mtrr_var, X86CPU, MSR_MTRRcap_VCNT, 8),
>          /* KVM-related states */
>          VMSTATE_INT32_V(env.interrupt_injected, X86CPU, 9),
>          VMSTATE_UINT32_V(env.mp_state, X86CPU, 9),
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

WARNING: multiple messages have this Message-ID (diff)
From: Laszlo Ersek <lersek@redhat.com>
To: Alex Williamson <alex.williamson@redhat.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org
Cc: qemu-stable@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 1/3] x86: Use common variable range MTRR counts
Date: Thu, 14 Aug 2014 22:47:27 +0200	[thread overview]
Message-ID: <53ED205F.3030202@redhat.com> (raw)
In-Reply-To: <20140814192403.13303.69084.stgit@gimli.home>

On 08/14/14 21:24, Alex Williamson wrote:
> We currently define the number of variable range MTRR registers as 8
> in the CPUX86State structure and vmstate, but use MSR_MTRRcap_VCNT
> (also 8) to report to guests the number available.  Change this to
> use MSR_MTRRcap_VCNT consistently.
> 
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: qemu-stable@nongnu.org
> ---
> 
>  target-i386/cpu.h     |    2 +-
>  target-i386/machine.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target-i386/cpu.h b/target-i386/cpu.h
> index e634d83..d37d857 100644
> --- a/target-i386/cpu.h
> +++ b/target-i386/cpu.h
> @@ -930,7 +930,7 @@ typedef struct CPUX86State {
>      /* MTRRs */
>      uint64_t mtrr_fixed[11];
>      uint64_t mtrr_deftype;
> -    MTRRVar mtrr_var[8];
> +    MTRRVar mtrr_var[MSR_MTRRcap_VCNT];
>  
>      /* For KVM */
>      uint32_t mp_state;
> diff --git a/target-i386/machine.c b/target-i386/machine.c
> index 16d2f6a..fb89065 100644
> --- a/target-i386/machine.c
> +++ b/target-i386/machine.c
> @@ -677,7 +677,7 @@ VMStateDescription vmstate_x86_cpu = {
>          /* MTRRs */
>          VMSTATE_UINT64_ARRAY_V(env.mtrr_fixed, X86CPU, 11, 8),
>          VMSTATE_UINT64_V(env.mtrr_deftype, X86CPU, 8),
> -        VMSTATE_MTRR_VARS(env.mtrr_var, X86CPU, 8, 8),
> +        VMSTATE_MTRR_VARS(env.mtrr_var, X86CPU, MSR_MTRRcap_VCNT, 8),
>          /* KVM-related states */
>          VMSTATE_INT32_V(env.interrupt_injected, X86CPU, 9),
>          VMSTATE_UINT32_V(env.mp_state, X86CPU, 9),
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>

  reply	other threads:[~2014-08-14 20:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-14 19:23 [PATCH v2 0/3] Sync MTRRs with KVM and disable on reset Alex Williamson
2014-08-14 19:23 ` [Qemu-devel] " Alex Williamson
2014-08-14 19:24 ` [PATCH v2 1/3] x86: Use common variable range MTRR counts Alex Williamson
2014-08-14 19:24   ` [Qemu-devel] " Alex Williamson
2014-08-14 20:47   ` Laszlo Ersek [this message]
2014-08-14 20:47     ` Laszlo Ersek
2014-08-14 19:24 ` [PATCH v2 2/3] x86: kvm: Add MTRR support for kvm_get|put_msrs() Alex Williamson
2014-08-14 19:24   ` [Qemu-devel] " Alex Williamson
2014-08-14 21:20   ` Laszlo Ersek
2014-08-14 21:20     ` [Qemu-devel] " Laszlo Ersek
2014-08-14 21:32     ` Alex Williamson
2014-08-14 21:32       ` [Qemu-devel] " Alex Williamson
2014-08-14 21:27   ` Laszlo Ersek
2014-08-14 21:27     ` [Qemu-devel] " Laszlo Ersek
2014-08-14 19:24 ` [PATCH v2 3/3] x86: Clear MTRRs on vCPU reset Alex Williamson
2014-08-14 19:24   ` [Qemu-devel] " Alex Williamson
2014-08-14 21:23   ` Laszlo Ersek
2014-08-14 21:23     ` [Qemu-devel] " Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53ED205F.3030202@redhat.com \
    --to=lersek@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.