]> Git Repo - qemu.git/log
qemu.git
5 years agoMerge remote-tracking branch 'remotes/philmd-gitlab/tags/pflash-next-20190701' into...
Peter Maydell [Tue, 2 Jul 2019 17:22:17 +0000 (18:22 +0100)]
Merge remote-tracking branch 'remotes/philmd-gitlab/tags/pflash-next-20190701' into staging

Implement the following AMD command-set parallel flash functionality:
- nonuniform sector sizes;
- erase suspend/resume commands; and
- multi-sector erase.

# gpg: Signature made Tue 02 Jul 2019 01:54:33 BST
# gpg:                using RSA key E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <[email protected]>" [full]
# Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* remotes/philmd-gitlab/tags/pflash-next-20190701: (27 commits)
  hw/block/pflash_cfi02: Reduce I/O accesses to 16-bit
  hw/block/pflash_cfi02: Document commands
  hw/block/pflash_cfi02: Use chip erase time specified in the CFI table
  hw/block/pflash_cfi02: Implement erase suspend/resume
  hw/block/pflash_cfi02: Implement multi-sector erase
  hw/block/pflash_cfi02: Fix reset command not ignored during erase
  hw/block/pflash_cfi02: Fix CFI in autoselect mode
  hw/block/pflash_cfi02: Split if() condition
  hw/block/pflash_cfi02: Extract pflash_regions_count()
  hw/block/pflash_cfi02: Implement nonuniform sector sizes
  hw/block/pflash_cfi02: Document 'Page Mode' operations are not supported
  hw/block/pflash_cfi02: Hold the PRI table offset in a variable
  hw/block/pflash_cfi02: Document the current CFI values
  hw/block/pflash_cfi02: Remove pointless local variable
  tests/pflash-cfi02: Refactor to support testing multiple configurations
  hw/block/pflash_cfi02: Fix command address comparison
  hw/block/pflash_cfi02: Unify the MemoryRegionOps
  hw/block/pflash_cfi02: Extract the pflash_data_read() function
  hw/block/pflash_cfi02: Use the ldst API in pflash_read()
  hw/block/pflash_cfi02: Use the ldst API in pflash_write()
  ...

Signed-off-by: Peter Maydell <[email protected]>
5 years agoMerge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-07-02' into staging
Peter Maydell [Tue, 2 Jul 2019 16:41:01 +0000 (17:41 +0100)]
Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-07-02' into staging

Block patches for 4.1-rc0:
- The stream job no longer relies on a fixed base node
- The rbd block driver can now accomodate growing formats like qcow2

# gpg: Signature made Tue 02 Jul 2019 02:56:06 BST
# gpg:                using RSA key 91BEB60A30DB3E8857D11829F407DB0061D5CF40
# gpg:                issuer "[email protected]"
# gpg: Good signature from "Max Reitz <[email protected]>" [full]
# Primary key fingerprint: 91BE B60A 30DB 3E88 57D1  1829 F407 DB00 61D5 CF40

* remotes/maxreitz/tags/pull-block-2019-07-02:
  block/stream: introduce a bottom node
  block/stream: refactor stream_run: drop goto
  block: include base when checking image chain for block allocation
  block/rbd: increase dynamically the image size

Signed-off-by: Peter Maydell <[email protected]>
5 years agoMerge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
Peter Maydell [Tue, 2 Jul 2019 15:41:28 +0000 (16:41 +0100)]
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging

# gpg: Signature made Tue 02 Jul 2019 03:21:54 BST
# gpg:                using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <[email protected]>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  migration/colo.c: Add missed filter notify for Xen COLO.
  COLO-compare: Add colo-compare remote notify support
  COLO-compare: Make the compare_chr_send() can send notification message.
  COLO-compare: Add remote notification chardev handler frame
  COLO-compare: Add new parameter to communicate with remote colo-frame
  net/announce: Expand test for stopping self announce
  net/announce: Add HMP optional ID
  net/announce: Add optional ID
  net/announce: Add HMP optional interface list
  net/announce: Allow optional list of interfaces
  net: remove unused get_str_sep() function
  net: use g_strsplit() for parsing host address and port
  net: avoid using variable length array in net_client_init()
  net: fix assertion failure when ipv6-prefixlen is not a number
  ftgmac100: do not link to netdev
  qemu-bridge-helper: Document known shortcomings
  MAINTAINERS: Add qemu-bridge-helper.c to "Network device backends"

Signed-off-by: Peter Maydell <[email protected]>
5 years agoMerge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20190701' into...
Peter Maydell [Tue, 2 Jul 2019 13:08:08 +0000 (14:08 +0100)]
Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20190701' into staging

qemu-openbios queue

# gpg: Signature made Mon 01 Jul 2019 18:47:32 BST
# gpg:                using RSA key CC621AB98E82200D915CC9C45BC2C56FAE0F321F
# gpg:                issuer "[email protected]"
# gpg: Good signature from "Mark Cave-Ayland <[email protected]>" [full]
# Primary key fingerprint: CC62 1AB9 8E82 200D 915C  C9C4 5BC2 C56F AE0F 321F

* remotes/mcayland/tags/qemu-openbios-20190701:
  Update OpenBIOS images to c79e0ec built from submodule.

Signed-off-by: Peter Maydell <[email protected]>
5 years agoMerge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190701' into...
Peter Maydell [Tue, 2 Jul 2019 11:58:32 +0000 (12:58 +0100)]
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190701' into staging

target-arm queue:
 * hw/arm/boot: fix direct kernel boot with initrd
 * hw/arm/msf2-som: Exit when the cpu is not the expected one
 * i.mx7: fix bugs in PCI controller needed to boot recent kernels
 * aspeed: add RTC device
 * aspeed: fix some timer device bugs
 * aspeed: add swift-bmc board
 * aspeed: vic: Add support for legacy register interface
 * aspeed: add aspeed-xdma device
 * Add new sbsa-ref board for aarch64
 * target/arm: code refactoring in preparation for support of
   compilation with TCG disabled

# gpg: Signature made Mon 01 Jul 2019 17:38:10 BST
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "[email protected]"
# gpg: Good signature from "Peter Maydell <[email protected]>" [ultimate]
# gpg:                 aka "Peter Maydell <[email protected]>" [ultimate]
# gpg:                 aka "Peter Maydell <[email protected]>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20190701: (46 commits)
  target/arm: Declare some M-profile functions publicly
  target/arm: Declare arm_log_exception() function publicly
  target/arm: Restrict PSCI to TCG
  target/arm/vfp_helper: Restrict the SoftFloat use to TCG
  target/arm/vfp_helper: Extract vfp_set_fpscr_from_host()
  target/arm/vfp_helper: Extract vfp_set_fpscr_to_host()
  target/arm/vfp_helper: Move code around
  target/arm: Move TLB related routines to tlb_helper.c
  target/arm: Declare get_phys_addr() function publicly
  target/arm: Move CPU state dumping routines to cpu.c
  target/arm: Move the DC ZVA helper into op_helper
  target/arm: Fix coding style issues
  target/arm: Fix multiline comment syntax
  target/arm/helper: Remove unused include
  target/arm: Add copyright boilerplate
  target/arm: Makefile cleanup (softmmu)
  target/arm: Makefile cleanup (KVM)
  target/arm: Makefile cleanup (ARM)
  target/arm: Makefile cleanup (Aarch64)
  hw/arm: Add arm SBSA reference machine, devices part
  ...

Signed-off-by: Peter Maydell <[email protected]>
5 years agoMerge remote-tracking branch 'remotes/cohuck/tags/s390x-20190701' into staging
Peter Maydell [Tue, 2 Jul 2019 10:48:39 +0000 (11:48 +0100)]
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190701' into staging

- cleanup/refactoring in the cpu feature code
- fix for a tcg test case
- halt/clear support for vfio-ccw, and use a new helper

# gpg: Signature made Mon 01 Jul 2019 12:08:41 BST
# gpg:                using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF
# gpg:                issuer "[email protected]"
# gpg: Good signature from "Cornelia Huck <[email protected]>" [unknown]
# gpg:                 aka "Cornelia Huck <[email protected]>" [full]
# gpg:                 aka "Cornelia Huck <[email protected]>" [full]
# gpg:                 aka "Cornelia Huck <[email protected]>" [unknown]
# gpg:                 aka "Cornelia Huck <[email protected]>" [unknown]
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck/tags/s390x-20190701:
  s390x: add cpu feature/model files to KVM section
  vfio-ccw: support async command subregion
  vfio-ccw: use vfio_set_irq_signaling
  s390x/cpumodel: Prepend KDSA features with "KDSA"
  s390x/cpumodel: Rework CPU feature definition
  tests/tcg/s390x: Fix alignment of csst parameter list

Signed-off-by: Peter Maydell <[email protected]>
5 years agoMerge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging
Peter Maydell [Tue, 2 Jul 2019 09:17:54 +0000 (10:17 +0100)]
Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

Pull request

No user-visible changes.

# gpg: Signature made Fri 28 Jun 2019 14:13:41 BST
# gpg:                using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <[email protected]>" [full]
# gpg:                 aka "Stefan Hajnoczi <[email protected]>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8

* remotes/stefanha/tags/block-pull-request:
  build: use $(DESTDIR)x instead of $(DESTDIR)/x

Signed-off-by: Peter Maydell <[email protected]>
5 years agomigration/colo.c: Add missed filter notify for Xen COLO.
Zhang Chen [Sun, 9 Jun 2019 16:44:33 +0000 (00:44 +0800)]
migration/colo.c: Add missed filter notify for Xen COLO.

We need to notify net filter to do checkpoint for Xen COLO, like KVM side.

Signed-off-by: Zhang Chen <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agoCOLO-compare: Add colo-compare remote notify support
Zhang Chen [Sun, 9 Jun 2019 16:44:32 +0000 (00:44 +0800)]
COLO-compare: Add colo-compare remote notify support

This patch make colo-compare can send message to remote COLO frame(Xen) when occur checkpoint.

Signed-off-by: Zhang Chen <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agoCOLO-compare: Make the compare_chr_send() can send notification message.
Zhang Chen [Sun, 9 Jun 2019 16:44:31 +0000 (00:44 +0800)]
COLO-compare: Make the compare_chr_send() can send notification message.

We need use this function to send notification message for remote colo-frame(Xen).
So we add new parameter for this job.

Signed-off-by: Zhang Chen <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agoCOLO-compare: Add remote notification chardev handler frame
Zhang Chen [Sun, 9 Jun 2019 16:44:30 +0000 (00:44 +0800)]
COLO-compare: Add remote notification chardev handler frame

Add chardev handler to send notification to remote(current from Xen) colo-frame.

Signed-off-by: Zhang Chen <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agoCOLO-compare: Add new parameter to communicate with remote colo-frame
Zhang Chen [Sun, 9 Jun 2019 16:44:29 +0000 (00:44 +0800)]
COLO-compare: Add new parameter to communicate with remote colo-frame

We add the "notify_dev=chardevID" parameter. After that colo-compare can connect with
remote(currently just for Xen, KVM-COLO didn't need it.) colo-frame through chardev socket,
it can notify remote(Xen) colo-frame to handle checkpoint event.

Signed-off-by: Zhang Chen <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agonet/announce: Expand test for stopping self announce
Dr. David Alan Gilbert [Thu, 20 Jun 2019 18:47:06 +0000 (19:47 +0100)]
net/announce: Expand test for stopping self announce

Expand self-announce test to check we can stop an announce timer.
We set it up to send 300 packets, but after we receive
the first one we tell it to stop.

We error if:
   a) We receive more than 30 of the packets
   b) We're still receiving packets after a lot longer than the
      30 seconds should have arrived

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agonet/announce: Add HMP optional ID
Dr. David Alan Gilbert [Thu, 20 Jun 2019 18:47:05 +0000 (19:47 +0100)]
net/announce: Add HMP optional ID

Add the optional ID to the HMP command.

e.g.
   # start an announce for a long time on eth1
   migrate_set_parameter announce-rounds 1000
   announce_self "eth1" e1

   # start an announce on eth2
   announce_self "eth2" e2

   # Change e1 to be announcing on eth1 and eth3
   announce_self "eth1,eth3" e1

   # Cancel e1
   migrate_set_parameter announce-rounds 0
   announce_self "" e1

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agonet/announce: Add optional ID
Dr. David Alan Gilbert [Thu, 20 Jun 2019 18:47:04 +0000 (19:47 +0100)]
net/announce: Add optional ID

Previously there was a single instance of the timer used by
monitor triggered announces, that's OK, but when combined with the
previous change that lets you have announces for subsets of interfaces
it's a bit restrictive if you want to do different things to different
interfaces.

Add an 'id' field to the announce, and maintain a list of the
timers based on id.

This allows you to for example:
    a) Start an announce going on interface eth0 for a long time
    b) Start an announce going on interface eth1 for a long time
    c) Kill the announce on eth0 while leaving eth1 going.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agonet/announce: Add HMP optional interface list
Dr. David Alan Gilbert [Thu, 20 Jun 2019 18:47:03 +0000 (19:47 +0100)]
net/announce: Add HMP optional interface list

Add the optional interface list to the HMP command.

i.e.

   All interfaces
        announce_self

   Just the named interfaces:
        announce_self vn1,vn2

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agonet/announce: Allow optional list of interfaces
Dr. David Alan Gilbert [Thu, 20 Jun 2019 18:47:02 +0000 (19:47 +0100)]
net/announce: Allow optional list of interfaces

Allow the caller to restrict the set of interfaces that announces are
sent on.  The default is still to send on all interfaces.

e.g.

  { "execute": "announce-self", "arguments": { "initial": 50, "max": 550, "rounds": 5, "step": 50, "interfaces": ["vn2", "vn1"] } }

This doesn't affect the behaviour of migraiton announcments.

Note: There's still only one timer for the qmp command, so that
performing an 'announce-self' on one list of interfaces followed
by another 'announce-self' on another list will stop the announces
on the existing set.

Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agonet: remove unused get_str_sep() function
Stefano Garzarella [Fri, 17 May 2019 13:47:48 +0000 (15:47 +0200)]
net: remove unused get_str_sep() function

Since the get_str_sep() function is no longer used in
net/net.c, we can remove it.

Signed-off-by: Stefano Garzarella <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agonet: use g_strsplit() for parsing host address and port
Stefano Garzarella [Fri, 17 May 2019 13:47:47 +0000 (15:47 +0200)]
net: use g_strsplit() for parsing host address and port

Use the glib function to split host address and port in
the parse_host_port() function.

Suggested-by: Markus Armbruster <[email protected]>
Signed-off-by: Stefano Garzarella <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agonet: avoid using variable length array in net_client_init()
Stefano Garzarella [Fri, 17 May 2019 13:47:46 +0000 (15:47 +0200)]
net: avoid using variable length array in net_client_init()

net_client_init() uses a variable length array to store the prefix
of 'ipv6-net' parameter (e.g. if ipv6-net=fec0::0/64, the prefix
is 'fec0::0').
This patch introduces g_strsplit() to split the 'ipv6-net' parameter,
so we can remove the variable length array.

Suggested-by: Markus Armbruster <[email protected]>
Signed-off-by: Stefano Garzarella <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agonet: fix assertion failure when ipv6-prefixlen is not a number
Stefano Garzarella [Fri, 17 May 2019 13:47:45 +0000 (15:47 +0200)]
net: fix assertion failure when ipv6-prefixlen is not a number

If 'ipv6-prefixlen' is not a number, the current behaviour
produces an assertion failure:
    $ qemu-system-x86_64 -net user,ipv6-net=feca::0/a
    qemu-system-x86_64: qemu/util/qemu-option.c:1175: qemu_opts_foreach:
    Assertion `!errp || !*errp' failed.
    Aborted (core dumped)

This patch fixes it, jumping to the end of the function when
'ipv6-prefixlen' is not a number, and printing the more friendly
message:
    $ qemu-system-x86_64 -net user,ipv6-net=feca::0/a
    qemu-system-x86_64: Parameter 'ipv6-prefixlen' expects a number

Signed-off-by: Stefano Garzarella <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agoftgmac100: do not link to netdev
Cédric Le Goater [Mon, 20 May 2019 18:11:11 +0000 (20:11 +0200)]
ftgmac100: do not link to netdev

qdev_set_nic_properties() is already used in the Aspeed SoC level to
bind the ftgmac100 device to the netdev.

This is fixing support for multiple net devices.

Signed-off-by: Cédric Le Goater <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agoqemu-bridge-helper: Document known shortcomings
Markus Armbruster [Tue, 4 Jun 2019 11:52:21 +0000 (13:52 +0200)]
qemu-bridge-helper: Document known shortcomings

Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agoMAINTAINERS: Add qemu-bridge-helper.c to "Network device backends"
Markus Armbruster [Tue, 4 Jun 2019 11:52:19 +0000 (13:52 +0200)]
MAINTAINERS: Add qemu-bridge-helper.c to "Network device backends"

Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
5 years agoblock/stream: introduce a bottom node
Andrey Shinkevich [Wed, 29 May 2019 17:56:16 +0000 (20:56 +0300)]
block/stream: introduce a bottom node

The bottom node is the intermediate block device that has the base as its
backing image. It is used instead of the base node while a block stream
job is running to avoid dependency on the base that may change due to the
parallel jobs. The change may take place due to a filter node as well that
is inserted between the base and the intermediate bottom node. It occurs
when the base node is the top one for another commit or stream job.
After the introduction of the bottom node, don't freeze its backing child,
that's the base, anymore.

Suggested-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Signed-off-by: Andrey Shinkevich <[email protected]>
Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Message-id: 1559152576[email protected]
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
5 years agoblock/stream: refactor stream_run: drop goto
Andrey Shinkevich [Wed, 29 May 2019 17:56:15 +0000 (20:56 +0300)]
block/stream: refactor stream_run: drop goto

The goto is unnecessary in the stream_run() since the common exit
code was removed in the commit eb23654dbe43b549ea2a9ebff9d8e:
"jobs: utilize job_exit shim".

Signed-off-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Signed-off-by: Andrey Shinkevich <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Message-id: 1559152576[email protected]
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
5 years agoblock: include base when checking image chain for block allocation
Andrey Shinkevich [Wed, 29 May 2019 17:56:14 +0000 (20:56 +0300)]
block: include base when checking image chain for block allocation

This patch is used in the 'block/stream: introduce a bottom node'
that is following. Instead of the base node, the caller may pass
the node that has the base as its backing image to the function
bdrv_is_allocated_above() with a new parameter include_base = true
and get rid of the dependency on the base that may change during
commit/stream parallel jobs. Now, if the specified base is not
found in the backing image chain, the QEMU will abort.

Suggested-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Signed-off-by: Andrey Shinkevich <[email protected]>
Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Message-id: 1559152576[email protected]
[mreitz: Squashed in the following as a rebase on conflicting patches:]
Message-id: e3cf99ae-62e9-8b6e-5a06-d3c8b9363b85@redhat.com
Signed-off-by: Max Reitz <[email protected]>
5 years agoblock/rbd: increase dynamically the image size
Stefano Garzarella [Thu, 9 May 2019 14:59:27 +0000 (16:59 +0200)]
block/rbd: increase dynamically the image size

RBD APIs don't allow us to write more than the size set with
rbd_create() or rbd_resize().
In order to support growing images (eg. qcow2), we resize the
image before write operations that exceed the current size.

Signed-off-by: Stefano Garzarella <[email protected]>
Message-id: 20190509145927[email protected]
Signed-off-by: Max Reitz <[email protected]>
5 years agohw/block/pflash_cfi02: Reduce I/O accesses to 16-bit
Philippe Mathieu-Daudé [Thu, 27 Jun 2019 17:45:08 +0000 (19:45 +0200)]
hw/block/pflash_cfi02: Reduce I/O accesses to 16-bit

Parallel NOR flashes are limited to 16-bit bus accesses.
Remove the 32-bit dead code.

Reviewed-by: Alistair Francis <[email protected]>
Message-Id: <20190627202719[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Document commands
Philippe Mathieu-Daudé [Sat, 18 May 2019 19:22:03 +0000 (21:22 +0200)]
hw/block/pflash_cfi02: Document commands

Reviewed-by: Alistair Francis <[email protected]>
Message-Id: <20190627202719[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Use chip erase time specified in the CFI table
Stephen Checkoway [Fri, 26 Apr 2019 16:26:24 +0000 (12:26 -0400)]
hw/block/pflash_cfi02: Use chip erase time specified in the CFI table

When erasing the chip, use the typical time specified in the CFI table
rather than arbitrarily selecting 5 seconds.

Since the currently unconfigurable value set in the table is 12, this
means a chip erase takes 4096 ms so this isn't a big change in behavior.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Implement erase suspend/resume
Stephen Checkoway [Fri, 26 Apr 2019 16:26:23 +0000 (12:26 -0400)]
hw/block/pflash_cfi02: Implement erase suspend/resume

During a sector erase (but not a chip erase), the embeded erase program
can be suspended. Once suspended, the sectors not selected for erasure
may be read and programmed. Autoselect mode is allowed during erase
suspend mode. Presumably, CFI queries are similarly allowed so this
commit allows them as well.

Since guest firmware can use status bits DQ7, DQ6, DQ3, and DQ2 to
determine the current state of sector erasure, these bits are properly
implemented.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Acked-by: Thomas Huth <[email protected]>
Acked-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Rebased]
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Implement multi-sector erase
Stephen Checkoway [Fri, 26 Apr 2019 16:26:22 +0000 (12:26 -0400)]
hw/block/pflash_cfi02: Implement multi-sector erase

After two unlock cycles and a sector erase command, the AMD flash chips
start a 50 us erase time out. Any additional sector erase commands add a
sector to be erased and restart the 50 us timeout. During the timeout,
status bit DQ3 is cleared. After the time out, DQ3 is asserted during
erasure.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Acked-by: Thomas Huth <[email protected]>
Acked-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Rebased]
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Fix reset command not ignored during erase
Stephen Checkoway [Fri, 26 Apr 2019 16:26:21 +0000 (12:26 -0400)]
hw/block/pflash_cfi02: Fix reset command not ignored during erase

When the flash device is performing a chip erase, all commands are
ignored. When it is performing a sector erase, only the erase suspend
command is valid, which is currently not supported.

In particular, the reset command should not cause the device to reset to
read array mode while programming is on going.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Fix CFI in autoselect mode
Stephen Checkoway [Fri, 26 Apr 2019 16:26:20 +0000 (12:26 -0400)]
hw/block/pflash_cfi02: Fix CFI in autoselect mode

After a flash device enters CFI mode from autoselect mode, the reset
command returns the device to autoselect mode. An additional reset
command is necessary to return to read array mode.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
Acked-by: Thomas Huth <[email protected]>
Acked-by: Alistair Francis <[email protected]>
Acked-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Split if() condition
Philippe Mathieu-Daudé [Thu, 27 Jun 2019 13:44:24 +0000 (15:44 +0200)]
hw/block/pflash_cfi02: Split if() condition

Split the if() condition check and arrange the indentation to
ease the review of the next patches. No logical change.

Reviewed-by: Alistair Francis <[email protected]>
Message-Id: <20190627202719[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Extract pflash_regions_count()
Philippe Mathieu-Daudé [Sat, 18 May 2019 18:57:02 +0000 (20:57 +0200)]
hw/block/pflash_cfi02: Extract pflash_regions_count()

Extract the pflash_regions_count() function, the code will be
easier to review.

Reviewed-by: Alistair Francis <[email protected]>
Message-Id: <20190627202719[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Implement nonuniform sector sizes
Stephen Checkoway [Fri, 26 Apr 2019 16:26:19 +0000 (12:26 -0400)]
hw/block/pflash_cfi02: Implement nonuniform sector sizes

Some flash chips support sectors of different sizes. For example, the
AMD AM29LV160DT has 31 64 kB sectors, one 32 kB sector, two 8 kB
sectors, and a 16 kB sector, in that order. The AM29LV160DB has those in
the reverse order.

The `num-blocks` and `sector-length` properties work exactly as they did
before: a flash device with uniform sector lengths. To get non-uniform
sector lengths for up to four regions, the following properties may be
set
- region 0. `num-blocks0` and `sector-length0`;
- region 1. `num-blocks1` and `sector-length1`;
- region 2. `num-blocks2` and `sector-length2`; and
- region 3. `num-blocks3` and `sector-length3`.

If the uniform and nonuniform properties are set, then both must specify
a flash device with the same total size. It would be better to disallow
both being set, or make `num-blocks0` and `sector-length0` alias
`num-blocks` and `sector-length`, but that would make testing currently
impossible.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Acked-by: Thomas Huth <[email protected]>
Acked-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Rebased, add assert() on pri_offset]
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Document 'Page Mode' operations are not supported
Philippe Mathieu-Daudé [Sat, 18 May 2019 18:23:31 +0000 (20:23 +0200)]
hw/block/pflash_cfi02: Document 'Page Mode' operations are not supported

The 'page mode' feature entry was implicitly set as zero
(not supported). Document it exists, so we won't discard
it if we squeeze the CFI table.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Extracted from bigger patch]
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Hold the PRI table offset in a variable
Philippe Mathieu-Daudé [Sat, 18 May 2019 18:00:36 +0000 (20:00 +0200)]
hw/block/pflash_cfi02: Hold the PRI table offset in a variable

Manufacturers are allowed to move the PRI table, this is why the
offset is queryable via fixed offsets 0x15/0x16.
Add a variable to hold the offset, so it will be easier to later
move the PRI table.

Reviewed-by: Alistair Francis <[email protected]>
Message-Id: <20190627202719[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Document the current CFI values
Philippe Mathieu-Daudé [Sat, 18 May 2019 18:21:28 +0000 (20:21 +0200)]
hw/block/pflash_cfi02: Document the current CFI values

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Extracted from bigger patch]
Acked-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Remove pointless local variable
Philippe Mathieu-Daudé [Sat, 18 May 2019 12:45:35 +0000 (14:45 +0200)]
hw/block/pflash_cfi02: Remove pointless local variable

We can directly use pfl->total_len, remove the local 'chip_len'
variable.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Extracted from bigger patch]
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agotests/pflash-cfi02: Refactor to support testing multiple configurations
Philippe Mathieu-Daudé [Wed, 26 Jun 2019 19:54:46 +0000 (21:54 +0200)]
tests/pflash-cfi02: Refactor to support testing multiple configurations

Introduce the FlashConfig structure, to be able to run the same set
of tests on different flash models/configurations.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Extracted from bigger patch]
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Fix command address comparison
Stephen Checkoway [Fri, 26 Apr 2019 16:26:17 +0000 (12:26 -0400)]
hw/block/pflash_cfi02: Fix command address comparison

Most AMD commands only examine 11 bits of the address. This masks the
addresses used in the comparison to 11 bits. The exceptions are word or
sector addresses which use offset directly rather than the shifted
offset, boff.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Acked-by: Thomas Huth <[email protected]>
Acked-by: Alistair Francis <[email protected]>
Acked-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Unify the MemoryRegionOps
Philippe Mathieu-Daudé [Wed, 1 May 2019 16:15:56 +0000 (18:15 +0200)]
hw/block/pflash_cfi02: Unify the MemoryRegionOps

The pflash_read()/pflash_write() can check the device endianess
via the pfl->be variable, so remove the 'int be' argument.

Since the big/little MemoryRegionOps are now identical, it is
pointless to declare them both. Unify them.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Extracted from bigger patch to ease review]
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Extract the pflash_data_read() function
Philippe Mathieu-Daudé [Sun, 5 May 2019 21:24:51 +0000 (23:24 +0200)]
hw/block/pflash_cfi02: Extract the pflash_data_read() function

Extract the code block in a new function, remove a goto statement.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Extracted from bigger patch, remove the XXX tracing comment]
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Use the ldst API in pflash_read()
Philippe Mathieu-Daudé [Sun, 5 May 2019 21:21:19 +0000 (23:21 +0200)]
hw/block/pflash_cfi02: Use the ldst API in pflash_read()

The load/store API eases code review.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Extracted from bigger patch, simplified tracing]
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Use the ldst API in pflash_write()
Philippe Mathieu-Daudé [Sun, 5 May 2019 21:14:29 +0000 (23:14 +0200)]
hw/block/pflash_cfi02: Use the ldst API in pflash_write()

The load/store API eases code review.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Extracted from bigger patch]
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Simplify a statement using fall through
Philippe Mathieu-Daudé [Sun, 5 May 2019 21:04:48 +0000 (23:04 +0200)]
hw/block/pflash_cfi02: Simplify a statement using fall through

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Extracted from bigger patch]
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Add helpers to manipulate the status bits
Philippe Mathieu-Daudé [Wed, 1 May 2019 16:14:25 +0000 (18:14 +0200)]
hw/block/pflash_cfi02: Add helpers to manipulate the status bits

Pull out all of the code to modify the status into simple helper
functions. Status handling becomes more complex once multiple
chips are interleaved to produce a single device.

No change in functionality is intended with this commit.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Extracted from bigger patch]
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Add an enum to define the write cycles
Philippe Mathieu-Daudé [Sun, 5 May 2019 20:42:08 +0000 (22:42 +0200)]
hw/block/pflash_cfi02: Add an enum to define the write cycles

No change in functionality is intended with this commit.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Extracted from bigger patch]
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash_cfi02: Fix debug format string
Philippe Mathieu-Daudé [Wed, 1 May 2019 16:15:35 +0000 (18:15 +0200)]
hw/block/pflash_cfi02: Fix debug format string

Always compile the debug code to prevent format string to bitrot.
Delete dead code.

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: Extracted from bigger patch, use PRIx32]
Reviewed-by: Alistair Francis <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash: Simplify trace_pflash_data_read/write()
Philippe Mathieu-Daudé [Wed, 26 Jun 2019 16:40:09 +0000 (18:40 +0200)]
hw/block/pflash: Simplify trace_pflash_data_read/write()

Use a field width format to have a single function to log
the different width accesses.

Reviewed-by: Alistair Francis <[email protected]>
Message-Id: <20190627202719[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agohw/block/pflash: Simplify trace_pflash_io_read/write()
Philippe Mathieu-Daudé [Wed, 26 Jun 2019 16:39:10 +0000 (18:39 +0200)]
hw/block/pflash: Simplify trace_pflash_io_read/write()

Call the read() trace function after the value is set, so we can
log the returned value.
Rename the I/O trace functions with '_io_' in their name.

Reviewed-by: Stephen Checkoway <[email protected]>
Reviewed-by: Alistair Francis <[email protected]>
Message-Id: <20190627202719[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agotests/pflash-cfi02: Add test for supported CFI commands
Stephen Checkoway [Fri, 26 Apr 2019 16:26:15 +0000 (12:26 -0400)]
tests/pflash-cfi02: Add test for supported CFI commands

Test the AMD command set for parallel flash chips. This test uses an
ARM musicpal board with a pflash drive to test the following list of
currently-supported commands.
- Autoselect
- CFI
- Sector erase
- Chip erase
- Program
- Unlock bypass
- Reset

Signed-off-by: Stephen Checkoway <[email protected]>
Message-Id: <20190426162624[email protected]>
Acked-by: Thomas Huth <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Tested-by: Philippe Mathieu-Daudé <[email protected]>
[PMD: reworded the patch subject, g_assert_cmpint -> cmphex]
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
5 years agoMerge remote-tracking branch 'remotes/kraxel/tags/vga-20190628-pull-request' into...
Peter Maydell [Mon, 1 Jul 2019 18:11:53 +0000 (19:11 +0100)]
Merge remote-tracking branch 'remotes/kraxel/tags/vga-20190628-pull-request' into staging

vga: ati fixes, add ati vgabios.

# gpg: Signature made Fri 28 Jun 2019 11:39:32 BST
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <[email protected]>" [full]
# gpg:                 aka "Gerd Hoffmann <[email protected]>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <[email protected]>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/vga-20190628-pull-request:
  ati-vga: switch to vgabios-ati.bin
  seabios: add ati vgabios binary
  seabios: add config for ati vgabios
  ati-vga: Fixes to offset and pitch registers
  ati-vga: Implement DDC and EDID info from monitor
  i2c: Move bitbang_i2c.h to include/hw/i2c/

Signed-off-by: Peter Maydell <[email protected]>
5 years agoUpdate OpenBIOS images to c79e0ec built from submodule.
Mark Cave-Ayland [Mon, 1 Jul 2019 17:11:41 +0000 (18:11 +0100)]
Update OpenBIOS images to c79e0ec built from submodule.

Signed-off-by: Mark Cave-Ayland <[email protected]>
5 years agoMerge remote-tracking branch 'remotes/vivier2/tags/trivial-patches-pull-request'...
Peter Maydell [Mon, 1 Jul 2019 16:40:32 +0000 (17:40 +0100)]
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-patches-pull-request' into staging

configure improvements and fixes
MAINTAINERS update

# gpg: Signature made Wed 26 Jun 2019 21:02:10 BST
# gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
# gpg:                issuer "[email protected]"
# gpg: Good signature from "Laurent Vivier <[email protected]>" [full]
# gpg:                 aka "Laurent Vivier <[email protected]>" [full]
# gpg:                 aka "Laurent Vivier (Red Hat) <[email protected]>" [full]
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier2/tags/trivial-patches-pull-request:
  MAINTAINERS: Change maintership of Xen code under hw/9pfs
  configure: use valid args testing sem_timedwait
  configure: disallow spaces and colons in source path and build path
  configure: set source_path only once and make its definition more robust

Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Declare some M-profile functions publicly
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:22 +0000 (17:26 +0100)]
target/arm: Declare some M-profile functions publicly

In the next commit we will split the M-profile functions from this
file. Some function will be called out of helper.c. Declare them in
the "internals.h" header.

Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Declare arm_log_exception() function publicly
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:22 +0000 (17:26 +0100)]
target/arm: Declare arm_log_exception() function publicly

In few commits we will split the M-profile functions from this
file, and this function will also be called in the new file.
Declare it in the "internals.h" header.
Since it is in the middle of a block of M profile functions,
move it previous to this block to ease the later refactor.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Restrict PSCI to TCG
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:22 +0000 (17:26 +0100)]
target/arm: Restrict PSCI to TCG

Under KVM, the kernel gets the HVC call and handle the PSCI requests.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm/vfp_helper: Restrict the SoftFloat use to TCG
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:21 +0000 (17:26 +0100)]
target/arm/vfp_helper: Restrict the SoftFloat use to TCG

This code is specific to the SoftFloat floating-point
implementation, which is only used by TCG.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm/vfp_helper: Extract vfp_set_fpscr_from_host()
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:21 +0000 (17:26 +0100)]
target/arm/vfp_helper: Extract vfp_set_fpscr_from_host()

The vfp_set_fpscr() helper contains code specific to the host
floating point implementation (here the SoftFloat library).
Extract this code to vfp_set_fpscr_from_host().

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm/vfp_helper: Extract vfp_set_fpscr_to_host()
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:21 +0000 (17:26 +0100)]
target/arm/vfp_helper: Extract vfp_set_fpscr_to_host()

The vfp_set_fpscr() helper contains code specific to the host
floating point implementation (here the SoftFloat library).
Extract this code to vfp_set_fpscr_to_host().

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm/vfp_helper: Move code around
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:21 +0000 (17:26 +0100)]
target/arm/vfp_helper: Move code around

To ease the review of the next commit,
move the vfp_exceptbits_to_host() function directly after
vfp_exceptbits_from_host().  Amusingly the diff shows we
are moving vfp_get_fpscr().

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Move TLB related routines to tlb_helper.c
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:21 +0000 (17:26 +0100)]
target/arm: Move TLB related routines to tlb_helper.c

These routines are TCG specific.
The arm_deliver_fault() function is only used within the new
helper. Make it static.

Suggested-by: Alex Bennée <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Declare get_phys_addr() function publicly
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:20 +0000 (17:26 +0100)]
target/arm: Declare get_phys_addr() function publicly

In the next commit we will split the TLB related routines of
this file, and this function will also be called in the new
file. Declare it in the "internals.h" header.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Move CPU state dumping routines to cpu.c
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:20 +0000 (17:26 +0100)]
target/arm: Move CPU state dumping routines to cpu.c

Suggested-by: Samuel Ortiz <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Move the DC ZVA helper into op_helper
Samuel Ortiz [Mon, 1 Jul 2019 16:26:20 +0000 (17:26 +0100)]
target/arm: Move the DC ZVA helper into op_helper

Those helpers are a software implementation of the ARM v8 memory zeroing
op code. They should be moved to the op helper file, which is going to
eventually be built only when TCG is enabled.

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Robert Bradford <[email protected]>
Signed-off-by: Samuel Ortiz <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
[PMD: Rebased]
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Fix coding style issues
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:20 +0000 (17:26 +0100)]
target/arm: Fix coding style issues

Since we'll move this code around, fix its style first.

Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Fix multiline comment syntax
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:20 +0000 (17:26 +0100)]
target/arm: Fix multiline comment syntax

Since commit 8c06fbdf36b checkpatch.pl enforce a new multiline
comment syntax. Since we'll move this code around, fix its style
first.

Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm/helper: Remove unused include
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:19 +0000 (17:26 +0100)]
target/arm/helper: Remove unused include

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Add copyright boilerplate
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:19 +0000 (17:26 +0100)]
target/arm: Add copyright boilerplate

Reviewed-by: Robert Bradford <[email protected]>
Reviewed-by: Samuel Ortiz <[email protected]>
Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Makefile cleanup (softmmu)
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:19 +0000 (17:26 +0100)]
target/arm: Makefile cleanup (softmmu)

Group SOFTMMU objects together.
Since PSCI is TCG specific, keep it separate.

Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Makefile cleanup (KVM)
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:19 +0000 (17:26 +0100)]
target/arm: Makefile cleanup (KVM)

Group KVM rules together.

Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Makefile cleanup (ARM)
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:19 +0000 (17:26 +0100)]
target/arm: Makefile cleanup (ARM)

Group ARM objects together, TCG related ones at the bottom.
This will help when restricting TCG-only objects.

Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agotarget/arm: Makefile cleanup (Aarch64)
Philippe Mathieu-Daudé [Mon, 1 Jul 2019 16:26:19 +0000 (17:26 +0100)]
target/arm: Makefile cleanup (Aarch64)

Group Aarch64 rules together, TCG related ones at the bottom.
This will help when restricting TCG-only objects.

Reviewed-by: Alex Bennée <[email protected]>
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190701132516[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agohw/arm: Add arm SBSA reference machine, devices part
Hongbo Zhang [Mon, 1 Jul 2019 16:26:18 +0000 (17:26 +0100)]
hw/arm: Add arm SBSA reference machine, devices part

Following the previous patch, this patch adds peripheral devices to the
newly introduced SBSA-ref machine.

Signed-off-by: Hongbo Zhang <[email protected]>
Message-id: 1561890034[email protected]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agohw/arm: Add arm SBSA reference machine, skeleton part
Hongbo Zhang [Mon, 1 Jul 2019 16:26:18 +0000 (17:26 +0100)]
hw/arm: Add arm SBSA reference machine, skeleton part

For AArch64, the existing "virt" machine is primarily meant to
run on KVM and execute virtualization workloads, but we need an
environment as faithful as possible to physical hardware, for supporting
firmware and OS development for physical Aarch64 machines.

This patch introduces new machine type 'sbsa-ref' with main features:
 - Based on 'virt' machine type.
 - A new memory map.
 - CPU type cortex-a57.
 - EL2 and EL3 are enabled.
 - GIC version 3.
 - System bus AHCI controller.
 - System bus EHCI controller.
 - CDROM and hard disc on AHCI bus.
 - E1000E ethernet card on PCIE bus.
 - VGA display adaptor on PCIE bus.
 - No virtio devices.
 - No fw_cfg device.
 - No ACPI table supplied.
 - Only minimal device tree nodes.

Arm Trusted Firmware and UEFI porting to this are done accordingly,
and the firmware should supply ACPI tables to the guest OS.  The
minimal device tree nodes supplied by QEMU for this platform are only
to pass the dynamic info reflecting command line input to firmware,
not for loading the guest OS.

To make the review easier, this task is split into two patches, the
fundamental skeleton part and the peripheral devices part; this patch is
the first part.

Signed-off-by: Hongbo Zhang <[email protected]>
Message-id: 1561890034[email protected]
[PMM: commit message tweaks; moved some bits between patch 1 and 2
 to ensure patch 1 builds cleanly; removed unneeded lines from
 Kconfig stanza; only provide board for qemu-system-aarch64, not
 qemu-system-arm; added MAINTAINERS entry]
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed: Link SCU to the watchdog
Joel Stanley [Mon, 1 Jul 2019 16:26:18 +0000 (17:26 +0100)]
aspeed: Link SCU to the watchdog

The ast2500 uses the watchdog to reset the SDRAM controller. This
operation is usually performed by u-boot's memory training procedure,
and it is enabled by setting a bit in the SCU and then causing the
watchdog to expire. Therefore, we need the watchdog to be able to
access the SCU's register space.

This causes the watchdog to not perform a system reset when the bit is
set. In the future it could perform a reset of the SDMC model.

Signed-off-by: Joel Stanley <[email protected]>
Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190621065242[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed: vic: Add support for legacy register interface
Andrew Jeffery [Mon, 1 Jul 2019 16:26:18 +0000 (17:26 +0100)]
aspeed: vic: Add support for legacy register interface

The legacy interface only supported up to 32 IRQs, which became
restrictive around the AST2400 generation. QEMU support for the SoCs
started with the AST2400 along with an effort to reimplement and
upstream drivers for Linux, so up until this point the consumers of the
QEMU ASPEED support only required the 64 IRQ register interface.

In an effort to support older BMC firmware, add support for the 32 IRQ
interface.

Signed-off-by: Andrew Jeffery <[email protected]>
Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agohw/misc/aspeed_xdma: New device
Eddie James [Mon, 1 Jul 2019 16:26:18 +0000 (17:26 +0100)]
hw/misc/aspeed_xdma: New device

The XDMA engine embedded in the Aspeed SOCs performs PCI DMA operations
between the SOC (acting as a BMC) and a host processor in a server.

The XDMA engine exists on the AST2400, AST2500, and AST2600 SOCs, so
enable it for all of those. Add trace events on the important register
writes in the XDMA engine.

Signed-off-by: Eddie James <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Cédric Le Goater <[email protected]>
Message-id: 20190618165311[email protected]
[clg: - changed title ]
Signed-off-by: Cédric Le Goater <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed: Add support for the swift-bmc board
Adriana Kobylak [Mon, 1 Jul 2019 16:26:17 +0000 (17:26 +0100)]
aspeed: Add support for the swift-bmc board

The Swift board is an OpenPOWER system hosting POWER processors.
Add support for their BMC including the I2C devices as found on HW.

Signed-off-by: Adriana Kobylak <[email protected]>
Reviewed-by: Cédric Le Goater <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed/smc: add a 'sdram_base' property
Cédric Le Goater [Mon, 1 Jul 2019 16:26:17 +0000 (17:26 +0100)]
aspeed/smc: add a 'sdram_base' property

The DRAM address of a DMA transaction depends on the DRAM base address
of the SoC. Inform the SMC controller model with this value.

Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed: add a RAM memory region container
Cédric Le Goater [Mon, 1 Jul 2019 16:26:17 +0000 (17:26 +0100)]
aspeed: add a RAM memory region container

The RAM memory region is defined after the SoC is realized when the
SDMC controller has checked that the defined RAM size for the machine
is correct. This is problematic for controller models requiring a link
on the RAM region, for DMA support in the SMC controller for instance.

Introduce a container memory region for the RAM that we can link into
the controllers early, before the SoC is realized. It will be
populated with the RAM region after the checks have be done.

Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed: remove the "ram" link
Cédric Le Goater [Mon, 1 Jul 2019 16:26:17 +0000 (17:26 +0100)]
aspeed: remove the "ram" link

It has never been used as far as I can tell from the git history.

Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed/timer: Ensure positive muldiv delta
Christian Svensson [Mon, 1 Jul 2019 16:26:17 +0000 (17:26 +0100)]
aspeed/timer: Ensure positive muldiv delta

If the host decrements the counter register that results in a negative
delta. This is then passed to muldiv64 which only handles unsigned
numbers resulting in bogus results.

This fix ensures the delta being operated on is positive.

Test case: kexec a kernel using aspeed_timer and it will freeze on the
second bootup when the kernel initializes the timer. With this patch
that no longer happens and the timer appears to run OK.

Signed-off-by: Christian Svensson <[email protected]>
Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
Reviewed-by: Andrew Jeffery <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed/timer: Fix match calculations
Andrew Jeffery [Mon, 1 Jul 2019 16:26:17 +0000 (17:26 +0100)]
aspeed/timer: Fix match calculations

If the match value exceeds reload then we don't want to include it in
calculations for the next event.

Signed-off-by: Andrew Jeffery <[email protected]>
Signed-off-by: Cédric Le Goater <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed/timer: Status register contains reload for stopped timer
Andrew Jeffery [Mon, 1 Jul 2019 16:26:16 +0000 (17:26 +0100)]
aspeed/timer: Status register contains reload for stopped timer

From the datasheet:

  This register stores the current status of counter #N. When timer
  enable bit TMC30[N * b] is disabled, the reload register will be
  loaded into this counter. When timer bit TMC30[N * b] is set, the
  counter will start to decrement. CPU can update this register value
  when enable bit is set.

Signed-off-by: Andrew Jeffery <[email protected]>
Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed/timer: Fix behaviour running Linux
Joel Stanley [Mon, 1 Jul 2019 16:26:16 +0000 (17:26 +0100)]
aspeed/timer: Fix behaviour running Linux

The Linux kernel driver was updated in commit 4451d3f59f2a
("clocksource/drivers/fttmr010: Fix set_next_event handler) to fix an
issue observed on hardware:

 > RELOAD register is loaded into COUNT register when the aspeed timer
 > is enabled, which means the next event may be delayed because timer
 > interrupt won't be generated until <0xFFFFFFFF - current_count +
 > cycles>.

When running under Qemu, the system appeared "laggy". The guest is now
scheduling timer events too regularly, starving the host of CPU time.

This patch modifies the timer model to attempt to schedule the timer
expiry as the guest requests, but if we have missed the deadline we
re interrupt and try again, which allows the guest to catch up.

Provides expected behaviour with old and new guest code.

Fixes: c04bd47db6b9 ("hw/timer: Add ASPEED timer device model")
Signed-off-by: Joel Stanley <[email protected]>
Signed-off-by: Cédric Le Goater <[email protected]>
Message-id: 20190618165311[email protected]
[clg: - merged a fix from Andrew Jeffery <[email protected]>
        "Fire interrupt on failure to meet deadline"
        https://lists.ozlabs.org/pipermail/openbmc/2019-January/014641.html
      - adapted commit log
      - checkpatch fixes ]
Signed-off-by: Cédric Le Goater <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed: add support for multiple NICs
Cédric Le Goater [Mon, 1 Jul 2019 16:26:16 +0000 (17:26 +0100)]
aspeed: add support for multiple NICs

The Aspeed SoCs have two MACs. Extend the Aspeed model to support a
second NIC.

Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed: introduce a configurable number of CPU per machine
Cédric Le Goater [Mon, 1 Jul 2019 16:26:16 +0000 (17:26 +0100)]
aspeed: introduce a configurable number of CPU per machine

The current models of the Aspeed SoCs only have one CPU but future
ones will support SMP. Introduce a new num_cpus field at the SoC class
level to define the number of available CPUs per SoC and also
introduce a 'num-cpus' property to activate the CPUs configured for
the machine.

The max_cpus limit of the machine should depend on the SoC definition
but, unfortunately, these values are not available when the machine
class is initialized. This is the reason why we add a check on
num_cpus in the AspeedSoC realize handler.

SMP support will be activated when models for such SoCs are implemented.

Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agohw/arm/aspeed: Add RTC to SoC
Joel Stanley [Mon, 1 Jul 2019 16:26:16 +0000 (17:26 +0100)]
hw/arm/aspeed: Add RTC to SoC

All systems have an RTC.

The IRQ is hooked up but the model does not use it at this stage. There
is no guest code that uses it, so this limitation is acceptable.

Signed-off-by: Joel Stanley <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agohw: timer: Add ASPEED RTC device
Joel Stanley [Mon, 1 Jul 2019 16:26:15 +0000 (17:26 +0100)]
hw: timer: Add ASPEED RTC device

The RTC is modeled to provide time and date functionality. It is
initialised at zero to match the hardware.

There is no modelling of the alarm functionality, which includes the IRQ
line. As there is no guest code to exercise this function that is
acceptable for now.

Signed-off-by: Joel Stanley <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed: add a per SoC mapping for the memory space
Cédric Le Goater [Mon, 1 Jul 2019 16:26:15 +0000 (17:26 +0100)]
aspeed: add a per SoC mapping for the memory space

This will simplify the definition of new SoCs, like the AST2600 which
should use a slightly different address space and have a different set
of controllers.

Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agoaspeed: add a per SoC mapping for the interrupt space
Cédric Le Goater [Mon, 1 Jul 2019 16:26:15 +0000 (17:26 +0100)]
aspeed: add a per SoC mapping for the interrupt space

This will simplify the definition of new SoCs, like the AST2600 which
should use a different CPU and a different IRQ number layout.

Signed-off-by: Cédric Le Goater <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Joel Stanley <[email protected]>
Message-id: 20190618165311[email protected]
Signed-off-by: Peter Maydell <[email protected]>
5 years agoi.mx7d: pci: Update PCI IRQ mapping to match HW
Andrey Smirnov [Mon, 1 Jul 2019 16:26:15 +0000 (17:26 +0100)]
i.mx7d: pci: Update PCI IRQ mapping to match HW

Datasheet for i.MX7 is incorrect and i.MX7's PCI IRQ mapping matches
that of i.MX6:

    * INTD/MSI    122
    * INTC        123
    * INTB        124
    * INTA        125

Fix all of the relevant code to reflect that fact. Needed by latest
Linux kernels.

(Reference: Linux kernel commit 538d6e9d597584e80 from an
NXP employee confirming that the datasheet is incorrect and
with a report of a test against hardware.)

Signed-off-by: Andrey Smirnov <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Reviewed-by: Peter Maydell <[email protected]>
[PMM: added ref to kernel commit confirming the datasheet error]
Signed-off-by: Peter Maydell <[email protected]>
5 years agopci: designware: Update MSI mapping when MSI address changes
Andrey Smirnov [Mon, 1 Jul 2019 16:26:15 +0000 (17:26 +0100)]
pci: designware: Update MSI mapping when MSI address changes

MSI mapping needs to be update when MSI address changes, so add the
code to do so.

Signed-off-by: Andrey Smirnov <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Acked-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agopci: designware: Update MSI mapping unconditionally
Andrey Smirnov [Mon, 1 Jul 2019 16:26:15 +0000 (17:26 +0100)]
pci: designware: Update MSI mapping unconditionally

Expression to calculate update_msi_mapping in code handling writes to
DESIGNWARE_PCIE_MSI_INTR0_ENABLE is missing an ! operator and should
be:

    !!root->msi.intr[0].enable ^ !!val;

so that MSI mapping is updated when enabled transitions from either
"none" -> "any" or "any" -> "none". Since that register shouldn't be
written to very often, change the code to update MSI mapping
unconditionally instead of trying to fix the update_msi_mapping logic.

Signed-off-by: Andrey Smirnov <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Acked-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
5 years agoi.mx7d: Add no-op/unimplemented PCIE PHY IP block
Andrey Smirnov [Mon, 1 Jul 2019 16:26:14 +0000 (17:26 +0100)]
i.mx7d: Add no-op/unimplemented PCIE PHY IP block

Add no-op/unimplemented PCIE PHY IP block. Needed by new kernels to
use PCIE.

Signed-off-by: Andrey Smirnov <[email protected]>
Cc: Peter Maydell <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Cc: [email protected]
Cc: [email protected]
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Signed-off-by: Peter Maydell <[email protected]>
This page took 0.095063 seconds and 4 git commands to generate.