Skip to content
Snippets Groups Projects
  1. Nov 07, 2023
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-xenfv.for-upstream-20231107' of... · 3e34860a
      Stefan Hajnoczi authored
      Merge tag 'pull-xenfv.for-upstream-20231107' of git://git.infradead.org/users/dwmw2/qemu into staging
      
      Xen PV guest support for 8.2
      
      Add Xen PV console and network support, the former of which enables the
      Xen "PV shim" to be used to support PV guests.
      
      Also clean up the block support and make it work when the user passes
      just 'drive file=IMAGE,if=xen' on the command line.
      
      Update the documentation to reflect all of these, taking the opportunity
      to simplify what it says about q35 by making unplug work for AHCI.
      
      Ignore the VCPU_SSHOTTMR_future timer flag, and advertise the 'fixed'
      per-vCPU upcall vector support, as newer upstream Xen do.
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQJIBAABCAAyFiEEvgfZ/VSAmrLEsP9fY3Ys2mfi81kFAmVJ/7EUHGR3bXcyQGlu
      # ZnJhZGVhZC5vcmcACgkQY3Ys2mfi81k+/xAAswivVR4+nwz3wTSN7EboGogS3hy+
      # ZsTpvbJnfprGQJAK8vv8OP4eunaCJkO/dy3M/33Dh270msmV6I/1ki0E1RIPG45D
      # n5wKM1Zxk0ABvjIgdp3xiLwITTdruJ+k9aqV8U9quhjgNFdOa7yjBOG8MD32GEPZ
      # KHbavJ++huOu7+DZHJRNRq4gI/fREIULoPGHVg7WuEiRDYokOOmMROXqmTHTaUkV
      # yFhkofzWxlpYhh7qRQx6/A80CSf7xwCof8krjdMCOYj3XGzYVZND0z5ZfHQYEwqt
      # fowhargA8gH4V3d21S/MWCaZ+QrswFXZhcnl5wuGgWakV4ChvFETKs+fz2mODWUx
      # 2T13trqeFJ5ElTrSpH1iWCoSEy6KCeLecvx7c/6HPSkDYQ3w5q8dXPpqgEtXY24S
      # Wcmw4PkQ+HrLX7wbSU7QLyTZjvCQLFZ3Sb0uTf2zwsJZyeCCiT2lqAaogoMm6Kg0
      # m/jG1JzE+9AC3j0Upp1lS3EK1qdxIuLdBuIcaEBEjy7Am+Y14PlZYoU2c751KbRF
      # kqnIOYMoijX0PJDomPqCQtYNE0mrtogo0AbcFFIu+4k25vGbkl7xS5p2du9qw2Rd
      # ++IdqQYzdzrUcIwmxocFQqFBJQ2dcbOGB1d7+VJ+A1Uj3yY2/DnFG5WqSaqS0KJi
      # ZhBdFs3OTlPnRoM=
      # =Dg79
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Tue 07 Nov 2023 17:13:21 HKT
      # gpg:                using RSA key BE07D9FD54809AB2C4B0FF5F63762CDA67E2F359
      # gpg:                issuer "dwmw2@infradead.org"
      # gpg: Good signature from "David Woodhouse <dwmw2@infradead.org>" [unknown]
      # gpg:                 aka "David Woodhouse <dwmw2@exim.org>" [unknown]
      # gpg:                 aka "David Woodhouse <david@woodhou.se>" [unknown]
      # gpg:                 aka "David Woodhouse <dwmw2@kernel.org>" [unknown]
      # gpg: WARNING: The key's User ID is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: BE07 D9FD 5480 9AB2 C4B0  FF5F 6376 2CDA 67E2 F359
      
      * tag 'pull-xenfv.for-upstream-20231107' of git://git.infradead.org/users/dwmw2/qemu
      
      :
        docs: update Xen-on-KVM documentation
        xen-platform: unplug AHCI disks
        hw/i386/pc: support '-nic' for xen-net-device
        hw/xen: update Xen PV NIC to XenDevice model
        hw/xen: only remove peers of PCI NICs on unplug
        hw/xen: add support for Xen primary console in emulated mode
        hw/xen: update Xen console to XenDevice model
        hw/xen: do not repeatedly try to create a failing backend device
        hw/xen: add get_frontend_path() method to XenDeviceClass
        hw/xen: automatically assign device index to block devices
        hw/xen: populate store frontend nodes with XenStore PFN/port
        i386/xen: advertise XEN_HVM_CPUID_UPCALL_VECTOR in CPUID
        include: update Xen public headers to Xen 4.17.2 release
        hw/xen: Clean up event channel 'type_val' handling to use union
        i386/xen: Ignore VCPU_SSHOTTMR_future flag in set_singleshot_timer()
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      3e34860a
    • David Woodhouse's avatar
      docs: update Xen-on-KVM documentation · cc9d10b9
      David Woodhouse authored
      
      Add notes about console and network support, and how to launch PV guests.
      Clean up the disk configuration examples now that that's simpler, and
      remove the comment about IDE unplug on q35/AHCI now that it's fixed.
      
      Update the -initrd option documentation to explain how to quote commas
      in module command lines, and reference it when documenting PV guests.
      
      Also update stale avocado test filename in MAINTAINERS.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      cc9d10b9
    • David Woodhouse's avatar
      xen-platform: unplug AHCI disks · a7304995
      David Woodhouse authored
      
      To support Xen guests using the Q35 chipset, the unplug protocol needs
      to also remove AHCI disks.
      
      Make pci_xen_ide_unplug() more generic, iterating over the children
      of the PCI device and destroying the "ide-hd" devices. That works the
      same for both AHCI and IDE, as does the detection of the primary disk
      as unit 0 on the bus named "ide.0".
      
      Then pci_xen_ide_unplug() can be used for both AHCI and IDE devices.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      a7304995
    • David Woodhouse's avatar
      hw/i386/pc: support '-nic' for xen-net-device · c10b4b3c
      David Woodhouse authored
      
      The default NIC creation seems a bit hackish to me. I don't understand
      why each platform has to call pci_nic_init_nofail() from a point in the
      code where it actually has a pointer to the PCI bus, and then we have
      the special cases for things like ne2k_isa.
      
      If qmp_device_add() can *find* the appropriate bus and instantiate
      the device on it, why can't we just do that from generic code for
      creating the default NICs too?
      
      But that isn't a yak I want to shave today. Add a xenbus field to the
      PCMachineState so that it can make its way from pc_basic_device_init()
      to pc_nic_init() and be handled as a special case like ne2k_isa is.
      
      Now we can launch emulated Xen guests with '-nic user'.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      c10b4b3c
    • David Woodhouse's avatar
      hw/xen: update Xen PV NIC to XenDevice model · 25967ff6
      David Woodhouse authored
      
      This allows us to use Xen PV networking with emulated Xen guests, and to
      add them on the command line or hotplug.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      25967ff6
    • David Woodhouse's avatar
      hw/xen: only remove peers of PCI NICs on unplug · 25511f3e
      David Woodhouse authored
      
      When the Xen guest asks to unplug *emulated* NICs, it's kind of unhelpful
      also to unplug the peer of the *Xen* PV NIC.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      25511f3e
    • David Woodhouse's avatar
      hw/xen: add support for Xen primary console in emulated mode · a72ccc7f
      David Woodhouse authored
      
      The primary console is special because the toolstack maps a page into
      the guest for its ring, and also allocates the guest-side event channel.
      The guest's grant table is even primed to export that page using a known
      grant ref#. Add support for all that in emulated mode, so that we can
      have a primary console.
      
      For reasons unclear, the backends running under real Xen don't just use
      a mapping of the well-known GNTTAB_RESERVED_CONSOLE grant ref (which
      would also be in the ring-ref node in XenStore). Instead, the toolstack
      sets the ring-ref node of the primary console to the GFN of the guest
      page. The backend is expected to handle that special case and map it
      with foreignmem operations instead.
      
      We don't have an implementation of foreignmem ops for emulated Xen mode,
      so just make it map GNTTAB_RESERVED_CONSOLE instead. This would probably
      work for real Xen too, but we can't work out how to make real Xen create
      a primary console of type "ioemu" to make QEMU drive it, so we can't
      test that; might as well leave it as it is for now under Xen.
      
      Now at last we can boot the Xen PV shim and run PV kernels in QEMU.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      a72ccc7f
    • David Woodhouse's avatar
      hw/xen: update Xen console to XenDevice model · 9b773746
      David Woodhouse authored
      
      This allows (non-primary) console devices to be created on the command
      line and hotplugged.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      9b773746
    • David Woodhouse's avatar
      hw/xen: do not repeatedly try to create a failing backend device · eb6ae7a6
      David Woodhouse authored
      
      If xen_backend_device_create() fails to instantiate a device, the XenBus
      code will just keep trying over and over again each time the bus is
      re-enumerated, as long as the backend appears online and in
      XenbusStateInitialising.
      
      The only thing which prevents the XenBus code from recreating duplicates
      of devices which already exist, is the fact that xen_device_realize()
      sets the backend state to XenbusStateInitWait. If the attempt to create
      the device doesn't get *that* far, that's when it will keep getting
      retried.
      
      My first thought was to handle errors by setting the backend state to
      XenbusStateClosed, but that doesn't work for XenConsole which wants to
      *ignore* any device of type != "ioemu" completely.
      
      So, make xen_backend_device_create() *keep* the XenBackendInstance for a
      failed device, and provide a new xen_backend_exists() function to allow
      xen_bus_type_enumerate() to check whether one already exists before
      creating a new one.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      eb6ae7a6
    • David Woodhouse's avatar
      hw/xen: add get_frontend_path() method to XenDeviceClass · 523b6b3a
      David Woodhouse authored
      
      The primary Xen console is special. The guest's side is set up for it by
      the toolstack automatically and not by the standard PV init sequence.
      
      Accordingly, its *frontend* doesn't appear in …/device/console/0 either;
      instead it appears under …/console in the guest's XenStore node.
      
      To allow the Xen console driver to override the frontend path for the
      primary console, add a method to the XenDeviceClass which can be used
      instead of the standard xen_device_get_frontend_path()
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      523b6b3a
    • David Woodhouse's avatar
      hw/xen: automatically assign device index to block devices · d3256f88
      David Woodhouse authored
      
      There's no need to force the user to assign a vdev. We can automatically
      assign one, starting at xvda and searching until we find the first disk
      name that's unused.
      
      This means we can now allow '-drive if=xen,file=xxx' to work without an
      explicit separate -driver argument, just like if=virtio.
      
      Rip out the legacy handling from the xenpv machine, which was scribbling
      over any disks configured by the toolstack, and didn't work with anything
      but raw images.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Acked-by: default avatarKevin Wolf <kwolf@redhat.com>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      d3256f88
    • David Woodhouse's avatar
      hw/xen: populate store frontend nodes with XenStore PFN/port · d388c9f5
      David Woodhouse authored
      
      This is kind of redundant since without being able to get these through
      some other method (HVMOP_get_param) the guest wouldn't be able to access
      XenStore in order to find them.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      d388c9f5
    • David Woodhouse's avatar
      i386/xen: advertise XEN_HVM_CPUID_UPCALL_VECTOR in CPUID · 8473607b
      David Woodhouse authored
      
      This will allow Linux guests (since v6.0) to use the per-vCPU upcall
      vector delivered as MSI through the local APIC.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      8473607b
    • David Woodhouse's avatar
      include: update Xen public headers to Xen 4.17.2 release · 8ac98aed
      David Woodhouse authored
      
      ... in order to advertise the XEN_HVM_CPUID_UPCALL_VECTOR feature,
      which will come in a subsequent commit.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Acked-by: default avatarPaul Durrant <paul@xen.org>
      8ac98aed
    • David Woodhouse's avatar
      hw/xen: Clean up event channel 'type_val' handling to use union · be155098
      David Woodhouse authored
      
      A previous implementation of this stuff used a 64-bit field for all of
      the port information (vcpu/type/type_val) and did atomic exchanges on
      them. When I implemented that in Qemu I regretted my life choices and
      just kept it simple with locking instead.
      
      So there's no need for the XenEvtchnPort to be so simplistic. We can
      use a union for the pirq/virq/interdomain information, which lets us
      keep a separate bit for the 'remote domain' in interdomain ports. A
      single bit is enough since the only possible targets are loopback or
      qemu itself.
      
      So now we can ditch PORT_INFO_TYPEVAL_REMOTE_QEMU and the horrid
      manual masking, although the in-memory representation is identical
      so there's no change in the saved state ABI.
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      be155098
    • David Woodhouse's avatar
      i386/xen: Ignore VCPU_SSHOTTMR_future flag in set_singleshot_timer() · 547c9757
      David Woodhouse authored
      Upstream Xen now ignores this flag¹, since the only guest kernel ever to
      use it was buggy.
      
      ¹ https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=19c6cbd909
      
      
      
      Signed-off-by: default avatarDavid Woodhouse <dwmw@amazon.co.uk>
      Reviewed-by: default avatarPaul Durrant <paul@xen.org>
      547c9757
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-pa-20231106' of https://gitlab.com/rth7680/qemu into staging · bb541a70
      Stefan Hajnoczi authored
      target/hppa: Implement PA2.0 instructions
      hw/hppa: Map astro chip 64-bit I/O mem
      hw/hppa: Turn on 64-bit cpu for C3700
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmVJqDEdHHJpY2hhcmQu
      # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV8n5Qf/R15CvXGMgjDJjoV2
      # ILMFM+Rpg17SR2yu060sEZ01R3iHdobeCcDB184K0RI9JLrpcBFar+PeF023o9fn
      # O9MnfIyL6/ggzaeIpQ9AD2uT0HJMU9hLFoyQqQvnhDHHcT34raL2+Zkrkb2vvauH
      # XET7awXN9xYCnY4ALrfcapzlrHqI77ahz0vReUWPxk7eGY2ez8dEOiFW2WLBmuMx
      # mAFAMrFQhq66GjoMDl8JiGHD/KBJQ9X4eUAEotS27lTCOYU0ryA6dWBGqBSTWCUa
      # smpxkeGQKOew+717HV1H4FdCRYG1Rgm7yFN423JULeew+T7DHvfe0K55vMIulx5I
      # g3oVZA==
      # =dxC7
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Tue 07 Nov 2023 11:00:01 HKT
      # gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
      # gpg:                issuer "richard.henderson@linaro.org"
      # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
      # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
      
      * tag 'pull-pa-20231106' of https://gitlab.com/rth7680/qemu
      
      : (85 commits)
        hw/hppa: Allow C3700 with 64-bit and B160L with 32-bit CPU only
        hw/hppa: Turn on 64-bit CPU for C3700 machine
        hw/pci-host/astro: Trigger CPU irq on CPU HPA in high memory
        hw/pci-host/astro: Map Astro chip into 64-bit I/O memory region
        target/hppa: Improve interrupt logging
        target/hppa: Update IIAOQ, IIASQ for pa2.0
        target/hppa: Create raise_exception_with_ior
        target/hppa: Add unwind_breg to CPUHPPAState
        target/hppa: Clear upper bits in mtctl for pa1.x
        target/hppa: Avoid async_safe_run_on_cpu on uniprocessor system
        target/hppa: Add pa2.0 cpu local tlb flushes
        target/hppa: Implement pa2.0 data prefetch instructions
        linux-user/hppa: Drop EXCP_DUMP from handled exceptions
        hw/hppa: Translate phys addresses for the cpu
        include/hw/elf: Remove truncating signed casts
        target/hppa: Return zero for r0 from load_gpr
        target/hppa: Precompute zero into DisasContext
        target/hppa: Fix interruption based on default PSW
        target/hppa: Implement PERMH
        target/hppa: Implement MIXH, MIXW
        ...
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      bb541a70
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-riscv-to-apply-20231107' of https://github.com/alistair23/qemu into staging · 8aba939e
      Stefan Hajnoczi authored
      Third RISC-V PR for 8.2
      
       * Rename ext_icboz to ext_zicboz
       * Rename ext_icbom to ext_zicbom
       * Rename ext_icsr to ext_zicsr
       * Rename ext_ifencei to ext_zifencei
       * Add RISC-V Virtual IRQs and IRQ filtering support
       * Change default linux-user cpu to 'max'
       * Update 'virt' machine core limit
       * Add query-cpu-model-expansion API
       * Rename epmp to smepmp and expose the extension
       * Clear pmp/smepmp bits on reset
       * Ignore pmp writes when RW=01
       * Support zicntr/zihpm flags and disable support
       * Correct CSR_MSECCFG operations
       * Update mail address for Weiwei Li
       * Update RISC-V vector crypto to ratified v1.0.0
       * Clear the Ibex/OpenTitan SPI interrupts even if disabled
       * Set the OpenTitan priv to 1.12.0
       * Support discontinuous PMU counters
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQIzBAABCAAdFiEEaukCtqfKh31tZZKWr3yVEwxTgBMFAmVJoOEACgkQr3yVEwxT
      # gBPwcw/5AXgSVu521IHpobofq4Skc2rpO9P0Hep3IniBuS+5+h2XM3fwWNBaeeGj
      # LZgdXDrCfcCnPuFh2I5j1D885xJDncDF4LET9EFtxK+BTT8eC5JpaCnORdV3Zd2T
      # C7qdq1r4J/wKBel3cAz1jlLXc2Pssle4NFaMZGmOGlNX/mLJUYkI6BwKG9wNiCI+
      # cCRQW5bEv9g8XzPYPsIKhX9aTegDKdV5x4Xj3YyVs8qkZTVM7Ona8GTpy6eShNfL
      # h/RW+yvSxLwfKC9YJHesjI1oqhLsAuA7hFu5AVHiedFNAD5FevMZsZwrqjrmeBOG
      # 5awBw9XgfXFFl7jQ0VQVRknt/PFANzTmGGbjLUkaXgJ6iTmH7oIMzwbkx2pM/0Qd
      # HV2EboUPe5rJl0SNhcDMCJkYJYpt4z6TVXFpN5p10WU4K1AJXZf9P3YkChcxWiSK
      # B4DlY4ax3W77voySwbKCvJRIRWCFQZmtl7doFY5dEQz2ERcNfI7VIB1GKIj7BlGm
      # AVTCc5G9KghsaB8q0BzYbDplzCggdaaUBRgpIgLS/n22GKJlOisFwMCawWquPkEw
      # i0t3ftt+Ket4Qnnq+dO4W3ehR4qW1/XatCWgQ3NCSgUeS4/9VK3h/nz5t+L7iKwp
      # mjp86gNN11wcJRsBIIV7nOAmSAs9ybCm2F4J6YAyh3n1IlRVN0Q=
      # =2A+W
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Tue 07 Nov 2023 10:28:49 HKT
      # gpg:                using RSA key 6AE902B6A7CA877D6D659296AF7C95130C538013
      # gpg: Good signature from "Alistair Francis <alistair@alistair23.me>" [unknown]
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 6AE9 02B6 A7CA 877D 6D65  9296 AF7C 9513 0C53 8013
      
      * tag 'pull-riscv-to-apply-20231107' of https://github.com/alistair23/qemu
      
      : (49 commits)
        docs/about/deprecated: Document RISC-V "pmu-num" deprecation
        target/riscv: Add "pmu-mask" property to replace "pmu-num"
        target/riscv: Use existing PMU counter mask in FDT generation
        target/riscv: Don't assume PMU counters are continuous
        target/riscv: Propagate error from PMU setup
        target/riscv: cpu: Set the OpenTitan priv to 1.12.0
        hw/ssi: ibex_spi_host: Clear the interrupt even if disabled
        disas/riscv: Replace TABs with space
        disas/riscv: Add support for vector crypto extensions
        disas/riscv: Add rv_codec_vror_vi for vror.vi
        disas/riscv: Add rv_fmt_vd_vs2_uimm format
        target/riscv: Move vector crypto extensions to riscv_cpu_extensions
        target/riscv: Expose Zvks[c|g] extnesion properties
        target/riscv: Add cfg properties for Zvks[c|g] extensions
        target/riscv: Expose Zvkn[c|g] extnesion properties
        target/riscv: Add cfg properties for Zvkn[c|g] extensions
        target/riscv: Expose Zvkb extension property
        target/riscv: Replace Zvbb checking by Zvkb
        target/riscv: Add cfg property for Zvkb extension
        target/riscv: Expose Zvkt extension property
        ...
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      8aba939e
    • Stefan Hajnoczi's avatar
      Merge tag 'pull-tcg-20231106' of https://gitlab.com/rth7680/qemu into staging · 74949263
      Stefan Hajnoczi authored
      util: Add cpuinfo for loongarch64
      tcg/loongarch64: Use cpuinfo.h
      tcg/loongarch64: Improve register allocation for INDEX_op_qemu_ld_a*_i128
      host/include/loongarch64: Add atomic16 load and store
      tcg: Move expanders out of line
      tcg/mips: Always implement movcond
      tcg/mips: Implement neg opcodes
      tcg/loongarch64: Implement neg opcodes
      tcg: Make movcond and neg required opcodes
      tcg: Optimize env memory operations
      tcg: Canonicalize sub of immediate to add
      tcg/sparc64: Implement tcg_out_extrl_i64_i32
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQFRBAABCgA7FiEEekgeeIaLTbaoWgXAZN846K9+IV8FAmVJpT0dHHJpY2hhcmQu
      # aGVuZGVyc29uQGxpbmFyby5vcmcACgkQZN846K9+IV9i7QgAtjxUB3y/caCPp0Me
      # 3cXYtpL1vNxx+cTESGMlmIRSji+cEOxYSpnY0itxXcKpcwP8Au8eoTe85NxyIllg
      # 2R/SA2jlmrmiipI+bwb0UBCy+BzUfMgmegA88K2W22J0fetwIy19PN9ORmYdLiYE
      # /pWNFOSPzhYEJgOw7V2MwciUv3llolMOfxU7VT4oVaCknZRsyaGUwl4uTT4GdPuK
      # p29O9nziyKDmNTqJ9SKKll5bzwCMAgkn2lUcMGf+rpl7ZxjgvysUYrGXKmOnj4Uu
      # eCU2d3ZHoSspcYEjbFASlyPd7z5apGI8Iq2K35FUhURFPv06Su/bIGOOD4ujP2Qp
      # vc/bFQ==
      # =Mvaf
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Tue 07 Nov 2023 10:47:25 HKT
      # gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
      # gpg:                issuer "richard.henderson@linaro.org"
      # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
      # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
      
      * tag 'pull-tcg-20231106' of https://gitlab.com/rth7680/qemu
      
      : (35 commits)
        tcg/sparc64: Implement tcg_out_extrl_i64_i32
        tcg/optimize: Canonicalize sub2 with constants to add2
        tcg/optimize: Canonicalize subi to addi during optimization
        tcg: Canonicalize subi to addi during opcode generation
        tcg/optimize: Split out arg_new_constant
        tcg: Eliminate duplicate env store operations
        tcg/optimize: Optimize env memory operations
        tcg/optimize: Split out cmp_better_copy
        tcg/optimize: Pipe OptContext into reset_ts
        tcg: Don't free vector results
        tcg: Remove TCG_TARGET_HAS_neg_{i32,i64}
        tcg/loongarch64: Implement neg opcodes
        tcg/mips: Implement neg opcodes
        tcg: Remove TCG_TARGET_HAS_movcond_{i32,i64}
        tcg/mips: Always implement movcond
        tcg/mips: Split out tcg_out_setcond_int
        tcg: Move tcg_temp_free_* out of line
        tcg: Move tcg_temp_new_*, tcg_global_mem_new_* out of line
        tcg: Move tcg_constant_* out of line
        tcg: Unexport tcg_gen_op*_{i32,i64}
        ...
      
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      74949263
    • Helge Deller's avatar
      hw/hppa: Allow C3700 with 64-bit and B160L with 32-bit CPU only · 3d1611bf
      Helge Deller authored
      
      Prevent that users try to boot a 64-bit only C3700 machine with a 32-bit
      CPU, and to boot a 32-bit only B160L machine with a 64-bit CPU.
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      3d1611bf
    • Helge Deller's avatar
      fd9b04bf
    • Helge Deller's avatar
      hw/pci-host/astro: Trigger CPU irq on CPU HPA in high memory · 64bf0967
      Helge Deller authored
      
      The CPU HPA is in the high F-region on PA2.0 CPUs, so use F_EXTEND()
      to trigger interrupt request at the right CPU HPA address.
      Note that the cpu_hpa value comes out of the IRT, which doesn't store the
      higher addresss bits.
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      64bf0967
    • Helge Deller's avatar
      hw/pci-host/astro: Map Astro chip into 64-bit I/O memory region · fd842b2f
      Helge Deller authored
      
      Map Astro into high F-region and add alias for 32-bit OS in low region.
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      fd842b2f
    • Richard Henderson's avatar
    • Richard Henderson's avatar
      target/hppa: Update IIAOQ, IIASQ for pa2.0 · b10700d8
      Richard Henderson authored
      
      These registers have a different format for pa2.0.
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      b10700d8
    • Richard Henderson's avatar
      target/hppa: Create raise_exception_with_ior · 8a02b9a6
      Richard Henderson authored
      
      Handle pa2.0 logic for filling in ISR+IOR.
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      8a02b9a6
    • Richard Henderson's avatar
      target/hppa: Add unwind_breg to CPUHPPAState · f5b5c857
      Richard Henderson authored
      
      Fill in the insn_start value during form_gva, and copy
      it out to the env field in hppa_restore_state_to_opc.
      The value is not yet consumed.
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      f5b5c857
    • Helge Deller's avatar
    • Richard Henderson's avatar
    • Helge Deller's avatar
      target/hppa: Add pa2.0 cpu local tlb flushes · eb25d10f
      Helge Deller authored
      
      The previous decoding misnamed the bit it called "local".
      Other than the name, the implementation was correct for pa1.x.
      Rename this field to "tlbe".
      
      PA2.0 adds (a real) local bit to PxTLB, and also adds a range
      of pages to flush in GR[b].
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      eb25d10f
    • Richard Henderson's avatar
      target/hppa: Implement pa2.0 data prefetch instructions · b5caa17c
      Richard Henderson authored
      
      These are aliased onto the normal integer loads to %g0.
      Since we don't emulate caches, prefetch is a nop.
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      b5caa17c
    • Richard Henderson's avatar
    • Richard Henderson's avatar
      hw/hppa: Translate phys addresses for the cpu · f386a16e
      Richard Henderson authored
      
      Hack the machine to use pa2.0 physical layout when required,
      using the PSW.W=0 absolute to physical mapping.
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      f386a16e
    • Richard Henderson's avatar
      include/hw/elf: Remove truncating signed casts · e1fee58f
      Richard Henderson authored
      
      There's nothing about elf that specifically requires signed vs unsigned.
      This is very much a target-specific preference.
      
      In the meantime, casting low and high from uint64_t back to Elf_SWord
      to uint64_t discards high bits that might have been set by translate_fn.
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      e1fee58f
    • Richard Henderson's avatar
    • Richard Henderson's avatar
      target/hppa: Precompute zero into DisasContext · a4db4a78
      Richard Henderson authored
      
      Reduce the number of times we look for the constant 0.
      
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      a4db4a78
    • Helge Deller's avatar
      target/hppa: Fix interruption based on default PSW · ab9af359
      Helge Deller authored
      
      The default PSW is set by the operating system with the PDC_PSW
      firmware call.  Use that setting to decide if wide mode is to be
      enabled for interruptions and EIRR usage.
      
      Signed-off-by: default avatarHelge Deller <deller@gmx.de>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      ab9af359
    • Richard Henderson's avatar
      4e7abdb1
    • Richard Henderson's avatar
    • Richard Henderson's avatar
Loading