Doug Gale writes:
> I used exclamations as a concise way of indicating that the driver did
> something nonsensical, or horribly invalid, like something likely to
> cause a memory corruption, trying to start the controller with a
> nonsense configuration, providing invalid PRDs or writing to
> unr
Hi Alex, Eric,
> -Original Message-
> From: Qemu-devel [mailto:qemu-devel-
> bounces+bharat.bhushan=nxp@nongnu.org] On Behalf Of Bharat
> Bhushan
> Sent: Friday, October 06, 2017 9:16 AM
> To: Auger Eric ; Linu Cherian
>
> Cc: peter.mayd...@linaro.org; kevin.t...@intel.com; m...@redha
On 09/10/17 23:23, no-re...@patchew.org wrote:
> Hi,
>
> This series seems to have some coding style problems. See output below for
> more information:
>
> Type: series
> Message-id: 1507583223-14819-1-git-send-email-mark.cave-ayl...@ilande.co.uk
> Subject: [Qemu-devel] [PATCH 0/8] sun4m : sparc
Am 09.10.2017 um 23:58 schrieb Richard Henderson:
> On 10/07/2017 08:55 AM, Stefan Weil wrote:
>> +char *addr = memset_args->addr;
>> +uint64_t numpages = memset_args->numpages;
>> +uint64_t hpagesize = memset_args->hpagesize;
>> +unsigned i;
>
> Match numpages prop
On Sat, Oct 07, 2017 at 10:34:57AM +0200, Lukáš Doktor wrote:
> Dne 5.10.2017 v 19:20 Eduardo Habkost napsal(a):
> > All scripts that use the QEMUMachine and QEMUQtestMachine classes
> > (device-crash-test, tests/migration/*, iotests.py, basevm.py)
> > already configure logging.
> >
> > The basicC
On Sat, Oct 07, 2017 at 10:26:14AM +0200, Lukáš Doktor wrote:
> Dne 5.10.2017 v 19:20 Eduardo Habkost napsal(a):
> > Use logging module for the QMP debug messages. The only scripts
> > that set debug=True are iotests.py and guestperf/engine.py, and
> > they already call logging.basicConfig() to se
On Mon, Oct 09, 2017 at 09:50:59PM +0200, Igor Mammedov wrote:
> there is a dedicated callback CPUClass::parse_features
> which purpose is to convert -cpu features into a set of
> global properties AND deal with compat/legacy features
> that couldn't be directly translated into CPU's properties.
>
On 10/09/2017 06:55 PM, Marc-André Lureau wrote:
Close to where it's being used.
Signed-off-by: Marc-André Lureau
Reviewed-by: Stefan Berger
---
hw/tpm/tpm_tis.h | 5 +
include/sysemu/tpm_backend.h | 5 -
2 files changed, 5 insertions(+), 5 deletions(-)
diff --gi
On 10/09/2017 06:55 PM, Marc-André Lureau wrote:
No more users of be_drivers[], drop that too.
Signed-off-by: Marc-André Lureau
Reviewed-by: Stefan Berger
---
include/sysemu/tpm_backend.h | 1 -
hw/tpm/tpm_emulator.c| 1 -
hw/tpm/tpm_passthrough.c | 1 -
tpm.c
On Mon, Oct 09, 2017 at 09:50:47PM +0200, Igor Mammedov wrote:
Applied to ppc-for-2.11. There was a small error in 19/24, which
reverted pnv to defaulting to POWER9 v1.0 whereas I've recently
changed it to v2.0. Rather than requiring a respin I adjusted that
myself, and fixed the minor conflicts
On Mon, Oct 09, 2017 at 12:06:05PM -0500, Michael Roth wrote:
> device_unparent(dev, ...) is called when a device is unparented,
> either directly, or as a result of a parent device being
> finalized, and handles some final cleanup for the device. Part
> of this includes emiting a DEVICE_DELETED QM
On Mon, Oct 09, 2017 at 12:06:07PM -0500, Michael Roth wrote:
> DEVICE_DEL is currently emitted when a Device is unparented, as
> opposed to when it is finalized. The main design motivation for this
> seems to be that after unparent()/unrealize(), the Device is no
> longer visible to the guest, and
On Mon, Oct 09, 2017 at 09:51:05PM +0200, Igor Mammedov wrote:
> use generic cpu_model parsing introduced by
> (6063d4c0f vl.c: convert cpu_model to cpu type and set of global properties
> before machine_init())
>
> it allows to:
> * replace sPAPRMachineClass::tcg_default_cpu with
> Machin
On Mon, Oct 09, 2017 at 06:11:36PM -0300, Daniel Henrique Barboza wrote:
> LMB removal is completed only when the spapr_lmb_release callback
> is called after all DRCs of the dimm are detached. During this
> time, it is possible that a unplug request for the same dimm
> arrives, trying to detach D
On Mon, Oct 09, 2017 at 09:51:00PM +0200, Igor Mammedov wrote:
> spapr core type definition doesn't have any fields that
> require it to be defined at runtime. So replace code
> that fills in TypeInfo at runtime with static TypeInfo
> array that does the same at complie time.
>
> Signed-off-by: Ig
On Mon, Oct 09, 2017 at 12:06:06PM -0500, Michael Roth wrote:
> This reverts commit abed886ec60cf239a03515cf0b30fb11fa964c44.
>
> This patch originally addressed an issue where a DEVICE_DELETED
> event could be emitted (in device_unparent()) before a Device's
> QemuOpts were cleaned up (in device_
From: Igor Mammedov
type_register()/type_register_static() functions in current impl.
can't fail returning 0, also none of the users check for error
so update doc comment to reflect current behaviour.
Suggested-by: Eduardo Habkost
Signed-off-by: Igor Mammedov
Message-Id: <1507111682-66171-2-gi
On 10/09/2017 06:55 PM, Marc-André Lureau wrote:
Use tpm_driver_find_by_type() instead.
Signed-off-by: Marc-André Lureau
Reviewed-by: Stefan Berger
---
tpm.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/tpm.c b/tpm.c
index 04de8da5fd..ad2ed6a0da 10064
On Mon, Oct 09, 2017 at 09:51:04PM +0200, Igor Mammedov wrote:
> next commit will drop ppc_cpu_lookup_alias() declaration from header
> and make it static which will break its last user ppc_cpu_class_by_name()
> since ppc_cpu_class_by_name() defined before ppc_cpu_lookup_alias().
>
> To avoid this
From: Seeteena Thoufeek
Signed-off-by: Eduardo Habkost
---Steps to Reproduce---
When passed a negative number to 'maxcpus' parameter, Qemu aborts
with a core dump.
Run the following command with maxcpus argument as negative number
ppc64-softmmu/qemu-system-ppc64 --nographic -vga none -machin
Since 2012 (commit ba6212d8 "Eliminate cpus-x86_64.conf file") we
have no default config files that would be disabled using
-nodefconfig. Update documentation and document -nodefconfig as
deprecated.
Cc: Markus Armbruster
Acked-by: Alistair Francis
Signed-off-by: Eduardo Habkost
Message-Id: <2
On Mon, Oct 09, 2017 at 09:51:06PM +0200, Igor Mammedov wrote:
> use common cpu_model prasing in vl.c and set default cpu_model
> using generic MachineClass::default_cpu_type.
>
> Beside of switching to generic infrastructure it solves several
> issues.
>
> * ppc_cpu_class_by_name() is used to d
From: Alistair Francis
This patch add a MachineClass element that can be set in the machine C
code to specify a list of supported CPU types. If the supported CPU
types are specified the user enter CPU (by -cpu at runtime) is checked
against the supported types and QEMU exits if they aren't suppor
Change qemu_config_parse() to return the number of config groups
in success and -EINVAL on error. This will allow callers of
qemu_config_parse() to check if something was really loaded from
the config file.
All existing callers of qemu_config_parse() and
qemu_read_config_file() only check if the r
Changes on v2:
* Removed NUMA/ACPI patches until we figure out what's breaking
the tests.
(See: https://www.mail-archive.com/qemu-devel@nongnu.org/msg486368.html)
Note that I didn't reproduce the failure yet. I am just
removing those patches because they are the only ones touching
ACPI c
Both -nodefconfig and -no-user-config options do the same thing
today, we only need one variable to keep track of them.
Suggested-by: Markus Armbruster
Acked-by: Alistair Francis
Reviewed-by: Markus Armbruster
Signed-off-by: Eduardo Habkost
Message-Id: <20171004030025.7866-2-ehabk...@redhat.co
From: Todd Eisenberger
It looks like there was a transcription error when writing this code
initially. The code previously only decoded src or dst of rax. This
resolves
https://bugs.launchpad.net/qemu/+bug/1719984.
Signed-off-by: Todd Eisenberger
Message-Id:
Reviewed-by: Richard Henderson
S
From: Philippe Mathieu-Daudé
and clean every implementation.
Suggested-by: Eduardo Habkost
Signed-off-by: Philippe Mathieu-Daudé
Message-Id: <20170917232842.14544-1-f4...@amsat.org>
Reviewed-by: Igor Mammedov
Reviewed-by: Laurent Vivier
Reviewed-by: Artyom Tarasenko
Signed-off-by: Eduardo H
On 10/09/2017 06:55 PM, Marc-André Lureau wrote:
One step towards removing TPMDriverOps and driver registration.
Signed-off-by: Marc-André Lureau
Reviewed-by: Stefan Berger
---
tpm.c | 29 +
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/tpm.
On 10/09/2017 06:55 PM, Marc-André Lureau wrote:
This look like temporary hacking code. It shouldn't be necessary in
release code, or there should be a runtime option for it.
Signed-off-by: Marc-André Lureau
Reviewed-by: Stefan Berger
---
hw/tpm/tpm_tis.c | 24 +---
On 10/09/2017 06:55 PM, Marc-André Lureau wrote:
No need to export the function.
Signed-off-by: Marc-André Lureau
Reviewed-by: Stefan Berger
---
include/sysemu/tpm_backend.h | 1 -
tpm.c| 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/inclu
Hi Eduardo,
At 10/10/2017 10:29 AM, Eduardo Habkost wrote:
On Fri, Sep 01, 2017 at 10:10:03AM +0800, Dou Liyang wrote:
It may be hard to read the assignment statement of "next_base", so
S/next_base += (1ULL << 32) - pcms->below_4g_mem_size;
/next_base = mem_base + mem_len;
... for readabilit
On 10/09/2017 06:55 PM, Marc-André Lureau wrote:
This argument is always false, simplify the code.
Signed-off-by: Marc-André Lureau
Reviewed-by: Stefan Berger
---
hw/tpm/tpm_tis.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/hw/tpm/tpm_tis.c b/hw/
On 10/09/2017 06:55 PM, Marc-André Lureau wrote:
Hi,
I accumulated a series of patch doing some TPM code cleanup while
doing review. I removed some dead code, simplified other parts, and
tried to isolate implementation of the backend and frontend by using a
new TPMIf interface. I solved a few is
On Fri, Sep 01, 2017 at 10:10:03AM +0800, Dou Liyang wrote:
> It may be hard to read the assignment statement of "next_base", so
>
> S/next_base += (1ULL << 32) - pcms->below_4g_mem_size;
> /next_base = mem_base + mem_len;
>
> ... for readability.
>
> No functionality change.
>
> Signed-off-by
From: Amarnath Valluri
As Emulator TPM backend uses chardev, tpm cleanup should happen before chardev
similar to other vhost-users.
Signed-off-by: Amarnath Valluri
Reviewed-by: Stefan Berger
Signed-off-by: Stefan Berger
---
tpm.c | 1 -
vl.c | 1 +
2 files changed, 1 insertion(+), 1 deletio
From: Amarnath Valluri
This allows backend implementations left optional interface methods.
For mandatory methods assertion checks added.
Took the opportunity to remove unused methods:
- tpm_backend_get_desc()
- TPMDriverOps->handle_startup_error
Signed-off-by: Amarnath Valluri
Reviewed-by:
From: Amarnath Valluri
This change introduces a new TPM backend driver that can communicate with
swtpm(software TPM emulator) using unix domain socket interface. QEMU talks to
the TPM emulator using QEMU's socket-based chardev backend device.
Swtpm uses two Unix sockets for communications, one f
From: Amarnath Valluri
Initialize and free TPMBackend data members in it's own instance_init() and
instance_finalize methods.
Took the opportunity to remove unneeded destroy() method from TpmDriverOps
interface as TPMBackend is a Qemu Object, we can use object_unref() inplace of
tpm_backend_dest
From: Amarnath Valluri
Signed-off-by: Amarnath Valluri
Reviewed-by: Stefan Berger
Reviewed-by: Marc-André Lureau
Signed-off-by: Stefan Berger
---
hw/tpm/tpm_passthrough.c | 64
hw/tpm/tpm_util.c| 25 +++
hw/tpm/tpm_util
From: Amarnath Valluri
buffer reallocation is very unlikely to be backend specific. Hence move inside
the tis.
Signed-off-by: Amarnath Valluri
Reviewed-by: Stefan Berger
Reviewed-by: Marc-André Lureau
Signed-off-by: Stefan Berger
---
backends/tpm.c | 9 -
hw/tpm/tpm_p
This patch adds a description of the current TPM support in QEMU
to the specs.
Several public specs are referenced via their landing page on the
trustedcomputinggroup.org website.
Signed-off-by: Stefan Berger
Reviewed-by: Laszlo Ersek
---
docs/specs/tpm.txt | 123 ++
From: Amarnath Valluri
TPM configuration options are backend implementation details and shall not be
part of base TPMBackend object, and these shall not be accessed directly outside
of the class, hence added a new interface method, get_tpm_options() to
TPMDriverOps., which shall be implemented by
From: Amarnath Valluri
TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class
member. The only possible reason for keeping in TPMBackend was, to get the
backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is
present.
Signed-off-by: Amarnath Valluri
From: Amarnath Valluri
Move thread handling inside TPMBackend, this way backend implementations need
not to maintain their own thread life cycle, instead they needs to implement
'handle_request()' class method that always been called from a thread.
This change made tpm_backend_int.h kind of usel
The following changes since commit d147f7e815f97cb477e223586bcb80c316ae10ea:
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
(2017-10-03 16:27:24 +0100)
are available in the git repository at:
git://github.com/stefanberger/qemu-tpm.git tags/pull-tpm-2017-10-04-
Hi,
This series seems to have some coding style problems. See output below for
more information:
Type: series
Message-id: 20171010005600.28735-1-richard.hender...@linaro.org
Subject: [Qemu-devel] [PULL 00/23] Queued TCG patches
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
total=$(git log
On 10/09/2017 12:24 PM, Emilio G. Cota wrote:
> On Thu, Oct 05, 2017 at 19:24:16 -0400, Emilio G. Cota wrote:
>> I'm including the fixups below.
>
> Just pushed v5 of this series. I rebased the series on top of the current
> master,
> and added the already mentioned fixes plus a new one (see belo
Hi,
This series failed automatic build test. Please find the testing commands and
their output below. If you have docker installed, you can probably reproduce it
locally.
Type: series
Message-id: 20171009225623.29232-1-marcandre.lur...@redhat.com
Subject: [Qemu-devel] [PATCH 00/42] TPM: code clea
From: Jiang Biao
Delete commented out extern keyword on link_error().
Signed-off-by: Jiang Biao
Message-Id: <1506762042-32145-1-git-send-email-jiang.bi...@zte.com.cn>
Signed-off-by: Richard Henderson
---
tcg/mips/tcg-target.inc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --g
From: "Emilio G. Cota"
Reviewed-by: Richard Henderson
Signed-off-by: Emilio G. Cota
Signed-off-by: Richard Henderson
---
include/qemu/osdep.h | 2 ++
util/osdep.c | 41 +
2 files changed, 43 insertions(+)
diff --git a/include/qemu/osdep.h b/in
From: "Emilio G. Cota"
Will come in handy very soon.
Reviewed-by: Richard Henderson
Reviewed-by: Alex Bennée
Signed-off-by: Emilio G. Cota
Signed-off-by: Richard Henderson
---
tcg/tcg.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tcg/tcg.c b/tcg/tcg.c
index ee6079
From: "Emilio G. Cota"
Groundwork for supporting multiple TCG contexts.
Compile-tested for all targets on an x86_64 host.
Suggested-by: Richard Henderson
Acked-by: Richard Henderson
Signed-off-by: Emilio G. Cota
Signed-off-by: Richard Henderson
---
tcg/tci.c | 552 +
From: "Emilio G. Cota"
In preparation for adding tc.size to be able to keep track of
TB's using the binary search tree implementation from glib.
Reviewed-by: Richard Henderson
Signed-off-by: Emilio G. Cota
Signed-off-by: Richard Henderson
---
include/exec/exec-all.h | 12 ++--
acce
From: "Emilio G. Cota"
These only depend on the host and therefore belong in the common
osdep, not in a target-dependent object.
While at it, query the host during an init constructor, which guarantees
the page size will be well-defined throughout the execution of the program.
Suggested-by: Ric
From: "Emilio G. Cota"
This prevents bit rot by ensuring the debug code is compiled when
building a user-mode target.
Unfortunately the helpers are user-mode-only so we cannot fully
get rid of the ifdef checks. Add a comment to explain this.
Suggested-by: Alex Bennée
Reviewed-by: Richard Hende
From: "Emilio G. Cota"
This gets rid of an ifdef check while ensuring that the debug code
is compiled, which prevents bit rot.
Suggested-by: Alex Bennée
Reviewed-by: Richard Henderson
Signed-off-by: Emilio G. Cota
Signed-off-by: Richard Henderson
---
accel/tcg/translate-all.c | 12 +
From: "Emilio G. Cota"
And fix the following warning when DEBUG_TB_INVALIDATE is enabled
in translate-all.c:
CC mipsn32-linux-user/accel/tcg/translate-all.o
/data/src/qemu/accel/tcg/translate-all.c: In function ‘tb_alloc_page’:
/data/src/qemu/accel/tcg/translate-all.c:1201:16: error: form
From: "Emilio G. Cota"
Groundwork for supporting multiple TCG contexts.
While at it, also allocate temps_used directly as a bitmap of the
required size, instead of using a bitmap of TCG_MAX_TEMPS via
TCGTempSet.
Performance-wise we lose about 1.12% in a translation-heavy workload
such as bootin
From: "Emilio G. Cota"
It is unlikely that we will ever want to call this helper passing
an argument other than the current PC. So just remove the argument,
and use the pc we already get from cpu_get_tb_cpu_state.
This change paves the way to having a common "tb_lookup" function.
Reviewed-by: R
From: "Emilio G. Cota"
This gets rid of a hole in struct TranslationBlock.
Reviewed-by: Richard Henderson
Signed-off-by: Emilio G. Cota
Signed-off-by: Richard Henderson
---
include/exec/exec-all.h | 3 +--
include/exec/tb-lookup.h | 2 +-
accel/tcg/cpu-exec.c | 4 ++--
accel/tcg/tran
From: "Emilio G. Cota"
Reviewed-by: Richard Henderson
Reviewed-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Emilio G. Cota
Signed-off-by: Richard Henderson
---
tcg/mips/tcg-target.inc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/mips/tcg-ta
From: "Emilio G. Cota"
This avoids duplicating code. cpu_exec_step will also use the
new common function once we integrate parallel_cpus into tb->cflags.
Note that in this commit we also fix a race, described by Richard Henderson
during review. Think of this scenario with threads A and B:
(A
From: "Emilio G. Cota"
The helpers require the address and size to be page-aligned, so
do that before calling them.
Reviewed-by: Richard Henderson
Signed-off-by: Emilio G. Cota
Signed-off-by: Richard Henderson
---
accel/tcg/translate-all.c | 61 ++-
From: "Emilio G. Cota"
Reviewed-by: Richard Henderson
Reviewed-by: Alex Bennée
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Emilio G. Cota
Signed-off-by: Richard Henderson
---
tcg/i386/tcg-target.inc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tcg/i386/tcg-ta
From: "Emilio G. Cota"
Whenever there is an overflow in code_gen_buffer (e.g. we run out
of space in it and have to flush it), the code_time profiling counter
ends up with an invalid value (that is, code_time -= profile_getclock(),
without later on getting += profile_getclock() due to the goto).
From: "Emilio G. Cota"
Groundwork for supporting multiple TCG contexts.
The hash table becomes read-only after it is filled in,
so we can save space by keeping just a global pointer to it.
Reviewed-by: Richard Henderson
Reviewed-by: Alex Bennée
Signed-off-by: Emilio G. Cota
Signed-off-by: Ri
From: "Emilio G. Cota"
Reusing the have_tb_lock name, which is also defined in translate-all.c,
makes code reviewing unnecessarily harder.
Avoid potential confusion by renaming the local have_tb_lock variable
to something else.
Reviewed-by: Richard Henderson
Signed-off-by: Emilio G. Cota
Sign
From: "Emilio G. Cota"
It is only used by this object, and it's not exported to any other.
Reviewed-by: Richard Henderson
Reviewed-by: Alex Bennée
Signed-off-by: Emilio G. Cota
Signed-off-by: Richard Henderson
---
accel/tcg/translate-all.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(
From: "Emilio G. Cota"
Reviewed-by: Richard Henderson
Signed-off-by: Emilio G. Cota
Signed-off-by: Richard Henderson
---
include/exec/exec-all.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 673fc066d0..a9a8bb6f
From: "Emilio G. Cota"
Commit f0aff0f124 ("cputlb: add assert_cpu_is_self checks") buried
the increment of tlb_flush_count under TLB_DEBUG. This results in
"info jit" always (mis)reporting 0 TLB flushes when !TLB_DEBUG.
Besides, under MTTCG tlb_flush_count is updated by several threads,
so in or
From: "Emilio G. Cota"
This gets rid of some ifdef checks while ensuring that the debug code
is compiled, which prevents bit rot.
Suggested-by: Alex Bennée
Reviewed-by: Richard Henderson
Signed-off-by: Emilio G. Cota
Signed-off-by: Richard Henderson
---
accel/tcg/translate-all.c | 20 ++
:02 +0100)
are available in the git repository at:
git://github.com/rth7680/qemu.git tags/pull-tcg-20171009
for you to fetch changes up to 5de8a6a471ba6b86c6b4fb681e5a3c594ed5a684:
tcg/mips: delete commented out extern keyword. (2017-10-09
On Sun, Oct 8, 2017 at 3:20 PM, Edgar E. Iglesias
wrote:
> On Wed, Sep 20, 2017 at 03:01:31PM -0700, Alistair Francis wrote:
>>
>> This series adds the ZynqMP Power Management Unit (PMU) machine with basic
>> functionality.
>>
>> The machine only has the
>> - CPU
>> - Memory
>> - Interrupt cont
On Fri, Oct 6, 2017 at 4:49 PM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Alistair Francis
Thanks,
Alistair
> ---
> hw/core/loader.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/core/loader.c b/hw/core/loader.c
> i
On 10/02/2017 10:39 AM, Vladimir Sementsov-Ogievskiy wrote:
> We can use copy_bitmap instead of sync_bitmap. copy_bitmap is
> initialized from sync_bitmap and it is more informative: we will not try
> to process data, that is already in progress (by write notifier).
>
> Signed-off-by: Vladimir S
On 10/02/2017 10:39 AM, Vladimir Sementsov-Ogievskiy wrote:
> Set fake progress for non-dirty clusters in copy_bitmap initialization,
> to. It simplifies code and allows further refactoring.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
>
> Motivation (some of these paragraphs may be n
On Mon, Oct 09, 2017 at 11:55:33PM +0200, Max Reitz wrote:
> Apparently it would be a good idea to test that, too.
>
> Signed-off-by: Max Reitz
Reviewed-by: Jeff Cody
> ---
> tests/qemu-iotests/125 | 7 +-
> tests/qemu-iotests/125.out | 480
> ---
On Mon, Oct 09, 2017 at 11:55:32PM +0200, Max Reitz wrote:
> Some qcow2 functions (at least perform_cow()) expect s->lock to be
> taken. Therefore, if we want to make use of them, we should execute
> preallocate() (as "preallocate_co") in a coroutine so that we can use
> the qemu_co_mutex_* functi
On Mon, Oct 09, 2017 at 11:55:31PM +0200, Max Reitz wrote:
> A qcow2 image file's length is not required to have a length that is a
> multiple of the cluster size. However, qcow2_refcount_area() expects an
> aligned value for its @start_offset parameter, so we need to round
> @old_file_size up to
tpm_crb is a device for TPM 2.0 Command Response Buffer (CRB)
Interface as defined in TCG PC Client Platform TPM Profile (PTP)
Specification Family “2.0” Level 00 Revision 01.03 v22.
The PTP allows device implementation to switch between TIS and CRB
model at run time, but given that CRB is a simpl
The function is generally useful and used in the following patches.
Signed-off-by: Marc-André Lureau
---
hw/tpm/tpm_util.h | 8 +++-
hw/tpm/tpm_tis.c | 3 ++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/hw/tpm/tpm_util.h b/hw/tpm/tpm_util.h
index 2f7c96146d..aca10c97bf 10
The device should be exposed if present. It shouldn't have an
undefined version (or else backend init failed, and device should fail
too). Finally, make the fields specific to TIS device model.
Signed-off-by: Marc-André Lureau
---
include/sysemu/tpm.h | 3 +++
hw/i386/acpi-build.c | 12
Check fds values before closing, to avoid close(-1).
Signed-off-by: Marc-André Lureau
---
hw/tpm/tpm_passthrough.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
index 7371d50739..aa9167e3c6 100644
--- a/hw/tpm/tpm_
find_tpm() will be introduced to lookup the TPM device.
Signed-off-by: Marc-André Lureau
---
include/sysemu/tpm_backend.h | 2 +-
hw/tpm/tpm_tis.c | 2 +-
tpm.c| 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/sysemu/tpm_backend.h
Do not hardcode TPM device model to lookup version, use an interface
instead.
Signed-off-by: Marc-André Lureau
---
include/sysemu/tpm.h | 5 ++---
hw/tpm/tpm_tis.c | 5 +++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
index dbd2
Signed-off-by: Marc-André Lureau
---
include/sysemu/tpm_backend.h | 2 +-
hw/tpm/tpm_emulator.c| 12 +++-
hw/tpm/tpm_passthrough.c | 9 +++--
tpm.c| 3 ++-
4 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/include/sysemu/tpm_backend
It doesn't need TPMBackend. Also reorder arguments for consistency.
Signed-off-by: Marc-André Lureau
---
hw/tpm/tpm_passthrough.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
index 048edb1a1a..9326cbfdc9 100644
---
This will allow to introduce new devices implementing TPM.
Signed-off-by: Marc-André Lureau
---
hw/tpm/tpm_int.h | 19 ---
include/sysemu/tpm.h | 52 ++--
hw/i386/acpi-build.c | 2 +-
3 files changed, 39 insertions(+), 34 delet
Signed-off-by: Marc-André Lureau
---
hw/tpm/tpm_emulator.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c
index 315819329b..091d7ea147 100644
--- a/hw/tpm/tpm_emulator.c
+++ b/hw/tpm/tpm_emulator.c
@@ -328,6 +328,7 @@ static void tpm_emulator_can
Backend can give more accurate error description, and lift out the job
from the frontend.
Signed-off-by: Marc-André Lureau
---
include/sysemu/tpm_backend.h | 3 ++-
backends/tpm.c | 3 ++-
hw/tpm/tpm_tis.c | 4 +---
3 files changed, 5 insertions(+), 5 deletions(-)
diff
QEMU code doesn't generally have assert() for mandatory
callbacks/function pointers, probably because the crash is pretty
obvious. Document the methods instead of going into the code.
Make get_tpm_options() mandatory to implement (since all
backend implementation have it).
Signed-off-by: Marc-And
The TPM backend processing thread has common shared variable race
issues. (they should not be so easy to reach since guest interaction
with the device is slow compared to host emulation)
An obvious one is setting op_cancelled from device thread after
calling write(cancel_fd). The backend thread ma
Clean-up is handled by the create() function.
Signed-off-by: Marc-André Lureau
---
hw/tpm/tpm_passthrough.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/hw/tpm/tpm_passthrough.c b/hw/tpm/tpm_passthrough.c
index aa9167e3c6..0806cf86af 100644
--- a/hw/tpm/tp
The value is later unneeded, and may leak if the free visitor doesn't
consider it since has_cancel_path is false. And for consistency with
"path" it shouldn't be returned in get_tpm_options().
Signed-off-by: Marc-André Lureau
---
hw/tpm/tpm_passthrough.c | 4 +---
1 file changed, 1 insertion(+),
Lift from the backend implementation the responsability to call the
request_completed() callback outside of thread context. This also
simplify frontend/interface work, as they no longer need to care
whether the callback is called from a different thread.
Signed-off-by: Marc-André Lureau
---
hw/t
Signed-off-by: Marc-André Lureau
---
hw/tpm/tpm_tis.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c
index 3c8d246ac8..e7e8b112e8 100644
--- a/hw/tpm/tpm_tis.c
+++ b/hw/tpm/tpm_tis.c
@@ -24,17 +24,12 @@
#include "qemu/osdep
Simplify the TPM backend setup, move callback to TPM interface.
Signed-off-by: Marc-André Lureau
---
hw/tpm/tpm_int.h | 3 +++
include/sysemu/tpm_backend.h | 6 +-
backends/tpm.c | 4 +---
hw/tpm/tpm_emulator.c| 3 ++-
hw/tpm/tpm_passthrough.c | 3 +
Signed-off-by: Marc-André Lureau
---
include/sysemu/tpm_backend.h | 12
backends/tpm.c | 42 --
tpm.c| 6 --
3 files changed, 60 deletions(-)
diff --git a/include/sysemu/tpm_backend.h b/include/sysemu
No need to store the mode in the backend, or to let the frontend set
it itself.
Signed-off-by: Marc-André Lureau
---
hw/tpm/tpm_int.h | 1 +
include/sysemu/tpm_backend.h | 1 -
backends/tpm.c | 4 ++--
hw/tpm/tpm_tis.c | 3 +--
tpm.c|
1 - 100 of 396 matches
Mail list logo