在 2022/3/17 下午12:39, Alistair Francis 写道:
On Thu, Mar 17, 2022 at 12:10 PM Weiwei Li wrote:
在 2022/3/17 上午6:35, Alistair Francis 写道:
On Thu, Mar 17, 2022 at 1:13 AM Weiwei Li wrote:
riscv_raise_exception(env, ret, GETPC());
@@ -90,7 +90,7 @@ void helper_csrw_i128(CPURISCVState
On Fri, Mar 4, 2022 at 8:06 AM Atish Patra wrote:
> The Sscofpmf ('Ss' for Privileged arch and Supervisor-level extensions,
> and 'cofpmf' for Count OverFlow and Privilege Mode Filtering)
> extension allows the perf to handle overflow interrupts and filtering
> support. This patch provides a fram
Thomas Huth writes:
> On 16/03/2022 15.16, Markus Armbruster wrote:
>> Thomas Huth writes:
>>
>>> On 16/03/2022 14.32, Philippe Mathieu-Daudé wrote:
On 16/3/22 14:24, Thomas Huth wrote:
> The vga_common_init() function currently cannot report errors to its
> caller. But in the foll
Laurent,
On 3/15/22 11:31, Peter Maydell wrote:
On Tue, 15 Mar 2022 at 02:14, Richard Henderson
wrote:
On 3/14/22 18:57, Khem Raj wrote:
Remove pt_regs indirection and instead reference gp_regs directly, this
makes it portable across musl/glibc
Use PT_* constants defined in asm/ptrace.h
Mo
We need to update iq_dw according to the DMA_IRQ_REG during post
load. Otherwise we may get wrong IOTLB invalidation descriptor after
migration.
Fixes: fb43cf739e ("intel_iommu: scalable mode emulation")
Signed-off-by: Jason Wang
---
hw/i386/intel_iommu.c | 21 +++--
1 file chang
We need check whether passthrough is enabled during
vtd_switch_address_space() by checking the context entries. This
requires the root_scalable to be set correctly otherwise we may try to
check legacy rsvd bits instead of scalable ones.
Fixing this by updating root_scalable before switching the ad
On 16/03/2022 18:26, Jonathan Cameron via wrote:
On Wed, 16 Mar 2022 17:58:46 +
Jonathan Cameron wrote:
On Wed, 16 Mar 2022 17:16:55 +
Mark Cave-Ayland wrote:
On 16/03/2022 16:50, Jonathan Cameron via wrote:
On Thu, 10 Mar 2022 16:02:22 +0800
Peter Xu wrote:
On Wed, Mar
On Mon, Mar 14, 2022 at 03:38:16PM -0500, Eric Blake wrote:
> Prefer the :option:`--name` form when cross-referencing other options
> from the qemu-nbd documentation.
>
> Signed-off-by: Eric Blake
> ---
> docs/tools/qemu-nbd.rst | 12 ++--
> 1 file changed, 6 insertions(+), 6 deletions(-
17.03.2022 00:36, Eric Blake wrote:
On Wed, Mar 16, 2022 at 12:27:02PM +0300, Vladimir Sementsov-Ogievskiy wrote:
Old vsement...@virtuozzo.com is not accessible anymore.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
v2: @ya.ru mailbox works bad with mailing lists and git send-email
command,
QEMU currently abort()s if the user tries to add a second ISA VGA
device, for example:
$ ./qemu-system-x86_64 -device isa-vga -device isa-vga
RAMBlock "vga.vram" already registered, abort!
Aborted (core dumped)
$ ./qemu-system-x86_64 -device isa-cirrus-vga -device isa-cirrus-vga
RAMBlock "vga.vram
Most of the code in this function had been indented with 5 spaces instead
of 4. Since 4 is our preferred style, remove one space in the bad lines here.
Reviewed-by: Philippe Mathieu-Daudé
Signed-off-by: Thomas Huth
---
hw/display/cirrus_vga.c | 57 +
1 fi
The vga_common_init() function currently cannot report errors to its
caller. But in the following patch, we'd need this possibility, so
let's change it to take an "Error **" as parameter for this.
Signed-off-by: Thomas Huth
---
hw/display/vga_int.h| 2 +-
hw/display/ati.c|
QEMU currently abort()s if the user tries to add a second ISA VGA
device, for example:
$ ./qemu-system-x86_64 -device isa-vga -device isa-vga
RAMBlock "vga.vram" already registered, abort!
Aborted (core dumped)
$ ./qemu-system-x86_64 -device isa-cirrus-vga -device isa-cirrus-vga
RAMBlock "vga.vram
Am 16.03.2022 um 13:18 hat Stefan Hajnoczi geschrieben:
> On Tue, Mar 15, 2022 at 03:30:22PM -0400, John Snow wrote:
> > On Tue, Mar 15, 2022 at 4:47 AM Stefan Hajnoczi wrote:
> > >
> > > On Mon, Mar 14, 2022 at 03:09:35PM -0400, John Snow wrote:
> > > > On Mon, Mar 14, 2022 at 1:23 PM Stefan Hajn
Hi
On Wed, Mar 16, 2022 at 1:52 PM wrote:
>
> From: Marc-André Lureau
>
> chardev subsystem/library doesn't use gnutls. Use the dedicated
> chardev_ss.dependencies() instead.
>
> Signed-off-by: Marc-André Lureau
> ---
> meson.build | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> di
re-sending reply as something went wrong with headers (I suspect Daniel's name
formatting)
and email got bounced back.
On Wed, 16 Mar 2022 14:31:33 +
David Woodhouse wrote:
> On Wed, 2022-03-16 at 12:28 +0100, Igor Mammedov wrote:
> > Generally Daniel is right, as long as it's something t
Hi
On Wed, Mar 16, 2022 at 1:52 PM wrote:
>
> From: Marc-André Lureau
>
> kinfo_getproc() requires it.
This is required for correctness and for the next patch, which moves
qemu-openpty and its "util" dependency away from util_ss.
Please review
>
> Signed-off-by: Marc-André Lureau
> ---
> ut
On 08.03.22 02:57, John Snow wrote:
This adds an Exception that extends the Python stdlib
subprocess.CalledProcessError.
The difference is that the str() method of this exception also adds the
stdout/stderr logs. In effect, if this exception goes unhandled, Python
will print the output in a visu
On Wed, 16 Mar 2022 at 22:23, Alistair Francis wrote:
> Hmm... This seems like a bug. We shouldn't allow the user to specify a
> `-bios` option if using KVM. Would you mind preparing a patch to catch
> this?
You don't want to allow the possibility of a bios blob that expects
to run in S-mode, the
On Thu, Mar 17, 2022 at 1:58 AM Atish Patra wrote:
> The Linux kernel parses the ISA extensions from "riscv,isa" DT
> property. It used to parse only the single letter base extensions
> until now. A generic ISA extension parsing framework was proposed[1]
> recently that can parse multi-letter ISA
Vladislav Yaroshchuk writes:
> On Wed, Mar 16, 2022 at 4:58 PM Markus Armbruster wrote:
>
>> Vladislav Yaroshchuk writes:
>>
>> > Create separate netdevs for each vmnet operating mode:
>> > - vmnet-host
>> > - vmnet-shared
>> > - vmnet-bridged
>> >
>> > Signed-off-by: Vladislav Yaroshchuk
>>
>
On 3/16/22 1:17 PM, Claudio Fontana wrote:
> On 3/14/22 6:48 PM, Daniel P. Berrangé wrote:
>> On Mon, Mar 14, 2022 at 06:38:31PM +0100, Claudio Fontana wrote:
>>> On 3/14/22 6:17 PM, Daniel P. Berrangé wrote:
On Sat, Mar 12, 2022 at 05:30:01PM +0100, Claudio Fontana wrote:
> the first user
On Thu, Mar 17, 2022 at 11:12:11AM +0100, Claudio Fontana wrote:
> On 3/16/22 1:17 PM, Claudio Fontana wrote:
> > On 3/14/22 6:48 PM, Daniel P. Berrangé wrote:
> >> On Mon, Mar 14, 2022 at 06:38:31PM +0100, Claudio Fontana wrote:
> >>> On 3/14/22 6:17 PM, Daniel P. Berrangé wrote:
> On Sat, Ma
On 08.03.22 02:57, John Snow wrote:
re-write qemu_img() as a function that will by default raise a
VerboseProcessException (extended from CalledProcessException) on
non-zero return codes. This will produce a stack trace that will show
the command line arguments and return code from the failed pro
vmnet.framework dependency is added with 'vmnet' option
to enable or disable it. Default value is 'auto'.
used vmnet features are available since macOS 11.0,
but new backend can be built and work properly with
subset of them on 10.15 too.
Signed-off-by: Vladislav Yaroshchuk
---
meson.build
Signed-off-by: Vladislav Yaroshchuk
---
hmp-commands.hx | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/hmp-commands.hx b/hmp-commands.hx
index 8476277aa9..8f3d78f177 100644
--- a/hmp-commands.hx
+++ b/hmp-commands.hx
@@ -1265,7 +1265,11 @@ ERST
{
.name
On 08.03.22 02:57, John Snow wrote:
qemu_img() returning zero ought to be the rule, not the
exception. Remove all explicit checks against the condition in
preparation for making non-zero returns an Exception.
Signed-off-by: John Snow
---
tests/qemu-iotests/163 |
On 08.03.22 02:57, John Snow wrote:
print(add_visual_margin(msg, width=72, name="Commit Message"))
┏━ Commit Message ━━
┃ add_visual_margin() takes a chunk of text and wraps it in a visual
┃ container that force-wraps to a specified width. An o
On 08.03.22 02:57, John Snow wrote:
Fortify compare_images() to be more discerning about the status codes it
receives. If qemu_img() returns an exit code that implies it didn't
actually perform the comparison, treat that as an exceptional
circumstance and force the caller to be aware of the peril
macOS provides networking API for VMs called 'vmnet.framework':
https://developer.apple.com/documentation/vmnet
We can provide its support as the new QEMU network backends which
represent three different vmnet.framework interface usage modes:
* `vmnet-shared`:
allows the guest to communicat
Signed-off-by: Vladislav Yaroshchuk
---
qemu-options.hx | 25 +
1 file changed, 25 insertions(+)
diff --git a/qemu-options.hx b/qemu-options.hx
index 5ce0ada75e..ea00d0eeb6 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2743,6 +2743,25 @@ DEF("netdev", HAS_ARG, QE
Hello Richard,
being mainly a Pascal programmer,
I always jump when I see such constructs:
You change the type of the print_syscall_err parameter to abi_ulong,
with is an unsigned type as the name suggests,
and after you compare it to a signed constant -4096.
This would never work in Pasc
Create separate netdevs for each vmnet operating mode:
- vmnet-host
- vmnet-shared
- vmnet-bridged
Acked-by: Markus Armbruster
Signed-off-by: Vladislav Yaroshchuk
---
net/clients.h | 11
net/meson.build | 7 +++
net/net.c | 10
net/vmnet-bridged.m | 25 +++
Interaction with vmnet.framework in different modes
differs only on configuration stage, so we can create
common `send`, `receive`, etc. procedures and reuse them.
Signed-off-by: Phillip Tennen
Signed-off-by: Vladislav Yaroshchuk
---
net/vmnet-common.m | 358
On Thu, Mar 17, 2022 at 1:58 AM Atish Patra wrote:
> The Linux kernel parses the ISA extensions from "riscv,isa" DT
> property. It used to parse only the single letter base extensions
> until now. A generic ISA extension parsing framework was proposed[1]
> recently that can parse multi-letter ISA
Signed-off-by: Vladislav Yaroshchuk
---
net/vmnet-host.c | 109 ---
1 file changed, 103 insertions(+), 6 deletions(-)
diff --git a/net/vmnet-host.c b/net/vmnet-host.c
index a461d507c5..e6d01fd65e 100644
--- a/net/vmnet-host.c
+++ b/net/vmnet-host.c
@@
On 09.03.22 04:53, John Snow wrote:
qemu_img_json() is a new helper built on top of qemu_img() that tries to
pull a valid JSON document out of the stdout stream.
In the event that the return code is negative (the program crashed), or
the code is greater than zero and did not produce valid JSON o
Signed-off-by: Vladislav Yaroshchuk
---
net/vmnet-bridged.m | 130 ++--
1 file changed, 125 insertions(+), 5 deletions(-)
diff --git a/net/vmnet-bridged.m b/net/vmnet-bridged.m
index 91c1a2f2c7..6970c7d17b 100644
--- a/net/vmnet-bridged.m
+++ b/net/vmnet-b
On 09.03.22 04:53, John Snow wrote:
qemu_img_json() gives better diagnostic information on failure.
Signed-off-by: John Snow
---
tests/qemu-iotests/iotests.py | 8
1 file changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Hanna Reitz
On 17.03.22 11:25, Hanna Reitz wrote:
On 08.03.22 02:57, John Snow wrote:
re-write qemu_img() as a function that will by default raise a
VerboseProcessException (extended from CalledProcessException) on
non-zero return codes. This will produce a stack trace that will show
the command line argume
On 09.03.22 04:53, John Snow wrote:
Add qemu_img_info() by analogy with qemu_img_measure() and
qemu_img_check(). Modify image_size() to use this function instead to
take advantage of the better diagnostic information on failure provided
(ultimately) by qemu_img().
Signed-off-by: John Snow
---
On Thu, 2022-03-17 at 10:05 +0100, Igor Mammedov wrote:
> re-sending reply as something went wrong with headers (I suspect Daniel's
> name formatting)
> and email got bounced back.
>
> On Wed, 16 Mar 2022 14:31:33 +
> David Woodhouse wrote:
>
> > On Wed, 2022-03-16 at 12:28 +0100, Igor Mamm
On 09.03.22 04:53, John Snow wrote:
This removes two more usages of qemu_img_pipe() and replaces them with
calls to qemu_img(), which provides better diagnostic information on
failure.
Signed-off-by: John Snow
---
tests/qemu-iotests/tests/remove-bitmap-from-backing | 6 +++---
1 file changed
On 09.03.22 04:53, John Snow wrote:
Add a qemu_img_map() function by analogy with qemu_img_measure(),
qemu_img_check(), and qemu_img_info() that all return JSON information.
Replace calls to qemu_img_pipe('map', '--output=json', ...) with this
new function, which provides better diagnostic infor
On 3/16/22 15:55, Cornelia Huck wrote:
Add 7.1 machine types for arm/i440fx/m68k/q35/s390x/spapr.
Signed-off-by: Cornelia Huck
---
hw/arm/virt.c | 9 -
hw/core/machine.c | 3 +++
hw/i386/pc.c | 3 +++
hw/i386/pc_piix.c | 14 ++
On 09.03.22 04:53, John Snow wrote:
Similar to other recent changes: use the qemu_img() invocation that
supports throwing loud, nasty exceptions when it fails for surprising
reasons.
(Why would "--help" ever fail? I don't know, but eliminating *all* calls
to qemu-img that do not go through qemu_
On 17/3/22 09:30, Thomas Huth wrote:
The vga_common_init() function currently cannot report errors to its
caller. But in the following patch, we'd need this possibility, so
let's change it to take an "Error **" as parameter for this.
Thanks for updating to return a boolean.
Reviewed-by: Philip
On 09.03.22 04:54, John Snow wrote:
qemu_img_pipe() discards the return code from qemu-img in favor of
returning just its output. Some tests using this function don't save,
log, or check the output either, though, which is unsafe.
Replace all of these calls with a checked version.
Tests affecte
On 3/16/22 10:53, marcandre.lur...@redhat.com wrote:
From: Marc-André Lureau
Replace a config-time define with a compile time condition
define (compatible with clang and gcc) that must be declared prior to
its usage. This avoids having a global configure time define, but also
prevents from bad
On 3/16/22 22:06, Peter Maydell wrote:
Speaking of 7.1, is cocoa currently completely broken, ie in need
of an interim fix for 7.0 ? If so, which of the various patches/approaches
should it be ?
To answer the first half of my question, yes, the cocoa UI is
currently completely broken as it asse
From: Philippe Mathieu-Daudé
Since v2:
- Extracted code movement in preliminary patch
v2:
https://lore.kernel.org/qemu-devel/20220316160300.85438-1-philippe.mathieu.da...@gmail.com/
v1:
https://lore.kernel.org/qemu-devel/20220307151004.578069-1-pbonz...@redhat.com/
Paolo Bonzini (1):
ui/coc
From: Paolo Bonzini
Simplify the initialization dance by running qemu_init() in the main
thread before the Cocoa event loop starts. The cocoa_display_init()
code that is post-applicationDidFinishLaunching: moves to the
application delegate itself, and the secondary thread only runs
the rest of q
On Thu, 17 Mar 2022 at 11:57, Philippe Mathieu-Daudé
wrote:
>
> From: Philippe Mathieu-Daudé
>
> Pure code movement in preparation for the next commit.
>
> Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Peter Maydell
thanks
-- PMM
On 17/3/22 12:56, Philippe Mathieu-Daudé wrote:
From: Paolo Bonzini
Simplify the initialization dance by running qemu_init() in the main
thread before the Cocoa event loop starts. The cocoa_display_init()
code that is post-applicationDidFinishLaunching: moves to the
application delegate itself
Just one change to aid future reading of the code, possibly. Move this
line:
On 3/16/22 17:03, Philippe Mathieu-Daudé wrote:
+qemu_event_init(&cbevent, false);
just before
+cbowner = [[QemuCocoaPasteboardTypeOwner alloc] init];
i.e. the place where it was before the patch, in cocoa
From: Philippe Mathieu-Daudé
Pure code movement in preparation for the next commit.
Signed-off-by: Philippe Mathieu-Daudé
---
ui/cocoa.m | 86 +++---
1 file changed, 43 insertions(+), 43 deletions(-)
diff --git a/ui/cocoa.m b/ui/cocoa.m
index cb
On Thu, 17 Mar 2022 at 11:57, Philippe Mathieu-Daudé
wrote:
>
> From: Paolo Bonzini
>
> Simplify the initialization dance by running qemu_init() in the main
> thread before the Cocoa event loop starts. The cocoa_display_init()
> code that is post-applicationDidFinishLaunching: moves to the
> app
On Wed, 2022-03-16 at 17:50 +, Daniel P. Berrangé wrote:
> On Wed, Mar 16, 2022 at 05:48:04PM +, David Edmondson wrote:
> > On Wednesday, 2022-03-16 at 16:05:01 GMT, Daniel P. Berrangé wrote:
> >
> > > On Wed, Mar 16, 2022 at 04:57:39PM +0100, Peter Krempa wrote:
> > > > On Tue, Mar 08, 20
On 09.03.22 04:54, John Snow wrote:
qemu_img_pipe calls blank their output when the command being run is a
'create' call and the command succeeds. Thus, the normative output for
this command in iotest 149 is to print a blank line. We can remove the
logging from this invocation and use a checked i
* Paolo Bonzini (pbonz...@redhat.com) wrote:
> On 3/15/22 16:55, Daniel P. Berrangé wrote:
> > Expecting maintainers to enforce a subset during code review feels
> > like it would be a tedious burden, that will inevitably let stuff
> > through because humans are fallible, especially when presented
On 17/03/2022 08.40, Markus Armbruster wrote:
Thomas Huth writes:
On 16/03/2022 15.16, Markus Armbruster wrote:
Thomas Huth writes:
On 16/03/2022 14.32, Philippe Mathieu-Daudé wrote:
On 16/3/22 14:24, Thomas Huth wrote:
The vga_common_init() function currently cannot report errors to its
On 09.03.22 04:54, John Snow wrote:
As part of moving all python iotest invocations of qemu-img onto a
single qemu_img() implementation, remove a few lingering uses of
qemu_img_pipe() from outside of iotests.py itself.
Several cases here rely on the knowledge that qemu_img_pipe() suppresses
*all
On 17/3/22 12:57, Paolo Bonzini wrote:
Just one change to aid future reading of the code, possibly. Move this
line:
On 3/16/22 17:03, Philippe Mathieu-Daudé wrote:
+ qemu_event_init(&cbevent, false);
just before
+ cbowner = [[QemuCocoaPasteboardTypeOwner alloc] init];
i.e. the place
On Thu, Mar 17, 2022 at 8:57 PM Philippe Mathieu-Daudé
wrote:
>
> From: Paolo Bonzini
>
> Simplify the initialization dance by running qemu_init() in the main
> thread before the Cocoa event loop starts. The cocoa_display_init()
> code that is post-applicationDidFinishLaunching: moves to the
> a
On Wed, Mar 16, 2022 at 12:08:33AM +0100, Paolo Bonzini wrote:
> On 3/15/22 16:55, Daniel P. Berrangé wrote:
> > Expecting maintainers to enforce a subset during code review feels
> > like it would be a tedious burden, that will inevitably let stuff
> > through because humans are fallible, especial
On Thu, Mar 17, 2022 at 8:57 PM Philippe Mathieu-Daudé
wrote:
>
> From: Paolo Bonzini
>
> Simplify the initialization dance by running qemu_init() in the main
> thread before the Cocoa event loop starts. The cocoa_display_init()
> code that is post-applicationDidFinishLaunching: moves to the
> a
From: Philippe Mathieu-Daudé
Posting v4 in case someone want to iterate.
Pending issue raised by Akihiko Odaki:
* this actually breaks the "runas" option with ui/cocoa.
[+NSApplication sharedApplication] calls issetugid() to see if
setgid() or setuid() is called before and calls exit() if
From: Philippe Mathieu-Daudé
Pure code movement in preparation for the next commit.
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
ui/cocoa.m | 86 +++---
1 file changed, 43 insertions(+), 43 deletions(-)
diff --git a/ui/c
From: Paolo Bonzini
Simplify the initialization dance by running qemu_init() in the main
thread before the Cocoa event loop starts. The cocoa_display_init()
code that is post-applicationDidFinishLaunching: moves to the
application delegate itself, and the secondary thread only runs
the rest of q
From: Philippe Mathieu-Daudé
See comments in commit 29cf16db23 ("buildsys: Help git-diff
adding .gitattributes config file") for details.
Signed-off-by: Philippe Mathieu-Daudé
---
.gitattributes | 1 +
1 file changed, 1 insertion(+)
diff --git a/.gitattributes b/.gitattributes
index 07f430e94
On 09.03.22 04:54, John Snow wrote:
Admittedly a mostly lateral move, but qemu_img() is essentially the
replacement for qemu_img_pipe_and_status(). It will give slightly better
diagnostics on crash.
Signed-off-by: John Snow
---
tests/qemu-iotests/iotests.py | 18 +-
1 file ch
Thomas Huth writes:
> On 17/03/2022 08.40, Markus Armbruster wrote:
>> Thomas Huth writes:
>>
>>> On 16/03/2022 15.16, Markus Armbruster wrote:
Thomas Huth writes:
> On 16/03/2022 14.32, Philippe Mathieu-Daudé wrote:
>> On 16/3/22 14:24, Thomas Huth wrote:
>>> The vga_com
On Thu, 17 Mar 2022 at 05:09, Richard Henderson
wrote:
>
> With TCG_OPF_COND_BRANCH, we extended the lifetimes of
> globals across extended basic blocks. This means that
> the liveness computed in pass 1 does not kill globals
> in the same way as normal temps.
>
> Introduce TYPE_EBB to match this
On 3/17/22 11:25 AM, Daniel P. Berrangé wrote:
> On Thu, Mar 17, 2022 at 11:12:11AM +0100, Claudio Fontana wrote:
>> On 3/16/22 1:17 PM, Claudio Fontana wrote:
>>> On 3/14/22 6:48 PM, Daniel P. Berrangé wrote:
On Mon, Mar 14, 2022 at 06:38:31PM +0100, Claudio Fontana wrote:
> On 3/14/22 6:
Hi Alex,
On 3/17/22 12:08 AM, Alex Williamson wrote:
> On Wed, 16 Mar 2022 21:29:51 +0100
> Eric Auger wrote:
>
>> The CRB command buffer currently is a RAM MemoryRegion and given
>> its base address alignment, it causes an error report on
>> vfio_listener_region_add(). This region could have bee
Hi,
I've been looking into converting some vmstate_register() calls to use dc->vmsd,
using as a base the docs in docs/devel/migration.rst. This doc mentions that we
can either register the vmsd by using vmstate_register() or we can use dc->vmsd
for qdev-based devices.
When trying to convert this
Introduce a separate function kvm_confidential_guest_init() for SEV (and
future TDX).
Signed-off-by: Xiaoyao Li
---
target/i386/kvm/kvm.c | 11 ++-
target/i386/sev.c | 1 -
target/i386/sev.h | 2 ++
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/target/i386/kvm
Introduce tdx-guest object which implements the interface of
CONFIDENTIAL_GUEST_SUPPORT, and will be used to create TDX VMs (TDs) by
qemu -machine ...,confidential-guest-support=tdx0 \
-object tdx-guset,id=tdx0
It has only one property 'attributes' with fixed value 0 and not
configur
Pull in recent TDX updates, which are not backwards compatible.
It's just to make this series runnable. It will be updated by script
scripts/update-linux-headers.sh
once TDX support is upstreamed in linux kernel.
Signed-off-by: Xiaoyao Li
Co-developed-by: Sean Christopherson
Signed-of
TDX VM requires VM type KVM_X86_TDX_VM to be passed to
kvm_ioctl(KVM_CREATE_VM). Hence implement mc->kvm_type() for i386
architecture.
If tdx-guest object is specified to confidential-guest-support, like,
qemu -machine ...,confidential-guest-support=tdx0 \
-object tdx-guest,id=tdx0,...
For TDX, the allowable CPUID configuration differs from what KVM
reports for KVM scope via KVM_GET_SUPPORTED_CPUID.
- Some CPUID bits are not supported for TDX VM while KVM reports the
support. Mask them off for TDX VM. e.g., CPUID_EXT_VMX, some PV
featues.
- The supported XCR0 and XSS bits n
Introduce kvm_arch_pre_create_vcpu(), to perform arch-dependent
work prior to create any vcpu. This is for i386 TDX because it needs
call TDX_INIT_VM before creating any vcpu.
Signed-off-by: Xiaoyao Li
---
accel/kvm/kvm-all.c| 7 +++
include/sysemu/kvm.h | 1 +
target/arm/kvm64.c |
It will need special handling for TDX VMs all around the QEMU.
Introduce is_tdx_vm() helper to query if it's a TDX VM.
Cache tdx_guest object thus no need to cast from ms->cgs every time.
Signed-off-by: Xiaoyao Li
---
target/i386/kvm/tdx.c | 10 ++
target/i386/kvm/tdx.h | 10 ++
From: Sean Christopherson
Move the architectural (for lack of a better term) CPUID leaf generation
to a separate helper so that the generation code can be reused by TDX,
which needs to generate a canonical VM-scoped configuration.
Signed-off-by: Sean Christopherson
Signed-off-by: Xiaoyao Li
--
This patch series aims to enable TDX support to allow creating and booting a
TD (TDX VM) with QEMU. It needs to work with corresponding KVM patch
for TDX [1]. You can find TDX related documents in [2].
You can also find this series in below repo in github:
https://github.com/intel/qemu-tdx.git
a
Add sept-ve-disable property for tdx-guest object. It's used to
configure bit 28 of TD attributes.
Signed-off-by: Xiaoyao Li
---
qapi/qom.json | 5 -
target/i386/kvm/tdx.c | 24
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/qapi/qom.json b/q
Invoke KVM_TDX_INIT in kvm_arch_pre_create_vcpu() that KVM_TDX_INIT
configures global TD state, e.g. the canonical CPUID config, and must
be executed prior to creating vCPUs.
Use kvm_x86_arch_cpuid() to setup the CPUID settings for TDX VM and
tie x86cpu->enable_pmu with TD's attributes.
Note, thi
Introduce tdx_kvm_init() and invoke it in kvm_confidential_guest_init()
if it's a TDX VM. More initialization will be added later.
Signed-off-by: Xiaoyao Li
---
target/i386/kvm/kvm.c | 15 ++-
target/i386/kvm/meson.build | 2 +-
target/i386/kvm/tdx-stub.c | 9 +
targ
Validate TD attributes with tdx_caps that fixed-0 bits must be zero and
fixed-1 bits must be set.
Besides, sanity check the attribute bits that have not been supported by
QEMU yet. e.g., debug bit, that it will be allowed in the future when debug
TD support lands in QEMU.
Signed-off-by: Xiaoyao L
From: Isaku Yamahata
TDX VM needs to boot with its specialized firmware, Trusted Domain
Virtual Firmware (TDVF). QEMU needs to parse TDVF and map it in TD
guest memory prior to running the TDX VM.
A TDVF Metadata in TDVF image describes the structure of firmware.
QEMU refers to it to setup memor
TDX only supports readonly for shared memory but not for private memory.
In the view of QEMU, it has no idea whether a memslot is used by shared
memory of private. Thus just mark kvm_readonly_mem_enabled to false to
TDX VM for simplicity.
Note, pflash has dependency on readonly capability from KV
KVM provides TDX capabilities via sub command KVM_TDX_CAPABILITIES of
IOCTL(KVM_MEMORY_ENCRYPT_OP). Get the capabilities when initializing
TDX context. It will be used to validate user's setting later.
Besides, introduce the interfaces to invoke TDX "ioctls" at different
scope (VM and VCPU) in pre
Add docs/system/i386/tdx.rst for TDX support, and add tdx in
confidential-guest-support.rst
Signed-off-by: Xiaoyao Li
---
docs/system/confidential-guest-support.rst | 1 +
docs/system/i386/tdx.rst | 103 +
docs/system/target-i386.rst| 1 +
The RAM of TDX VM can be classified into two types:
- TDX_RAM_UNACCEPTED: default type of TDX memory, which needs to be
accepted by TDX guest before it can be used and will be all-zeros
after being accepted.
- TDX_RAM_ADDED: the RAM that is ADD'ed to TD guest before running, and
can be
For every TDVF sections, QEMU needs to copy its content to guest
private memory via KVM API, to initialize them.
So add a field @mem_ptr to track the pointer of each TDVF sections.
BFV and CFV are firmware and loaded as plfash.
TEMP_MEM and TD_HOB always locate at guest RAM before 4G, specifical
For QEMU VMs, PKS is configured via CPUID_7_0_ECX_PKS and PMU is
configured by x86cpu->enable_pmu. Reuse the existing configuration
interface for TDX VMs.
Signed-off-by: Xiaoyao Li
---
target/i386/kvm/tdx.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/target/i386/kvm/tdx.c
KVM doesn't allow wirting to MSR_IA32_APICBASE for TDs.
Signed-off-by: Xiaoyao Li
---
target/i386/kvm/kvm.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
index 480c05d6c969..9c7eb3dea0a8 100644
--- a/target/i386/kvm/kvm.c
+++ b/target/i386
TDX vcpu needs to be initialized by SEAMCALL(TDH.VP.INIT) and KVM
provides vcpu level IOCTL KVM_TDX_INIT_VCPU for it.
KVM_TDX_INIT_VCPU needs the address of the HOB as input. Invoke it for
each vcpu after HOB list is created.
Signed-off-by: Xiaoyao Li
---
target/i386/kvm/tdx.c | 18
The TD HOB list is used to pass the information from VMM to TDVF. The TD
HOB must include PHIT HOB and Resource Descriptor HOB. More details can
be found in TDVF specification and PI specification.
Build the TD HOB in machine_init_done callback.
Co-developed-by: Isaku Yamahata
Signed-off-by: Isa
Reuse "-cpu,tsc-frequency=" to get user wanted tsc frequency and pass it
to KVM_TDX_INIT_VM.
Besides, sanity check the tsc frequency to be in the legal range and
legal granularity (required by TDX module).
Signed-off-by: Xiaoyao Li
---
target/i386/kvm/kvm.c | 8
target/i386/kvm/tdx.c
1 - 100 of 271 matches
Mail list logo