All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] xenoprof: drop necessary macro
@ 2016-02-23 13:12 Doug Goldstein
  2016-02-23 13:42 ` Andrew Cooper
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Goldstein @ 2016-02-23 13:12 UTC (permalink / raw)
  To: xen-devel; +Cc: Keir Fraser, Doug Goldstein, Jan Beulich, Andrew Cooper

This macro doesn't really provide a benefit. When support is added the
implementer can implement this how it needs to be and not conform to the
macro. Additionally this change limits the output of the warning to just
once instead of nrpages worth. While editing this area I dropped
trailing whitespace.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
CC: Keir Fraser <keir@xen.org>
CC: Jan Beulich <jbeulich@suse.com>
CC: Andrew Cooper <andrew.cooper3@citrix.com>

changes since v1:
- add commit message about whitespace change
- only print warning once
- shorten warning to be fully greppable
---
 xen/common/xenoprof.c          | 7 +++++--
 xen/include/asm-x86/xenoprof.h | 8 --------
 2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/xen/common/xenoprof.c b/xen/common/xenoprof.c
index 7a3fc86..a5fe620 100644
--- a/xen/common/xenoprof.c
+++ b/xen/common/xenoprof.c
@@ -177,11 +177,14 @@ xenoprof_shared_gmfn_with_guest(
     struct domain *d, unsigned long maddr, unsigned long gmaddr, int npages)
 {
     int i;
-    
+
     for ( i = 0; i < npages; i++, maddr += PAGE_SIZE, gmaddr += PAGE_SIZE )
     {
         BUG_ON(page_get_owner(maddr_to_page(maddr)) != d);
-        xenoprof_shared_gmfn(d, gmaddr, maddr);
+        if ( i == 0 )
+            gdprintk(XENLOG_WARNING,
+                     "xenoprof unsupported with autotranslated guests\n");
+
     }
 }
 
diff --git a/xen/include/asm-x86/xenoprof.h b/xen/include/asm-x86/xenoprof.h
index dca4223..3a1b001 100644
--- a/xen/include/asm-x86/xenoprof.h
+++ b/xen/include/asm-x86/xenoprof.h
@@ -62,14 +62,6 @@ static inline int xenoprof_backtrace_supported(void)
 void xenoprof_backtrace(struct vcpu *, const struct cpu_user_regs *,
                         unsigned long depth, int mode);
 
-#define xenoprof_shared_gmfn(d, gmaddr, maddr)                      \
-    do {                                                            \
-        (void)(maddr);                                              \
-        gdprintk(XENLOG_WARNING,                                    \
-                 "xenoprof/x86 with autotranslated mode enabled"    \
-                 "isn't supported yet\n");                          \
-    } while (0)
-
 int passive_domain_do_rdmsr(unsigned int msr, uint64_t *msr_content);
 int passive_domain_do_wrmsr(unsigned int msr, uint64_t msr_content);
 void passive_domain_destroy(struct vcpu *v);
-- 
2.4.10

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

* Re: [PATCH v2] xenoprof: drop necessary macro
  2016-02-23 13:12 [PATCH v2] xenoprof: drop necessary macro Doug Goldstein
@ 2016-02-23 13:42 ` Andrew Cooper
  2016-02-23 13:45   ` Andrew Cooper
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2016-02-23 13:42 UTC (permalink / raw)
  To: Doug Goldstein, xen-devel; +Cc: Keir Fraser, Jan Beulich

On 23/02/16 13:12, Doug Goldstein wrote:
> This macro doesn't really provide a benefit. When support is added the
> implementer can implement this how it needs to be and not conform to the
> macro. Additionally this change limits the output of the warning to just
> once instead of nrpages worth. While editing this area I dropped
> trailing whitespace.
>
> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

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

* Re: [PATCH v2] xenoprof: drop necessary macro
  2016-02-23 13:42 ` Andrew Cooper
@ 2016-02-23 13:45   ` Andrew Cooper
  2016-02-23 15:38     ` Doug Goldstein
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2016-02-23 13:45 UTC (permalink / raw)
  To: Doug Goldstein, xen-devel; +Cc: Keir Fraser, Jan Beulich

On 23/02/16 13:42, Andrew Cooper wrote:
> On 23/02/16 13:12, Doug Goldstein wrote:
>> This macro doesn't really provide a benefit. When support is added the
>> implementer can implement this how it needs to be and not conform to the
>> macro. Additionally this change limits the output of the warning to just
>> once instead of nrpages worth. While editing this area I dropped
>> trailing whitespace.
>>
>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

You still need to correct the title, (although that could be done on
commit).

~Andrew

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

* Re: [PATCH v2] xenoprof: drop necessary macro
  2016-02-23 13:45   ` Andrew Cooper
@ 2016-02-23 15:38     ` Doug Goldstein
  2016-02-23 16:15       ` Jan Beulich
  0 siblings, 1 reply; 5+ messages in thread
From: Doug Goldstein @ 2016-02-23 15:38 UTC (permalink / raw)
  To: Andrew Cooper, xen-devel; +Cc: Keir Fraser, Jan Beulich


[-- Attachment #1.1: Type: text/plain, Size: 791 bytes --]

On 2/23/16 7:45 AM, Andrew Cooper wrote:
> On 23/02/16 13:42, Andrew Cooper wrote:
>> On 23/02/16 13:12, Doug Goldstein wrote:
>>> This macro doesn't really provide a benefit. When support is added the
>>> implementer can implement this how it needs to be and not conform to the
>>> macro. Additionally this change limits the output of the warning to just
>>> once instead of nrpages worth. While editing this area I dropped
>>> trailing whitespace.
>>>
>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
> 
> You still need to correct the title, (although that could be done on
> commit).
> 
> ~Andrew
> 

I fail. Committers: Want me to resubmit or can you set it with
"unnecessary"?

-- 
Doug Goldstein


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

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

* Re: [PATCH v2] xenoprof: drop necessary macro
  2016-02-23 15:38     ` Doug Goldstein
@ 2016-02-23 16:15       ` Jan Beulich
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2016-02-23 16:15 UTC (permalink / raw)
  To: Doug Goldstein, Andrew Cooper; +Cc: Keir Fraser, xen-devel

>>> On 23.02.16 at 16:38, <cardoe@cardoe.com> wrote:
> On 2/23/16 7:45 AM, Andrew Cooper wrote:
>> On 23/02/16 13:42, Andrew Cooper wrote:
>>> On 23/02/16 13:12, Doug Goldstein wrote:
>>>> This macro doesn't really provide a benefit. When support is added the
>>>> implementer can implement this how it needs to be and not conform to the
>>>> macro. Additionally this change limits the output of the warning to just
>>>> once instead of nrpages worth. While editing this area I dropped
>>>> trailing whitespace.
>>>>
>>>> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
>>> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
>> 
>> You still need to correct the title, (although that could be done on
>> commit).
> 
> I fail. Committers: Want me to resubmit or can you set it with
> "unnecessary"?

I'll try to remember once committing.

Jan

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

end of thread, other threads:[~2016-02-23 16:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-23 13:12 [PATCH v2] xenoprof: drop necessary macro Doug Goldstein
2016-02-23 13:42 ` Andrew Cooper
2016-02-23 13:45   ` Andrew Cooper
2016-02-23 15:38     ` Doug Goldstein
2016-02-23 16:15       ` Jan Beulich

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.