9621add6e3
support qcow2, so blktap is needed to support domains with 'tap:qcow2' disk configurations. modified tmp-initscript-modprobe.patch - bnc#809203 - xen.efi isn't signed with SUSE Secure Boot key xen.spec - Fix adding managed PCI device to an inactive domain modified xen-managed-pci-device.patch - bnc#805094 - xen hot plug attach/detach fails modified blktap-pv-cdrom.patch - bnc# 802690 - domain locking can prevent a live migration from completing modified xend-domain-lock.patch - bnc#797014 - no way to control live migrations 26675-tools-xentoollog_update_tty_detection_in_stdiostream_progress.patch xen.migrate.tools-xc_print_messages_from_xc_save_with_xc_report.patch xen.migrate.tools-xc_document_printf_calls_in_xc_restore.patch xen.migrate.tools-xc_rework_xc_save.cswitch_qemu_logdirty.patch xen.migrate.tools_set_migration_constraints_from_cmdline.patch xen.migrate.tools_add_xm_migrate_--log_progress_option.patch - Upstream patches from Jan 26585-x86-mm-Take-the-p2m-lock-even-in-shadow-mode.patch 26595-x86-nhvm-properly-clean-up-after-failure-to-set-up-all-vCPU-s.patch 26601-honor-ACPI-v4-FADT-flags.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=232
79 lines
2.4 KiB
Diff
79 lines
2.4 KiB
Diff
# Commit 7ffc9779aa5120c5098d938cb88f69a1dda9a0fe
|
|
# Date 2013-03-04 10:16:04 +0100
|
|
# Author Jan Beulich <jbeulich@suse.com>
|
|
# Committer Jan Beulich <jbeulich@suse.com>
|
|
x86: make certain memory sub-ops return valid values
|
|
|
|
When a domain's shared info field "max_pfn" is zero,
|
|
domain_get_maximum_gpfn() so far returned ULONG_MAX, which
|
|
do_memory_op() in turn converted to -1 (i.e. -EPERM). Make the former
|
|
always return a sensible number (i.e. zero if the field was zero) and
|
|
have the latter no longer truncate return values.
|
|
|
|
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
|
Acked-by: Tim Deegan <tim@xen.org>
|
|
|
|
--- a/xen/arch/x86/mm.c
|
|
+++ b/xen/arch/x86/mm.c
|
|
@@ -437,7 +437,7 @@ unsigned long domain_get_maximum_gpfn(st
|
|
if ( is_hvm_domain(d) )
|
|
return p2m_get_hostp2m(d)->max_mapped_pfn;
|
|
/* NB. PV guests specify nr_pfns rather than max_pfn so we adjust here. */
|
|
- return arch_get_max_pfn(d) - 1;
|
|
+ return (arch_get_max_pfn(d) ?: 1) - 1;
|
|
}
|
|
|
|
void share_xen_page_with_guest(
|
|
--- a/xen/common/compat/memory.c
|
|
+++ b/xen/common/compat/memory.c
|
|
@@ -15,7 +15,8 @@ CHECK_TYPE(domid);
|
|
|
|
int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE(void) compat)
|
|
{
|
|
- int rc, split, op = cmd & MEMOP_CMD_MASK;
|
|
+ int split, op = cmd & MEMOP_CMD_MASK;
|
|
+ long rc;
|
|
unsigned int start_extent = cmd >> MEMOP_EXTENT_SHIFT;
|
|
|
|
do
|
|
@@ -204,7 +205,7 @@ int compat_memory_op(unsigned int cmd, X
|
|
|
|
rc = do_memory_op(cmd, nat.hnd);
|
|
if ( rc < 0 )
|
|
- return rc;
|
|
+ break;
|
|
|
|
cmd = 0;
|
|
if ( hypercall_xlat_continuation(&cmd, 0x02, nat.hnd, compat) )
|
|
@@ -318,5 +319,11 @@ int compat_memory_op(unsigned int cmd, X
|
|
__HYPERVISOR_memory_op, "ih", cmd, compat);
|
|
} while ( split > 0 );
|
|
|
|
+ if ( unlikely(rc > INT_MAX) )
|
|
+ return INT_MAX;
|
|
+
|
|
+ if ( unlikely(rc < INT_MIN) )
|
|
+ return INT_MIN;
|
|
+
|
|
return rc;
|
|
}
|
|
--- a/xen/common/memory.c
|
|
+++ b/xen/common/memory.c
|
|
@@ -532,14 +532,13 @@ static long memory_exchange(XEN_GUEST_HA
|
|
long do_memory_op(unsigned long cmd, XEN_GUEST_HANDLE(void) arg)
|
|
{
|
|
struct domain *d;
|
|
- int rc, op;
|
|
+ long rc;
|
|
unsigned int address_bits;
|
|
unsigned long start_extent;
|
|
struct xen_memory_reservation reservation;
|
|
struct memop_args args;
|
|
domid_t domid;
|
|
-
|
|
- op = cmd & MEMOP_CMD_MASK;
|
|
+ int op = cmd & MEMOP_CMD_MASK;
|
|
|
|
switch ( op )
|
|
{
|