#
6c36bddf |
| 07-Jan-2019 |
Eduardo Habkost <ehabkost@redhat.com> |
machine: Use shorter format for GlobalProperty arrays
Instead of verbose arrays with 4 lines for each entry, make each entry take only one line. This makes long arrays that couldn't fit in the scre
machine: Use shorter format for GlobalProperty arrays
Instead of verbose arrays with 4 lines for each entry, make each entry take only one line. This makes long arrays that couldn't fit in the screen become short and readable.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20190107193020.21744-4-ehabkost@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
#
88cbe073 |
| 12-Dec-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
machine: move compat properties out of globals
Move the compat arrays inside functions that use them.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Igor Mammedov <imam
machine: move compat properties out of globals
Move the compat arrays inside functions that use them.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
#
ea9ce893 |
| 26-Nov-2018 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
hw: apply accel compat properties without touching globals
Instead of registering compat properties as globals, let's keep them in their own array, to avoid mixing with user globals.
Introduce obje
hw: apply accel compat properties without touching globals
Instead of registering compat properties as globals, let's keep them in their own array, to avoid mixing with user globals.
Introduce object_apply_global_props() function, to apply compatibility properties from a GPtrArray.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Cornelia Huck <cohuck@redhat.com> Acked-by: Eduardo Habkost <ehabkost@redhat.com>
show more ...
|
#
4473348a |
| 05-Mar-2018 |
Ross Lagerwall <ross.lagerwall@citrix.com> |
xen: Expect xenstore write to fail when restricted
Saving the current state to xenstore may fail when running restricted (in particular, after a migration). Therefore, don't report the error or exit
xen: Expect xenstore write to fail when restricted
Saving the current state to xenstore may fail when running restricted (in particular, after a migration). Therefore, don't report the error or exit when running restricted. Toolstacks that want to allow running QEMU restricted should instead make use of QMP events to listen for state changes.
CC: Ian Jackson <ian.jackson@eu.citrix.com> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com> Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com>
show more ...
|
#
4564e63f |
| 15-Sep-2017 |
Ian Jackson <ian.jackson@eu.citrix.com> |
xen: defer call to xen_restrict until just before os_setup_post
We need to restrict *all* the control fds that qemu opens. Looking in /proc/PID/fd shows there are many; their allocation seems scatt
xen: defer call to xen_restrict until just before os_setup_post
We need to restrict *all* the control fds that qemu opens. Looking in /proc/PID/fd shows there are many; their allocation seems scattered throughout Xen support code in qemu.
We must postpone the restrict call until roughly the same time as qemu changes its uid, chroots (if applicable), and so on.
There doesn't seem to be an appropriate hook already. The RunState change hook fires at different times depending on exactly what mode qemu is operating in.
And it appears that no-one but the Xen code wants a hook at this phase of execution. So, introduce a bare call to a new function xen_setup_post, just before os_setup_post. Also provide the appropriate stub for when Xen compilation is disabled.
We do the restriction before rather than after os_setup_post, because xen_restrict may need to open /dev/null, and os_setup_post might have called chroot.
Currently this does not work with migration, because when running as the Xen device model qemu needs to signal to the toolstack that it is ready. It currently does this using xenstore, and for incoming migration (but not for ordinary startup) that happens after os_setup_post.
It is correct that this happens late: we want the incoming migration stream to be processed by a restricted qemu. The fix for this will be to do the startup notification a different way, without using xenstore. (QMP is probably a reasonable choice.)
So for now this restriction feature cannot be used in conjunction with migration. (Note that this is not a regression in this patch, because previously the -xen-restrict-domid call was, in fact, simply ineffective!) We will revisit this in the Xen 4.11 release cycle.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com> CC: Paolo Bonzini <pbonzini@redhat.com> (maintainer:X86) CC: Richard Henderson <rth@twiddle.net> (maintainer:X86) CC: Eduardo Habkost <ehabkost@redhat.com> (maintainer:X86) CC: Michael S. Tsirkin <mst@redhat.com> (supporter:PC) Acked-by: Anthony PERARD <anthony.perard@citrix.com>
show more ...
|
#
abb297ed |
| 01-Feb-2018 |
Markus Armbruster <armbru@redhat.com> |
Include qmp-commands.h exactly where needed
Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Mes
Include qmp-commands.h exactly where needed
Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20180201111846.21846-7-armbru@redhat.com> [OSX breakage fixed]
show more ...
|
#
47d17c0a |
| 03-Feb-2018 |
Alistair Francis <alistair.francis@xilinx.com> |
hw/xen*: Replace fprintf(stderr, "*\n" with error_report()
Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then comp
hw/xen*: Replace fprintf(stderr, "*\n" with error_report()
Replace a large number of the fprintf(stderr, "*\n" calls with error_report(). The functions were renamed with these commands and then compiler issues where manually fixed.
find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N;N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} + find ./* -type f -exec sed -i \ 'N; {s|fprintf(stderr, "\(.*\)\\n"\(.*\));|error_report("\1"\2);|Ig}' \ {} +
Some lines where then manually tweaked to pass checkpatch.
xen_pt_log() was left with an fprintf(stderr,
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Cc: Stefano Stabellini <sstabellini@kernel.org> Cc: Anthony Perard <anthony.perard@citrix.com>
Conversions that aren't followed by exit() dropped, because they might be inappropriate.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20180203084315.20497-13-armbru@redhat.com>
show more ...
|
#
15c38503 |
| 27-Jun-2017 |
Peter Xu <peterx@redhat.com> |
migration: move skip_section_footers
Move it into MigrationState, revert its meaning and renaming it to send_section_footer, with a property bound to it. Same trick is played like previous patches.
migration: move skip_section_footers
Move it into MigrationState, revert its meaning and renaming it to send_section_footer, with a property bound to it. Same trick is played like previous patches.
Removing savevm_skip_section_footers().
Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-9-git-send-email-peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
71dd4c1a |
| 27-Jun-2017 |
Peter Xu <peterx@redhat.com> |
migration: move skip_configuration out
It was in SaveState but now moved to MigrationState altogether, reverted its meaning, then renamed to "send_configuration". Again, using HW_COMPAT_2_3 for old
migration: move skip_configuration out
It was in SaveState but now moved to MigrationState altogether, reverted its meaning, then renamed to "send_configuration". Again, using HW_COMPAT_2_3 for old PC/SPAPR machines, and accel_register_prop() for xen_init().
Removing savevm_skip_configuration().
Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-8-git-send-email-peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
5272298c |
| 27-Jun-2017 |
Peter Xu <peterx@redhat.com> |
migration: move global_state.optional out
Put it into MigrationState then we can use the properties to specify whether to enable storing global state.
Removing global_state_set_optional() since now
migration: move global_state.optional out
Put it into MigrationState then we can use the properties to specify whether to enable storing global state.
Removing global_state_set_optional() since now we can use HW_COMPAT_2_3 for x86/power, and AccelClass.global_props for Xen.
Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Peter Xu <peterx@redhat.com> Message-Id: <1498536619-14548-6-git-send-email-peterx@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
show more ...
|
#
c4b63b7c |
| 24-Apr-2017 |
Juan Quintela <quintela@redhat.com> |
migration: Move remaining exported functions to migration/misc.h
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Peter Xu <peter
migration: Move remaining exported functions to migration/misc.h
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Peter Xu <peterx@redhat.com>
show more ...
|
#
84a899de |
| 24-Apr-2017 |
Juan Quintela <quintela@redhat.com> |
migration: create global_state.c
It don't belong anywhere else, just the global state where everybody can stick other things.
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philipp
migration: create global_state.c
It don't belong anywhere else, just the global state where everybody can stick other things.
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Laurent Vivier <lvivier@redhat.com>
show more ...
|
#
8228e353 |
| 26-Jan-2017 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
chardev: move headers to include/chardev
So they are all in one place. The following patch will move serial & parallel declarations to the respective headers.
Signed-off-by: Marc-André Lureau <marc
chardev: move headers to include/chardev
So they are all in one place. The following patch will move serial & parallel declarations to the respective headers.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
show more ...
|
#
315dd72d |
| 14-Dec-2016 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
xen: use a better chardev type check
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
|
#
56e2cd24 |
| 05-Apr-2017 |
Anthony Xu <anthony.xu@intel.com> |
move xen-common.c to hw/xen/
move xen-common.c to hw/xen/
Signed-off -by: Anthony Xu <anthony.xu@intel.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
|
#
d655f34e |
| 07-Mar-2017 |
Paul Durrant <paul.durrant@citrix.com> |
xen: use libxendevicemodel when available
This patch modifies the wrapper functions in xen_common.h to use the new xendevicemodel interface if it is available along with compatibility code to use th
xen: use libxendevicemodel when available
This patch modifies the wrapper functions in xen_common.h to use the new xendevicemodel interface if it is available along with compatibility code to use the old libxenctrl interface if it is not.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> Reviewed-by: Anthony Perard <anthony.perard@citrix.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
show more ...
|
#
260cabed |
| 07-Mar-2017 |
Paul Durrant <paul.durrant@citrix.com> |
xen: make use of xen_xc implicit in xen_common.h inlines
Doing this will make the transition to using the new libxendevicemodel interface less intrusive on the callers of these functions, since usin
xen: make use of xen_xc implicit in xen_common.h inlines
Doing this will make the transition to using the new libxendevicemodel interface less intrusive on the callers of these functions, since using the new library will require a change of handle.
NOTE: The patch also moves the 'externs' for xen_xc and xen_fmem from xen_backend.h to xen_common.h, and the declarations from xen_backend.c to xen-common.c, which is where they belong.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Reviewed-by: Anthony Perard <anthony.perard@citrix.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
show more ...
|
#
0ec7b3e7 |
| 07-Dec-2016 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
char: rename CharDriverState Chardev
Pick a uniform chardev type name.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paol
char: rename CharDriverState Chardev
Pick a uniform chardev type name.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
804ba7c1 |
| 08-Nov-2016 |
Anthony PERARD <anthony.perard@citrix.com> |
xen: Fix xenpv machine initialisation
When using QEMU for Xen PV guest, QEMU abort with: xen-common.c:118:xen_init: Object 0x7f2b8325dcb0 is not an instance of type generic-pc-machine
This is becau
xen: Fix xenpv machine initialisation
When using QEMU for Xen PV guest, QEMU abort with: xen-common.c:118:xen_init: Object 0x7f2b8325dcb0 is not an instance of type generic-pc-machine
This is because the machine 'xenpv' also use accel=xen. Moving the code to xen_hvm_init() fix the issue.
This fix 021746c131cdfeab9d82ff918795a9f18d20d7ae.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
show more ...
|
#
021746c1 |
| 01-Nov-2016 |
Wei Liu <wei.liu2@citrix.com> |
PCMachineState: introduce acpi_build_enabled field
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself su
PCMachineState: introduce acpi_build_enabled field
Introduce this field to control whether ACPI build is enabled by a particular machine or accelerator.
It defaults to true if the machine itself supports ACPI build. Xen accelerator will disable it because Xen is in charge of building ACPI tables for the guest.
Signed-off-by: Wei Liu <wei.liu2@citrix.com> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> Reviewed-by: Stefano Stabellini <sstabellini@kernel.org> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Tested-by: Sander Eikelenboom <linux@eikelenboom.it>
show more ...
|
#
96c77dba |
| 25-Oct-2016 |
Emil Condrea <emilcondrea@gmail.com> |
xen: Rename xen_be_printf to xen_pv_printf
Prepare xen_be_printf to be used by both backend and frontends: * xen_be_printf -> xen_pv_printf
Signed-off-by: Emil Condrea <emilcondrea@gmail.com> Sign
xen: Rename xen_be_printf to xen_pv_printf
Prepare xen_be_printf to be used by both backend and frontends: * xen_be_printf -> xen_pv_printf
Signed-off-by: Emil Condrea <emilcondrea@gmail.com> Signed-off-by: Stefano Stabellini <sstabellini@kernel.org> Signed-off-by: Quan Xu <xuquan8@huawei.com> Acked-by: Anthony PERARD <anthony.perard@citrix.com>
show more ...
|
#
81daba58 |
| 10-Feb-2016 |
Ian Campbell <ian.campbell@citrix.com> |
xen: drop XenXC and associated interface wrappers
Now that 4.2 and earlier are no longer supported "xc_interface *" is always the right type for the xc interface handle.
With this we can also simpl
xen: drop XenXC and associated interface wrappers
Now that 4.2 and earlier are no longer supported "xc_interface *" is always the right type for the xc interface handle.
With this we can also simplify the handling of the xenforeignmemory compatibility wrapper by making xenforeignmemory_handle == xc_interface, instead of an xc_interface* and remove various uses of & and *h.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
show more ...
|
#
21cbfe5f |
| 26-Jan-2016 |
Peter Maydell <peter.maydell@linaro.org> |
xen: Clean up includes
Clean up includes so that osdep.h is included first and headers which it implies are not included manually.
This commit was created with scripts/clean-includes.
Signed-off-b
xen: Clean up includes
Clean up includes so that osdep.h is included first and headers which it implies are not included manually.
This commit was created with scripts/clean-includes.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1453832250-766-14-git-send-email-peter.maydell@linaro.org
show more ...
|
#
e0cb42ae |
| 15-Jan-2016 |
Ian Campbell <ian.campbell@citrix.com> |
xen: Switch uses of xc_map_foreign_{pages,bulk} to use libxenforeignmemory API.
In Xen 4.7 we are refactoring parts libxenctrl into a number of separate libraries which will provide backward and for
xen: Switch uses of xc_map_foreign_{pages,bulk} to use libxenforeignmemory API.
In Xen 4.7 we are refactoring parts libxenctrl into a number of separate libraries which will provide backward and forward API and ABI compatiblity.
One such library will be libxenforeignmemory which provides access to privileged foreign mappings and which will provide an interface equivalent to xc_map_foreign_{pages,bulk}.
The new xenforeignmemory_map() function behaves like xc_map_foreign_pages() when the err argument is NULL and like xc_map_foreign_bulk() when err is non-NULL, which maps into the shim here onto checking err == NULL and calling the appropriate old function.
Note that xenforeignmemory_map() takes the number of pages before the arrays themselves, in order to support potentially future use of variable-length-arrays in the prototype (in the future, when Xen's baseline toolchain requirements are new enough to ensure VLAs are supported).
In preparation for adding support for libxenforeignmemory add support to the <=4.0 and <=4.6 compat code in xen_common.h to allow us to switch to using the new API. These shims will disappear for versions of Xen which include libxenforeignmemory.
Since libxenforeignmemory will have its own handle type but for <= 4.6 the functionality is provided by using a libxenctrl handle we introduce a new global xen_fmem alongside the existing xen_xc. In fact we make xen_fmem a pointer to the existing xen_xc, which then works correctly with both <=4.0 (xc handle is an int) and <=4.6 (xc handle is a pointer). In the latter case xen_fmem is actually a double indirect pointer, but it all falls out in the wash.
Unlike libxenctrl libxenforeignmemory has an explicit unmap function, rather than just specifying that munmap should be used, so the unmap paths are updated to use xenforeignmemory_unmap, which is a shim for munmap on these versions of xen. The mappings in xen-hvm.c do not appear to be unmapped (which makes sense for a qemu-dm process)
In fb_disconnect this results in a change from simply mmap over the existing mapping (with an implicit munmap) to expliclty unmapping with xenforeignmemory_unmap and then mapping the required anonymous memory in the same hole. I don't think this is a problem since any other thread which was racily touching this region would already be running the risk of hitting the mapping halfway through the call. If this is thought to be a problem then we could consider adding an extra API to the libxenforeignmemory interface to replace a foreign mapping with anonymous shared memory, but I'd prefer not to.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Reviewed-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
show more ...
|
#
8c6dc68f |
| 03-Aug-2015 |
Anthony PERARD <anthony.perard@citrix.com> |
migration: Fix regression for xenfv and pc,accel=xen machine.
This fix migration from the same QEMU version and from previous QEMU version.
>From the global state section, we don't need runstate wi
migration: Fix regression for xenfv and pc,accel=xen machine.
This fix migration from the same QEMU version and from previous QEMU version.
>From the global state section, we don't need runstate with Xen. Right now, the way the Xen toolstack knows when QEMU is ready is when QEMU reach "running" runstate.
The configuration section and the section footers are not going to be present in previous version of QEMU with xenfv machine, so we skip them.
The Xen toolstack libxenlight does not specify a particular version of the 'pc' machine, so migration from older version of QEMU used by Xen to newer one would break due to missing "configuration" section and section footers.
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
show more ...
|