From: Igor Mammedov <imammedo@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
Sergio Lopez <slp@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH 1/4] microvm: make number of virtio transports runtime configurable
Date: Fri, 23 Oct 2020 21:00:56 +0200 [thread overview]
Message-ID: <20201023210056.35605e50@redhat.com> (raw)
In-Reply-To: <20201016114328.18835-2-kraxel@redhat.com>
On Fri, 16 Oct 2020 13:43:25 +0200
Gerd Hoffmann <kraxel@redhat.com> wrote:
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> include/hw/i386/microvm.h | 2 +-
> hw/i386/microvm.c | 9 +++++++--
> 2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/include/hw/i386/microvm.h b/include/hw/i386/microvm.h
> index 91b064575d55..0154ad5bd707 100644
> --- a/include/hw/i386/microvm.h
> +++ b/include/hw/i386/microvm.h
> @@ -52,7 +52,6 @@
>
> /* Platform virtio definitions */
> #define VIRTIO_MMIO_BASE 0xfeb00000
> -#define VIRTIO_NUM_TRANSPORTS 8
> #define VIRTIO_CMDLINE_MAXLEN 64
>
> #define GED_MMIO_BASE 0xfea00000
> @@ -95,6 +94,7 @@ struct MicrovmMachineState {
>
> /* Machine state */
> uint32_t virtio_irq_base;
> + uint32_t virtio_num_transports;
> bool kernel_cmdline_fixed;
> Notifier machine_done;
> Notifier powerdown_req;
> diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
> index 9dd74458aca4..eaf5da31f7e1 100644
> --- a/hw/i386/microvm.c
> +++ b/hw/i386/microvm.c
> @@ -177,8 +177,13 @@ static void microvm_devices_init(MicrovmMachineState *mms)
>
> kvmclock_create(true);
>
> - mms->virtio_irq_base = x86_machine_is_acpi_enabled(x86ms) ? 16 : 5;
> - for (i = 0; i < VIRTIO_NUM_TRANSPORTS; i++) {
> + mms->virtio_irq_base = 5;
> + mms->virtio_num_transports = 8;
> + if (x86_machine_is_acpi_enabled(x86ms)) {
> + mms->virtio_irq_base = 16;
> + }
can we unify and use the same base in both cases?
> +
> + for (i = 0; i < mms->virtio_num_transports; i++) {
> sysbus_create_simple("virtio-mmio",
> VIRTIO_MMIO_BASE + i * 512,
> x86ms->gsi[mms->virtio_irq_base + i]);
next prev parent reply other threads:[~2020-10-23 19:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 11:43 [PATCH 0/4] RfC: microvm: add second ioapic Gerd Hoffmann
2020-10-16 11:43 ` [PATCH 1/4] microvm: make number of virtio transports runtime configurable Gerd Hoffmann
2020-10-23 19:00 ` Igor Mammedov [this message]
2020-10-26 7:04 ` Gerd Hoffmann
2020-10-16 11:43 ` [PATCH 2/4] microvm: make pcie irq base " Gerd Hoffmann
2020-10-23 18:58 ` Igor Mammedov
2020-10-16 11:43 ` [PATCH 3/4] microvm: add second ioapic Gerd Hoffmann
2020-10-23 18:56 ` Igor Mammedov
2020-10-16 11:43 ` [PATCH 4/4] microvm: reconfigure irqs if second ioapic is available Gerd Hoffmann
2020-10-23 18:52 ` Igor Mammedov
2020-10-26 8:25 ` Gerd Hoffmann
2020-10-16 13:16 ` [PATCH 0/4] RfC: microvm: add second ioapic Philippe Mathieu-Daudé
2020-10-19 7:07 ` Gerd Hoffmann
2020-10-19 8:32 ` Philippe Mathieu-Daudé
2020-10-19 9:09 ` Gerd Hoffmann
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=20201023210056.35605e50@redhat.com \
--to=imammedo@redhat.com \
--cc=ehabkost@redhat.com \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=slp@redhat.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 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).