- Jul 23, 2023
-
-
Thomas Huth authored
The ROM is also available at address 0, so add a proper mirror for this address. Signed-off-by:Thomas Huth <huth@tuxfamily.org>
-
Thomas Huth authored
The device is based on Bryce's code from GSoC 2011 that can be found here: https://github.com/blanham/qemu-NeXT/blob/next-cube/hw/next-net.c But this currently does not work anymore, so there is more work required here to get this up and running again. Signed-off-by:
Thomas Huth <huth@tuxfamily.org>
-
Thomas Huth authored
The network code should reside in a separate file, so remove the related handlers from next-cube.c. Signed-off-by:Thomas Huth <huth@tuxfamily.org>
-
Thomas Huth authored
-
Thomas Huth authored
-
Thomas Huth authored
The firmware of the m68k next-cube machine uses the loopback mode for self-testing the hardware and currently fails during this step. By implementing the loopback mode, we can make the firmware pass to the next step. Signed-off-by:Thomas Huth <huth@tuxfamily.org>
-
- Jul 16, 2023
-
-
Thomas Huth authored
-
The NeXTcube uses a NCR 53C90 SCSI interface for its disks, so we should be able to use the ESP controller from QEMU here. The code here has been taken from Bryce Lanham's GSoC 2011 contribution again, except for the next_scsi_init() function which has been assembled by myself as a replacement for the esp_init() function, which has been removed a while ago. Note that SCSI is (likely) not working yet. Bryce used his own extended version of the ESP device, which is not included here. I think we should rather fix our current ESP device model if necessary instead... but that is subject to later patches. Signed-off-by:
Thomas Huth <huth@tuxfamily.org> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
The A/UX timer calibration loop runs continuously until 2 consecutive iterations differ by at least 0x492 timer ticks. Modern hosts execute the timer calibration loop so fast that this situation never occurs causing a hang on boot. Use a similar method to Shoebill which is to randomly add 0x500 to the T2 counter value during calibration to enable it to eventually succeed. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
During the kernel timer calibration routine A/UX performs an unaligned access across the T2CL and T2CH registers to read the entire 16-bit value in a single memory access. Allow unaligned accesses to the VIA1 memory region such that the unaligned address and size are available within the MemoryRegionOps read and write functions. This gives two advantages: i) the unaligned accesses can be logged and ii) the original access information can be used subsequently to detect when the A/UX timer calibration is being executed. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
According to the Apple Quadra 800 Developer Note document, the Quadra 800 ROM consists of 2 ROM code sections based at offsets 0x0 and 0x800000. A/UX attempts to access the toolbox ROM at the lower offset during startup, so provide a memory alias to allow the access to succeed. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
Tests on real Q800 hardware show that the ESCC is addressable at multiple locations within the ESCC memory region - at least 0xc000, 0xc020 (as expected by the MacOS toolbox ROM) and 0xc040. All released NetBSD kernels before 10 use the 0xc000 address which causes a fatal error when running the MacOS booter. Add a single memory region alias at 0xc000 to enable NetBSD kernels to start booting under QEMU. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
When the NetBSD kernel initialises it can leave the ADB interrupt asserted depending upon where in the ADB poll cycle the MacOS ADB interrupt handler is when the NetBSD kernel disables interrupts. The NetBSD ADB driver uses the ADB interrupt state to determine if the ADB is busy and refuses to send ADB commands unless it is clear. To ensure that this doesn't happen, always clear the ADB interrupt when switching to A/UX mode to ensure that the bus enumeration always occurs. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
NetBSD switches directly to IDLE state without switching the shift register to input mode. Duplicate the existing ADB_STATE_IDLE logic in input mode from when the shift register is in output mode which allows the ADB autopoll handler to handle the response. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
NetBSD assumes it can send its first ADB command after sending the ADB_BUSRESET command in ADB_STATE_NEW without changing the state back to ADB_STATE_IDLE first as detailed in the ADB protocol. Add a workaround to detect this condition at the start of ADB enumeration and send the next command written to SR after a ADB_BUSRESET onto the bus regardless, even if we don't detect a state transition to ADB_STATE_NEW. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
The MacOS toolbox ROM calculates the number of branches that can be executed per millisecond as part of its timer calibration. Since modern hosts are considerably quicker than original hardware, the negative counter reaches zero before the calibration completes leading to division by zero later in CALCULATESLOD. Instead of trying to fudge the timing loop (which won't work for TimeDBRA/TimeSCCDB anyhow), use the pattern of access to the VIA1 registers to detect when SETUPTIMEK has finished executing and write some well-known good timer values to TimeDBRA and TimeSCCDB taken from real hardware with a suitable scaling factor. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
Update the IWM/ISM register block decoding to match the description given in the "SWIM Chip Users Reference". This allows us to validate the device response to the guest OS which currently only does just enough to indicate that the floppy drive is unavailable. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
The swim chip provides an implementation of both Apple's IWM and ISM floppy disk controllers. Split the existing implementation into separate register banks for each controller, whilst also switching the IWM registers from 16-bit to 8-bit as implemented in real hardware. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
This determines whether the Apple Sound Chip (ASC) is set to enhanced mode (default) or to original mode. The real Q800 hardware used an EASC chip however a lot of older software only works with the older ASC chip. Adding this as a machine parameter allows QEMU to be used as an developer aid for testing and migrating code from ASC to EASC. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
The Quadra 800 has the enhanced ASC (EASC) audio chip which supports both the legacy IRQ routing through VIA2 and also "A/UX" mode routing direct to the CPU. Co-developed-by:
Laurent Vivier <laurent@vivier.eu> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
MacOS (un)helpfully leaves the FIFO engine running even when all the samples have been written to the hardware, and expects the FIFO status flags and IRQ to be updated continuously. Since not all audio backends guarantee an all-zero output when no data is provided, explicitly generate at least one full output buffer of all-zero output when the FIFO is disabled and continuously if the FIFO is empty. Otherwise some audio backends such as Windows re-use their internal buffers causing the last played sound to loop indefinitely. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
The Apple Sound Chip was primarily used by the Macintosh II to generate sound in hardware which was previously handled by the toolbox ROM with software interrupts. Implement both the standard ASC and also the enhanced ASC (EASC) functionality which is used in the Quadra 800. Note that whilst real ASC hardware uses AUDIO_FORMAT_S8, this implementation uses AUDIO_FORMAT_U8 instead because AUDIO_FORMAT_S8 is rarely used and not supported by some audio backends like PulseAudio and DirectSound when played directly with -audiodev out.mixing-engine=off. Co-developed-by:
Laurent Vivier <laurent@vivier.eu> Co-developed-by:
Volker Rümelin <vr_qemu@t-online.de> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
MacOS attempts a series of writes and reads over the entire RAM area in order to determine the amount of RAM within the machine. Allow accesses to the entire RAM area ignoring writes and always reading zero for areas where there is no physical RAM installed to allow MacOS to detect the memory size without faulting. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
It is needed because it defines the BIOSConfig area. Co-developed-by:
Laurent Vivier <laurent@vivier.eu> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
Co-developed-by:
Laurent Vivier <laurent@vivier.eu> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
MacOS reads this address to identify the hardware. This is a basic implementation returning the ID of Quadra 800. Details: http://mess.redump.net/mess/driver_info/mac_technical_notes "There are 3 ID schemes [...] The third and most scalable is a machine ID register at 0x5ffffffc. The top word must be 0xa55a to be valid. Then bits 15-11 are 0 for consumer Macs, 1 for portables, 2 for high-end 68k, and 3 for high-end PowerPC. Bit 10 is 1 if additional ID bits appear elsewhere (e.g. in VIA1). The rest of the bits are a per-model identifier. Model Lower 16 bits of ID ... Quadra/Centris 610/650/800 0x2BAD" Co-developed-by:
Laurent Vivier <laurent@vivier.eu> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
The djMEMC controller is used to store information related to the physical memory configuration. Co-developed-by:
Laurent Vivier <laurent@vivier.eu> Signed-off-by:
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
Convert the GLUE device to 3-phase reset. The legacy method doesn't do anything that's invalid in the hold phase, so the conversion is simple and not a behaviour change. Signed-off-by:Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
-
- Jul 14, 2023
-
-
https://gitlab.com/bonzini/qemuRichard Henderson authored
* SCSI unit attention fix * add PCIe devices to s390x emulator * IDE unplug fix for Xen # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmSxEWkUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroPDrAf/SyGEcBr1U2v0HBwfqGcHOVPwx5Dc # jk9628klLgRF9EqEoffFfJTf9LU5Su4WsjtGLvH+GBCV0thfaPrvQJxD4KWvxgUl # SKX5zepw9GY+uiTmbyuStLo5a8ksL6z5Zvw92gKh2PEKwuicerJL7OnK8drTMXXS # haL/UL3v3Qa3OwkxBIIq9uXdZjUiSib6PQD9/u7OoY67F6/ThmtUozgcMpqR/39Q # 0AdNibteN2XlUrysS9hreC0pAmqB6luAdo7wcUR53NV7Yp0yOa1jySJRxiNvHGrB # gK7jpHL/UBjTTkBodfZD21q5Ih4Vpya2FWpg4ZZlrIEJQc2AyxCl3zw3Bg== # =Ai1b # -----END PGP SIGNATURE----- # gpg: Signature made Fri 14 Jul 2023 10:12:09 AM BST # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [undefined] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [undefined] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu : scsi: clear unit attention only for REPORT LUNS commands scsi: cleanup scsi_clear_unit_attention() scsi: fetch unit attention when creating the request kconfig: Add PCIe devices to s390x machines hw/ide/piix: properly initialize the BMIBA register Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
scsi_clear_unit_attention() now only handles REPORTED LUNS DATA HAS CHANGED. This only happens when we handle REPORT LUNS commands, so let's rename the function in scsi_clear_reported_luns_changed() and call it only in scsi_target_emulate_report_luns(). Suggested-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefano Garzarella <sgarzare@redhat.com>
Message-ID: <20230712134352.118655-4-sgarzare@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
The previous commit moved the unit attention clearing when we create the request. So now we can clean scsi_clear_unit_attention() to handle only the case of the REPORT LUNS command: this is the only case in which a UNIT ATTENTION is cleared without having been reported. Suggested-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Stefano Garzarella <sgarzare@redhat.com>
Message-ID: <20230712134352.118655-3-sgarzare@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
Commit 1880ad4f ("virtio-scsi: Batched prepare for cmd reqs") split calls to scsi_req_new() and scsi_req_enqueue() in the virtio-scsi device. No ill effects were observed until commit 8cc5583a ("virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon disk hotplug events") added a unit attention that was easy to trigger with device hotplug and hot-unplug. Because the two calls were separated, all requests in the batch were prepared calling scsi_req_new() to report a sense. The first one submitted would report the right sense and reset it to NO_SENSE, while the others reported CHECK_CONDITION with no sense data. This caused SCSI errors in Linux. To solve this issue, let's fetch the unit attention as early as possible when we prepare the request, so that only the first request in the batch will use the unit attention SCSIReqOps and the others will not report CHECK CONDITION. Fixes: 1880ad4f ("virtio-scsi: Batched prepare for cmd reqs") Fixes: ...
-
It is useful to extend the number of available PCIe devices to KVM guests for passthrough scenarios and also to expose these models to a different (big endian) architecture. Introduce a new config PCIE_DEVICES to select models, Intel Ethernet adapters and one USB controller. These devices all support MSI-X which is a requirement on s390x as legacy INTx are not supported. Cc: Matthew Rosato <mjrosato@linux.ibm.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Thomas Huth <thuth@redhat.com> Signed-off-by:
Cédric Le Goater <clg@redhat.com>
Message-ID: <20230712080146.839113-1-clg@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-
According to the 82371FB documentation (82371FB.pdf, 2.3.9. BMIBA-BUS MASTER INTERFACE BASE ADDRESS REGISTER, April 1997), the register is 32bit wide. To properly reset it to default values, all 32bit need to be cleared. Bit #0 "Resource Type Indicator (RTE)" needs to be enabled. The initial change wrote just the lower 8 bit, leaving parts of the "Bus Master Interface Base Address" address at bit 15:4 unchanged. Fixes: e6a71ae3 ("Add support for 82371FB (Step A1) and Improved support for 82371SB (Function 1)") Signed-off-by:
Olaf Hering <olaf@aepfle.de> Reviewed-by:
Bernhard Beschow <shentey@gmail.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20230712074721.14728-1-olaf@aepfle.de> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Jul 12, 2023
-
-
https://gitlab.com/stefanha/qemuRichard Henderson authored
Pull request # -----BEGIN PGP SIGNATURE----- # # iQEzBAABCAAdFiEEhpWov9P5fNqsNXdanKSrs4Grc8gFAmSvAB0ACgkQnKSrs4Gr # c8hVzAgAomXGVhqm/qnQ99SIry+kec9a1Bom4ZprvpEtiHndoq8bw/ujeUlr/XK0 # CBKdYNYY3R1rSB6yLsV2ea45elk3x/iMqygbJF3QfWxpHfx0l8vs1WB6uSQFqo/E # ext1dvP8Czc0BP4MLaijvkW2u0j8qsLQnJcu9JDrRzgD8OqJSlhOxBSmb8VDvDvx # am0RMRkYxSl7jn2LFEE4mMfUjy9JJSFhnzP8lMoGH/m8C62Eult2PFDItnTAG8hN # IAyNDCDr2LKZwe6DP9JHUKCtqNYUHnGibgKH3k9NKWgUyOHSxqtDUC9vtoTPskGf # BRo0XZM7qnSUZCoAhEjvKVWcEkFIkw== # =aHUy # -----END PGP SIGNATURE----- # gpg: Signature made Wed 12 Jul 2023 08:33:49 PM BST # gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full] # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full] * tag 'block-pull-request' of https://gitlab.com/stefanha/qemu : virtio-blk: fix host notifier issues during dataplane start/stop Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
Stefan Hajnoczi authored
The main loop thread can consume 100% CPU when using --device virtio-blk-pci,iothread=<iothread>. ppoll() constantly returns but reading virtqueue host notifiers fails with EAGAIN. The file descriptors are stale and remain registered with the AioContext because of bugs in the virtio-blk dataplane start/stop code. The problem is that the dataplane start/stop code involves drain operations, which call virtio_blk_drained_begin() and virtio_blk_drained_end() at points where the host notifier is not operational: - In virtio_blk_data_plane_start(), blk_set_aio_context() drains after vblk->dataplane_started has been set to true but the host notifier has not been attached yet. - In virtio_blk_data_plane_stop(), blk_drain() and blk_set_aio_context() drain after the host notifier has already been detached but with vblk->dataplane_started still set to true. I would like to simplify ->ioeventfd_start/stop() to avoid interactions with drain entirely, but couldn't find a way to do that. Instead, this patch accepts the fragile nature of the code and reorders it so that vblk->dataplane_started is false during drain operations. This way the virtio_blk_drained_begin() and virtio_blk_drained_end() calls don't touch the host notifier. The result is that virtio_blk_data_plane_start() and virtio_blk_data_plane_stop() have complete control over the host notifier and stale file descriptors are no longer left in the AioContext. This patch fixes the 100% CPU consumption in the main loop thread and correctly moves host notifier processing to the IOThread. Fixes: 1665d932 ("virtio-blk: implement BlockDevOps->drained_begin()") Reported-by:
Lukáš Doktor <ldoktor@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Lukas Doktor <ldoktor@redhat.com> Message-id: 20230704151527.193586-1-stefanha@redhat.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> -
https://github.com/davidhildenbrand/qemuRichard Henderson authored
Hi, "Host Memory Backends" and "Memory devices" queue ("mem"): - Memory device cleanups (especially around machine initialization) - "x-ignore-shared" migration support for virtio-mem - Add an abstract virtio-md-pci device as a common parent for virtio-mem-pci and virtio-pmem-pci (virtio based memory devices) - Device unplug support for virtio-mem-pci # -----BEGIN PGP SIGNATURE----- # # iQJFBAABCAAvFiEEG9nKrXNcTDpGDfzKTd4Q9wD/g1oFAmSuYAQRHGRhdmlkQHJl # ZGhhdC5jb20ACgkQTd4Q9wD/g1od9A/9HXT8IqKGup9is7P/mpobPWXczRGZ5sEg # /q21PzX6crr9aFa+fYRF/Dlm3G/cSMOVXFRKGz3royLjsvaEj/veEewfKF8KWbBf # eIS9udQTOwoD2kAhcv3pm0SwSJoVizpw2z7IodGVKE6iZxTXsmDksqQuFbrvVLSh # 2wtP4lizEXco/YsiCoAnStj2QtXBcHw7Ua7W2cDzxFmL+1pM5w3rjQ1ydCNz3bSG # l4CXXs1i8OmOZbFN78F/E9SEkzQnAuHSO0Sc1aeAJkwVzOt2lj/YMgt0jHjAY0at # pheWZ5pEE6hnQP740YXpt4Y6IIgO22pH23dLhq9A2reyRnwjt830uObHi3qAE8kB # KR+ZQ+Z5bI6ZNB/EFiUsC1dFsr2fF20zQlO02MctyJ+lUG6p3gpvwsGScQxt+zdF # QlkiSecGErYwC+nZ529SQB4gSEJTCjd/STDoidVYnZazdStaOaSyft02xRNzBPW/ # OnOY+6ZxZK6R11KfwGjnsftrovQIP3Pqi9TXGzW2xVlkWJHqlicy6G3ZfceTTlj9 # Gg2Ue694Wr1r4PDV2XlYcZ1IPLjSy5Msp5V2wERRrp3OItxnvegvTevQN7USEHC+ # BPGNMu11jriSY2pE5BSFN0hfGOvuvsk3GreLJiHFUXoje6gzAynuLjCN/CHdIVyK # 5i0AwdZ+xcA= # =ch6m # -----END PGP SIGNATURE----- # gpg: Signature made Wed 12 Jul 2023 09:10:44 AM BST # gpg: using RSA key 1BD9CAAD735C4C3A460DFCCA4DDE10F700FF835A # gpg: issuer "david@redhat.com" # gpg: Good signature from "David Hildenbrand <david@redhat.com>" [unknown] # gpg: aka "David Hildenbrand <davidhildenbrand@gmail.com>" [undefined] # gpg: aka "David Hildenbrand <hildenbr@in.tum.de>" [unknown] # gpg: WARNING: This key is not certified with a trusted signature! # gpg: There is no indication that the signature belongs to the owner. # Primary key fingerprint: 1BD9 CAAD 735C 4C3A 460D FCCA 4DDE 10F7 00FF 835A * tag 'mem-2023-07-12' of https://github.com/davidhildenbrand/qemu : (21 commits) virtio-mem-pci: Device unplug support virtio-mem: Prepare for device unplug support virtio-md-pci: Support unplug requests for compatible devices virtio-md-pci: Handle unplug of virtio based memory devices arm/virt: Use virtio-md-pci (un)plug functions pc: Factor out (un)plug handling of virtio-md-pci devices virtio-md-pci: New parent type for virtio-mem-pci and virtio-pmem-pci virtio-mem: Support "x-ignore-shared" migration migration/ram: Expose ramblock_is_ignored() as migrate_ram_is_ignored() virtio-mem: Skip most of virtio_mem_unplug_all() without plugged memory softmmu/physmem: Warn with ram_block_discard_range() on MAP_PRIVATE file mapping memory-device: Track used region size in DeviceMemoryState memory-device: Refactor memory_device_pre_plug() hw/i386/pc: Remove PC_MACHINE_DEVMEM_REGION_SIZE hw/i386/acpi-build: Rely on machine->device_memory when building SRAT hw/i386/pc: Use machine_memory_devices_init() hw/loongarch/virt: Use machine_memory_devices_init() hw/ppc/spapr: Use machine_memory_devices_init() hw/arm/virt: Use machine_memory_devices_init() memory-device: Introduce machine_memory_devices_init() ... Signed-off-by:Richard Henderson <richard.henderson@linaro.org>
-
David Hildenbrand authored
Let's support device unplug by forwarding the unplug_request_check() callback to the virtio-mem device. Further, disallow changing the requested-size once an unplug request is pending. Disallowing requested-size changes handles corner cases such as (1) pausing the VM (2) requesting device unplug and (3) adjusting the requested size. If the VM would plug memory (due to the requested size change) before processing the unplug request, we would be in trouble. Message-ID: <20230711153445.514112-8-david@redhat.com> Tested-by:
Mario Casquero <mcasquer@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com>
-
David Hildenbrand authored
In many cases, blindly unplugging a virtio-mem device is problematic. We can only safely remove a device once: * The guest is not expecting to be able to read unplugged memory (unplugged-inaccessible == on) * The virtio-mem device does not have memory plugged (size == 0) * The virtio-mem device does not have outstanding requests to the VM to plug memory (requested-size == 0) So let's add a callback to the virtio-mem device class to check for that. We'll wire-up virtio-mem-pci next. Message-ID: <20230711153445.514112-7-david@redhat.com> Tested-by:
Mario Casquero <mcasquer@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
David Hildenbrand <david@redhat.com>
-