All of lore.kernel.org
 help / color / mirror / Atom feed
From: Claudio Fontana <claudio.fontana@huawei.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Chao Peng <chao.p.peng@linux.intel.com>
Cc: Haozhong Zhang <haozhong.zhang@intel.com>,
	Xiao Guangrong <guangrong.xiao@linux.intel.com>,
	Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, anthony.xu@intel.com,
	gor Mammedov <imammedo@redhat.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [RFC 0/9] Introduce light weight PC platform pc-lite
Date: Fri, 24 Jun 2016 14:39:45 +0800	[thread overview]
Message-ID: <576CD5B1.2010100@huawei.com> (raw)
In-Reply-To: <3ce886ab-d1f5-aff4-82bc-398f05f502a7@redhat.com>

Hi Paolo,

On 23.06.2016 20:44, Paolo Bonzini wrote:
> 
> 
> On 23/06/2016 10:32, Chao Peng wrote:
>> The original usage model is to replace kvm-tool with QEMU for Clear
>> Containers (https://clearlinux.org/features/clear-containers). It's not
>> going to present the guest a real PC platform, but instead, a totally
>> virtual platform.
> 
> It is not completely virtual; it has PCI for example.  Hyper-V is an
> example of a completely virtual platform, even the LAPIC is customized
> with paravirtual features.
> 
> qboot does basically four things: 1) relocate from ROM to 0xf0000; 2)
> initialize PCI; 2) provide the ACPI and e820 tables; 3) boot.
> 
> If Linux can boot without initializing PCI bridges and without INTX, we
> can remove that code from qboot.  The PCI scan is the most expensive
> part, I think.  (2) and (3) are the same no matter if you run them in
> QEMU or the guest.
> 
> That leaves out only relocation (PAM).
> 
>> Every little bit boot time saving is important because
>> we are trying to achieve comparable result with that for Linux native
>> container.
>>
>> With this usage model, I doubt introducing a firmware layer is a good
>> idea:
>>
>>     On one side, even with optimized and compact qboot it still takes us
>>     ~15ms.
> 
> Have you profiled it?  If it is code in QEMU that we can optimize (e.g.
> memory.c), that would benefit all guests.
> 
>>     This is not a small value because current Linux kernel takes
>>     only ~50ms (and we are still on the way to optimize it). And when
>>     you look at the SeaBIOS or qboot, almost all the code are useless for
>>     this usage model. They are doing things that is important for
>>     traditional PC booting but cost 15ms doing useless things for us (It
>>     is really not easy to save 15ms in other place, for example, in
>>     Linux. Personally I tend to change the architecture for this new
>>     usage model, e.g. eliminate firmware).
>>
>>     On the other side, even boot the new pc-lite platform with firmware,
>>     it does not mean it can support non-Linux system like Windows. So
>>     generally I don't see the benefit of introducing a firmware layer.
> 
> The main benefit is maintainability, by reducing the amount of code
> specific to pc-lite.
> 
>> Besides, I'm also not quite sure if build around Q35 is the best
>> solution:
>>
>>     The problem with Q35 is some features like SMM/SMRAM/PAM slow done
>>     the booting even we actually never use them. While removing these
>>     features can cause guest see different feature set for a same device
>>     and it also prevents us to do further optimizations on that in guest.
> 
> Of these, qboot only uses PAM, and even that could be removed (PAM is
> only necessary because of how qboot probes parallel flash).  SMRAM
> should not slow down booting if you don't use them.  Do they?
> 
> Paolo

I use qboot for similar goals, you mention that PAM is necessary because of how qboot probes parallel flash,
however in my custom platform I removed PAM completely from QEMU, and everything seems to work without any problems..

Ciao

Claudio

  reply	other threads:[~2016-06-24  6:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17  8:14 [Qemu-devel] [RFC 0/9] Introduce light weight PC platform pc-lite Chao Peng
2016-06-17  8:14 ` [Qemu-devel] [RFC 1/9] acpi: introduce light weight ACPI PM emulation pm-lite Chao Peng
2016-06-17  8:14 ` [Qemu-devel] [RFC 2/9] pci: introduce light weight PCIE Host emulation pci-lite Chao Peng
2016-06-17  8:14 ` [Qemu-devel] [RFC 3/9] acpi: add support for pc-lite platform Chao Peng
2016-06-17  8:14 ` [Qemu-devel] [RFC 4/9] acpi: expose data structurs and functions of BIOS linker loader Chao Peng
2016-06-17  8:14 ` [Qemu-devel] [RFC 5/9] acpi: expose acpi_checksum() Chao Peng
2016-06-17  8:14 ` [Qemu-devel] [RFC 6/9] acpi: patch guest ACPI for pc-lite Chao Peng
2016-06-17  8:14 ` [Qemu-devel] [RFC 7/9] pc: skip setting CMOS data when RTC device is unavailable Chao Peng
2016-06-17  8:14 ` [Qemu-devel] [RFC 8/9] pc: support direct loading protected/long mode kernel Chao Peng
2016-06-17  8:14 ` [Qemu-devel] [RFC 9/9] pc: introduce light weight PC board pc-lite Chao Peng
2016-06-17 13:24 ` [Qemu-devel] [RFC 0/9] Introduce light weight PC platform pc-lite Paolo Bonzini
2016-06-20  6:01   ` Chao Peng
2016-06-20  6:54     ` Paolo Bonzini
2016-06-20 12:31       ` Stefan Hajnoczi
2016-06-20 13:00         ` Paolo Bonzini
2016-06-21  1:23       ` Chao Peng
2016-06-21 16:44       ` Michael S. Tsirkin
2016-06-23  8:32       ` Chao Peng
2016-06-23 12:44         ` Paolo Bonzini
2016-06-24  6:39           ` Claudio Fontana [this message]
2016-06-24  6:41             ` Claudio Fontana
2016-06-24  6:53               ` Paolo Bonzini
2016-06-27  2:55                 ` Claudio Fontana
2016-06-28  9:27           ` Chao Peng
2016-06-20 10:36   ` Dr. David Alan Gilbert
2016-06-19  3:51 ` Michael S. Tsirkin
2016-06-20  6:12   ` Chao Peng
2016-06-23 12:55     ` Daniel P. Berrange
2016-06-28 10:10       ` Chao Peng
2016-06-28 10:26         ` Daniel P. Berrange
2016-06-19  8:21 ` Claudio Fontana
2016-06-20  6:30   ` Chao Peng

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=576CD5B1.2010100@huawei.com \
    --to=claudio.fontana@huawei.com \
    --cc=anthony.xu@intel.com \
    --cc=chao.p.peng@linux.intel.com \
    --cc=ehabkost@redhat.com \
    --cc=guangrong.xiao@linux.intel.com \
    --cc=haozhong.zhang@intel.com \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /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.