From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: carsteno-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
"Zhang,
Xiantao" <xiantao.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH][10/22] kvm: Portability : Moving pio_data, pio, mmio_fault_cr2 to arch.
Date: Fri, 14 Dec 2007 12:30:50 +0200 [thread overview]
Message-ID: <47625B5A.5040209@qumranet.com> (raw)
In-Reply-To: <47625A9B.5090509-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
Carsten Otte wrote:
> Zhang, Xiantao wrote:
>> diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
>> index 530c391..2d2ff55 100644
>> --- a/drivers/kvm/kvm_main.c
>> +++ b/drivers/kvm/kvm_main.c
>> @@ -670,7 +670,7 @@ static int kvm_vcpu_fault(struct vm_area_struct
>> *vma, struct vm_fault *vmf)
>> if (vmf->pgoff == 0)
>> page = virt_to_page(vcpu->run);
>> else if (vmf->pgoff == KVM_PIO_PAGE_OFFSET)
>> - page = virt_to_page(vcpu->pio_data);
>> + page = virt_to_page(vcpu->arch.pio_data);
>> else
>> return VM_FAULT_SIGBUS;
>> get_page(page);
> Nothing that needs to be dealt with in this patch, just a thing that I
> ran into when reading this patch: The fact that we're accessing
> vcpu->arch here in kvm_main.c indicates that kvm_vcpu_fault() needs to
> go to arch. In fact, we'll be using the regular userspace fault path
> for guest pages on s390.
>
kvm_vcpu_fault() isn't for mapping guest pages, but for mapping the
kernel/userspace vcpu communication area. Moving that snippet to an
arch hook should be enough.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
next prev parent reply other threads:[~2007-12-14 10:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-14 3:36 [PATCH][10/22] kvm: Portability : Moving pio_data, pio, mmio_fault_cr2 to arch Zhang, Xiantao
[not found] ` <42DFA526FC41B1429CE7279EF83C6BDCAD0206-wq7ZOvIWXbMAbVU2wMM1CrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-12-14 10:27 ` Carsten Otte
[not found] ` <47625A9B.5090509-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org>
2007-12-14 10:30 ` Avi Kivity [this message]
[not found] ` <47625B5A.5040209-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-12-14 11:17 ` Carsten Otte
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=47625B5A.5040209@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=carsteno-tA70FqPdS9bQT0dZR+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