All of lore.kernel.org
 help / color / mirror / Atom feed
* touching a missing page causes DomU to die
@ 2011-01-21 12:34 James Harper
  2011-01-21 13:46 ` Paul Durrant
  0 siblings, 1 reply; 5+ messages in thread
From: James Harper @ 2011-01-21 12:34 UTC (permalink / raw)
  To: xen-devel

My Windows PV drivers are crashing during hibernation, and I've finally
figured out that it's because the windows hibernation mode driver double
buffers memory before handing it to my block device driver, and in doing
so 'touches' some pages of memory I have given back to xen (to work
around a domu save crash).

I assume that this is the same issue that causes touching unpopulated
PoD memory to blow up the DomU too.

I don't know if there is a way to mark the pages I gave back to xen as
'gone' under windows, the best I can do is allocate them to my driver...
any suggestions as to how to resolve it from xen? One idea I had was to
map the same physical page of memory into the 'holes' so things at least
don't blow up, but I'm not sure if that is possible or desirable.

Thanks

James

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: touching a missing page causes DomU to die
  2011-01-21 12:34 touching a missing page causes DomU to die James Harper
@ 2011-01-21 13:46 ` Paul Durrant
  2011-01-21 21:51   ` James Harper
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Durrant @ 2011-01-21 13:46 UTC (permalink / raw)
  To: James Harper, xen-devel

> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com [mailto:xen-devel-
> bounces@lists.xensource.com] On Behalf Of James Harper
> Sent: 21 January 2011 12:35
> To: xen-devel@lists.xensource.com
> Subject: [Xen-devel] touching a missing page causes DomU to die
> 
> My Windows PV drivers are crashing during hibernation, and I've
> finally
> figured out that it's because the windows hibernation mode driver
> double
> buffers memory before handing it to my block device driver, and in
> doing
> so 'touches' some pages of memory I have given back to xen (to work
> around a domu save crash).
> 

You've given memory belonging to the crash kernel back to Xen?

> I assume that this is the same issue that causes touching
> unpopulated
> PoD memory to blow up the DomU too.
> 
> I don't know if there is a way to mark the pages I gave back to xen
> as
> 'gone' under windows, the best I can do is allocate them to my
> driver...
> any suggestions as to how to resolve it from xen? One idea I had was
> to
> map the same physical page of memory into the 'holes' so things at
> least
> don't blow up, but I'm not sure if that is possible or desirable.
> 
> Thanks
> 
> James
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: touching a missing page causes DomU to die
  2011-01-21 13:46 ` Paul Durrant
@ 2011-01-21 21:51   ` James Harper
  2011-01-22 16:04     ` Paul Durrant
  0 siblings, 1 reply; 5+ messages in thread
From: James Harper @ 2011-01-21 21:51 UTC (permalink / raw)
  To: Paul Durrant, xen-devel

> >
> > My Windows PV drivers are crashing during hibernation, and I've
> > finally
> > figured out that it's because the windows hibernation mode driver
> > double
> > buffers memory before handing it to my block device driver, and in
> > doing
> > so 'touches' some pages of memory I have given back to xen (to work
> > around a domu save crash).
> >
> 
> You've given memory belonging to the crash kernel back to Xen?
> 

My driver allocates a few pages of memory and calls decrease reservation
to give them back to xen. This is to work around a problem saving (or
restoring?) a domu under xen where I need to give back an amount of
pages equal to the pages xen has given me for setup (grant table I
think).

James

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: touching a missing page causes DomU to die
  2011-01-21 21:51   ` James Harper
@ 2011-01-22 16:04     ` Paul Durrant
  2011-01-22 22:12       ` James Harper
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Durrant @ 2011-01-22 16:04 UTC (permalink / raw)
  To: James Harper, xen-devel

James,

  Then I guess I don't understand why the double buffering code is attempting to use the memory you have allocated and handed back to Xen. If your code allocated it then nothing else should be trying to use it, right?

  Paul

> -----Original Message-----
> From: James Harper [mailto:james.harper@bendigoit.com.au]
> Sent: 21 January 2011 21:52
> To: Paul Durrant; xen-devel@lists.xensource.com
> Subject: RE: touching a missing page causes DomU to die
> 
> > >
> > > My Windows PV drivers are crashing during hibernation, and I've
> > > finally
> > > figured out that it's because the windows hibernation mode
> driver
> > > double
> > > buffers memory before handing it to my block device driver, and
> in
> > > doing
> > > so 'touches' some pages of memory I have given back to xen (to
> work
> > > around a domu save crash).
> > >
> >
> > You've given memory belonging to the crash kernel back to Xen?
> >
> 
> My driver allocates a few pages of memory and calls decrease
> reservation
> to give them back to xen. This is to work around a problem saving
> (or
> restoring?) a domu under xen where I need to give back an amount of
> pages equal to the pages xen has given me for setup (grant table I
> think).
> 
> James

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: touching a missing page causes DomU to die
  2011-01-22 16:04     ` Paul Durrant
@ 2011-01-22 22:12       ` James Harper
  0 siblings, 0 replies; 5+ messages in thread
From: James Harper @ 2011-01-22 22:12 UTC (permalink / raw)
  To: Paul Durrant, xen-devel

> 
> James,
> 
>   Then I guess I don't understand why the double buffering code is
attempting
> to use the memory you have allocated and handed back to Xen. If your
code
> allocated it then nothing else should be trying to use it, right?
> 

It's during hibernation. Windows writes out all memory to disk and turns
the power off. It can be read back in when the power comes back on,
restoring the system back to its previous state.

I'm not sure why you'd use hibernate when xm save exist, but some users
want it, and there should be a way to make it work. I think I've solved
it now by allocating memory for the grant table out of real memory space
instead of mmio space, and giving those pages back to xen before putting
the grant table pages there. I'll need another solution if I ever want
to support PoD though.

James

>   Paul
> 
> > -----Original Message-----
> > From: James Harper [mailto:james.harper@bendigoit.com.au]
> > Sent: 21 January 2011 21:52
> > To: Paul Durrant; xen-devel@lists.xensource.com
> > Subject: RE: touching a missing page causes DomU to die
> >
> > > >
> > > > My Windows PV drivers are crashing during hibernation, and I've
> > > > finally
> > > > figured out that it's because the windows hibernation mode
> > driver
> > > > double
> > > > buffers memory before handing it to my block device driver, and
> > in
> > > > doing
> > > > so 'touches' some pages of memory I have given back to xen (to
> > work
> > > > around a domu save crash).
> > > >
> > >
> > > You've given memory belonging to the crash kernel back to Xen?
> > >
> >
> > My driver allocates a few pages of memory and calls decrease
> > reservation
> > to give them back to xen. This is to work around a problem saving
> > (or
> > restoring?) a domu under xen where I need to give back an amount of
> > pages equal to the pages xen has given me for setup (grant table I
> > think).
> >
> > James

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-22 22:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-21 12:34 touching a missing page causes DomU to die James Harper
2011-01-21 13:46 ` Paul Durrant
2011-01-21 21:51   ` James Harper
2011-01-22 16:04     ` Paul Durrant
2011-01-22 22:12       ` James Harper

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.