public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] mmu.c: remove unused functions
@ 2007-07-24 10:49 Nguyen Anh Quynh
       [not found] ` <9cde8bff0707240349t70e72611n35e608d7848f08f7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Nguyen Anh Quynh @ 2007-07-24 10:49 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: Type: text/plain, Size: 132 bytes --]

This patch removes some unused functions in mmu.c

Signed-off-by: Nguyen Anh Quynh <aquynh-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch19.patch --]
[-- Type: text/x-patch; name="patch19.patch", Size: 884 bytes --]

diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c
index a7985b1..13fb6bb 100644
--- a/drivers/kvm/mmu.c
+++ b/drivers/kvm/mmu.c
@@ -156,21 +156,6 @@ static struct kmem_cache *pte_chain_cache;
 static struct kmem_cache *rmap_desc_cache;
 static struct kmem_cache *mmu_page_header_cache;
 
-static int is_write_protection(struct kvm_vcpu *vcpu)
-{
-	return vcpu->cr0 & X86_CR0_WP;
-}
-
-static int is_cpuid_PSE36(void)
-{
-	return 1;
-}
-
-static int is_nx(struct kvm_vcpu *vcpu)
-{
-	return vcpu->shadow_efer & EFER_NX;
-}
-
 static int is_present_pte(unsigned long pte)
 {
 	return pte & PT_PRESENT_MASK;
@@ -181,11 +166,6 @@ static int is_writeble_pte(unsigned long pte)
 	return pte & PT_WRITABLE_MASK;
 }
 
-static int is_io_pte(unsigned long pte)
-{
-	return pte & PT_SHADOW_IO_MARK;
-}
-
 static int is_rmap_pte(u64 pte)
 {
 	return (pte & (PT_WRITABLE_MASK | PT_PRESENT_MASK))

[-- Attachment #3: Type: text/plain, Size: 315 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

[-- Attachment #4: Type: text/plain, Size: 186 bytes --]

_______________________________________________
kvm-devel mailing list
kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/kvm-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [patch] mmu.c: remove unused functions
       [not found] ` <9cde8bff0707240349t70e72611n35e608d7848f08f7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-07-24 10:55   ` Avi Kivity
       [not found]     ` <46A5DAB5.7020503-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Avi Kivity @ 2007-07-24 10:55 UTC (permalink / raw)
  To: Nguyen Anh Quynh; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Nguyen Anh Quynh wrote:
> This patch removes some unused functions in mmu.c

> -static int is_nx(struct kvm_vcpu *vcpu)
> -{
> -	return vcpu->shadow_efer & EFER_NX;
> -}
> -

is_nx() for example, is used.

More care, please.


-- 
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] mmu.c: remove unused functions
       [not found]     ` <46A5DAB5.7020503-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-07-25  2:25       ` Nguyen Anh Quynh
       [not found]         ` <9cde8bff0707241925nd2dea95t737af154b1da7108-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Nguyen Anh Quynh @ 2007-07-25  2:25 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On 7/24/07, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
> Nguyen Anh Quynh wrote:
> > This patch removes some unused functions in mmu.c
>
> > -static int is_nx(struct kvm_vcpu *vcpu)
> > -{
> > -     return vcpu->shadow_efer & EFER_NX;
> > -}
> > -
>
> is_nx() for example, is used.
>
> More care, please.

Oops, I looked again. The way we handle static functions with
paging_tmpl.h is weird.

How about moving these functions there?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] mmu.c: remove unused functions
       [not found]         ` <9cde8bff0707241925nd2dea95t737af154b1da7108-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2007-07-25  3:08           ` Avi Kivity
       [not found]             ` <46A6BEBE.9030402-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Avi Kivity @ 2007-07-25  3:08 UTC (permalink / raw)
  To: Nguyen Anh Quynh; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Nguyen Anh Quynh wrote:
> On 7/24/07, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
>> Nguyen Anh Quynh wrote:
>> > This patch removes some unused functions in mmu.c
>>
>> > -static int is_nx(struct kvm_vcpu *vcpu)
>> > -{
>> > -     return vcpu->shadow_efer & EFER_NX;
>> > -}
>> > -
>>
>> is_nx() for example, is used.
>>
>> More care, please.
>
> Oops, I looked again. The way we handle static functions with
> paging_tmpl.h is weird.
>
> How about moving these functions there?

It's wierder than you think.  You'll get multiple definition errors.

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


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [patch] mmu.c: remove unused functions
       [not found]             ` <46A6BEBE.9030402-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
@ 2007-07-25  3:19               ` Nguyen Anh Quynh
  0 siblings, 0 replies; 5+ messages in thread
From: Nguyen Anh Quynh @ 2007-07-25  3:19 UTC (permalink / raw)
  To: Avi Kivity; +Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On 7/25/07, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
> Nguyen Anh Quynh wrote:
> > On 7/24/07, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
> >> Nguyen Anh Quynh wrote:
> >> > This patch removes some unused functions in mmu.c
> >>
> >> > -static int is_nx(struct kvm_vcpu *vcpu)
> >> > -{
> >> > -     return vcpu->shadow_efer & EFER_NX;
> >> > -}
> >> > -
> >>
> >> is_nx() for example, is used.
> >>
> >> More care, please.
> >
> > Oops, I looked again. The way we handle static functions with
> > paging_tmpl.h is weird.
> >
> > How about moving these functions there?
>
> It's wierder than you think.  You'll get multiple definition errors.

Most of the time that can be solved with some #ifdef. And I dont see
#ifdef in paging_tmpl.h

But never mind if you dont see that is worth fixing.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-07-25  3:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-24 10:49 [patch] mmu.c: remove unused functions Nguyen Anh Quynh
     [not found] ` <9cde8bff0707240349t70e72611n35e608d7848f08f7-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-07-24 10:55   ` Avi Kivity
     [not found]     ` <46A5DAB5.7020503-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-25  2:25       ` Nguyen Anh Quynh
     [not found]         ` <9cde8bff0707241925nd2dea95t737af154b1da7108-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-07-25  3:08           ` Avi Kivity
     [not found]             ` <46A6BEBE.9030402-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-07-25  3:19               ` Nguyen Anh Quynh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox