From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: "kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org"
<kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
Carsten Otte <cotte-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>,
"Zhang,
Xiantao" <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: RFC/patch 2/3 portability: move x86 emulation and mmio device hook to x86.c
Date: Wed, 31 Oct 2007 02:24:50 +0200 [thread overview]
Message-ID: <4727CB52.8040501@qumranet.com> (raw)
In-Reply-To: <1193767959.26183.26.camel@basalt>
Hollis Blanchard wrote:
> On Tue, 2007-10-30 at 18:44 +0100, Carsten Otte wrote:
>
>> -/*
>> - * Only apic need an MMIO device hook, so shortcut now..
>> - */
>> -static struct kvm_io_device *vcpu_find_pervcpu_dev(struct kvm_vcpu *vcpu,
>> - gpa_t addr)
>> -{
>> - struct kvm_io_device *dev;
>> -
>> - if (vcpu->apic) {
>> - dev = &vcpu->apic->dev;
>> - if (dev->in_range(dev, addr))
>> - return dev;
>> - }
>> - return NULL;
>> -}
>> -
>> -static struct kvm_io_device *vcpu_find_mmio_dev(struct kvm_vcpu *vcpu,
>> - gpa_t addr)
>> -{
>> - struct kvm_io_device *dev;
>> -
>> - dev = vcpu_find_pervcpu_dev(vcpu, addr);
>> - if (dev == NULL)
>> - dev = kvm_io_bus_find_dev(&vcpu->kvm->mmio_bus, addr);
>> - return dev;
>> -}
>> -
>> static struct kvm_io_device *vcpu_find_pio_dev(struct kvm_vcpu *vcpu,
>> gpa_t addr)
>> {
>> return kvm_io_bus_find_dev(&vcpu->kvm->pio_bus, addr);
>> }
>>
>
> These are APIC-specific for now, but as the "shortcut" comment implies
> they should be generalized in the future, and I expect they will be
> useful for PowerPC.
>
>
For x86 there are two kinds of mmio devices: one is the expected
system-wide mmio, and the other is mmio that depends not only on the
address, but also on which cpu originated the request. This type is
only needed for the local apic.
Is the second type also useful for ppc?
--
Any sufficiently difficult bug is indistinguishable from a feature.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
next prev parent reply other threads:[~2007-10-31 0:24 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1193763784.7800.17.camel@cotte.boeblingen.de.ibm.com>
[not found] ` <1193763784.7800.17.camel-WIxn4w2hgUz3YA32ykw5MLlKpX0K8NHHQQ4Iyu8u01E@public.gmane.org>
2007-10-30 17:44 ` RFC/patch 1/3 portability: move kvm_get/set_msr[_common] to x86.c Carsten Otte
[not found] ` <1193766257.7800.44.camel-WIxn4w2hgUz3YA32ykw5MLlKpX0K8NHHQQ4Iyu8u01E@public.gmane.org>
2007-10-30 18:14 ` Hollis Blanchard
2007-10-30 17:44 ` RFC/patch 2/3 portability: move x86 emulation and mmio device hook " Carsten Otte
[not found] ` <1193766261.7800.45.camel-WIxn4w2hgUz3YA32ykw5MLlKpX0K8NHHQQ4Iyu8u01E@public.gmane.org>
2007-10-30 18:12 ` Hollis Blanchard
2007-10-31 0:24 ` Avi Kivity [this message]
[not found] ` <4727CB52.8040501-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-31 15:32 ` Hollis Blanchard
2007-10-31 22:11 ` Avi Kivity
2007-10-30 17:44 ` RFC/patch 3/3 portability: move pio emulation functions " Carsten Otte
[not found] ` <1193766265.7800.46.camel-WIxn4w2hgUz3YA32ykw5MLlKpX0K8NHHQQ4Iyu8u01E@public.gmane.org>
2007-10-30 18:13 ` Hollis Blanchard
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=4727CB52.8040501@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=cotte-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org \
--cc=hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
--cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@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