Re: [RFC PATCH] ast2600: Fix CPU features

2022-09-26 Thread Cédric Le Goater
On 9/26/22 08:26, Cédric Le Goater wrote: Currently, the CPU features exposed to the AST2600 QEMU machines are : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm But, the features of the Cortex A7 CPU on the Aspeed AST2600 A3 SoC are : half thumb fastm

Re: [PATCH v2 22/37] target/i386: reimplement 0x0f 0x78-0x7f, add AVX

2022-09-26 Thread Paolo Bonzini
On Sat, Sep 24, 2022 at 10:43 PM Richard Henderson wrote: > > +static void decode_0F79(DisasContext *s, CPUX86State *env, X86OpEntry > > *entry, uint8_t *b) > > +{ > > +if (s->prefix & PREFIX_REPNZ) { > > +entry->gen = gen_INSERTQ_r; > > +} else if (s->prefix & PREFIX_DATA) { > >

Re: [PATCH] virtio: del net client if net_init_tap_one failed

2022-09-26 Thread Jason Wang
On Fri, Sep 23, 2022 at 11:56 PM luzhipeng wrote: > > From: lu zhipeng > > If the net tap initializes successful, but failed during > network card hot-plugging, the net-tap will remains, > so cleanup. > > Signed-off-by: lu zhipeng Applied. Thanks > --- > net/tap.c | 18 -- >

Re: [PATCH] i386: Add new CPU model SapphireRapids

2022-09-26 Thread Yang Zhong
On Sat, Sep 24, 2022 at 12:01:16AM +0800, Xiaoyao Li wrote: > On 9/23/2022 9:30 PM, Yang Zhong wrote: > > On Wed, Sep 21, 2022 at 03:51:42PM +0100, Dr. David Alan Gilbert wrote: > > > * Wang, Lei (lei4.w...@intel.com) wrote: > > > > The new CPU model mostly inherits features from Icelake-Server, wh

Re: [PATCH] hw/intc: sifive_plic: fix hard-coded max priority level

2022-09-26 Thread Clément Chigot
Hi Jim, On Sun, Sep 25, 2022 at 3:26 PM Jim Shu wrote: > > The maximum priority level is hard-coded when writing to interrupt > priority register. However, when writing to priority threshold register, > the maximum priority level is from num_priorities Property which is > configured by platform.

Re: [PATCH v2 24/37] target/i386: reimplement 0x0f 0xd0-0xd7, 0xe0-0xe7, 0xf0-0xf7, add AVX

2022-09-26 Thread Paolo Bonzini
On Sat, Sep 24, 2022 at 10:56 PM Richard Henderson wrote: > > On 9/20/22 17:24, Paolo Bonzini wrote: > > For LDDQU, using gen_load_sse directly might corrupt the register if > > the second part of the load fails. > > Surely LDDQU is not unique in this? I would think ldo/ldy both need fixing > to

Re: [PATCH v6 5/5] accel: abort if we fail to load the accelerator plugin

2022-09-26 Thread Claudio Fontana
On 9/24/22 14:35, Philippe Mathieu-Daudé via wrote: > On 24/9/22 01:21, Claudio Fontana wrote: >> if QEMU is configured with modules enabled, it is possible that the >> load of an accelerator module will fail. >> Abort in this case, relying on module_object_class_by_name to report >> the specific l

Re: [PATCH v2 3/6] vhost-net: vhost-user: update vhost_net_virtqueue_reset()

2022-09-26 Thread Xuan Zhuo
On Thu, 15 Sep 2022 10:12:11 +0800, Jason Wang wrote: > On Wed, Sep 14, 2022 at 2:21 PM Xuan Zhuo wrote: > > > > On Wed, 14 Sep 2022 11:13:29 +0800, Jason Wang wrote: > > > > > > 在 2022/9/12 11:10, Kangjie Xu 写道: > > > > Update vhost_net_virtqueue_reset() for vhost-user scenario. > > > > > > > >

Re: Maximum QMP reply size

2022-09-26 Thread Daniel P . Berrangé
On Wed, Sep 07, 2022 at 01:54:05PM +0200, Markus Armbruster wrote: > John Snow writes: > > > Hi, I suspect I have asked this before, but I didn't write it down in > > a comment, so I forget my justification... > > > > In the QMP lib, we need to set a buffering limit for how big a QMP > > message

Re: Maximum QMP reply size

2022-09-26 Thread Daniel P . Berrangé
On Fri, Sep 23, 2022 at 03:51:48PM -0400, John Snow wrote: > On Wed, Sep 7, 2022 at 7:54 AM Markus Armbruster wrote: > > > > John Snow writes: > > > > > Hi, I suspect I have asked this before, but I didn't write it down in > > > a comment, so I forget my justification... > > > > > > In the QMP li

Re: [PATCH v2 01/39] tests: Change to use g_mkdir()

2022-09-26 Thread Daniel P . Berrangé
On Fri, Sep 23, 2022 at 08:02:46PM +0200, Thomas Huth wrote: > On 23/09/2022 03.09, Bin Meng wrote: > > On Fri, Sep 23, 2022 at 3:32 AM Marc-André Lureau > > wrote: > > > > > > Hi > > > > > > On Tue, Sep 20, 2022 at 1:48 PM Bin Meng wrote: > > > > > > > > From: Bin Meng > > > > > > > > Commi

Re: [PATCH] block: Refactor get_tmp_filename()

2022-09-26 Thread Daniel P . Berrangé
On Sat, Sep 24, 2022 at 04:00:34PM +0800, Bin Meng wrote: > From: Bin Meng > > At present there are two callers of get_tmp_filename() and they are > inconsistent. > > One does: > > /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ > char *tmp_filename = g_malloc0(PAT

Re: [PATCH v3] block: Refactor get_tmp_filename()

2022-09-26 Thread Daniel P . Berrangé
On Sun, Sep 25, 2022 at 12:32:00AM +0800, Bin Meng wrote: > From: Bin Meng > > At present there are two callers of get_tmp_filename() and they are > inconsistent. > > One does: > > /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ > char *tmp_filename = g_malloc0(PAT

Re: [PATCH] gtk: Add show_menubar=on|off command line option.

2022-09-26 Thread Markus Armbruster
Bryce Mills writes: > The patch adds "show_menubar" command line option for GTK UI similar to > "show_tabs". This option allows to hide menu bar initially, it still can > be toggled by shortcut and other shortcuts still work. > > (First-time contributor) > > Signed-off-by: Bryce Mills > --- > q

Re: [PATCH] i386: Add new CPU model SapphireRapids

2022-09-26 Thread Dr. David Alan Gilbert
* Yang Zhong (yang.zh...@linux.intel.com) wrote: > On Sat, Sep 24, 2022 at 12:01:16AM +0800, Xiaoyao Li wrote: > > On 9/23/2022 9:30 PM, Yang Zhong wrote: > > > On Wed, Sep 21, 2022 at 03:51:42PM +0100, Dr. David Alan Gilbert wrote: > > > > * Wang, Lei (lei4.w...@intel.com) wrote: > > > > > The new

Re: [PATCH v2 0/8] AArch64/HMAT support and tests

2022-09-26 Thread Hesham Almatary via
Hello Michael, On 7/26/2022 4:04 PM, Michael S. Tsirkin wrote: On Tue, Jul 19, 2022 at 10:49:42AM +0100, Hesham Almatary wrote: This patchset adds support for AArch64/HMAT including a test. It relies on other two patch sets from: Brice Goglin: to support -numa without initiators on q35/x86.

[PATCH v12 10/21] block/mirror.c: use of job helpers in drivers

2022-09-26 Thread Emanuele Giuseppe Esposito
Once job lock is used and aiocontext is removed, mirror has to perform job operations under the same critical section, Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/mirror

[PATCH v12 08/21] jobs: add job lock in find_* functions

2022-09-26 Thread Emanuele Giuseppe Esposito
Both blockdev.c and job-qmp.c have TOC/TOU conditions, because they first search for the job and then perform an action on it. Therefore, we need to do the search + action under the same job mutex critical section. Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. Signed

[PATCH v12 00/21] job: replace AioContext lock with job_mutex

2022-09-26 Thread Emanuele Giuseppe Esposito
In this series, we want to remove the AioContext lock and instead use the already existent job_mutex to protect the job structures and list. This is part of the work to get rid of AioContext lock usage in favour of smaller granularity locks. In order to simplify reviewer's job, job lock/unlock fun

[PATCH v12 01/21] job.c: make job_mutex and job_lock/unlock() public

2022-09-26 Thread Emanuele Giuseppe Esposito
job mutex will be used to protect the job struct elements and list, replacing AioContext locks. Right now use a shared lock for all jobs, in order to keep things simple. Once the AioContext lock is gone, we can introduce per-job locks. To simplify the switch from aiocontext to job lock, introduce

[PATCH v12 03/21] job.c: API functions not used outside should be static

2022-09-26 Thread Emanuele Giuseppe Esposito
job_event_* functions can all be static, as they are not used outside job.c. Same applies for job_txn_add_job(). Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf --- include/qemu/job.h | 18 --

[PATCH v12 05/21] job.c: add job_lock/unlock while keeping job.h intact

2022-09-26 Thread Emanuele Giuseppe Esposito
With "intact" we mean that all job.h functions implicitly take the lock. Therefore API callers are unmodified. This means that: - many static functions that will be always called with job lock held become _locked, and call _locked functions - all public functions take the lock internally if need

[PATCH v12 04/21] aio-wait.h: introduce AIO_WAIT_WHILE_UNLOCKED

2022-09-26 Thread Emanuele Giuseppe Esposito
Same as AIO_WAIT_WHILE macro, but if we are in the Main loop do not release and then acquire ctx_ 's aiocontext. Once all Aiocontext locks go away, this macro will replace AIO_WAIT_WHILE. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi Reviewed-by: Vladimir Sementsov-Ogie

[PATCH v12 15/21] blockjob: rename notifier callbacks as _locked

2022-09-26 Thread Emanuele Giuseppe Esposito
They all are called with job_lock held, in job_event_*_locked() Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf --- blockjob.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletion

[PATCH v12 09/21] jobs: use job locks also in the unit tests

2022-09-26 Thread Emanuele Giuseppe Esposito
Add missing job synchronization in the unit tests, with explicit locks. We are deliberately using _locked functions wrapped by a guard instead of a normal call because the normal call will be removed in future, as the only usage is limited to the tests. In other words, if a function like job_paus

[PATCH v12 06/21] job: move and update comments from blockjob.c

2022-09-26 Thread Emanuele Giuseppe Esposito
This comment applies more on job, it was left in blockjob as in the past the whole job logic was implemented there. Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementso

[PATCH v12 02/21] job.h: categorize fields in struct Job

2022-09-26 Thread Emanuele Giuseppe Esposito
Categorize the fields in struct Job to understand which ones need to be protected by the job mutex and which don't. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- include/qemu/job.h | 61

[PATCH v12 14/21] blockjob.h: categorize fields in struct BlockJob

2022-09-26 Thread Emanuele Giuseppe Esposito
The same job lock is being used also to protect some of blockjob fields. Categorize them just as done in job.h. Reviewed-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Emanuele Giuseppe Esposito --- include/block/blockjob.h | 32 ++-- 1 file changed, 26 insertions(+

[PATCH v12 12/21] job: detect change of aiocontext within job coroutine

2022-09-26 Thread Emanuele Giuseppe Esposito
From: Paolo Bonzini We want to make sure access of job->aio_context is always done under either BQL or job_mutex. The problem is that using aio_co_enter(job->aiocontext, job->co) in job_start and job_enter_cond makes the coroutine immediately resume, so we can't hold the job lock. And caching it

[PATCH v12 07/21] blockjob: introduce block_job _locked() APIs

2022-09-26 Thread Emanuele Giuseppe Esposito
Just as done with job.h, create _locked() functions in blockjob.h These functions will be later useful when caller has already taken the lock. All blockjob _locked functions call job _locked functions. Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. Signed-off-by: Ema

[PATCH v12 13/21] jobs: protect job.aio_context with BQL and job_mutex

2022-09-26 Thread Emanuele Giuseppe Esposito
In order to make it thread safe, implement a "fake rwlock", where we allow reads under BQL *or* job_mutex held, but writes only under BQL *and* job_mutex. The only write we have is in child_job_set_aio_ctx, which always happens under drain (so the job is paused). For this reason, introduce job_set

[PATCH v12 17/21] job.h: categorize JobDriver callbacks that need the AioContext lock

2022-09-26 Thread Emanuele Giuseppe Esposito
Some callbacks implementation use bdrv_* APIs that assume the AioContext lock is held. Make sure this invariant is documented. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy --- include/qemu/job.h | 27 +-- 1 file changed, 25 insertio

[PATCH v12 16/21] blockjob: protect iostatus field in BlockJob struct

2022-09-26 Thread Emanuele Giuseppe Esposito
iostatus is the only field (together with .job) that needs protection using the job mutex. It is set in the main loop (GLOBAL_STATE functions) but read in I/O code (block_job_error_action). In order to protect it, change block_job_iostatus_set_err to block_job_iostatus_set_err_locked(), always ca

[PATCH v12 11/21] jobs: group together API calls under the same job lock

2022-09-26 Thread Emanuele Giuseppe Esposito
Now that the API offers also _locked() functions, take advantage of it and give also the caller control to take the lock and call _locked functions. This makes sense especially when we have for loops, because it makes no sense to have: for(job = job_next(); ...) where each job_next() takes the l

Re: [PATCH] Revert "intel_iommu: Fix irqchip / X2APIC configuration checks"

2022-09-26 Thread Igor Mammedov
On Fri, 23 Sep 2022 21:27:08 -0400 Peter Xu wrote: > On Fri, Sep 23, 2022 at 06:03:44PM -0400, Peter Xu wrote: > > On Fri, Sep 23, 2022 at 10:41:59AM +0200, Igor Mammedov wrote: > > > It's worth putting history excavation with explanation what is broken and > > > why > > > compat stuff is bein

[PATCH v12 19/21] block_job_query: remove atomic read

2022-09-26 Thread Emanuele Giuseppe Esposito
Not sure what the atomic here was supposed to do, since job.busy is protected by the job lock. Since the whole function is called under job_mutex, just remove the atomic. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Hajnoczi Reviewed-by

[PATCH v12 21/21] job: remove unused functions

2022-09-26 Thread Emanuele Giuseppe Esposito
These public functions are not used anywhere, thus can be dropped. Also, since this is the final job API that doesn't use AioContext lock and replaces it with job_lock, adjust all remaining function documentation to clearly specify if the job lock is taken or not. Also document the locking require

[PATCH v12 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-09-26 Thread Emanuele Giuseppe Esposito
Change the job_{lock/unlock} and macros to use job_mutex. Now that they are not nop anymore, remove the aiocontext to avoid deadlocks. Therefore: - when possible, remove completely the aiocontext lock/unlock pair - if it is used by some other function too, reduce the locking section as much as

[PATCH v12 20/21] blockjob: remove unused functions

2022-09-26 Thread Emanuele Giuseppe Esposito
These public functions are not used anywhere, thus can be dropped. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by: Stefan Hajnoczi Reviewed-by: Kevin Wolf Reviewed-by: Vladimir Sementsov-Ogievskiy --- blockjob.c | 16 ++-- include/block/blockjob.h | 31 +++

[PULL 02/25] ui/cocoa: Run qemu_init in the main thread

2022-09-26 Thread Gerd Hoffmann
From: Akihiko Odaki This work is based on: https://patchew.org/QEMU/20220317125534.38706-1-philippe.mathieu.da...@gmail.com/ Simplify the initialization dance by running qemu_init() in the main thread before the Cocoa event loop starts. The secondary thread only runs only qemu_main_loop() and qe

[PULL 06/25] ui/clipboard: fix serial priority

2022-09-26 Thread Gerd Hoffmann
From: Marc-André Lureau The incoming grab event should have a higher serial. See also "vdagent: introduce VD_AGENT_CAP_CLIPBOARD_GRAB_SERIAL": https://gitlab.freedesktop.org/spice/spice-protocol/-/commit/045a6978d6dbbf7046affc5c321fa8177c8cce56 This is only a relevant fix for the -display dbus,

Re: [PATCH v2 2/2] virtio-gpu: Resource UUID

2022-09-26 Thread Gerd Hoffmann
On Fri, Sep 23, 2022 at 03:43:50PM +0200, Antonio Caggiano wrote: > Enable resource UUID feature and implement command resource assign UUID. > This is done by introducing a hash table to map resource IDs to their > UUIDs. It starts to become a bit messy with all the patches floating around where t

[PULL 03/25] Revert "main-loop: Disable block backend global state assertion on Cocoa"

2022-09-26 Thread Gerd Hoffmann
From: Akihiko Odaki This reverts commit 47281859f66bdab1974fb122cab2cbb4a1c9af7f. Signed-off-by: Akihiko Odaki Reviewed-by: Emanuele Giuseppe Esposito Reviewed-by: Peter Maydell Reviewed-by: Paolo Bonzini Message-Id: <20220819132756.74641-3-akihiko.od...@gmail.com> Signed-off-by: Gerd Hoffma

[PULL 05/25] ui: add some vdagent related traces

2022-09-26 Thread Gerd Hoffmann
From: Marc-André Lureau This helps debugging clipboard serial sync issues. Signed-off-by: Marc-André Lureau Message-Id: <20220912102455.111765-2-marcandre.lur...@redhat.com> [ kraxel: code style fix ] Signed-off-by: Gerd Hoffmann --- ui/clipboard.c | 11 +-- ui/vdagent.c| 4 ++

[PULL 04/25] meson: Allow to enable gtk and sdl while cocoa is enabled

2022-09-26 Thread Gerd Hoffmann
From: Akihiko Odaki As ui/cocoa does no longer override main(), ui/gtk and ui/sdl can be enabled even ui/cocoa is enabled. Signed-off-by: Akihiko Odaki Reviewed-by: Peter Maydell Reviewed-by: Paolo Bonzini Message-Id: <20220819132756.74641-4-akihiko.od...@gmail.com> Signed-off-by: Gerd Hoffma

[PULL 00/25] Kraxel 20220926 patches

2022-09-26 Thread Gerd Hoffmann
u.git tags/kraxel-20220926-pull-request for you to fetch changes up to f76582f0a282ec95d6dc9c7cd1903c997fd060a6: virtio-gpu: update scanout if there is any area covered by the rect (2022-09-23 14:38:28 +0200) usb: make usbnet work

[PULL 15/25] usb/msd: add usb_msd_fatal_error() and fix guest-triggerable assert

2022-09-26 Thread Gerd Hoffmann
Add handler for fatal errors. Moves device into error state where it stops responding until the guest resets it. Guest can send illegal requests where scsi command and usb packet transfer directions are inconsistent. Use the new usb_msd_fatal_error() function instead of assert() in that case. R

[PULL 07/25] ui/vdagent: always reset the clipboard serial on caps

2022-09-26 Thread Gerd Hoffmann
From: Marc-André Lureau The guest agent doesn't know what is the current serial state. Reset the serial value whenever a new agent connection is established. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2124446 Signed-off-by: Marc-André Lureau Message-Id: <20220912102455.111765-4-marcand

[PULL 16/25] hcd-xhci: drop operation with secondary stream arrays enabled

2022-09-26 Thread Gerd Hoffmann
From: Qiang Liu The abort() in xhci_find_stream() can be triggered via enabling the secondary stream arrays by setting linear stream array (LSA) bit (in endpoint context) to 0. We may show warnings and drop this operation. Fixes: 024426acc0a2 ("usb-xhci: usb3 streams") Reported-by: Qiang Liu Re

[PULL 01/25] ui/console: Get tab completion working again in the SDL monitor vc

2022-09-26 Thread Gerd Hoffmann
From: Cal Peake Define a QEMU special key constant for the tab key and add an entry for it in the qcode_to_keysym table. This allows tab completion to work again in the SDL monitor virtual console, which has been broken ever since the migration from SDL1 to SDL2. Signed-off-by: Cal Peake Messag

[PULL 08/25] ui/clipboard: reset the serial state on reset

2022-09-26 Thread Gerd Hoffmann
From: Marc-André Lureau Not only we have to reset the vdagent clipboards serial state, but also the current QEMU clipboards info serial (the value is currently used by qemu_clipboard_check_serial, only used by -display dbus). Signed-off-by: Marc-André Lureau Message-Id: <20220912102455.111765-5

[PULL 09/25] ui/vdagent: fix serial reset of guest agent

2022-09-26 Thread Gerd Hoffmann
From: Marc-André Lureau In order to reset the guest agent, we send CLOSED & OPENED events. They are correctly received by the guest kernel. However, they might not be noticed by the guest agent process, as the IO task (poll() for example) might be wake up after both CLOSED & OPENED have been pro

[PULL 11/25] hw/usb/hcd-xhci: Check whether DMA accesses fail

2022-09-26 Thread Gerd Hoffmann
From: Thomas Huth If a guest sets up bad descriptors, it could force QEMU to access non-existing memory regions. Thus we should check the return value of dma_memory_read/write() to make sure that these errors don't go unnoticed. Signed-off-by: Thomas Huth Message-Id: <20220817160016.49752-1-th.

[PULL 14/25] usb/msd: move usb_msd_packet_complete()

2022-09-26 Thread Gerd Hoffmann
Change ordering to avoid adding forward declarations in following patches. Fix comment code style while being at it. No functional change. Signed-off-by: Gerd Hoffmann Message-Id: <20220830063827.813053-2-kra...@redhat.com> --- hw/usb/dev-storage.c | 26 ++ 1 file chang

[PULL 17/25] usbnet: Add missing usb_wakeup() call in usbnet_receive()

2022-09-26 Thread Gerd Hoffmann
From: Michael Brown usbnet_receive() does not currently wake up the USB endpoint, leading to a dead RX datapath when used with a host controller such as xHCI that relies on being woken up. Fix by adding a call to usb_wakeup() at the end of usbnet_receive(). Signed-off-by: Michael Brown Message

[PULL 22/25] Revert "audio: Log context for audio bug"

2022-09-26 Thread Gerd Hoffmann
From: Volker Rümelin This reverts commit 8e30d39bade3010387177ca23dbc2244352ed4a3. Revert commit 8e30d39bad "audio: Log context for audio bug" to make error propagation work again. Signed-off-by: Volker Rümelin Message-Id: <20220917131626.7521-1-vr_q...@t-online.de> Signed-off-by: Gerd Hoffman

[PULL 10/25] ui/console: fix three double frees in png_save()

2022-09-26 Thread Gerd Hoffmann
From: Volker Rümelin The png_destroy_write_struct() function frees all memory used by libpng. Don't use the glib auto cleanup mechanism to free the memory allocated by libpng again. For the pixman image, use only the auto cleanup mechanism and remove the qemu_pixman_image_unref() function call to

[PULL 20/25] usbnet: Report link-up via interrupt endpoint in CDC-ECM mode

2022-09-26 Thread Gerd Hoffmann
From: Michael Brown Signed-off-by: Michael Brown Message-Id: <20220906183053.3625472-5-mc...@ipxe.org> Signed-off-by: Gerd Hoffmann --- hw/usb/dev-network.c | 27 +-- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/hw/usb/dev-network.c b/hw/usb/dev-networ

[PULL 18/25] usbnet: Accept mandatory USB_CDC_SET_ETHERNET_PACKET_FILTER request

2022-09-26 Thread Gerd Hoffmann
From: Michael Brown The USB_CDC_SET_ETHERNET_PACKET_FILTER request is mandatory for CDC-ECM devices. Accept this request, ignoring the actual filter value (to match the existing behaviour for RNDIS). Signed-off-by: Michael Brown Message-Id: <20220906183053.3625472-3-mc...@ipxe.org> Signed-off-

[PULL 21/25] audio: Add sndio backend

2022-09-26 Thread Gerd Hoffmann
From: Alexandre Ratchov sndio is the native API used by OpenBSD, although it has been ported to other *BSD's and Linux (packages for Ubuntu, Debian, Void, Arch, etc.). Signed-off-by: Brad Smith Signed-off-by: Alexandre Ratchov Reviewed-by: Volker Rümelin Tested-by: Volker Rümelin Message-Id:

[PULL 13/25] hcd-ohci: Fix inconsistency when resetting ohci root hubs

2022-09-26 Thread Gerd Hoffmann
From: Qiang Liu I found an assertion failure in usb_cancel_packet() and posted my analysis in https://gitlab.com/qemu-project/qemu/-/issues/1180. I think this issue is because the inconsistency when resetting ohci root hubs. There are two ways to reset ohci root hubs: 1) through HcRhPortStatus,

Re: [PATCH v8 2/8] KVM: Extend the memslot to support fd-based private memory

2022-09-26 Thread Fuad Tabba
Hi Chao, On Thu, Sep 15, 2022 at 3:35 PM Chao Peng wrote: > > In memory encryption usage, guest memory may be encrypted with special > key and can be accessed only by the VM itself. We call such memory > private memory. It's valueless and sometimes can cause problem to allow > userspace to access

[PULL 12/25] hcd-ohci: Drop ohci_service_iso_td() if ed->head & OHCI_DPTR_MASK is zero

2022-09-26 Thread Gerd Hoffmann
From: Qiang Liu An abort happens in ohci_frame_boundary() when ohci->done is 0 [1]. ``` c static void ohci_frame_boundary(void *opaque) { // ... if (ohci->done_count == 0 && !(ohci->intr_status & OHCI_INTR_WD)) { if (!ohci->done) abort(); <

[PULL 25/25] virtio-gpu: update scanout if there is any area covered by the rect

2022-09-26 Thread Gerd Hoffmann
From: Dongwon Kim The scanout is currently updated only if the whole rect is inside the scanout space. This is not a correct condition because the scanout should be updated even a small area in the scanout space is covered by the rect. Cc: Gerd Hoffmann Signed-off-by: Dongwon Kim Reviewed-by:

[PULL 19/25] usbnet: Detect short packets as sent by the xHCI controller

2022-09-26 Thread Gerd Hoffmann
From: Michael Brown The xHCI controller will ignore the endpoint MTU and so may deliver packets of any length. Detect short packets as being any packet that has a length of zero or a length that is not a multiple of the MTU. Signed-off-by: Michael Brown Message-Id: <20220906183053.3625472-4-mc

Re: [PATCH] qemu-nbd: set timeout to qemu-nbd socket

2022-09-26 Thread Vladimir Sementsov-Ogievskiy
[+ Den] On 9/25/22 16:53, luzhipeng wrote: From: lu zhipeng Prevent the NBD socket stuck all the time, So set timeout. Signed-off-by: lu zhipeng --- nbd/client.c | 8 1 file changed, 8 insertions(+) diff --git a/nbd/client.c b/nbd/client.c index 30d5383cb1..89dde53a0f 100644 ---

[PULL 24/25] hw/display/ati_2d: Fix buffer overflow in ati_2d_blt (CVE-2021-3638)

2022-09-26 Thread Gerd Hoffmann
From: Philippe Mathieu-Daudé When building QEMU with DEBUG_ATI defined then running with '-device ati-vga,romfile="" -d unimp,guest_errors -trace ati\*' we get: ati_mm_write 4 0x16c0 DP_CNTL <- 0x1 ati_mm_write 4 0x146c DP_GUI_MASTER_CNTL <- 0x2 ati_mm_write 4 0x16c8 DP_MIX <- 0xff a

[patch v0] qapi/qmp: Add timestamps to qmp command responses.

2022-09-26 Thread Denis Plotnikov
Add "start" & "end" timestamps to qmp command responses. It's disabled by default, but can be enabled with 'timestamp=on' monitor's parameter, e.g.: -chardev socket,id=mon1,path=/tmp/qmp.socket,server=on,wait=off -mon chardev=mon1,mode=control,timestamp=on Example of result: ./qemu/s

[PULL 23/25] audio: remove abort() in audio_bug()

2022-09-26 Thread Gerd Hoffmann
From: Volker Rümelin Commit ab32b78cd1 "audio: Simplify audio_bug() removing old code" introduced abort() in audio_bug() for regular builds. audio_bug() was never meant to abort QEMU for the following reasons. - There's code in audio_bug() that expects audio_bug() gets called more than on

Re: [PATCH v2] block: Refactor get_tmp_filename()

2022-09-26 Thread Markus Armbruster
Bin Meng writes: > From: Bin Meng > > At present there are two callers of get_tmp_filename() and they are > inconsistent. > > One does: > > /* TODO: extra byte is a hack to ensure MAX_PATH space on Windows. */ > char *tmp_filename = g_malloc0(PATH_MAX + 1); > ... > ret = get_tmp_

Re: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd

2022-09-26 Thread David Hildenbrand
On 23.09.22 02:58, Kirill A . Shutemov wrote: On Mon, Sep 19, 2022 at 11:12:46AM +0200, David Hildenbrand wrote: diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h index 6325d1d0e90f..9d066be3d7e8 100644 --- a/include/uapi/linux/magic.h +++ b/include/uapi/linux/magic.h @@ -101,

Re: [PATCH v8 5/8] KVM: Register/unregister the guest private memory regions

2022-09-26 Thread Fuad Tabba
Hi Chao, On Thu, Sep 15, 2022 at 3:38 PM Chao Peng wrote: > > If CONFIG_HAVE_KVM_PRIVATE_MEM=y, userspace can register/unregister the > guest private memory regions through KVM_MEMORY_ENCRYPT_{UN,}REG_REGION > ioctls. The patch reuses existing SEV ioctl number but differs that the > address in th

Re: [PATCH v6 3/5] module: add Error arguments to module_load and module_load_qom

2022-09-26 Thread Kevin Wolf
Am 24.09.2022 um 01:21 hat Claudio Fontana geschrieben: > improve error handling during module load, by changing: > > bool module_load(const char *prefix, const char *lib_name); > void module_load_qom(const char *type); > > to: > > int module_load(const char *prefix, const char *name, Error **er

Re: [PATCH v6 5/5] accel: abort if we fail to load the accelerator plugin

2022-09-26 Thread Kevin Wolf
Am 26.09.2022 um 09:58 hat Claudio Fontana geschrieben: > On 9/24/22 14:35, Philippe Mathieu-Daudé via wrote: > > On 24/9/22 01:21, Claudio Fontana wrote: > >> if QEMU is configured with modules enabled, it is possible that the > >> load of an accelerator module will fail. > >> Abort in this case,

Re: Maximum QMP reply size

2022-09-26 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Wed, Sep 07, 2022 at 01:54:05PM +0200, Markus Armbruster wrote: >> John Snow writes: >> >> > Hi, I suspect I have asked this before, but I didn't write it down in >> > a comment, so I forget my justification... >> > >> > In the QMP lib, we need to set a buffering

Re: [PATCH v1 3/9] hw/intc/gic: use MxTxAttrs to divine accessing CPU

2022-09-26 Thread Alex Bennée
m...@ynddal.dk writes: >> On 22 Sep 2022, at 16.58, Alex Bennée wrote: >> >> Now that MxTxAttrs encodes a CPU we should use that to figure it out. >> This solves edge cases like accessing via gdbstub or qtest. >> >> Signed-off-by: Alex Bennée >> Resolves: https://gitlab.com/qemu-project/qemu

Re: [PATCH v6 5/5] accel: abort if we fail to load the accelerator plugin

2022-09-26 Thread Claudio Fontana
On 9/26/22 12:56, Kevin Wolf wrote: > Am 26.09.2022 um 09:58 hat Claudio Fontana geschrieben: >> On 9/24/22 14:35, Philippe Mathieu-Daudé via wrote: >>> On 24/9/22 01:21, Claudio Fontana wrote: if QEMU is configured with modules enabled, it is possible that the load of an accelerator modu

Re: [PATCH 00/20] Cross compilation changes for 7.2

2022-09-26 Thread Paolo Bonzini
Ping (I can also include it in my next pull request if desirable). Paolo On Fri, Aug 26, 2022 at 12:27 AM Paolo Bonzini wrote: > > This is a bunch of related changes leading up to building ROMs > with container-based cross compilers: > > - detect pc-bios/ CC options just once instead of using ma

Re: [QEMU][PATCH 1/5] MAINTAINERS: Update maintainer's email for Xilinx CAN

2022-09-26 Thread Francisco Iglesias
On [2022 Sep 09] Fri 23:12:48, Vikram Garhwal wrote: > Signed-off-by: Vikram Garhwal Reviewed-by: Francisco Iglesias > --- > MAINTAINERS | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 1729c0901c..1d45e92271 100644 > --- a/MAINTAI

Re: [PATCH] qemu-nbd: set timeout to qemu-nbd socket

2022-09-26 Thread Denis V. Lunev
On 9/26/22 12:05, Vladimir Sementsov-Ogievskiy wrote: [+ Den] On 9/25/22 16:53, luzhipeng wrote: From: lu zhipeng Prevent the NBD socket stuck all the time, So set timeout. Signed-off-by: lu zhipeng ---   nbd/client.c | 8   1 file changed, 8 insertions(+) diff --git a/nbd/client.c

[PATCH] docs: Add --tpm2 option to swtpm command line

2022-09-26 Thread Stefan Berger
Add the --tpm2 option to the swtpm command line to run a TPM 2. Signed-off-by: Stefan Berger --- docs/specs/tpm.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/specs/tpm.rst b/docs/specs/tpm.rst index 3be190343a..243e24b692 100644 --- a/docs/specs/tpm.rst +++ b/docs/specs/tpm.rst @@

Re: qemu-x86_64 runs out of memory

2022-09-26 Thread Li Zhang
I did some investigation and when I mmap 2TB memory, the PageDesc is allocated with 12GB. The count of PageDesc is about 0x8 and the size of PageDesc is 24Bytes. So memory costs about 12GB. If the size of PageDesc data is reduced, the memory should be reduced significantly. If more and more

[PATCH qemu v2 2/2] m68k: align bootinfo strings and data to 4 bytes

2022-09-26 Thread Jason A. Donenfeld
Various tools, such as kexec-tools and m68k-bootinfo, expect each bootinfo entry to be aligned to 4 bytes, not 2 bytes. So adjust the padding to fill this out as such. Also, break apart the padding additions from the other field length additions, so that it's more clear why these magic numbers are

[no subject]

2022-09-26 Thread 张 泽宇
unsubscribe

[PATCH qemu v2 1/2] m68k: rework BI_VIRT_RNG_SEED as BI_RNG_SEED

2022-09-26 Thread Jason A. Donenfeld
Following a change on the kernel side (see link), pass BI_RNG_SEED instead of BI_VIRT_RNG_SEED. This should have no impact on compatibility, as there will simply be no effect if it's an old kernel, which is how things have always been. We then use this as an opportunity to add this to q800, since n

Re: [PATCH v12 13/21] jobs: protect job.aio_context with BQL and job_mutex

2022-09-26 Thread Vladimir Sementsov-Ogievskiy
On 9/26/22 12:32, Emanuele Giuseppe Esposito wrote: In order to make it thread safe, implement a "fake rwlock", where we allow reads under BQL *or* job_mutex held, but writes only under BQL *and* job_mutex. The only write we have is in child_job_set_aio_ctx, which always happens under drain (so

Re: [PATCH v3 01/54] tests/qtest: i440fx-test: Rewrite create_blob_file() to be portable

2022-09-26 Thread Thomas Huth
On 25/09/2022 13.29, Bin Meng wrote: From: Bin Meng Previously request_{bios, pflash} cases were skipped on win32, mainly due to create_blob_file() calling mmap() which does not exist on win32. This rewirtes create_blob_file() to be portable, so that we can enable these cases on Windows. Sugge

Re: [PATCH v8 07/14] net: stream: add unix socket

2022-09-26 Thread Laurent Vivier
On 9/14/22 07:16, David Gibson wrote: On Tue, Sep 13, 2022 at 08:39:53AM +0200, Laurent Vivier wrote: Signed-off-by: Laurent Vivier Reviewed-by: Stefano Brivio --- net/stream.c| 108 +--- qapi/net.json | 2 +- qemu-options.hx | 1 + 3

Re: [PATCH v12 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-09-26 Thread Vladimir Sementsov-Ogievskiy
On 9/26/22 12:32, Emanuele Giuseppe Esposito wrote: Change the job_{lock/unlock} and macros to use job_mutex. Now that they are not nop anymore, remove the aiocontext to avoid deadlocks. Therefore: - when possible, remove completely the aiocontext lock/unlock pair - if it is used by some other

Re: [PATCH v3 05/54] tests/qtest: ahci-test: Avoid using hardcoded /tmp

2022-09-26 Thread Thomas Huth
On 25/09/2022 13.29, Bin Meng wrote: From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng --- Changes in v3: - Split to a separate patch - Ensure g_autofree variable is

Re: [PATCH v3 06/54] tests/qtest: aspeed_smc-test: Avoid using hardcoded /tmp

2022-09-26 Thread Thomas Huth
On 25/09/2022 13.29, Bin Meng wrote: From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng --- Changes in v3: - Split to a separate patch - Ensure g_autofree variable is

Re: [PATCH v11 18/21] job.c: enable job lock/unlock and remove Aiocontext locks

2022-09-26 Thread Vladimir Sementsov-Ogievskiy
On 9/18/22 20:12, Emanuele Giuseppe Esposito wrote: --- a/qemu-img.c +++ b/qemu-img.c @@ -911,7 +911,6 @@ static void run_block_job(BlockJob *job, Error **errp)   AioContext *aio_context = block_job_get_aio_context(job);   int ret = 0;   -    aio_context_acquire(aio_context);   jo

Re: [PATCH v12 21/21] job: remove unused functions

2022-09-26 Thread Vladimir Sementsov-Ogievskiy
On 9/26/22 12:32, Emanuele Giuseppe Esposito wrote: These public functions are not used anywhere, thus can be dropped. Also, since this is the final job API that doesn't use AioContext lock and replaces it with job_lock, adjust all remaining function documentation to clearly specify if the job lo

Re: [PATCH v3 07/54] tests/qtest: boot-serial-test: Avoid using hardcoded /tmp

2022-09-26 Thread Thomas Huth
On 25/09/2022 13.29, Bin Meng wrote: From: Bin Meng This case was written to use hardcoded /tmp directory for temporary files. Update to use g_file_open_tmp() for a portable implementation. Signed-off-by: Bin Meng --- Changes in v3: - Split to a separate patch - Ensure g_autofree variable is

Re: [PATCH] tests/9p: split virtio-9p-test.c into tests and 9p client part

2022-09-26 Thread Christian Schoenebeck
On Samstag, 10. September 2022 19:46:55 CEST Christian Schoenebeck wrote: > This patch is pure refactoring, it does not change behaviour. > > virtio-9p-test.c grew to 1657 lines. Let's split this file up between > actual 9p test cases vs. 9p test client, to make it easier to > concentrate on the a

[PATCH 1/1] 9pfs: avoid iterator invalidation in v9fs_mark_fids_unreclaim

2022-09-26 Thread Linus Heckemann
Previously, the yielding in v9fs_reopen_fid and put_fid could result in other parts of the code modifying the fid table. This would invalidate the hash table iterator, causing misbehaviour. Now we ensure that we complete the iteration before yielding, so that the iterator remains valid throughout

Re: [PATCH] qemu-nbd: set timeout to qemu-nbd socket

2022-09-26 Thread Vladimir Sementsov-Ogievskiy
On 9/26/22 14:34, Denis V. Lunev wrote: On 9/26/22 12:05, Vladimir Sementsov-Ogievskiy wrote: [+ Den] On 9/25/22 16:53, luzhipeng wrote: From: lu zhipeng Prevent the NBD socket stuck all the time, So set timeout. Signed-off-by: lu zhipeng ---   nbd/client.c | 8   1 file changed, 8

Re: [PATCH v8 1/8] linux-headers: update to 6.0-rc3

2022-09-26 Thread Thomas Huth
On 02/09/2022 19.27, Matthew Rosato wrote: Signed-off-by: Matthew Rosato --- ... diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h index bf6e96011d..46de10a809 100644 --- a/linux-headers/asm-x86/kvm.h +++ b/linux-headers/asm-x86/kvm.h @@ -198,13 +198,13 @@ struct kvm_msrs

Re: [PATCH v8 1/8] linux-headers: update to 6.0-rc3

2022-09-26 Thread Peter Maydell
On Mon, 26 Sept 2022 at 13:53, Thomas Huth wrote: > > On 02/09/2022 19.27, Matthew Rosato wrote: > > Signed-off-by: Matthew Rosato > > --- > ... > > diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h > > index bf6e96011d..46de10a809 100644 > > --- a/linux-headers/asm-x86/kvm.h

Re: [PATCH qemu v2 2/2] m68k: align bootinfo strings and data to 4 bytes

2022-09-26 Thread Laurent Vivier
Le 26/09/2022 à 13:39, Jason A. Donenfeld a écrit : Various tools, such as kexec-tools and m68k-bootinfo, expect each bootinfo entry to be aligned to 4 bytes, not 2 bytes. So adjust the padding to fill this out as such. Agree, I found the same problem using petitboot as a ROM for the virt machi

  1   2   3   4   >