On Wed, 2023-12-06 at 11:42 -0600, Michael Roth wrote:
> On Wed, Dec 06, 2023 at 07:20:14PM +0200, Maxim Levitsky wrote:
> > On Tue, 2023-12-05 at 16:28 -0600, Michael Roth wrote:
> > > Commit 7191f24c7fcf ("accel/kvm/kvm-all: Handle register access errors"
about something like that:
if (sev_es_enabled() && env->efer & MSR_EFER_LME && env->cr[0] & CR0_PG_MASK) {
/*
* Workaround KVM bug, because of which KVM might not be aware of the
* fact that EFER.LMA was toggled by the hardware
*/
e
On Sun, 2022-10-02 at 07:56 -0600, Keith Busch wrote:
> On Sun, Oct 02, 2022 at 11:59:42AM +0300, Maxim Levitsky wrote:
> > On Thu, 2022-09-29 at 19:35 +0200, Paolo Bonzini wrote:
> > > On 9/29/22 18:39, Christoph Hellwig wrote:
> > > > On Thu, Sep 29, 2022 at 10:37
this
is qemu
bug, but I do fear that it can cause quite some problems for users,
especially for users that use outdated qemu version.
It might be too much to ask, but maybe add a Kconfig option to keep legacy
behavier
for those that need it?
Best regards,
Maxim Levitsky
f don't care, I would be happy to patch my qemu),
but I afraid that this will break *lots* of users that only updated the kernel
and not the qemu.
What do you think?
Best regards,
Maxim Levitsky
6.0-rc7, using mainline master branch as yesterday.
Best regards,
Maxim Levitsky
env->nested_state->format = KVM_STATE_NESTED_FORMAT_SVM;
> - }
> + kvm_init_nested_state(env);
> }
> }
>
> @@ -2199,6 +2214,8 @@ void kvm_arch_reset_vcpu(X86CPU *cpu)
> /* enabled by default */
> env->poll_control_msr = 1;
>
> + kvm_init_nested_state(env);
> +
> sev_es_set_reset_vector(CPU(cpu));
> }
>
Makes sense.
Reviewed-by: Maxim Levitsky
Best regards,
Maxim Levitsky
ve mentioned this, I actually already debugged the same issue while
trying to reproduce the smm int window bug.
100% my fault.
I also share the same feeling that this might be yet another 'whack a mole' and
break somewhere else, but overall it does make sense.
Reviewed-by: Maxim Levitsky
issues are related.
Does the guest have HyperV enabled in it (that is nested virtualization?)
Intel or AMD?
Does the VM uses secure boot / SMM?
Best regards,
Maxim Levitsky
>
> There are also a few reports about non-Windows VMs, mostly Ubuntu 20.04
> with UEFI/OVMF, but again, it
28) |
> @@ -5775,7 +5806,7 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index,
> uint32_t count,
> case 0x801D:
> *eax = 0;
> if (cpu->cache_info_passthrough) {
> -host_cpuid(index, count, eax, ebx, ecx, edx);
> +x86_cpu_get_cache_cpuid(index, count, eax, ebx, ecx, edx);
> break;
> }
> switch (count) {
Makes sense.
Reviewed-by: Maxim Levitsky
Best regards,
Maxim Levitsky
Just FYI.
As a workaround I reduced the virtio-blk queue-size to 16
and it seems to work again. I am only keeping this configuration to test
that it boots thus performance is not an issue.
Option to override the coroutine pool size would be ideal in this case IMHO
though.
Best regards,
Maxim Levitsky
u.h | 4 +++
> > > > > target/i386/kvm/kvm-cpu.c | 12
> > > > > target/i386/kvm/kvm.c | 57
> > > > > ++
> > > > > target/i386/kvm/kvm_i386.h | 1 +
> > > > > 5 files changed, 75 insertions(+), 6 deletions(-)
> > > >
> > > > With this commit qemu crashes for me when invoking the following
> > > > QMP command:
> > >
> > > It is way worse than that even. If you remove '-S' you get an
> > > immediate kaboom on startup on AMD hosts
> >
> > Which AMD CPU is in this host?
>
> AMD EPYC 7302P
>
>
> With regards,
> Daniel
my 3970X - same issue.
Best regards,
Maxim Levitsky
Even when the feature is not supported in guest CPUID,
still set the msr to the default value which will
be the only value KVM will accept in this case
Signed-off-by: Maxim Levitsky
---
target/i386/cpu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/target/i386/cpu.c b
This allows to make PDPTRs part of the migration
stream and thus not reload them after migration which
is against X86 spec.
Signed-off-by: Maxim Levitsky
---
accel/kvm/kvm-all.c | 5 ++
include/sysemu/kvm.h | 4 ++
target/i386/cpu.h | 3 ++
target/i386/kvm/kvm.c | 107
Signed-off-by: Maxim Levitsky
---
target/i386/cpu.c | 5 +
target/i386/cpu.h | 4
target/i386/kvm/kvm.c | 15 +++
target/i386/machine.c | 23 +++
4 files changed, 47 insertions(+)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index
These patches implement the qemu side logic to support
the KVM features I developed recently.
All 3 patches are for features that are accepted upstream in KVM.
V2: rebased and fixed patch 2 to compile without kvm
Best regards,
Maxim Levitsky
Maxim Levitsky (3):
KVM: use KVM_{GET|SET
Signed-off-by: Maxim Levitsky
---
accel/kvm/kvm-all.c | 25 ++
gdbstub.c| 62
include/sysemu/kvm.h | 15 +++
3 files changed, 91 insertions(+), 11 deletions(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm
On Mon, 2021-10-18 at 16:49 -0400, Michael S. Tsirkin wrote:
> On Mon, Oct 18, 2021 at 11:05:23AM -0700, Eric Dumazet wrote:
> >
> > On 10/17/21 3:50 AM, Maxim Levitsky wrote:
> > > Hi!
> > >
> > > This is a follow up mail to my mail about NFS client
On Wed, 2021-10-13 at 16:50 +0100, Alex Bennée wrote:
> Maxim Levitsky writes:
>
> > Signed-off-by: Maxim Levitsky
> > ---
> > accel/kvm/kvm-all.c | 25 ++
> > gdbstub.c| 60
On Tue, 2021-09-14 at 18:52 +0300, Maxim Levitsky wrote:
> These patches implement the qemu side logic to support
> the KVM features I developed recently.
>
> First two patches are for features that are already accepted
> upstream, and I already posted them on the qemu ma
On Tue, 2021-09-14 at 18:52 +0300, Maxim Levitsky wrote:
> These patches implement the qemu side logic to support
> the KVM features I developed recently.
>
> First two patches are for features that are already accepted
> upstream, and I already posted them on the qemu ma
t_img -b "$TEST_IMG".base -F $IMGFMT
>
> $QEMU_IO -c "write -P 0 0 3M" "$TEST_IMG" 2>&1 | _filter_qemu_io |
> _filter_testdir
> -$QEMU_IMG convert -O $IMGFMT -B "$TEST_IMG".base -o backing_fmt=$IMGFMT \
> +$QEMU_IMG convert -O $IMGFMT -B "$TEST_IMG".base -F $IMGFMT \
> "$TEST_IMG" "$TEST_IMG".orig
> $QEMU_IO -c "read -P 0 0 3M" "$TEST_IMG".orig 2>&1 | _filter_qemu_io |
> _filter_testdir
> $QEMU_IMG convert -O $IMGFMT -c -B "$TEST_IMG".base -o backing_fmt=$IMGFMT \
I have seen that warning few times already in my scripts, so good to have this
option.
Reviewed-by: Maxim Levitsky
Best regards,
Maxim Levitsky
Signed-off-by: Maxim Levitsky
---
accel/kvm/kvm-all.c | 25 ++
gdbstub.c| 60
include/sysemu/kvm.h | 13 ++
3 files changed, 88 insertions(+), 10 deletions(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
This allows to make PDPTRs part of the migration
stream and thus not reload them after migration which
is against X86 spec.
Signed-off-by: Maxim Levitsky
---
accel/kvm/kvm-all.c | 5 ++
include/sysemu/kvm.h | 4 ++
target/i386/cpu.h | 3 ++
target/i386/kvm/kvm.c | 107
Signed-off-by: Maxim Levitsky
---
target/i386/cpu.c | 5 +
target/i386/cpu.h | 4
target/i386/kvm/kvm.c | 15 +++
target/i386/machine.c | 23 +++
4 files changed, 47 insertions(+)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index
accepted in KVM but can already be added to qemu since
it is conditional on KVM supporting it, and ABI wise it only relies
on SVM spec.
Best regards,
Maxim Levitsky
Maxim Levitsky (3):
KVM: use KVM_{GET|SET}_SREGS2 when supported.
gdbstub: implement NOIRQ support for single step on KVM
KVM: SVM
page table (SPT)
> simultaneously (e.g., for an 80-core server, 40 cores use EPT/NPT and
> the other 40 cores use SPT). What do you think? Thanks!
>
> Best regards,
> Harry
>
> On Mon, Jul 12, 2021 at 4:49 AM Maxim Levitsky wrote:
> > On Sun, 2021-07-11 at 15:13 -0500, harry harr
t; physical server? For example, if the physical server has 80 cores, is
> it possible to let 40 cores use Intel EPT mechanisms for page
> translation and the other 40 cores use shadow page table mechanisms?
> Thanks!
Nope sadly. EPT/NPT is enabled by a module param.
Best regards,
t: 39)
> +This decides the address width of IOVA address space. The address
> +space has 39 bits width for 3-level IOMMU page tables, and 48 bits
> for
> +4-level IOMMU page tables.
> +
> +Please also refer to the wiki page for general scenarios of VT-d
>
OMEM and -ENOSPC
and recycle the mappings in both cases?
I think that would work on both old and new kernels.
What do you think?
Best regards,
Maxim Levitsky
>
> Should I check uname(2)'s utsname.release[]? Is it reliable?
>
> > The block driver started to mis-beha
ssed something
as I haven't touched this area for a long time.
Reviewed-by: Maxim Levitsky
Best regards,
Maxim Levitsky
> ---
> block/block-backend.c | 12
> block/file-posix.c | 2 +-
> block/io.c | 1 +
> hw/scsi
max iovec number.
https://www.mail-archive.com/qemu-devel@nongnu.org/msg768264.html
Best regards,
Maxim Levitsky
> }
> }
>
> diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
> index 98c30c5d5c..82e1e2ee79 100644
> --- a/hw/scsi/scsi-generi
ot;/sys/dev/block/%u:%u/queue/max_segments",
> > major(st.st_rdev), minor(st.st_rdev));
> > sysfd = open(sysfspath, O_RDONLY);
> >
>
>
Other than that, this is the same as the patch from Tom Yan:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg768262.html
In this version he does check if the SG_GET_SG_TABLESIZE is defined, so
you might want to do this as well.
Best regards,
Maxim Levitsky
looks correct, but I might have missed something as well.
This is roughly the same as patches from Tom Yan which I carried in my series
https://www.mail-archive.com/qemu-devel@nongnu.org/msg768258.html
https://www.mail-archive.com/qemu-devel@nongnu.org/msg768262.html
I like a bit more how he created separate functions for /dev/sg and for all
other block devices.
Please take a look.
Also not related to this patch, you are missing my fix I did to the VPD limit
emulation, please consider taking
it into the series:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg768260.html
Best regards,
Maxim Levitsky
h I think is similar to this patch series.
Sorry that I kind of forgot about it for too much time.
https://www.mail-archive.com/qemu-devel@nongnu.org/msg768261.html
I'll need some time to swap-in this area so that I could compare our
patches to see if we missed something.
Best regards,
Maxim Levitsky
On Mon, 2021-04-19 at 17:29 +0100, Alex Bennée wrote:
> Maxim Levitsky writes:
>
> > Signed-off-by: Maxim Levitsky
> > ---
> > accel/kvm/kvm-all.c | 25 +++
> > gdbstub.c| 59
On Mon, 2021-04-19 at 17:22 +0100, Alex Bennée wrote:
> Maxim Levitsky writes:
>
> > Signed-off-by: Maxim Levitsky
>
> Generally it's a good idea to reference where these are coming from, is
> it a current kernel patch in flight or from an release we haven't synced
>
This allows to make PDPTRs part of the migration
stream and thus not reload them after migration which
is against X86 spec.
Signed-off-by: Maxim Levitsky
---
accel/kvm/kvm-all.c | 5 ++
include/sysemu/kvm.h | 4 ++
target/i386/cpu.h | 3 ++
target/i386/kvm/kvm.c | 107
Signed-off-by: Maxim Levitsky
---
linux-headers/asm-x86/kvm.h | 13 +
linux-headers/linux/kvm.h | 5 +
2 files changed, 18 insertions(+)
diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
index 8e76d3701d..d61dc76e24 100644
--- a/linux-headers/asm-x86
This implements support for using these new
IOCTLS to migrate PDPTRS.
Best regards,
Maxim Levitsky
Maxim Levitsky (2):
kvm: update kernel headers for KVM_{GET|SET}_SREGS2
KVM: use KVM_{GET|SET}_SREGS2 when supported.
accel/kvm/kvm-all.c | 5 ++
include/sysemu/kvm.h
On Thu, 2021-04-01 at 18:09 +0200, Paolo Bonzini wrote:
> On 01/04/21 16:45, Maxim Levitsky wrote:
> > +
> > +for (i = 0; i < 4; i++) {
> > +sregs.pdptrs[i] = env->pdptrs[i];
> > +}
> > +
> > +sregs.flags = 0;
> > +sregs.pa
clone of "starship_unstable"
Maxim Levitsky (2):
kvm: update kernel headers for KVM_{GET|SET}_SREGS2
KVM: use KVM_{GET|SET}_SREGS2 when supported by kvm.
accel/kvm/kvm-all.c | 4 ++
include/sysemu/kvm.h| 4 ++
linux-headers/asm-x86/kvm.h | 13 +
linux-hea
This allows qemu to make PDPTRs be part of the migration
stream and thus not reload them after a migration which
is against X86 spec.
Signed-off-by: Maxim Levitsky
---
accel/kvm/kvm-all.c | 4 ++
include/sysemu/kvm.h | 4 ++
target/i386/cpu.h | 1 +
target/i386/kvm/kvm.c | 101
Signed-off-by: Maxim Levitsky
---
linux-headers/asm-x86/kvm.h | 13 +
linux-headers/linux/kvm.h | 5 +
2 files changed, 18 insertions(+)
diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
index 8e76d3701d..8c604e6bb1 100644
--- a/linux-headers/asm-x86
clone of "starship_unstable"
Maxim Levitsky (2):
kvm: update kernel headers for KVM_GUESTDBG_BLOCKEVENTS
gdbstub: implement NOIRQ support for single step on KVM, when kvm's
KVM_GUESTDBG_BLOCKIRQ debug flag is supported.
accel/kvm/kvm-all.c | 25
Signed-off-by: Maxim Levitsky
---
linux-headers/asm-x86/kvm.h | 2 ++
linux-headers/linux/kvm.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/linux-headers/asm-x86/kvm.h b/linux-headers/asm-x86/kvm.h
index 8e76d3701d..33878cdc34 100644
--- a/linux-headers/asm-x86/kvm.h
+++ b/linux
Signed-off-by: Maxim Levitsky
---
accel/kvm/kvm-all.c | 25 +++
gdbstub.c| 59
include/sysemu/kvm.h | 13 ++
3 files changed, 87 insertions(+), 10 deletions(-)
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm
On Thu, 2020-11-12 at 17:04 +0200, Maxim Levitsky wrote:
> On Thu, 2020-11-12 at 07:45 -0600, Eric Blake wrote:
> > On 11/12/20 6:40 AM, Peter Lieven wrote:
> >
> > > > /*
> > > > - * Avoid that s->sector_next_statu
On Fri, 2021-03-12 at 12:59 +0100, Stefano Garzarella wrote:
> On Thu, Mar 11, 2021 at 02:53:15PM +0200, Maxim Levitsky wrote:
> > On Thu, 2021-03-04 at 11:15 +0100, Stefano Garzarella wrote:
> > > On Wed, Mar 03, 2021 at 02:07:24PM +0200, Maxim Levitsky wrote:
> > > &g
On Thu, 2021-03-04 at 11:15 +0100, Stefano Garzarella wrote:
> On Wed, Mar 03, 2021 at 02:07:24PM +0200, Maxim Levitsky wrote:
> > On Tue, 2021-03-02 at 15:52 +0100, Stefano Garzarella wrote:
> > > On Mon, Mar 01, 2021 at 02:56:40PM +0200, Maxim Levitsky wrote:
> > > &g
On Tue, 2021-03-02 at 15:52 +0100, Stefano Garzarella wrote:
> On Mon, Mar 01, 2021 at 02:56:40PM +0200, Maxim Levitsky wrote:
> > On Mon, 2021-03-01 at 12:17 +0100, Paolo Bonzini wrote:
> > > If kvm_arch_remove_sw_breakpoint finds that a software breakpoint does not
> > &g
d are tested with -M kernel-irqchip=split.
>
> Therefore, deprecate the local APIC and, with it, limit
> -M kernel-irqchip=off to the ISA PC machine type, which does not
> have a local APIC at all.
>
> Signed-off-by: Paolo Bonzini
Reviewed-by: Maxim Levitsky
Best r
e breakpoint cannot be deleted and there is no way to add it
> back.
>
> Suggested-by: Maxim Levitsky
> Signed-off-by: Paolo Bonzini
> ---
> target/i386/kvm/kvm.c | 9 +++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/target/i386/kv
> +++ b/util/event_notifier-posix.c
> @@ -66,10 +66,10 @@ int event_notifier_init(EventNotifier *e, int active)
> e->rfd = fds[0];
> e->wfd = fds[1];
> }
> +e->initialized = true;
> if (active) {
> event_notifier_set(e);
> }
> -e->initialized = true;
> return 0;
>
> fail:
Sorry about that!
Best regards,
Maxim levitsky
On Thu, 2021-01-07 at 19:05 +0100, Paolo Bonzini wrote:
> On 07/01/21 11:24, Maxim Levitsky wrote:
> > On Thu, 2020-12-17 at 17:54 +0200, Maxim Levitsky wrote:
> > > These are two patches that improve a bit the qemu gdb scripts in regard to
> > > coroutines.
> >
On Mon, 2020-11-16 at 15:48 +0100, Kevin Wolf wrote:
> Am 11.11.2020 um 16:39 hat Maxim Levitsky geschrieben:
> > On Linux, fallocate(fd, FALLOC_FL_PUNCH_HOLE) when it is used on a block
> > device,
> > without O_DIRECT can return -EBUSY if it races with another write
On Thu, 2020-12-17 at 19:09 +0200, Maxim Levitsky wrote:
> Use the bdrv_co_delete_file interface to delete the underlying
> file if qcow2 initialization fails (e.g due to bad encryption secret)
>
> This makes the qcow2 driver behave the same way as the luks driver behaves.
>
&
On Thu, 2020-12-17 at 17:00 +0200, Maxim Levitsky wrote:
> These few patches are the result of a random hacking I did to make the qemu
> cope with eventfd allocation failure, when using an iothread,
> as it happened in bz #1897550.
>
> I am not 100% sure which patches in this s
On Thu, 2020-12-17 at 17:54 +0200, Maxim Levitsky wrote:
> These are two patches that improve a bit the qemu gdb scripts in regard to
> coroutines.
>
> First patch fixes a bug in 'qemu coroutine' in regard to usage on non topmost
> stack frame.
>
> Second patch implement
On Thu, 2020-12-17 at 18:56 +0200, Maxim Levitsky wrote:
> This patch series attempts to provide a solution to the problem of the
> transfer
> limits of the raw file driver (host_device/file-posix), some of which I
> already tried to fix in the past.
>
> I included 2 patches
win95 (I think) drivers. I didn't play
with win95 though.
I do notice the exact same issue with SB16.
Best regards,
Maxim Levitsky
,
Maxim Levitsky
Maxim Levitsky (3):
crypto: luks: Fix tiny memory leak
block: add bdrv_co_delete_file_noerr
block: qcow2: remove the created file on initialization error
block.c | 22 ++
block/crypto.c| 13 ++---
block/qcow2.c
When the underlying block device doesn't support the
bdrv_co_delete_file interface, an 'Error' object was leaked.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/crypto.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block
If the qcow initialization fails, we should remove the file if it was
already created, to avoid leaving stale files around.
We already do this for luks raw images.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 8 +---
1 file changed, 5 insertions(+), 3
This function wraps bdrv_co_delete_file for the common case of removing a file,
which was just created by format driver, on an error condition.
It hides the -ENOTSUPP error, and reports all other errors otherwise.
Use it in luks driver
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
blk_get_max_ioctl_transfer interface.
Fixes: 867eccfed8 ("file-posix: Use max transfer length/segment count only for
SCSI passthrough")
Signed-off-by: Maxim Levitsky
---
block/file-posix.c | 7 ---
block/iscsi.c | 1 +
hw/scsi/scsi-generic.c | 4 ++--
3 files
Signed-off-by: Maxim Levitsky
---
block/file-posix.c | 22 +-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index cbf1271773..2bf4d095a7 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1179,6 +1179,26 @@ static
if this should be solved.
V2: fixed an issue in a patch from Tom Yan (thanks), and removed
refactoring from last patch according to Paulo's request.
V3: few cosmitic changes due to the review feedback.
Maxim Levitsky (3):
block: add max_ioctl_transfer to BlockLimits
block: use
, thus the guest never sees the VPD block
limits page as supported.
Bump the transfer size by 1 in this case.
Signed-off-by: Maxim Levitsky
---
hw/scsi/scsi-generic.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/hw/scsi/scsi-generic.c b/hw/scsi/scsi-generic.c
index
, and simultaneously, the block devices
that implement scsi passthrough will switch to 'blk_get_max_ioctl_transfer' to
query and to pass it to the guest.
Signed-off-by: Maxim Levitsky
---
block/block-backend.c | 12
block/io.c | 2 ++
include/block/block_int.h
From: Tom Yan
We can and should get max transfer length and max segments for all host
devices / cdroms (on Linux).
Also use MIN_NON_ZERO instead when we clamp max transfer length against
max segments.
Signed-off-by: Tom Yan
Signed-off-by: Maxim Levitsky
---
block/file-posix.c | 57
On Thu, 2020-12-10 at 18:36 +0800, Tom Yan wrote:
> On Wed, 9 Dec 2020 at 21:54, Maxim Levitsky wrote:
> > From: Tom Yan
> >
> > We can and should get max transfer length and max segments for all host
> > devices / cdroms (on Linux).
> >
> > Also use
This script first runs the regular gdb's 'bt' command, and then if we are in a
coroutine it prints the coroutines backtraces in the order in which they
were called.
Signed-off-by: Maxim Levitsky
---
scripts/qemu-gdb.py | 1 +
scripts/qemugdb/coroutine.py | 28
-by: Maxim Levitsky
---
scripts/qemugdb/coroutine.py | 7 +++
1 file changed, 7 insertions(+)
diff --git a/scripts/qemugdb/coroutine.py b/scripts/qemugdb/coroutine.py
index db61389022..e1399211e6 100644
--- a/scripts/qemugdb/coroutine.py
+++ b/scripts/qemugdb/coroutine.py
@@ -70,6 +70,11 @@ def
. Switch to try/catch around bt, so that when regular bt fails, we
print the same message as original bt.
2. Print the correct co-routine address
Best regards,
Maxim Levitsky
Maxim Levitsky (2):
scripts/gdb: fix 'qemu coroutine' when users selects a non topmost
stack frame
These are two patches that improve a bit the qemu gdb scripts in regard to
coroutines.
First patch fixes a bug in 'qemu coroutine' in regard to usage on non topmost
stack frame.
Second patch implements 'qemu bt' as Stefan suggested.
Best regards,
Maxim Levitsky
Maxim Levitsky (2
-by: Maxim Levitsky
---
hw/scsi/virtio-scsi-dataplane.c | 18 --
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio-scsi-dataplane.c
index b995bab3a2..2824a25b65 100644
--- a/hw/scsi/virtio-scsi-dataplane.c
+++ b/hw/scsi
This script first runs the regular gdb's 'bt' command, and then if we are in a
coroutine it prints the coroutines backtraces in the order in which they
were called.
Signed-off-by: Maxim Levitsky
---
scripts/qemu-gdb.py | 1 +
scripts/qemugdb/coroutine.py | 32
,
Maxim Levitsky
Maxim Levitsky (3):
scsi: virtio-scsi: don't process IO on fenced dataplane
virtio-scsi: don't uninitialize queues that we didn't initialize
event_notifier: handle initialization failure better
hw/scsi/virtio-scsi-dataplane.c | 26 +++---
include
-by: Maxim Levitsky
---
scripts/qemugdb/coroutine.py | 7 +++
1 file changed, 7 insertions(+)
diff --git a/scripts/qemugdb/coroutine.py b/scripts/qemugdb/coroutine.py
index db61389022..e1399211e6 100644
--- a/scripts/qemugdb/coroutine.py
+++ b/scripts/qemugdb/coroutine.py
@@ -70,6 +70,11 @@ def
Count number of queues that we initialized and only deinitialize these that we
initialized successfully.
Signed-off-by: Maxim Levitsky
---
hw/scsi/virtio-scsi-dataplane.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/scsi/virtio-scsi-dataplane.c b/hw/scsi/virtio
Add 'initialized' field and use it to avoid touching event notifiers which are
either not initialized or if their initialization failed.
This is somewhat a hack, but it seems the less intrusive way to make
virtio code deal with event notifiers that failed initialization.
Signed-off-by: Maxim
: https://bugzilla.redhat.com/show_bug.cgi?id=1854811
Fix it anyway with a patch that was proposed by Paulo in the above bugzilla.
Suggested-by: Paolo Bonzini
Signed-off-by: Maxim Levitsky
---
hw/scsi/scsi-bus.c | 4
1 file changed, 4 insertions(+)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi
Levitsky
Maxim Levitsky (1):
scsi: fix device removal race vs IO restart callback on resume
hw/scsi/scsi-bus.c | 4
1 file changed, 4 insertions(+)
--
2.26.2
On Thu, 2020-12-10 at 13:54 +0300, Vladimir Sementsov-Ogievskiy wrote:
> 09.12.2020 23:33, Maxim Levitsky wrote:
> > This function wraps bdrv_co_delete_file for the common case of removing a
> > file,
> > which was just created by format driver, on an error conditi
On Thu, 2020-12-10 at 14:00 +0300, Vladimir Sementsov-Ogievskiy wrote:
> 09.12.2020 23:33, Maxim Levitsky wrote:
> > If the qcow initialization fails, we should remove the file if it was
> > already created, to avoid leaving stale files around.
> >
> > We already
= OUTPUT END ===
> >
> > Test command exited with code: 1
> >
> >
> > The full log is available at
> > http://patchew.org/logs/20201209135355.561745-1-mlevi...@redhat.com/testing.checkpatch/?type=message.
> > ---
> > Email generated automatically by Patchew [https://patchew.org/].
> > Please send your feedback to patchew-de...@redhat.com
> >
>
> Time for v3?
I am waiting a bit to see if anything else pops up,
to avoid doing too much noise.
Best regards,
Maxim Levitsky
>
> Paolo
>
This refactoring is now possible thanks to this function.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
---
block/crypto.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/block/crypto.c b/block/crypto.c
index b3a5275132..1d30fde38e 100644
This function wraps bdrv_co_delete_file for the common case of removing a file,
which was just created by format driver, on an error condition.
It hides the -ENOTSUPP error, and reports all other errors otherwise.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
---
block.c
When the underlying block device doesn't support the
bdrv_co_delete_file interface, an 'Error' object was leaked.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
---
block/crypto.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/crypto.c b/block/crypto.c
index aef5a5721a
feedback and reworked commit messages
V4: got rid of code duplication by adding bdrv_co_delete_file_noerr
and made the qcow2 driver use this function to delete
both the main and the data file.
V5: addresssed review feedback on reworked version.
Best regards,
Maxim Levitsky
Maxim Levitsky (4
If the qcow initialization fails, we should remove the file if it was
already created, to avoid leaving stale files around.
We already do this for luks raw images.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
---
block/qcow2.c | 6 --
1 file changed, 4 insertions(+), 2
On Wed, 2020-12-09 at 18:41 +0100, Alberto Garcia wrote:
> On Wed 09 Dec 2020 05:44:41 PM CET, Maxim Levitsky wrote:
> > @@ -3847,12 +3847,13 @@ static int coroutine_fn
> > qcow2_co_create_opts(BlockDriver *drv,
> >
> > /* Create the qcow2 image (fo
On Wed, 2020-12-09 at 18:34 +0100, Alberto Garcia wrote:
> On Wed 09 Dec 2020 05:44:39 PM CET, Maxim Levitsky wrote:
> > +void coroutine_fn bdrv_co_delete_file_noerr(BlockDriverState *bs)
> > +{
> > +Error *local_err = NULL;
> > +
> > +
This refactoring is now possible thanks to this function.
Signed-off-by: Maxim Levitsky
---
block/crypto.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/block/crypto.c b/block/crypto.c
index b3a5275132..1d30fde38e 100644
--- a/block/crypto.c
+++ b/block
This function wraps bdrv_co_delete_file for the common case of removing a file,
which was just created by format driver, on an error condition.
It hides the -ENOTSUPP error, and reports all other errors otherwise.
Signed-off-by: Maxim Levitsky
---
block.c | 23
If the qcow initialization fails, we should remove the file if it was
already created, to avoid leaving stale files around.
We already do this for luks raw images.
Signed-off-by: Maxim Levitsky
---
block/qcow2.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/block
When the underlying block device doesn't support the
bdrv_co_delete_file interface, an 'Error' object was leaked.
Signed-off-by: Maxim Levitsky
Reviewed-by: Alberto Garcia
---
block/crypto.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/block/crypto.c b/block/crypto.c
index aef5a5721a
feedback and reworked commit messages
V4: got rid of code duplication by adding bdrv_co_delete_file_noerr
and made the qcow2 driver use this function to delete
both the main and the data file.
Best regards,
Maxim Levitsky
Maxim Levitsky (4):
crypto: luks: Fix tiny memory leak
block: add
blk_get_max_ioctl_transfer for
> SCSI passthrough)
> 5/5 Checking commit 77c9000b7c30 (block/scsi: correctly emulate the VPD block
> limits page)
> ERROR: braces {} are necessary for all arms of this statement
> #39: FILE: hw/scsi/scsi-generic.c:204:
> +if (len &
1 - 100 of 1129 matches
Mail list logo