All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: kvm-ia64@vger.kernel.org
Subject: Re: [PATCH] virtio: Define and use per-architecture "pfn shift" constants
Date: Thu, 06 Nov 2008 16:22:05 +0000	[thread overview]
Message-ID: <491319AD.5070501@codemonkey.ws> (raw)
In-Reply-To: <200811052254.04409.hollisb@us.ibm.com>

Hollis Blanchard wrote:
> On Thu, 2008-11-06 at 10:49 +0000, Mark McLoughlin wrote:
>   
>> But actually, why do we align the size anyway?
>>     
>
> I assume it's so that the last page in the ring (containing the "used"
> fields) could be safely mapped into another guest's address space,
> without fear of exposing other data.
>
> I don't know how valuable that is, but that's not really my concern so I
> preserved the behavior.
>
>   
>> Also might make sense for vring_init() and vring_size() not to take a
>> pagesize argument and hard-code them to use VRING_PAGE_SIZE.
>>     
>
> I think that's a good idea. Anthony mentioned earlier the code was done
> this way so it could be copied to userspace, where PAGE_SIZE is
> unavailable, but that isn't an issue if we switch to VRING_PAGE_SIZE.
>   

Agreed.

Regards,

Anthony Liguori



WARNING: multiple messages have this Message-ID (diff)
From: Anthony Liguori <anthony@codemonkey.ws>
To: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Mark McLoughlin <markmc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org,
	kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kvm-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] virtio: Define and use per-architecture "pfn shift" constants
Date: Thu, 06 Nov 2008 16:22:05 +0000	[thread overview]
Message-ID: <491319AD.5070501@codemonkey.ws> (raw)
In-Reply-To: <1225986626.8620.28.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>

Hollis Blanchard wrote:
> On Thu, 2008-11-06 at 10:49 +0000, Mark McLoughlin wrote:
>   
>> But actually, why do we align the size anyway?
>>     
>
> I assume it's so that the last page in the ring (containing the "used"
> fields) could be safely mapped into another guest's address space,
> without fear of exposing other data.
>
> I don't know how valuable that is, but that's not really my concern so I
> preserved the behavior.
>
>   
>> Also might make sense for vring_init() and vring_size() not to take a
>> pagesize argument and hard-code them to use VRING_PAGE_SIZE.
>>     
>
> I think that's a good idea. Anthony mentioned earlier the code was done
> this way so it could be copied to userspace, where PAGE_SIZE is
> unavailable, but that isn't an issue if we switch to VRING_PAGE_SIZE.
>   

Agreed.

Regards,

Anthony Liguori



WARNING: multiple messages have this Message-ID (diff)
From: Anthony Liguori <anthony-rdkfGonbjUSkNkDKm+mE6A@public.gmane.org>
To: Hollis Blanchard <hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Cc: Mark McLoughlin <markmc-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org,
	kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kvm-ppc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	kvm-ia64-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] virtio: Define and use per-architecture "pfn shift" constants
Date: Thu, 06 Nov 2008 10:22:05 -0600	[thread overview]
Message-ID: <491319AD.5070501@codemonkey.ws> (raw)
In-Reply-To: <1225986626.8620.28.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>

Hollis Blanchard wrote:
> On Thu, 2008-11-06 at 10:49 +0000, Mark McLoughlin wrote:
>   
>> But actually, why do we align the size anyway?
>>     
>
> I assume it's so that the last page in the ring (containing the "used"
> fields) could be safely mapped into another guest's address space,
> without fear of exposing other data.
>
> I don't know how valuable that is, but that's not really my concern so I
> preserved the behavior.
>
>   
>> Also might make sense for vring_init() and vring_size() not to take a
>> pagesize argument and hard-code them to use VRING_PAGE_SIZE.
>>     
>
> I think that's a good idea. Anthony mentioned earlier the code was done
> this way so it could be copied to userspace, where PAGE_SIZE is
> unavailable, but that isn't an issue if we switch to VRING_PAGE_SIZE.
>   

Agreed.

Regards,

Anthony Liguori


--
To unsubscribe from this list: send the line "unsubscribe kvm-ppc" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-11-06 16:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06  4:54 [PATCH] virtio: Define and use per-architecture "pfn shift" constants Hollis Blanchard
2008-11-06  4:54 ` Hollis Blanchard
2008-11-06  4:54 ` Hollis Blanchard
2008-11-06 10:49 ` [PATCH] virtio: Define and use per-architecture "pfn shift" Mark McLoughlin
2008-11-06 10:49   ` [PATCH] virtio: Define and use per-architecture "pfn shift" constants Mark McLoughlin
2008-11-06 10:49   ` [PATCH] virtio: Define and use per-architecture "pfn shift" Mark McLoughlin
2008-11-06 13:59 ` [PATCH] virtio: Define and use per-architecture "pfn shift" constants Anthony Liguori
2008-11-06 13:59   ` Anthony Liguori
2008-11-06 13:59   ` Anthony Liguori
2008-11-06 15:50 ` [PATCH] virtio: Define and use per-architecture "pfn shift" Hollis Blanchard
2008-11-06 15:50   ` [PATCH] virtio: Define and use per-architecture "pfn shift" constants Hollis Blanchard
2008-11-06 15:50   ` [PATCH] virtio: Define and use per-architecture "pfn shift" Hollis Blanchard
2008-11-06 16:22 ` Anthony Liguori [this message]
2008-11-06 16:22   ` [PATCH] virtio: Define and use per-architecture "pfn shift" constants Anthony Liguori
2008-11-06 16:22   ` Anthony Liguori
2008-11-06 20:07 ` Anthony Liguori
2008-11-06 20:07   ` Anthony Liguori
2008-11-06 20:07   ` Anthony Liguori
  -- strict thread matches above, loose matches on Subject: below --
2008-11-06  4:49 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=491319AD.5070501@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=kvm-ia64@vger.kernel.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 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.