linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the kvm-arm tree with Linus' tree
@ 2015-03-18  3:41 Stephen Rothwell
  2015-03-18  7:55 ` Christoffer Dall
  0 siblings, 1 reply; 23+ messages in thread
From: Stephen Rothwell @ 2015-03-18  3:41 UTC (permalink / raw)
  To: Christoffer Dall, Marc Zyngier; +Cc: linux-next, linux-kernel, Alex Bennée

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

Hi all,

Today's linux-next merge of the kvm-arm tree got a conflict in
virt/kvm/arm/vgic.c between commit ae705930fca6 ("arm/arm64: KVM: Keep
elrsr/aisr in sync with software model") from Linus' tree and commit
71760950bf3d ("arm/arm64: KVM: add a common vgic_queue_irq_to_lr fn")
from the kvm-arm tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc virt/kvm/arm/vgic.c
index c9f60f524588,ffd937ca5141..000000000000
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@@ -982,9 -1092,7 +1098,8 @@@ bool vgic_queue_irq(struct kvm_vcpu *vc
  		if (vlr.source == sgi_source_id) {
  			kvm_debug("LR%d piggyback for IRQ%d\n", lr, vlr.irq);
  			BUG_ON(!test_bit(lr, vgic_cpu->lr_used));
- 			vlr.state |= LR_STATE_PENDING;
- 			vgic_set_lr(vcpu, lr, vlr);
+ 			vgic_queue_irq_to_lr(vcpu, irq, lr, vlr);
 +			vgic_sync_lr_elrsr(vcpu, lr, vlr);
  			return true;
  		}
  	}
@@@ -1001,12 -1109,8 +1116,9 @@@
  
  	vlr.irq = irq;
  	vlr.source = sgi_source_id;
- 	vlr.state = LR_STATE_PENDING;
- 	if (!vgic_irq_is_edge(vcpu, irq))
- 		vlr.state |= LR_EOI_INT;
- 
- 	vgic_set_lr(vcpu, lr, vlr);
+ 	vlr.state = 0;
+ 	vgic_queue_irq_to_lr(vcpu, irq, lr, vlr);
 +	vgic_sync_lr_elrsr(vcpu, lr, vlr);
  
  	return true;
  }

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

^ permalink raw reply	[flat|nested] 23+ messages in thread
* linux-next: manual merge of the kvm-arm tree with Linus' tree
@ 2018-01-03  2:38 Stephen Rothwell
  2018-01-03  9:50 ` Christoffer Dall
  0 siblings, 1 reply; 23+ messages in thread
From: Stephen Rothwell @ 2018-01-03  2:38 UTC (permalink / raw)
  To: Christoffer Dall, Marc Zyngier
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List

Hi all,

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

  virt/kvm/arm/arch_timer.c

between commit:

  36e5cfd410ad ("KVM: arm/arm64: Properly handle arch-timer IRQs after vtimer_save_state")

from Linus' tree and commit:

  70450a9fbe06 ("KVM: arm/arm64: Don't cache the timer IRQ level")

from the kvm-arm tree.

I fixed it up (I think - 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 virt/kvm/arm/arch_timer.c
index cc29a8148328,cfcd0323deab..000000000000
--- a/virt/kvm/arm/arch_timer.c
+++ b/virt/kvm/arm/arch_timer.c
@@@ -92,27 -92,19 +92,26 @@@ static irqreturn_t kvm_arch_timer_handl
  {
  	struct kvm_vcpu *vcpu = *(struct kvm_vcpu **)dev_id;
  	struct arch_timer_context *vtimer;
 +	u32 cnt_ctl;
  
 -	if (!vcpu) {
 -		pr_warn_once("Spurious arch timer IRQ on non-VCPU thread\n");
 -		return IRQ_NONE;
 -	}
 -	vtimer = vcpu_vtimer(vcpu);
 +	/*
 +	 * We may see a timer interrupt after vcpu_put() has been called which
 +	 * sets the CPU's vcpu pointer to NULL, because even though the timer
 +	 * has been disabled in vtimer_save_state(), the hardware interrupt
 +	 * signal may not have been retired from the interrupt controller yet.
 +	 */
 +	if (!vcpu)
 +		return IRQ_HANDLED;
  
 -	vtimer->cnt_ctl = read_sysreg_el0(cntv_ctl);
 -	if (kvm_timer_irq_can_fire(vtimer))
 +	vtimer = vcpu_vtimer(vcpu);
- 	if (!vtimer->irq.level) {
- 		cnt_ctl = read_sysreg_el0(cntv_ctl);
- 		cnt_ctl &= ARCH_TIMER_CTRL_ENABLE | ARCH_TIMER_CTRL_IT_STAT |
- 			   ARCH_TIMER_CTRL_IT_MASK;
- 		if (cnt_ctl == (ARCH_TIMER_CTRL_ENABLE | ARCH_TIMER_CTRL_IT_STAT))
- 			kvm_timer_update_irq(vcpu, true, vtimer);
- 	}
- 
- 	if (unlikely(!irqchip_in_kernel(vcpu->kvm)))
++	cnt_ctl = read_sysreg_el0(cntv_ctl);
++	cnt_ctl &= ARCH_TIMER_CTRL_ENABLE | ARCH_TIMER_CTRL_IT_STAT |
++		   ARCH_TIMER_CTRL_IT_MASK;
++	if (cnt_ctl == (ARCH_TIMER_CTRL_ENABLE | ARCH_TIMER_CTRL_IT_STAT))
+ 		kvm_timer_update_irq(vcpu, true, vtimer);
+ 
+ 	if (static_branch_unlikely(&userspace_irqchip_in_use) &&
+ 	    unlikely(!irqchip_in_kernel(vcpu->kvm)))
  		kvm_vtimer_update_mask_user(vcpu);
  
  	return IRQ_HANDLED;

^ permalink raw reply	[flat|nested] 23+ messages in thread
* linux-next: manual merge of the kvm-arm tree with Linus' tree
@ 2017-11-06  2:56 Stephen Rothwell
  0 siblings, 0 replies; 23+ messages in thread
From: Stephen Rothwell @ 2017-11-06  2:56 UTC (permalink / raw)
  To: Christoffer Dall, Marc Zyngier
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Dongjiu Geng

Hi all,

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

  arch/arm64/kvm/inject_fault.c

between commit:

  fd6c8c206fc5 ("arm/arm64: KVM: set right LR register value for 32 bit guest when inject abort")

from Linus' tree and commit:

  00586cdaf597 ("KVM: arm/arm64: Unify 32bit fault injection")

from the kvm-arm tree.

I fixed it up (I just used the latter) 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

^ permalink raw reply	[flat|nested] 23+ messages in thread
* linux-next: manual merge of the kvm-arm tree with Linus' tree
@ 2017-11-06  2:52 Stephen Rothwell
  0 siblings, 0 replies; 23+ messages in thread
From: Stephen Rothwell @ 2017-11-06  2:52 UTC (permalink / raw)
  To: Christoffer Dall, Marc Zyngier
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List, Dongjiu Geng

Hi all,

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

  arch/arm/kvm/emulate.c

between commit:

  fd6c8c206fc5 ("arm/arm64: KVM: set right LR register value for 32 bit guest when inject abort")

from Linus' tree and commit:

  00586cdaf597 ("KVM: arm/arm64: Unify 32bit fault injection")

from the kvm-arm tree.

I fixed it up (I just used the latter version) 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

^ permalink raw reply	[flat|nested] 23+ messages in thread
* linux-next: manual merge of the kvm-arm tree with Linus' tree
@ 2017-04-10  4:02 Stephen Rothwell
  2017-04-10  8:02 ` Christoffer Dall
  0 siblings, 1 reply; 23+ messages in thread
From: Stephen Rothwell @ 2017-04-10  4:02 UTC (permalink / raw)
  To: Christoffer Dall, Marc Zyngier
  Cc: Linux-Next Mailing List, Linux Kernel Mailing List

Hi all,

Today's linux-next merge of the kvm-arm tree got conflicts in:

  virt/kvm/arm/vgic/vgic-v2.c
  virt/kvm/arm/vgic/vgic.h

between commit:

  5b0d2cc28058 ("KVM: arm64: Ensure LRs are clear when they should be")

from Linus' tree and commits:

  328e56647944 ("KVM: arm/arm64: vgic: Defer touching GICH_VMCR to vcpu_load/put")
  af0614991ab6 ("KVM: arm/arm64: vgic: Get rid of unnecessary process_maintenance operation")

from the kvm-arm 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 virt/kvm/arm/vgic/vgic-v2.c
index b637d9c7afe3,025b57d5787e..000000000000
--- a/virt/kvm/arm/vgic/vgic-v2.c
+++ b/virt/kvm/arm/vgic/vgic-v2.c
@@@ -22,36 -22,7 +22,22 @@@
  
  #include "vgic.h"
  
- /*
-  * Call this function to convert a u64 value to an unsigned long * bitmask
-  * in a way that works on both 32-bit and 64-bit LE and BE platforms.
-  *
-  * Warning: Calling this function may modify *val.
-  */
- static unsigned long *u64_to_bitmask(u64 *val)
- {
- #if defined(CONFIG_CPU_BIG_ENDIAN) && BITS_PER_LONG == 32
- 	*val = (*val >> 32) | (*val << 32);
- #endif
- 	return (unsigned long *)val;
- }
- 
 +static inline void vgic_v2_write_lr(int lr, u32 val)
 +{
 +	void __iomem *base = kvm_vgic_global_state.vctrl_base;
 +
 +	writel_relaxed(val, base + GICH_LR0 + (lr * 4));
 +}
 +
 +void vgic_v2_init_lrs(void)
 +{
 +	int i;
 +
 +	for (i = 0; i < kvm_vgic_global_state.nr_lr; i++)
 +		vgic_v2_write_lr(i, 0);
 +}
 +
- void vgic_v2_process_maintenance(struct kvm_vcpu *vcpu)
+ void vgic_v2_set_underflow(struct kvm_vcpu *vcpu)
  {
  	struct vgic_v2_cpu_if *cpuif = &vcpu->arch.vgic_cpu.vgic_v2;
  
@@@ -206,10 -160,10 +175,10 @@@ void vgic_v2_set_vmcr(struct kvm_vcpu *
  		GICH_VMCR_ALIAS_BINPOINT_MASK;
  	vmcr |= (vmcrp->bpr << GICH_VMCR_BINPOINT_SHIFT) &
  		GICH_VMCR_BINPOINT_MASK;
 -	vmcr |= (vmcrp->pmr << GICH_VMCR_PRIMASK_SHIFT) &
 -		GICH_VMCR_PRIMASK_MASK;
 +	vmcr |= ((vmcrp->pmr >> GICV_PMR_PRIORITY_SHIFT) <<
 +		 GICH_VMCR_PRIMASK_SHIFT) & GICH_VMCR_PRIMASK_MASK;
  
- 	vcpu->arch.vgic_cpu.vgic_v2.vgic_vmcr = vmcr;
+ 	cpu_if->vgic_vmcr = vmcr;
  }
  
  void vgic_v2_get_vmcr(struct kvm_vcpu *vcpu, struct vgic_vmcr *vmcrp)
diff --cc virt/kvm/arm/vgic/vgic.h
index 6cf557e9f718,44445dac0835..000000000000
--- a/virt/kvm/arm/vgic/vgic.h
+++ b/virt/kvm/arm/vgic/vgic.h
@@@ -137,7 -129,8 +136,9 @@@ int vgic_v2_map_resources(struct kvm *k
  int vgic_register_dist_iodev(struct kvm *kvm, gpa_t dist_base_address,
  			     enum vgic_type);
  
 +void vgic_v2_init_lrs(void);
+ void vgic_v2_load(struct kvm_vcpu *vcpu);
+ void vgic_v2_put(struct kvm_vcpu *vcpu);
  
  static inline void vgic_get_irq_kref(struct vgic_irq *irq)
  {

^ permalink raw reply	[flat|nested] 23+ messages in thread
* linux-next: manual merge of the kvm-arm tree with Linus' tree
@ 2014-10-17  1:47 Stephen Rothwell
  0 siblings, 0 replies; 23+ messages in thread
From: Stephen Rothwell @ 2014-10-17  1:47 UTC (permalink / raw)
  To: Christoffer Dall, Marc Zyngier; +Cc: linux-next, linux-kernel

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

Hi all,

Today's linux-next merge of the kvm-arm tree got a conflict in
virt/kvm/arm/vgic-v2.c between commit 1f2bb4acc125 ("arm/arm64: KVM:
Fix unaligned access bug on gicv2 access") from Linus' tree and commit
2df36a5dd679 ("arm/arm64: KVM: Fix BE accesses to GICv2 EISR and ELRSR
regs") from the kvm-arm tree.

I fixed it up (since I don't know any better, I just used the kvm-arm
tree version) and can carry the fix as necessary (no action is
required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 23+ messages in thread
* linux-next: manual merge of the kvm-arm tree with Linus' tree
@ 2014-07-31  6:30 Stephen Rothwell
  2014-07-31 12:10 ` Marc Zyngier
       [not found] ` <CAEDV+gJ1oSPzgZMO=kdFDNPnzy-EOHGuLxHqTB8KO6d_8yPrxQ@mail.gmail.com>
  0 siblings, 2 replies; 23+ messages in thread
From: Stephen Rothwell @ 2014-07-31  6:30 UTC (permalink / raw)
  To: Christoffer Dall, Marc Zyngier; +Cc: linux-next, linux-kernel, Will Deacon

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

Hi all,

Today's linux-next merge of the kvm-arm tree got a conflict in
virt/kvm/arm/vgic.c between commit 63afbe7a0ac1 ("kvm: arm64: vgic: fix
hyp panic with 64k pages on juno platform") from Linus' tree and commit
8f186d522c69 ("KVM: ARM: vgic: split GICv2 backend from the main vgic
code") and others from the kvm-arm tree.

I fixed it up (the latter extensively rewrites the function, so I just
used that) and can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2018-01-03  9:50 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-18  3:41 linux-next: manual merge of the kvm-arm tree with Linus' tree Stephen Rothwell
2015-03-18  7:55 ` Christoffer Dall
2015-04-07 16:20   ` Paolo Bonzini
2015-04-08  8:15     ` Marc Zyngier
2015-04-08 10:57       ` Christoffer Dall
2015-04-16 19:10     ` Christoffer Dall
2015-04-16 19:39       ` Paolo Bonzini
2015-04-16 20:16         ` Christoffer Dall
  -- strict thread matches above, loose matches on Subject: below --
2018-01-03  2:38 Stephen Rothwell
2018-01-03  9:50 ` Christoffer Dall
2017-11-06  2:56 Stephen Rothwell
2017-11-06  2:52 Stephen Rothwell
2017-04-10  4:02 Stephen Rothwell
2017-04-10  8:02 ` Christoffer Dall
2014-10-17  1:47 Stephen Rothwell
2014-07-31  6:30 Stephen Rothwell
2014-07-31 12:10 ` Marc Zyngier
     [not found] ` <CAEDV+gJ1oSPzgZMO=kdFDNPnzy-EOHGuLxHqTB8KO6d_8yPrxQ@mail.gmail.com>
2014-07-31 12:15   ` Marc Zyngier
2014-07-31 14:23     ` Christoffer Dall
2014-07-31 14:30       ` Marc Zyngier
2014-08-01  5:21       ` Stephen Rothwell
2014-07-31 12:17   ` Stephen Rothwell
2014-07-31 12:41     ` Stephen Rothwell

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