From: Anthony Liguori <aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Gregory Haskins <ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH 4/4] KVM: in-kernel-apic modification to QEMU
Date: Fri, 11 May 2007 15:52:59 -0500 [thread overview]
Message-ID: <4644D7AB.5040309@us.ibm.com> (raw)
In-Reply-To: <20070511204216.22062.97272.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
Hi Gregory,
The other patches all look good. Just some minor stuff here.
Gregory Haskins wrote:
> Signed-off-by: Gregory Haskins <ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org>
> ---
>
> @@ -888,10 +890,17 @@ static void ioapic_service(IOAPICState *s)
> vector = pic_read_irq(isa_pic);
> else
> vector = entry & 0xff;
> -
> - apic_get_delivery_bitmask(deliver_bitmask, dest, dest_mode);
> - apic_bus_deliver(deliver_bitmask, delivery_mode,
> - vector, polarity, trig_mode);
> +
> + if (kvm_allowed && kvm_apic_level) {
> + ext_apic_bus_deliver(dest, trig_mode, dest_mode,
> + delivery_mode, vector);
> + cpu_interrupt(s->cpu_env, CPU_INTERRUPT_HARD);
> + } else {
> + apic_get_delivery_bitmask(deliver_bitmask, dest,
> + dest_mode);
> + apic_bus_deliver(deliver_bitmask, delivery_mode,
> + vector, polarity, trig_mode);
> + }
> }
> }
> }
>
Could be my client, but I think you're spacing is off here. QEMU tends
to use spaces instead of tabs and I think you're using tabs.
> intno = pic_read_irq(isa_pic);
> return intno;
> @@ -483,9 +486,10 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device,
> }
> register_savevm("cpu", i, 4, cpu_save, cpu_load, env);
> qemu_register_reset(main_cpu_reset, env);
> - if (pci_enabled) {
> - apic_init(env);
> - }
> + if (!kvm_allowed || !kvm_apic_level)
> + if (pci_enabled) {
> + apic_init(env);
> + }
> }
Can probably just fold all three conditions into a single if clause:
if (!(kvm_allowed && kvm_apic_level) && pci_enabled)
apic_init(env);
Further, it may be worthwhile to just introduce a static inline to
reduce it to:
if (!use_kernel_apic() && pci_enabled)
apic_init(env);
>
> /* allocate RAM */
> @@ -671,7 +675,7 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device,
> register_ioport_write(0x92, 1, 1, ioport92_write, NULL);
>
> if (pci_enabled) {
> - ioapic = ioapic_init();
> + ioapic = ioapic_init(env);
> }
>
Have you tested -smp 2 with -no-kvm by any chance?
> diff --git a/qemu/vl.c b/qemu/vl.c
> index 88e650e..986cea4 100644
> --- a/qemu/vl.c
> +++ b/qemu/vl.c
> @@ -7312,7 +7312,7 @@ int main(int argc, char **argv)
> kvm_allowed = 0;
> break;
> case QEMU_OPTION_kvm_apic:
> - kvm_apic_level = optarg;
> + kvm_apic_level = atoi(optarg);
> break;
> #endif
>
Hrm, what are you diffing against? I don't see QEMU_OPTION_kvm_apic in
my tree.
Regards,
Anthony Liguori
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> kvm-devel mailing list
> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>
>
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
next prev parent reply other threads:[~2007-05-11 20:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-11 20:41 [PATCH 0/4] in-kernel APIC v3a (usermode side) Gregory Haskins
[not found] ` <20070511203316.22062.4417.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-05-11 20:42 ` [PATCH 1/4] KVM: Updates for compiling in-kernel APIC support with external-modules Gregory Haskins
2007-05-11 20:42 ` [PATCH 2/4] KVM-USER: Make the kvm_allowed flag always defined so we dont need #ifdefs Gregory Haskins
[not found] ` <20070511204206.22062.7570.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-05-14 12:09 ` Avi Kivity
2007-05-11 20:42 ` [PATCH 3/4] KVM-USER: Add ability to specify APIC emulation type from the command-line Gregory Haskins
2007-05-11 20:42 ` [PATCH 4/4] KVM: in-kernel-apic modification to QEMU Gregory Haskins
[not found] ` <20070511204216.22062.97272.stgit-sLgBBP33vUGnsjUZhwzVf9HuzzzSOjJt@public.gmane.org>
2007-05-11 20:52 ` Anthony Liguori [this message]
[not found] ` <4644D7AB.5040309-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-05-11 21:20 ` Gregory Haskins
-- strict thread matches above, loose matches on Subject: below --
2007-05-11 21:20 Gregory Haskins
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=4644D7AB.5040309@us.ibm.com \
--to=aliguori-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=ghaskins-Et1tbQHTxzrQT0dZR+AlfA@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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