All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: Will Deacon <will.deacon@arm.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	"penberg@kernel.org" <penberg@kernel.org>,
	Marc Zyngier <Marc.Zyngier@arm.com>,
	"c.dall@virtualopensystems.com" <c.dall@virtualopensystems.com>,
	Matt Evans <Matt.Evans@arm.com>,
	"peter.maydell@linaro.org" <peter.maydell@linaro.org>
Subject: Re: [RFC PATCH 13/16] kvm tools: keep track of registered memory banks in struct kvm
Date: Tue, 13 Nov 2012 11:09:05 -0500	[thread overview]
Message-ID: <50A270A1.8020305@gmail.com> (raw)
In-Reply-To: <20121113121605.GC5493@mudshark.cambridge.arm.com>

On 11/13/2012 07:16 AM, Will Deacon wrote:
> On Tue, Nov 13, 2012 at 04:37:38AM +0000, Sasha Levin wrote:
>> On 11/12/2012 06:57 AM, Will Deacon wrote:
>>> +struct kvm_mem_bank {
>>> +	struct list_head	list;
>>> +	unsigned long		guest_phys_addr;
>>> +	void			*host_addr;
>>> +	unsigned long		size;
>>> +};
>>
>> Can we just reuse struct kvm_userspace_memory_region here? We're also using different
>> data types for guest_phys_addr and size than whats in kvm_userspace_memory_region - that
>> can't be good.
> 
> I looked briefly at doing that when I wrote the multi-bank stuff, but I hit
> a couple of issues:
> 
> 	- kvmtool itself tends to use void * for host addresses, rather than
> 	  the __u64 userspace_addr in kvm_userspace_memory_region
> 
> 	- kvm_userspace_memory_region is a superset of what we need (not the
> 	  end of the world I guess)
> 
> so you end up casting address types a fair amount. Still, I'll revisit it
> and see if I can come up with something cleaner.

That's a good point. We used void* while the kernel side is using u64, which
looks odd.

In that case, let's get everything moved to u64 (obviously not in the scope of
this patch series).


Thanks,
Sasha


  reply	other threads:[~2012-11-13 16:09 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 11:57 [RFC PATCH 00/16] kvm tools: add support for ARMv7 processors Will Deacon
2012-11-12 11:57 ` [RFC PATCH 01/16] kvm tools: include arch uapi/asm directories in include path Will Deacon
2012-11-12 11:57 ` [RFC PATCH 02/16] kvm tools: only enable LTO if supported by GCC Will Deacon
2012-11-12 11:57 ` [RFC PATCH 03/16] kvm tools: avoid linking dynamically against libbfd Will Deacon
2012-11-12 11:57 ` [RFC PATCH 04/16] kvm tools: specify compiler by name when overriding make default Will Deacon
2012-11-12 11:57 ` [RFC PATCH 05/16] kvm tools: don't bother including linux/compiler.h Will Deacon
2012-11-13  7:26   ` Pekka Enberg
2012-11-16 10:06     ` Will Deacon
2012-11-16 22:01       ` Pekka Enberg
2012-11-19 10:33         ` Will Deacon
2012-11-19 11:42           ` Pekka Enberg
2012-11-12 11:57 ` [RFC PATCH 06/16] kvm tools: don't pass -Wcast-align to the compiler Will Deacon
2012-11-12 11:57 ` [RFC PATCH 07/16] kvm tools: die if init_list__init returns failure Will Deacon
2012-11-12 11:57 ` [RFC PATCH 08/16] kvm tools: add generic device registration mechanism Will Deacon
2012-11-13  4:29   ` Sasha Levin
2012-11-13 10:24     ` Will Deacon
2012-11-12 11:57 ` [RFC PATCH 09/16] kvm tools: make _FDT macro usable by other architectures Will Deacon
2012-11-12 11:57 ` [RFC PATCH 10/16] kvm tools: virtio-mmio: use subsys_id instead of pci device ID Will Deacon
2012-11-12 11:57 ` [RFC PATCH 11/16] kvm tools: virtio: add dummy set_size_vq implementations Will Deacon
2012-11-12 11:57 ` [RFC PATCH 12/16] kvm tools: allow arch to specify default virtio transport Will Deacon
2012-11-12 11:57 ` [RFC PATCH 13/16] kvm tools: keep track of registered memory banks in struct kvm Will Deacon
2012-11-13  4:37   ` Sasha Levin
2012-11-13 12:16     ` Will Deacon
2012-11-13 16:09       ` Sasha Levin [this message]
2012-11-13 16:21         ` Will Deacon
2012-11-20 17:15     ` Will Deacon
2012-11-20 21:01       ` Sasha Levin
2012-11-12 11:57 ` [RFC PATCH 14/16] kvm tools: teach guest_flat_to_host about memory banks starting above 0 Will Deacon
2012-11-13  4:47   ` Sasha Levin
2012-11-12 11:57 ` [RFC PATCH 15/16] kvm tools: provide a mechanism for translating host to guest addresses Will Deacon
2012-11-12 11:57 ` [RFC PATCH 16/16] kvm tools: add support for ARMv7 processors Will Deacon
2012-11-13  7:39   ` Pekka Enberg
2012-11-13 10:21     ` Matt Evans
2012-11-13 10:28       ` Pekka Enberg
2012-11-13 18:34         ` Will Deacon
2012-11-12 12:18 ` [RFC PATCH 00/16] " Christoffer Dall
2012-11-12 12:27   ` Will Deacon
2012-11-12 12:52     ` Christoffer Dall
2012-11-12 22:40       ` Christoffer Dall
2012-11-13 10:27         ` Will Deacon
2012-11-13  7:37 ` Pekka Enberg

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=50A270A1.8020305@gmail.com \
    --to=levinsasha928@gmail.com \
    --cc=Marc.Zyngier@arm.com \
    --cc=Matt.Evans@arm.com \
    --cc=c.dall@virtualopensystems.com \
    --cc=kvm@vger.kernel.org \
    --cc=penberg@kernel.org \
    --cc=peter.maydell@linaro.org \
    --cc=will.deacon@arm.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 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.