Re: [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK

2015-04-18 Thread Laszlo Ersek
On 04/16/15 10:12, Paolo Bonzini wrote: > > > On 15/04/2015 15:58, Gerd Hoffmann wrote: >> The "A Tour Beyond BIOS Implementing S3 Resume with EDKII" white >> paper lists "Lock SMM. This must be done to maintain SMM integrity." >> as todo list item for the edk2 resume code path (page 18). let's ma

Re: [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK

2015-04-16 Thread Paolo Bonzini
On 15/04/2015 15:58, Gerd Hoffmann wrote: > The "A Tour Beyond BIOS Implementing S3 Resume with EDKII" white paper > lists "Lock SMM. This must be done to maintain SMM integrity." as todo > list item for the edk2 resume code path (page 18). > > So it seems to me it is the job of the firmware to

Re: [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK

2015-04-16 Thread Michael S. Tsirkin
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

Re: [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK

2015-04-15 Thread Gerd Hoffmann
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

Re: [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK

2015-04-15 Thread Gerd Hoffmann
On Di, 2015-04-14 at 16:35 +0200, Paolo Bonzini wrote: > > On 14/04/2015 15:12, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > > --- > > hw/pci-host/q35.c | 17 - > > 1 file changed, 16 insertions(+), 1 deletion(-) > > > > diff --git a/hw/pci-host/q35.c b/hw/pci-host/q3

Re: [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK

2015-04-14 Thread Michael S. Tsirkin
On Tue, Apr 14, 2015 at 05:41:14PM +0200, Michael S. Tsirkin wrote: > On Tue, Apr 14, 2015 at 03:12:39PM +0200, Gerd Hoffmann wrote: > > Signed-off-by: Gerd Hoffmann > > --- > > hw/pci-host/q35.c | 17 - > > 1 file changed, 16 insertions(+), 1 deletion(-) > > > > diff --git a/hw/

Re: [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK

2015-04-14 Thread Michael S. Tsirkin
On Tue, Apr 14, 2015 at 03:12:39PM +0200, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > hw/pci-host/q35.c | 17 - > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c > index 79bab15..9227489 100644 > --- a/hw/pci-

Re: [Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK

2015-04-14 Thread Paolo Bonzini
On 14/04/2015 15:12, Gerd Hoffmann wrote: > Signed-off-by: Gerd Hoffmann > --- > hw/pci-host/q35.c | 17 - > 1 file changed, 16 insertions(+), 1 deletion(-) > > diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c > index 79bab15..9227489 100644 > --- a/hw/pci-host/q35.c > +++ b/

[Qemu-devel] [PATCH 1/2] q35: implement SMRAM.D_LCK

2015-04-14 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/pci-host/q35.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 79bab15..9227489 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -268,6 +268,20 @@ static void mch_update_