From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Stewart Hildebrand <stewart.hildebrand@amd.com>
Cc: xen-devel@lists.xenproject.org,
Andrew Cooper <andrew.cooper3@citrix.com>,
George Dunlap <george.dunlap@citrix.com>,
Jan Beulich <jbeulich@suse.com>, Julien Grall <julien@xen.org>,
Stefano Stabellini <sstabellini@kernel.org>, Wei Liu <wl@xen.org>
Subject: Re: [PATCH v7 1/2] xen/vpci: header: status register handler
Date: Fri, 17 Nov 2023 17:45:50 +0100 [thread overview]
Message-ID: <ZVeYviUt9BIa6Y1B@macbook.local> (raw)
In-Reply-To: <ZVdfRQpGFSU1OIkh@macbook.local>
On Fri, Nov 17, 2023 at 01:40:37PM +0100, Roger Pau Monné wrote:
> On Wed, Sep 13, 2023 at 10:35:46AM -0400, Stewart Hildebrand wrote:
> > {
> > - uint32_t val;
> > -
> > val = r->read(pdev, r->offset, r->private);
> > + val &= ~r->rw1c_mask;
> > data = merge_result(val, data, size, offset);
> > }
> >
> > + data &= ~(r->rsvdz_mask | r->ro_mask);
> > + data |= val & r->ro_mask;
>
> You cannot apply the register masks directly into the final value, you
> need to offset and mask them as necessary, likewise for val, see
> what's done in merge_result().
Never mind, I was wrong, there's no need to offset anything here.
Roger.
next prev parent reply other threads:[~2023-11-17 16:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-13 14:35 [PATCH v7 0/2] vPCI capabilities filtering Stewart Hildebrand
2023-09-13 14:35 ` [PATCH v7 1/2] xen/vpci: header: status register handler Stewart Hildebrand
2023-09-14 11:12 ` Jan Beulich
2023-11-17 12:40 ` Roger Pau Monné
2023-11-17 13:23 ` Jan Beulich
2023-11-17 13:45 ` Roger Pau Monné
2023-11-17 16:45 ` Roger Pau Monné [this message]
2023-11-22 20:16 ` Stewart Hildebrand
2023-11-23 8:14 ` Roger Pau Monné
2023-11-23 12:57 ` Stewart Hildebrand
2023-11-23 14:21 ` Roger Pau Monné
2023-11-17 13:33 ` Roger Pau Monné
2023-11-22 22:04 ` Stewart Hildebrand
2023-11-21 14:45 ` Roger Pau Monné
2023-11-21 15:03 ` Stewart Hildebrand
2023-11-21 15:18 ` Roger Pau Monné
2023-11-21 16:27 ` Stewart Hildebrand
2023-11-21 16:46 ` Stewart Hildebrand
2023-09-13 14:35 ` [PATCH v7 2/2] xen/vpci: header: filter PCI capabilities Stewart Hildebrand
2023-11-17 11:44 ` Roger Pau Monné
2023-11-28 16:04 ` Stewart Hildebrand
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=ZVeYviUt9BIa6Y1B@macbook.local \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien@xen.org \
--cc=sstabellini@kernel.org \
--cc=stewart.hildebrand@amd.com \
--cc=wl@xen.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 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.