qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4
@ 2015-07-09  9:17 James Hogan
  2015-07-09  9:17 ` [Qemu-devel] [PATCH for 2.4 1/2] tcg/mips: Fix build error from merged memop+mmu_idx parameter James Hogan
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: James Hogan @ 2015-07-09  9:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, James Hogan, kvm, Paolo Bonzini, Leon Alrae,
	Aurelien Jarno, Richard Henderson

These two patches fix build errors for the MIPS TCG backend and MIPS
KVM.

Please could they be applied for v2.4.

James Hogan (2):
  tcg/mips: Fix build error from merged memop+mmu_idx parameter
  mips/kvm: Sync with newer MIPS KVM headers

 target-mips/kvm.c     | 15 ++-------------
 tcg/mips/tcg-target.c |  4 ++--
 2 files changed, 4 insertions(+), 15 deletions(-)

Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Peter Maydell <peter.maydell@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: kvm@vger.kernel.org
-- 
2.3.6

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

* [Qemu-devel] [PATCH for 2.4 1/2] tcg/mips: Fix build error from merged memop+mmu_idx parameter
  2015-07-09  9:17 [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4 James Hogan
@ 2015-07-09  9:17 ` James Hogan
  2015-07-09 13:58   ` Aurelien Jarno
  2015-07-09  9:17 ` [Qemu-devel] [PATCH for 2.4 2/2] mips/kvm: Sync with newer MIPS KVM headers James Hogan
  2015-07-09 11:52 ` [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4 Leon Alrae
  2 siblings, 1 reply; 7+ messages in thread
From: James Hogan @ 2015-07-09  9:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, James Hogan, Leon Alrae, Aurelien Jarno,
	Richard Henderson

Commit 3972ef6f830d ("tcg: Push merged memop+mmu_idx parameter to
softmmu routines") caused the following build errors when building TCG
for MIPS:

In file included from tcg/tcg.c:258:0:
tcg/mips/tcg-target.c In function ‘tcg_out_qemu_ld_slow_path’:
tcg/mips/tcg-target.c:1015:22: error: ‘lb’ undeclared (first use in this function)
tcg/mips/tcg-target.c In function ‘tcg_out_qemu_st_slow_path’:
tcg/mips/tcg-target.c:1058:22: error: ‘lb’ undeclared (first use in this function)

It looks like lb was meant to refer to the TCGLabelQemuLdst *l
parameter, so fix both references to lb to refer to just l.

Fixes: 3972ef6f830d ("tcg: Push merged memop+mmu_idx parameter to softmmu routines")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Peter Maydell <peter.maydell@linaro.org>
---
 tcg/mips/tcg-target.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c
index f643eca3df45..668029977c1a 100644
--- a/tcg/mips/tcg-target.c
+++ b/tcg/mips/tcg-target.c
@@ -1012,7 +1012,7 @@ static void add_qemu_ldst_label(TCGContext *s, int is_ld, TCGMemOpIdx oi,
 
 static void tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *l)
 {
-    TCGMemOpIdx oi = lb->oi;
+    TCGMemOpIdx oi = l->oi;
     TCGMemOp opc = get_memop(oi);
     TCGReg v0;
     int i;
@@ -1055,7 +1055,7 @@ static void tcg_out_qemu_ld_slow_path(TCGContext *s, TCGLabelQemuLdst *l)
 
 static void tcg_out_qemu_st_slow_path(TCGContext *s, TCGLabelQemuLdst *l)
 {
-    TCGMemOpIdx oi = lb->oi;
+    TCGMemOpIdx oi = l->oi;
     TCGMemOp opc = get_memop(oi);
     TCGMemOp s_bits = opc & MO_SIZE;
     int i;
-- 
2.3.6

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

* [Qemu-devel] [PATCH for 2.4 2/2] mips/kvm: Sync with newer MIPS KVM headers
  2015-07-09  9:17 [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4 James Hogan
  2015-07-09  9:17 ` [Qemu-devel] [PATCH for 2.4 1/2] tcg/mips: Fix build error from merged memop+mmu_idx parameter James Hogan
@ 2015-07-09  9:17 ` James Hogan
  2015-07-09 11:52 ` [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4 Leon Alrae
  2 siblings, 0 replies; 7+ messages in thread
From: James Hogan @ 2015-07-09  9:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, James Hogan, Leon Alrae, kvm, Aurelien Jarno

The KVM_REG_MIPS_COUNT_* definitions are now included in
linux-headers/asm-mips/kvm.h since commit b061808d39fa ("linux-headers:
update linux headers to kvm/next"), therefore the duplicate definitions
in target-mips/kvm.c can now be dropped (the definitions were tweaked
slightly in commit 7a52ce8a1607 ("linux-headers: update") which
triggered the following build warnings turned errors):

target-mips/kvm.c:232:0: error: "KVM_REG_MIPS_COUNT_CTL" redefined [-Werror]
linux-headers/asm/kvm.h:129:0: note: this is the location of the previous definition
target-mips/kvm.c:236:0: error: "KVM_REG_MIPS_COUNT_RESUME" redefined [-Werror]
linux-headers/asm/kvm.h:141:0: note: this is the location of the previous definition
target-mips/kvm.c:239:0: error: "KVM_REG_MIPS_COUNT_HZ" redefined [-Werror]
linux-headers/asm/kvm.h:147:0: note: this is the location of the previous definition

Also update the MIPS_C0_{32,64} macros to utilise definitions more
recently added to the asm-mips/kvm.h header.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Leon Alrae <leon.alrae@imgtec.com>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Cc: kvm@vger.kernel.org
---
 target-mips/kvm.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/target-mips/kvm.c b/target-mips/kvm.c
index 7d2293d93492..bd64a70bcda0 100644
--- a/target-mips/kvm.c
+++ b/target-mips/kvm.c
@@ -212,10 +212,10 @@ int kvm_mips_set_ipi_interrupt(MIPSCPU *cpu, int irq, int level)
 }
 
 #define MIPS_CP0_32(_R, _S)                                     \
-    (KVM_REG_MIPS | KVM_REG_SIZE_U32 | 0x10000 | (8 * (_R) + (_S)))
+    (KVM_REG_MIPS_CP0 | KVM_REG_SIZE_U32 | (8 * (_R) + (_S)))
 
 #define MIPS_CP0_64(_R, _S)                                     \
-    (KVM_REG_MIPS | KVM_REG_SIZE_U64 | 0x10000 | (8 * (_R) + (_S)))
+    (KVM_REG_MIPS_CP0 | KVM_REG_SIZE_U64 | (8 * (_R) + (_S)))
 
 #define KVM_REG_MIPS_CP0_INDEX          MIPS_CP0_32(0, 0)
 #define KVM_REG_MIPS_CP0_CONTEXT        MIPS_CP0_64(4, 0)
@@ -232,17 +232,6 @@ int kvm_mips_set_ipi_interrupt(MIPSCPU *cpu, int irq, int level)
 #define KVM_REG_MIPS_CP0_EPC            MIPS_CP0_64(14, 0)
 #define KVM_REG_MIPS_CP0_ERROREPC       MIPS_CP0_64(30, 0)
 
-/* CP0_Count control */
-#define KVM_REG_MIPS_COUNT_CTL          (KVM_REG_MIPS | KVM_REG_SIZE_U64 | \
-                                         0x20000 | 0)
-#define KVM_REG_MIPS_COUNT_CTL_DC       0x00000001      /* master disable */
-/* CP0_Count resume monotonic nanoseconds */
-#define KVM_REG_MIPS_COUNT_RESUME       (KVM_REG_MIPS | KVM_REG_SIZE_U64 | \
-                                         0x20000 | 1)
-/* CP0_Count rate in Hz */
-#define KVM_REG_MIPS_COUNT_HZ           (KVM_REG_MIPS | KVM_REG_SIZE_U64 | \
-                                         0x20000 | 2)
-
 static inline int kvm_mips_put_one_reg(CPUState *cs, uint64_t reg_id,
                                        int32_t *addr)
 {
-- 
2.3.6

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

* Re: [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4
  2015-07-09  9:17 [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4 James Hogan
  2015-07-09  9:17 ` [Qemu-devel] [PATCH for 2.4 1/2] tcg/mips: Fix build error from merged memop+mmu_idx parameter James Hogan
  2015-07-09  9:17 ` [Qemu-devel] [PATCH for 2.4 2/2] mips/kvm: Sync with newer MIPS KVM headers James Hogan
@ 2015-07-09 11:52 ` Leon Alrae
  2015-07-09 13:59   ` Peter Maydell
  2 siblings, 1 reply; 7+ messages in thread
From: Leon Alrae @ 2015-07-09 11:52 UTC (permalink / raw)
  To: James Hogan, qemu-devel
  Cc: Peter Maydell, Paolo Bonzini, kvm, Aurelien Jarno,
	Richard Henderson

On 09/07/2015 10:17, James Hogan wrote:
> These two patches fix build errors for the MIPS TCG backend and MIPS
> KVM.
> 
> Please could they be applied for v2.4.
> 
> James Hogan (2):
>   tcg/mips: Fix build error from merged memop+mmu_idx parameter
>   mips/kvm: Sync with newer MIPS KVM headers
> 
>  target-mips/kvm.c     | 15 ++-------------
>  tcg/mips/tcg-target.c |  4 ++--
>  2 files changed, 4 insertions(+), 15 deletions(-)

Reviewed-by: Leon Alrae <leon.alrae@imgtec.com>

Peter, since these are build fixes, could they be squeezed into rc0?

Thanks,
Leon

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

* Re: [Qemu-devel] [PATCH for 2.4 1/2] tcg/mips: Fix build error from merged memop+mmu_idx parameter
  2015-07-09  9:17 ` [Qemu-devel] [PATCH for 2.4 1/2] tcg/mips: Fix build error from merged memop+mmu_idx parameter James Hogan
@ 2015-07-09 13:58   ` Aurelien Jarno
  0 siblings, 0 replies; 7+ messages in thread
From: Aurelien Jarno @ 2015-07-09 13:58 UTC (permalink / raw)
  To: James Hogan; +Cc: Peter Maydell, Leon Alrae, qemu-devel, Richard Henderson

On 2015-07-09 10:17, James Hogan wrote:
> Commit 3972ef6f830d ("tcg: Push merged memop+mmu_idx parameter to
> softmmu routines") caused the following build errors when building TCG
> for MIPS:
> 
> In file included from tcg/tcg.c:258:0:
> tcg/mips/tcg-target.c In function ‘tcg_out_qemu_ld_slow_path’:
> tcg/mips/tcg-target.c:1015:22: error: ‘lb’ undeclared (first use in this function)
> tcg/mips/tcg-target.c In function ‘tcg_out_qemu_st_slow_path’:
> tcg/mips/tcg-target.c:1058:22: error: ‘lb’ undeclared (first use in this function)
> 
> It looks like lb was meant to refer to the TCGLabelQemuLdst *l
> parameter, so fix both references to lb to refer to just l.
> 
> Fixes: 3972ef6f830d ("tcg: Push merged memop+mmu_idx parameter to softmmu routines")
> Signed-off-by: James Hogan <james.hogan@imgtec.com>
> Cc: Aurelien Jarno <aurelien@aurel32.net>
> Cc: Leon Alrae <leon.alrae@imgtec.com>
> Cc: Richard Henderson <rth@twiddle.net>
> Cc: Peter Maydell <peter.maydell@linaro.org>
> ---
>  tcg/mips/tcg-target.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Aurelien Jarno <aurelien@aurel32.net>

I was planning to test various hosts after the rc0 release, but it seems
you have been faster. Unfortunately we have more regressions, I am going
to send some more mails.

I am fine if it can be merged directly.

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

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

* Re: [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4
  2015-07-09 11:52 ` [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4 Leon Alrae
@ 2015-07-09 13:59   ` Peter Maydell
  2015-07-09 14:28     ` James Hogan
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2015-07-09 13:59 UTC (permalink / raw)
  To: Leon Alrae
  Cc: James Hogan, kvm-devel, QEMU Developers, Paolo Bonzini,
	Aurelien Jarno, Richard Henderson

On 9 July 2015 at 12:52, Leon Alrae <leon.alrae@imgtec.com> wrote:
> On 09/07/2015 10:17, James Hogan wrote:
>> These two patches fix build errors for the MIPS TCG backend and MIPS
>> KVM.
>>
>> Please could they be applied for v2.4.
>>
>> James Hogan (2):
>>   tcg/mips: Fix build error from merged memop+mmu_idx parameter
>>   mips/kvm: Sync with newer MIPS KVM headers
>>
>>  target-mips/kvm.c     | 15 ++-------------
>>  tcg/mips/tcg-target.c |  4 ++--
>>  2 files changed, 4 insertions(+), 15 deletions(-)
>
> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com>
>
> Peter, since these are build fixes, could they be squeezed into rc0?

Applied to master, thanks.

-- PMM

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

* Re: [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4
  2015-07-09 13:59   ` Peter Maydell
@ 2015-07-09 14:28     ` James Hogan
  0 siblings, 0 replies; 7+ messages in thread
From: James Hogan @ 2015-07-09 14:28 UTC (permalink / raw)
  To: Peter Maydell, Leon Alrae
  Cc: Paolo Bonzini, kvm-devel, QEMU Developers, Aurelien Jarno,
	Richard Henderson

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

On 09/07/15 14:59, Peter Maydell wrote:
> On 9 July 2015 at 12:52, Leon Alrae <leon.alrae@imgtec.com> wrote:
>> On 09/07/2015 10:17, James Hogan wrote:
>>> These two patches fix build errors for the MIPS TCG backend and MIPS
>>> KVM.
>>>
>>> Please could they be applied for v2.4.
>>>
>>> James Hogan (2):
>>>   tcg/mips: Fix build error from merged memop+mmu_idx parameter
>>>   mips/kvm: Sync with newer MIPS KVM headers
>>>
>>>  target-mips/kvm.c     | 15 ++-------------
>>>  tcg/mips/tcg-target.c |  4 ++--
>>>  2 files changed, 4 insertions(+), 15 deletions(-)
>>
>> Reviewed-by: Leon Alrae <leon.alrae@imgtec.com>
>>
>> Peter, since these are build fixes, could they be squeezed into rc0?
> 
> Applied to master, thanks.

Thanks guys!

James


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

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

end of thread, other threads:[~2015-07-09 14:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-09  9:17 [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4 James Hogan
2015-07-09  9:17 ` [Qemu-devel] [PATCH for 2.4 1/2] tcg/mips: Fix build error from merged memop+mmu_idx parameter James Hogan
2015-07-09 13:58   ` Aurelien Jarno
2015-07-09  9:17 ` [Qemu-devel] [PATCH for 2.4 2/2] mips/kvm: Sync with newer MIPS KVM headers James Hogan
2015-07-09 11:52 ` [Qemu-devel] [PATCH for 2.4 0/2] MIPS build fixes for v2.4 Leon Alrae
2015-07-09 13:59   ` Peter Maydell
2015-07-09 14:28     ` James Hogan

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