qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: petrutlucian94@gmail.com
Cc: Lucian Petrut <lpetrut@cloudbasesolutions.com>,
	Alessandro Pilotti <apilotti@cloudbasesolutions.com>,
	Justin Terry <juterry@microsoft.com>,
	Richard Henderson <rth@twiddle.net>,
	Eduardo Habkost <ehabkost@redhat.com>,
	"open list:All patches CC here" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2 3/3] WHPX: fix some compiler warnings
Date: Wed, 16 May 2018 12:13:08 +0200	[thread overview]
Message-ID: <e2bc8288-d21f-41d4-8a9f-08ff8b18b30d@redhat.com> (raw)
In-Reply-To: <1526405722-10887-3-git-send-email-lpetrut@cloudbasesolutions.com>

On 15/05/2018 19:35, petrutlucian94@gmail.com wrote:
> From: Lucian Petrut <lpetrut@cloudbasesolutions.com>
> 
> This patch fixes a few compiler warnings, especially in case of
> x86 targets, where the number of registers was not properly handled
> and could cause an overflow.
> 
> Signed-off-by: Alessandro Pilotti <apilotti@cloudbasesolutions.com>
> Signed-off-by: Justin Terry (VM) <juterry@microsoft.com>
> Signed-off-by: Lucian Petrut <lpetrut@cloudbasesolutions.com>
> ---
>  target/i386/whpx-all.c | 49 +++++++++++++++++++++++++++++++++++--------------
>  1 file changed, 35 insertions(+), 14 deletions(-)
> 
> diff --git a/target/i386/whpx-all.c b/target/i386/whpx-all.c
> index 0a29d56..2fd3397 100644
> --- a/target/i386/whpx-all.c
> +++ b/target/i386/whpx-all.c
> @@ -226,24 +226,31 @@ static void whpx_set_registers(CPUState *cpu)
>      struct whpx_vcpu *vcpu = get_whpx_vcpu(cpu);
>      struct CPUX86State *env = (CPUArchState *)(cpu->env_ptr);
>      X86CPU *x86_cpu = X86_CPU(cpu);
> -    struct whpx_register_set vcxt = {0};
> +    struct whpx_register_set vcxt;
>      HRESULT hr;
> -    int idx = 0;
> +    int idx;
> +    int idx_next;
>      int i;
>      int v86, r86;
>  
>      assert(cpu_is_stopped(cpu) || qemu_cpu_is_self(cpu));
>  
> +    memset(&vcxt, 0, sizeof(struct whpx_register_set));

This change does not seem like an improvement, can you send a patch with
the bugfix only?

Thanks,

Paolo

  reply	other threads:[~2018-05-16 10:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-15 17:35 [Qemu-devel] [PATCH v2 1/3] WHPX Add signature CPUID petrutlucian94
2018-05-15 17:35 ` [Qemu-devel] [PATCH v2 2/3] WHPX: dynamically load WHP libraries petrutlucian94
2018-05-16 10:13   ` Paolo Bonzini
2018-05-15 17:35 ` [Qemu-devel] [PATCH v2 3/3] WHPX: fix some compiler warnings petrutlucian94
2018-05-16 10:13   ` Paolo Bonzini [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-05-16 10:21 Lucian Petrut
2018-05-16 10:41 ` Paolo Bonzini
2018-05-16 10:44   ` Lucian Petrut

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=e2bc8288-d21f-41d4-8a9f-08ff8b18b30d@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=apilotti@cloudbasesolutions.com \
    --cc=ehabkost@redhat.com \
    --cc=juterry@microsoft.com \
    --cc=lpetrut@cloudbasesolutions.com \
    --cc=petrutlucian94@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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 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).