xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH, RFC 3/4] qemu: use new (replacement) mmap-batch ioctl
Date: Wed, 13 Jan 2010 07:50:02 +0000	[thread overview]
Message-ID: <4B4D893A02000078000299B5@vpn.id2.novell.com> (raw)
In-Reply-To: <19276.45214.280177.868576@mariner.uk.xensource.com>

>>> Ian Jackson <Ian.Jackson@eu.citrix.com> 12.01.10 18:25 >>>
>> +#if __XEN_LATEST_INTERFACE_VERSION__ < 0x0003020a
>> +void * __attribute__((__weak__))
>> +xc_map_foreign_bulk(int xc_handle, uint32_t dom, int prot,
>> +                    const xen_pfn_t *, int *err, unsigned int num);
>> +#endif
>
>This is pretty horrible.
>
>This should be done by using the #ifdef arround the call to
>xc_map_foreign_bulk, not by having a weak symbol compared to NULL.

While indeed I wasn't sure about how (or if at all) to put in
backward compatibility, this seemed to be the consolidated place.

Using and #ifdef in the source file doesn't seem nice though, as it
would tie a qemu built against older headers to using the old
interface. But since I'm not sure about the compatibility needs in
the first place, I will listen to whatever you say you deem
appropriate.

>You might consider whether the ability to use the old call is intended
>to last forever.  Probably not, soi you should mark it deprecated.

It is being marked deprecated in a comment; using the respective
__attribute_((__deprecated__)) didn't seem a proper thing in a
header that ought to be consumable by non-GNU compilers.

>> -    phys_ram_base = xc_map_foreign_batch(xc_handle, domid,
>> +    phys_ram_base = xc_map_foreign_pages(xc_handle, domid,
>>                                           PROT_READ|PROT_WRITE,
>>                                           page_array, nr_pages);
>
>I'm not sure I understand this bug I haven't looked at it in any kind
>of detail so it may be correct.

This just follows the libxc changes: Any call to xc_map_foreign_batch()
where the array wasn't looked at for per-page errors just wasn't
correct, and now gets converted to use xc_map_foreign_pages()
instead (which does the error checking on behalf of the caller).

Jan

  reply	other threads:[~2010-01-13  7:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 14:50 [PATCH, RFC 3/4] qemu: use new (replacement) mmap-batch ioctl Jan Beulich
2010-01-12 17:25 ` Ian Jackson
2010-01-13  7:50   ` Jan Beulich [this message]
2010-01-13  7:59     ` Keir Fraser
2010-01-13  8:03       ` Jan Beulich
2010-01-13  8:28         ` Keir Fraser
2010-01-13  8:56           ` Jan Beulich

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=4B4D893A02000078000299B5@vpn.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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).