On 2024/02/14 16:54, Michael S. Tsirkin wrote:
On Wed, Feb 14, 2024 at 02:13:45PM +0900, Akihiko Odaki wrote:
Release VFs failed to realize just as we do in unregister_vfs().
Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization
(SR/IOV)")
Signed-off-by: Akihiko Odaki
I
On 2024/02/14 16:05, Marc-André Lureau wrote:
Hi Akihiko
On Wed, Feb 14, 2024 at 9:39 AM Akihiko Odaki wrote:
Move dbus_display1 from ui to util as it's used not only by ui/dbus but
also dbus-display-test.
It doesn't seem like the right place either. So let's focus on what
this is fixing.
On Wed, Feb 14, 2024 at 02:13:45PM +0900, Akihiko Odaki wrote:
> Release VFs failed to realize just as we do in unregister_vfs().
>
> Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization
> (SR/IOV)")
> Signed-off-by: Akihiko Odaki
Is this fixing an old bug or a bug introdu
On Wed, Feb 14, 2024 at 02:13:44PM +0900, Akihiko Odaki wrote:
> Disable SR-IOV VF devices by reusing code to power down PCI devices
> instead of removing them when the guest requests to disable VFs. This
> allows to realize devices and report VF realization errors at PF
> realization time.
>
> Si
On 14/2/24 08:37, Philippe Mathieu-Daudé wrote:
On 12/2/24 13:32, Peter Maydell wrote:
So I would like to explore whether we can deprecate-and-drop
some or all of them. This would let us delete the code entirely
rather than spending a long time trying to bring it up to scratch
for a probably ve
On 2/13/24 19:28, Eric Auger wrote:
We are missing an entry for the virtio-iommu-pci device. Add the
information on which machine it is currently supported and document
the new aw-bits option.
Signed-off-by: Eric Auger
---
qemu-options.hx | 8
1 file changed, 8 insertions(+)
diff -
On 12/2/24 13:32, Peter Maydell wrote:
So I would like to explore whether we can deprecate-and-drop
some or all of them. This would let us delete the code entirely
rather than spending a long time trying to bring it up to scratch
for a probably very small to nonexistent userbase. The aim of this
On 2/13/24 09:39, Nicholas Piggin wrote:
The move to decodetree flipped the inequality test for the VEC / VSX
MSR facility check.
This caused application crashes under Linux, where these facility
unavailable interrupts are used for lazy-switching of VEC/VSX register
sets. Getting the incorrect i
On 2/13/24 16:36, Philippe Mathieu-Daudé wrote:
On 1/2/24 17:46, Peter Maydell wrote:
On Tue, 30 Jan 2024 at 19:03, Philippe Mathieu-Daudé wrote:
QDev objects created with qdev_new() need to manually add
their parent relationship with object_property_add_child().
Since we don't model the SoC
On Wed, Feb 14, 2024 at 02:13:47PM +0900, Akihiko Odaki wrote:
> NumVFs may not equal to the current effective number of VFs because VF
> Enable is cleared, NumVFs is set after VF Enable is set, or NumVFs is
> greater than TotalVFs.
>
> Fixes: 11871f53ef8e ("hw/nvme: Add support for the Virtualiza
Hi Akihiko
On Wed, Feb 14, 2024 at 9:39 AM Akihiko Odaki wrote:
>
> Move dbus_display1 from ui to util as it's used not only by ui/dbus but
> also dbus-display-test.
It doesn't seem like the right place either. So let's focus on what
this is fixing.
> dbus_display1 is now added to util_ss accor
On 13/2/24 19:57, Bernhard Beschow wrote:
Am 13. Februar 2024 12:01:49 UTC schrieb "Philippe Mathieu-Daudé"
:
Since pc_madt_cpu_entry() is only used by:
- hw/i386/acpi-build.c // single call
- hw/i386/acpi-common.c // definition
there is no need to expose it outside of hw/i386/.
Declare it
On Wed, Feb 14, 2024 at 02:13:46PM +0900, Akihiko Odaki wrote:
> I couldn't find such a behavior specified.
Is it fixing a bug or just removing unnecessary code?
Is this guest visible at all?
> Signed-off-by: Akihiko Odaki
> ---
> hw/pci/pcie_sriov.c | 1 -
> 1 file changed, 1 deletion(-)
>
>
On Wed, Feb 14, 2024 at 02:13:43PM +0900, Akihiko Odaki wrote:
> The guest may write NumVFs greater than TotalVFs and that can lead
> to buffer overflow in VF implementations.
>
> Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization
> (SR/IOV)")
> Signed-off-by: Akihiko Odak
On Wed, Feb 14, 2024 at 02:13:40PM +0900, Akihiko Odaki wrote:
> vfio determines if rombar is explicitly enabled by inspecting QDict.
> Inspecting QDict is not nice because QDict is untyped and depends on the
> details on the external interface. Add an infrastructure to determine if
> rombar is exp
The __linux__ version of qemu_chr_open_pp_fd() tries to claim the
parport device with a PPCLAIM ioctl(). On success, it stores the file
descriptor in the chardev object, and returns success. On failure, it
closes the file descriptor, and returns failure.
chardev_new() then passes the Chardev to
Character backends are actually QOM types. When a backend's
compile-time conditional QOM type is not compiled in, creation fails
with "'FOO' is not a valid char driver name". Okay, except
introspecting chardev-add with query-qmp-schema doesn't work then: the
backend type is there even though the
It's an alias for "ringbuf" we kept for backward compatibility; see
commit 3a1da42eb35 (qapi: Rename ChardevBackend member "memory" to
"ringbuf"). Deprecation is long overdue.
Signed-off-by: Markus Armbruster
Message-ID: <20240203080228.2766159-5-arm...@redhat.com>
Reviewed-by: Marc-André Lureau
I offered Marc-André to do this pull request, and he accepted.
The following changes since commit 5d1fc614413b10dd94858b07a1b2e26b1aa0296c:
Merge tag 'migration-staging-pull-request' of https://gitlab.com/peterx/qemu
into staging (2024-02-09 11:22:20 +)
are available in the Git repository
qemu_socket() and make_udp_socket() return a file descriptor on
success, -1 on failure. The check misinterprets 0 as failure. Fix
that.
Signed-off-by: Markus Armbruster
Message-ID: <20240203080228.2766159-3-arm...@redhat.com>
Reviewed-by: Marc-André Lureau
Reviewed-by: Eric Blake
---
tests/u
* Aaro Koskinen [240214 01:27]:
> On Tue, Feb 13, 2024 at 09:11:38PM +0100, Arnd Bergmann wrote:
> > I think Tony still tests these on both hardware and qemu.
> > The platform side here is much more modern than any of the
> > others above since it does use DT and it has enough RAM
> > to be somewh
Move dbus_display1 from ui to util as it's used not only by ui/dbus but
also dbus-display-test.
dbus_display1 is now added to util_ss accordingly. It ensures that the
source will be linked with audio/dbus, and also avoids recompilation
when linking with dbus-display-test.
dbus-display.h is also a
The guest may write NumVFs greater than TotalVFs and that can lead
to buffer overflow in VF implementations.
Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization
(SR/IOV)")
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 3 +++
1 file changed, 3 insertions(+)
diff
NumVFs may not equal to the current effective number of VFs because VF
Enable is cleared, NumVFs is set after VF Enable is set, or NumVFs is
greater than TotalVFs.
Fixes: 11871f53ef8e ("hw/nvme: Add support for the Virtualization Management
command")
Signed-off-by: Akihiko Odaki
---
hw/nvme/ctr
I couldn't find such a behavior specified.
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sriov.c
index 9d668b8d6c17..410bc090fc58 100644
--- a/hw/pci/pcie_sriov.c
+++ b/hw/pci/pcie_sriov.c
@@ -209,7 +209,
vfio determines if rombar is explicitly enabled by inspecting QDict.
Inspecting QDict is not nice because QDict is untyped and depends on the
details on the external interface. Add an infrastructure to determine if
rombar is explicitly enabled to hw/pci.
Signed-off-by: Akihiko Odaki
---
include/
It is no longer used.
Signed-off-by: Akihiko Odaki
Reviewed-by: Philippe Mathieu-Daudé
---
include/hw/qdev-core.h | 4
hw/core/qdev.c | 1 -
system/qdev-monitor.c | 12 +++-
3 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/include/hw/qdev-core.h b/include/
I submitted a RFC series[1] to add support for SR-IOV emulation to
virtio-net-pci. During the development of the series, I fixed some
trivial bugs and made improvements that I think are independently
useful. This series extracts those fixes and improvements from the RFC
series. Below is an explanat
Currently there is no way to distinguish the case that rombar is
explicitly specified as 1 and the case that rombar is not specified.
Set rombar -1 by default to distinguish these cases just as it is done
for addr and romsize. It was confirmed that changing the default value
to -1 will not change
Release VFs failed to realize just as we do in unregister_vfs().
Fixes: 7c0fa8dff811 ("pcie: Add support for Single Root I/O Virtualization
(SR/IOV)")
Signed-off-by: Akihiko Odaki
---
hw/pci/pcie_sriov.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/pci/pcie_sriov.c b/hw/pci/pcie_sri
Disable SR-IOV VF devices by reusing code to power down PCI devices
instead of removing them when the guest requests to disable VFs. This
allows to realize devices and report VF realization errors at PF
realization time.
Signed-off-by: Akihiko Odaki
---
docs/pcie_sriov.txt | 8 ++--
in
Use pci_rom_bar_explicitly_enabled() to determine if rombar is explicitly
enabled.
Signed-off-by: Akihiko Odaki
---
hw/vfio/pci.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 4fa387f0430d..647f15b2a060 100644
--- a/hw/vfio/pci.c
+++ b/
The assertion was never correct, because the alignment is a composite
of the image alignment and SHMLBA. Even if the alignment didn't match
the image an assertion would not be correct -- more appropriate would
be an error message about an ill formed image. But the image cannot
be held to SHMLBA u
Core Graphics is not accelerated and slow.
Signed-off-by: Akihiko Odaki
---
ui/cocoa.m | 23 +--
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index fe0eb74b0743..cb6090905999 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -496,10 +496,8
Evaluate [normalWindow styleMask] & NSWindowStyleMaskResizable instead.
Signed-off-by: Akihiko Odaki
---
ui/cocoa.m | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index aeec3c48859c..0ed40cd97d28 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@
console_select() can be called anytime so explicitly take the BQL.
Signed-off-by: Akihiko Odaki
---
ui/cocoa.m | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index a1f54b3ebb9a..aeec3c48859c 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1390,7 +1390
The window will be resizable when zoom-to-fit is on.
Signed-off-by: Akihiko Odaki
---
ui/cocoa.m | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index 518fae26f6f4..a1f54b3ebb9a 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -1378,8 +1378,10 @@ - (void)zoomToFit:(id)
It allows making the window full screen by clicking full screen button
provided by the platform (the left-top green button) and save some code.
Signed-off-by: Akihiko Odaki
---
ui/cocoa.m | 423 ++---
1 file changed, 207 insertions(+), 216
V5 -> V6:
Rebased.
Signed-off-by: Akihiko Odaki
---
Changes in v10:
- Removed relative mouse input scaling.
- Link to v9:
https://lore.kernel.org/r/20240213-cocoa-v9-0-d5a5e1bf0...@daynix.com
Changes in v9:
- Split patch "ui/cocoa: Use NSWindow's ability to resize" into p
ui/cocoa used to release all mouse buttons when it sees
NSEventTypeLeftMouseUp, NSEventTypeRightMouseUp, or
NSEventTypeOtherMouseUp, but it can instead release specific one
according to the delivered event.
Signed-off-by: Akihiko Odaki
---
ui/cocoa.m | 132 ++-
Rather than reading P0 from the env, pass it explicitly
Signed-off-by: Taylor Simpson
Reviewed-by: Anton Johansson
Tested-by: Anton Johansson
---
target/hexagon/macros.h | 4 ++--
target/hexagon/hex_common.py | 12 +++-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --gi
Currently, we pass env to every generated helper. When the semantics of
the instruction only depend on the arguments, this is unnecessary and
adds extra overhead to the helper call.
Changes in v3
Update copyright year to 2024
Mark Reviewed-by/Tested-by: Anton Johansson
Changes in
Rather than reading SP from the env, pass it explicitly
Signed-off-by: Taylor Simpson
Reviewed-by: Anton Johansson
Tested-by: Anton Johansson
---
target/hexagon/macros.h | 2 +-
target/hexagon/attribs_def.h.inc | 3 ++-
target/hexagon/hex_common.py | 11 +++
3 files chan
Currently, we pass env to every generated helper. When the semantics of
the instruction only depend on the arguments, this is unnecessary and
adds extra overhead to the helper call.
We add the TCG_CALL_NO_RWG_SE flag to any non-HVX helpers that don't get
the ptr to env.
The A2_nop and SA1_setin1
On Fri, Feb 9, 2024 at 4:20 AM Fabiano Rosas wrote:
>
> Hao Xiang writes:
>
> > On Fri, Feb 2, 2024 at 2:30 AM wrote:
> >>
> >> From: Peter Xu
> >>
> >> This array is redundant when p->pages exists. Now we extended the life of
> >> p->pages to the whole period where pending_job is set, it shou
ository at:
https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20240213
for you to fetch changes up to e41f1825b43796c3508ef309ed0b150ef89acc44:
tcg/arm: Fix goto_tb for large translation blocks (2024-02-13 07:42:45 -1000)
tcg
Hi,
On Tue, Feb 13, 2024 at 09:11:38PM +0100, Arnd Bergmann wrote:
> On Tue, Feb 13, 2024, at 16:36, Guenter Roeck wrote:
> >> > > OMAP1 machines:
> >> > >
> >> > > cheetah Palm Tungsten|E aka. Cheetah PDA (OMAP310)
> >> > > sx1 Siemens SX1 (OMAP310) V2
> >> > > sx1-v
We need values 0-3 for TCG_TYPE_I128 on 32-bit hosts.
Cc: qemu-sta...@nongnu.org
Fixes: 43eef72f4109 ("tcg: Add temp allocation for TCGv_i128")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2159
Signed-off-by: Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Michael T
The following changes since commit bc2e8b18fba33f30f25b7c2d74328493c0a2231d:
Merge tag 'hppa64-pull-request' of https://github.com/hdeller/qemu-hppa into
staging (2024-02-13 13:56:46 +)
are available in the Git repository at:
https://gitlab.com/rth7680/qemu.git tags/pull-tc
Correct arithmetic for separating high and low
on a large negative number.
Cc: qemu-sta...@nongnu.org
Fixes: 79ffece4447 ("tcg/arm: Implement direct branch for goto_tb")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1714
Signed-off-by: Richard Henderson
Reviewed-by: Michael Tokarev
---
On Tue, Jan 30, 2024 at 7:10 PM Gurchetan Singh
wrote:
>
>
> On Fri, Jan 26, 2024 at 6:23 AM Alyssa Ross wrote:
>
>> Gurchetan Singh writes:
>>
>> > On Sat, Jan 20, 2024 at 4:19 AM Alyssa Ross wrote:
>> >
>> >> Gurchetan Singh writes:
>> >>
>> >> > On Fri, Jan 19, 2024 at 1:13 PM Alyssa Ross
On 1/30/24 03:47, Ilya Leoshkevich wrote:
I wonder if it would make sense to add something like the following to
this patch?
--- a/page-vary-target.c
+++ b/page-vary-target.c
@@ -26,8 +26,7 @@
bool set_preferred_target_page_bits(int bits)
{
#ifdef TARGET_PAGE_BITS_VARY
-assert(bits >=
On Tue, Feb 13, 2024 at 9:12 PM Arnd Bergmann wrote:
> On Tue, Feb 13, 2024, at 16:36, Guenter Roeck wrote:
> > On Tue, Feb 13, 2024 at 03:14:21PM +, Peter Maydell wrote:
> >> On Mon, 12 Feb 2024 at 14:36, Guenter Roeck wrote:
> >> > On 2/12/24 04:32, Peter Maydell wrote:
> >> > > The one SA
On Sat, 3 Feb 2024 at 06:30, Michael Tokarev wrote:
>
> 03.02.2024 12:01, Michael Tokarev wrote:
> ...
> > This change broke something in 7.2. I'm still debugging it, will
> > come with a follow-up once some more details are found, I'll also
> > check current master with and without this commit.
>
This is the behaviour documented in the datasheet and allows the state machine
to correctly process multiple consecutive TI commands.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-63-mark.cave-ayl...@ilande.co.uk>
Signed-off-by
This brings DATA OUT transfers in line with DATA IN transfers by ensuring that
the guest visible function complete interrupt is only set once the SCSI layer
has returned.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-61-mark.ca
The latest state machines can handle mixing DMA and non-DMA FIFO access for all
SCSI phases except DATA IN and DATA OUT. For DATA IN and DATA OUT phases, the
transfer is complete when TC == 0 and the updated logic will now handle TC
underflow correctly, which makes it just about impossible to manua
Currently any write to the ESP FIFO in the MESSAGE OUT or COMMAND phases will
manually raise the bus service interrupt. Instead of duplicating the interrupt
logic in esp_reg_write(), update esp_do_nodma() to correctly process incoming
FIFO data during the MESSAGE OUT and COMMAND phases. Part of thi
The special logic in satn_stop_pdma_cb() is now no longer required since
esp_do_dma() can be used as a direct replacement.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-53-mark.cave-ayl...@ilande.co.uk>
Signed-off-by: Mark Cave
The use of the DEFINE_TYPES() macro will soon be recommended over the use of
calling type_init() directly.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Reviewed-by: Philippe Mathieu-Daudé
Message-Id: <20240112125420.514425-88-mark.cave-ayl...@ilande.co.uk>
Sig
On 13/02/2024 13:03, Philippe Mathieu-Daudé wrote:
Inline cpu_create() in order to call
qdev_init_gpio_in_named_with_opaque()
before the CPU is realized.
Note that with the previous new patch included in the series,
qdev_init_gpio_in_named_with_opaque() should be replaced by
qdev_init_gpio_i
On 13/02/2024 13:03, Philippe Mathieu-Daudé wrote:
By passing a DeviceState context to a QDev IRQ handler,
we can simplify and use qdev_init_gpio_in_named() instead
of qdev_init_gpio_in_named_with_opaque().
Suggested-by: Mark Cave-Ayland
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sparc/le
On Tue, Feb 13, 2024, at 16:36, Guenter Roeck wrote:
> On Tue, Feb 13, 2024 at 03:14:21PM +, Peter Maydell wrote:
>> On Mon, 12 Feb 2024 at 14:36, Guenter Roeck wrote:
>> > On 2/12/24 04:32, Peter Maydell wrote:
>> > > The machines I have in mind are:
>> > >
>> > > PXA2xx machines:
>> > >
>> >
This moves the remaining non-DMA STATUS and MESSAGE IN phase logic from
write_response() to esp_do_nodma(). Note that we can also now drop the extra
fifo_reset() which is no longer required.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <202401121254
Currently the DRQ IRQ is updated every time DMA data is sent/received which
is both inefficient and causes excessive logging of the DRQ state. Add a
new drq_state bool that only updates the DRQ IRQ if its state changes.
This commit adds the new drq_state bool to the migration state: since the
vers
Now that the DMA logic is identical between do_dma_pdma_cb() and esp_do_dma()
we can replace do_dma_pdma_cb() with esp_do_dma().
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-54-mark.cave-ayl...@ilande.co.uk>
Signed-off-by: Mar
This allows the removal of duplicate logic shared between the two
implementations.
Note that we restrict esp_raise_drq() to PDMA to help reduce the log verbosity
for normal DMA.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-81
The handling of the INTR_FC and INTR_BS bits is different depending upon the
last command executed by the ESP. Note that currently INTR_FC is managed
elsewhere, but that will change soon.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.
The ESP_RSEQ logic is scattered in a few places throughout the ESP state machine
which is mainly because the ESP_RSEQ register isn't always reset when executing
an ESP select command. Once this is done, the ESP_RSEQ register only needs to be
updated at the point where the sequencer command complete
Note that this is a migration break for the q800 machine because the extra PDMA
information is no longer included.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-57-mark.cave-ayl...@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland
The IRQ represented by irq_data is actually the DRQ (DMA request) line so rename
it accordingly.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-86-mark.cave-ayl...@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland
---
hw/scsi/esp.
This is to allow the logic to be moved during the next commit.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-66-mark.cave-ayl...@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland
---
hw/scsi/esp.c | 51 +++
Detect the case where the guest underflows TC by requesting a DMA transfer which
is larger than the available data. If this case is detected, immediately
complete the SCSI request and handle any remaining FIFO accesses in the STATUS
phase by raising INTR_BS once the FIFO is below the threshold.
No
The contents of the FIFO should only be copied to cmdfifo for ESP commands that
are sending data to the SCSI bus, which are the SEL_* commands and the TI
command. Otherwise any incoming data should be held in the FIFO as normal.
This fixes booting of really old 32-bit SPARC Linux kernels such as A
Certain versions of MacOS send the first 5 bytes of the CDB using DMA and then
send the last byte of the CDB by writing to the FIFO. Update the non-DMA state
machine to detect the end of the CDB and execute the SCSI command using similar
logic as that which already exists for transferring the remai
Whilst the FIFO is used a storage buffer for both DMA and non-DMA requests, the
loading and unloading is managed directly issuing commands to the ESP. As a
result there is no need to manually invoke the non-DMA command handler.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: T
The handling of the INTR_FC and INTR_BS bits is different depending upon the
last command executed by the ESP. Note that currently INTR_FC is managed
elsewhere, but that will change soon.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.
The existing check for TC == 0 is only valid during a TI command.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-51-mark.cave-ayl...@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland
---
hw/scsi/esp.c | 32 ++--
The contents of the FIFO should only be copied to cmdfifo for ESP commands that
are sending data to the SCSI bus, which are the SEL_* commands and the TI
command. Otherwise any incoming data should be held in the FIFO as normal.
This fixes booting of NetBSD m68k under the Q800 machine once again.
There is now only a single implementation contained within esp_do_dma() so
call it directly.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-56-mark.cave-ayl...@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland
---
hw/scsi/esp.c |
The Transfer Pad command is used to either drop incoming FIFO data during the
DATA IN phase or generate a series of zero bytes in the FIFO during the DATA
OUT phase.
Implement the DMA Transfer Pad command for the DATA phases which is used by
the NeXTCube firmware in the DATA IN phase to ignore par
This allows the removal of duplicate logic shared between the two
implementations.
Note that we restrict esp_raise_drq() to PDMA to help reduce the log verbosity
for normal DMA.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-83
According to the documentation ESP_RSTAT is cleared (except the STAT_TC bit)
when ESP_RINTR is read. This should not include the SCSI bus phase bits which
are currently live from the SCSI bus, otherwise the current SCSI phase is lost
when clearing an end-of-transfer interrupt.
Signed-off-by: Mark
This brings esp_do_nodma() in line with esp_do_dma().
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-84-mark.cave-ayl...@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland
---
hw/scsi/esp.c | 40
Now that the esp_do_nodma() state machine correctly handles incoming FIFO
data, all remaining users of get_cmd() can be replaced with esp_do_nodma()
and the get_cmd() function removed completely.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <2024011
This series has involved rewriting and/or updating a considerable part of the
ESP
emulation so update the copyright in esp.c to reflect this.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-89-mark.cave-ayl...@ilande.co.uk>
Sign
This field is currently used to handle deferred interrupts for the DATA IN phase
but the code will soon be updated to do the same for the DATA OUT phase.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-58-mark.cave-ayl...@ilande.
This can now be done using the existing logic in esp_do_dma() and
do_dma_pdma_cb().
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-52-mark.cave-ayl...@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland
---
hw/scsi/esp.c | 22 +
According to the datasheet the previous ESP command remains in the ESP_CMD
register, which caused a problem when consecutive TI commands were issued as
it becomes impossible for the state machine to know when the first TI
command finishes.
This was the original reason for introducing the ti_cmd fi
This variable can be replaced by the existing len variable.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-82-mark.cave-ayl...@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland
---
hw/scsi/esp.c | 8 +++-
1 file changed, 3 ins
This allows the removal of duplicate logic shared between the two
implementations.
Note that we restrict esp_raise_drq() to PDMA to help reduce the log verbosity
for normal DMA.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-80
The special logic in write_response_pdma_cb() is now no longer required since
esp_do_dma() can be used as a direct replacement.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-55-mark.cave-ayl...@ilande.co.uk>
Signed-off-by: Mark
In the case where a SCSI command with a DATA IN phase has been issued, the host
may preload the FIFO with unaligned bytes before issuing the main DMA transfer.
When accumulating data in the FIFO don't raise the INTR_BS interrupt until the
TI command is issued, otherwise the unexpected interrupt ca
Both esp_raise_irq() and esp_lower_irq() check the STAT_INT bit in ESP_RSTAT
to ensure that the IRQ is raised or lowered if its state changes. When reading
ESP_RINTR, esp_lower_irq() was being called *after* ESP_RSTAT had been
cleared meaning that STAT_INT was already clear, and so if STAT_INT was
The end of command sequences for the ICCS command are currently different
between the DMA and non-DMA versions, and also different from the description
in the datasheet.
Update the sequence so that only INTR_FC is asserted in both cases, and keep
all the logic in esp_do_dma() and esp_do_nodma() ra
This allows the removal of duplicate logic shared between the two
implementations.
Note that we restrict esp_raise_drq() to PDMA to help reduce the log verbosity
for normal DMA.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-79
On 1/29/24 05:26, Ilya Leoshkevich wrote:
On Tue, Jan 02, 2024 at 12:57:57PM +1100, Richard Henderson wrote:
Work much harder to get alignment and mapping beyond the end
of the file correct. Both of which are excercised by our
test-mmap for alpha (8k pages) on any 4k page host.
Signed-off-by:
On 1/29/24 05:26, Ilya Leoshkevich wrote:
On Tue, Jan 02, 2024 at 12:57:57PM +1100, Richard Henderson wrote:
Work much harder to get alignment and mapping beyond the end
of the file correct. Both of which are excercised by our
test-mmap for alpha (8k pages) on any 4k page host.
Signed-off-by:
On 1/29/24 05:12, Ilya Leoshkevich wrote:
On Tue, Jan 02, 2024 at 12:57:56PM +1100, Richard Henderson wrote:
Move the MAX_FIXED_NOREPLACE check for reserved_va earlier.
Move the computation of host_prot earlier.
Signed-off-by: Richard Henderson
---
linux-user/mmap.c | 66
The special logic in satn_pdma_cb() is now no longer required since esp_do_dma()
can be used as a direct replacement.
Signed-off-by: Mark Cave-Ayland
Tested-by: Helge Deller
Tested-by: Thomas Huth
Message-Id: <20240112125420.514425-50-mark.cave-ayl...@ilande.co.uk>
Signed-off-by: Mark Cave-Ayla
1 - 100 of 370 matches
Mail list logo