Re: [PATCH 7/7] scsi: move host_status handling into SCSI drivers

2020-11-16 Thread Paolo Bonzini
On 17/11/20 07:55, Hannes Reinecke wrote: On 11/16/20 11:00 PM, Paolo Bonzini wrote: On 16/11/20 20:05, Hannes Reinecke wrote: +    if (sreq->host_status == SCSI_HOST_OK) { +    SCSISense sense; + +    sreq->status = scsi_sense_from_host_status(sreq->host_status, &sense); +    if

Re: [PATCH v8 2/5] hw/block/nvme: pull aio error handling

2020-11-16 Thread Klaus Jensen
On Nov 16 19:18, Klaus Jensen wrote: > On Nov 16 09:57, Keith Busch wrote: > > On Thu, Nov 12, 2020 at 08:59:42PM +0100, Klaus Jensen wrote: > > > +static void nvme_aio_err(NvmeRequest *req, int ret) > > > +{ > > > +uint16_t status = NVME_SUCCESS; > > > +Error *local_err = NULL; > > > + > >

[PATCH] gitlab-ci.yml: Add openSUSE Leap 15.2 for gitlab CI/CD

2020-11-16 Thread Cho, Yu-Chen
Add build-system-opensuse jobs and add opensuse-leap.docker dockerfile. Use openSUSE Leap 15.2 container image in the gitlab-CI. Signed-off-by: Cho, Yu-Chen --- .gitlab-ci.d/containers.yml | 5 ++ .gitlab-ci.yml| 30 +++ tests/docker/dockerf

Re: [PATCH 5/7] scsi: Add mapping for generic SCSI_HOST status to sense codes

2020-11-16 Thread Hannes Reinecke
On 11/16/20 9:05 PM, Paolo Bonzini wrote: On 16/11/20 20:03, Hannes Reinecke wrote: +    case SCSI_HOST_TARGET_FAILURE: +    *sense = SENSE_CODE(TARGET_FAILURE); +    return CHECK_CONDITION; +    case SCSI_HOST_RESERVATION_ERROR: +    return RESERVATION_CONFLICT

Re: [PATCH 09/13] u2f-passthru: put it into the 'usb' category

2020-11-16 Thread Gerd Hoffmann
On Mon, Nov 16, 2020 at 03:04:52PM +0100, Philippe Mathieu-Daudé wrote: > On 11/15/20 7:48 PM, Gan Qixin wrote: > > The category of the u2f-passthru device is not set, put it into the 'usb' > > category. > > I guess we discussed this with Thomas 1 or 2 years ago > but I don't remember. I think it

Re: [PATCH 7/7] scsi: move host_status handling into SCSI drivers

2020-11-16 Thread Hannes Reinecke
On 11/16/20 11:00 PM, Paolo Bonzini wrote: On 16/11/20 20:05, Hannes Reinecke wrote: +    if (sreq->host_status == SCSI_HOST_OK) { +    SCSISense sense; + +    sreq->status = scsi_sense_from_host_status(sreq->host_status, &sense); +    if (sreq->status == CHECK_CONDITION) { +  

Re: [PATCH] gitlab-ci.yml: Add openSUSE Tumbleweed and Leap for gitlab CI/CD

2020-11-16 Thread AL Yu-Chen Cho
Hi, On Mon, 2020-11-16 at 12:19 +, Alex Bennée wrote: > Yu-Chen, Cho writes: > > > Add build-system-opensusetw and build-system-opensuse152 jobs and > > add opensuse152.docker and opensusetw.docker dockerfile. > > Use openSUSE Tumbleweed and openSUSE Leap 15.2 container image in > > the > >

[Bug 1904486] Re: resource leak in /net/tap.c

2020-11-16 Thread yuanjungong
** Description changed: Hi,there might be a resource leak in function net_init_tap in - /net/tap.c. + /net/tap.c. The version is 5.1.91. - 811 fd = monitor_fd_param(monitor_cur(), tap->fd, errp); - 812 if (fd == -1) { - 813 return -1; - 814 } - 815 -

Re: [PATCH 13/13] bcm2835_cprman: put some peripherals of bcm2835 cprman into the 'misc' category

2020-11-16 Thread Markus Armbruster
Peter Maydell writes: > On Mon, 16 Nov 2020 at 17:09, Markus Armbruster wrote: >> But TYPE_CPRMAN_PLL is *not* a descendant of TYPE_SYS_BUS_DEVICE, it's a >> bus-less device: >> >> static const TypeInfo cprman_pll_info = { >> .name = TYPE_CPRMAN_PLL, >> --->.parent = TYPE_DEVICE,

Re: [PATCH v3 00/41] Mirror map JIT memory for TCG

2020-11-16 Thread Joelle van Dyne
Hi, I'm wondering what the progress is for this patch set and the iOS support one? I know 5.2 is frozen, so will this be considered for 6.0? Apple Silicon Macs are out now and a few people are asking about QEMU support :) -j On Thu, Nov 5, 2020 at 9:29 PM Richard Henderson wrote: > > This is my

[RFC PATCH 1/2] Update linux headers

2020-11-16 Thread Eric Farman
This is a placeholder for a proper run of scripts/update-linux-headers.sh Signed-off-by: Eric Farman --- linux-headers/linux/vfio.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h index b92dcc4daf..609099e455 100644 --- a/linux-headers/

[RFC PATCH 0/2] vfio-ccw: Implement request notifier

2020-11-16 Thread Eric Farman
This is the corresponding QEMU code for the kernel series posted here: https://lore.kernel.org/kvm/20201117032139.50988-1-far...@linux.ibm.com/ Long story short, when a device disappears because of a subchannel event, userspace can receive a notification that the device should be released as it i

[RFC PATCH 2/2] vfio-ccw: Connect the device request notifier

2020-11-16 Thread Eric Farman
Now that the vfio-ccw code has a notifier interface to request that a device be unplugged, let's wire that together. Signed-off-by: Eric Farman --- hw/vfio/ccw.c | 40 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/hw/vfio/ccw.c b/hw/vfio/

[Bug 1904490] [NEW] intel-hda: valid registers are unknown

2020-11-16 Thread Jacob
Public bug reported: According to HDA specification, "3.1.2 General Register Behaviors and Access Requirements": "All controller registers must be addressable as byte, Word, and Dword quantities." But e.g. if you try the following to reset and enable the CORB, assuming es:esi contains the base M

[Bug 1904486] [NEW] resource leak in /net/tap.c

2020-11-16 Thread yuanjungong
Public bug reported: Hi,there might be a resource leak in function net_init_tap in /net/tap.c. 811 fd = monitor_fd_param(monitor_cur(), tap->fd, errp); 812 if (fd == -1) { 813 return -1; 814 } 815 816 ret = qemu_try_set_nonblock(fd); 817

[PATCH RFC] vfio: Set the priority of VFIO VM state change handler explicitly

2020-11-16 Thread Shenming Lu
In VFIO VM state change handler, VFIO devices are transitioned in _SAVING state, which should keep them from sending interrupts. Then we can save the pending states of all interrupts in GIC VM state change handler (on ARM). So we have to set the priority of VFIO VM state change handler explicitly

Re: [PATCH 2/2] plugins: Fix two resource leaks in connect_socket()

2020-11-16 Thread Alex Chen
On 2020/11/17 0:50, Thomas Huth wrote: > On 28/10/2020 14.45, AlexChen wrote: >> Either accept() fails or exits normally, we need to close the fd. >> >> Reported-by: Euler Robot >> Signed-off-by: AlexChen >> --- >> contrib/plugins/lockstep.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff

[PATCH v5 4/4] hw/block/m25p80: Fix Numonyx fast read dummy cycle count

2020-11-16 Thread Joe Komlodi
Numonyx chips determine the number of cycles to wait based on bits 7:4 in the volatile configuration register. However, if these bits are 0x0 or 0xF, the number of dummy cycles to wait is 10 for QIOR and QIOR4 commands or when in QIO mode, and otherwise 8 for the currently supported fast read comm

[PATCH v5 1/4] hw/block/m25p80: Make Numonyx config field names more accurate

2020-11-16 Thread Joe Komlodi
The previous naming of the configuration registers made it sound like that if the bits were set the settings would be enabled, while the opposite is true. Signed-off-by: Joe Komlodi Reviewed-by: Francisco Iglesias --- hw/block/m25p80.c | 12 ++-- 1 file changed, 6 insertions(+), 6 delet

[PATCH v5 2/4] hw/block/m25p80: Fix when VCFG XIP bit is set for Numonyx

2020-11-16 Thread Joe Komlodi
VCFG XIP is set (disabled) when the NVCFG XIP bits are all set (disabled). Signed-off-by: Joe Komlodi Reviewed-by: Francisco Iglesias --- hw/block/m25p80.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index 452d252..eb6539f 100644 ---

[PATCH v5 3/4] hw/block/m25p80: Check SPI mode before running some Numonyx commands

2020-11-16 Thread Joe Komlodi
Some Numonyx flash commands cannot be executed in DIO and QIO mode, such as trying to do DPP or DOR when in QIO mode. Signed-off-by: Joe Komlodi --- hw/block/m25p80.c | 114 +- 1 file changed, 95 insertions(+), 19 deletions(-) diff --git a/hw/

[PATCH v5 0/4] hw/block/m25p80: Numonyx: Fix dummy cycles and check for SPI mode on cmds

2020-11-16 Thread Joe Komlodi
Changelog: v4 -> v5 - 3/4: Simplify logic when changing state and checking mode. - 3/4: numonyx_get_mode -> numonyx_mode - 4/4: Reword commit message to include QIO mode. v3 -> v4 - 1/4: Patch changed to change names of register fields to be more accurate. - 1/4: Revert polarity change from v

[Bug 1798451] Re: MMX emulation is missing on HVF Acceleration

2020-11-16 Thread Rob Maskell
** Changed in: qemu Status: Incomplete => New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1798451 Title: MMX emulation is missing on HVF Acceleration Status in QEMU: New Bug descriptio

[PATCH v2 6/8] qlit: qlit_type() function

2020-11-16 Thread Eduardo Habkost
Useful function where we need to check for the qlit type before converting it to an actual QObject. Signed-off-by: Eduardo Habkost --- include/qapi/qmp/qlit.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/qapi/qmp/qlit.h b/include/qapi/qmp/qlit.h index f9e356d31e..acddb80831 1

[PATCH v2 5/8] qlit: Support all types of QNums

2020-11-16 Thread Eduardo Habkost
Use QNumValue to represent QNums, so we can also support uint64_t and double QNum values. Add new QLIT_QNUM_(INT|UINT|DOUBLE) macros for each case. The QLIT_QNUM() macro is being kept for compatibility with existing code, but becomes just a wrapper for QLIT_QNUM_INT(). Signed-off-by: Eduardo Hab

[PATCH v2 8/8] qom: Use qlit to represent property defaults

2020-11-16 Thread Eduardo Habkost
Using QLitObject lets us get rid of most of the .set_default_value functions, and just use object_property_set_default() directly. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Instead of initializing defval to QLIT_QNULL by default, just check for QTYPE_NONE, to find out if .defval

[PATCH v2 0/8] qom: Use qlit to represent property defaults

2020-11-16 Thread Eduardo Habkost
Based-on: 20201104160021.2342108-1-ehabk...@redhat.com Git branch: https://gitlab.com/ehabkost/qemu/-/commits/work/qdev-qlit-defaults This extend qlit.h to support all QNum types (signed int, unsigned int, and double), and use QLitObject to represent field property defaults. It allows us to get r

[PATCH v2 7/8] qom: Make object_property_set_default() public

2020-11-16 Thread Eduardo Habkost
The function will be used outside qom/object.c, to simplify the field property code that sets the property default value. Signed-off-by: Eduardo Habkost --- include/qom/object.h | 11 +++ qom/object.c | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/include

[PATCH v2 1/8] qobject: Include API docs in docs/devel/qobject.html

2020-11-16 Thread Eduardo Habkost
Render existing doc comments at docs/devel/qobject.html. Signed-off-by: Eduardo Habkost --- docs/devel/index.rst | 1 + docs/devel/qobject.rst | 11 + include/qapi/qmp/qnum.h| 4 +++- include/qapi/qmp/qobject.h | 48 +- qobject/qnum.c

[PATCH v2 2/8] qnum: Make qnum_get_double() get const pointer

2020-11-16 Thread Eduardo Habkost
qnum_get_double() won't change the object, the argument can be const. Signed-off-by: Eduardo Habkost --- include/qapi/qmp/qnum.h | 2 +- qobject/qnum.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qapi/qmp/qnum.h b/include/qapi/qmp/qnum.h index 25f4733e

[PATCH v2 3/8] qnum: QNumValue type for QNum value literals

2020-11-16 Thread Eduardo Habkost
Provide a separate QNumValue type that can be used for QNum value literals without the referencing counting and memory allocation features provided by QObject. Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Fix "make check" failure, by updating check-qnum unit test to use the new struct

[PATCH v2 4/8] qnum: qnum_value_is_equal() function

2020-11-16 Thread Eduardo Habkost
Extract the QNum value comparison logic to a function that takes QNumValue* as argument. Signed-off-by: Eduardo Habkost --- include/qapi/qmp/qnum.h | 1 + qobject/qnum.c | 29 +++-- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/include/qapi/qm

Re: [PULL for-5.2 0/1] qemu-ga patch queue for hard-freeze

2020-11-16 Thread Peter Maydell
On Mon, 16 Nov 2020 at 19:22, Michael Roth wrote: > > The following changes since commit 2f7c9dd5181524ceaf75ba3ef8d84090b1e9e8d8: > > Merge remote-tracking branch > 'remotes/kraxel/tags/fixes-20201116-pull-request' into staging (2020-11-16 > 14:19:31 +)

Re: [RFC PATCH 22/25] acpi/cxl: Create the CEDT (9.14.1)

2020-11-16 Thread Ben Widawsky
On 20-11-16 17:15:03, Jonathan Cameron wrote: > On Tue, 10 Nov 2020 21:47:21 -0800 > Ben Widawsky wrote: > > > The CXL Early Discovery Table is defined in the CXL 2.0 specification as > > a way for the OS to get CXL specific information from the system > > firmware. > > > > As of CXL 2.0 spec, o

Re: [RFC PATCH 11/25] hw/pxb: Allow creation of a CXL PXB (host bridge)

2020-11-16 Thread Ben Widawsky
On 20-11-16 16:44:09, Jonathan Cameron wrote: > On Tue, 10 Nov 2020 21:47:10 -0800 > Ben Widawsky wrote: > > > This works like adding a typical pxb device, except the name is > > 'pxb-cxl' instead of 'pxb-pcie'. An example command line would be as > > follows: > > -device pxb-cxl,id=cxl.0,bus="

Re: [PATCH 7/7] scsi: move host_status handling into SCSI drivers

2020-11-16 Thread Paolo Bonzini
On 16/11/20 20:05, Hannes Reinecke wrote: +    if (sreq->host_status == SCSI_HOST_OK) { +    SCSISense sense; + +    sreq->status = scsi_sense_from_host_status(sreq->host_status, &sense); +    if (sreq->status == CHECK_CONDITION) { +    scsi_req_build_sense(sreq, sense); +  

Re: [RFC PATCH 08/25] hw/cxl/device: Add memory devices (8.2.8.5)

2020-11-16 Thread Ben Widawsky
On 20-11-16 16:37:22, Jonathan Cameron wrote: > On Tue, 10 Nov 2020 21:47:07 -0800 > Ben Widawsky wrote: > > > Memory devices implement extra capabilities on top of CXL devices. This > > adds support for that. > > > > Signed-off-by: Ben Widawsky > > --- > > hw/cxl/cxl-device-utils.c | 48 +++

Re: [RFC PATCH 07/25] hw/cxl/device: Implement basic mailbox (8.2.8.4)

2020-11-16 Thread Ben Widawsky
On 20-11-16 13:46:51, Jonathan Cameron wrote: > On Tue, 10 Nov 2020 21:47:06 -0800 > Ben Widawsky wrote: > > > This is the beginning of implementing mailbox support for CXL 2.0 > > devices. > > > > Signed-off-by: Ben Widawsky > Mostly patch set cleanup suggestions rather than anything meaningfu

[PATCH for-5.2] s390x/pci: Unregister listeners before destroying IOMMU address space

2020-11-16 Thread Matthew Rosato
Hot-unplugging a vfio-pci device on s390x causes a QEMU crash: qemu-system-s390x: ../softmmu/memory.c:2772: do_address_space_destroy: Assertion `QTAILQ_EMPTY(&as->listeners)' failed. In s390, the IOMMU address space is freed during device unplug but the associated vfio-pci device may not yet be

[PATCH] meson: Fixes curses detection on msys2

2020-11-16 Thread Yonggang Luo
Fixes regression on curses detection in msys2 by commit#925a40df2828d32d3aaaf022282cba81082fb263 Signed-off-by: Yonggang Luo --- meson.build | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index bbff0880f4..8695f7d1c2 100644 --- a/meson

Re: [RFC PATCH 06/25] hw/cxl/device: Add device status (8.2.8.3)

2020-11-16 Thread Ben Widawsky
On 20-11-16 13:16:08, Jonathan Cameron wrote: > On Tue, 10 Nov 2020 21:47:05 -0800 > Ben Widawsky wrote: > > > This implements the CXL device status registers from 8.2.8.3.1 in the > > CXL 2.0 specification. It is capability ID 0001h. > > > > Signed-off-by: Ben Widawsky > > It does some other

Re: [PATCH for-6.0 1/6] qapi: Add query-accel command

2020-11-16 Thread Eduardo Habkost
On Mon, Nov 16, 2020 at 10:20:04AM -0600, Eric Blake wrote: > On 11/16/20 7:10 AM, Roman Bolshakov wrote: > > There's a problem for management applications to determine if certain > > accelerators available. Generic QMP command should help with that. > > > > Signed-off-by: Roman Bolshakov > > ---

Re: [RFC PATCH 04/25] hw/cxl/device: Introduce a CXL device (8.2.8)

2020-11-16 Thread Ben Widawsky
On 20-11-16 13:07:56, Jonathan Cameron wrote: > On Tue, 10 Nov 2020 21:47:03 -0800 > Ben Widawsky wrote: > > > A CXL device is a type of CXL component. Conceptually, a CXL device > > would be a leaf node in a CXL topology. From an emulation perspective, > > CXL devices are the most complex and so

[PULL 0/2] NBD patches for -rc2, 2020-11-16

2020-11-16 Thread Eric Blake
The following changes since commit cb5ed407a1ddadf788fd373fed41c87c9e81e5b0: Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-11-15' into staging (2020-11-16 17:00:36 +) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-nbd-2020

[PULL 1/2] nbd: Silence Coverity false positive

2020-11-16 Thread Eric Blake
Coverity noticed (CID 1436125) that we check the return value of nbd_extent_array_add in most places, but not at the end of bitmap_to_extents(). The return value exists to break loops before a future iteration, so there is nothing to check if we are already done iterating. Adding a cast to void,

[PULL 2/2] iotests: Replace deprecated ConfigParser.readfp()

2020-11-16 Thread Eric Blake
From: Kevin Wolf iotest 277 fails on Fedora 33 (Python 3.9) because a deprecation warning changes the output: nbd-fault-injector.py:230: DeprecationWarning: This method will be removed in future versions. Use 'parser.read_file()' instead. In fact, readfp() has already been deprecated i

[Bug 1904464] [NEW] Build fails with 64 bits time_t

2020-11-16 Thread Fabrice Fontaine
Public bug reported: time element is deprecated on new input_event structure in kernel's input.h [1] This will avoid the following build failure: hw/input/virtio-input-host.c: In function 'virtio_input_host_handle_status': hw/input/virtio-input-host.c:198:28: error: 'struct input_event' has no m

[PATCH] hvf: Fix value of MMU_PAGE_NX and add MMU_PAGE_RS

2020-11-16 Thread Jessica Clarke
These are meant to correspond to the error code reported for #PF, so fix the definition for Instruction Fetch faults and add one for Reserved Bit faults (checking for that is currently a TODO in x86_mmu.c). Signed-off-by: Jessica Clarke --- target/i386/hvf/x86_mmu.h | 3 ++- 1 file changed, 2 in

Re: [PATCH 5/7] scsi: Add mapping for generic SCSI_HOST status to sense codes

2020-11-16 Thread Paolo Bonzini
On 16/11/20 20:03, Hannes Reinecke wrote: +    case SCSI_HOST_TARGET_FAILURE: +    *sense = SENSE_CODE(TARGET_FAILURE); +    return CHECK_CONDITION; +    case SCSI_HOST_RESERVATION_ERROR: +    return RESERVATION_CONFLICT; +    case SCSI_HOST_ALLOCATION_FAILUR

[PATCH] hvf: Gate RDTSCP on CPU_BASED2_RDTSCP, not just CPU_BASED_TSC_OFFSET

2020-11-16 Thread Jessica Clarke
Buglink: https://bugs.launchpad.net/qemu/+bug/1894836 Signed-off-by: Jessica Clarke --- target/i386/hvf/x86_cpuid.c | 4 1 file changed, 4 insertions(+) diff --git a/target/i386/hvf/x86_cpuid.c b/target/i386/hvf/x86_cpuid.c index 16762b6eb4..fc1f87ec57 100644 --- a/target/i386/hvf/x86_cpuid

Re: [PATCH v3] s390/kvm: fix diag318 propagation and reset functionality

2020-11-16 Thread Collin Walling
On 11/16/20 7:12 AM, Cornelia Huck wrote: > On Fri, 13 Nov 2020 17:10:22 -0500 > Collin Walling wrote: > > [please remember to put qemu-devel on cc: as well] > >> The Control Program Name Code (CPNC) portion of the diag318 >> info must be set within the SIE block of each VCPU in the >> configura

[PATCH] hvf: Fix segment selector format

2020-11-16 Thread Jessica Clarke
The Requested Privilege Level field is 2 bits, the Table Indicator field is 1 bit and the Index field is the remaining 15 bits, with TI=0 meaning GDT and TI=1 meaning LDT. Signed-off-by: Jessica Clarke --- target/i386/hvf/x86.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

[PULL 0/5] Misc fixes for QEMU 5.2

2020-11-16 Thread Paolo Bonzini
The following changes since commit cb5ed407a1ddadf788fd373fed41c87c9e81e5b0: Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2020-11-15' into staging (2020-11-16 17:00:36 +) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstrea

[PULL 4/5] target/i386: avoid theoretical leak on MCE injection

2020-11-16 Thread Paolo Bonzini
g_strdup_printf is used twice to write to the same variable, which can theoretically cause a leak. In practice, it is extremely unlikely that a guest is seeing a recursive MCE and has disabled CR4.MCE between the first and the second error, but we can fix it and we can also make a slight improveme

[Bug 1784919] Re: native libgfapi glusterfs support for virtio 9p filesystem passthrough

2020-11-16 Thread Christian Schoenebeck
There are currently no plans to implement a GlusterFS fs driver backend for 9pfs in QEMU. Right now the status of 9p in QEMU is "odd fixes", which means there are currently no paid developers maintaining 9p, nor do current 9p maintainers have sufficient time to work on it on a daily basis. New 9p

[PULL 2/5] util/vfio-helpers.c: Use ram_block_discard_disable() in qemu_vfio_open_pci()

2020-11-16 Thread Paolo Bonzini
From: David Hildenbrand Currently, when using "nvme://" for a block device, like -drive file=nvme://:01:00.0/1,if=none,id=drive0 \ -device virtio-blk,drive=drive0 \ VFIO may pin all guest memory, and discarding of RAM no longer works as expected. I was able to reproduce this easily w

[PULL 3/5] scsi-disk: convert more errno values back to SCSI statuses

2020-11-16 Thread Paolo Bonzini
Linux has some OS-specific (and sometimes weird) mappings for various SCSI statuses and sense codes. The most important is probably RESERVATION CONFLICT. Add them so that they can be reported back to the guest kernel. Cc: Hannes Reinecke Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-disk.c |

[PATCH v2] hw/char/cmsdk-apb-uart: Fix rx interrupt handling

2020-11-16 Thread Tadej Pečar
Previously, the RX interrupt got missed if: - the character backend provided next character before the RX IRQ Handler managed to clear the currently served interrupt. - the character backend provided next character while the RX interrupt was disabled. Enabling the interrupt did not trigger the

[PULL 5/5] memory: Skip dirty tracking for un-migratable memory regions

2020-11-16 Thread Paolo Bonzini
From: Zenghui Yu It makes no sense to track dirty pages for those un-migratable memory regions (e.g., Memory BAR region of the VFIO PCI device) and doing so will potentially lead to some unpleasant issues during migration [1]. Skip dirty tracking for those regions by evaluating if the region is

[PULL 1/5] kvm/i386: Set proper nested state format for SVM

2020-11-16 Thread Paolo Bonzini
From: Tom Lendacky Currently, the nested state format is hardcoded to VMX. This will result in kvm_put_nested_state() returning an error because the KVM SVM support checks for the nested state to be KVM_STATE_NESTED_FORMAT_SVM. As a result, kvm_arch_put_registers() errors out early. Update the s

[Bug 1505759] Re: Usb passthrough of devices plugged to AMD FCH USB OHCI Controller failing on q35.

2020-11-16 Thread José Pekkarinen
I found a different arrangement that made it for me, so that particular case, I don't know if it works for me, or if it still fails the same, and versions has gone so far to check, I'd simply mark this invalid and forget of it. Best regards. José. ** Changed in: qemu Status: Incomplete =>

Re: [PATCH 7/7] scsi: move host_status handling into SCSI drivers

2020-11-16 Thread Hannes Reinecke
On 11/16/20 7:58 PM, Paolo Bonzini wrote: On 16/11/20 19:40, Hannes Reinecke wrote: +    if (sreq->host_status == SCSI_HOST_OK) { +    SCSISense sense; + +    sreq->status = scsi_sense_from_host_status(sreq->host_status, &sense); +    if (sreq->status == CHECK_CONDITION) { +   

[PATCH 00/11] Add QEMU debug support for SEV guests

2020-11-16 Thread Ashish Kalra
From: Ashish Kalra This patchset adds QEMU debug support for SEV guests. Debug requires access to the guest pages, which is encrypted when SEV is enabled. KVM_SEV_DBG_DECRYPT and KVM_SEV_DBG_ENCRYPT commands are available to decrypt/encrypt the guest pages, if the guest policy allows for debug

[PULL for-5.2 1/1] qga: update schema for guest-get-disks 'dependents' field

2020-11-16 Thread Michael Roth
The recently-added 'guest-get-disk' command returns a list of GuestDiskInfo entries, which in turn have a 'dependents' field which lists devices these entries are dependent upon. Thus, 'dependencies' is a better name for this field. Address this by renaming the field accordingly. Additionally, 'de

Re: [PATCH 5/7] scsi: Add mapping for generic SCSI_HOST status to sense codes

2020-11-16 Thread Hannes Reinecke
On 11/16/20 7:57 PM, Paolo Bonzini wrote: On 16/11/20 19:40, Hannes Reinecke wrote: +    case SCSI_HOST_TARGET_FAILURE: +    *sense = SENSE_CODE(TARGET_FAILURE); +    return CHECK_CONDITION; +    case SCSI_HOST_RESERVATION_ERROR: +    return RESERVATION_CONFLICT;

Re: [PATCH for-6.0 1/6] qapi: Add query-accel command

2020-11-16 Thread Roman Bolshakov
On Mon, Nov 16, 2020 at 10:20:04AM -0600, Eric Blake wrote: > On 11/16/20 7:10 AM, Roman Bolshakov wrote: > > There's a problem for management applications to determine if certain > > accelerators available. Generic QMP command should help with that. > > > > Signed-off-by: Roman Bolshakov > > ---

Re: [PATCH] kvm/i386: Set proper nested state format for SVM

2020-11-16 Thread Paolo Bonzini
On 16/11/20 19:25, Tom Lendacky wrote: On 11/16/20 12:09 PM, Paolo Bonzini wrote: On 16/11/20 18:02, Tom Lendacky wrote: From: Tom Lendacky Currently, the nested state format is hardcoded to VMX. This will result in kvm_put_nested_state() returning an error because the KVM SVM support checks f

Re: [RFC PATCH 03/25] hw/cxl/component: Introduce CXL components (8.1.x, 8.2.5)

2020-11-16 Thread Ben Widawsky
On 20-11-16 12:03:52, Jonathan Cameron wrote: > On Tue, 10 Nov 2020 21:47:02 -0800 > Ben Widawsky wrote: > > > A CXL 2.0 component is any entity in the CXL topology. All components > > have a analogous function in PCIe. Except for the CXL host bridge, all > > have a PCIe config space that is acce

[Bug 1766841] Re: QEMU 2.12 Running Problem in Windows 7 Installation

2020-11-16 Thread Thomas Huth
The QEMU project is currently considering to move its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch the

[PULL for-5.2 0/1] qemu-ga patch queue for hard-freeze

2020-11-16 Thread Michael Roth
The following changes since commit 2f7c9dd5181524ceaf75ba3ef8d84090b1e9e8d8: Merge remote-tracking branch 'remotes/kraxel/tags/fixes-20201116-pull-request' into staging (2020-11-16 14:19:31 +) are available in the Git repository at: git://github.com/mdroth/qemu.git tags/qga

Re: [PATCH 0/3] scsi: infinite guest hangs with scsi-disk

2020-11-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201116183114.55703-1-h...@suse.de/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20201116183114.55703-1-h...@suse.de Type: series Subject: [PATCH 0/3] scsi: infinite guest hangs with scsi-dis

RE: [PATCH v4 3/4] hw/block/m25p80: Check SPI mode before running some Numonyx commands

2020-11-16 Thread Joe Komlodi
Hi Francisco, -Original Message- From: Francisco Iglesias Sent: Monday, November 16, 2020 7:59 AM To: Joe Komlodi Cc: qemu-devel@nongnu.org; philippe.mathieu.da...@gmail.com; Francisco Eduardo Iglesias ; alist...@alistair23.me; qemu-bl...@nongnu.org; mre...@redhat.com Subject: Re: [PA

[PATCH 10/11] sev/i386: add SEV specific MemoryDebugOps.

2020-11-16 Thread Ashish Kalra
From: Ashish Kalra Add SEV specific MemoryDebugOps which override the default MemoryDebugOps when SEV memory encryption is enabled. The SEV specific MemoryDebugOps invoke the generic address_space_rw_debug helpers which will then invoke the memory region specific callbacks to handle and access en

Re: Property '.hmat' not found

2020-11-16 Thread Eduardo Habkost
On Mon, Nov 16, 2020 at 01:51:37PM +0100, Philippe Mathieu-Daudé wrote: > Cc'ing Igor & Eduardo. Thanks! > > On 11/13/20 10:17 AM, Jack wrote: > > Hi all, > > > > As I follow the document[1] to enable hmat, it fails and shows the message: > >   qemu-system-x86_64: Property '.hmat' not found > >

[PATCH 06/11] monitor/i386: use debug APIs when accessing guest memory

2020-11-16 Thread Ashish Kalra
From: Brijesh Singh Update the HMP commands to use the debug version of APIs when accessing guest memory. Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra --- monitor/misc.c| 4 ++-- softmmu/cpus.c| 2 +- target/i386/monitor.c | 54 ---

[PATCH 01/11] memattrs: add debug attribute

2020-11-16 Thread Ashish Kalra
From: Brijesh Singh From: Brijesh Singh Extend the MemTxAttrs to include a 'debug' flag. The flag can be used as general indicator that operation was triggered by the debugger. A subsequent patch will set the debug=1 when issuing a memory access from the gdbstub or HMP commands. This is a prer

Re: [PATCH 7/7] scsi: move host_status handling into SCSI drivers

2020-11-16 Thread Paolo Bonzini
On 16/11/20 19:40, Hannes Reinecke wrote: +if (sreq->host_status == SCSI_HOST_OK) { +SCSISense sense; + +sreq->status = scsi_sense_from_host_status(sreq->host_status, &sense); +if (sreq->status == CHECK_CONDITION) { +scsi_req_build_sense(sreq, sense); +

[PATCH 05/11] exec: add debug version of physical memory read and write API

2020-11-16 Thread Ashish Kalra
From: Brijesh Singh Adds the following new APIs - cpu_physical_memory_read_debug - cpu_physical_memory_write_debug - cpu_physical_memory_rw_debug - ldl_phys_debug - ldq_phys_debug The subsequent patch will make use of the API introduced, to ensure that the page table walks are handled correctly

[Bug 1505759] Re: Usb passthrough of devices plugged to AMD FCH USB OHCI Controller failing on q35.

2020-11-16 Thread Thomas Huth
The QEMU project is currently considering to move its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch the

[PATCH 5/7] scsi: Add mapping for generic SCSI_HOST status to sense codes

2020-11-16 Thread Hannes Reinecke
As we don't have a driver-specific mapping (yet) we should provide for a detailed mapping from host_status to SCSI sense codes. Signed-off-by: Hannes Reinecke --- scsi/utils.c | 60 +++- 1 file changed, 55 insertions(+), 5 deletions(-) dif

Re: [PATCH 5/7] scsi: Add mapping for generic SCSI_HOST status to sense codes

2020-11-16 Thread Paolo Bonzini
On 16/11/20 19:40, Hannes Reinecke wrote: +case SCSI_HOST_TARGET_FAILURE: +*sense = SENSE_CODE(TARGET_FAILURE); +return CHECK_CONDITION; +case SCSI_HOST_RESERVATION_ERROR: +return RESERVATION_CONFLICT; +case SCSI_HOST_ALLOCATION_FAILURE:

[PATCH 04/11] exec: Add address_space_read and address_space_write debug helpers.

2020-11-16 Thread Ashish Kalra
From: Ashish Kalra Add new address_space_read and address_space_write debug helper interfaces which can be invoked by vendor specific guest memory debug assist/hooks to do guest RAM memory accesses using the added MemoryRegion callbacks. Signed-off-by: Ashish Kalra --- include/exec/memory.h |

[PATCH 09/11] hw/i386: set ram_debug_ops when memory encryption is enabled

2020-11-16 Thread Ashish Kalra
From: Brijesh Singh When memory encryption is enabled, the guest RAM and boot flash ROM will contain the encrypted data. By setting the debug ops allow us to invoke encryption APIs when accessing the memory for the debug purposes. Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra --- h

[PATCH 1/7] scsi-disk: Add sg_io callback to evaluate status

2020-11-16 Thread Hannes Reinecke
Add a separate sg_io callback to allow us to evaluate the various states returned by the SG_IO ioctl. Signed-off-by: Hannes Reinecke --- hw/scsi/scsi-disk.c | 28 ++-- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c

[PATCH 03/11] exec: add ram_debug_ops support

2020-11-16 Thread Ashish Kalra
From: Brijesh Singh From: Brijesh Singh Currently, guest memory access for debugging purposes is performed using memcpy(). Extend the 'struct MemoryRegion' to include new callbacks that can be used to override the use of memcpy() with something else. The new callbacks can be used to display th

[PATCH 11/11] target/i386: clear C-bit when walking SEV guest page table

2020-11-16 Thread Ashish Kalra
From: Brijesh Singh In SEV-enabled guest the pte entry will have C-bit set, we need to clear the C-bit when walking the page table. This ensures that the proper page address translation occurs and, with the C-bit reset, the true physical address is got. The pte_mask to be used during guest page

[PATCH 08/11] sev/i386: add debug encrypt and decrypt commands

2020-11-16 Thread Ashish Kalra
From: Brijesh Singh The KVM_SEV_DBG_DECRYPT and KVM_SEV_DBG_ENCRYPT commands are used for decrypting and encrypting guest memory. The command works only if the guest policy allows the debugging. Signed-off-by: Brijesh Singh Signed-off-by: Ashish Kalra --- accel/kvm/kvm-all.c | 2 ++ acc

[Bug 1784919] Re: native libgfapi glusterfs support for virtio 9p filesystem passthrough

2020-11-16 Thread Thomas Huth
** Changed in: qemu Importance: Undecided => Wishlist -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1784919 Title: native libgfapi glusterfs support for virtio 9p filesystem passthrough Stat

[PATCH 07/11] kvm: introduce debug memory encryption API

2020-11-16 Thread Ashish Kalra
From: Brijesh Singh In order to support debugging with Secure Encrypted Virtualization (SEV), add a high-level memory encryption API. Also add a new API interface to override any CPU class specific callbacks for supporting debugging with SEV, for example, overriding the guest MMU/ page-table wal

[PATCH 0/3] scsi: infinite guest hangs with scsi-disk

2020-11-16 Thread Hannes Reinecke
Hi all, one of our customers reported an infinite guest hang following an FC link loss when using scsi-disk. Problem is that scsi-disk issues SG_IO command with a timeout of UINT_MAX, which essentially signals 'no timeout' to the host kernel. So if the command gets lost eg during an unexpected

[Bug 1809291] Re: SD Card not working in Ubuntu 18.10 (CMD 2, 3 timeout). The device worked fine in Ubuntu 18.04 and earlier versions but not in Ubuntu 18.10

2020-11-16 Thread Philippe Mathieu-Daudé
The test expects the card wired as SPI, so adding "-global sd- card.spi=true" makes the test case work. ** Changed in: qemu Status: Confirmed => Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.ne

[PATCH 02/11] exec: Add new MemoryDebugOps.

2020-11-16 Thread Ashish Kalra
From: Ashish Kalra Introduce new MemoryDebugOps which hook into guest virtual and physical memory debug interfaces such as cpu_memory_rw_debug, to allow vendor specific assist/hooks for debugging and delegating accessing the guest memory. This is required for example in case of AMD SEV platform w

[PATCH 7/7] scsi: move host_status handling into SCSI drivers

2020-11-16 Thread Hannes Reinecke
Some SCSI drivers like virtio have an internal mapping for the host_status. This patch moves the host_status translation into the SCSI drivers to allow those drivers to set up the correct values. Signed-off-by: Hannes Reinecke --- hw/scsi/esp.c | 10 ++ hw/scsi/lsi53c895a.c |

[PATCH 3/7] scsi-disk: convert more errno values back to SCSI statuses

2020-11-16 Thread Hannes Reinecke
From: Paolo Bonzini Linux has some OS-specific (and sometimes weird) mappings for various SCSI statuses and sense codes. The most important is probably RESERVATION CONFLICT. Add them so that they can be reported back to the guest kernel. Cc: Hannes Reinecke Signed-off-by: Paolo Bonzini ---

[Bug 1743214] Re: OS/2 Warp 3 support broken in 2.11

2020-11-16 Thread Thomas Huth
The QEMU project is currently considering to move its bug tracking to another system. For this we need to know which bugs are still valid and which could be closed already. Thus we are setting older bugs to "Incomplete" now. If you still think this bug report here is valid, then please switch the

[PATCH 4/7] scsi: Rename linux-specific SG_ERR codes to generic SCSI_HOST error codes

2020-11-16 Thread Hannes Reinecke
We really should make a distinction between legitimate sense codes (ie if one is running against an emulated block device or for pass-through sense codes), and the intermediate errors generated during processing of the command, which really are not sense codes but refer to some specific internal st

[PATCH 2/7] scsi: drop 'result' argument from command_complete callback

2020-11-16 Thread Hannes Reinecke
The command complete callback has a SCSIRequest as the first argument, and the status field of that structure is identical to the 'status' argument. So drop the argument from the callback. Signed-off-by: Hannes Reinecke --- hw/scsi/esp-pci.c | 5 ++--- hw/scsi/esp.c | 7 +++

[PATCH 6/7] scsi: split sg_io_sense_from_errno() in two functions

2020-11-16 Thread Hannes Reinecke
Currently sg_io_sense_from_errno() converts the two input parameters 'errno' and 'io_hdr' into sense code and SCSI status. This patch splits this off into two functions scsi_sense_from_errno() and scsi_sense_from_host_status(), both of which are available generically. This allows us to use the func

Re: [PATCH for-5.2] configure: Make "does libgio work" test pull in some actual functions

2020-11-16 Thread Paolo Bonzini
On 16/11/20 11:46, Peter Maydell wrote: In commit 76346b6264a9b01979 we tried to add a configure check that the libgio pkg-config data was correct, which builds an executable linked against it. Unfortunately this doesn't catch the problem (missing static library dependency info), because a "do n

[PATCH 0/7] scsi: scsi-disk corrupts data

2020-11-16 Thread Hannes Reinecke
Hi all, a customer of ours reported repeated data corruption in the guest following a command abort. After lengthy debugging we found that scsi-disk (and scsi-generic, for that matter) ignores the host_status field from SG_IO once a command is aborted. If the command is aborted, SG_IO will retu

  1   2   3   4   >