aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-03-06audio: make playback packet length calculation exactVolker Rümelin3-25/+58
Introduce the new function st_rate_frames_in() to calculate the exact number of audio input frames needed to get a given number of audio output frames. The exact number of frames depends only on the difference of opos - ipos and the number of output frames. When downsampling, this function returns the maximum number of input frames needed. This new function replaces the audio_frontend_frames_out() function, which calculated the average number of input frames rounded down to the nearest integer. Because audio_frontend_frames_out() also limited the number of input frames to the size of the resample buffer, st_rate_frames_in() is not a direct replacement and two additional MIN() functions are needed. One to prevent resample buffer overflows and one to limit the available bytes for the audio frontends. After this patch the audio packet length calculation for playback is exact. When upsampling, it's still possible that the audio frontends can't write the last audio frame. This will be fixed later. Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230224190555.7409-9-vr_qemu@t-online.de>
2023-03-06audio: remove unused noop_conv() functionVolker Rümelin1-8/+0
The function audio_capture_mix_and_clear() no longer uses audio_pcm_sw_write() to resample audio frames from one internal buffer to another. For this reason, the noop_conv() function is now unused. Remove it. Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230224190555.7409-8-vr_qemu@t-online.de>
2023-03-06audio: don't misuse audio_pcm_sw_write()Volker Rümelin1-11/+18
The audio_pcm_sw_write() function is intended to convert a PCM audio stream to the internal representation, adjust the volume, and then mix it with the other audio streams with a possibly changed sample rate in mix_buf. In order for the audio_capture_mix_and_clear() function to use audio_pcm_sw_write(), it must bypass the first two tasks of audio_pcm_sw_write(). Since patch "audio: split out the resampling loop in audio_pcm_sw_write()" this is no longer necessary, because now the audio_pcm_sw_resample_out() function can be used instead of audio_pcm_sw_write(). Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230224190555.7409-7-vr_qemu@t-online.de>
2023-03-06audio: rename variables in audio_pcm_sw_write()Volker Rümelin1-23/+22
The audio_pcm_sw_write() function uses a lot of very unspecific variable names. Rename them for better readability. ret => total_in total => total_out size => buf_len hwsamples => hw->mix_buf.size samples => frames_in_max Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230224190555.7409-6-vr_qemu@t-online.de>
2023-03-06audio: remove sw == NULL checkVolker Rümelin1-4/+0
All call sites of audio_pcm_sw_write() guarantee that sw is not NULL. Remove the unnecessary NULL check. Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230224190555.7409-5-vr_qemu@t-online.de>
2023-03-06audio: replace the resampling loop in audio_pcm_sw_write()Volker Rümelin1-27/+36
Replace the resampling loop in audio_pcm_sw_write() with the new function audio_pcm_sw_resample_out(). Unlike the old resample loop the new function will try to consume input frames even if the output buffer is full. This is necessary when downsampling to avoid reading less audio frames than calculated in advance. The loop was unrolled to avoid complicated loop control conditions in this case. Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230224190555.7409-4-vr_qemu@t-online.de>
2023-03-06audio: make the resampling code greedyVolker Rümelin1-8/+13
Read the maximum possible number of audio frames instead of the minimum necessary number of frames when the audio stream is downsampled and the output buffer is limited. This makes the function symmetrical to upsampling when the input buffer is limited. The maximum possible number of frames is written here. With this change it's easier to calculate the exact number of audio frames the resample function will read or write. These two functions will be introduced later. Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230224190555.7409-3-vr_qemu@t-online.de>
2023-03-06audio: change type and name of the resample bufferVolker Rümelin3-13/+16
Change the type of the resample buffer from struct st_sample * to STSampleBuffer. Also change the name from buf to resample_buf for better readability. The new variables resample_buf.size and resample_buf.pos will be used after the next patches. There is no functional change. Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230224190555.7409-2-vr_qemu@t-online.de>
2023-03-06audio: change type of mix_buf and conv_bufVolker Rümelin3-64/+67
Change the type of mix_buf in struct HWVoiceOut and conv_buf in struct HWVoiceIn from STSampleBuffer * to STSampleBuffer. However, a buffer pointer is still needed. For this reason in struct STSampleBuffer samples[] is changed to *buffer. This is a preparation for the next patch. The next patch will add this line, which is not possible with the current struct STSampleBuffer definition. + sw->resample_buf.buffer = hw->mix_buf.buffer + rpos2; There are no functional changes. Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Message-Id: <20230224190555.7409-1-vr_qemu@t-online.de>
2023-03-06alsaaudio: reintroduce default recording settingsVolker Rümelin1-6/+4
Audio recording with ALSA default settings currently doesn't work. The debug log shows updates every 0.75s and 1.5s. audio: Elapsed since last alsa run (running): 0.743030 audio: Elapsed since last alsa run (running): 1.486048 audio: Elapsed since last alsa run (running): 0.743008 audio: Elapsed since last alsa run (running): 1.485878 audio: Elapsed since last alsa run (running): 1.486040 audio: Elapsed since last alsa run (running): 1.485886 The time between updates should be in the 10ms range. Audio recording with ALSA has the same timing contraints as playback. Reintroduce the default recording settings and use the same default settings for recording as for playback. The term "reintroduce" is correct because commit a93f328177 ("alsaaudio: port to -audiodev config") removed the default settings for recording. Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230121094735.11644-11-vr_qemu@t-online.de>
2023-03-06alsaaudio: change default playback settingsVolker Rümelin1-7/+4
The currently used default playback settings in the ALSA audio backend are a bit unfortunate. With a few emulated audio devices, audio playback does not work properly. Here is a short part of the debug log while audio is playing (elapsed time in seconds). audio: Elapsed since last alsa run (running): 0.046244 audio: Elapsed since last alsa run (running): 0.023137 audio: Elapsed since last alsa run (running): 0.023170 audio: Elapsed since last alsa run (running): 0.023650 audio: Elapsed since last alsa run (running): 0.060802 audio: Elapsed since last alsa run (running): 0.031931 For some audio devices the time of more than 23ms between updates is too long. Set the period time to 5.8ms so that the maximum time between two updates typically does not exceed 11ms. This roughly matches the 10ms period time when doing playback with the audio timer. After this patch the debug log looks like this. audio: Elapsed since last alsa run (running): 0.011919 audio: Elapsed since last alsa run (running): 0.005788 audio: Elapsed since last alsa run (running): 0.005995 audio: Elapsed since last alsa run (running): 0.011069 audio: Elapsed since last alsa run (running): 0.005901 audio: Elapsed since last alsa run (running): 0.006084 Acked-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230121094735.11644-10-vr_qemu@t-online.de>
2023-03-06audio: remove audio_calloc() functionVolker Rümelin2-21/+0
Now that the last call site of audio_calloc() was removed, remove the unused audio_calloc() function. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230121094735.11644-9-vr_qemu@t-online.de>
2023-03-06audio/audio_template: use g_new0() to replace audio_calloc()Volker Rümelin1-17/+12
Replace audio_calloc() with the equivalent g_new0(). With a n_structs argument >= 1, g_new0() never returns NULL. Also remove the unnecessary NULL checks. Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230121094735.11644-8-vr_qemu@t-online.de>
2023-03-06audio/audio_template: use g_malloc0() to replace audio_calloc()Volker Rümelin2-12/+10
Use g_malloc0() as a direct replacement for audio_calloc(). Since the type of the parameter n_bytes of the function g_malloc0() is unsigned, the type of the variables voice_size_out and voice_size_in has been changed to size_t. This means that the function argument no longer has to be checked for negative values. Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230121094735.11644-7-vr_qemu@t-online.de>
2023-03-06audio/alsaaudio: use g_new0() instead of audio_calloc()Volker Rümelin1-5/+1
Replace audio_calloc() with the equivalent g_new0(). The value of the g_new0() argument count is >= 1, which means g_new0() will never return NULL. Also remove the unnecessary NULL check. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230121094735.11644-6-vr_qemu@t-online.de>
2023-03-06audio/mixeng: use g_new0() instead of audio_calloc()Volker Rümelin3-16/+2
Replace audio_calloc() with the equivalent g_new0(). With a n_structs argument of 1, g_new0() never returns NULL. Also remove the unnecessary NULL checks. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230121094735.11644-5-vr_qemu@t-online.de>
2023-03-06audio: remove unused #define AUDIO_STRINGIFYVolker Rümelin1-3/+0
Remove the unused #define AUDIO_STRINGIFY. It was last used before commit 470bcabd8f ("audio: Replace AUDIO_FUNC with __func__"). Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230121094735.11644-4-vr_qemu@t-online.de>
2023-03-06audio: rename hardware store to backendVolker Rümelin1-2/+2
Use a consistent friendly name for the HWVoiceOut and HWVoiceIn structures. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230121094735.11644-3-vr_qemu@t-online.de>
2023-03-06audio: don't show unnecessary error messagesVolker Rümelin1-1/+1
Let the audio_pcm_create_voice_pair_* functions handle error reporting. This avoids an additional error message in case the guest selected an unimplemented sample rate. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230121094735.11644-2-vr_qemu@t-online.de>
2023-03-06audio: log unimplemented audio device sample ratesVolker Rümelin2-0/+14
Some emulated audio devices allow guests to select very low sample rates that the audio subsystem doesn't support. The lowest supported sample rate depends on the audio backend used and in most cases can be changed with various -audiodev arguments. Until now, the audio_bug function emits an error message similar to the following error message A bug was just triggered in audio_calloc Save all your work and restart without audio I am sorry Context: audio_pcm_sw_alloc_resources_out passed invalid arguments to audio_calloc nmemb=0 size=16 (len=0) audio: Could not allocate buffer for `ac97.po' (0 samples) and the audio subsystem continues without sound for the affected device. The fact that the selected sample rate is not supported is not a guest error. Instead of displaying an error message, the missing audio support is now logged. Simply continuing without sound is correct, since the audio stream won't transport anything reasonable at such high resample ratios anyway. The AUD_open_* functions return NULL like before. The opened audio device will not be registered in the audio subsystem and consequently the audio frontend callback functions will not be called. The AUD_read and AUD_write functions return early in this case. This is necessary because, for example, the Sound Blaster 16 emulation calls AUD_write from the DMA callback function. Acked-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20230121094735.11644-1-vr_qemu@t-online.de>
2023-03-06MAINTAINERS: add myself to ui/ and audio/Marc-André Lureau1-0/+2
Helping out with patch review & queue handling. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230207085610.1033536-1-marcandre.lureau@redhat.com>
2023-03-04configure: Disable thread-safety warnings on macOSThomas Huth1-1/+4
The enablement of -Wthread-safety broke compilation on macOS (if -Werror is enabled, like in our CI). Disable it there by default until the problems are resolved. Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com> Message-id: 20230301113425.286946-1-thuth@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-03-04tests/qtest/migration-test: Disable migration/multifd/tcp/plain/cancelPeter Maydell1-2/+8
migration-test has been flaky for a long time, both in CI and otherwise: https://gitlab.com/qemu-project/qemu/-/jobs/3806090216 (a FreeBSD job) 32/648 ERROR:../tests/qtest/migration-helpers.c:205:wait_for_migration_status: assertion failed: (g_test_timer_elapsed() < MIGRATION_STATUS_WAIT_TIMEOUT) ERROR on a local macos x86 box: ▶ 34/621 ERROR:../../tests/qtest/migration-helpers.c:151:migrate_query_not_failed: assertion failed: (!g_str_equal(status, "failed")) ERROR 34/621 qemu:qtest+qtest-i386 / qtest-i386/migration-test ERROR 168.12s killed by signal 6 SIGABRT ――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――― stderr: qemu-system-i386: Failed to peek at channel query-migrate shows failed migration: Unable to write to socket: Broken pipe ** ERROR:../../tests/qtest/migration-helpers.c:151:migrate_query_not_failed: assertion failed: (!g_str_equal(status, "failed")) (test program exited with status code -6) ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― ▶ 37/621 ERROR:../../tests/qtest/migration-helpers.c:151:migrate_query_not_failed: assertion failed: (!g_str_equal(status, "failed")) ERROR 37/621 qemu:qtest+qtest-x86_64 / qtest-x86_64/migration-test ERROR 174.37s killed by signal 6 SIGABRT ――――――――――――――――――――――――――――――――――――― ✀ ――――――――――――――――――――――――――――――――――――― stderr: query-migrate shows failed migration: Unable to write to socket: Broken pipe ** ERROR:../../tests/qtest/migration-helpers.c:151:migrate_query_not_failed: assertion failed: (!g_str_equal(status, "failed")) (test program exited with status code -6) In the cases where I've looked at the underlying log, this seems to be in the migration/multifd/tcp/plain/cancel subtest. Disable that specific subtest by default until somebody can track down the underlying cause. Enthusiasts can opt back in by setting QEMU_TEST_FLAKY_TESTS=1 in their environment. We might need to disable more parts of this test if this isn't sufficient to fix the flakiness. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Message-id: 20230302172211.4146376-1-peter.maydell@linaro.org
2023-03-04Merge tag 'pull-ppc-20230303' of https://gitlab.com/danielhb/qemu into stagingPeter Maydell6-71/+85
ppc patch queue for 2023-03-03: This queue includes a stub implementation for the dcblc instruction to avoid an illegal instrunction exception when using u-boot with mpc85xx. It also includes a PHB fix with user-created pnv-phb devices and Skiboot. # -----BEGIN PGP SIGNATURE----- # # iIwEABYKADQWIQQX6/+ZI9AYAK8oOBk82cqW3gMxZAUCZAJllhYcZGFuaWVsaGI0 # MTNAZ21haWwuY29tAAoJEDzZypbeAzFk02YA/2YnJl0aRw6hgiayI2rLbcwQcVfp # oGAhh4QmqFL2UJw2AQDra0kh9sxBSEcqhltNnOa08tBnHPts3W/A8nmFtCd4Cw== # =VRNM # -----END PGP SIGNATURE----- # gpg: Signature made Fri 03 Mar 2023 21:24:38 GMT # gpg: using EDDSA key 17EBFF9923D01800AF2838193CD9CA96DE033164 # gpg: issuer "danielhb413@gmail.com" # gpg: Good signature from "Daniel Henrique Barboza <danielhb413@gmail.com>" [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: 17EB FF99 23D0 1800 AF28 3819 3CD9 CA96 DE03 3164 * tag 'pull-ppc-20230303' of https://gitlab.com/danielhb/qemu: pnv_phb4_pec: Simplify/align code to parent user-created PHBs pnv_phb4_pec: Move pnv_phb4_get_pec() to rightful file pnv_phb4_pec: Only export existing PHBs to the device tree pnv_phb4_pec: Keep track of instantiated PHBs target/ppc/translate: Add dummy implementation for dcblc instruction Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-03-03pnv_phb4_pec: Simplify/align code to parent user-created PHBsFrederic Barrat5-25/+22
When instantiating a user-created PHB on P9/P10, we don't really have a reason any more to go through an indirection in pnv_chip_add_phb() in pnv.c, we can go straight to the right function in pnv_phb4_pec.c. That way, default PHBs and user-created PHBs are all handled in the same file. This patch also renames pnv_phb4_get_pec() to pnv_pec_add_phb() to better reflect that it "hooks" a PHB to a PEC. For P8, the PHBs are parented to the chip directly, so it makes sense to keep calling pnv_chip_add_phb() in pnv.c, to also be consistent with where default PHBs are handled. The only change here is that, since that function is now only used for P8, we can refine the return type. So overall, the PnvPHB front-end now has a pnv_phb_user_get_parent() function which handles the parenting of the user-created PHBs by calling the right function in the right file based on the processor version. It's also easily extensible if we ever need to support a different parent object. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Message-Id: <20230302163715.129635-5-fbarrat@linux.ibm.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2023-03-03pnv_phb4_pec: Move pnv_phb4_get_pec() to rightful fileFrederic Barrat3-43/+42
The function pnv_phb4_get_pec() exposes some internals of the PEC and PHB logic, yet it was in the higher level hw/ppc/pnv.c file for historical reasons: P8 implements the PHBs from pnv.c directly, but on P9/P10, it's done through the CEC model, which has its own file. So move pnv_phb4_get_pec() to hw/pci-host/pnv_phb4_pec.c, where it fits naturally. While at it, replace the PnvPHB4 parameter by the PnvPHB front-end, since it has all the information needed and simplify it a bit. No functional changes. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Message-Id: <20230302163715.129635-4-fbarrat@linux.ibm.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2023-03-03pnv_phb4_pec: Only export existing PHBs to the device treeFrederic Barrat1-2/+6
So far, we were always exporting all possible PHBs to the device tree. It works well when using the default config but it potentially adds non-existing devices when using '-nodefaults' and user-created PHBs, causing the firmware (skiboot) to report errors when probing those PHBs. This patch only exports PHBs which have been realized to the device tree. Fixes: d786be3fe746 ("ppc/pnv: enable user created pnv-phb for powernv9") Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Message-Id: <20230302163715.129635-3-fbarrat@linux.ibm.com> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2023-03-03pnv_phb4_pec: Keep track of instantiated PHBsFrederic Barrat3-5/+10
Add an array on the PEC object to keep track of the PHBs which are instantiated. The array can be sparsely populated when using user-created PHBs. It will be useful for the next patch to only export instantiated PHBs in the device tree. Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Message-Id: <20230302163715.129635-2-fbarrat@linux.ibm.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2023-03-03target/ppc/translate: Add dummy implementation for dcblc instructionBernhard Beschow1-0/+9
The dcblc instruction is used by u-boot in mpc85xx/start.S. Without it, an illegal istruction exception is generated very early in the boot process where the processor is not yet able to handle exceptions. See: https://github.com/u-boot/u-boot/blob/v2023.01/arch/powerpc/cpu/mpc85xx/start.S#L1840 Signed-off-by: Bernhard Beschow <shentey@gmail.com> Message-Id: <20230130184950.5241-1-shentey@gmail.com> Acked-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
2023-03-03Merge tag 'pull-aspeed-20230302' of https://github.com/legoater/qemu into ↵Peter Maydell16-77/+419
staging aspeed queue: * fix for the Aspeed I2C slave mode * a new I2C echo device from Klaus and its associated test in avocado. * initial SoC cleanups to allow the use of block devices instead of drives on the command line. * new facebook machines and eeprom fixes for the Fuji * readline fix # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmQAnrQACgkQUaNDx8/7 # 7KGIvQ//Te2eSxlZNxAXHb3HSVFRaBW+2EkJzNlalX75olFSzCLe8BnAHK5xPlYv # JjU0aPjWaPohPLdbNbAsJY2B8AwMGbUTjSv+ORRWF6s97LTVD9WcAYHgOTCz6d2X # ZrArJ5msEQAFEySOLmBqTcuyW3t4w8XeII+B09HZIS8Gn3F9kX5+4JCw9E4sX8fS # n9ayclMmrXCPbkGA4bfwJp3KI1Tc/WXNRyG0AmPEmepid7ECr5tVvQoXRMF1Sy/D # 10qbHEcmQXvZDy85M2ED1niOac4oU+EY8Wvjzkgc36uXcjqf0jIUfw56cwGSNVkW # MhPXSMiH4tEjgxmtzld3LeA6TGfrFcCvRXYiCuYWHjBS3gptlqY6Q0580vxoQVXL # lTYui57LB1YStNLcLG9toP0d4/fRfeqEx7ddCQKlopnW/K392eoJo0aYoVGVJhIC # 3QhN525EFUwMm4FDpdSW29Gfbk/ytpf0u4hQ6JPeBl8psirRKqCGuwr5NOnPYTaN # yErlsq2eL83t9kLo+2YIqgWic85wNP3kqAjIaE6lminqX7sWFH3V1g9HqUQZVG1g # msatZMiCCvwSFuz3DPkSfnuhqwaHuhvCATZloCtguCmnbUK9qUVVzvodKw62sZrd # GdS2XvRNyoOwezz0tDEvPipyZ7RpcaatryHNuzGwRsE5Lvr73dg= # =ExnJ # -----END PGP SIGNATURE----- # gpg: Signature made Thu 02 Mar 2023 13:03:48 GMT # gpg: using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1 # gpg: Good signature from "Cédric Le Goater <clg@kaod.org>" [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: A0F6 6548 F048 95EB FE6B 0B60 51A3 43C7 CFFB ECA1 * tag 'pull-aspeed-20230302' of https://github.com/legoater/qemu: aspeed/smc: Replace SysBus IRQs with GPIO lines aspeed: Add a boot_rom overlap region in the SoC spi_boot container aspeed: Introduce a spi_boot region under the SoC aspeed/fuji : correct the eeprom size hw/at24c : modify at24c to support 1 byte address mode hw/arm/aspeed: Adding new machine Tiogapass in QEMU hw/arm/aspeed: Adding new machine Yosemitev2 in QEMU tests/avocado/machine_aspeed.py: Add an I2C slave test hw/misc: add a toy i2c echo device hw/i2c: only schedule pending master when bus is idle readline: fix hmp completion issue Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-03-03Merge tag 'pull-loongarch-20230303' of https://gitlab.com/gaosong/qemu into ↵Peter Maydell8-73/+70
staging pull-loongarch-20230303 # -----BEGIN PGP SIGNATURE----- # # iLMEAAEIAB0WIQS4/x2g0v3LLaCcbCxAov/yOSY+3wUCZAFb5wAKCRBAov/yOSY+ # 35hmA/sHIGXU5zQV6p6DBILFGEE6x91sPtV8WKY3zujVY0hsfD4SF6bKTaKJYisZ # EztZZ5/EunQcu/vfgO46YtYysEWzrzGiinbZ5lAjxk6sdlBYlfcTQLAQEEW3zPbP # qB3SiiGmGQ0iYFHIlkyi1tCF5OEmqqQKrHYrNVk6cGBoJle2PA== # =giPH # -----END PGP SIGNATURE----- # gpg: Signature made Fri 03 Mar 2023 02:31:03 GMT # gpg: using RSA key B8FF1DA0D2FDCB2DA09C6C2C40A2FFF239263EDF # gpg: Good signature from "Song Gao <m17746591750@163.com>" [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: B8FF 1DA0 D2FD CB2D A09C 6C2C 40A2 FFF2 3926 3EDF * tag 'pull-loongarch-20230303' of https://gitlab.com/gaosong/qemu: hw/loongarch/virt: add system_powerdown hmp command support target/loongarch: Implement Chip Configuraiton Version Register(0x0000) docs/system/loongarch: update loongson3.rst and rename it to virt.rst loongarch: Add smbios command line option. hw/loongarch/virt: rename PCH_PIC_IRQ_OFFSET with VIRT_GSI_BASE Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-03-03Merge tag 'migration-20230302-pull-request' of ↵Peter Maydell2-3/+26
https://gitlab.com/juan.quintela/qemu into staging Migraiton Pull request Hi This pull requests include: - use-after-free in test-vmstate (eric) - fix exec migration in windows (berberian) Please apply. # -----BEGIN PGP SIGNATURE----- # # iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmQAynUACgkQ9IfvGFhy # 1yMAKhAAyLAVSDvCh8uRvAZ4sHzZTmCuvMpGol8wromFta9Ub0vLqcK8F3neYERb # xsRmYxcfaGR0dcf4j8CNAdUjO3NJjiSlWFqFYizIWZNQ2Hotgfkizxifk7l1eRO5 # L4TvOcdS0oRAgwLvcE9SDjtRMYwCBey/opgQCAaWWVk/NLDEYKNOuPNSdrpPhMPL # LBBPNj1ATmKYPGxsdm3U8VwFu9VuevmQ9AxEhW4Euf9Ex0Ie+hxGjHZmzrJrbYUL # 3p2cyu/ShU3MxsKowgmFnDkL3zyihYPAKhb1YJ+csRLFJX/zKVJcH7ZVzJOSR3GQ # ZoksI1RciwBfbl1IVD+TgrZrZnFd5ltto3zxSrjLFFnB4lhtg5bUDwMG8/o5qx3d # YaJOaeTJbmqd+SRPxrqbLWWGpsXUJc1rEVcYh2rclyOxvwda1xJrl7/2N2ZeS6VD # GO7FhcaprpxvLF+WYmhuCIS3RbOC35/Hx11bgQL8da8lxPQsOfsPTkRpzeWa4exX # ET+fqvlQp8ApHDVF/VA8vD31brSv3moL6GmVnZeT/Fi5xa7Ntb3Mnn5DkDoXgSKo # DQjie+ZTRJ/E4VbY53FAeUh4M3OPf5NaZyzgx3K68XMZJ6THiLmwqDa/vO53Q0QP # kMNVYAA9FbBFIozDpa2l+fCNxaawKqVBK4yYoEBZcBLYjb+7540= # =fku0 # -----END PGP SIGNATURE----- # gpg: Signature made Thu 02 Mar 2023 16:10:29 GMT # gpg: using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723 # gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full] # gpg: aka "Juan Quintela <quintela@trasno.org>" [full] # Primary key fingerprint: 1899 FF8E DEBF 58CC EE03 4B82 F487 EF18 5872 D723 * tag 'migration-20230302-pull-request' of https://gitlab.com/juan.quintela/qemu: Fix exec migration on Windows (w32+w64). test-vmstate: fix bad GTree usage, use-after-free Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-03-03Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu ↵Peter Maydell61-396/+357
into staging virtio,pc,pci: features, cleanups, fixes vhost-user support without ioeventfd word replacements in vhost user spec shpc improvements cleanups, fixes all over the place Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # -----BEGIN PGP SIGNATURE----- # # iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmQBO8QPHG1zdEByZWRo # YXQuY29tAAoJECgfDbjSjVRpMUMH/3/FVp4qaF4CDwCHn7xWFRJpOREIhX/iWfUu # lGkwxnB7Lfyqdg7i4CAfgMf2emWKZchEE2DamfCo5bIX0IgRU3DWcOdR9ePvJ29J # cKwIYpxZcB4RYSoWL5OUakQLCT3JOu4XWaXeVjyHABjQhf3lGpwN4KmIOBGOy/N6 # 0YHOQScW2eW62wIOwhAEuYQceMt6KU32Uw3tLnMbJliiBf3a/hPctVNM9TFY9pcd # UYHGfBx/zD45owf1lTVEQFDg0eqPZKWW29g5haiOd5oAyXHHolzu+bt3bU7lH46b # f7iP12LqDudyrgoF5YWv3NJ4HaGm5V3kPqNqLLF/mjF7alxG+N8= # =hN3h # -----END PGP SIGNATURE----- # gpg: Signature made Fri 03 Mar 2023 00:13:56 GMT # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (53 commits) tests/data/acpi/virt: drop (most) duplicate files. hw/cxl/mailbox: Use new UUID network order define for cel_uuid qemu/uuid: Add UUID static initializer qemu/bswap: Add const_le64() tests: acpi: Update q35/DSDT.cxl for removed duplicate UID hw/i386/acpi: Drop duplicate _UID entry for CXL root bridge tests/acpi: Allow update of q35/DSDT.cxl hw/cxl: Add CXL_CAPACITY_MULTIPLIER definition hw/cxl: set cxl-type3 device type to PCI_CLASS_MEMORY_CXL hw/pci-bridge/cxl_downstream: Fix type naming mismatch hw/mem/cxl_type3: Improve error handling in realize() MAINTAINERS: Add Fan Ni as Compute eXpress Link QEMU reviewer intel-iommu: send UNMAP notifications for domain or global inv desc smmu: switch to use memory_region_unmap_iommu_notifier_range() memory: introduce memory_region_unmap_iommu_notifier_range() intel-iommu: fail DEVIOTLB_UNMAP without dt mode intel-iommu: fail MAP notifier without caching mode memory: Optimize replay of guest mapping chardev/char-socket: set s->listener = NULL in char_socket_finalize hw/pci: Trace IRQ routing on PCI topology ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-03-03Merge tag 'pull-riscv-to-apply-20230303' of ↵Peter Maydell20-574/+538
https://gitlab.com/palmer-dabbelt/qemu into staging Fifth RISC-V PR for QEMU 8.0 * Experimantal support for writable misa. * Support for Svadu extension. * Support for the Zicond extension. * Fixes to gdbstub, CSR accesses, dependencies between the various floating-point exceptions, and XTheadMemPair. * Many cleanups. # -----BEGIN PGP SIGNATURE----- # # iQJHBAABCAAxFiEEKzw3R0RoQ7JKlDp6LhMZ81+7GIkFAmQBrrUTHHBhbG1lckBk # YWJiZWx0LmNvbQAKCRAuExnzX7sYicHrD/9dHBDOYNwyT/C2Q31NHMcEsVN6J0kW # 0sVyDb2/TUFoXmClMwS6jZYQQwWD7tjjB7BDcvPJ0QKLblDoZFX5JyxpQypIKWcs # It/E6mk7aG0epH1GoB/mbHFDbeCm4tbo7Vf6cQGpV/vGWBUaOS67c5nenUK7Tlqw # NTr9qak+9NYVswvMHZ0lUKtO12W1g/1EVkict2/90P2snWbPZ+foWomifGNljmhy # 5WtCNp27uBKF/uuD9xubLOxSEcqtZFTuKJy7U3azV4I0IKfd6Is83Kd0IwBOrTgT # MYkFdtQE1jgbkXYVZjft6ymLuqJrcLFYwD8C2zdNAXJLk1Y+MCtGafgW6f6SkT6B # FrNaSOqQ9xXiaNStF2FwYdmZ476zcY+eEg2rH1grTwCMewZ9r7m3+H8iat/tR0pt # 9scYAre1oaL33LB6DGZi3JkssNYyj42sutcNao2hQXRHcsh+vv1dLR+Di2mO6Ji5 # MNfvEgCrWWZjNVSwvhwCXdJPqqpyTbkRf8HJEp0gWvjk6VoF8sWidDw/8oMLj+wW # qZur7GNe+piJNvly85aFSL9J3SX7RyNeDzX/yK3b4k+g6I/ZziQaNgQtB9gYcm6w # mj3snCwRbEMEhdhPH0+Chm0Wb97knHJS14Vq9wCe2xh16o3HM5FspboLFkGZMjDV # tRDPFb7pitwdlA== # =FMkl # -----END PGP SIGNATURE----- # gpg: Signature made Fri 03 Mar 2023 08:24:21 GMT # gpg: using RSA key 2B3C3747446843B24A943A7A2E1319F35FBB1889 # gpg: issuer "palmer@dabbelt.com" # gpg: Good signature from "Palmer Dabbelt <palmer@dabbelt.com>" [unknown] # gpg: aka "Palmer Dabbelt <palmerdabbelt@google.com>" [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: 00CE 76D1 8349 60DF CE88 6DF8 EF4C A150 2CCB AB41 # Subkey fingerprint: 2B3C 3747 4468 43B2 4A94 3A7A 2E13 19F3 5FBB 1889 * tag 'pull-riscv-to-apply-20230303' of https://gitlab.com/palmer-dabbelt/qemu: (59 commits) target/riscv/vector_helper.c: avoid env_archcpu() when reading RISCVCPUConfig target/riscv/vector_helper.c: create vext_set_tail_elems_1s() target/riscv/csr.c: avoid env_archcpu() usages when reading RISCVCPUConfig target/riscv/csr.c: use riscv_cpu_cfg() to avoid env_cpu() pointers target/riscv/csr.c: simplify mctr() target/riscv/csr.c: use env_archcpu() in ctr() target/riscv: Export Svadu property target/riscv: Add *envcfg.HADE related check in address translation target/riscv: Add *envcfg.PBMTE related check in address translation target/riscv: Add csr support for svadu target/riscv: Fix the relationship of PBMTE/STCE fields between menvcfg and henvcfg target/riscv: Fix the relationship between menvcfg.PBMTE/STCE and Svpbmt/Sstc extensions hw/riscv: Move the dtb load bits outside of create_fdt() hw/riscv: Skip re-generating DT nodes for a given DTB target/riscv: Add support for Zicond extension RISC-V: XTheadMemPair: Remove register restrictions for store-pair target/riscv: Fix checking of whether instruciton at 'pc_next' spans pages target/riscv: Group all predicate() routines together target/riscv: Drop priv level check in mseccfg predicate() target/riscv: Allow debugger to access sstc CSRs ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2023-03-03hw/loongarch/virt: add system_powerdown hmp command supportSong Gao3-0/+14
For loongarch virt machine, add powerdown notification callback and send ACPI_POWER_DOWN_STATUS event by acpi ged. Also add acpi dsdt table for ACPI_POWER_BUTTON_DEVICE device in this patch. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Song Gao <gaosong@loongson.cn> Message-Id: <20230303010548.295580-1-gaosong@loongson.cn>
2023-03-03target/loongarch: Implement Chip Configuraiton Version Register(0x0000)Song Gao2-0/+3
According to the 3A5000 manual 4.1 implement Chip Configuration Version Register(0x0000). Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230227071046.1445572-1-gaosong@loongson.cn>
2023-03-03docs/system/loongarch: update loongson3.rst and rename it to virt.rstSong Gao1-59/+38
Since the EDK2 had already support LoongArch, update build bios, and update cpu type, cross-tools. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Song Gao <gaosong@loongson.cn> Message-Id: <20230227035905.1290953-1-gaosong@loongson.cn>
2023-03-03loongarch: Add smbios command line option.Song Gao1-1/+1
LoongArch has enabled CONFIG_SMBIOS, but didn't enable CLI '-smbios'. Fixes: 3efa6fa1e629 ("hw/loongarch: Add smbios support") Acked-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Song Gao <gaosong@loongson.cn> Message-Id: <20230227035905.1290953-2-gaosong@loongson.cn>
2023-03-03hw/loongarch/virt: rename PCH_PIC_IRQ_OFFSET with VIRT_GSI_BASEBibo Mao3-13/+14
In theory gsi base can start from 0 on loongarch virt machine, however gsi base is hard-coded in linux kernel loongarch system, else system fails to boot. This patch renames macro PCH_PIC_IRQ_OFFSET with VIRT_GSI_BASE, keeps value unchanged. GSI base is common concept in acpi spec and easy to understand. Signed-off-by: Bibo Mao <maobibo@loongson.cn> Reviewed-by: Song Gao <gaosong@loongson.cn> Message-Id: <20221228030719.991878-1-maobibo@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn>
2023-03-02tests/data/acpi/virt: drop (most) duplicate files.Michael S. Tsirkin14-0/+0
When virt ACPI files were added, lots of duplicates were created because we forgot that there's a no-prefix fallback: e.g. if tests/data/acpi/virt/APIC.memhp is not there then test will use tests/data/acpi/virt/APIC. Drop these. These were found with $find tests/data/acpi/ -type f -exec sha256sum '{}' ';'|sort -d|uniq -w 64 --all-repeated=separate (trick: -d does a dictionary sort so a no-suffix file ends up first). Note: there are still a bunch of issues with duplicates left even after this. First pc and q35 are often identical. Second, sometimes files are identical but not identical to the default fallback, e.g. tests/data/acpi/pc/SLIT.cphp and tests/data/acpi/pc/SLIT.memhp or tests/data/acpi/q35/HMAT.acpihmat-noinitiator and tests/data/acpi/virt/HMAT.acpihmatvirt Finding a way to deduplicate these is still a TODO item - softlinks maybe? We also need to make rebuild-expected-aml.sh smarter about not creating these duplicates in the 1st place. And maybe we should use softlinks instead of relying on a fallback to make it explicit what version does each test expect? Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-03-02hw/cxl/mailbox: Use new UUID network order define for cel_uuidIra Weiny3-9/+8
The cel_uuid was programatically generated previously because there was no static initializer for network order UUIDs. Use the new network order initializer for cel_uuid. Adjust cxl_initialize_mailbox() because it can't fail now. Update specification reference. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Gregory Price <gregory.price@memverge.com> Tested-by: Gregory Price <gregory.price@memverge.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230206172816.8201-11-Jonathan.Cameron@huawei.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-03-02qemu/uuid: Add UUID static initializerIra Weiny1-0/+12
UUID's are defined as network byte order fields. No static initializer was available for UUID's in their standard big endian format. Define a big endian initializer for UUIDs. Reviewed-by: Gregory Price <gregory.price@memverge.com> Tested-by: Gregory Price <gregory.price@memverge.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230206172816.8201-10-Jonathan.Cameron@huawei.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-03-02qemu/bswap: Add const_le64()Ira Weiny1-1/+11
Gcc requires constant versions of cpu_to_le* calls. Add a 64 bit version. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Gregory Price <gregory.price@memverge.com> Tested-by: Gregory Price <gregory.price@memverge.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230206172816.8201-9-Jonathan.Cameron@huawei.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-03-02tests: acpi: Update q35/DSDT.cxl for removed duplicate UIDJonathan Cameron2-1/+0
Dropping the ID effects this table in trivial fashion. Reviewed-by: Gregory Price <gregory.price@memverge.com> Tested-by: Gregory Price <gregory.price@memverge.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230206172816.8201-8-Jonathan.Cameron@huawei.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-03-02hw/i386/acpi: Drop duplicate _UID entry for CXL root bridgeJonathan Cameron1-1/+0
Noticed as this prevents iASL disasembling the DSDT table. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Gregory Price <gregory.price@memverge.com> Tested-by: Gregory Price <gregory.price@memverge.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230206172816.8201-7-Jonathan.Cameron@huawei.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-03-02tests/acpi: Allow update of q35/DSDT.cxlJonathan Cameron1-0/+1
Next patch will drop duplicate _UID entry so allow update. Reviewed-by: Gregory Price <gregory.price@memverge.com> Tested-by: Gregory Price <gregory.price@memverge.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230206172816.8201-6-Jonathan.Cameron@huawei.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-03-02hw/cxl: Add CXL_CAPACITY_MULTIPLIER definitionGregory Price1-6/+9
Remove usage of magic numbers when accessing capacity fields and replace with CXL_CAPACITY_MULTIPLIER, matching the kernel definition. Signed-off-by: Gregory Price <gregory.price@memverge.com> Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230206172816.8201-5-Jonathan.Cameron@huawei.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-03-02hw/cxl: set cxl-type3 device type to PCI_CLASS_MEMORY_CXLGregory Price1-2/+1
Current code sets to STORAGE_EXPRESS and then overrides it. Reviewed-by: Davidlohr Bueso <dave@stgolabs.net> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Gregory Price <gregory.price@memverge.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230206172816.8201-4-Jonathan.Cameron@huawei.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-03-02hw/pci-bridge/cxl_downstream: Fix type naming mismatchJonathan Cameron1-1/+1
Fix capitalization difference between struct name and typedef. Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Gregory Price <gregory.price@memverge.com> Tested-by: Gregory Price <gregory.price@memverge.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230206172816.8201-3-Jonathan.Cameron@huawei.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2023-03-02hw/mem/cxl_type3: Improve error handling in realize()Jonathan Cameron1-2/+10
msix_init_exclusive_bar() can fail, so if it does cleanup the address space. Reviewed-by: Ira Weiny <ira.weiny@intel.com> Reviewed-by: Gregory Price <gregory.price@memverge.com> Tested-by: Gregory Price <gregory.price@memverge.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Message-Id: <20230206172816.8201-2-Jonathan.Cameron@huawei.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>