Ramping up Continuous Fuzzing of Virtual Devices in QEMU

2020-10-22 Thread Alexander Bulekov
Hello, QEMU was accepted into Google's oss-fuzz continuous-fuzzing platform [1] earlier this year. The fuzzers currently running on oss-fuzz are based on my 2019 Google Summer of Code Project, which leveraged libfuzzer, qtest and libqos to provide a framework for writing virtual-device fuzzers. At

Re: [PATCH v27 04/17] vfio: Add migration region initialization and finalize function

2020-10-22 Thread Kirti Wankhede
On 10/22/2020 7:52 PM, Alex Williamson wrote: On Thu, 22 Oct 2020 16:41:54 +0530 Kirti Wankhede wrote: Whether the VFIO device supports migration or not is decided based of migration region query. If migration region query is successful and migration region initialization is successful

Re: [PATCH v3 3/5] tools/virtiofsd: xattr name mappings: Map server xattr names

2020-10-22 Thread Vivek Goyal
On Wed, Oct 14, 2020 at 07:02:07PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Map xattr names coming from the server, i.e. the host filesystem; > currently this is only from listxattr. > > Signed-off-by: Dr. David Alan Gilbert > --- >

Re: [PATCH v2] net: remove an assert call in eth_get_gso_type

2020-10-22 Thread Alexander Bulekov
Also reported here in May: https://bugs.launchpad.net/qemu/+bug/1878067 -Alex On 201020 1930, P J P wrote: > From: Prasad J Pandit > > eth_get_gso_type() routine returns segmentation offload type based on > L3 protocol type. It calls g_assert_not_reached if L3 protocol is > unknown, making the

Re: [PATCH v6 1/2] hw/watchdog: Implement SBSA watchdog device

2020-10-22 Thread shashi . mallela
On Thu, 15 Oct 2020 at 17:35, Shashi Mallela wrote: > > Generic watchdog device model has been implemented as per ARM BSAv0.9 Hmm, so the patch title, filenames, etc, refer to the SBSA, which is the Server Base System Architecture spec. Is the BSA a different spec ? We should be consistent with

Re: RFC: tracking valid backing chain issue

2020-10-22 Thread Nikolay Shirokovskiy
On 21.10.2020 13:56, Kevin Wolf wrote: > Am 20.10.2020 um 12:29 hat Nikolay Shirokovskiy geschrieben: >> >> >> On 20.10.2020 13:23, Nikolay Shirokovskiy wrote: >>> >>> >>> On 20.10.2020 11:50, Kevin Wolf wrote: Am 20.10.2020 um 10:21 hat Nikolay Shirokovskiy geschrieben: > Hi, all.

Re: [PATCH v27 03/17] vfio: Add save and load functions for VFIO PCI devices

2020-10-22 Thread Kirti Wankhede
On 10/22/2020 7:36 PM, Alex Williamson wrote: On Thu, 22 Oct 2020 16:41:53 +0530 Kirti Wankhede wrote: Added functions to save and restore PCI device specific data, specifically config space of PCI device. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/pci.c

Re: [PATCH v26 05/17] vfio: Add VM state change handler to know state of VM

2020-10-22 Thread Cornelia Huck
On Thu, 22 Oct 2020 21:12:58 +0530 Kirti Wankhede wrote: > On 10/22/2020 1:21 PM, Cornelia Huck wrote: > > I'm a bit worried though that all that reasoning which flags are set or > > cleared when is quite complex, and it's easy to make mistakes. > > > > Can we model this as a FSM, where an

Re: [PATCH v1 6/6] tests/acceptance: pick a random gdb port for reverse debugging

2020-10-22 Thread Cleber Rosa
On Wed, Oct 21, 2020 at 05:31:36PM +0100, Alex Bennée wrote: > Currently the test randomly fails if you are using a shared machine > due to contention on the well known port 1234. We can ameliorate this > a bit by picking a random non-ephemeral port although it doesn't > totally avoid the problem.

Re: [PATCH v26 05/17] vfio: Add VM state change handler to know state of VM

2020-10-22 Thread Kirti Wankhede
On 10/22/2020 1:21 PM, Cornelia Huck wrote: On Wed, 21 Oct 2020 11:03:23 +0530 Kirti Wankhede wrote: On 10/20/2020 4:21 PM, Cornelia Huck wrote: On Sun, 18 Oct 2020 01:54:56 +0530 Kirti Wankhede wrote: On 9/29/2020 4:33 PM, Dr. David Alan Gilbert wrote: * Cornelia Huck

Re: [PATCH] MAINTAINERS: Update nvme entries

2020-10-22 Thread Stefan Hajnoczi
On Thu, Oct 22, 2020 at 11:00:45AM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > Make sure that maintainers of both the nvme block driver and the > emulated nvme device is notified about changes to the shared nvme.h. > > Signed-off-by: Klaus Jensen > --- > MAINTAINERS | 2 ++ > 1 file

Re: [PATCH v2 0/3] Add Xen CpusAccel

2020-10-22 Thread Paolo Bonzini
On 22/10/20 17:17, Jason Andryuk wrote: > On Tue, Oct 13, 2020 at 1:16 PM Paolo Bonzini wrote: >> >> On 13/10/20 16:05, Jason Andryuk wrote: >>> Xen was left behind when CpusAccel became mandatory and fails the assert >>> in qemu_init_vcpu(). It relied on the same dummy cpu threads as qtest. >>>

Re: [PATCH] MAINTAINERS: Cover "block/nvme.h" file

2020-10-22 Thread Stefan Hajnoczi
On Wed, Jul 01, 2020 at 04:06:34PM +0200, Philippe Mathieu-Daudé wrote: > The "block/nvme.h" header is shared by both the NVMe block > driver and the NVMe emulated device. Add the 'F:' entry on > both sections, so all maintainers/reviewers are notified > when it is changed. > > Signed-off-by:

Re: [PATCH v3 2/5] tools/virtiofsd: xattr name mappings: Map client xattr names

2020-10-22 Thread Vivek Goyal
On Wed, Oct 14, 2020 at 07:02:06PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Map xattr names originating at the client; from get/set/remove xattr. > > Signed-off-by: Dr. David Alan Gilbert > --- > tools/virtiofsd/passthrough_ll.c | 101

Re: [PATCH 04/16] util/vfio-helpers: Report error when IOMMU page size is not supported

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:16PM +0200, Philippe Mathieu-Daudé wrote: > This driver uses the host page size to align its memory regions, > but this size is not always compatible with the IOMMU. Add a > check if the size matches, and bails out providing a hint what > is the minimum page size the

Re: [PATCH 0/2] hw/block/nvme: two fixes for create sq/cq

2020-10-22 Thread Keith Busch
On Thu, Oct 22, 2020 at 03:24:02PM +0200, Klaus Jensen wrote: > From: Klaus Jensen > > The first patch is a follow up to "hw/block/nvme: fix prp mapping status > codes" and fixes some status codes in the nvme_create_{sq,cq} functions. > > The second patch fixes a faulty check on the given queue

Re: [PATCH] target/riscv: Adjust privilege level for HLV(X)/HSV instructions

2020-10-22 Thread Richard Henderson
On 10/21/20 12:21 PM, Alistair Francis wrote: >> mmuidx, you would use cpu_lduw_mmuidx_ra. I would also split the function >> into >> two, so that one performs HLVX.HU and the other HLVX.WU, so that you don't >> have >> to pass the size as a parameter. > > I'm not clear what you mean here.

Re: [PULL 22/23] hw/sd: Fix incorrect populated function switch status data structure

2020-10-22 Thread Niek Linnenbank
Hi Bin, Philippe, If im correct the acceptance tests for orange pi need to be run with a flag ARMBIAN_ARTIFACTS_CACHED set that explicitly allows them to be run using the armbian mirror. So if you pass that flag on the same command that Philippe gave, the rests should run. I have a follow up

Re: [PATCH v2 0/3] Add Xen CpusAccel

2020-10-22 Thread Jason Andryuk
On Tue, Oct 13, 2020 at 1:16 PM Paolo Bonzini wrote: > > On 13/10/20 16:05, Jason Andryuk wrote: > > Xen was left behind when CpusAccel became mandatory and fails the assert > > in qemu_init_vcpu(). It relied on the same dummy cpu threads as qtest. > > Move the qtest cpu functions to a common

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2020 at 05:50:51PM +0300, Marcel Apfelbaum wrote: > > > On Thu, Oct 22, 2020 at 5:33 PM Michael S. Tsirkin wrote: > > On Thu, Oct 22, 2020 at 05:10:43PM +0300, Marcel Apfelbaum wrote: > > > > > > On Thu, Oct 22, 2020 at 5:01 PM Michael S. Tsirkin > wrote: >

Re: [PATCH v4 2/2] hw/block/nvme: add the dataset management command

2020-10-22 Thread Keith Busch
On Thu, Oct 22, 2020 at 09:33:13AM +0200, Klaus Jensen wrote: > +if (--(*discards)) { > +status = NVME_NO_COMPLETE; > +} else { > +g_free(discards); > +req->opaque = NULL; This case needs a status = req->status; So that we get the

Re: [PATCH v3 1/5] tools/virtiofsd: xattr name mappings: Add option

2020-10-22 Thread Vivek Goyal
On Wed, Oct 14, 2020 at 07:02:05PM +0100, Dr. David Alan Gilbert (git) wrote: [..] > +/* > + * Exit; process attribute unmodified if matched. > + * An empty key applies to all. > + */ > +#define XATTR_MAP_FLAG_END_OK (1 << 0) > +/* > + * The attribute is unwanted; > + * EPERM on write hidden on

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Marcel Apfelbaum
On Thu, Oct 22, 2020 at 5:33 PM Michael S. Tsirkin wrote: > On Thu, Oct 22, 2020 at 05:10:43PM +0300, Marcel Apfelbaum wrote: > > > > > > On Thu, Oct 22, 2020 at 5:01 PM Michael S. Tsirkin > wrote: > > > > On Thu, Oct 22, 2020 at 04:55:10PM +0300, Marcel Apfelbaum wrote: > > > Hi David,

Re: [PATCH 00/25] qapi: static typing conversion, pt6

2020-10-22 Thread John Snow
On 9/22/20 6:44 PM, John Snow wrote: based-on: <2020093525.4085762-1-js...@redhat.com> [PATCH 00/26] qapi: static typing conversion, pt5 Hi, this series adds static type hints to the QAPI module. This is the final part, part six! Part 6 (Everything):

Re: [PATCH 16/16] util/vfio-helpers: Remove now unused qemu_vfio_pci_init_irq()

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:28PM +0200, Philippe Mathieu-Daudé wrote: > Our only user, the NVMe block driver, switched to the MSIX API. > As this function is now unused, remove it. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/qemu/vfio-helpers.h | 2 -- > util/vfio-helpers.c

Re: [PATCH 15/16] block/nvme: Switch to using the MSIX API

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:27PM +0200, Philippe Mathieu-Daudé wrote: > In preparation of using multiple IRQs, switch to using the recently > introduced MSIX API. Instead of allocating and assigning IRQ in > a single step, we now have to use two distinct calls. > > Signed-off-by: Philippe

Re: [PATCH 14/16] util/vfio-helpers: Introduce qemu_vfio_pci_msix_set_irq()

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:26PM +0200, Philippe Mathieu-Daudé wrote: > Introduce qemu_vfio_pci_msix_set_irq() to set the event > notifier of a specific MSIX IRQ. All other registered IRQs > are left unmodified. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/qemu/vfio-helpers.h |

Re: [PULL 22/23] hw/sd: Fix incorrect populated function switch status data structure

2020-10-22 Thread Bin Meng
Hi Philippe, On Wed, Oct 21, 2020 at 6:07 PM Philippe Mathieu-Daudé wrote: > > On 10/21/20 11:57 AM, Bin Meng wrote: > > Hi Philippe, > > > > On Tue, Oct 20, 2020 at 11:18 PM Philippe Mathieu-Daudé > > wrote: > >> > >> Hi Bin, > >> > >> On 8/21/20 7:29 PM, Philippe Mathieu-Daudé wrote: > >>>

Re: [PATCH RESEND v2 00/16] hw: Let DMA/PCI API take MemTxAttrs argument and propagate MemTxResult

2020-10-22 Thread Philippe Mathieu-Daudé
ping? On 10/1/20 7:25 PM, Philippe Mathieu-Daudé wrote: This is a respin of: "dma: Let the DMA API take MemTxAttrs argument and propagate MemTxResult" https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg02048.html and: "pci: Let PCI DMA API functions propagate a MemTxResult"

Re: [PATCH] MAINTAINERS: Cover "block/nvme.h" file

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/22/20 4:20 PM, Philippe Mathieu-Daudé wrote: Cc'ing qemu-trivial@ Bah it doesn't apply anymore, I'll resend. On 7/1/20 4:06 PM, Philippe Mathieu-Daudé wrote: The "block/nvme.h" header is shared by both the NVMe block driver and the NVMe emulated device. Add the 'F:' entry on both

[Bug 1890312] Re: Segfault in artist_vram_read

2020-10-22 Thread Philippe Mathieu-Daudé
Fixed in commit a501bfc91763d4642390090dd4e6039d67b63702. ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1890312 Title: Segfault in

Re: [PATCH 13/16] util/vfio-helpers: Introduce qemu_vfio_pci_msix_init_irqs()

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:25PM +0200, Philippe Mathieu-Daudé wrote: > qemu_vfio_pci_init_irq() allows us to initialize any type of IRQ, > but only one. Introduce qemu_vfio_pci_msix_init_irqs() which is > specific to MSIX IRQ type, and allow us to use multiple IRQs > (thus passing multiple

[Bug 1890310] Re: Segfault in artist.c:block_move

2020-10-22 Thread Philippe Mathieu-Daudé
Fixed by commit a501bfc91763d4642390090dd4e6039d67b63702. ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1890310 Title: Segfault in

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2020 at 05:10:43PM +0300, Marcel Apfelbaum wrote: > > > On Thu, Oct 22, 2020 at 5:01 PM Michael S. Tsirkin wrote: > > On Thu, Oct 22, 2020 at 04:55:10PM +0300, Marcel Apfelbaum wrote: > > Hi David, Michael, > > > > On Thu, Oct 22, 2020 at 3:56 PM David Gibson

Re: [PATCH 11/16] util/vfio-helpers: Let qemu_vfio_do_mapping() propagate Error

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:23PM +0200, Philippe Mathieu-Daudé wrote: > Pass qemu_vfio_do_mapping() an Error* argument so it can propagate > any error to callers. Replace error_report() which only report > to the monitor by the more generic error_setg_errno(). > > Reviewed-by: Fam Zheng >

Re: [PATCH 12/16] util/vfio-helpers: Let qemu_vfio_verify_mappings() use error_report()

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:24PM +0200, Philippe Mathieu-Daudé wrote: > Instead of displaying the error on stderr, use error_report() > which also report to the monitor. > > Reviewed-by: Fam Zheng > Signed-off-by: Philippe Mathieu-Daudé > --- > util/vfio-helpers.c | 4 ++-- > 1 file changed,

Re: [PATCH 10/16] util/vfio-helpers: Let qemu_vfio_dma_map() propagate Error

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:22PM +0200, Philippe Mathieu-Daudé wrote: > Currently qemu_vfio_dma_map() displays errors on stderr. > When using management interface, this information is simply > lost. Pass qemu_vfio_dma_map() an Error* argument so it can > propagate the error to callers. > >

Re: [PATCH v27 04/17] vfio: Add migration region initialization and finalize function

2020-10-22 Thread Alex Williamson
On Thu, 22 Oct 2020 16:41:54 +0530 Kirti Wankhede wrote: > Whether the VFIO device supports migration or not is decided based of > migration region query. If migration region query is successful and migration > region initialization is successful then migration is supported else > migration is

Re: [PATCH 09/16] util/vfio-helpers: Convert vfio_dump_mapping to trace events

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:21PM +0200, Philippe Mathieu-Daudé wrote: > The QEMU_VFIO_DEBUG definition is only modifiable at build-time. > Trace events can be enabled at run-time. As we prefer the latter, > convert qemu_vfio_dump_mappings() to use trace events instead > of fprintf(). > >

Re: [PATCH] MAINTAINERS: Cover "block/nvme.h" file

2020-10-22 Thread Philippe Mathieu-Daudé
Cc'ing qemu-trivial@ On 7/1/20 4:06 PM, Philippe Mathieu-Daudé wrote: The "block/nvme.h" header is shared by both the NVMe block driver and the NVMe emulated device. Add the 'F:' entry on both sections, so all maintainers/reviewers are notified when it is changed. Signed-off-by: Philippe

[Bug 1878645] Re: null-ptr dereference in ich9_apm_ctrl_changed

2020-10-22 Thread Philippe Mathieu-Daudé
** Changed in: qemu Status: New => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1878645 Title: null-ptr dereference in ich9_apm_ctrl_changed Status in QEMU: Confirmed Bug

Re: [PATCH 06/16] util/vfio-helpers: Trace PCI BAR region info

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:18PM +0200, Philippe Mathieu-Daudé wrote: > For debug purpose, trace BAR regions info. > > Reviewed-by: Fam Zheng > Signed-off-by: Philippe Mathieu-Daudé > --- > util/vfio-helpers.c | 8 > util/trace-events | 1 + > 2 files changed, 9 insertions(+)

Re: [PATCH 07/16] util/vfio-helpers: Trace where BARs are mapped

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:19PM +0200, Philippe Mathieu-Daudé wrote: > For debugging purpose, trace where a BAR is mapped. > > Reviewed-by: Fam Zheng > Signed-off-by: Philippe Mathieu-Daudé > --- > util/vfio-helpers.c | 2 ++ > util/trace-events | 1 + > 2 files changed, 3 insertions(+)

Re: [PATCH 08/16] util/vfio-helpers: Improve DMA trace events

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:20PM +0200, Philippe Mathieu-Daudé wrote: > For debugging purpose, trace where DMA regions are mapped. > > Reviewed-by: Fam Zheng > Signed-off-by: Philippe Mathieu-Daudé > --- > util/vfio-helpers.c | 3 ++- > util/trace-events | 5 +++-- > 2 files changed, 5

Re: [PATCH 05/16] util/vfio-helpers: Trace PCI I/O config accesses

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:17PM +0200, Philippe Mathieu-Daudé wrote: > We sometime get kernel panic with some devices on Aarch64 > hosts. Alex Williamson suggests it might be broken PCIe > root complex. Add trace event to record the latest I/O > access before crashing. In case, assert our

[Bug 1892960] Re: Heap-overflow in flatview_read through sdhci_data_transfer

2020-10-22 Thread Philippe Mathieu-Daudé
Fixed in commit dfba99f17feb6d4a129da19d38df1bcd8579d1c3. ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1892960 Title: Heap-overflow in

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Marcel Apfelbaum
On Thu, Oct 22, 2020 at 5:01 PM Michael S. Tsirkin wrote: > On Thu, Oct 22, 2020 at 04:55:10PM +0300, Marcel Apfelbaum wrote: > > Hi David, Michael, > > > > On Thu, Oct 22, 2020 at 3:56 PM David Gibson wrote: > > > > On Thu, 22 Oct 2020 08:06:55 -0400 > > "Michael S. Tsirkin" wrote: >

[Bug 1895310] Re: Heap-overflow (read) in sd_erase

2020-10-22 Thread Philippe Mathieu-Daudé
Fixed in commit 1bd6fd8ed5933bfba53e5f5eadebd845094c3707. ** Changed in: qemu Status: New => Fix Committed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1895310 Title: Heap-overflow (read)

Re: [PULL v2 00/28] Block patches

2020-10-22 Thread Peter Maydell
On Thu, 22 Oct 2020 at 12:27, Stefan Hajnoczi wrote: > > The following changes since commit ac793156f650ae2d77834932d72224175ee69086: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20201020-1' into staging (2020-10-20 > 21:11:35 +0100) > > are available in the Git

Re: [PATCH v27 03/17] vfio: Add save and load functions for VFIO PCI devices

2020-10-22 Thread Alex Williamson
On Thu, 22 Oct 2020 16:41:53 +0530 Kirti Wankhede wrote: > Added functions to save and restore PCI device specific data, > specifically config space of PCI device. > > Signed-off-by: Kirti Wankhede > Reviewed-by: Neo Jia > --- > hw/vfio/pci.c | 48 >

Re: [PATCH v2 0/2] s390x: pv: Diag318 fixes

2020-10-22 Thread Cornelia Huck
On Thu, 22 Oct 2020 06:31:33 -0400 Janosch Frank wrote: > Here are two fixes for the diag318 support that fix crashes when > booting PV guests. > > We're working on extending our testing to catch problems like these > earlier. > > > Branch: >

Re: [PATCH] os: deprecate the -enable-fips option and QEMU's FIPS enforcement

2020-10-22 Thread John Snow
On 10/21/20 6:17 AM, Daniel P. Berrangé wrote: Claiming QEMU is FIPS compliant without using libgcrypt is a bit of joke since we don't do any self-tests of ciphers, hence this deprecation notice is warning people that libgcrypt is going to be mandatory if you care about FIPS. FWIW this is my

Re: [PATCH 03/16] util/vfio-helpers: Pass minimum page size to qemu_vfio_open_pci()

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:15PM +0200, Philippe Mathieu-Daudé wrote: > @@ -724,7 +725,7 @@ static int nvme_init(BlockDriverState *bs, const char > *device, int namespace, > goto out; > } > > -s->page_size = MAX(4096, 1u << (12 + NVME_CAP_MPSMIN(cap))); > +s->page_size =

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2020 at 04:55:10PM +0300, Marcel Apfelbaum wrote: > Hi David, Michael, > > On Thu, Oct 22, 2020 at 3:56 PM David Gibson wrote: > > On Thu, 22 Oct 2020 08:06:55 -0400 > "Michael S. Tsirkin" wrote: > > > On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Marcel Apfelbaum
Hi David, Michael, On Thu, Oct 22, 2020 at 3:56 PM David Gibson wrote: > On Thu, 22 Oct 2020 08:06:55 -0400 > "Michael S. Tsirkin" wrote: > > > On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum wrote: > > > From: Marcel Apfelbaum > > > > > > During PCIe Root Port's transition from

[Bug 1900779] Re: xp /16i on arm mixes DWords

2020-10-22 Thread Peter Maydell
Thanks for the bug report; I've just posted a patch which should fix it: https://patchew.org/QEMU/20201022132445.25039-1-peter.mayd...@linaro.org/ ** Changed in: qemu Status: Confirmed => In Progress -- You received this bug notification because you are a member of qemu- devel-ml, which

Re: [PATCH] tests/acceptance: Enable AVOCADO_ALLOW_UNTRUSTED_CODE in the gitlab-CI

2020-10-22 Thread Thomas Huth
On 22/10/2020 14.01, Thomas Huth wrote: > The tests are running in containers here, so it should be OK to > run with AVOCADO_ALLOW_UNTRUSTED_CODE enabled in this case. > We also have to set CONTINUOUS_INTEGRATION in this case to avoid that > some tests from ppc_prep_40p.py are failing in the CI.

Re: [PATCH v3 5/5] tools/virtiofsd: xattr name mappings: Simple 'map'

2020-10-22 Thread Vivek Goyal
On Wed, Oct 14, 2020 at 07:02:09PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The mapping rule system implemented in the last few patches is > extremely flexible, but not easy to use. Add a simple > 'map' type as a sprinkling of sugar to make it easy. > >

Re: [PATCH 02/16] util/vfio-helpers: Improve reporting unsupported IOMMU type

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:14PM +0200, Philippe Mathieu-Daudé wrote: > Change the confuse "VFIO IOMMU check failed" error message by > the explicit "VFIO IOMMU Type1 is not supported" once. > > Example on POWER: > > $ qemu-system-ppc64 -drive >

Re: [PATCH 01/16] block/nvme: Correct minimum device page size

2020-10-22 Thread Stefan Hajnoczi
On Tue, Oct 20, 2020 at 07:24:13PM +0200, Philippe Mathieu-Daudé wrote: > While trying to simplify the code using a macro, we forgot > the 12-bit shift... Correct that. > > Fixes: fad1eb68862 ("block/nvme: Use register definitions from > 'block/nvme.h'") > Reported-by: Eric Auger >

Re: [PATCH] disas/capstone: Fix monitor disassembly of >32 bytes

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/22/20 3:24 PM, Peter Maydell wrote: If we're using the capstone disassembler, disassembly of a run of instructions more than 32 bytes long disassembles the wrong data for instructions beyond the 32 byte mark: (qemu) xp /16x 0x100 0100: 0x0005 0x54410001 0x0001

Re: [PULL 00/14] Modules 20201022 patches

2020-10-22 Thread Peter Maydell
in the Git repository at: > > git://git.kraxel.org/qemu tags/modules-20201022-pull-request > > for you to fetch changes up to c8263659f1268a0f3502568d7663f722b2461935: > > opengl: build opengl helper code modular (2020-10-21 15:46:14 +0200) > > -

[PATCH 2/2] nvme: fix queue identifer validation

2020-10-22 Thread Klaus Jensen
From: Gollu Appalanaidu The nvme_check_{sq,cq} functions check if the given queue identifer is valid *and* that the queue exists. Thus, the function return value cannot simply be inverted to check if the identifer is valid and that the queue does *not* exist. Replace the call with an OR'ed

[PATCH 1/2] nvme: fix create IO SQ/CQ status codes

2020-10-22 Thread Klaus Jensen
From: Gollu Appalanaidu Replace the Invalid Field in Command with the Invalid PRP Offset status code in the nvme_create_{cq,sq} functions. Also, allow PRP1 to be address 0x0. Also replace the Completion Queue Invalid status code returned in nvme_create_cq when the the queue identifier is

[PATCH 0/2] hw/block/nvme: two fixes for create sq/cq

2020-10-22 Thread Klaus Jensen
From: Klaus Jensen The first patch is a follow up to "hw/block/nvme: fix prp mapping status codes" and fixes some status codes in the nvme_create_{sq,cq} functions. The second patch fixes a faulty check on the given queue identifier. Gollu Appalanaidu (2): nvme: fix create IO SQ/CQ status

[PATCH] disas/capstone: Fix monitor disassembly of >32 bytes

2020-10-22 Thread Peter Maydell
If we're using the capstone disassembler, disassembly of a run of instructions more than 32 bytes long disassembles the wrong data for instructions beyond the 32 byte mark: (qemu) xp /16x 0x100 0100: 0x0005 0x54410001 0x0001 0x1000 0110: 0x 0x0004

Re: [PATCH v2] hw/block/nvme: fix prp mapping status codes

2020-10-22 Thread Klaus Jensen
On Oct 19 11:20, Keith Busch wrote: > On Mon, Oct 19, 2020 at 07:35:38PM +0200, Klaus Jensen wrote: > > From: Gollu Appalanaidu > > > > Address 0 is not an invalid address. Remove those invalikd checks. > > > > Unaligned PRP2 and PRP list entries should result in Invalid PRP Offset > > status

Re: [PATCH v6 16/16] scripts/oss-fuzz: remove the generic-fuzz target

2020-10-22 Thread Darren Kenny
On Thursday, 2020-10-22 at 09:01:23 -04, Alexander Bulekov wrote: > On 201022 1032, Darren Kenny wrote: >> Hi Alex, >> >> On Wednesday, 2020-10-21 at 17:09:22 -04, Alexander Bulekov wrote: >> > generic-fuzz is not a standalone fuzzer - it requires some env variables >> > to be set. On oss-fuzz,

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2020 at 11:56:32PM +1100, David Gibson wrote: > On Thu, 22 Oct 2020 08:06:55 -0400 > "Michael S. Tsirkin" wrote: > > > On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum wrote: > > > From: Marcel Apfelbaum > > > > > > During PCIe Root Port's transition from Power-Off to

[PATCH v3 9/9] docs: add a doc about I/O hang

2020-10-22 Thread Jiahui Cen
Give some details about the I/O hang and how to use it. Signed-off-by: Jiahui Cen Signed-off-by: Ying Fang --- docs/io-hang.rst | 45 + 1 file changed, 45 insertions(+) create mode 100644 docs/io-hang.rst diff --git a/docs/io-hang.rst

[PATCH v3 8/9] qapi: add I/O hang and I/O hang timeout qapi event

2020-10-22 Thread Jiahui Cen
Sometimes hypervisor management tools like libvirt may need to monitor I/O hang events. Let's report I/O hang and I/O hang timeout event via qapi. Signed-off-by: Jiahui Cen Signed-off-by: Ying Fang --- block/block-backend.c | 3 +++ qapi/block-core.json | 26 ++ 2

Re: [PATCH v1 6/6] tests/acceptance: pick a random gdb port for reverse debugging

2020-10-22 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 10/22/20 7:20 AM, Thomas Huth wrote: >> On 21/10/2020 18.31, Alex Bennée wrote: >>> Currently the test randomly fails if you are using a shared machine >>> due to contention on the well known port 1234. We can ameliorate this >>> a bit by picking a random

[PATCH v3 5/9] block-backend: enable I/O hang when timeout is set

2020-10-22 Thread Jiahui Cen
Setting a non-zero timeout of I/O hang indicates I/O hang is enabled for the block backend. And when the block backend is going to be deleted, we should disable I/O hang. Signed-off-by: Jiahui Cen Signed-off-by: Ying Fang --- block/block-backend.c | 40

[PATCH v3 7/9] qemu-option: add I/O hang timeout option

2020-10-22 Thread Jiahui Cen
I/O hang timeout should be different under different situations. So it is better to provide an option for user to determine I/O hang timeout for each block device. Signed-off-by: Jiahui Cen Signed-off-by: Ying Fang --- blockdev.c | 11 +++ 1 file changed, 11 insertions(+) diff --git

Re: [PATCH v2 7/8] tests/9pfs: add local Tlink test

2020-10-22 Thread Christian Schoenebeck
On Donnerstag, 22. Oktober 2020 11:07:49 CEST Greg Kurz wrote: > > Ok, I found the problem on the mentioned box that failed to create hard > > links with 9p: it is libvirt auto generating AppArmor policy rules for 9p > > export pathes, which libvirt generates with "rw" AA (AppArmor) > >

[PATCH v3 4/9] block-backend: add I/O rehandle pause/unpause

2020-10-22 Thread Jiahui Cen
Sometimes there is no need to rehandle AIOs although I/O hang is enabled. For example, when deleting a block backend, we have to wait AIO completed by calling blk_drain(), but not care about the results. So a pause interface of I/O hang is helpful to bypass the rehandle mechanism. Signed-off-by:

[PATCH v3 6/9] virtio-blk: pause I/O hang when resetting

2020-10-22 Thread Jiahui Cen
When resetting virtio-blk, we have to drain all AIOs but do not care about the results. So it is necessary to disable I/O hang before resetting virtio-blk, and enable it after resetting. Signed-off-by: Jiahui Cen Signed-off-by: Ying Fang --- hw/block/virtio-blk.c | 8 1 file changed,

[PATCH v3 0/9] block-backend: Introduce I/O hang

2020-10-22 Thread Jiahui Cen
A VM in the cloud environment may use a virutal disk as the backend storage, and there are usually filesystems on the virtual block device. When backend storage is temporarily down, any I/O issued to the virtual block device will cause an error. For example, an error occurred in ext4 filesystem

[PATCH v3 1/9] block-backend: introduce I/O rehandle info

2020-10-22 Thread Jiahui Cen
The I/O hang feature is realized based on a rehandle mechanism. Each block backend will have a list to store hanging block AIOs, and a timer to regularly resend these aios. In order to issue the AIOs again, each block AIOs also need to store its coroutine entry. Signed-off-by: Jiahui Cen

[PATCH v3 3/9] block-backend: add I/O hang timeout

2020-10-22 Thread Jiahui Cen
Not all errors would be fixed, so it is better to add a rehandle timeout for I/O hang. Signed-off-by: Jiahui Cen Signed-off-by: Ying Fang --- block/block-backend.c | 99 +- include/sysemu/block-backend.h | 2 + 2 files changed, 100 insertions(+), 1

[PATCH v3 2/9] block-backend: rehandle block aios when EIO

2020-10-22 Thread Jiahui Cen
When a backend device temporarily does not response, like a network disk down due to some network faults, any IO to the coresponding virtual block device in VM would return I/O error. If the hypervisor returns the error to VM, the filesystem on this block device may not work as usual. And in many

Re: [PATCH] i386/cpu: Expose the PTWRITE to the guest

2020-10-22 Thread Paolo Bonzini
On 22/10/20 06:01, Luwei Kang wrote: > PTWRITE provides a mechanism by which software can instrument the > Intel PT trace. The current implementation will mask off this > feature when the PTWRITE is supported on the host because of the > Intel PT CPUID is a constant value(ICX CPUID) in qemu. This

Re: [PATCH v6 16/16] scripts/oss-fuzz: remove the generic-fuzz target

2020-10-22 Thread Alexander Bulekov
On 201022 1032, Darren Kenny wrote: > Hi Alex, > > On Wednesday, 2020-10-21 at 17:09:22 -04, Alexander Bulekov wrote: > > generic-fuzz is not a standalone fuzzer - it requires some env variables > > to be set. On oss-fuzz, we set these with some predefined > > generic-fuzz-{...} targets, that are

Re: [PATCH] gitlab-ci: Clone from GitLab itself

2020-10-22 Thread Thomas Huth
On 22/10/2020 14.33, Philippe Mathieu-Daudé wrote: > Let GitLab runners use GitLab repository directly. > > Suggested-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé > --- > .gitlab-ci.yml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml >

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread David Gibson
On Thu, 22 Oct 2020 08:06:55 -0400 "Michael S. Tsirkin" wrote: > On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum wrote: > > From: Marcel Apfelbaum > > > > During PCIe Root Port's transition from Power-Off to Power-ON (or > > vice-versa) > > the "Slot Control Register" has the

Re: [PATCH v2 0/2] s390x: pv: Diag318 fixes

2020-10-22 Thread Collin Walling
On 10/22/20 6:31 AM, Janosch Frank wrote: > Here are two fixes for the diag318 support that fix crashes when > booting PV guests. > > We're working on extending our testing to catch problems like these > earlier. > > > Branch: > https://gitlab.com/frankja/qemu/-/commits/bb/frankja/diag318_fixes

Re: [PATCH v2 2/2] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread Marc Hartmayer
On Thu, Oct 22, 2020 at 06:31 AM -0400, Janosch Frank wrote: > Diag318 fencing needs to be determined on the current VM PV state and > not on the state that the VM has when we create the CPU model. > > Signed-off-by: Janosch Frank > Reported-by: Marc Hartmayer > Fixes: fabdada935 ("s390: guest

[PATCH] gitlab-ci: Clone from GitLab itself

2020-10-22 Thread Philippe Mathieu-Daudé
Let GitLab runners use GitLab repository directly. Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 66ad7aa5c22..ba77af51f2f 100644 --- a/.gitlab-ci.yml +++

[Bug 1900779] Re: xp /16i on arm mixes DWords

2020-10-22 Thread Peter Maydell
** Changed in: qemu Status: New => Confirmed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1900779 Title: xp /16i on arm mixes DWords Status in QEMU: Confirmed Bug description: I was

RE: [PATCH v11 2/3] usb: Add DWC3 model

2020-10-22 Thread Sai Pavan Boddu
Hi Edgar, Sorry for late followup, few comment inline below. > -Original Message- > From: Edgar E. Iglesias > Sent: Tuesday, September 29, 2020 7:56 PM > To: Sai Pavan Boddu > Cc: Peter Maydell ; Markus Armbruster > ; 'Marc-André Lureau' > ; Paolo Bonzini ; > Gerd Hoffmann ; Edgar

[PATCH] migration: Drop unused VMSTATE_FLOAT64 support

2020-10-22 Thread Peter Maydell
Commit ef96e3ae9698d6 in January 2019 removed the last user of the VMSTATE_FLOAT64* macros. These were used by targets which defined their floating point register file as an array of 'float64'. We used to try to maintain a stricter distinction between 'float64' (a type for holding an integer

[PATCH v27 17/17] qapi: Add VFIO devices migration stats in Migration stats

2020-10-22 Thread Kirti Wankhede
Added amount of bytes transferred to the VM at destination by all VFIO devices Signed-off-by: Kirti Wankhede Reviewed-by: Dr. David Alan Gilbert --- hw/vfio/common.c| 20 hw/vfio/migration.c | 10 ++ include/qemu/vfio-helpers.h | 3 +++

[PATCH v12 3/3] Versal: Connect DWC3 controller with virt-versal

2020-10-22 Thread Sai Pavan Boddu
From: Vikram Garhwal Connect dwc3 controller and usb2-reg module to xlnx-versal SOC, its placed in iou of lpd domain and configure it as dual port host controller. Add the respective guest dts nodes for "xlnx-versal-virt" machine. Signed-off-by: Vikram Garhwal Signed-off-by: Sai Pavan Boddu

[PATCH v27 14/17] vfio: Dirty page tracking when vIOMMU is enabled

2020-10-22 Thread Kirti Wankhede
When vIOMMU is enabled, register MAP notifier from log_sync when all devices in container are in stop and copy phase of migration. Call replay and get dirty pages from notifier callback. Suggested-by: Alex Williamson Signed-off-by: Kirti Wankhede --- hw/vfio/common.c | 95

[PATCH v12 2/3] usb: Add DWC3 model

2020-10-22 Thread Sai Pavan Boddu
From: Vikram Garhwal This patch adds skeleton model of dwc3 usb controller attached to xhci-sysbus device. It defines global register space of DWC3 controller, global registers control the AXI/AHB interfaces properties, external FIFO support and event count support. All of which are

[PATCH v12 1/3] misc: Add versal-usb2-ctrl-regs module

2020-10-22 Thread Sai Pavan Boddu
This module emulates control registers of versal usb2 controller, this is added just to make guest happy. In general this module would control the phy-reset signal from usb controller, data coherency of the transactions, signals the host system errors received from controller. Signed-off-by: Sai

Re: [PULL v2 00/28] Block patches

2020-10-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20201022112726.736757-1-stefa...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20201022112726.736757-1-stefa...@redhat.com Subject: [PULL v2 00/28] Block patches ===

[PATCH v27 05/17] vfio: Add VM state change handler to know state of VM

2020-10-22 Thread Kirti Wankhede
VM state change handler is called on change in VM's state. Based on VM state, VFIO device state should be changed. Added read/write helper functions for migration region. Added function to set device_state. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Reviewed-by: Dr. David Alan Gilbert

Re: [PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Michael S. Tsirkin
On Thu, Oct 22, 2020 at 02:40:26PM +0300, Marcel Apfelbaum wrote: > From: Marcel Apfelbaum > > During PCIe Root Port's transition from Power-Off to Power-ON (or vice-versa) > the "Slot Control Register" has the "Power Indicator Control" > set to "Blinking" expressing a "power transition" mode. >

[PATCH v12 0/3] Add Versal usb model

2020-10-22 Thread Sai Pavan Boddu
This patch series attempts to make 'hcd-xhci' an independent model so it can be used by both pci and system-bus interface. Changes for V2: Make XHCIState non-qom Use container_of functions for retriving pci device instance Initialize the AddressSpace pointer in PATCH 1/3 itself

<    1   2   3   4   >