qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCHv2] qemu: target library, use it in msix


From: Avi Kivity
Subject: Re: [Qemu-devel] Re: [PATCHv2] qemu: target library, use it in msix
Date: Sun, 27 Sep 2009 12:40:16 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.1) Gecko/20090814 Fedora/3.0-2.6.b3.fc11 Lightning/1.0pre Thunderbird/3.0b3

On 09/27/2009 10:20 AM, Michael S. Tsirkin wrote:
On Thu, Sep 24, 2009 at 08:50:11PM +0300, Blue Swirl wrote:
On Wed, Sep 23, 2009 at 11:06 PM, Michael S. Tsirkin<address@hidden>  wrote:
This creates target.c, which builds per-target, and makes it possible
for devices to become target-independent.  Use it in msix, reverting
part of 5e520a7d500ec2569d22d80f9ef4272a34cb3c80, as we no longer have
to pass target page around.
+unsigned target_page_align(unsigned value)
+{
+       return TARGET_PAGE_ALIGN(value);
+}
This must be:
target_phys_addr_t target_page_align(target_phys_addr_t value)
Thinking about this some more, this function just says "align a value to
page size". The value might not be a bus address at all, and indeed with
msix use, it is not. Makes sense?

In any case restricting it to unsigned invites truncation.  We can have

   target_phys_addr_t target_phys_page_align();
   target_ulong_t target_virt_page_align();

or just

  uint64_t target_page_align();

(which is wasteful on 32/32 guests and 32 hosts).

--
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]