From: Paolo Bonzini <pbonzini@redhat.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"Eduardo Habkost" <ehabkost@redhat.com>,
qemu-devel@nongnu.org, "Chen Fan" <chen.fan.fnst@cn.fujitsu.com>,
"Andreas Färber" <afaerber@suse.de>,
"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PULL 2/5] apic: map APIC's MMIO region at each CPU's address space
Date: Wed, 03 Jun 2015 10:30:54 +0200 [thread overview]
Message-ID: <556EBB3E.5020202@redhat.com> (raw)
In-Reply-To: <20150603102924.7b8c9fe8@nial.brq.redhat.com>
On 03/06/2015 10:29, Igor Mammedov wrote:
>>> > > + root = address_space_root_memory_region(cpu->as);
>> >
>> > I think just using cpu->as->root is okay.
>> >
>>> > > + memory_region_add_subregion_overlap(root,
>>> > > + s->apicbase & MSR_IA32_APICBASE_BASE,
>>> > > + &s->io_memory,
>>> > > + 0x1000);
>> >
>> > I think this patch is incorrect, because you do not install a separate
>> > address space for each CPU. Also, the CPU address space is only used
>> > with TCG so it should be guarded by "if (tcg_enabled())".
> Don't we need it be mapped on for KVM for MSI to work
> when using kvm-apic?
>
> kvm_apic_io_ops->write = kvm_apic_mem_write->kvm_irqchip_send_msi()
Yes, and the reason this patch worked is simply that by default cpu->as
is &address_space_memory. The patch was just registering the same
region once per VCPU instead of 1, in the same place as before.
Paolo
next prev parent reply other threads:[~2015-06-03 8:31 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 18:04 [Qemu-devel] [PULL 0/5] X86 patch queue, 2015-05-29 Eduardo Habkost
2015-05-29 18:04 ` [Qemu-devel] [PULL 1/5] pc: Ensure non-zero CPU ref count after attaching to ICC bus Eduardo Habkost
2015-05-29 18:04 ` [Qemu-devel] [PULL 2/5] apic: map APIC's MMIO region at each CPU's address space Eduardo Habkost
2015-05-29 19:27 ` Paolo Bonzini
2015-06-01 20:01 ` Eduardo Habkost
2015-06-03 8:29 ` Igor Mammedov
2015-06-03 8:30 ` Paolo Bonzini [this message]
2015-05-29 18:04 ` [Qemu-devel] [PULL 3/5] apic: convert ->busdev.qdev casts to C casts Eduardo Habkost
2015-05-29 18:04 ` [Qemu-devel] [PULL 4/5] target-i386: Register QOM properties for feature flags Eduardo Habkost
2015-05-29 18:04 ` [Qemu-devel] [PULL 5/5] arch_init: Drop target-x86_64.conf Eduardo Habkost
2015-05-29 18:57 ` [Qemu-devel] [PULL 0/5] X86 patch queue, 2015-05-29 Peter Maydell
2015-05-29 19:45 ` Eduardo Habkost
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=556EBB3E.5020202@redhat.com \
--to=pbonzini@redhat.com \
--cc=afaerber@suse.de \
--cc=chen.fan.fnst@cn.fujitsu.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=peter.maydell@linaro.org \
--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 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).