All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <jbeulich@novell.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: xen-devel@lists.xensource.com, Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [PATCH] fix ia64 breakage with PHYSDEVOP_pirq_eoi_mfn (was Re: [PATCH 2/2] linux/x86: use shared page indicating the need for an EOI notification)
Date: Tue, 09 Dec 2008 10:04:55 +0000	[thread overview]
Message-ID: <493E50D7.76E4.0078.0@novell.com> (raw)
In-Reply-To: <20081209034038.GO5454%yamahata@valinux.co.jp>

>>> Isaku Yamahata <yamahata@valinux.co.jp> 09.12.08 04:40 >>>
>Sorry for breakage.
>How about moving arbitrary_virt_to_machine() from pgtable.h to maddr.h?
>(Yes, this is a work around. and you wouldn't like it...)

No, that wouldn't work for x86 either, because the macro uses
lookup_address(), which in turn is also only declared in pgtable.h. I
wouldn't really mind moving arbitrary_virt_to_machine(), but it would
then require duplicating (not moving) the lookup_address() declaration.

>> Looking at how ia64 defines virt_to_machine() at present I would be
>> inclined to say that all current users (tpmfront, blktap, and gntdev) of
>> that macro don't get what they expect, and the implementation you
>> added for arbitary_virt_to_machine() really ought to be the one for
>> virt_to_machine(), given your description above.
>
>Looking the x86 virt_to_machine definition, virt_to_machine()
>assumes the passed address in the straight mapping area.
>So the ia64 assumption is same to x86.

Not exactly: Addresses of kernel objects *can* be passed to
virt_to_machine() on x86 (minus a supposed compiler issue demanding
the special __pa_symbol() to be used on x86-64 - I'm trying to find out
how relevant this still is), but they can't be on ia64. This is what seemed
wrong to me. But otoh as I understand it you can't pass kernel
addresses through __pa() either, but (to my surprise) ia64 apparently
has no problem with this wrt architecture independent code (but making
necessary work-arounds like paddr_vmcoreinfo_note()).

>Hmm, ia64 and x86_64 have nothing to do with highmem,
>but x86_32 has to deal with highmem. So x86_32 with highmem
>seems to have the issue you described above.
>If ptep which is passed to virt_to_machine is highmem,
>I don't see how it works. So all virt_to_machine() shouldn't
>be changed to arbitrary_virt_to_machine()?

Actually, looking at it a second time, tpmfront uses the result of the result
of __get_free_page() here, so the address is always in the 1:1 mapping.

But I think you're quite right about the HIGHPTE implications on blktap and
gntdev - these ought to be fixed, perhaps indeed by using
arbitrary_virt_to_machine() there (but I'd want to make this conditional
upon the HIGHPTE config option, so to not affect performance of other
configurations: possibly this ought to be an architecture-defined macro
like ptep_virt_to_machine(), as I wouldn't want to place an x86-specific
conditional in there that would risk breaking any future supported
architecture without explicit notice).

Jan

  reply	other threads:[~2008-12-09 10:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-08 13:36 [PATCH] fix ia64 breakage with PHYSDEVOP_pirq_eoi_mfn (was Re: [PATCH 2/2] linux/x86: use shared page indicating the need for an EOI notification) Jan Beulich
2008-12-09  3:40 ` Isaku Yamahata
2008-12-09 10:04   ` Jan Beulich [this message]
2008-12-09 10:43     ` Isaku Yamahata
2008-12-09 10:54       ` Jan Beulich
2008-12-09 11:06         ` Keir Fraser
2008-12-10  4:08           ` Isaku Yamahata
2008-12-10  4:16             ` Isaku Yamahata
2008-12-10  9:21               ` [PATCH] fix ia64 breakage with PHYSDEVOP_pirq_eoi_mfn (was Re:[PATCH 2/2] linux/x86: use shared page indicatingthe " Jan Beulich
2008-12-10 10:07                 ` Keir Fraser
2008-12-10 10:23                   ` [PATCH] fix ia64 breakage with PHYSDEVOP_pirq_eoi_mfn (wasRe:[PATCH 2/2] linux/x86: use shared page indicatingthe need foran " Jan Beulich
2008-12-10  4:09         ` [PATCH] fix ia64 breakage with PHYSDEVOP_pirq_eoi_mfn (was Re: [PATCH 2/2] linux/x86: use shared page indicating the need for an " Isaku Yamahata
2008-12-10  7:59           ` Jan Beulich
  -- strict thread matches above, loose matches on Subject: below --
2008-11-28  9:59 [PATCH 2/2] linux/x86: use shared page indicating the need for an EOI notification Jan Beulich
2008-12-03  2:07 ` [PATCH] fix ia64 breakage with PHYSDEVOP_pirq_eoi_mfn (was Re: [PATCH 2/2] linux/x86: use shared page indicating the need for an EOI notification) Isaku Yamahata
2008-12-03  7:58   ` Jan Beulich
2008-12-03  8:44     ` Isaku Yamahata
2008-12-03  8:58       ` Jan Beulich
2008-12-03  9:20         ` Isaku Yamahata
2008-12-03  9:31           ` Jan Beulich
2008-12-03  9:59             ` Isaku Yamahata
2008-12-03 10:08               ` Keir Fraser
2008-12-03 10:13                 ` Isaku Yamahata
2008-12-03 10:15                   ` Keir Fraser
2008-12-03 10:23                     ` Isaku Yamahata

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=493E50D7.76E4.0078.0@novell.com \
    --to=jbeulich@novell.com \
    --cc=keir.fraser@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yamahata@valinux.co.jp \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.