On 25/01/2023 12:53, Kirill A. Shutemov wrote:
On Wed, Jan 25, 2023 at 12:20:26AM +, Sean Christopherson wrote:
On Tue, Jan 24, 2023, Liam Merwick wrote:
On 14/01/2023 00:37, Sean Christopherson wrote:
On Fri, Dec 02, 2022, Chao Peng wrote:
...
When running LTP (https://github.com
On 14/01/2023 00:37, Sean Christopherson wrote:
On Fri, Dec 02, 2022, Chao Peng wrote:
This patch series implements KVM guest private memory for confidential
computing scenarios like Intel TDX[1]. If a TDX host accesses
TDX-protected guest memory, machine check can happen which can further
explicitly
Cc: qemu-sta...@nongnu.org
Or would only a long-term fix target that?
Reviewed-by: Liam Merwick
Reviewed-by: Dr. David Alan Gilbert
Reviewed-by: Vivek Goyal
Signed-off-by: Stefan Hajnoczi
---
v2:
* Add doc comment clarifying that symlinks are traversed client-side
[Daniel
ort to memory_region_init_ram_from_file()
hostmem-file: add readonly=on|off option
nvdimm: honor -object memory-backend-file,readonly=on option
Reviewed-by: Liam Merwick
Tested-by: Liam Merwick
(I just quickly modified kata-runtime to unconditionally pass
readonly=on and verified that the root filesys
On 16/06/2020 15:14, Michael Roth wrote:
Hi everyone,
The following new patches are queued for QEMU stable v4.2.1:
https://github.com/mdroth/qemu/commits/stable-4.2-staging
The release is planned for 2020-06-25:
https://wiki.qemu.org/Planning/4.2
Due to delays on my part this release
-by: Liam Merwick
---
block.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block.c b/block.c
index 1bdb9c679d..e466d15914 100644
--- a/block.c
+++ b/block.c
@@ -5994,7 +5994,7 @@ void bdrv_img_create(const char *filename, const char
*fmt,
/* Couldn't open BS
'arm', 'cris', 'hppa', 'i386', 'lm32',
Does the same issue occur for @CpuInstanceProperties: at line 829?
The 'Since:' follows a 'Note:' section (but maybe the singular usage is
intended).
otherwise
Reviewed-by: Liam Merwick
On 19/02/2020 19:20, Wainer dos Santos Moschetta wrote:
On 2/6/20 12:12 PM, Philippe Mathieu-Daudé wrote:
On 2/5/20 3:56 PM, Liam Merwick wrote:
Add a test to use qboot with the 'pc' machine class and SeaBIOS with
the 'microvm' machine class (since microvm uses qboot by default) by
adding
On 06/02/2020 18:17, Liam Merwick wrote:
On 29/01/2020 21:23, Philippe Mathieu-Daudé wrote:
We already use the 'machine' tag in Avocado tests.
If the requested machine is not available in the QEMU binary,
the tests will be cancelled (skipped):
$ python -m avocado --show=app run
tests
On 29/01/2020 21:23, Philippe Mathieu-Daudé wrote:
Since QEMU binaries can be built with various configurations,
the list of devices linked in can vary.
Add a helper to query the list of devices built into a
QEMU binary.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Liam Merwick
On 29/01/2020 21:23, Philippe Mathieu-Daudé wrote:
Instead of parsing the process help output, use the
binary_get_accels() helper which queries the list of
accelerators over a QMP socket.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Liam Merwick
---
python/qemu/accel.py | 26
On 29/01/2020 21:23, Philippe Mathieu-Daudé wrote:
Add a helper to query the list of accelerators built into a
QEMU binary.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Liam Merwick
---
python/qemu/binutils.py | 10 ++
tests/acceptance/core_scripts.py | 10
on Wainer's comment on patch3 - is this vm.shutdown() needed?
otherwise
Reviewed-by: Liam Merwick
+return [m['name'] for m in res]
diff --git a/tests/acceptance/core_scripts.py b/tests/acceptance/core_scripts.py
index a5b112f928..c2fe4acf1d 100644
--- a/tests/acceptance
On 29/01/2020 21:23, Philippe Mathieu-Daudé wrote:
We already use the 'machine' tag in Avocado tests.
If the requested machine is not available in the QEMU binary,
the tests will be cancelled (skipped):
$ python -m avocado --show=app run tests/acceptance/x86_cpu_model_versions.py
...
On 06/02/2020 14:09, Philippe Mathieu-Daudé wrote:
Hi Liam,
On 2/6/20 2:57 PM, Philippe Mathieu-Daudé wrote:
On 2/5/20 3:56 PM, Liam Merwick wrote:
Refactor test_x86_64_pc() to test_x86_64_machine() so that separate
functions which specify the Avocado tag of ':avocado: tags=machine:'
as being
Add a method to extract a specified file from an RPM to the test's
working directory and return the path to the extracted file.
Signed-off-by: Liam Merwick
Reviewed-by: Stefano Garzarella
Reviewed-by: Philippe Mathieu-Daudé
---
tests/acceptance/boot_linux_console.py | 16
1
Add a test to use qboot with the 'pc' machine class and SeaBIOS with
the 'microvm' machine class (since microvm uses qboot by default) by
adding the '-bios' option via self.vm.add_args() before
calling do_test_x86_64_machine().
Signed-off-by: Liam Merwick
Reviewed-by: Stefano Garzarella
Refactor test_x86_64_pc() to test_x86_64_machine() so that separate
functions which specify the Avocado tag of ':avocado: tags=machine:'
as being either 'pc' or 'microvm' can be used to test booting a
compressed kernel using either machine class.
Signed-off-by: Liam Merwick
Reviewed-by: Stefano
te die-id validity in smp context")
[3] https://travis-ci.org/merwick/qemu/builds/645487393
[4]
https://github.com/wainersm/qemu/commit/8f705e98df90b436b0f4946331d441309c437f7b
Liam Merwick (6):
tests/boot_linux_console: add microvm acceptance test
tests/boot_linux_console: add BIOS accep
Change extract_from_deb() to use os.path routines to manipulate the
filesystem path returned when extracting a file.
Suggested-by: Wainer dos Santos Moschetta
Signed-off-by: Liam Merwick
---
tests/acceptance/boot_linux_console.py | 7 ++-
1 file changed, 6 insertions(+), 1 deletion
Add tests to boot an uncompressed kernel using the x86/HVM direct boot ABI.
The vmlinux binary is obtained from a small RPM for Kata containers and
extracted using the new extract_from_rpm() method.
Signed-off-by: Liam Merwick
---
tests/acceptance/boot_linux_console.py | 60
The extract_from_rpm() method added for the PVH acceptance tests needs
rpm2cpio to extract a vmlinux binary from an RPM.
Signed-off-by: Liam Merwick
Reviewed-by: Stefano Garzarella
---
.travis.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.travis.yml b/.travis.yml
index 3b35b7cf04d3
On 31/01/2020 15:02, Liam Merwick wrote:
[... deleted ...]
+ :returns: path of the extracted file
+ """
+ cwd = os.getcwd()
+ os.chdir(self.workdir)
+ process.run("rpm2cpio %s | cpio -id %s" % (rpm, path),
shell=Tru
On 30/01/2020 23:57, Philippe Mathieu-Daudé wrote:
On 1/27/20 5:36 PM, Liam Merwick wrote:
Add tests to boot an uncompressed kernel using the x86/HVM direct boot
ABI.
The vmlinux binary is obtained from a small RPM for Kata containers and
extracted using the new extract_from_rpm() method
On 30/01/2020 19:19, Wainer dos Santos Moschetta wrote:
On 1/30/20 1:34 PM, Liam Merwick wrote:
On 30/01/2020 12:05, Stefano Garzarella wrote:
On Mon, Jan 27, 2020 at 04:36:33PM +, Liam Merwick wrote:
Add a method to extract a specified file from an RPM to the test's
working directory
On 30/01/2020 15:34, Liam Merwick wrote:
On 30/01/2020 11:27, Stefano Garzarella wrote:
Hi Liam,
On Mon, Jan 27, 2020 at 04:36:30PM +, Liam Merwick wrote:
Add tests to use qboot with the 'pc' and 'microvm' machine classes
by adding the '-bios' option via self.vm.add_args() before calling
On 30/01/2020 11:27, Stefano Garzarella wrote:
Hi Liam,
On Mon, Jan 27, 2020 at 04:36:30PM +, Liam Merwick wrote:
Add tests to use qboot with the 'pc' and 'microvm' machine classes
by adding the '-bios' option via self.vm.add_args() before calling
do_test_x86_64_machine().
Signed-off
On 30/01/2020 12:05, Stefano Garzarella wrote:
On Mon, Jan 27, 2020 at 04:36:33PM +, Liam Merwick wrote:
Add a method to extract a specified file from an RPM to the test's
working directory and return the path to the extracted file.
Signed-off-by: Liam Merwick
---
tests/acceptance
Reviewed-by: Liam Merwick
Tested-by: Liam Merwick
---
tests/acceptance/avocado_qemu/__init__.py | 31 +--
1 file changed, 17 insertions(+), 14 deletions(-)
On 20/01/2020 23:51, Philippe Mathieu-Daudé wrote:
We need a function to interrupt interactive consoles.
Example: Interrupt U-Boot to set different environment values.
Tested-by: Niek Linnenbank
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Liam Merwick
Tested-by: Liam Merwick
(['-serial', 'null'])
This patch is not sufficient, we have to initialize _console_index in
__init__():
with that fix applied
Reviewed-by: Liam Merwick
Tested-by: Liam Merwick
-- >8 --
diff --git a/python/qemu/machine.py b/python/qemu/machine.py
index ef9f5b213f..183d8f3d38 100644
--- a/pyt
/shm,share=on \
+ -numa node,memdev=mem \
+ ...
+ guest# mount -t virtio_fs myfs /mnt
This should be 'mount -t virtiofs myfs /mnt' like on
https://virtio-fs.gitlab.io/howto-qemu.html
otherwise
Reviewed-by: Liam Merwick
Add tests to boot an uncompressed kernel using the x86/HVM direct boot ABI.
The vmlinux binary is obtained from a small RPM for Kata containers and
extracted using the new extract_from_rpm() method.
Signed-off-by: Liam Merwick
---
tests/acceptance/boot_linux_console.py | 49
Add a method to extract a specified file from an RPM to the test's
working directory and return the path to the extracted file.
Signed-off-by: Liam Merwick
---
tests/acceptance/boot_linux_console.py | 14 ++
1 file changed, 14 insertions(+)
diff --git a/tests/acceptance
Refactor test_x86_64_pc() to test_x86_64_machine() so that separate
functions which specify the Avocado tag of ':avocado: tags=machine:'
as being either 'pc' or 'microvm' can be used to test booting a
compressed kernel using either machine class.
Signed-off-by: Liam Merwick
---
tests/acceptance
The second param in extract_from_deb() is 'path' not 'file'
Signed-off-by: Liam Merwick
---
tests/acceptance/boot_linux_console.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/acceptance/boot_linux_console.py
b/tests/acceptance/boot_linux_console.py
index
("i386/cpu: Consolidate die-id validity in smp context")
[3] https://travis-ci.org/merwick/qemu/jobs/641505543
[4]
https://github.com/wainersm/qemu/commit/8f705e98df90b436b0f4946331d441309c437f7b
Liam Merwick (6):
tests/boot_linux_console: add microvm acceptance test
tests/boot_lin
The extract_from_rpm() method added for the PVH acceptance tests needs
rpm2cpio to extract a vmlinux binary from an RPM.
Signed-off-by: Liam Merwick
---
.travis.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.travis.yml b/.travis.yml
index 1ae645e9fcec..3d8c2a38e679 100644
Add tests to use qboot with the 'pc' and 'microvm' machine classes
by adding the '-bios' option via self.vm.add_args() before calling
do_test_x86_64_machine().
Signed-off-by: Liam Merwick
---
tests/acceptance/boot_linux_console.py | 15 ++-
1 file changed, 14 insertions(+), 1
there, drop the superfluous --python parameter (python3
is now the only supported version anyway).
Signed-off-by: Thomas Huth
Reviewed-by: Liam Merwick
---
.travis.yml| 2 +-
tests/acceptance/boot_linux_console.py | 96 ++
2 files
On 12/12/2019 16:37, Dr. David Alan Gilbert (git) wrote:
From: "Dr. David Alan Gilbert"
Wire up the building of the virtiofsd in contrib.
s/contrib/tools/
otherwise
Reviewed-by: Liam Merwick
virtiofsd relies on Linux-specific system calls and seccomp. Anyone
wishi
,allow_other,user_id=0,group_id=0,rootmode=04,dax \
+myfs /mnt
Should this be 'mount -t virtiofs myfs /mnt' like on
https://virtio-fs.gitlab.io/howto-qemu.html ?
otherwise
Reviewed-by: Liam Merwick
chineClass to X86MachineClass.
Fixes: f0bb276bf8d5 ("hw/i386: split PCMachineState deriving X86MachineState
from it")
Signed-off-by: Liam Merwick
Reviewed-by: Darren Kenny
---
v1 -> v2 - fix SHA1 of patch being referenced.
hw/i386/pc.c | 1 -
hw/i386/pc_piix.c | 4
chineClass to X86MachineClass.
Fixes: 46bf71657c56 ("hw/i386: split PCMachineState deriving X86MachineState
from it")
Signed-off-by: Liam Merwick
---
hw/i386/pc.c | 1 -
hw/i386/pc_piix.c | 4 ++--
hw/i386/pc_q35.c | 4 ++--
hw/i386/x86.c | 1 +
inclu
0x7f0c0604e37f (/lib64/libc.so.6+0x4d37f)
Signed-off-by: Marc-André Lureau
Reviewed-by: Liam Merwick
---
hw/usb/redirect.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
index 998fc6e4b0..9764a57987 100644
--- a/hw/usb/redirect.c
+++ b/hw
On 30/07/2019 01:27, piaojun wrote:
Use F_GETLK for fcntl when F_OFD_GETLK not defined.
Use F_GETLK/F_SETLK for fcntl when F_OFD_GETLK/F_OFD_SETLK not defined.
Signed-off-by: Jun Piao
---
contrib/virtiofsd/passthrough_ll.c | 9 +
1 file changed, 9 insertions(+)
diff --git
way
Reviewed-by: Liam Merwick
---
hw/virtio/virtio-mmio.c | 35 +---
hw/virtio/virtio-mmio.h | 60 +
2 files changed, 61 insertions(+), 34 deletions(-)
create mode 100644 hw/virtio/virtio-mmio.h
diff --git a/hw/virtio/virtio-mmi
On 02/07/2019 13:11, Sergio Lopez wrote:
Extract PVH related functions from pc.c, and put them in pvh.c, so
they can be shared with other components.
Signed-off-by: Sergio Lopez
Refactoring LGTM
Reviewed-by: Liam Merwick
---
hw/i386/Makefile.objs | 1 +
hw/i386/pc.c | 120
Signed-off-by: Liam Merwick
---
docs/devel/testing.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst
index da2d0fc9646f..3ef50a61db4d 100644
--- a/docs/devel/testing.rst
+++ b/docs/devel/testing.rst
@@ -327,7 +327,7 @@ Images
On 09/04/2019 06:51, Markus Armbruster wrote:
Lidong Chen writes:
Due to an off-by-one error, the assert statements allow an
out-of-bounds array access.
Signed-off-by: Lidong Chen
Reviewed-by: Liam Merwick
---
hw/sd/sd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions
The callers to bios_linker_find_file() assert that the file entry returned
is not NULL, except for those in bios_linker_loader_add_pointer(). Add two
asserts in that case for completeness and to facilitate static code analysis.
Signed-off-by: Liam Merwick
---
hw/acpi/bios-linker-loader.c | 2
systems since tracefs is mounted
on /sys/kernel/debug/tracing/, but the compiler is smart enough to
foresee the possibility and warn about the unchecked snprintf(3) return
value. This patch fixes the compiler warning.
Reported-by: Markus Armbruster
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Liam
y emitting an empty file instead of
"provider qemu {}" when there are no enabled trace events.
Fixes: 23c3d569f44284066714ff7c46bc4f19e630583f ("target/hppa: add TLB trace
events")
Reported-by: Markus Armbruster
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Liam Merwick
---
The assert checking if the value of lexer->state in next_state(),
which is used as an index to the 'json_lexer' array, incorrectly
checks for an index value less than or equal to ARRAY_SIZE(json_lexer).
Fix assert so that it just checks for an index less than the array size.
Signed-off-by: L
On 06/03/2019 17:51, Alex Bennée wrote:
Hi,
I've been looking at using PVH as an alternative to a long bios boot
sequence to boot some x86_64 test kernels for tests/tcg. I'm finding it
hard to piece together all the bits but I naively thought it would just
be a case of adding a few ELF NOTES
candidate in
vfio_display_edid_link_up().
Either way:
Reviewed-by: Liam Merwick
---
include/hw/vfio/vfio-common.h | 1 +
hw/vfio/display.c | 26 +++---
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/include/hw/vfio/vfio-common.h b/include/hw
must support the vfio edid region for this to work.
Signed-off-by: Gerd Hoffmann
Reviewed-by: Liam Merwick
---
hw/vfio/pci.h | 2 ++
hw/vfio/display.c | 12 ++--
hw/vfio/pci.c | 12
3 files changed, 24 insertions(+), 2 deletions(-)
diff --git a/hw/vfio/pci.h b
x64" size
vfio_spapr_create_window(int ps, uint64_t ws, uint64_t off) "pageshift=0x%x
winsize=0x%"PRIx64" offset=0x%"PRIx64
vfio_spapr_remove_window(uint64_t off) "offset=0x%"PRIx64
vfio_spapr_group_attach(int groupfd, int tablefd) "Attached groupfd %d to liobn fd
%d"
+
+# hw/vfio/display.c
+vfio_display_edid_available(void) ""
+vfio_display_edid_link_up(void) ""
+vfio_display_edid_link_down(void) ""
+vfio_display_edid_update(uint32_t prefx, uint32_t prefy) "%dx%d"
These should be %u since the variables are uint32_t
+vfio_display_edid_write_error(void) ""
Otherwise
Reviewed-by: Liam Merwick
On 20/02/2019 11:24, Yuval Shaia wrote:
On Wed, Feb 20, 2019 at 12:13:45PM +0100, Gerd Hoffmann wrote:
From: Liam Merwick
Add an assert and an explicit check before the two callers to
usb_ep_get() in the USB redirector code to ensure the device
passed in is not NULL.
Signed-off-by: Liam
On 15/02/2019 10:49, Paolo Bonzini wrote:
It is only necessary to clear block-obj-y because Makefile.objs
uses "+=" instead of "="; fix that and remove the assignment.
The other variables need not be cleared at all.
Signed-off-by: Paolo Bonzini
Revie
s use the trace event infrastructure so that it's
available in production cases also and not just when DEBUG_TIS is enabled.
Signed-off-by: Liam Merwick
---
v3 -> v4
- Allow for null terminator in buffer length calc.
- dropped "tpm_tis: " from direction string since function name is n
in the for loop to check the
localities up to the requesting locality.
Signed-off-by: Liam Merwick
Reviewed-by: Stefan Berger
---
v4 -> v5
First char in patch got deleted, corrupting email subject.
hw/tpm/tpm_tis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/
analysis tools that report that no explicit checking
is being done.
Signed-off-by: Liam Merwick
---
hw/tpm/tpm_tis.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 61a130beef35..772431f20874 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm
analysis tools that report that no explicit checking
is being done.
Signed-off-by: Liam Merwick
---
hw/tpm/tpm_tis.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 61a130beef35..772431f20874 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm
s use the trace event infrastructure so that it's
available in production cases also and not just when DEBUG_TIS is enabled.
Signed-off-by: Liam Merwick
---
v3 -> v4
- Allow for null terminator in buffer length calc.
- dropped "tpm_tis: " from direction string since function name is n
in the for loop to check the
localities up to the requesting locality.
Signed-off-by: Liam Merwick
Reviewed-by: Stefan Berger
---
hw/tpm/tpm_tis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index fd6bb9b59a96..61a130beef35 100644
On 12/02/2019 21:01, Stefan Berger wrote:
On 2/12/19 3:48 PM, Liam Merwick wrote:
cppcheck reports:
[hw/tpm/tpm_tis.c:113]: (warning) %d in format string (no. 2) requires
'int' but the argument type is 'unsigned int'
Rather than just converting the format specifier to use '%u
in the for loop to check the
localities up to the requesting locality.
Signed-off-by: Liam Merwick
Reviewed-by: Stefan Berger
---
hw/tpm/tpm_tis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index fd6bb9b59a96..61a130beef35 100644
analysis tools that report that no explicit checking
is being done.
Signed-off-by: Liam Merwick
---
hw/tpm/tpm_tis.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 61a130beef35..772431f20874 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw
s use the trace event infrastructure so that it's
available in production cases also and not just when DEBUG_TIS is enabled.
Signed-off-by: Liam Merwick
---
Sample trace output
% echo tpm_tis_show_buffer > /tmp/events
% export
QTEST_QEMU_BINARY="/home/Development/qemu-upstream/x86_64
On 12/02/2019 13:27, Stefan Berger wrote:
On 2/12/19 7:31 AM, Philippe Mathieu-Daudé wrote:
On 2/11/19 10:13 PM, Stefan Berger wrote:
On 2/11/19 3:09 PM, Liam Merwick wrote:
On 11/02/2019 19:56, Stefan Berger wrote:
On 2/11/19 11:02 AM, Philippe Mathieu-Daudé wrote:
On 2/11/19 4:03 PM, Liam
On 12/02/2019 09:57, Paolo Bonzini wrote:
Signed-off-by: Paolo Bonzini
Reviewed-by: Liam Merwick
---
docs/devel/kconfig.rst | 305 +
1 file changed, 305 insertions(+)
create mode 100644 docs/devel/kconfig.rst
diff --git a/docs/devel/kconfig.rst
On 11/02/2019 19:56, Stefan Berger wrote:
On 2/11/19 11:02 AM, Philippe Mathieu-Daudé wrote:
Hi Liam,
On 2/11/19 4:03 PM, Liam Merwick wrote:
cppcheck reports:
[hw/tpm/tpm_tis.c:113]: (warning) %d in format string (no. 2)
requires 'int' but the argument type is 'unsigned int'
Fix
Defensive check to prevent future caller passing incorrect address
or catch if the MMIO address parameters were not all changed together.
Signed-off-by: Liam Merwick
---
I've been running static analysis tools on QEMU and one reports this check.
While it's just theoretically correct (impossible
in the for loop to check the
localities up to the requesting locality.
Signed-off-by: Liam Merwick
---
hw/tpm/tpm_tis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index fd6bb9b59a96..61a130beef35 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw
cppcheck reports:
[hw/tpm/tpm_tis.c:113]: (warning) %d in format string (no. 2) requires 'int'
but the argument type is 'unsigned int'
Fix this by using %u instead of %d
Signed-off-by: Liam Merwick
---
hw/tpm/tpm_tis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw
Hi Stefan,
Thanks for the detailed explanations.
On 04/02/2019 18:05, Stefan Berger wrote:
On 1/30/19 9:45 AM, Liam Merwick wrote:
Assert that various locality values don't exceed TPM_TIS_NUM_LOCALITIES
by adding specific calls to assert(TPM_TIS_NUM_LOCALITIES(l)) in order
to help static code
On 08/02/2019 14:23, Stefano Garzarella wrote:
In several part we still using req->dev or VIRTIO_DEVICE(req->dev)
when we have already defined s and vdev pointers:
VirtIOBlock *s = req->dev;
VirtIODevice *vdev = VIRTIO_DEVICE(s);
Signed-off-by: Stefano Garzarella
Reviewed
In uhci_handle_td(), the call to ehci_find_device() can return NULL
if it doesn't find a device matching 'addr' so explicitly check
the return value before passing it to usb_ep_get().
Signed-off-by: Liam Merwick
---
hw/usb/hcd-uhci.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions
In musb_packet(), the call to usb_find_device() can return NULL
if it doesn't find a device matching 'addr' so explicitly check
the return value before passing it to usb_ep_get(). This then
allows the subsequent calculation of 'id' to be streamlined.
Signed-off-by: Liam Merwick
---
hw/usb/hcd
No caller of usb_ep_get() calls it with a NULL device (previous commits
have addressed the few remaining cases which didn't explicitly check).
Replace check for 'dev == NULL' with an assert instead.
Signed-off-by: Liam Merwick
---
hw/usb/core.c | 4 +---
1 file changed, 1 insertion(+), 3
Add an assert and an explicit check before the two callers to
usb_ep_get() in the USB redirector code to ensure the device
passed in is not NULL.
Signed-off-by: Liam Merwick
---
hw/usb/redirect.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/usb/redirect.c b/hw/usb
XHCIPort.
Signed-off-by: Liam Merwick
---
hw/usb/hcd-xhci.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 19c64f7ff421..99b83aaa9ed5 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -2607,6 +2607,7 @@ static void xhci_port_update(XHCIPort
In ehci_process_itd(), the call to ehci_find_device() can return NULL
if it doesn't find a device matching 'devaddr' so explicitly check
the return value before passing it to usb_ep_get().
Signed-off-by: Liam Merwick
---
hw/usb/hcd-ehci.c | 7 +--
1 file changed, 5 insertions(+), 2
A call to ohci_find_device() can return NULL if it doesn't find a
device matching 'addr' so for the two callers, explicitly check
the return value before passing it to usb_ep_get().
Signed-off-by: Liam Merwick
---
hw/usb/hcd-ohci.c | 8
1 file changed, 8 insertions(+)
diff --git a/hw
There is no need to calculate the 'eps' variable in usb_ep_get()
if 'ep' is the control endpoint. Instead the calculation should
be done after validating the input before returning an entry
indexed by the endpoint 'ep'.
Signed-off-by: Liam Merwick
Reviewed-by: Darren Kenny
Reviewed-by: Mark
Signed-off-by: Liam Merwick
---
hw/usb/hcd-xhci.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 99b83aaa9ed5..ec28bee31963 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3276,10 +3276,10 @@ static USBEndpoint
>token >> 15) & 0xf);
if (ep == NULL) {
[ ... ]
... and uhci_find_device can return NULL.
So, I'd suggest to check all usb_ep_get() callers, fix them if needed,
then remove the 'if (dev== NULL)' check in usb_ep_get() and add the
assert() instead.
===
Passes QEMU 'make
On 31/01/2019 08:03, Gerd Hoffmann wrote:
On Wed, Jan 30, 2019 at 02:37:02PM +, Liam Merwick wrote:
From: Liam Merwick
usb_ep_get() can return a Null pointer in the (albeit unlikely) case
that a NULL USBDevice is passed in via the 'dev' parameter.
That should never ever happen
From: Liam Merwick
In kvm_arch_init_vcpu() a call to cpuid_find_entry() can return
NULL so the pointer returned should be checked before dereferencing it.
Reported by the Parfait static code analysis tool
Signed-off-by: Liam Merwick
---
target/i386/kvm.c | 4 +++-
1 file changed, 3
Assert that various locality values don't exceed TPM_TIS_NUM_LOCALITIES
by adding specific calls to assert(TPM_TIS_NUM_LOCALITIES(l)) in order
to help static code analysis.
Signed-off-by: Liam Merwick
---
hw/tpm/tpm_tis.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/hw/tpm/tpm_tis.c
There is no need to calculate the 'eps' variable in usb_ep_get()
if 'ep' is the control endpoint. Instead the calculation should
be done after validating the input and the resulting pointer also
validated before returning an entry indexed on the endpoint 'ep'.
Signed-off-by: Liam Merwick
From: Liam Merwick
usb_ep_get() can return a Null pointer in the (albeit unlikely) case
that a NULL USBDevice is passed in via the 'dev' parameter. Before
dereferencing the return value from usb_ep_get(), check its validity
and use a default (invalid) value where needed.
Reported
These two patches are a result of running the Parfait static analysis
tool on QEMU. The first patch is an optimisation to move an assignment
after a test and the second patch handles a number of potential NULL
pointer dereferences if usb_ep_get() returns NULL.
Liam Merwick (2):
usb: rearrange
e ?
"Lesser" library. So assume that version 2.1 is meant here.
'"Lesser" library.' -> '"Lesser" license.' ?
Also some files mentioned the GPL instead of the LGPL after declaring
that the files are licensed under the LGPL, so change these spots to
use LGPL
On 22/01/2019 12:10, Stefano Garzarella wrote:
In order to avoid migration issues, we enable PVH only for
machine type >= 4.0
Suggested-by: Michael S. Tsirkin
Signed-off-by: Stefano Garzarella
Reviewed-by: Liam Merwick
---
Based-on: <1548093980-43088-1-git-send-email
On 21/01/2019 02:31, no-re...@patchew.org wrote:
Patchew URL:
https://patchew.org/QEMU/1547554687-12687-1-git-send-email-liam.merw...@oracle.com/
...>
CC dma-helpers.o
CC vl.o
/tmp/qemu-test/src/block/sheepdog.c: In function 'find_vdi_name':
On 17/01/2019 14:37, Paolo Bonzini wrote:
On 17/01/19 15:33, Liam Merwick wrote:
# pc-bios/optionrom/pvh.bin
# pc-bios/optionrom/pvh.img
# pc-bios/optionrom/pvh.raw
pvh.bin should not be ignored.
That's part of what I didn't quite understand.
pc-bios/optionrom/linuxboot.bin
tignore in one of the patches.
# pc-bios/optionrom/pvh.bin
# pc-bios/optionrom/pvh.img
# pc-bios/optionrom/pvh.raw
other than that, the code here LGTM so for that
Reviewed-by: Liam Merwick
index
38a41761014957d50eb55d790b6957888cbeee0a..8033080ada2db4c4613fdc3bb5a69d79
Hi Stefano,
Code LGTM, just a few minor comments below
On 15/01/2019 10:00, Stefano Garzarella wrote:
The new pvh.bin option rom can be used with SeaBIOS to boot
uncompressed kernel using the x86/HVM direct boot ABI.
pvh.S contains the entry point of the option rom. It runs
in real mode,
1 - 100 of 189 matches
Mail list logo