qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: kwolf@redhat.com, mreitz@redhat.com
Cc: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>,
	vsementsov@virtuozzo.com, qemu-devel@nongnu.org,
	qemu-block@nongnu.org, den@openvz.org
Subject: Re: [Qemu-devel] [PATCH v2] hw/block/fdc: floppy command FIFO memory initialization
Date: Wed, 29 May 2019 14:34:35 -0400	[thread overview]
Message-ID: <35a23383-dbbb-6ad5-f8f9-9c7e3c1e9694@redhat.com> (raw)
In-Reply-To: <1559154027-282547-1-git-send-email-andrey.shinkevich@virtuozzo.com>



On 5/29/19 2:20 PM, Andrey Shinkevich wrote:
> The uninitialized memory allocated for the command FIFO of the
> floppy controller during the VM hardware initialization incurs
> many unwanted reports by Valgrind when VM state is being saved.
> That verbosity hardens a search for the real memory issues when
> the iotests run. Particularly, the patch eliminates 20 unnecessary
> reports of the Valgrind tool in the iotest #169.
> 
> Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
> ---
> v2:
>   01: The pointer unnecessary check 'if (fdctrl->fifo)' was removed
>       as suggested by John.
> 
>  hw/block/fdc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/block/fdc.c b/hw/block/fdc.c
> index 6f19f12..9af762b 100644
> --- a/hw/block/fdc.c
> +++ b/hw/block/fdc.c
> @@ -2647,6 +2647,7 @@ static void fdctrl_realize_common(DeviceState *dev, FDCtrl *fdctrl,
>  
>      FLOPPY_DPRINTF("init controller\n");
>      fdctrl->fifo = qemu_memalign(512, FD_SECTOR_LEN);
> +    memset(fdctrl->fifo, 0, FD_SECTOR_LEN);
>      fdctrl->fifo_size = 512;
>      fdctrl->result_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL,
>                                               fdctrl_result_timer, fdctrl);
> 

I guess technically I would send a PR for this but it's just a single
patch, so it'd be nice if it can just get staged in the next block
roundup by whomever.

Max/Kevin, if you would be so kind?

--js


  parent reply	other threads:[~2019-05-29 18:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29 18:20 [Qemu-devel] [PATCH v2] hw/block/fdc: floppy command FIFO memory initialization Andrey Shinkevich
2019-05-29 18:22 ` John Snow
2019-05-29 18:34 ` John Snow [this message]
2019-05-29 21:38 ` Max Reitz
2019-05-30  6:47   ` Andrey Shinkevich

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=35a23383-dbbb-6ad5-f8f9-9c7e3c1e9694@redhat.com \
    --to=jsnow@redhat.com \
    --cc=andrey.shinkevich@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /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).