linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the kselftest tree with the kvm tree
@ 2018-10-18  4:50 Stephen Rothwell
  2018-10-18 10:51 ` Paolo Bonzini
  0 siblings, 1 reply; 5+ messages in thread
From: Stephen Rothwell @ 2018-10-18  4:50 UTC (permalink / raw)
  To: Shuah Khan, Paolo Bonzini, Radim Krčmář, KVM
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Andrea Parri

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

Hi Shuah,

Today's linux-next merge of the kselftest tree got a conflict in:

  tools/testing/selftests/kvm/dirty_log_test.c

between commit:

  fff8dcd7b4a2 ("kvm: selftests: port dirty_log_test to aarch64")

from the kvm tree and commit:

  cda94d9ffa0e ("selftests: kvm: Fix -Wformat warnings")

from the kselftest tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc tools/testing/selftests/kvm/dirty_log_test.c
index d59820cc2d39,a9c4b5e21d7e..000000000000
--- a/tools/testing/selftests/kvm/dirty_log_test.c
+++ b/tools/testing/selftests/kvm/dirty_log_test.c
@@@ -17,52 -15,46 +17,52 @@@
  
  #include "test_util.h"
  #include "kvm_util.h"
 +#include "processor.h"
 +
 +#define DEBUG printf
  
 -#define  DEBUG                 printf
 +#define VCPU_ID				1
  
 -#define  VCPU_ID                        1
  /* The memory slot index to track dirty pages */
 -#define  TEST_MEM_SLOT_INDEX            1
 -/*
 - * GPA offset of the testing memory slot. Must be bigger than the
 - * default vm mem slot, which is DEFAULT_GUEST_PHY_PAGES.
 - */
 -#define  TEST_MEM_OFFSET                (1ULL << 30) /* 1G */
 -/* Size of the testing memory slot */
 -#define  TEST_MEM_PAGES                 (1ULL << 18) /* 1G for 4K pages */
 +#define TEST_MEM_SLOT_INDEX		1
 +
 +/* Default guest test memory offset, 1G */
 +#define DEFAULT_GUEST_TEST_MEM		0x40000000
 +
  /* How many pages to dirty for each guest loop */
 -#define  TEST_PAGES_PER_LOOP            1024
 +#define TEST_PAGES_PER_LOOP		1024
 +
  /* How many host loops to run (one KVM_GET_DIRTY_LOG for each loop) */
- #define TEST_HOST_LOOP_N		32
 -#define  TEST_HOST_LOOP_N               32UL
++#define TEST_HOST_LOOP_N		32UL
 +
  /* Interval for each host loop (ms) */
- #define TEST_HOST_LOOP_INTERVAL		10
 -#define  TEST_HOST_LOOP_INTERVAL        10UL
++#define TEST_HOST_LOOP_INTERVAL		10UL
 +
 +/*
 + * Guest/Host shared variables. Ensure addr_gva2hva() and/or
 + * sync_global_to/from_guest() are used when accessing from
 + * the host. READ/WRITE_ONCE() should also be used with anything
 + * that may change.
 + */
 +static uint64_t host_page_size;
 +static uint64_t guest_page_size;
 +static uint64_t guest_num_pages;
 +static uint64_t random_array[TEST_PAGES_PER_LOOP];
 +static uint64_t iteration;
  
  /*
 - * Guest variables.  We use these variables to share data between host
 - * and guest.  There are two copies of the variables, one in host memory
 - * (which is unused) and one in guest memory.  When the host wants to
 - * access these variables, it needs to call addr_gva2hva() to access the
 - * guest copy.
 + * GPA offset of the testing memory slot. Must be bigger than
 + * DEFAULT_GUEST_PHY_PAGES.
   */
 -uint64_t guest_random_array[TEST_PAGES_PER_LOOP];
 -uint64_t guest_iteration;
 -uint64_t guest_page_size;
 +static uint64_t guest_test_mem = DEFAULT_GUEST_TEST_MEM;
  
  /*
 - * Writes to the first byte of a random page within the testing memory
 - * region continuously.
 + * Continuously write to the first 8 bytes of a random pages within
 + * the testing memory region.
   */
 -void guest_code(void)
 +static void guest_code(void)
  {
 -	int i = 0;
 -	uint64_t volatile *array = guest_random_array;
 -	uint64_t volatile *guest_addr;
 +	int i;
  
  	while (true) {
  		for (i = 0; i < TEST_PAGES_PER_LOOP; i++) {

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

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

* Re: linux-next: manual merge of the kselftest tree with the kvm tree
  2018-10-18  4:50 linux-next: manual merge of the kselftest tree with the kvm tree Stephen Rothwell
@ 2018-10-18 10:51 ` Paolo Bonzini
  2018-10-18 11:50   ` Andrea Parri
  2018-10-18 14:16   ` Shuah Khan
  0 siblings, 2 replies; 5+ messages in thread
From: Paolo Bonzini @ 2018-10-18 10:51 UTC (permalink / raw)
  To: Stephen Rothwell, Shuah Khan, Radim Krčmář, KVM
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Andrea Parri


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

On 18/10/2018 06:50, Stephen Rothwell wrote:
> Hi Shuah,
> 
> Today's linux-next merge of the kselftest tree got a conflict in:
> 
>   tools/testing/selftests/kvm/dirty_log_test.c
> 
> between commit:
> 
>   fff8dcd7b4a2 ("kvm: selftests: port dirty_log_test to aarch64")
> 
> from the kvm tree and commit:
> 
>   cda94d9ffa0e ("selftests: kvm: Fix -Wformat warnings")
> 
> from the kselftest tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 


Shuah, I think it's best if in the future the
tools/testing/selftests/kvm/ changes go through my tree, unless they
affect many selftests subdirectories.

Thanks,

Paolo


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

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

* Re: linux-next: manual merge of the kselftest tree with the kvm tree
  2018-10-18 10:51 ` Paolo Bonzini
@ 2018-10-18 11:50   ` Andrea Parri
  2018-10-18 12:05     ` Paolo Bonzini
  2018-10-18 14:16   ` Shuah Khan
  1 sibling, 1 reply; 5+ messages in thread
From: Andrea Parri @ 2018-10-18 11:50 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Stephen Rothwell, Shuah Khan, Radim Krčmář,
	KVM, Linux-Next Mailing List, Linux Kernel Mailing List

> Shuah, I think it's best if in the future the
> tools/testing/selftests/kvm/ changes go through my tree, unless they
> affect many selftests subdirectories.

Would the patch below make sense ?

(It wasn't the case of my patch, but you never know... ;D)

Output of get_maintainer.pl on tools/testing/selftests/kvm/:

Before:

Shuah Khan <shuah@kernel.org> (maintainer:KERNEL SELFTEST FRAMEWORK,commit_signer:5/23=22%)
Paolo Bonzini <pbonzini@redhat.com> (commit_signer:20/23=87%,authored:10/23=43%)
Peter Xu <peterx@redhat.com> (commit_signer:4/23=17%,authored:4/23=17%)
Anders Roxell <anders.roxell@linaro.org> (commit_signer:3/23=13%,authored:3/23=13%)
Ken Hofsass <hofsass@google.com> (commit_signer:2/23=9%)
linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK)
linux-kernel@vger.kernel.org (open list)

After:

Paolo Bonzini <pbonzini@redhat.com> (supporter:KERNEL VIRTUAL MACHINE (KVM))
"Radim Krčmář" <rkrcmar@redhat.com> (supporter:KERNEL VIRTUAL MACHINE (KVM))
Shuah Khan <shuah@kernel.org> (maintainer:KERNEL SELFTEST FRAMEWORK)
kvm@vger.kernel.org (open list:KERNEL VIRTUAL MACHINE (KVM))
linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK)
linux-kernel@vger.kernel.org (open list)

Cheers,
  Andrea

---
commit 59fc1af0d7d0ae0c1ec9400bfbacaadce11e5f50
Author: Andrea Parri <andrea.parri@amarulasolutions.com>
Date:   Thu Oct 18 13:11:09 2018 +0200

    MAINTAINERS: Add selftests to the KVM entry
    
    Should ensure that Joe random dev will Cc: the KVM maintainers.
    
    Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com>
    Cc: Paolo Bonzini <pbonzini@redhat.com>
    Cc: "Radim Krčmář" <rkrcmar@redhat.com>
    Cc: Shuah Khan <shuah@kernel.org>

diff --git a/MAINTAINERS b/MAINTAINERS
index 6ac000cc006d1..25755bf6365ee 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7997,6 +7997,7 @@ F:	include/linux/kvm*
 F:	include/kvm/iodev.h
 F:	virt/kvm/*
 F:	tools/kvm/
+F:	tools/testing/selftests/kvm/
 
 KERNEL VIRTUAL MACHINE FOR AMD-V (KVM/amd)
 M:	Joerg Roedel <joro@8bytes.org>
---

> 
> Thanks,
> 
> Paolo
> 




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

* Re: linux-next: manual merge of the kselftest tree with the kvm tree
  2018-10-18 11:50   ` Andrea Parri
@ 2018-10-18 12:05     ` Paolo Bonzini
  0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2018-10-18 12:05 UTC (permalink / raw)
  To: Andrea Parri
  Cc: Stephen Rothwell, Shuah Khan, Radim Krčmář,
	KVM, Linux-Next Mailing List, Linux Kernel Mailing List

On 18/10/2018 13:50, Andrea Parri wrote:
>> Shuah, I think it's best if in the future the
>> tools/testing/selftests/kvm/ changes go through my tree, unless they
>> affect many selftests subdirectories.
> 
> Would the patch below make sense ?
> 
> (It wasn't the case of my patch, but you never know... ;D)
> 
> Output of get_maintainer.pl on tools/testing/selftests/kvm/:
> 
> Before:
> 
> Shuah Khan <shuah@kernel.org> (maintainer:KERNEL SELFTEST FRAMEWORK,commit_signer:5/23=22%)
> Paolo Bonzini <pbonzini@redhat.com> (commit_signer:20/23=87%,authored:10/23=43%)
> Peter Xu <peterx@redhat.com> (commit_signer:4/23=17%,authored:4/23=17%)
> Anders Roxell <anders.roxell@linaro.org> (commit_signer:3/23=13%,authored:3/23=13%)
> Ken Hofsass <hofsass@google.com> (commit_signer:2/23=9%)
> linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK)
> linux-kernel@vger.kernel.org (open list)
> 
> After:
> 
> Paolo Bonzini <pbonzini@redhat.com> (supporter:KERNEL VIRTUAL MACHINE (KVM))
> "Radim Krčmář" <rkrcmar@redhat.com> (supporter:KERNEL VIRTUAL MACHINE (KVM))
> Shuah Khan <shuah@kernel.org> (maintainer:KERNEL SELFTEST FRAMEWORK)
> kvm@vger.kernel.org (open list:KERNEL VIRTUAL MACHINE (KVM))
> linux-kselftest@vger.kernel.org (open list:KERNEL SELFTEST FRAMEWORK)
> linux-kernel@vger.kernel.org (open list)
> 
> Cheers,
>   Andrea
> 
> ---
> commit 59fc1af0d7d0ae0c1ec9400bfbacaadce11e5f50
> Author: Andrea Parri <andrea.parri@amarulasolutions.com>
> Date:   Thu Oct 18 13:11:09 2018 +0200
> 
>     MAINTAINERS: Add selftests to the KVM entry
>     
>     Should ensure that Joe random dev will Cc: the KVM maintainers.
>     
>     Signed-off-by: Andrea Parri <andrea.parri@amarulasolutions.com>
>     Cc: Paolo Bonzini <pbonzini@redhat.com>
>     Cc: "Radim Krčmář" <rkrcmar@redhat.com>
>     Cc: Shuah Khan <shuah@kernel.org>
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 6ac000cc006d1..25755bf6365ee 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -7997,6 +7997,7 @@ F:	include/linux/kvm*
>  F:	include/kvm/iodev.h
>  F:	virt/kvm/*
>  F:	tools/kvm/
> +F:	tools/testing/selftests/kvm/
>  
>  KERNEL VIRTUAL MACHINE FOR AMD-V (KVM/amd)
>  M:	Joerg Roedel <joro@8bytes.org>
> ---
> 
>>
>> Thanks,
>>
>> Paolo
>>
> 
> 
> 

Yes, I've applied it.

Paolo

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

* Re: linux-next: manual merge of the kselftest tree with the kvm tree
  2018-10-18 10:51 ` Paolo Bonzini
  2018-10-18 11:50   ` Andrea Parri
@ 2018-10-18 14:16   ` Shuah Khan
  1 sibling, 0 replies; 5+ messages in thread
From: Shuah Khan @ 2018-10-18 14:16 UTC (permalink / raw)
  To: Paolo Bonzini, Stephen Rothwell, Radim Krčmář, KVM
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Andrea Parri,
	Shuah Khan

On 10/18/2018 04:51 AM, Paolo Bonzini wrote:
> On 18/10/2018 06:50, Stephen Rothwell wrote:
>> Hi Shuah,
>>
>> Today's linux-next merge of the kselftest tree got a conflict in:
>>
>>   tools/testing/selftests/kvm/dirty_log_test.c
>>
>> between commit:
>>
>>   fff8dcd7b4a2 ("kvm: selftests: port dirty_log_test to aarch64")
>>
>> from the kvm tree and commit:
>>
>>   cda94d9ffa0e ("selftests: kvm: Fix -Wformat warnings")
>>
>> from the kselftest tree.
>>
>> I fixed it up (see below) and can carry the fix as necessary. This
>> is now fixed as far as linux-next is concerned, but any non trivial
>> conflicts should be mentioned to your upstream maintainer when your tree
>> is submitted for merging.  You may also want to consider cooperating
>> with the maintainer of the conflicting tree to minimise any particularly
>> complex conflicts.
>>
> 
> 
> Shuah, I think it's best if in the future the
> tools/testing/selftests/kvm/ changes go through my tree, unless they
> affect many selftests subdirectories.
> 

Yes. That makes sense. Looked like an harmless patch that might not have
any dependencies. Should have checked with you.

Thanks for taking care of the problem.

thanks,
-- Shuah


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

end of thread, other threads:[~2018-10-18 14:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18  4:50 linux-next: manual merge of the kselftest tree with the kvm tree Stephen Rothwell
2018-10-18 10:51 ` Paolo Bonzini
2018-10-18 11:50   ` Andrea Parri
2018-10-18 12:05     ` Paolo Bonzini
2018-10-18 14:16   ` Shuah Khan

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).