qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: skandasa@cisco.com, etmartin@cisco.com, qemu-devel@nongnu.org,
	wexu2@cisco.com
Subject: [Qemu-devel] Re: [PATCH v5 00/14] pcie port switch emulators
Date: Wed, 20 Oct 2010 00:40:49 +0200	[thread overview]
Message-ID: <20101019224048.GA28390@redhat.com> (raw)
In-Reply-To: <20101019223637.GC30021@valinux.co.jp>

On Wed, Oct 20, 2010 at 07:36:37AM +0900, Isaku Yamahata wrote:
> On Tue, Oct 19, 2010 at 07:06:55PM +0200, Michael S. Tsirkin wrote:
> > On Wed, Oct 20, 2010 at 12:19:47AM +0900, Isaku Yamahata wrote:
> > > On Tue, Oct 19, 2010 at 01:51:31PM +0200, Michael S. Tsirkin wrote:
> > > > On Tue, Oct 19, 2010 at 06:06:27PM +0900, Isaku Yamahata wrote:
> > > > > On uncorrectable error status register in pcie_aer_write_config().
> > > > > The register is RW1CS, so making it writable and test-and-clear doesn't
> > > > > work.
> > > > 
> > > > Sure. But isn't this what w1cmask implements?
> > > 
> > > It's not simple W1C.
> > 
> > Well it's also sticky, but this only affects reset.
> > What else is different?
> 
> The bit of uncorsta that corresponds to the first error:
>         If 1b is written, the side effects takes place.
>         If multiple header recording is disabled, the bit is W1C.
>         If multiple header recording is enabled, the bit may or may
>         not be cleared depending on whether recorded errors.
>         The next error header is pulled out from the internal log.
>         (the first error bit moves to the one that corresponds to
>          the pulled-out one.)
> 
> The other bits of uncorsta
>         If multiple header recording is disabled, the bit is W1C.
>         If multiple header recording is enabled, the value isn't cleared
>         even when 1b is written. So since we set w1cmask, we need to
>         restore the old value.

I think I suggested once a good way to implement this:

- always make the bits w1c
- after config write:
  if MHR is enabled, and you see that error log is not empty and that bit is 0,
  this means that someone has written 1b.
  so pop the first error from the log, and set bit to 1 if it's not empty.

This way we only touch w1c mask on setup, no tricky range checks.
Anything wrong with this approach?

-- 
MST

  reply	other threads:[~2010-10-19 22:47 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-19  9:06 [Qemu-devel] [PATCH v5 00/14] pcie port switch emulators Isaku Yamahata
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 01/14] pci: introduce helper functions to test-and-{clear, set} mask in configuration space Isaku Yamahata
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 02/14] pci: introduce helper function to handle msi-x and msi Isaku Yamahata
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 03/14] pci: use pci_word_test_and_clear_mask() in pci_device_reset() Isaku Yamahata
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 04/14] pci/bridge: fix pci_bridge_reset() Isaku Yamahata
2010-10-19 12:07   ` [Qemu-devel] " Michael S. Tsirkin
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 05/14] msi: implements msi Isaku Yamahata
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 06/14] pcie: add pcie constants to pcie_regs.h Isaku Yamahata
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 07/14] pcie: helper functions for pcie capability and extended capability Isaku Yamahata
2010-10-19 11:53   ` [Qemu-devel] " Michael S. Tsirkin
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 08/14] pcie/aer: helper functions for pcie aer capability Isaku Yamahata
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 09/14] pcie port: define struct PCIEPort/PCIESlot and helper functions Isaku Yamahata
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 10/14] ioh3420: pcie root port in X58 ioh Isaku Yamahata
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 11/14] x3130: pcie upstream port Isaku Yamahata
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 12/14] x3130: pcie downstream port Isaku Yamahata
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 13/14] pcie/hotplug: introduce pushing attention button command Isaku Yamahata
2010-10-19  9:06 ` [Qemu-devel] [PATCH v5 14/14] pcie/aer: glue aer error injection into qemu monitor Isaku Yamahata
2010-10-19 11:51 ` [Qemu-devel] Re: [PATCH v5 00/14] pcie port switch emulators Michael S. Tsirkin
2010-10-19 15:19   ` Isaku Yamahata
2010-10-19 17:06     ` Michael S. Tsirkin
2010-10-19 22:36       ` Isaku Yamahata
2010-10-19 22:40         ` Michael S. Tsirkin [this message]
2010-10-19 22:55           ` Isaku Yamahata
2010-10-19 23:02             ` Michael S. Tsirkin
2010-10-19 11:56 ` Michael S. Tsirkin
2010-10-19 13:55   ` Isaku Yamahata
2010-10-19 13:00 ` Michael S. Tsirkin
  -- strict thread matches above, loose matches on Subject: below --
2010-10-19 16:07 Adnan Khaleel
2010-10-19 22:39 ` Isaku Yamahata
2010-10-19 23:05   ` Wei Xu
2010-10-19 23:17     ` Isaku Yamahata
2010-10-19 23:16       ` Michael S. Tsirkin
2010-10-19 23:20       ` Wei Xu

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=20101019224048.GA28390@redhat.com \
    --to=mst@redhat.com \
    --cc=etmartin@cisco.com \
    --cc=qemu-devel@nongnu.org \
    --cc=skandasa@cisco.com \
    --cc=wexu2@cisco.com \
    --cc=yamahata@valinux.co.jp \
    /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).