All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhai, Edwin" <edwin.zhai@intel.com>
To: Keir Fraser <keir@xensource.com>
Cc: Ian Pratt <m+Ian.Pratt@cl.cam.ac.uk>,
	xen-devel@lists.xensource.com, "Zhai,
	Edwin" <edwin.zhai@intel.com>
Subject: Re: hvm save restore support
Date: Fri, 15 Dec 2006 16:25:52 +0800	[thread overview]
Message-ID: <20061215082552.GA21246@edwin-srv.sh.intel.com> (raw)
In-Reply-To: <C1A6B5AB.5D3E%keir@xensource.com>

On Thu, Dec 14, 2006 at 08:02:51AM +0000, Keir Fraser wrote:
> On 14/12/06 2:46 am, "Zhai, Edwin" <edwin.zhai@intel.com> wrote:
> 
> >> How did you deal with PCI device init getting moved to hvmloader? Looks like
> >> this patch reverts some of that, which doesn't seem the right answer.
> > yes, it's just work around.
> > but bios code never be called when restore. i think it's why qemu doesn't move
> > it to bios.
> > 
> > do you have any good idea?
> 
> It doesn't matter that BIOS code is not executed on restore. What qemu
> should be doing is saving the PCI configuration spaces -- at least the
> important bits (BARs, command register) but probably it may as well save the
> whole 256 bytes per device.
no doubt that 256 bytes PCI configuration space should be saved(qemu already 
support it). but after that, we need some init for the device such as register 
mmio according to the saved configuration space. this is what 
pci_bios_init_device doing.
it seems that we still need it for both create and restore, right?

this code has been moved to hvmloader, so we have to copy and execute it after 
all PCI devices are restored.

maybe relocation of this code is more decent? e.g. put it on the 
generic_pci_load handler?

> 
> If it's not doing this already then that's rather scary. What if the OS
> decides to shuffle PCI resources around, which is its right to do?
> 
>  -- Keir
> 

-- 
best rgds,
edwin

  reply	other threads:[~2006-12-15  8:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-13 15:45 hvm save restore support Zhai, Edwin
2006-12-13 17:04 ` Keir Fraser
2006-12-14  2:46   ` Zhai, Edwin
2006-12-14  8:02     ` Keir Fraser
2006-12-15  8:25       ` Zhai, Edwin [this message]
2006-12-15  8:37         ` Keir Fraser
2006-12-20 12:34           ` Zhai, Edwin
2006-12-13 20:09 ` Anthony Liguori
2006-12-14  3:23   ` Zhai, Edwin
2006-12-14  8:34   ` Keir Fraser

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=20061215082552.GA21246@edwin-srv.sh.intel.com \
    --to=edwin.zhai@intel.com \
    --cc=keir@xensource.com \
    --cc=m+Ian.Pratt@cl.cam.ac.uk \
    --cc=xen-devel@lists.xensource.com \
    /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.