From: Marcel Apfelbaum <marcel@redhat.com>
To: Laszlo Ersek <lersek@redhat.com>, qemu-devel@nongnu.org
Cc: mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] hw/gen_pcie_root_port: properly set
Date: Tue, 3 Oct 2017 15:29:11 +0300 [thread overview]
Message-ID: <c871ced9-b872-c91f-9205-ae197f1ba7b2@redhat.com> (raw)
In-Reply-To: <07f7595e-f721-96d9-0d4c-4e2024b09e32@redhat.com>
On 03/10/2017 0:49, Laszlo Ersek wrote:
> On 10/02/17 12:31, Marcel Apfelbaum wrote:
>> IO_LIMIT and IO_BASE registers should not be writable if
>> gen_pcie_root_port's io-reserve property is set to 0.
>> The COMMAND register should have the IO flag read only.
>>
>>
>> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com>
>> ---
>> hw/pci-bridge/gen_pcie_root_port.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/hw/pci-bridge/gen_pcie_root_port.c b/hw/pci-bridge/gen_pcie_root_port.c
>> index ed03ffc764..ad4e6aa7ff 100644
>> --- a/hw/pci-bridge/gen_pcie_root_port.c
>> +++ b/hw/pci-bridge/gen_pcie_root_port.c
>> @@ -85,6 +85,13 @@ static void gen_rp_realize(DeviceState *dev, Error **errp)
>> rpc->parent_class.exit(d);
>> return;
>> }
>> +
>> + if (!grp->io_reserve) {
>> + pci_word_test_and_clear_mask(d->wmask + PCI_COMMAND,
>> + PCI_COMMAND_IO);
>> + d->wmask[PCI_IO_BASE] = 0;
>> + d->wmask[PCI_IO_LIMIT] = 0;
>> + }
>> }
>>
>> static const VMStateDescription vmstate_rp_dev = {
>>
>
> The patch looks good to me (which doesn't mean much, honestly :) ), but
> I think the subject line is truncated. You left off what exactly should
> be set properly. (IO base, IO limit, and command registers, presumably.)
>
Strange, thanks for pointing it out.
I'll send a V2.
Thanks,
Marcel
> Thanks!
> Laszlo
>
prev parent reply other threads:[~2017-10-03 12:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-02 10:31 [Qemu-devel] [PATCH] hw/gen_pcie_root_port: properly set Marcel Apfelbaum
2017-10-02 21:49 ` Laszlo Ersek
2017-10-03 12:29 ` Marcel Apfelbaum [this message]
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=c871ced9-b872-c91f-9205-ae197f1ba7b2@redhat.com \
--to=marcel@redhat.com \
--cc=lersek@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@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 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).