From: Avi Kivity <avi@redhat.com>
To: kvm-ia64@vger.kernel.org
Subject: Re: [PATCH] kvm/ia64: Code cleanup for Linux- 2.6.28.
Date: Wed, 22 Oct 2008 10:40:17 +0000 [thread overview]
Message-ID: <48FF0311.6050100@redhat.com> (raw)
In-Reply-To: <42DFA526FC41B1429CE7279EF83C6BDC01B47EC3@pdsmsx415.ccr.corp.intel.com>
Zhang, Xiantao wrote:
> Hi, Avi
> Could you help to queue this patch for 2.6.28? It has no any logic
> changes, and just re-organizes the structure of vm data area to allow
> users to configure large memory and more vcpus. Since it changes many in
> header files, so it had better go into rc1. Thanks!
>
If there are no logic changes, why is it needed to 2.6.28?
> diff --git a/arch/ia64/include/asm/kvm.h b/arch/ia64/include/asm/kvm.h
> index f38472a..de02c18 100644
> --- a/arch/ia64/include/asm/kvm.h
> +++ b/arch/ia64/include/asm/kvm.h
> @@ -207,5 +207,4 @@ struct kvm_sregs {
>
> struct kvm_fpu {
> };
> -
> #endif
>
Actually the blank line is helpful here.
> diff --git a/arch/ia64/include/asm/kvm_host.h
> b/arch/ia64/include/asm/kvm_host.h
> index b9e3c7f..e98f6f0 100644
> --- a/arch/ia64/include/asm/kvm_host.h
> +++ b/arch/ia64/include/asm/kvm_host.h
> @@ -23,17 +23,6 @@
> #ifndef __ASM_KVM_HOST_H
> #define __ASM_KVM_HOST_H
>
> -
> -#include <linux/types.h>
> -#include <linux/mm.h>
> -#include <linux/kvm.h>
> -#include <linux/kvm_para.h>
> -#include <linux/kvm_types.h>
> -
>
Are you sure these are unneeded here? For example, if u8 or u32 are
referenced in this file, you should keep linux/types.h. A header file
should require no other header files to be previously included.
> @ -765,21 +763,12 @@ static void kvm_build_io_pmt(struct kvm *kvm)
>
> static void kvm_init_vm(struct kvm *kvm)
> {
> - long vm_base;
> -
> BUG_ON(!kvm);
>
> kvm->arch.metaphysical_rr0 = GUEST_PHYSICAL_RR0;
> kvm->arch.metaphysical_rr4 = GUEST_PHYSICAL_RR4;
> kvm->arch.vmm_init_rr = VMM_INIT_RR;
>
> - vm_base = kvm->arch.vm_base;
> - if (vm_base) {
> - kvm->arch.vhpt_base = vm_base + KVM_VHPT_OFS;
> - kvm->arch.vtlb_base = vm_base + KVM_VTLB_OFS;
> - kvm->arch.vpd_base = vm_base + KVM_VPD_OFS;
> - }
> -
>
Is this guaranteed to be zero? It doesn't seem like a code cleanup.
Best in a separate patch with an explanation why it is safe.
> @@ -183,8 +183,8 @@ void mark_pages_dirty(struct kvm_vcpu *v, u64 pte,
> u64 ps)
> u64 i, dirty_pages = 1;
> u64 base_gfn = (pte&_PAGE_PPN_MASK) >> PAGE_SHIFT;
> spinlock_t *lock = __kvm_va(v->arch.dirty_log_lock_pa);
> - void *dirty_bitmap = (void *)v - (KVM_VCPU_OFS + v->vcpu_id *
> VCPU_SIZE)
> - + KVM_MEM_DIRTY_LOG_OFS;
> + void *dirty_bitmap = (void *)KVM_MEM_DIRTY_LOG_BASE;
> +
>
This doesn't seem like a cleanup.
In general the offsetof() changes are very good, but please separate
them from the typos and coding style fixes.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2008-10-22 10:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-15 14:50 [PATCH] kvm/ia64: Code cleanup for Linux- 2.6.28 Zhang, Xiantao
2008-10-22 10:40 ` Avi Kivity [this message]
2008-10-23 2:09 ` Zhang, Xiantao
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=48FF0311.6050100@redhat.com \
--to=avi@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox