From: Avi Kivity <avi@redhat.com>
To: Jes Sorensen <jes@sgi.com>
Cc: "Zhang, Xiantao" <xiantao.zhang@intel.com>,
Hollis Blanchard <hollisb@us.ibm.com>,
"kvm-ia64@vger.kernel.org" <kvm-ia64@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 04/04] qemu-kvm: other archs should maintain memory mapping also.
Date: Mon, 04 May 2009 11:51:38 +0300 [thread overview]
Message-ID: <49FEAC9A.6060500@redhat.com> (raw)
In-Reply-To: <49F86C66.9000804@sgi.com>
Jes Sorensen wrote:
> Avi Kivity wrote:
>>> Currently, use TARGET_I386 to comment out the mapping machanism
>>> for other archs, but mapping machanism should be useful for other archs
>>> to maintain guest's memory mapping.
>>
>> Hollis, does this work for you?
>>
>> If now, you can add a new define KVM_WANT_MAPPING or something, and
>> define it for I386 and IA64.
>
> Hi,
>
> This is the must_use_alias patch mentioned in my previous email.
> +int destroy_region_works = 0;
> +
>
Global name, prefix with kvm_. Does it actually need to be global?
>
> Index: qemu-kvm/target-i386/qemu-kvm-arch.h
> ===================================================================
> --- /dev/null
> +++ qemu-kvm/target-i386/qemu-kvm-arch.h
> @@ -0,0 +1,17 @@
> +/*
> + * qemu/kvm x86 integration
> + *
> + * Copyright (C) 2006-2008 Qumranet Technologies
> + * Copyright (C) 2009 Silicon Graphics Inc.
> + *
> + * Licensed under the terms of the GNU GPL version 2 or higher.
> + */
> +#ifndef QEMU_KVM_ARCH_H
> +#define QEMU_KVM_ARCH_H
> +
> +extern int destroy_region_works;
> +
> +extern int kvm_arch_must_use_aliases_source(target_phys_addr_t addr);
> +extern int kvm_arch_must_use_aliases_target(target_phys_addr_t addr);
>
The header depends on target_phys_addr_t, so it must include whatever
defines it.
> --- /dev/null
> +++ qemu-kvm/target-ia64/qemu-kvm-arch.h
> @@ -0,0 +1,22 @@
> +/*
> + * qemu/kvm ia64 integration
> + *
> + * Copyright (C) 2006-2008 Qumranet Technologies
> + * Copyright (C) 2009 Silicon Graphics Inc.
> + *
> + * Licensed under the terms of the GNU GPL version 2 or higher.
> + */
> +#ifndef QEMU_KVM_ARCH_H
> +#define QEMU_KVM_ARCH_H
> +
> +static inline int kvm_arch_must_use_aliases_source(target_phys_addr_t addr)
> +{
> + return 0;
> +}
> +
> +static inline int kvm_arch_must_use_aliases_target(target_phys_addr_t addr)
> +{
> + return 0;
> +}
> +
> +#endif
>
Missing other archs...
Instead of duplicating this for every arch, you can have a #define that
tells you if you want non-trivial arch definitions, and supply the
trivial definitions in qemu-kvm.h.
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2009-05-04 8:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-28 9:29 [PATCH 04/04] qemu-kvm: other archs should maintain memory mapping also Zhang, Xiantao
2009-04-28 9:39 ` Avi Kivity
2009-04-29 14:59 ` Jes Sorensen
2009-04-29 15:04 ` Jes Sorensen
2009-05-04 8:51 ` Avi Kivity [this message]
[not found] ` <49FEAC9A.6060500-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-05-04 9:25 ` Jes Sorensen
2009-05-04 21:57 ` [PATCH 04/04] qemu-kvm: other archs should maintain memory mappingalso Hollis Blanchard
[not found] ` <49F6CED2.1060202-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-04-29 15:06 ` [PATCH 04/04] qemu-kvm: other archs should maintain memory mapping also Jes Sorensen
[not found] ` <49FEAE3A.2070001@redhat.com>
2009-05-04 8:59 ` Avi Kivity
2009-05-04 9:17 ` Jes Sorensen
2009-05-11 10:15 ` Zhang, Xiantao
2009-05-11 11:18 ` Jes Sorensen
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=49FEAC9A.6060500@redhat.com \
--to=avi@redhat.com \
--cc=hollisb@us.ibm.com \
--cc=jes@sgi.com \
--cc=kvm-ia64@vger.kernel.org \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=xiantao.zhang@intel.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).