qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Pavel Fedin <p.fedin@samsung.com>
Cc: Peter Crosthwaite <peter.crosthwaite@xilinx.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Alexander Graf <agraf@suse.de>
Subject: Re: [Qemu-devel] [PATCH 0/2] Remove CP15 timer from the device tree if KVM is used without in-kernel irqchip
Date: Thu, 25 Jun 2015 11:59:14 +0100	[thread overview]
Message-ID: <CAFEAcA8EOekfg63Kr3VN2vbw23N_Dgp8_rYuBfe67OD_ur3Exg@mail.gmail.com> (raw)
In-Reply-To: <00e601d0af34$bcd2b4b0$36781e10$@samsung.com>

On 25 June 2015 at 11:50, Pavel Fedin <p.fedin@samsung.com> wrote:
> The problem here is not unresponsive CP15, it's the other way
> round. It is responsive, but cannot be handled correctly. Actually,
> even this can be fixed; in order to do this we need to implement
> a VMEXIT in KVM upon IRQ arrival with corresponding return code,
> so that GIC emulated in userspace can pick up timer interrupt
> generated in kernel space.

If we want to support "KVM but without in-kernel irqchip" I would
really prefer that we did it this way, by implementing an ABI for
letting the kernel tell us about the generic timer interrupts
so we can feed them to the userspace irqchip. IIRC chazy had a
hacked-together patch for that at some point.

So far we have simply said "in-kernel VGIC is mandatory for KVM".
Is hardware with no working VGIC really prevalent enough that
it's worth adding support? Presumably the performance isn't going
to be very good...

>  However, here i can offer two ideas, each of them is big enough.
>  1. Why do we need to supply DTB at all? qemu actually knows about all
> hardware it emulates, why cannot it just construct the device tree ?

This comes up periodically. The answer is that DTB is too frequently
changing for us to be able to safely autogenerate it, except in the
specific case of the virt board, where we use a very limited set of
devices which we're prepared to hold the kernel folk to not breaking
backwards-compatibility on. For any other board, you need to use the
exact DTB that goes with the kernel version you're running.

In any case, creating our own DTB won't work for the "boot firmware
blob and then let it start a bootloader that reads the kernel and
dtb off the emulated disk" use case.

>  2. If we decide to supply DTB, why do we need machine-specific setup
> code at all? We could make qemu parsing the device tree and creating
> hardware model according to it.

...and this one comes up periodically too. The DTB does not contain
enough information to be able to build a complete hardware model:
it contains the information that the kernel needs to know (and
cannot probe for). That overlaps with the information QEMU would
need but it is neither a subset nor a superset.

thanks
-- PMM

  reply	other threads:[~2015-06-25 10:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24 11:58 [Qemu-devel] [PATCH 0/2] Remove CP15 timer from the device tree if KVM is used without in-kernel irqchip Pavel Fedin
2015-06-24 11:58 ` [Qemu-devel] [PATCH 1/2] Introduce qemu_fdt_remove_compatible() Pavel Fedin
2015-06-24 11:58 ` [Qemu-devel] [PATCH 2/2] Remove CP15 timer from the device tree if KVM is used without in-kernel irqchip Pavel Fedin
2015-06-25  6:22 ` [Qemu-devel] [PATCH 0/2] " Peter Crosthwaite
2015-06-25 10:50   ` Pavel Fedin
2015-06-25 10:59     ` Peter Maydell [this message]
2015-06-25 12:14       ` Pavel Fedin
2015-06-25 12:27         ` Peter Maydell
2015-06-25 13:21           ` Pavel Fedin
2015-06-25 14:17         ` Peter Maydell

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=CAFEAcA8EOekfg63Kr3VN2vbw23N_Dgp8_rYuBfe67OD_ur3Exg@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=agraf@suse.de \
    --cc=p.fedin@samsung.com \
    --cc=peter.crosthwaite@xilinx.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).