qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Anthony PERARD <anthony.perard@citrix.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
	"patches@linaro.org" <patches@linaro.org>,
	Stefano Stabellini <sstabellini@kernel.org>,
	"open list:X86" <xen-devel@lists.xenproject.org>
Subject: Re: [Qemu-devel] [RFC] xen: Don't use memory_region_init_ram_nomigrate() in pci_assign_dev_load_option_rom()
Date: Fri, 15 Jun 2018 11:06:47 +0100	[thread overview]
Message-ID: <CAFEAcA_X2V-YkM1ZeCHMPW3cQBk2=ZQ4BAgtcg67Eb+OuADbgQ@mail.gmail.com> (raw)
In-Reply-To: <20180605165507.GB2165@perard.uk.xensource.com>

On 5 June 2018 at 17:55, Anthony PERARD <anthony.perard@citrix.com> wrote:
> On Fri, Jun 01, 2018 at 06:59:10PM +0100, Peter Maydell wrote:
>> The xen pci_assign_dev_load_option_rom() currently creates a RAM
>> memory region with memory_region_init_ram_nomigrate(), and then
>> manually registers it with vmstate_register_ram(). In fact for
>> its only callsite, the 'owner' pointer we use for the init call
>> and the '&dev->qdev' pointer we use for the vmstate_register_ram()
>> call refer to the same object. Simplify the function to only
>> take a pointer to the device once instead of twice, and use
>> memory_region_init_ram() which automatically does the vmstate
>> register for us.
>>
>> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
>> ---
>> This is a fairly trivial no-behaviour-change code cleanup, but
>> I've marked it as RFC because I don't have a setup for doing
>> more than just compile-testing Xen related patches.
>> This was found as part of a sweep through for code using
>> the _nomigrate versions of functions.
>
> That patch looks fine, and seams fine after hacking my way into testing
> the change.
>
> Acked-by: Anthony PERARD <anthony.perard@citrix.com>

Thanks for the review. Stefano, do you want to take it via the
xen subtree?

thanks
-- PMM

  reply	other threads:[~2018-06-15 10:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01 17:59 [Qemu-devel] [RFC] xen: Don't use memory_region_init_ram_nomigrate() in pci_assign_dev_load_option_rom() Peter Maydell
2018-06-05 16:55 ` Anthony PERARD
2018-06-15 10:06   ` Peter Maydell [this message]
2018-06-15 14:42     ` Anthony PERARD
2018-06-15 15:38       ` Stefano Stabellini

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='CAFEAcA_X2V-YkM1ZeCHMPW3cQBk2=ZQ4BAgtcg67Eb+OuADbgQ@mail.gmail.com' \
    --to=peter.maydell@linaro.org \
    --cc=anthony.perard@citrix.com \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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 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).