qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/4] ppc-for-2.9 queue 20170314
@ 2017-03-14  4:26 David Gibson
  2017-03-14  4:26 ` [Qemu-devel] [PULL 1/4] target/ppc: Fix wrong number of UAMR register David Gibson
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: David Gibson @ 2017-03-14  4:26 UTC (permalink / raw)
  To: peter.maydell
  Cc: agraf, qemu-ppc, qemu-devel, thuth, lvivier, mdroth, pbonzini,
	aik, David Gibson

The following changes since commit 5bac3c39c82e149515c10643acafd1d292433775:

  Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2017-03-13 15:08:01 +0000)

are available in the git repository at:

  git://github.com/dgibson/qemu.git tags/ppc-for-2.9-20170314

for you to fetch changes up to 28df75d8d1aebdb09a2cc511c0b97690eac0b7a7:

  dtc: Update submodule to avoid build errors (2017-03-14 12:24:29 +1100)

----------------------------------------------------------------
ppc patch queue for 2017-03-14

This set has a handful og bugfixes to go into qemu-2.9.  This includes
an update to the dtc/libfdt submodule which will fix the build errors
seen on some distributions.

----------------------------------------------------------------
David Gibson (2):
      pseries: Don't expose PCIe extended config space on older machine types
      dtc: Update submodule to avoid build errors

Nikunj A Dadhania (1):
      target/ppc: fix cpu_ov setting for 32-bit

Thomas Huth (1):
      target/ppc: Fix wrong number of UAMR register

 dtc                         | 2 +-
 hw/ppc/spapr.c              | 9 +++++++--
 hw/ppc/spapr_pci.c          | 4 +++-
 include/hw/pci-host/spapr.h | 2 ++
 target/ppc/cpu.h            | 2 +-
 target/ppc/translate.c      | 2 +-
 6 files changed, 15 insertions(+), 6 deletions(-)

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

* [Qemu-devel] [PULL 1/4] target/ppc: Fix wrong number of UAMR register
  2017-03-14  4:26 [Qemu-devel] [PULL 0/4] ppc-for-2.9 queue 20170314 David Gibson
@ 2017-03-14  4:26 ` David Gibson
  2017-03-14  4:26 ` [Qemu-devel] [PULL 2/4] target/ppc: fix cpu_ov setting for 32-bit David Gibson
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: David Gibson @ 2017-03-14  4:26 UTC (permalink / raw)
  To: peter.maydell
  Cc: agraf, qemu-ppc, qemu-devel, thuth, lvivier, mdroth, pbonzini,
	aik, David Gibson

From: Thomas Huth <thuth@redhat.com>

The SPR UAMR has the number 13, and not 12. (Fortunately it seems like
Linux is not using this register yet - only the privileged version with
number 29 ... that's why nobody noticed this problem yet)

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 target/ppc/cpu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
index 7c4a1f5..5ee33b3 100644
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -1408,7 +1408,7 @@ int ppc_compat_max_threads(PowerPCCPU *cpu);
 #define SPR_601_UDECR         (0x006)
 #define SPR_LR                (0x008)
 #define SPR_CTR               (0x009)
-#define SPR_UAMR              (0x00C)
+#define SPR_UAMR              (0x00D)
 #define SPR_DSCR              (0x011)
 #define SPR_DSISR             (0x012)
 #define SPR_DAR               (0x013) /* DAE for PowerPC 601 */
-- 
2.9.3

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

* [Qemu-devel] [PULL 2/4] target/ppc: fix cpu_ov setting for 32-bit
  2017-03-14  4:26 [Qemu-devel] [PULL 0/4] ppc-for-2.9 queue 20170314 David Gibson
  2017-03-14  4:26 ` [Qemu-devel] [PULL 1/4] target/ppc: Fix wrong number of UAMR register David Gibson
@ 2017-03-14  4:26 ` David Gibson
  2017-03-14  4:26 ` [Qemu-devel] [PULL 3/4] pseries: Don't expose PCIe extended config space on older machine types David Gibson
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: David Gibson @ 2017-03-14  4:26 UTC (permalink / raw)
  To: peter.maydell
  Cc: agraf, qemu-ppc, qemu-devel, thuth, lvivier, mdroth, pbonzini,
	aik, Nikunj A Dadhania, David Gibson

From: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>

A bug was introduced in following commit:

    dc0ad84 target/ppc: update overflow flags for add/sub

As for 32-bit ppc target extracting bit 63 for overflow is not correct.
Made it dependent on TARGET_LOG_BITS. This had broken booting MacOS
9.2.1 image

Reported-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
 target/ppc/translate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index b6abc60..f40b5a1 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -818,7 +818,7 @@ static inline void gen_op_arith_compute_ov(DisasContext *ctx, TCGv arg0,
         if (is_isa300(ctx)) {
             tcg_gen_extract_tl(cpu_ov32, cpu_ov, 31, 1);
         }
-        tcg_gen_extract_tl(cpu_ov, cpu_ov, 63, 1);
+        tcg_gen_extract_tl(cpu_ov, cpu_ov, TARGET_LONG_BITS - 1, 1);
     }
     tcg_gen_or_tl(cpu_so, cpu_so, cpu_ov);
 }
-- 
2.9.3

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

* [Qemu-devel] [PULL 3/4] pseries: Don't expose PCIe extended config space on older machine types
  2017-03-14  4:26 [Qemu-devel] [PULL 0/4] ppc-for-2.9 queue 20170314 David Gibson
  2017-03-14  4:26 ` [Qemu-devel] [PULL 1/4] target/ppc: Fix wrong number of UAMR register David Gibson
  2017-03-14  4:26 ` [Qemu-devel] [PULL 2/4] target/ppc: fix cpu_ov setting for 32-bit David Gibson
@ 2017-03-14  4:26 ` David Gibson
  2017-03-14  4:26 ` [Qemu-devel] [PULL 4/4] dtc: Update submodule to avoid build errors David Gibson
  2017-03-14 11:15 ` [Qemu-devel] [PULL 0/4] ppc-for-2.9 queue 20170314 Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: David Gibson @ 2017-03-14  4:26 UTC (permalink / raw)
  To: peter.maydell
  Cc: agraf, qemu-ppc, qemu-devel, thuth, lvivier, mdroth, pbonzini,
	aik, David Gibson

bb9986452 "spapr_pci: Advertise access to PCIe extended config space"
allowed guests to access the extended config space of PCI Express devices
via the PAPR interfaces, even though the paravirtualized bus mostly acts
like plain PCI.

However, that patch enabled access unconditionally, including for existing
machine types, which is an unwise change in behaviour.  This patch limits
the change to pseries-2.9 (and later) machine types.

Suggested-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 hw/ppc/spapr.c              | 9 +++++++--
 hw/ppc/spapr_pci.c          | 4 +++-
 include/hw/pci-host/spapr.h | 2 ++
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index c3bb991..6ee566d 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -3163,8 +3163,13 @@ DEFINE_SPAPR_MACHINE(2_9, "2.9", true);
 /*
  * pseries-2.8
  */
-#define SPAPR_COMPAT_2_8                            \
-    HW_COMPAT_2_8
+#define SPAPR_COMPAT_2_8                                        \
+    HW_COMPAT_2_8                                               \
+    {                                                           \
+        .driver   = TYPE_SPAPR_PCI_HOST_BRIDGE,                 \
+        .property = "pcie-extended-configuration-space",        \
+        .value    = "off",                                      \
+    },
 
 static void spapr_machine_2_8_instance_options(MachineState *machine)
 {
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 919d3c2..98c52e4 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -1321,7 +1321,7 @@ static int spapr_populate_pci_child_dt(PCIDevice *dev, void *fdt, int offset,
     _FDT(fdt_setprop(fdt, offset, "assigned-addresses",
                      (uint8_t *)rp.assigned, rp.assigned_len));
 
-    if (pci_is_express(dev)) {
+    if (sphb->pcie_ecs && pci_is_express(dev)) {
         _FDT(fdt_setprop_cell(fdt, offset, "ibm,pci-config-space-type", 0x1));
     }
 
@@ -1858,6 +1858,8 @@ static Property spapr_phb_properties[] = {
     DEFINE_PROP_UINT32("numa_node", sPAPRPHBState, numa_node, -1),
     DEFINE_PROP_BOOL("pre-2.8-migration", sPAPRPHBState,
                      pre_2_8_migration, false),
+    DEFINE_PROP_BOOL("pcie-extended-configuration-space", sPAPRPHBState,
+                     pcie_ecs, true),
     DEFINE_PROP_END_OF_LIST(),
 };
 
diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
index dfa7614..1c2e970 100644
--- a/include/hw/pci-host/spapr.h
+++ b/include/hw/pci-host/spapr.h
@@ -80,6 +80,8 @@ struct sPAPRPHBState {
 
     uint32_t numa_node;
 
+    bool pcie_ecs; /* Allow access to PCIe extended config space? */
+
     /* Fields for migration compatibility hacks */
     bool pre_2_8_migration;
     uint32_t mig_liobn;
-- 
2.9.3

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

* [Qemu-devel] [PULL 4/4] dtc: Update submodule to avoid build errors
  2017-03-14  4:26 [Qemu-devel] [PULL 0/4] ppc-for-2.9 queue 20170314 David Gibson
                   ` (2 preceding siblings ...)
  2017-03-14  4:26 ` [Qemu-devel] [PULL 3/4] pseries: Don't expose PCIe extended config space on older machine types David Gibson
@ 2017-03-14  4:26 ` David Gibson
  2017-03-14 11:15 ` [Qemu-devel] [PULL 0/4] ppc-for-2.9 queue 20170314 Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: David Gibson @ 2017-03-14  4:26 UTC (permalink / raw)
  To: peter.maydell
  Cc: agraf, qemu-ppc, qemu-devel, thuth, lvivier, mdroth, pbonzini,
	aik, David Gibson

The currently included version of the dtc/libfdt submodule has some build
errors on certain distributions (including RHEL7).  This is due to some
poorly named macros in libfdt.h; they're designed for use with the sparse
static checker, but use reserved names which conflict with some symbols in
the standard headers.

That's been corrected in upstream dtc, this updates the qemu submodule to
bring the fix to qemu.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
---
 dtc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dtc b/dtc
index fa8bc7f..558cd81 160000
--- a/dtc
+++ b/dtc
@@ -1 +1 @@
-Subproject commit fa8bc7f928ac25f23532afc8beb2073efc8fb063
+Subproject commit 558cd81bdd432769b59bff01240c44f82cfb1a9d
-- 
2.9.3

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

* Re: [Qemu-devel] [PULL 0/4] ppc-for-2.9 queue 20170314
  2017-03-14  4:26 [Qemu-devel] [PULL 0/4] ppc-for-2.9 queue 20170314 David Gibson
                   ` (3 preceding siblings ...)
  2017-03-14  4:26 ` [Qemu-devel] [PULL 4/4] dtc: Update submodule to avoid build errors David Gibson
@ 2017-03-14 11:15 ` Peter Maydell
  4 siblings, 0 replies; 6+ messages in thread
From: Peter Maydell @ 2017-03-14 11:15 UTC (permalink / raw)
  To: David Gibson
  Cc: Alexander Graf, qemu-ppc@nongnu.org, QEMU Developers, Thomas Huth,
	Laurent Vivier, Michael Roth, Paolo Bonzini, Alexey Kardashevskiy

On 14 March 2017 at 05:26, David Gibson <david@gibson.dropbear.id.au> wrote:
> The following changes since commit 5bac3c39c82e149515c10643acafd1d292433775:
>
>   Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2017-03-13 15:08:01 +0000)
>
> are available in the git repository at:
>
>   git://github.com/dgibson/qemu.git tags/ppc-for-2.9-20170314
>
> for you to fetch changes up to 28df75d8d1aebdb09a2cc511c0b97690eac0b7a7:
>
>   dtc: Update submodule to avoid build errors (2017-03-14 12:24:29 +1100)
>
> ----------------------------------------------------------------
> ppc patch queue for 2017-03-14
>
> This set has a handful og bugfixes to go into qemu-2.9.  This includes
> an update to the dtc/libfdt submodule which will fix the build errors
> seen on some distributions.
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

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

end of thread, other threads:[~2017-03-14 11:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-14  4:26 [Qemu-devel] [PULL 0/4] ppc-for-2.9 queue 20170314 David Gibson
2017-03-14  4:26 ` [Qemu-devel] [PULL 1/4] target/ppc: Fix wrong number of UAMR register David Gibson
2017-03-14  4:26 ` [Qemu-devel] [PULL 2/4] target/ppc: fix cpu_ov setting for 32-bit David Gibson
2017-03-14  4:26 ` [Qemu-devel] [PULL 3/4] pseries: Don't expose PCIe extended config space on older machine types David Gibson
2017-03-14  4:26 ` [Qemu-devel] [PULL 4/4] dtc: Update submodule to avoid build errors David Gibson
2017-03-14 11:15 ` [Qemu-devel] [PULL 0/4] ppc-for-2.9 queue 20170314 Peter Maydell

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