qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: pbonzini@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK
Date: Thu, 16 Apr 2015 10:05:43 +0200	[thread overview]
Message-ID: <20150416100216-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1429107120.6219.15.camel@nilsson.home.kraxel.org>

On Wed, Apr 15, 2015 at 04:12:00PM +0200, Gerd Hoffmann wrote:
>   Hi,
> 
> > >      d->config[MCH_HOST_BRIDGE_SMRAM] = MCH_HOST_BRIDGE_SMRAM_DEFAULT;
> > > +    d->wmask[MCH_HOST_BRIDGE_SMRAM] = 0xff;
> > 
> > Is this right? I see a bunch of reserved bits etc there.
> 
> Restores the state we had before the guest flipped the lock bit.
> 
> Entriely possible that we should have a non-0xff wmask in the first
> place, I'll look into that, but it's unrelated to lock bit handling and
> thus something for another patch.
> > > +    d->wmask[MCH_HOST_BRIDGE_ESMRAMC] = 0xff;
> > 
> > Doesn't this mean we need to reset this register now?
> 
> Again, this is something not related to the lock bit implementation,
> probably the patch adding esramc support should have added this too.
> 
> I'll have a look, probably will cook up a incremental fix paolo can
> squash in then.

I'd prefer a complete patch to review.
Let's just set the correct wmask values directly.

> 
> > >  
> > >      mch_update(mch);
> > >  }
> > 
> > Don't you also need to clear D_LCK?
> 
> Setting MCH_HOST_BRIDGE_SMRAM to MCH_HOST_BRIDGE_SMRAM_DEFAULT does
> that.
> 
> Also see 2/2 with the test case which shows lock+unlock works correctly.
> 
> cheers,
>   Gerd
> 

      reply	other threads:[~2015-04-16  8:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-14 13:12 [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK Gerd Hoffmann
2015-04-14 13:12 ` [Qemu-devel] [PATCH 2/2] q35: add test for SMRAM.D_LCK Gerd Hoffmann
2015-04-14 14:35 ` [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK Paolo Bonzini
2015-04-15 13:58   ` Gerd Hoffmann
2015-04-16  8:12     ` Paolo Bonzini
2015-04-18 21:08       ` Laszlo Ersek
2015-04-14 15:41 ` Michael S. Tsirkin
2015-04-14 15:51   ` Michael S. Tsirkin
2015-04-15 14:12   ` Gerd Hoffmann
2015-04-16  8:05     ` Michael S. Tsirkin [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=20150416100216-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=pbonzini@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).