Pull xen updates from Juergen Gross: - a series to speed up the boot of Xen PV guests - some cleanups in Xen related code - replacement of license texts with the appropriate SPDX headers and fixing of wrong SPDX headers in Xen header files - a small series making paravirtualized interrupt masking much simpler and at the same time removing complaints of objtool - a fix for Xen ballooning hogging workqueues for too long - enablement of the Xen pciback driver for Arm - some further small fixes/enhancements * tag 'for-linus-5.16b-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: (22 commits) xen/balloon: fix unused-variable warning xen/balloon: rename alloc/free_xenballooned_pages xen/balloon: add late_initcall_sync() for initial ballooning done x86/xen: remove 32-bit awareness from startup_xen xen: remove highmem remnants xen: allow pv-only hypercalls only with CONFIG_XEN_PV x86/xen: remove 32-bit pv leftovers xen-pciback: allow compiling on other archs than x86 x86/xen: switch initial pvops IRQ functions to dummy ones x86/xen: remove xen_have_vcpu_info_placement flag x86/pvh: add prototype for xen_pvh_init() xen: Fix implicit type conversion xen: fix wrong SPDX headers of Xen related headers xen/pvcalls-back: Remove redundant 'flush_workqueue()' calls x86/xen: Remove redundant irq_enter/exit() invocations xen-pciback: Fix return in pm_ctrl_init() xen/x86: restrict PV Dom0 identity mapping xen/x86: there's no highmem anymore in PV mode xen/x86: adjust handling of the L3 user vsyscall special page table xen/x86: adjust xen_set_fixmap() ...
Unified · Split
| @@ -6379,6 +6379,13 @@ · 6378 unmodified lines | ||
| 6379 | 6379 | improve timer resolution at the expense of processing |
| 6380 | 6380 | more timer interrupts. |
| 6381 | 6381 | |
| 6382 | + xen.balloon_boot_timeout= [XEN] | |
| 6383 | + The time (in seconds) to wait before giving up to boot | |
| 6384 | + in case initial ballooning fails to free enough memory. | |
| 6385 | + Applies only when running as HVM or PVH guest and | |
| 6386 | + started with less memory configured than allowed at | |
| 6387 | + max. Default is 180. | |
| 6388 | + | |
| 6382 | 6389 | xen.event_eoi_delay= [XEN] |
| 6383 | 6390 | How long to delay EOI handling in case of event |
| 6384 | 6391 | storms (jiffies). Default is 10. |
| @@ -442,7 +442,6 @@ EXPORT_SYMBOL_GPL(HYPERVISOR_hvm_op); · 441 unmodified lines | ||
| 442 | 442 | EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op); |
| 443 | 443 | EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op); |
| 444 | 444 | EXPORT_SYMBOL_GPL(HYPERVISOR_vcpu_op); |
| 445 | −EXPORT_SYMBOL_GPL(HYPERVISOR_tmem_op); | |
| 446 | 445 | EXPORT_SYMBOL_GPL(HYPERVISOR_platform_op_raw); |
| 447 | 446 | EXPORT_SYMBOL_GPL(HYPERVISOR_multicall); |
| 448 | 447 | EXPORT_SYMBOL_GPL(HYPERVISOR_vm_assist); |
| @@ -88,7 +88,6 @@ HYPERCALL2(hvm_op); · 87 unmodified lines | ||
| 88 | 88 | HYPERCALL2(memory_op); |
| 89 | 89 | HYPERCALL2(physdev_op); |
| 90 | 90 | HYPERCALL3(vcpu_op); |
| 91 | −HYPERCALL1(tmem_op); | |
| 92 | 91 | HYPERCALL1(platform_op_raw); |
| 93 | 92 | HYPERCALL2(multicall); |
| 94 | 93 | HYPERCALL2(vm_assist); |
| @@ -80,7 +80,6 @@ HYPERCALL2(hvm_op); · 79 unmodified lines | ||
| 80 | 80 | HYPERCALL2(memory_op); |
| 81 | 81 | HYPERCALL2(physdev_op); |
| 82 | 82 | HYPERCALL3(vcpu_op); |
| 83 | −HYPERCALL1(tmem_op); | |
| 84 | 83 | HYPERCALL1(platform_op_raw); |
| 85 | 84 | HYPERCALL2(multicall); |
| 86 | 85 | HYPERCALL2(vm_assist); |
| @@ -577,7 +577,9 @@ void paravirt_leave_lazy_mmu(void); · 576 unmodified lines | ||
| 577 | 577 | void paravirt_flush_lazy_mmu(void); |
| 578 | 578 | |
| 579 | 579 | void _paravirt_nop(void); |
| 580 | +void paravirt_BUG(void); | |
| 580 | 581 | u64 _paravirt_ident_64(u64); |
| 582 | +unsigned long paravirt_ret0(void); | |
| 581 | 583 | |
| 582 | 584 | #define paravirt_nop ((void *)_paravirt_nop) |
| 583 | 585 | |
| @@ -248,6 +248,7 @@ privcmd_call(unsigned int call, · 247 unmodified lines | ||
| 248 | 248 | return res; |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | +#ifdef CONFIG_XEN_PV | |
| 251 | 252 | static inline int |
| 252 | 253 | HYPERVISOR_set_trap_table(struct trap_info *table) |
| 253 | 254 | { |
| @@ -280,6 +281,107 @@ HYPERVISOR_callback_op(int cmd, void *arg) · 26 unmodified lines | ||
| 280 | 281 | return _hypercall2(int, callback_op, cmd, arg); |
| 281 | 282 | } |
| 282 | 283 | |
| 284 | +static inline int | |
| 285 | +HYPERVISOR_set_debugreg(int reg, unsigned long value) | |
| 286 | +{ | |
| 287 | + return _hypercall2(int, set_debugreg, reg, value); | |
| 288 | +} | |
| 289 | + | |
| 290 | +static inline unsigned long | |
| 291 | +HYPERVISOR_get_debugreg(int reg) | |
| 292 | +{ | |
| 293 | + return _hypercall1(unsigned long, get_debugreg, reg); | |
| 294 | +} | |
| 295 | + | |
| 296 | +static inline int | |
| 297 | +HYPERVISOR_update_descriptor(u64 ma, u64 desc) | |
| 298 | +{ | |
| 299 | + return _hypercall2(int, update_descriptor, ma, desc); | |
| 300 | +} | |
| 301 | + | |
| 302 | +static inline int | |
| 303 | +HYPERVISOR_update_va_mapping(unsigned long va, pte_t new_val, | |
| 304 | + unsigned long flags) | |
| 305 | +{ | |
| 306 | + return _hypercall3(int, update_va_mapping, va, new_val.pte, flags); | |
| 307 | +} | |
| 308 | + | |
| 309 | +static inline int | |
| 310 | +HYPERVISOR_set_segment_base(int reg, unsigned long value) | |
| 311 | +{ | |
| 312 | + return _hypercall2(int, set_segment_base, reg, value); | |
| 313 | +} | |
| 314 | + | |
| 315 | +static inline void | |
| 316 | +MULTI_fpu_taskswitch(struct multicall_entry *mcl, int set) | |
| 317 | +{ | |
| 318 | + mcl->op = __HYPERVISOR_fpu_taskswitch; | |
| 319 | + mcl->args[0] = set; | |
| 320 | + | |
| 321 | + trace_xen_mc_entry(mcl, 1); | |
| 322 | +} | |
| 323 | + | |
| 324 | +static inline void | |
| 325 | +MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va, | |
| 326 | + pte_t new_val, unsigned long flags) | |
| 327 | +{ | |
| 328 | + mcl->op = __HYPERVISOR_update_va_mapping; | |
| 329 | + mcl->args[0] = va; | |
| 330 | + mcl->args[1] = new_val.pte; | |
| 331 | + mcl->args[2] = flags; | |
| 332 | + | |
| 333 | + trace_xen_mc_entry(mcl, 3); | |
| 334 | +} | |
| 335 | + | |
| 336 | +static inline void | |
| 337 | +MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr, | |
| 338 | + struct desc_struct desc) | |
| 339 | +{ | |
| 340 | + mcl->op = __HYPERVISOR_update_descriptor; | |
| 341 | + mcl->args[0] = maddr; | |
| 342 | + mcl->args[1] = *(unsigned long *)&desc; | |
| 343 | + | |
| 344 | + trace_xen_mc_entry(mcl, 2); | |
| 345 | +} | |
| 346 | + | |
| 347 | +static inline void | |
| 348 | +MULTI_mmu_update(struct multicall_entry *mcl, struct mmu_update *req, | |
| 349 | + int count, int *success_count, domid_t domid) | |
| 350 | +{ | |
| 351 | + mcl->op = __HYPERVISOR_mmu_update; | |
| 352 | + mcl->args[0] = (unsigned long)req; | |
| 353 | + mcl->args[1] = count; | |
| 354 | + mcl->args[2] = (unsigned long)success_count; | |
| 355 | + mcl->args[3] = domid; | |
| 356 | + | |
| 357 | + trace_xen_mc_entry(mcl, 4); | |
| 358 | +} | |
| 359 | + | |
| 360 | +static inline void | |
| 361 | +MULTI_mmuext_op(struct multicall_entry *mcl, struct mmuext_op *op, int count, | |
| 362 | + int *success_count, domid_t domid) | |
| 363 | +{ | |
| 364 | + mcl->op = __HYPERVISOR_mmuext_op; | |
| 365 | + mcl->args[0] = (unsigned long)op; | |
| 366 | + mcl->args[1] = count; | |
| 367 | + mcl->args[2] = (unsigned long)success_count; | |
| 368 | + mcl->args[3] = domid; | |
| 369 | + | |
| 370 | + trace_xen_mc_entry(mcl, 4); | |
| 371 | +} | |
| 372 | + | |
| 373 | +static inline void | |
| 374 | +MULTI_stack_switch(struct multicall_entry *mcl, | |
| 375 | + unsigned long ss, unsigned long esp) | |
| 376 | +{ | |
| 377 | + mcl->op = __HYPERVISOR_stack_switch; | |
| 378 | + mcl->args[0] = ss; | |
| 379 | + mcl->args[1] = esp; | |
| 380 | + | |
| 381 | + trace_xen_mc_entry(mcl, 2); | |
| 382 | +} | |
| 383 | +#endif | |
| 384 | + | |
| 283 | 385 | static inline int |
| 284 | 386 | HYPERVISOR_sched_op(int cmd, void *arg) |
| 285 | 387 | { |
| @@ -308,26 +410,6 @@ HYPERVISOR_platform_op(struct xen_platform_op *op) · 22 unmodified lines | ||
| 308 | 410 | return _hypercall1(int, platform_op, op); |
| 309 | 411 | } |
| 310 | 412 | |
| 311 | −static __always_inline int | |
| 312 | −HYPERVISOR_set_debugreg(int reg, unsigned long value) | |
| 313 | −{ | |
| 314 | − return _hypercall2(int, set_debugreg, reg, value); | |
| 315 | −} | |
| 316 | − | |
| 317 | −static __always_inline unsigned long | |
| 318 | −HYPERVISOR_get_debugreg(int reg) | |
| 319 | −{ | |
| 320 | − return _hypercall1(unsigned long, get_debugreg, reg); | |
| 321 | −} | |
| 322 | − | |
| 323 | −static inline int | |
| 324 | −HYPERVISOR_update_descriptor(u64 ma, u64 desc) | |
| 325 | −{ | |
| 326 | − if (sizeof(u64) == sizeof(long)) | |
| 327 | − return _hypercall2(int, update_descriptor, ma, desc); | |
| 328 | − return _hypercall4(int, update_descriptor, ma, ma>>32, desc, desc>>32); | |
| 329 | −} | |
| 330 | − | |
| 331 | 413 | static inline long |
| 332 | 414 | HYPERVISOR_memory_op(unsigned int cmd, void *arg) |
| 333 | 415 | { |
| @@ -340,18 +422,6 @@ HYPERVISOR_multicall(void *call_list, uint32_t nr_calls) · 6 unmodified lines | ||
| 340 | 422 | return _hypercall2(int, multicall, call_list, nr_calls); |
| 341 | 423 | } |
| 342 | 424 | |
| 343 | −static inline int | |
| 344 | −HYPERVISOR_update_va_mapping(unsigned long va, pte_t new_val, | |
| 345 | − unsigned long flags) | |
| 346 | −{ | |
| 347 | − if (sizeof(new_val) == sizeof(long)) | |
| 348 | − return _hypercall3(int, update_va_mapping, va, | |
| 349 | − new_val.pte, flags); | |
| 350 | − else | |
| 351 | − return _hypercall4(int, update_va_mapping, va, | |
| 352 | − new_val.pte, new_val.pte >> 32, flags); | |
| 353 | −} | |
| 354 | − | |
| 355 | 425 | static inline int |
| 356 | 426 | HYPERVISOR_event_channel_op(int cmd, void *arg) |
| 357 | 427 | { |
| @@ -394,14 +464,6 @@ HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args) · 36 unmodified lines | ||
| 394 | 464 | return _hypercall3(int, vcpu_op, cmd, vcpuid, extra_args); |
| 395 | 465 | } |
| 396 | 466 | |
| 397 | −#ifdef CONFIG_X86_64 | |
| 398 | −static inline int | |
| 399 | −HYPERVISOR_set_segment_base(int reg, unsigned long value) | |
| 400 | −{ | |
| 401 | − return _hypercall2(int, set_segment_base, reg, value); | |
| 402 | −} | |
| 403 | −#endif | |
| 404 | − | |
| 405 | 467 | static inline int |
| 406 | 468 | HYPERVISOR_suspend(unsigned long start_info_mfn) |
| 407 | 469 | { |
| @@ -422,13 +484,6 @@ HYPERVISOR_hvm_op(int op, void *arg) · 14 unmodified lines | ||
| 422 | 484 | return _hypercall2(unsigned long, hvm_op, op, arg); |
| 423 | 485 | } |
| 424 | 486 | |
| 425 | −static inline int | |
| 426 | −HYPERVISOR_tmem_op( | |
| 427 | − struct tmem_op *op) | |
| 428 | −{ | |
| 429 | − return _hypercall1(int, tmem_op, op); | |
| 430 | −} | |
| 431 | − | |
| 432 | 487 | static inline int |
| 433 | 488 | HYPERVISOR_xenpmu_op(unsigned int op, void *arg) |
| 434 | 489 | { |
| @@ -446,88 +501,4 @@ HYPERVISOR_dm_op( · 11 unmodified lines | ||
| 446 | 501 | return ret; |
| 447 | 502 | } |
| 448 | 503 | |
| 449 | −static inline void | |
| 450 | −MULTI_fpu_taskswitch(struct multicall_entry *mcl, int set) | |
| 451 | −{ | |
| 452 | − mcl->op = __HYPERVISOR_fpu_taskswitch; | |
| 453 | − mcl->args[0] = set; | |
| 454 | − | |
| 455 | − trace_xen_mc_entry(mcl, 1); | |
| 456 | −} | |
| 457 | − | |
| 458 | −static inline void | |
| 459 | −MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va, | |
| 460 | − pte_t new_val, unsigned long flags) | |
| 461 | −{ | |
| 462 | − mcl->op = __HYPERVISOR_update_va_mapping; | |
| 463 | − mcl->args[0] = va; | |
| 464 | − if (sizeof(new_val) == sizeof(long)) { | |
| 465 | − mcl->args[1] = new_val.pte; | |
| 466 | − mcl->args[2] = flags; | |
| 467 | − } else { | |
| 468 | − mcl->args[1] = new_val.pte; | |
| 469 | − mcl->args[2] = new_val.pte >> 32; | |
| 470 | − mcl->args[3] = flags; | |
| 471 | − } | |
| 472 | − | |
| 473 | − trace_xen_mc_entry(mcl, sizeof(new_val) == sizeof(long) ? 3 : 4); | |
| 474 | −} | |
| 475 | − | |
| 476 | −static inline void | |
| 477 | −MULTI_update_descriptor(struct multicall_entry *mcl, u64 maddr, | |
| 478 | − struct desc_struct desc) | |
| 479 | −{ | |
| 480 | − mcl->op = __HYPERVISOR_update_descriptor; | |
| 481 | − if (sizeof(maddr) == sizeof(long)) { | |
| 482 | − mcl->args[0] = maddr; | |
| 483 | − mcl->args[1] = *(unsigned long *)&desc; | |
| 484 | − } else { | |
| 485 | − u32 *p = (u32 *)&desc; | |
| 486 | − | |
| 487 | − mcl->args[0] = maddr; | |
| 488 | − mcl->args[1] = maddr >> 32; | |
| 489 | − mcl->args[2] = *p++; | |
| 490 | − mcl->args[3] = *p; | |
| 491 | − } | |
| 492 | − | |
| 493 | − trace_xen_mc_entry(mcl, sizeof(maddr) == sizeof(long) ? 2 : 4); | |
| 494 | −} | |
| 495 | − | |
| 496 | −static inline void | |
| 497 | −MULTI_mmu_update(struct multicall_entry *mcl, struct mmu_update *req, | |
| 498 | − int count, int *success_count, domid_t domid) | |
| 499 | −{ | |
| 500 | − mcl->op = __HYPERVISOR_mmu_update; | |
| 501 | − mcl->args[0] = (unsigned long)req; | |
| 502 | − mcl->args[1] = count; | |
| 503 | − mcl->args[2] = (unsigned long)success_count; | |
| 504 | − mcl->args[3] = domid; | |
| 505 | − | |
| 506 | − trace_xen_mc_entry(mcl, 4); | |
| 507 | −} | |
| 508 | − | |
| 509 | −static inline void | |
| 510 | −MULTI_mmuext_op(struct multicall_entry *mcl, struct mmuext_op *op, int count, | |
| 511 | − int *success_count, domid_t domid) | |
| 512 | −{ | |
| 513 | − mcl->op = __HYPERVISOR_mmuext_op; | |
| 514 | − mcl->args[0] = (unsigned long)op; | |
| 515 | − mcl->args[1] = count; | |
| 516 | − mcl->args[2] = (unsigned long)success_count; | |
| 517 | − mcl->args[3] = domid; | |
| 518 | − | |
| 519 | − trace_xen_mc_entry(mcl, 4); | |
| 520 | −} | |
| 521 | − | |
| 522 | −static inline void | |
| 523 | −MULTI_stack_switch(struct multicall_entry *mcl, | |
| 524 | − unsigned long ss, unsigned long esp) | |
| 525 | −{ | |
| 526 | − mcl->op = __HYPERVISOR_stack_switch; | |
| 527 | − mcl->args[0] = ss; | |
| 528 | − mcl->args[1] = esp; | |
| 529 | − | |
| 530 | − trace_xen_mc_entry(mcl, 2); | |
| 531 | −} | |
| 532 | − | |
| 533 | 504 | #endif /* _ASM_X86_XEN_HYPERCALL_H */ |
| @@ -62,4 +62,8 @@ void xen_arch_register_cpu(int num); · 61 unmodified lines | ||
| 62 | 62 | void xen_arch_unregister_cpu(int num); |
| 63 | 63 | #endif |
| 64 | 64 | |
| 65 | +#ifdef CONFIG_PVH | |
| 66 | +void __init xen_pvh_init(struct boot_params *boot_params); | |
| 67 | +#endif | |
| 68 | + | |
| 65 | 69 | #endif /* _ASM_X86_XEN_HYPERVISOR_H */ |
| @@ -22,25 +22,6 @@ static inline int __init pci_xen_initial_domain(void) · 21 unmodified lines | ||
| 22 | 22 | return -1; |
| 23 | 23 | } |
| 24 | 24 | #endif |
| 25 | −#ifdef CONFIG_XEN_DOM0 | |
| 26 | −int xen_find_device_domain_owner(struct pci_dev *dev); | |
| 27 | −int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain); | |
| 28 | −int xen_unregister_device_domain_owner(struct pci_dev *dev); | |
| 29 | −#else | |
| 30 | −static inline int xen_find_device_domain_owner(struct pci_dev *dev) | |
| 31 | −{ | |
| 32 | − return -1; | |
| 33 | −} | |
| 34 | −static inline int xen_register_device_domain_owner(struct pci_dev *dev, | |
| 35 | − uint16_t domain) | |
| 36 | −{ | |
| 37 | − return -1; | |
| 38 | −} | |
| 39 | −static inline int xen_unregister_device_domain_owner(struct pci_dev *dev) | |
| 40 | −{ | |
| 41 | − return -1; | |
| 42 | −} | |
| 43 | −#endif | |
| 44 | 25 | |
| 45 | 26 | #if defined(CONFIG_PCI_MSI) |
| 46 | 27 | #if defined(CONFIG_PCI_XEN) |
| @@ -46,6 +46,17 @@ asm (".pushsection .entry.text, \"ax\"\n" · 45 unmodified lines | ||
| 46 | 46 | ".type _paravirt_nop, @function\n\t" |
| 47 | 47 | ".popsection"); |
| 48 | 48 | |
| 49 | +/* stub always returning 0. */ | |
| 50 | +asm (".pushsection .entry.text, \"ax\"\n" | |
| 51 | + ".global paravirt_ret0\n" | |
| 52 | + "paravirt_ret0:\n\t" | |
| 53 | + "xor %" _ASM_AX ", %" _ASM_AX ";\n\t" | |
| 54 | + "ret\n\t" | |
| 55 | + ".size paravirt_ret0, . - paravirt_ret0\n\t" | |
| 56 | + ".type paravirt_ret0, @function\n\t" | |
| 57 | + ".popsection"); | |
| 58 | + | |
| 59 | + | |
| 49 | 60 | void __init default_banner(void) |
| 50 | 61 | { |
| 51 | 62 | printk(KERN_INFO "Booting paravirtualized kernel on %s\n", |
| @@ -53,7 +64,7 @@ void __init default_banner(void) · 1 unmodified line | ||
| 53 | 64 | } |
| 54 | 65 | |
| 55 | 66 | /* Undefined instruction for dealing with missing ops pointers. */ |
| 56 | −static void paravirt_BUG(void) | |
| 67 | +noinstr void paravirt_BUG(void) | |
| 57 | 68 | { |
| 58 | 69 | BUG(); |
| 59 | 70 | } |
| @@ -23,6 +23,7 @@ · 22 unmodified lines | ||
| 23 | 23 | |
| 24 | 24 | #include <xen/features.h> |
| 25 | 25 | #include <xen/events.h> |
| 26 | +#include <xen/pci.h> | |
| 26 | 27 | #include <asm/xen/pci.h> |
| 27 | 28 | #include <asm/xen/cpuid.h> |
| 28 | 29 | #include <asm/apic.h> |
| @@ -585,78 +586,3 @@ int __init pci_xen_initial_domain(void) · 556 unmodified lines | ||
| 585 | 586 | } |
| 586 | 587 | #endif |
| 587 | 588 | |
| 588 | −#ifdef CONFIG_XEN_DOM0 | |
| 589 | − | |
| 590 | −struct xen_device_domain_owner { | |
| 591 | − domid_t domain; | |
| 592 | − struct pci_dev *dev; | |
| 593 | − struct list_head list; | |
| 594 | −}; | |
| 595 | − | |
| 596 | −static DEFINE_SPINLOCK(dev_domain_list_spinlock); | |
| 597 | −static struct list_head dev_domain_list = LIST_HEAD_INIT(dev_domain_list); | |
| 598 | − | |
| 599 | −static struct xen_device_domain_owner *find_device(struct pci_dev *dev) | |
| 600 | −{ | |
| 601 | − struct xen_device_domain_owner *owner; | |
| 602 | − | |
| 603 | − list_for_each_entry(owner, &dev_domain_list, list) { | |
| 604 | − if (owner->dev == dev) | |
| 605 | − return owner; | |
| 606 | − } | |
| 607 | − return NULL; | |
| 608 | −} | |
| 609 | − | |
| 610 | −int xen_find_device_domain_owner(struct pci_dev *dev) | |
| 611 | −{ | |
| 612 | − struct xen_device_domain_owner *owner; | |
| 613 | − int domain = -ENODEV; | |
| 614 | − | |
| 615 | − spin_lock(&dev_domain_list_spinlock); | |
| 616 | − owner = find_device(dev); | |
| 617 | − if (owner) | |
| 618 | − domain = owner->domain; | |
| 619 | − spin_unlock(&dev_domain_list_spinlock); | |
| 620 | − return domain; | |
| 621 | −} | |
| 622 | −EXPORT_SYMBOL_GPL(xen_find_device_domain_owner); | |
| 623 | − | |
| 624 | −int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain) | |
| 625 | −{ | |
| 626 | − struct xen_device_domain_owner *owner; | |
| 627 | − | |
| 628 | − owner = kzalloc(sizeof(struct xen_device_domain_owner), GFP_KERNEL); | |
| 629 | − if (!owner) | |
| 630 | − return -ENODEV; | |
| 631 | − | |
| 632 | − spin_lock(&dev_domain_list_spinlock); | |
| 633 | − if (find_device(dev)) { | |
| 634 | − spin_unlock(&dev_domain_list_spinlock); | |
| 635 | − kfree(owner); | |
| 636 | − return -EEXIST; | |
| 637 | − } | |
| 638 | − owner->domain = domain; | |
| 639 | − owner->dev = dev; | |
| 640 | − list_add_tail(&owner->list, &dev_domain_list); | |
| 641 | − spin_unlock(&dev_domain_list_spinlock); | |
| 642 | − return 0; | |
| 643 | −} | |
| 644 | −EXPORT_SYMBOL_GPL(xen_register_device_domain_owner); | |
| 645 | − | |
| 646 | −int xen_unregister_device_domain_owner(struct pci_dev *dev) | |
| 647 | −{ | |
| 648 | − struct xen_device_domain_owner *owner; | |
| 649 | − | |
| 650 | − spin_lock(&dev_domain_list_spinlock); | |
| 651 | − owner = find_device(dev); | |
| 652 | − if (!owner) { | |
| 653 | − spin_unlock(&dev_domain_list_spinlock); | |
| 654 | − return -ENODEV; | |
| 655 | − } | |
| 656 | − list_del(&owner->list); | |
| 657 | − spin_unlock(&dev_domain_list_spinlock); | |
| 658 | − kfree(owner); | |
| 659 | − return 0; | |
| 660 | −} | |
| 661 | −EXPORT_SYMBOL_GPL(xen_unregister_device_domain_owner); | |
| 662 | −#endif /* CONFIG_XEN_DOM0 */ | |
| @@ -31,25 +31,10 @@ EXPORT_SYMBOL_GPL(hypercall_page); · 30 unmodified lines | ||
| 31 | 31 | * Pointer to the xen_vcpu_info structure or |
| 32 | 32 | * &HYPERVISOR_shared_info->vcpu_info[cpu]. See xen_hvm_init_shared_info |
| 33 | 33 | * and xen_vcpu_setup for details. By default it points to share_info->vcpu_info |
| 34 | − * but if the hypervisor supports VCPUOP_register_vcpu_info then it can point | |
| 35 | − * to xen_vcpu_info. The pointer is used in __xen_evtchn_do_upcall to | |
| 36 | − * acknowledge pending events. | |
| 37 | − * Also more subtly it is used by the patched version of irq enable/disable | |
| 38 | − * e.g. xen_irq_enable_direct and xen_iret in PV mode. | |
| 39 | − * | |
| 40 | − * The desire to be able to do those mask/unmask operations as a single | |
| 41 | − * instruction by using the per-cpu offset held in %gs is the real reason | |
| 42 | − * vcpu info is in a per-cpu pointer and the original reason for this | |
| 43 | − * hypercall. | |
| 44 | − * | |
| 34 | + * but during boot it is switched to point to xen_vcpu_info. | |
| 35 | + * The pointer is used in __xen_evtchn_do_upcall to acknowledge pending events. | |
| 45 | 36 | */ |
| 46 | 37 | DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu); |
| 47 | − | |
| 48 | −/* | |
| 49 | − * Per CPU pages used if hypervisor supports VCPUOP_register_vcpu_info | |
| 50 | − * hypercall. This can be used both in PV and PVHVM mode. The structure | |
| 51 | − * overrides the default per_cpu(xen_vcpu, cpu) value. | |
| 52 | − */ | |
| 53 | 38 | DEFINE_PER_CPU(struct vcpu_info, xen_vcpu_info); |
| 54 | 39 | |
| 55 | 40 | /* Linux <-> Xen vCPU id mapping */ |
| @@ -84,21 +69,6 @@ EXPORT_SYMBOL(xen_start_flags); · 28 unmodified lines | ||
| 84 | 69 | */ |
| 85 | 70 | struct shared_info *HYPERVISOR_shared_info = &xen_dummy_shared_info; |
| 86 | 71 | |
| 87 | −/* | |
| 88 | − * Flag to determine whether vcpu info placement is available on all | |
| 89 | − * VCPUs. We assume it is to start with, and then set it to zero on | |
| 90 | − * the first failure. This is because it can succeed on some VCPUs | |
| 91 | − * and not others, since it can involve hypervisor memory allocation, | |
| 92 | − * or because the guest failed to guarantee all the appropriate | |
| 93 | − * constraints on all VCPUs (ie buffer can't cross a page boundary). | |
| 94 | − * | |
| 95 | − * Note that any particular CPU may be using a placed vcpu structure, | |
| 96 | − * but we can only optimise if the all are. | |
| 97 | − * | |
| 98 | − * 0: not available, 1: available | |
| 99 | − */ | |
| 100 | −int xen_have_vcpu_info_placement = 1; | |
| 101 | − | |
| 102 | 72 | static int xen_cpu_up_online(unsigned int cpu) |
| 103 | 73 | { |
| 104 | 74 | xen_init_lock_cpu(cpu); |
| @@ -124,10 +94,8 @@ int xen_cpuhp_setup(int (*cpu_up_prepare_cb)(unsigned int), · 19 unmodified lines | ||
| 124 | 94 | return rc >= 0 ? 0 : rc; |
| 125 | 95 | } |
| 126 | 96 | |
| 127 | −static int xen_vcpu_setup_restore(int cpu) | |
| 97 | +static void xen_vcpu_setup_restore(int cpu) | |
| 128 | 98 | { |
| 129 | − int rc = 0; | |
| 130 | − | |
| 131 | 99 | /* Any per_cpu(xen_vcpu) is stale, so reset it */ |
| 132 | 100 | xen_vcpu_info_reset(cpu); |
| 133 | 101 | |
| @@ -136,11 +104,8 @@ static int xen_vcpu_setup_restore(int cpu) · 2 unmodified lines | ||
| 136 | 104 | * be handled by hotplug. |
| 137 | 105 | */ |
| 138 | 106 | if (xen_pv_domain() || |
| 139 | − (xen_hvm_domain() && cpu_online(cpu))) { | |
| 140 | − rc = xen_vcpu_setup(cpu); | |
| 141 | − } | |
| 142 | − | |
| 143 | − return rc; | |
| 107 | + (xen_hvm_domain() && cpu_online(cpu))) | |
| 108 | + xen_vcpu_setup(cpu); | |
| 144 | 109 | } |
| 145 | 110 | |
| 146 | 111 | /* |
| @@ -150,7 +115,7 @@ static int xen_vcpu_setup_restore(int cpu) · 3 unmodified lines | ||
| 150 | 115 | */ |
| 151 | 116 | void xen_vcpu_restore(void) |
| 152 | 117 | { |
| 153 | − int cpu, rc; | |
| 118 | + int cpu; | |
| 154 | 119 | |
| 155 | 120 | for_each_possible_cpu(cpu) { |
| 156 | 121 | bool other_cpu = (cpu != smp_processor_id()); |
| @@ -170,20 +135,9 @@ void xen_vcpu_restore(void) · 13 unmodified lines | ||
| 170 | 135 | if (xen_pv_domain() || xen_feature(XENFEAT_hvm_safe_pvclock)) |
| 171 | 136 | xen_setup_runstate_info(cpu); |
| 172 | 137 | |
| 173 | − rc = xen_vcpu_setup_restore(cpu); | |
| 174 | − if (rc) | |
| 175 | − pr_emerg_once("vcpu restore failed for cpu=%d err=%d. " | |
| 176 | − "System will hang.\n", cpu, rc); | |
| 177 | − /* | |
| 178 | − * In case xen_vcpu_setup_restore() fails, do not bring up the | |
| 179 | − * VCPU. This helps us avoid the resulting OOPS when the VCPU | |
| 180 | − * accesses pvclock_vcpu_time via xen_vcpu (which is NULL.) | |
| 181 | − * Note that this does not improve the situation much -- now the | |
| 182 | − * VM hangs instead of OOPSing -- with the VCPUs that did not | |
| 183 | − * fail, spinning in stop_machine(), waiting for the failed | |
| 184 | − * VCPUs to come up. | |
| 185 | − */ | |
| 186 | − if (other_cpu && is_up && (rc == 0) && | |
| 138 | + xen_vcpu_setup_restore(cpu); | |
| 139 | + | |
| 140 | + if (other_cpu && is_up && | |
| 187 | 141 | HYPERVISOR_vcpu_op(VCPUOP_up, xen_vcpu_nr(cpu), NULL)) |
| 188 | 142 | BUG(); |
| 189 | 143 | } |
| @@ -200,7 +154,7 @@ void xen_vcpu_info_reset(int cpu) · 10 unmodified lines | ||
| 200 | 154 | } |
| 201 | 155 | } |
| 202 | 156 | |
| 203 | −int xen_vcpu_setup(int cpu) | |
| 157 | +void xen_vcpu_setup(int cpu) | |
| 204 | 158 | { |
| 205 | 159 | struct vcpu_register_vcpu_info info; |
| 206 | 160 | int err; |
| @@ -221,44 +175,26 @@ int xen_vcpu_setup(int cpu) · 14 unmodified lines | ||
| 221 | 175 | */ |
| 222 | 176 | if (xen_hvm_domain()) { |
| 223 | 177 | if (per_cpu(xen_vcpu, cpu) == &per_cpu(xen_vcpu_info, cpu)) |
| 224 | − return 0; | |
| 178 | + return; | |
| 225 | 179 | } |
| 226 | 180 | |
| 227 | − if (xen_have_vcpu_info_placement) { | |
| 228 | − vcpup = &per_cpu(xen_vcpu_info, cpu); | |
| 229 | − info.mfn = arbitrary_virt_to_mfn(vcpup); | |
| 230 | − info.offset = offset_in_page(vcpup); | |
| 231 | − | |
| 232 | − /* | |
| 233 | − * Check to see if the hypervisor will put the vcpu_info | |
| 234 | − * structure where we want it, which allows direct access via | |
| 235 | − * a percpu-variable. | |
| 236 | − * N.B. This hypercall can _only_ be called once per CPU. | |
| 237 | − * Subsequent calls will error out with -EINVAL. This is due to | |
| 238 | − * the fact that hypervisor has no unregister variant and this | |
| 239 | − * hypercall does not allow to over-write info.mfn and | |
| 240 | − * info.offset. | |
| 241 | − */ | |
| 242 | − err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, | |
| 243 | − xen_vcpu_nr(cpu), &info); | |
| 244 | − | |
| 245 | − if (err) { | |
| 246 | − pr_warn_once("register_vcpu_info failed: cpu=%d err=%d\n", | |
| 247 | − cpu, err); | |
| 248 | − xen_have_vcpu_info_placement = 0; | |
| 249 | − } else { | |
| 250 | − /* | |
| 251 | − * This cpu is using the registered vcpu info, even if | |
| 252 | − * later ones fail to. | |
| 253 | − */ | |
| 254 | − per_cpu(xen_vcpu, cpu) = vcpup; | |
| 255 | − } | |
| 256 | − } | |
| 181 | + vcpup = &per_cpu(xen_vcpu_info, cpu); | |
| 182 | + info.mfn = arbitrary_virt_to_mfn(vcpup); | |
| 183 | + info.offset = offset_in_page(vcpup); | |
| 257 | 184 | |
| 258 | − if (!xen_have_vcpu_info_placement) | |
| 259 | − xen_vcpu_info_reset(cpu); | |
| 185 | + /* | |
| 186 | + * N.B. This hypercall can _only_ be called once per CPU. | |
| 187 | + * Subsequent calls will error out with -EINVAL. This is due to | |
| 188 | + * the fact that hypervisor has no unregister variant and this | |
| 189 | + * hypercall does not allow to over-write info.mfn and | |
| 190 | + * info.offset. | |
| 191 | + */ | |
| 192 | + err = HYPERVISOR_vcpu_op(VCPUOP_register_vcpu_info, xen_vcpu_nr(cpu), | |
| 193 | + &info); | |
| 194 | + if (err) | |
| 195 | + panic("register_vcpu_info failed: cpu=%d err=%d\n", cpu, err); | |
| 260 | 196 | |
| 261 | − return ((per_cpu(xen_vcpu, cpu) == NULL) ? -ENODEV : 0); | |
| 197 | + per_cpu(xen_vcpu, cpu) = vcpup; | |
| 262 | 198 | } |
| 263 | 199 | |
| 264 | 200 | void __init xen_banner(void) |
| @@ -163,9 +163,9 @@ static int xen_cpu_up_prepare_hvm(unsigned int cpu) · 162 unmodified lines | ||
| 163 | 163 | per_cpu(xen_vcpu_id, cpu) = cpu_acpi_id(cpu); |
| 164 | 164 | else |
| 165 | 165 | per_cpu(xen_vcpu_id, cpu) = cpu; |
| 166 | − rc = xen_vcpu_setup(cpu); | |
| 167 | − if (rc || !xen_have_vector_callback) | |
| 168 | − return rc; | |
| 166 | + xen_vcpu_setup(cpu); | |
| 167 | + if (!xen_have_vector_callback) | |
| 168 | + return 0; | |
| 169 | 169 | |
| 170 | 170 | if (xen_feature(XENFEAT_hvm_safe_pvclock)) |
| 171 | 171 | xen_setup_timer(cpu); |
| @@ -27,7 +27,6 @@ · 26 unmodified lines | ||
| 27 | 27 | #include <linux/export.h> |
| 28 | 28 | #include <linux/mm.h> |
| 29 | 29 | #include <linux/page-flags.h> |
| 30 | −#include <linux/highmem.h> | |
| 31 | 30 | #include <linux/pci.h> |
| 32 | 31 | #include <linux/gfp.h> |
| 33 | 32 | #include <linux/edd.h> |
| @@ -993,31 +992,13 @@ void __init xen_setup_vcpu_info_placement(void) · 959 unmodified lines | ||
| 993 | 992 | for_each_possible_cpu(cpu) { |
| 994 | 993 | /* Set up direct vCPU id mapping for PV guests. */ |
| 995 | 994 | per_cpu(xen_vcpu_id, cpu) = cpu; |
| 996 | − | |
| 997 | − /* | |
| 998 | − * xen_vcpu_setup(cpu) can fail -- in which case it | |
| 999 | − * falls back to the shared_info version for cpus | |
| 1000 | − * where xen_vcpu_nr(cpu) < MAX_VIRT_CPUS. | |
| 1001 | − * | |
| 1002 | − * xen_cpu_up_prepare_pv() handles the rest by failing | |
| 1003 | − * them in hotplug. | |
| 1004 | − */ | |
| 1005 | − (void) xen_vcpu_setup(cpu); | |
| 995 | + xen_vcpu_setup(cpu); | |
| 1006 | 996 | } |
| 1007 | 997 | |
| 1008 | − /* | |
| 1009 | − * xen_vcpu_setup managed to place the vcpu_info within the | |
| 1010 | − * percpu area for all cpus, so make use of it. | |
| 1011 | − */ | |
| 1012 | − if (xen_have_vcpu_info_placement) { | |
| 1013 | − pv_ops.irq.save_fl = __PV_IS_CALLEE_SAVE(xen_save_fl_direct); | |
| 1014 | − pv_ops.irq.irq_disable = | |
| 1015 | − __PV_IS_CALLEE_SAVE(xen_irq_disable_direct); | |
| 1016 | − pv_ops.irq.irq_enable = | |
| 1017 | − __PV_IS_CALLEE_SAVE(xen_irq_enable_direct); | |
| 1018 | − pv_ops.mmu.read_cr2 = | |
| 1019 | − __PV_IS_CALLEE_SAVE(xen_read_cr2_direct); | |
| 1020 | − } | |
| 998 | + pv_ops.irq.save_fl = __PV_IS_CALLEE_SAVE(xen_save_fl_direct); | |
| 999 | + pv_ops.irq.irq_disable = __PV_IS_CALLEE_SAVE(xen_irq_disable_direct); | |
| 1000 | + pv_ops.irq.irq_enable = __PV_IS_CALLEE_SAVE(xen_irq_enable_direct); | |
| 1001 | + pv_ops.mmu.read_cr2 = __PV_IS_CALLEE_SAVE(xen_read_cr2_direct); | |
| 1021 | 1002 | } |
| 1022 | 1003 | |
| 1023 | 1004 | static const struct pv_info xen_info __initconst = { |
| @@ -1247,12 +1228,6 @@ asmlinkage __visible void __init xen_start_kernel(void) · 223 unmodified lines | ||
| 1247 | 1228 | __supported_pte_mask &= ~_PAGE_GLOBAL; |
| 1248 | 1229 | __default_kernel_pte_mask &= ~_PAGE_GLOBAL; |
| 1249 | 1230 | |
| 1250 | − /* | |
| 1251 | − * Prevent page tables from being allocated in highmem, even | |
| 1252 | − * if CONFIG_HIGHPTE is enabled. | |
| 1253 | − */ | |
| 1254 | − __userpte_alloc_gfp &= ~__GFP_HIGHMEM; | |
| 1255 | − | |
| 1256 | 1231 | /* Get mfn list */ |
| 1257 | 1232 | xen_build_dynamic_phys_to_machine(); |
| 1258 | 1233 | |
| @@ -24,60 +24,6 @@ noinstr void xen_force_evtchn_callback(void) · 23 unmodified lines | ||
| 24 | 24 | (void)HYPERVISOR_xen_version(0, NULL); |
| 25 | 25 | } |
| 26 | 26 | |
| 27 | −asmlinkage __visible noinstr unsigned long xen_save_fl(void) | |
| 28 | −{ | |
| 29 | − struct vcpu_info *vcpu; | |
| 30 | − unsigned long flags; | |
| 31 | − | |
| 32 | − vcpu = this_cpu_read(xen_vcpu); | |
| 33 | − | |
| 34 | − /* flag has opposite sense of mask */ | |
| 35 | − flags = !vcpu->evtchn_upcall_mask; | |
| 36 | − | |
| 37 | − /* convert to IF type flag | |
| 38 | − -0 -> 0x00000000 | |
| 39 | − -1 -> 0xffffffff | |
| 40 | − */ | |
| 41 | − return (-flags) & X86_EFLAGS_IF; | |
| 42 | −} | |
| 43 | −__PV_CALLEE_SAVE_REGS_THUNK(xen_save_fl, ".noinstr.text"); | |
| 44 | − | |
| 45 | −asmlinkage __visible noinstr void xen_irq_disable(void) | |
| 46 | −{ | |
| 47 | − /* There's a one instruction preempt window here. We need to | |
| 48 | − make sure we're don't switch CPUs between getting the vcpu | |
| 49 | − pointer and updating the mask. */ | |
| 50 | − preempt_disable(); | |
| 51 | − this_cpu_read(xen_vcpu)->evtchn_upcall_mask = 1; | |
| 52 | − preempt_enable_no_resched(); | |
| 53 | −} | |
| 54 | −__PV_CALLEE_SAVE_REGS_THUNK(xen_irq_disable, ".noinstr.text"); | |
| 55 | − | |
| 56 | −asmlinkage __visible noinstr void xen_irq_enable(void) | |
| 57 | −{ | |
| 58 | − struct vcpu_info *vcpu; | |
| 59 | − | |
| 60 | − /* | |
| 61 | − * We may be preempted as soon as vcpu->evtchn_upcall_mask is | |
| 62 | − * cleared, so disable preemption to ensure we check for | |
| 63 | − * events on the VCPU we are still running on. | |
| 64 | − */ | |
| 65 | − preempt_disable(); | |
| 66 | − | |
| 67 | − vcpu = this_cpu_read(xen_vcpu); | |
| 68 | − vcpu->evtchn_upcall_mask = 0; | |
| 69 | − | |
| 70 | − /* Doesn't matter if we get preempted here, because any | |
| 71 | − pending event will get dealt with anyway. */ | |
| 72 | − | |
| 73 | − barrier(); /* unmask then check (avoid races) */ | |
| 74 | − if (unlikely(vcpu->evtchn_upcall_pending)) | |
| 75 | − xen_force_evtchn_callback(); | |
| 76 | − | |
| 77 | − preempt_enable(); | |
| 78 | −} | |
| 79 | −__PV_CALLEE_SAVE_REGS_THUNK(xen_irq_enable, ".noinstr.text"); | |
| 80 | − | |
| 81 | 27 | static void xen_safe_halt(void) |
| 82 | 28 | { |
| 83 | 29 | /* Blocking includes an implicit local_irq_enable(). */ |
| @@ -96,10 +42,10 @@ static void xen_halt(void) · 12 unmodified lines | ||
| 96 | 42 | |
| 97 | 43 | static const typeof(pv_ops) xen_irq_ops __initconst = { |
| 98 | 44 | .irq = { |
| 99 | − | |
| 100 | − .save_fl = PV_CALLEE_SAVE(xen_save_fl), | |
| 101 | − .irq_disable = PV_CALLEE_SAVE(xen_irq_disable), | |
| 102 | − .irq_enable = PV_CALLEE_SAVE(xen_irq_enable), | |
| 45 | + /* Initial interrupt flag handling only called while interrupts off. */ | |
| 46 | + .save_fl = __PV_IS_CALLEE_SAVE(paravirt_ret0), | |
| 47 | + .irq_disable = __PV_IS_CALLEE_SAVE(paravirt_nop), | |
| 48 | + .irq_enable = __PV_IS_CALLEE_SAVE(paravirt_BUG), | |
| 103 | 49 | |
| 104 | 50 | .safe_halt = xen_safe_halt, |
| 105 | 51 | .halt = xen_halt, |
| @@ -41,7 +41,6 @@ · 40 unmodified lines | ||
| 41 | 41 | * Jeremy Fitzhardinge <jeremy@xensource.com>, XenSource Inc, 2007 |
| 42 | 42 | */ |
| 43 | 43 | #include <linux/sched/mm.h> |
| 44 | −#include <linux/highmem.h> | |
| 45 | 44 | #include <linux/debugfs.h> |
| 46 | 45 | #include <linux/bug.h> |
| 47 | 46 | #include <linux/vmalloc.h> |
| @@ -86,8 +85,10 @@ · 38 unmodified lines | ||
| 86 | 85 | #include "mmu.h" |
| 87 | 86 | #include "debugfs.h" |
| 88 | 87 | |
| 88 | +#ifdef CONFIG_X86_VSYSCALL_EMULATION | |
| 89 | 89 | /* l3 pud for userspace vsyscall mapping */ |
| 90 | 90 | static pud_t level3_user_vsyscall[PTRS_PER_PUD] __page_aligned_bss; |
| 91 | +#endif | |
| 91 | 92 | |
| 92 | 93 | /* |
| 93 | 94 | * Protects atomic reservation decrease/increase against concurrent increases. |
| @@ -241,9 +242,11 @@ static void xen_set_pmd(pmd_t *ptr, pmd_t val) · 147 unmodified lines | ||
| 241 | 242 | * Associate a virtual page frame with a given physical page frame |
| 242 | 243 | * and protection flags for that frame. |
| 243 | 244 | */ |
| 244 | −void set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags) | |
| 245 | +void __init set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags) | |
| 245 | 246 | { |
| 246 | − set_pte_vaddr(vaddr, mfn_pte(mfn, flags)); | |
| 247 | + if (HYPERVISOR_update_va_mapping(vaddr, mfn_pte(mfn, flags), | |
| 248 | + UVMF_INVLPG)) | |
| 249 | + BUG(); | |
| 247 | 250 | } |
| 248 | 251 | |
| 249 | 252 | static bool xen_batched_set_pte(pte_t *ptep, pte_t pteval) |
| @@ -789,7 +792,9 @@ static void __init xen_mark_pinned(struct mm_struct *mm, struct page *page, · 539 unmodified lines | ||
| 789 | 792 | static void __init xen_after_bootmem(void) |
| 790 | 793 | { |
| 791 | 794 | static_branch_enable(&xen_struct_pages_ready); |
| 795 | +#ifdef CONFIG_X86_VSYSCALL_EMULATION | |
| 792 | 796 | SetPagePinned(virt_to_page(level3_user_vsyscall)); |
| 797 | +#endif | |
| 793 | 798 | xen_pgd_walk(&init_mm, xen_mark_pinned, FIXADDR_TOP); |
| 794 | 799 | } |
| 795 | 800 | |
| @@ -1192,6 +1197,13 @@ static void __init xen_pagetable_p2m_setup(void) · 396 unmodified lines | ||
| 1192 | 1197 | |
| 1193 | 1198 | static void __init xen_pagetable_init(void) |
| 1194 | 1199 | { |
| 1200 | + /* | |
| 1201 | + * The majority of further PTE writes is to pagetables already | |
| 1202 | + * announced as such to Xen. Hence it is more efficient to use | |
| 1203 | + * hypercalls for these updates. | |
| 1204 | + */ | |
| 1205 | + pv_ops.mmu.set_pte = __xen_set_pte; | |
| 1206 | + | |
| 1195 | 1207 | paging_init(); |
| 1196 | 1208 | xen_post_allocator_init(); |
| 1197 | 1209 | |
| @@ -1421,10 +1433,18 @@ static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd) · 223 unmodified lines | ||
| 1421 | 1433 | * |
| 1422 | 1434 | * Many of these PTE updates are done on unpinned and writable pages |
| 1423 | 1435 | * and doing a hypercall for these is unnecessary and expensive. At |
| 1424 | − * this point it is not possible to tell if a page is pinned or not, | |
| 1425 | − * so always write the PTE directly and rely on Xen trapping and | |
| 1436 | + * this point it is rarely possible to tell if a page is pinned, so | |
| 1437 | + * mostly write the PTE directly and rely on Xen trapping and | |
| 1426 | 1438 | * emulating any updates as necessary. |
| 1427 | 1439 | */ |
| 1440 | +static void __init xen_set_pte_init(pte_t *ptep, pte_t pte) | |
| 1441 | +{ | |
| 1442 | + if (unlikely(is_early_ioremap_ptep(ptep))) | |
| 1443 | + __xen_set_pte(ptep, pte); | |
| 1444 | + else | |
| 1445 | + native_set_pte(ptep, pte); | |
| 1446 | +} | |
| 1447 | + | |
| 1428 | 1448 | __visible pte_t xen_make_pte_init(pteval_t pte) |
| 1429 | 1449 | { |
| 1430 | 1450 | unsigned long pfn; |
| @@ -1446,11 +1466,6 @@ __visible pte_t xen_make_pte_init(pteval_t pte) · 15 unmodified lines | ||
| 1446 | 1466 | } |
| 1447 | 1467 | PV_CALLEE_SAVE_REGS_THUNK(xen_make_pte_init); |
| 1448 | 1468 | |
| 1449 | −static void __init xen_set_pte_init(pte_t *ptep, pte_t pte) | |
| 1450 | −{ | |
| 1451 | − __xen_set_pte(ptep, pte); | |
| 1452 | −} | |
| 1453 | − | |
| 1454 | 1469 | /* Early in boot, while setting up the initial pagetable, assume |
| 1455 | 1470 | everything is pinned. */ |
| 1456 | 1471 | static void __init xen_alloc_pte_init(struct mm_struct *mm, unsigned long pfn) |
| @@ -1750,7 +1765,6 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) · 293 unmodified lines | ||
| 1750 | 1765 | set_page_prot(init_top_pgt, PAGE_KERNEL_RO); |
| 1751 | 1766 | set_page_prot(level3_ident_pgt, PAGE_KERNEL_RO); |
| 1752 | 1767 | set_page_prot(level3_kernel_pgt, PAGE_KERNEL_RO); |
| 1753 | − set_page_prot(level3_user_vsyscall, PAGE_KERNEL_RO); | |
| 1754 | 1768 | set_page_prot(level2_ident_pgt, PAGE_KERNEL_RO); |
| 1755 | 1769 | set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO); |
| 1756 | 1770 | set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO); |
| @@ -1767,6 +1781,13 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) · 10 unmodified lines | ||
| 1767 | 1781 | /* Unpin Xen-provided one */ |
| 1768 | 1782 | pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, PFN_DOWN(__pa(pgd))); |
| 1769 | 1783 | |
| 1784 | +#ifdef CONFIG_X86_VSYSCALL_EMULATION | |
| 1785 | + /* Pin user vsyscall L3 */ | |
| 1786 | + set_page_prot(level3_user_vsyscall, PAGE_KERNEL_RO); | |
| 1787 | + pin_pagetable_pfn(MMUEXT_PIN_L3_TABLE, | |
| 1788 | + PFN_DOWN(__pa_symbol(level3_user_vsyscall))); | |
| 1789 | +#endif | |
| 1790 | + | |
| 1770 | 1791 | /* |
| 1771 | 1792 | * At this stage there can be no user pgd, and no page structure to |
| 1772 | 1793 | * attach it to, so make sure we just set kernel pgd. |
| @@ -1999,6 +2020,7 @@ static unsigned char dummy_mapping[PAGE_SIZE] __page_aligned_bss; · 226 unmodified lines | ||
| 1999 | 2020 | static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot) |
| 2000 | 2021 | { |
| 2001 | 2022 | pte_t pte; |
| 2023 | + unsigned long vaddr; | |
| 2002 | 2024 | |
| 2003 | 2025 | phys >>= PAGE_SHIFT; |
| 2004 | 2026 | |
| @@ -2039,15 +2061,15 @@ static void xen_set_fixmap(unsigned idx, phys_addr_t phys, pgprot_t prot) · 34 unmodified lines | ||
| 2039 | 2061 | break; |
| 2040 | 2062 | } |
| 2041 | 2063 | |
| 2042 | − __native_set_fixmap(idx, pte); | |
| 2064 | + vaddr = __fix_to_virt(idx); | |
| 2065 | + if (HYPERVISOR_update_va_mapping(vaddr, pte, UVMF_INVLPG)) | |
| 2066 | + BUG(); | |
| 2043 | 2067 | |
| 2044 | 2068 | #ifdef CONFIG_X86_VSYSCALL_EMULATION |
| 2045 | 2069 | /* Replicate changes to map the vsyscall page into the user |
| 2046 | 2070 | pagetable vsyscall mapping. */ |
| 2047 | − if (idx == VSYSCALL_PAGE) { | |
| 2048 | − unsigned long vaddr = __fix_to_virt(idx); | |
| 2071 | + if (idx == VSYSCALL_PAGE) | |
| 2049 | 2072 | set_pte_vaddr_pud(level3_user_vsyscall, vaddr, pte); |
| 2050 | − } | |
| 2051 | 2073 | #endif |
| 2052 | 2074 | } |
| 2053 | 2075 | |
| @@ -306,10 +306,6 @@ static void __init xen_update_mem_tables(unsigned long pfn, unsigned long mfn) · 305 unmodified lines | ||
| 306 | 306 | BUG(); |
| 307 | 307 | } |
| 308 | 308 | |
| 309 | − /* Update kernel mapping, but not for highmem. */ | |
| 310 | − if (pfn >= PFN_UP(__pa(high_memory - 1))) | |
| 311 | − return; | |
| 312 | − | |
| 313 | 309 | if (HYPERVISOR_update_va_mapping((unsigned long)__va(pfn << PAGE_SHIFT), |
| 314 | 310 | mfn_pte(mfn, PAGE_KERNEL), 0)) { |
| 315 | 311 | WARN(1, "Failed to update kernel mapping for mfn=%ld pfn=%ld\n", |
| @@ -429,13 +425,13 @@ static unsigned long __init xen_set_identity_and_remap_chunk( · 113 unmodified lines | ||
| 429 | 425 | } |
| 430 | 426 | |
| 431 | 427 | /* |
| 432 | − * If the PFNs are currently mapped, the VA mapping also needs | |
| 433 | − * to be updated to be 1:1. | |
| 428 | + * If the PFNs are currently mapped, their VA mappings need to be | |
| 429 | + * zapped. | |
| 434 | 430 | */ |
| 435 | 431 | for (pfn = start_pfn; pfn <= max_pfn_mapped && pfn < end_pfn; pfn++) |
| 436 | 432 | (void)HYPERVISOR_update_va_mapping( |
| 437 | 433 | (unsigned long)__va(pfn << PAGE_SHIFT), |
| 438 | − mfn_pte(pfn, PAGE_KERNEL_IO), 0); | |
| 434 | + native_make_pte(0), 0); | |
| 439 | 435 | |
| 440 | 436 | return remap_pfn; |
| 441 | 437 | } |
| @@ -121,34 +121,10 @@ int xen_smp_intr_init(unsigned int cpu) · 120 unmodified lines | ||
| 121 | 121 | |
| 122 | 122 | void __init xen_smp_cpus_done(unsigned int max_cpus) |
| 123 | 123 | { |
| 124 | − int cpu, rc, count = 0; | |
| 125 | − | |
| 126 | 124 | if (xen_hvm_domain()) |
| 127 | 125 | native_smp_cpus_done(max_cpus); |
| 128 | 126 | else |
| 129 | 127 | calculate_max_logical_packages(); |
| 130 | − | |
| 131 | − if (xen_have_vcpu_info_placement) | |
| 132 | − return; | |
| 133 | − | |
| 134 | − for_each_online_cpu(cpu) { | |
| 135 | − if (xen_vcpu_nr(cpu) < MAX_VIRT_CPUS) | |
| 136 | − continue; | |
| 137 | − | |
| 138 | − rc = remove_cpu(cpu); | |
| 139 | − | |
| 140 | − if (rc == 0) { | |
| 141 | − /* | |
| 142 | − * Reset vcpu_info so this cpu cannot be onlined again. | |
| 143 | − */ | |
| 144 | − xen_vcpu_info_reset(cpu); | |
| 145 | − count++; | |
| 146 | − } else { | |
| 147 | − pr_warn("%s: failed to bring CPU %d down, error %d\n", | |
| 148 | − __func__, cpu, rc); | |
| 149 | − } | |
| 150 | − } | |
| 151 | − WARN(count, "%s: brought %d CPUs offline\n", __func__, count); | |
| 152 | 128 | } |
| 153 | 129 | |
| 154 | 130 | void xen_smp_send_reschedule(int cpu) |
| @@ -268,20 +244,16 @@ void xen_send_IPI_allbutself(int vector) · 113 unmodified lines | ||
| 268 | 244 | |
| 269 | 245 | static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id) |
| 270 | 246 | { |
| 271 | − irq_enter(); | |
| 272 | 247 | generic_smp_call_function_interrupt(); |
| 273 | 248 | inc_irq_stat(irq_call_count); |
| 274 | − irq_exit(); | |
| 275 | 249 | |
| 276 | 250 | return IRQ_HANDLED; |
| 277 | 251 | } |
| 278 | 252 | |
| 279 | 253 | static irqreturn_t xen_call_function_single_interrupt(int irq, void *dev_id) |
| 280 | 254 | { |
| 281 | − irq_enter(); | |
| 282 | 255 | generic_smp_call_function_single_interrupt(); |
| 283 | 256 | inc_irq_stat(irq_call_count); |
| 284 | − irq_exit(); | |
| 285 | 257 | |
| 286 | 258 | return IRQ_HANDLED; |
| 287 | 259 | } |
| @@ -458,10 +458,8 @@ static void xen_pv_stop_other_cpus(int wait) · 457 unmodified lines | ||
| 458 | 458 | |
| 459 | 459 | static irqreturn_t xen_irq_work_interrupt(int irq, void *dev_id) |
| 460 | 460 | { |
| 461 | − irq_enter(); | |
| 462 | 461 | irq_work_run(); |
| 463 | 462 | inc_irq_stat(apic_irq_work_irqs); |
| 464 | − irq_exit(); | |
| 465 | 463 | |
| 466 | 464 | return IRQ_HANDLED; |
| 467 | 465 | } |
| @@ -45,13 +45,13 @@ SYM_CODE_START(startup_xen) · 44 unmodified lines | ||
| 45 | 45 | |
| 46 | 46 | /* Clear .bss */ |
| 47 | 47 | xor %eax,%eax |
| 48 | − mov $__bss_start, %_ASM_DI | |
| 49 | − mov $__bss_stop, %_ASM_CX | |
| 50 | − sub %_ASM_DI, %_ASM_CX | |
| 51 | − shr $__ASM_SEL(2, 3), %_ASM_CX | |
| 52 | − rep __ASM_SIZE(stos) | |
| 48 | + mov $__bss_start, %rdi | |
| 49 | + mov $__bss_stop, %rcx | |
| 50 | + sub %rdi, %rcx | |
| 51 | + shr $3, %rcx | |
| 52 | + rep stosq | |
| 53 | 53 | |
| 54 | − mov %_ASM_SI, xen_start_info | |
| 54 | + mov %rsi, xen_start_info | |
| 55 | 55 | mov initial_stack(%rip), %rsp |
| 56 | 56 | |
| 57 | 57 | /* Set up %gs. |
| @@ -76,9 +76,7 @@ irqreturn_t xen_debug_interrupt(int irq, void *dev_id); · 75 unmodified lines | ||
| 76 | 76 | |
| 77 | 77 | bool xen_vcpu_stolen(int vcpu); |
| 78 | 78 | |
| 79 | −extern int xen_have_vcpu_info_placement; | |
| 80 | − | |
| 81 | −int xen_vcpu_setup(int cpu); | |
| 79 | +void xen_vcpu_setup(int cpu); | |
| 82 | 80 | void xen_vcpu_info_reset(int cpu); |
| 83 | 81 | void xen_setup_vcpu_info_placement(void); |
| 84 | 82 | |
| @@ -181,10 +181,34 @@ config SWIOTLB_XEN · 180 unmodified lines | ||
| 181 | 181 | select DMA_OPS |
| 182 | 182 | select SWIOTLB |
| 183 | 183 | |
| 184 | +config XEN_PCI_STUB | |
| 185 | + bool | |
| 186 | + | |
| 187 | +config XEN_PCIDEV_STUB | |
| 188 | + tristate "Xen PCI-device stub driver" | |
| 189 | + depends on PCI && !X86 && XEN | |
| 190 | + depends on XEN_BACKEND | |
| 191 | + select XEN_PCI_STUB | |
| 192 | + default m | |
| 193 | + help | |
| 194 | + The PCI device stub driver provides limited version of the PCI | |
| 195 | + device backend driver without para-virtualized support for guests. | |
| 196 | + If you select this to be a module, you will need to make sure no | |
| 197 | + other driver has bound to the device(s) you want to make visible to | |
| 198 | + other guests. | |
| 199 | + | |
| 200 | + The "hide" parameter (only applicable if backend driver is compiled | |
| 201 | + into the kernel) allows you to bind the PCI devices to this module | |
| 202 | + from the default device drivers. The argument is the list of PCI BDFs: | |
| 203 | + xen-pciback.hide=(03:00.0)(04:00.0) | |
| 204 | + | |
| 205 | + If in doubt, say m. | |
| 206 | + | |
| 184 | 207 | config XEN_PCIDEV_BACKEND |
| 185 | 208 | tristate "Xen PCI-device backend driver" |
| 186 | 209 | depends on PCI && X86 && XEN |
| 187 | 210 | depends on XEN_BACKEND |
| 211 | + select XEN_PCI_STUB | |
| 188 | 212 | default m |
| 189 | 213 | help |
| 190 | 214 | The PCI device backend driver allows the kernel to export arbitrary |
| @@ -24,7 +24,7 @@ obj-$(CONFIG_XEN_SYS_HYPERVISOR) += sys-hypervisor.o · 23 unmodified lines | ||
| 24 | 24 | obj-$(CONFIG_XEN_PVHVM_GUEST) += platform-pci.o |
| 25 | 25 | obj-$(CONFIG_SWIOTLB_XEN) += swiotlb-xen.o |
| 26 | 26 | obj-$(CONFIG_XEN_MCE_LOG) += mcelog.o |
| 27 | −obj-$(CONFIG_XEN_PCIDEV_BACKEND) += xen-pciback/ | |
| 27 | +obj-$(CONFIG_XEN_PCI_STUB) += xen-pciback/ | |
| 28 | 28 | obj-$(CONFIG_XEN_PRIVCMD) += xen-privcmd.o |
| 29 | 29 | obj-$(CONFIG_XEN_ACPI_PROCESSOR) += xen-acpi-processor.o |
| 30 | 30 | obj-$(CONFIG_XEN_EFI) += efi.o |
| @@ -58,6 +58,7 @@ · 57 unmodified lines | ||
| 58 | 58 | #include <linux/percpu-defs.h> |
| 59 | 59 | #include <linux/slab.h> |
| 60 | 60 | #include <linux/sysctl.h> |
| 61 | +#include <linux/moduleparam.h> | |
| 61 | 62 | |
| 62 | 63 | #include <asm/page.h> |
| 63 | 64 | #include <asm/tlb.h> |
| @@ -73,9 +74,14 @@ · 9 unmodified lines | ||
| 73 | 74 | #include <xen/page.h> |
| 74 | 75 | #include <xen/mem-reservation.h> |
| 75 | 76 | |
| 76 | −static int xen_hotplug_unpopulated; | |
| 77 | +#undef MODULE_PARAM_PREFIX | |
| 78 | +#define MODULE_PARAM_PREFIX "xen." | |
| 79 | + | |
| 80 | +static uint __read_mostly balloon_boot_timeout = 180; | |
| 81 | +module_param(balloon_boot_timeout, uint, 0444); | |
| 77 | 82 | |
| 78 | 83 | #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG |
| 84 | +static int xen_hotplug_unpopulated; | |
| 79 | 85 | |
| 80 | 86 | static struct ctl_table balloon_table[] = { |
| 81 | 87 | { |
| @@ -108,6 +114,8 @@ static struct ctl_table xen_root[] = { · 26 unmodified lines | ||
| 108 | 114 | { } |
| 109 | 115 | }; |
| 110 | 116 | |
| 117 | +#else | |
| 118 | +#define xen_hotplug_unpopulated 0 | |
| 111 | 119 | #endif |
| 112 | 120 | |
| 113 | 121 | /* |
| @@ -125,12 +133,12 @@ static struct ctl_table xen_root[] = { · 11 unmodified lines | ||
| 125 | 133 | * BP_ECANCELED: error, balloon operation canceled. |
| 126 | 134 | */ |
| 127 | 135 | |
| 128 | −enum bp_state { | |
| 136 | +static enum bp_state { | |
| 129 | 137 | BP_DONE, |
| 130 | 138 | BP_WAIT, |
| 131 | 139 | BP_EAGAIN, |
| 132 | 140 | BP_ECANCELED |
| 133 | −}; | |
| 141 | +} balloon_state = BP_DONE; | |
| 134 | 142 | |
| 135 | 143 | /* Main waiting point for xen-balloon thread. */ |
| 136 | 144 | static DECLARE_WAIT_QUEUE_HEAD(balloon_thread_wq); |
| @@ -199,18 +207,15 @@ static struct page *balloon_next_page(struct page *page) · 62 unmodified lines | ||
| 199 | 207 | return list_entry(next, struct page, lru); |
| 200 | 208 | } |
| 201 | 209 | |
| 202 | −static enum bp_state update_schedule(enum bp_state state) | |
| 210 | +static void update_schedule(void) | |
| 203 | 211 | { |
| 204 | − if (state == BP_WAIT) | |
| 205 | − return BP_WAIT; | |
| 206 | − | |
| 207 | − if (state == BP_ECANCELED) | |
| 208 | − return BP_ECANCELED; | |
| 212 | + if (balloon_state == BP_WAIT || balloon_state == BP_ECANCELED) | |
| 213 | + return; | |
| 209 | 214 | |
| 210 | − if (state == BP_DONE) { | |
| 215 | + if (balloon_state == BP_DONE) { | |
| 211 | 216 | balloon_stats.schedule_delay = 1; |
| 212 | 217 | balloon_stats.retry_count = 1; |
| 213 | − return BP_DONE; | |
| 218 | + return; | |
| 214 | 219 | } |
| 215 | 220 | |
| 216 | 221 | ++balloon_stats.retry_count; |
| @@ -219,7 +224,8 @@ static enum bp_state update_schedule(enum bp_state state) · 2 unmodified lines | ||
| 219 | 224 | balloon_stats.retry_count > balloon_stats.max_retry_count) { |
| 220 | 225 | balloon_stats.schedule_delay = 1; |
| 221 | 226 | balloon_stats.retry_count = 1; |
| 222 | − return BP_ECANCELED; | |
| 227 | + balloon_state = BP_ECANCELED; | |
| 228 | + return; | |
| 223 | 229 | } |
| 224 | 230 | |
| 225 | 231 | balloon_stats.schedule_delay <<= 1; |
| @@ -227,7 +233,7 @@ static enum bp_state update_schedule(enum bp_state state) · 1 unmodified line | ||
| 227 | 233 | if (balloon_stats.schedule_delay > balloon_stats.max_schedule_delay) |
| 228 | 234 | balloon_stats.schedule_delay = balloon_stats.max_schedule_delay; |
| 229 | 235 | |
| 230 | − return BP_EAGAIN; | |
| 236 | + balloon_state = BP_EAGAIN; | |
| 231 | 237 | } |
| 232 | 238 | |
| 233 | 239 | #ifdef CONFIG_XEN_BALLOON_MEMORY_HOTPLUG |
| @@ -494,9 +500,9 @@ static enum bp_state decrease_reservation(unsigned long nr_pages, gfp_t gfp) · 260 unmodified lines | ||
| 494 | 500 | * Stop waiting if either state is BP_DONE and ballooning action is |
| 495 | 501 | * needed, or if the credit has changed while state is not BP_DONE. |
| 496 | 502 | */ |
| 497 | −static bool balloon_thread_cond(enum bp_state state, long credit) | |
| 503 | +static bool balloon_thread_cond(long credit) | |
| 498 | 504 | { |
| 499 | − if (state == BP_DONE) | |
| 505 | + if (balloon_state == BP_DONE) | |
| 500 | 506 | credit = 0; |
| 501 | 507 | |
| 502 | 508 | return current_credit() != credit || kthread_should_stop(); |
| @@ -510,13 +516,12 @@ static bool balloon_thread_cond(enum bp_state state, long credit) · 7 unmodified lines | ||
| 510 | 516 | */ |
| 511 | 517 | static int balloon_thread(void *unused) |
| 512 | 518 | { |
| 513 | − enum bp_state state = BP_DONE; | |
| 514 | 519 | long credit; |
| 515 | 520 | unsigned long timeout; |
| 516 | 521 | |
| 517 | 522 | set_freezable(); |
| 518 | 523 | for (;;) { |
| 519 | − switch (state) { | |
| 524 | + switch (balloon_state) { | |
| 520 | 525 | case BP_DONE: |
| 521 | 526 | case BP_ECANCELED: |
| 522 | 527 | timeout = 3600 * HZ; |
| @@ -532,7 +537,7 @@ static int balloon_thread(void *unused) · 9 unmodified lines | ||
| 532 | 537 | credit = current_credit(); |
| 533 | 538 | |
| 534 | 539 | wait_event_freezable_timeout(balloon_thread_wq, |
| 535 | − balloon_thread_cond(state, credit), timeout); | |
| 540 | + balloon_thread_cond(credit), timeout); | |
| 536 | 541 | |
| 537 | 542 | if (kthread_should_stop()) |
| 538 | 543 | return 0; |
| @@ -543,22 +548,23 @@ static int balloon_thread(void *unused) · 4 unmodified lines | ||
| 543 | 548 | |
| 544 | 549 | if (credit > 0) { |
| 545 | 550 | if (balloon_is_inflated()) |
| 546 | − state = increase_reservation(credit); | |
| 551 | + balloon_state = increase_reservation(credit); | |
| 547 | 552 | else |
| 548 | − state = reserve_additional_memory(); | |
| 553 | + balloon_state = reserve_additional_memory(); | |
| 549 | 554 | } |
| 550 | 555 | |
| 551 | 556 | if (credit < 0) { |
| 552 | 557 | long n_pages; |
| 553 | 558 | |
| 554 | 559 | n_pages = min(-credit, si_mem_available()); |
| 555 | − state = decrease_reservation(n_pages, GFP_BALLOON); | |
| 556 | − if (state == BP_DONE && n_pages != -credit && | |
| 560 | + balloon_state = decrease_reservation(n_pages, | |
| 561 | + GFP_BALLOON); | |
| 562 | + if (balloon_state == BP_DONE && n_pages != -credit && | |
| 557 | 563 | n_pages < totalreserve_pages) |
| 558 | − state = BP_EAGAIN; | |
| 564 | + balloon_state = BP_EAGAIN; | |
| 559 | 565 | } |
| 560 | 566 | |
| 561 | − state = update_schedule(state); | |
| 567 | + update_schedule(); | |
| 562 | 568 | |
| 563 | 569 | mutex_unlock(&balloon_mutex); |
| 564 | 570 | |
| @@ -575,7 +581,8 @@ void balloon_set_new_target(unsigned long target) · 10 unmodified lines | ||
| 575 | 581 | } |
| 576 | 582 | EXPORT_SYMBOL_GPL(balloon_set_new_target); |
| 577 | 583 | |
| 578 | −static int add_ballooned_pages(int nr_pages) | |
| 584 | +#ifndef CONFIG_XEN_UNPOPULATED_ALLOC | |
| 585 | +static int add_ballooned_pages(unsigned int nr_pages) | |
| 579 | 586 | { |
| 580 | 587 | enum bp_state st; |
| 581 | 588 | |
| @@ -603,14 +610,14 @@ static int add_ballooned_pages(int nr_pages) · 21 unmodified lines | ||
| 603 | 610 | } |
| 604 | 611 | |
| 605 | 612 | /** |
| 606 | − * alloc_xenballooned_pages - get pages that have been ballooned out | |
| 613 | + * xen_alloc_unpopulated_pages - get pages that have been ballooned out | |
| 607 | 614 | * @nr_pages: Number of pages to get |
| 608 | 615 | * @pages: pages returned |
| 609 | 616 | * @return 0 on success, error otherwise |
| 610 | 617 | */ |
| 611 | −int alloc_xenballooned_pages(int nr_pages, struct page **pages) | |
| 618 | +int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages) | |
| 612 | 619 | { |
| 613 | − int pgno = 0; | |
| 620 | + unsigned int pgno = 0; | |
| 614 | 621 | struct page *page; |
| 615 | 622 | int ret; |
| 616 | 623 | |
| @@ -645,7 +652,7 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages) · 28 unmodified lines | ||
| 645 | 652 | return 0; |
| 646 | 653 | out_undo: |
| 647 | 654 | mutex_unlock(&balloon_mutex); |
| 648 | − free_xenballooned_pages(pgno, pages); | |
| 655 | + xen_free_unpopulated_pages(pgno, pages); | |
| 649 | 656 | /* |
| 650 | 657 | * NB: free_xenballooned_pages will only subtract pgno pages, but since |
| 651 | 658 | * target_unpopulated is incremented with nr_pages at the start we need |
| @@ -654,16 +661,16 @@ int alloc_xenballooned_pages(int nr_pages, struct page **pages) · 2 unmodified lines | ||
| 654 | 661 | balloon_stats.target_unpopulated -= nr_pages - pgno; |
| 655 | 662 | return ret; |
| 656 | 663 | } |
| 657 | −EXPORT_SYMBOL(alloc_xenballooned_pages); | |
| 664 | +EXPORT_SYMBOL(xen_alloc_unpopulated_pages); | |
| 658 | 665 | |
| 659 | 666 | /** |
| 660 | − * free_xenballooned_pages - return pages retrieved with get_ballooned_pages | |
| 667 | + * xen_free_unpopulated_pages - return pages retrieved with get_ballooned_pages | |
| 661 | 668 | * @nr_pages: Number of pages |
| 662 | 669 | * @pages: pages to return |
| 663 | 670 | */ |
| 664 | −void free_xenballooned_pages(int nr_pages, struct page **pages) | |
| 671 | +void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages) | |
| 665 | 672 | { |
| 666 | − int i; | |
| 673 | + unsigned int i; | |
| 667 | 674 | |
| 668 | 675 | mutex_lock(&balloon_mutex); |
| 669 | 676 | |
| @@ -680,9 +687,9 @@ void free_xenballooned_pages(int nr_pages, struct page **pages) · 10 unmodified lines | ||
| 680 | 687 | |
| 681 | 688 | mutex_unlock(&balloon_mutex); |
| 682 | 689 | } |
| 683 | −EXPORT_SYMBOL(free_xenballooned_pages); | |
| 690 | +EXPORT_SYMBOL(xen_free_unpopulated_pages); | |
| 684 | 691 | |
| 685 | −#if defined(CONFIG_XEN_PV) && !defined(CONFIG_XEN_UNPOPULATED_ALLOC) | |
| 692 | +#if defined(CONFIG_XEN_PV) | |
| 686 | 693 | static void __init balloon_add_region(unsigned long start_pfn, |
| 687 | 694 | unsigned long pages) |
| 688 | 695 | { |
| @@ -705,6 +712,7 @@ static void __init balloon_add_region(unsigned long start_pfn, · 16 unmodified lines | ||
| 705 | 712 | balloon_stats.total_pages += extra_pfn_end - start_pfn; |
| 706 | 713 | } |
| 707 | 714 | #endif |
| 715 | +#endif | |
| 708 | 716 | |
| 709 | 717 | static int __init balloon_init(void) |
| 710 | 718 | { |
| @@ -765,3 +773,38 @@ static int __init balloon_init(void) · 54 unmodified lines | ||
| 765 | 773 | return 0; |
| 766 | 774 | } |
| 767 | 775 | subsys_initcall(balloon_init); |
| 776 | + | |
| 777 | +static int __init balloon_wait_finish(void) | |
| 778 | +{ | |
| 779 | + long credit, last_credit = 0; | |
| 780 | + unsigned long last_changed = 0; | |
| 781 | + | |
| 782 | + if (!xen_domain()) | |
| 783 | + return -ENODEV; | |
| 784 | + | |
| 785 | + /* PV guests don't need to wait. */ | |
| 786 | + if (xen_pv_domain() || !current_credit()) | |
| 787 | + return 0; | |
| 788 | + | |
| 789 | + pr_notice("Waiting for initial ballooning down having finished.\n"); | |
| 790 | + | |
| 791 | + while ((credit = current_credit()) < 0) { | |
| 792 | + if (credit != last_credit) { | |
| 793 | + last_changed = jiffies; | |
| 794 | + last_credit = credit; | |
| 795 | + } | |
| 796 | + if (balloon_state == BP_ECANCELED) { | |
| 797 | + pr_warn_once("Initial ballooning failed, %ld pages need to be freed.\n", | |
| 798 | + -credit); | |
| 799 | + if (jiffies - last_changed >= HZ * balloon_boot_timeout) | |
| 800 | + panic("Initial ballooning failed!\n"); | |
| 801 | + } | |
| 802 | + | |
| 803 | + schedule_timeout_interruptible(HZ / 10); | |
| 804 | + } | |
| 805 | + | |
| 806 | + pr_notice("Initial ballooning down finished.\n"); | |
| 807 | + | |
| 808 | + return 0; | |
| 809 | +} | |
| 810 | +late_initcall_sync(balloon_wait_finish); | |
| @@ -35,6 +35,7 @@ void __xenmem_reservation_va_mapping_update(unsigned long count, · 34 unmodified lines | ||
| 35 | 35 | for (i = 0; i < count; i++) { |
| 36 | 36 | struct page *page = pages[i]; |
| 37 | 37 | unsigned long pfn = page_to_pfn(page); |
| 38 | + int ret; | |
| 38 | 39 | |
| 39 | 40 | BUG_ON(!page); |
| 40 | 41 | |
| @@ -46,16 +47,10 @@ void __xenmem_reservation_va_mapping_update(unsigned long count, · 5 unmodified lines | ||
| 46 | 47 | |
| 47 | 48 | set_phys_to_machine(pfn, frames[i]); |
| 48 | 49 | |
| 49 | − /* Link back into the page tables if not highmem. */ | |
| 50 | − if (!PageHighMem(page)) { | |
| 51 | − int ret; | |
| 52 | − | |
| 53 | − ret = HYPERVISOR_update_va_mapping( | |
| 54 | − (unsigned long)__va(pfn << PAGE_SHIFT), | |
| 55 | − mfn_pte(frames[i], PAGE_KERNEL), | |
| 56 | − 0); | |
| 57 | − BUG_ON(ret); | |
| 58 | − } | |
| 50 | + ret = HYPERVISOR_update_va_mapping( | |
| 51 | + (unsigned long)__va(pfn << PAGE_SHIFT), | |
| 52 | + mfn_pte(frames[i], PAGE_KERNEL), 0); | |
| 53 | + BUG_ON(ret); | |
| 59 | 54 | } |
| 60 | 55 | } |
| 61 | 56 | EXPORT_SYMBOL_GPL(__xenmem_reservation_va_mapping_update); |
| @@ -68,6 +63,7 @@ void __xenmem_reservation_va_mapping_reset(unsigned long count, · 6 unmodified lines | ||
| 68 | 63 | for (i = 0; i < count; i++) { |
| 69 | 64 | struct page *page = pages[i]; |
| 70 | 65 | unsigned long pfn = page_to_pfn(page); |
| 66 | + int ret; | |
| 71 | 67 | |
| 72 | 68 | /* |
| 73 | 69 | * We don't support PV MMU when Linux and Xen are using |
| @@ -75,14 +71,11 @@ void __xenmem_reservation_va_mapping_reset(unsigned long count, · 1 unmodified line | ||
| 75 | 71 | */ |
| 76 | 72 | BUILD_BUG_ON(XEN_PAGE_SIZE != PAGE_SIZE); |
| 77 | 73 | |
| 78 | − if (!PageHighMem(page)) { | |
| 79 | − int ret; | |
| 74 | + ret = HYPERVISOR_update_va_mapping( | |
| 75 | + (unsigned long)__va(pfn << PAGE_SHIFT), | |
| 76 | + __pte_ma(0), 0); | |
| 77 | + BUG_ON(ret); | |
| 80 | 78 | |
| 81 | − ret = HYPERVISOR_update_va_mapping( | |
| 82 | − (unsigned long)__va(pfn << PAGE_SHIFT), | |
| 83 | − __pte_ma(0), 0); | |
| 84 | − BUG_ON(ret); | |
| 85 | − } | |
| 86 | 79 | __set_phys_to_machine(pfn, INVALID_P2M_ENTRY); |
| 87 | 80 | } |
| 88 | 81 | } |
| @@ -8,6 +8,7 @@ · 7 unmodified lines | ||
| 8 | 8 | #include <linux/pci.h> |
| 9 | 9 | #include <linux/acpi.h> |
| 10 | 10 | #include <linux/pci-acpi.h> |
| 11 | +#include <xen/pci.h> | |
| 11 | 12 | #include <xen/xen.h> |
| 12 | 13 | #include <xen/interface/physdev.h> |
| 13 | 14 | #include <xen/interface/xen.h> |
| @@ -254,3 +255,78 @@ static int xen_mcfg_late(void) · 240 unmodified lines | ||
| 254 | 255 | return 0; |
| 255 | 256 | } |
| 256 | 257 | #endif |
| 258 | + | |
| 259 | +#ifdef CONFIG_XEN_DOM0 | |
| 260 | +struct xen_device_domain_owner { | |
| 261 | + domid_t domain; | |
| 262 | + struct pci_dev *dev; | |
| 263 | + struct list_head list; | |
| 264 | +}; | |
| 265 | + | |
| 266 | +static DEFINE_SPINLOCK(dev_domain_list_spinlock); | |
| 267 | +static struct list_head dev_domain_list = LIST_HEAD_INIT(dev_domain_list); | |
| 268 | + | |
| 269 | +static struct xen_device_domain_owner *find_device(struct pci_dev *dev) | |
| 270 | +{ | |
| 271 | + struct xen_device_domain_owner *owner; | |
| 272 | + | |
| 273 | + list_for_each_entry(owner, &dev_domain_list, list) { | |
| 274 | + if (owner->dev == dev) | |
| 275 | + return owner; | |
| 276 | + } | |
| 277 | + return NULL; | |
| 278 | +} | |
| 279 | + | |
| 280 | +int xen_find_device_domain_owner(struct pci_dev *dev) | |
| 281 | +{ | |
| 282 | + struct xen_device_domain_owner *owner; | |
| 283 | + int domain = -ENODEV; | |
| 284 | + | |
| 285 | + spin_lock(&dev_domain_list_spinlock); | |
| 286 | + owner = find_device(dev); | |
| 287 | + if (owner) | |
| 288 | + domain = owner->domain; | |
| 289 | + spin_unlock(&dev_domain_list_spinlock); | |
| 290 | + return domain; | |
| 291 | +} | |
| 292 | +EXPORT_SYMBOL_GPL(xen_find_device_domain_owner); | |
| 293 | + | |
| 294 | +int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain) | |
| 295 | +{ | |
| 296 | + struct xen_device_domain_owner *owner; | |
| 297 | + | |
| 298 | + owner = kzalloc(sizeof(struct xen_device_domain_owner), GFP_KERNEL); | |
| 299 | + if (!owner) | |
| 300 | + return -ENODEV; | |
| 301 | + | |
| 302 | + spin_lock(&dev_domain_list_spinlock); | |
| 303 | + if (find_device(dev)) { | |
| 304 | + spin_unlock(&dev_domain_list_spinlock); | |
| 305 | + kfree(owner); | |
| 306 | + return -EEXIST; | |
| 307 | + } | |
| 308 | + owner->domain = domain; | |
| 309 | + owner->dev = dev; | |
| 310 | + list_add_tail(&owner->list, &dev_domain_list); | |
| 311 | + spin_unlock(&dev_domain_list_spinlock); | |
| 312 | + return 0; | |
| 313 | +} | |
| 314 | +EXPORT_SYMBOL_GPL(xen_register_device_domain_owner); | |
| 315 | + | |
| 316 | +int xen_unregister_device_domain_owner(struct pci_dev *dev) | |
| 317 | +{ | |
| 318 | + struct xen_device_domain_owner *owner; | |
| 319 | + | |
| 320 | + spin_lock(&dev_domain_list_spinlock); | |
| 321 | + owner = find_device(dev); | |
| 322 | + if (!owner) { | |
| 323 | + spin_unlock(&dev_domain_list_spinlock); | |
| 324 | + return -ENODEV; | |
| 325 | + } | |
| 326 | + list_del(&owner->list); | |
| 327 | + spin_unlock(&dev_domain_list_spinlock); | |
| 328 | + kfree(owner); | |
| 329 | + return 0; | |
| 330 | +} | |
| 331 | +EXPORT_SYMBOL_GPL(xen_unregister_device_domain_owner); | |
| 332 | +#endif | |
| @@ -465,7 +465,6 @@ static int pvcalls_back_release_passive(struct xenbus_device *dev, · 464 unmodified lines | ||
| 465 | 465 | write_unlock_bh(&mappass->sock->sk->sk_callback_lock); |
| 466 | 466 | } |
| 467 | 467 | sock_release(mappass->sock); |
| 468 | − flush_workqueue(mappass->wq); | |
| 469 | 468 | destroy_workqueue(mappass->wq); |
| 470 | 469 | kfree(mappass); |
| 471 | 470 | |
| @@ -450,7 +450,7 @@ static struct acpi_processor_performance __percpu *acpi_perf_data; · 449 unmodified lines | ||
| 450 | 450 | |
| 451 | 451 | static void free_acpi_perf_data(void) |
| 452 | 452 | { |
| 453 | − unsigned int i; | |
| 453 | + int i; | |
| 454 | 454 | |
| 455 | 455 | /* Freeing a NULL pointer is OK, and alloc_percpu zeroes. */ |
| 456 | 456 | for_each_possible_cpu(i) |
| @@ -462,7 +462,7 @@ static void free_acpi_perf_data(void) · 5 unmodified lines | ||
| 462 | 462 | static int xen_upload_processor_pm_data(void) |
| 463 | 463 | { |
| 464 | 464 | struct acpi_processor *pr_backup = NULL; |
| 465 | − unsigned int i; | |
| 465 | + int i; | |
| 466 | 466 | int rc = 0; |
| 467 | 467 | |
| 468 | 468 | pr_info("Uploading Xen processor PM info\n"); |
| @@ -518,7 +518,7 @@ static struct syscore_ops xap_syscore_ops = { · 49 unmodified lines | ||
| 518 | 518 | |
| 519 | 519 | static int __init xen_acpi_processor_init(void) |
| 520 | 520 | { |
| 521 | − unsigned int i; | |
| 521 | + int i; | |
| 522 | 522 | int rc; |
| 523 | 523 | |
| 524 | 524 | if (!xen_initial_domain()) |
| @@ -1,5 +1,12 @@ | ||
| 1 | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | + | |
| 3 | +# N.B. The below cannot be expressed with a single line using | |
| 4 | +# CONFIG_XEN_PCI_STUB as it always remains in "y" state, | |
| 5 | +# thus preventing the driver to be built as a module. | |
| 6 | +# Please note, that CONFIG_XEN_PCIDEV_BACKEND and | |
| 7 | +# CONFIG_XEN_PCIDEV_STUB are mutually exclusive. | |
| 2 | 8 | obj-$(CONFIG_XEN_PCIDEV_BACKEND) += xen-pciback.o |
| 9 | +obj-$(CONFIG_XEN_PCIDEV_STUB) += xen-pciback.o | |
| 3 | 10 | |
| 4 | 11 | xen-pciback-y := pci_stub.o pciback_ops.o xenbus.o |
| 5 | 12 | xen-pciback-y += conf_space.o conf_space_header.o \ |
| @@ -160,7 +160,7 @@ static void *pm_ctrl_init(struct pci_dev *dev, int offset) · 159 unmodified lines | ||
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | out: |
| 163 | − return ERR_PTR(err); | |
| 163 | + return err ? ERR_PTR(err) : NULL; | |
| 164 | 164 | } |
| 165 | 165 | |
| 166 | 166 | static const struct config_field caplist_pm[] = { |
| @@ -236,8 +236,12 @@ static void *bar_init(struct pci_dev *dev, int offset) · 235 unmodified lines | ||
| 236 | 236 | else { |
| 237 | 237 | pos = (offset - PCI_BASE_ADDRESS_0) / 4; |
| 238 | 238 | if (pos && (res[pos - 1].flags & IORESOURCE_MEM_64)) { |
| 239 | − bar->val = res[pos - 1].start >> 32; | |
| 240 | − bar->len_val = -resource_size(&res[pos - 1]) >> 32; | |
| 239 | + /* | |
| 240 | + * Use ">> 16 >> 16" instead of direct ">> 32" shift | |
| 241 | + * to avoid warnings on 32-bit architectures. | |
| 242 | + */ | |
| 243 | + bar->val = res[pos - 1].start >> 16 >> 16; | |
| 244 | + bar->len_val = -resource_size(&res[pos - 1]) >> 16 >> 16; | |
| 241 | 245 | return bar; |
| 242 | 246 | } |
| 243 | 247 | } |
| @@ -19,7 +19,8 @@ · 18 unmodified lines | ||
| 19 | 19 | #include <linux/sched.h> |
| 20 | 20 | #include <linux/atomic.h> |
| 21 | 21 | #include <xen/events.h> |
| 22 | −#include <asm/xen/pci.h> | |
| 22 | +#include <xen/pci.h> | |
| 23 | +#include <xen/xen.h> | |
| 23 | 24 | #include <asm/xen/hypervisor.h> |
| 24 | 25 | #include <xen/interface/physdev.h> |
| 25 | 26 | #include "pciback.h" |
| @@ -71,6 +71,11 @@ struct pci_dev *pcistub_get_pci_dev(struct xen_pcibk_device *pdev, · 70 unmodified lines | ||
| 71 | 71 | struct pci_dev *dev); |
| 72 | 72 | void pcistub_put_pci_dev(struct pci_dev *dev); |
| 73 | 73 | |
| 74 | +static inline bool xen_pcibk_pv_support(void) | |
| 75 | +{ | |
| 76 | + return IS_ENABLED(CONFIG_XEN_PCIDEV_BACKEND); | |
| 77 | +} | |
| 78 | + | |
| 74 | 79 | /* Ensure a device is turned off or reset */ |
| 75 | 80 | void xen_pcibk_reset_device(struct pci_dev *pdev); |
| 76 | 81 | |
| @@ -14,7 +14,7 @@ · 13 unmodified lines | ||
| 14 | 14 | #include <linux/workqueue.h> |
| 15 | 15 | #include <xen/xenbus.h> |
| 16 | 16 | #include <xen/events.h> |
| 17 | −#include <asm/xen/pci.h> | |
| 17 | +#include <xen/pci.h> | |
| 18 | 18 | #include "pciback.h" |
| 19 | 19 | |
| 20 | 20 | #define INVALID_EVTCHN_IRQ (-1) |
| @@ -743,6 +743,9 @@ const struct xen_pcibk_backend *__read_mostly xen_pcibk_backend; · 722 unmodified lines | ||
| 743 | 743 | |
| 744 | 744 | int __init xen_pcibk_xenbus_register(void) |
| 745 | 745 | { |
| 746 | + if (!xen_pcibk_pv_support()) | |
| 747 | + return 0; | |
| 748 | + | |
| 746 | 749 | xen_pcibk_backend = &xen_pcibk_vpci_backend; |
| 747 | 750 | if (passthrough) |
| 748 | 751 | xen_pcibk_backend = &xen_pcibk_passthrough_backend; |
| @@ -752,5 +755,6 @@ int __init xen_pcibk_xenbus_register(void) · 3 unmodified lines | ||
| 752 | 755 | |
| 753 | 756 | void __exit xen_pcibk_xenbus_unregister(void) |
| 754 | 757 | { |
| 755 | − xenbus_unregister_driver(&xen_pcibk_driver); | |
| 758 | + if (xen_pcibk_pv_support()) | |
| 759 | + xenbus_unregister_driver(&xen_pcibk_driver); | |
| 756 | 760 | } |
| @@ -53,7 +53,6 @@ unsigned long HYPERVISOR_hvm_op(int op, void *arg); · 52 unmodified lines | ||
| 53 | 53 | int HYPERVISOR_memory_op(unsigned int cmd, void *arg); |
| 54 | 54 | int HYPERVISOR_physdev_op(int cmd, void *arg); |
| 55 | 55 | int HYPERVISOR_vcpu_op(int cmd, int vcpuid, void *extra_args); |
| 56 | −int HYPERVISOR_tmem_op(void *arg); | |
| 57 | 56 | int HYPERVISOR_vm_assist(unsigned int cmd, unsigned int type); |
| 58 | 57 | int HYPERVISOR_dm_op(domid_t domid, unsigned int nr_bufs, |
| 59 | 58 | struct xen_dm_op_buf *bufs); |
| @@ -74,18 +73,4 @@ HYPERVISOR_suspend(unsigned long start_info_mfn) · 14 unmodified lines | ||
| 74 | 73 | return HYPERVISOR_sched_op(SCHEDOP_shutdown, &r); |
| 75 | 74 | } |
| 76 | 75 | |
| 77 | −static inline void | |
| 78 | −MULTI_update_va_mapping(struct multicall_entry *mcl, unsigned long va, | |
| 79 | − unsigned int new_val, unsigned long flags) | |
| 80 | −{ | |
| 81 | − BUG(); | |
| 82 | −} | |
| 83 | − | |
| 84 | −static inline void | |
| 85 | −MULTI_mmu_update(struct multicall_entry *mcl, struct mmu_update *req, | |
| 86 | − int count, int *success_count, domid_t domid) | |
| 87 | −{ | |
| 88 | − BUG(); | |
| 89 | −} | |
| 90 | − | |
| 91 | 76 | #endif /* _ASM_ARM_XEN_HYPERCALL_H */ |
| @@ -26,9 +26,6 @@ extern struct balloon_stats balloon_stats; · 25 unmodified lines | ||
| 26 | 26 | |
| 27 | 27 | void balloon_set_new_target(unsigned long target); |
| 28 | 28 | |
| 29 | −int alloc_xenballooned_pages(int nr_pages, struct page **pages); | |
| 30 | −void free_xenballooned_pages(int nr_pages, struct page **pages); | |
| 31 | − | |
| 32 | 29 | #ifdef CONFIG_XEN_BALLOON |
| 33 | 30 | void xen_balloon_init(void); |
| 34 | 31 | #else |
| @@ -1,26 +1,9 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * callback.h |
| 3 | 4 | * |
| 4 | 5 | * Register guest OS callbacks with Xen. |
| 5 | 6 | * |
| 6 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 7 | − * of this software and associated documentation files (the "Software"), to | |
| 8 | − * deal in the Software without restriction, including without limitation the | |
| 9 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 10 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 11 | − * furnished to do so, subject to the following conditions: | |
| 12 | − * | |
| 13 | − * The above copyright notice and this permission notice shall be included in | |
| 14 | − * all copies or substantial portions of the Software. | |
| 15 | − * | |
| 16 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 17 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 18 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 19 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 20 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 21 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 22 | − * DEALINGS IN THE SOFTWARE. | |
| 23 | − * | |
| 24 | 7 | * Copyright (c) 2006, Ian Campbell |
| 25 | 8 | */ |
| 26 | 9 | |
| @@ -1,26 +1,9 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * elfnote.h |
| 3 | 4 | * |
| 4 | 5 | * Definitions used for the Xen ELF notes. |
| 5 | 6 | * |
| 6 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 7 | − * of this software and associated documentation files (the "Software"), to | |
| 8 | − * deal in the Software without restriction, including without limitation the | |
| 9 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 10 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 11 | − * furnished to do so, subject to the following conditions: | |
| 12 | − * | |
| 13 | − * The above copyright notice and this permission notice shall be included in | |
| 14 | − * all copies or substantial portions of the Software. | |
| 15 | − * | |
| 16 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 17 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 18 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 19 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 20 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 21 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 22 | − * DEALINGS IN THE SOFTWARE. | |
| 23 | − * | |
| 24 | 7 | * Copyright (c) 2006, Ian Campbell, XenSource Ltd. |
| 25 | 8 | */ |
| 26 | 9 | |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | 2 | /****************************************************************************** |
| 3 | 3 | * event_channel.h |
| 4 | 4 | * |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | 2 | /****************************************************************************** |
| 3 | 3 | * features.h |
| 4 | 4 | * |
| @@ -1,27 +1,10 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * grant_table.h |
| 3 | 4 | * |
| 4 | 5 | * Interface for granting foreign access to page frames, and receiving |
| 5 | 6 | * page-ownership transfers. |
| 6 | 7 | * |
| 7 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 8 | − * of this software and associated documentation files (the "Software"), to | |
| 9 | − * deal in the Software without restriction, including without limitation the | |
| 10 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 11 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 12 | − * furnished to do so, subject to the following conditions: | |
| 13 | − * | |
| 14 | − * The above copyright notice and this permission notice shall be included in | |
| 15 | − * all copies or substantial portions of the Software. | |
| 16 | − * | |
| 17 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 18 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 19 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 20 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 21 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 22 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 23 | − * DEALINGS IN THE SOFTWARE. | |
| 24 | − * | |
| 25 | 8 | * Copyright (c) 2004, K A Fraser |
| 26 | 9 | */ |
| 27 | 10 | |
| @@ -1,23 +1,6 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /* |
| 2 | 3 | * Copyright (c) 2016, Citrix Systems Inc |
| 3 | − * | |
| 4 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 5 | − * of this software and associated documentation files (the "Software"), to | |
| 6 | − * deal in the Software without restriction, including without limitation the | |
| 7 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 8 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 9 | − * furnished to do so, subject to the following conditions: | |
| 10 | − * | |
| 11 | − * The above copyright notice and this permission notice shall be included in | |
| 12 | − * all copies or substantial portions of the Software. | |
| 13 | − * | |
| 14 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 15 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 16 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 17 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 18 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 19 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 20 | − * DEALINGS IN THE SOFTWARE. | |
| 21 | 4 | */ |
| 22 | 5 | |
| 23 | 6 | #ifndef __XEN_PUBLIC_HVM_DM_OP_H__ |
| @@ -1,22 +1,4 @@ | ||
| 1 | −/* | |
| 2 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 3 | − * of this software and associated documentation files (the "Software"), to | |
| 4 | − * deal in the Software without restriction, including without limitation the | |
| 5 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 6 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 7 | − * furnished to do so, subject to the following conditions: | |
| 8 | − * | |
| 9 | − * The above copyright notice and this permission notice shall be included in | |
| 10 | − * all copies or substantial portions of the Software. | |
| 11 | − * | |
| 12 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 13 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 14 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 15 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 16 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 17 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 18 | − * DEALINGS IN THE SOFTWARE. | |
| 19 | − */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 20 | 2 | |
| 21 | 3 | #ifndef __XEN_PUBLIC_HVM_HVM_OP_H__ |
| 22 | 4 | #define __XEN_PUBLIC_HVM_HVM_OP_H__ |
| @@ -1,22 +1,5 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /* |
| 2 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 3 | − * of this software and associated documentation files (the "Software"), to | |
| 4 | − * deal in the Software without restriction, including without limitation the | |
| 5 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 6 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 7 | − * furnished to do so, subject to the following conditions: | |
| 8 | − * | |
| 9 | − * The above copyright notice and this permission notice shall be included in | |
| 10 | − * all copies or substantial portions of the Software. | |
| 11 | − * | |
| 12 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 13 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 14 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 15 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 16 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 17 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 18 | − * DEALINGS IN THE SOFTWARE. | |
| 19 | − * | |
| 20 | 3 | * Copyright (c) 2015, Roger Pau Monne <roger.pau@citrix.com> |
| 21 | 4 | */ |
| 22 | 5 | |
| @@ -1,22 +1,4 @@ | ||
| 1 | −/* | |
| 2 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 3 | − * of this software and associated documentation files (the "Software"), to | |
| 4 | − * deal in the Software without restriction, including without limitation the | |
| 5 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 6 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 7 | − * furnished to do so, subject to the following conditions: | |
| 8 | − * | |
| 9 | − * The above copyright notice and this permission notice shall be included in | |
| 10 | − * all copies or substantial portions of the Software. | |
| 11 | − * | |
| 12 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 13 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 14 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 15 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 16 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 17 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 18 | − * DEALINGS IN THE SOFTWARE. | |
| 19 | − */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 20 | 2 | |
| 21 | 3 | #ifndef __XEN_PUBLIC_HVM_PARAMS_H__ |
| 22 | 4 | #define __XEN_PUBLIC_HVM_PARAMS_H__ |
| @@ -1,22 +1,5 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /* |
| 2 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 3 | − * of this software and associated documentation files (the "Software"), to | |
| 4 | − * deal in the Software without restriction, including without limitation the | |
| 5 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 6 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 7 | − * furnished to do so, subject to the following conditions: | |
| 8 | − * | |
| 9 | − * The above copyright notice and this permission notice shall be included in | |
| 10 | − * all copies or substantial portions of the Software. | |
| 11 | − * | |
| 12 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 13 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 14 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 15 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 16 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 17 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 18 | − * DEALINGS IN THE SOFTWARE. | |
| 19 | − * | |
| 20 | 3 | * Copyright (c) 2016, Citrix Systems, Inc. |
| 21 | 4 | */ |
| 22 | 5 | |
| @@ -1,24 +1,7 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /* |
| 2 | 3 | * 9pfs.h -- Xen 9PFS transport |
| 3 | 4 | * |
| 4 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 5 | − * of this software and associated documentation files (the "Software"), to | |
| 6 | − * deal in the Software without restriction, including without limitation the | |
| 7 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 8 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 9 | − * furnished to do so, subject to the following conditions: | |
| 10 | − * | |
| 11 | − * The above copyright notice and this permission notice shall be included in | |
| 12 | − * all copies or substantial portions of the Software. | |
| 13 | − * | |
| 14 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 15 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 16 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 17 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 18 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 19 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 20 | − * DEALINGS IN THE SOFTWARE. | |
| 21 | − * | |
| 22 | 5 | * Copyright (C) 2017 Stefano Stabellini <stefano@aporeto.com> |
| 23 | 6 | */ |
| 24 | 7 | |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | 2 | /****************************************************************************** |
| 3 | 3 | * blkif.h |
| 4 | 4 | * |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | 2 | /****************************************************************************** |
| 3 | 3 | * console.h |
| 4 | 4 | * |
| @@ -1,26 +1,9 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * displif.h |
| 3 | 4 | * |
| 4 | 5 | * Unified display device I/O interface for Xen guest OSes. |
| 5 | 6 | * |
| 6 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 7 | − * of this software and associated documentation files (the "Software"), to | |
| 8 | − * deal in the Software without restriction, including without limitation the | |
| 9 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 10 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 11 | − * furnished to do so, subject to the following conditions: | |
| 12 | − * | |
| 13 | − * The above copyright notice and this permission notice shall be included in | |
| 14 | − * all copies or substantial portions of the Software. | |
| 15 | − * | |
| 16 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 17 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 18 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 19 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 20 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 21 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 22 | − * DEALINGS IN THE SOFTWARE. | |
| 23 | − * | |
| 24 | 7 | * Copyright (C) 2016-2017 EPAM Systems Inc. |
| 25 | 8 | * |
| 26 | 9 | * Authors: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> |
| @@ -1,24 +1,7 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /* |
| 2 | 3 | * fbif.h -- Xen virtual frame buffer device |
| 3 | 4 | * |
| 4 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 5 | − * of this software and associated documentation files (the "Software"), to | |
| 6 | − * deal in the Software without restriction, including without limitation the | |
| 7 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 8 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 9 | − * furnished to do so, subject to the following conditions: | |
| 10 | − * | |
| 11 | − * The above copyright notice and this permission notice shall be included in | |
| 12 | − * all copies or substantial portions of the Software. | |
| 13 | − * | |
| 14 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 15 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 16 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 17 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 18 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 19 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 20 | − * DEALINGS IN THE SOFTWARE. | |
| 21 | − * | |
| 22 | 5 | * Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com> |
| 23 | 6 | * Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru@redhat.com> |
| 24 | 7 | */ |
| @@ -1,24 +1,7 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /* |
| 2 | 3 | * kbdif.h -- Xen virtual keyboard/mouse |
| 3 | 4 | * |
| 4 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 5 | − * of this software and associated documentation files (the "Software"), to | |
| 6 | − * deal in the Software without restriction, including without limitation the | |
| 7 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 8 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 9 | − * furnished to do so, subject to the following conditions: | |
| 10 | − * | |
| 11 | − * The above copyright notice and this permission notice shall be included in | |
| 12 | − * all copies or substantial portions of the Software. | |
| 13 | − * | |
| 14 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 15 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 16 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 17 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 18 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 19 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 20 | − * DEALINGS IN THE SOFTWARE. | |
| 21 | − * | |
| 22 | 5 | * Copyright (C) 2005 Anthony Liguori <aliguori@us.ibm.com> |
| 23 | 6 | * Copyright (C) 2006 Red Hat, Inc., Markus Armbruster <armbru@redhat.com> |
| 24 | 7 | */ |
| @@ -1,26 +1,9 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * xen_netif.h |
| 3 | 4 | * |
| 4 | 5 | * Unified network-device I/O interface for Xen guest OSes. |
| 5 | 6 | * |
| 6 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 7 | − * of this software and associated documentation files (the "Software"), to | |
| 8 | − * deal in the Software without restriction, including without limitation the | |
| 9 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 10 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 11 | − * furnished to do so, subject to the following conditions: | |
| 12 | − * | |
| 13 | − * The above copyright notice and this permission notice shall be included in | |
| 14 | − * all copies or substantial portions of the Software. | |
| 15 | − * | |
| 16 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 17 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 18 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 19 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 20 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 21 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 22 | − * DEALINGS IN THE SOFTWARE. | |
| 23 | − * | |
| 24 | 7 | * Copyright (c) 2003-2004, Keir Fraser |
| 25 | 8 | */ |
| 26 | 9 | |
| @@ -1,24 +1,7 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /* |
| 2 | 3 | * PCI Backend/Frontend Common Data Structures & Macros |
| 3 | 4 | * |
| 4 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 5 | − * of this software and associated documentation files (the "Software"), to | |
| 6 | − * deal in the Software without restriction, including without limitation the | |
| 7 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 8 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 9 | − * furnished to do so, subject to the following conditions: | |
| 10 | − * | |
| 11 | − * The above copyright notice and this permission notice shall be included in | |
| 12 | − * all copies or substantial portions of the Software. | |
| 13 | − * | |
| 14 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 15 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 16 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 17 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 18 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 19 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 20 | − * DEALINGS IN THE SOFTWARE. | |
| 21 | − * | |
| 22 | 5 | * Author: Ryan Wilson <hap9@epoch.ncsc.mil> |
| 23 | 6 | */ |
| 24 | 7 | #ifndef __XEN_PCI_COMMON_H__ |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | 2 | #ifndef __XEN_PROTOCOLS_H__ |
| 3 | 3 | #define __XEN_PROTOCOLS_H__ |
| 4 | 4 | |
| @@ -1,3 +1,5 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | + | |
| 1 | 3 | #ifndef __XEN_PUBLIC_IO_XEN_PVCALLS_H__ |
| 2 | 4 | #define __XEN_PUBLIC_IO_XEN_PVCALLS_H__ |
| 3 | 5 | |
| @@ -1,26 +1,9 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * ring.h |
| 3 | 4 | * |
| 4 | 5 | * Shared producer-consumer ring macros. |
| 5 | 6 | * |
| 6 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 7 | − * of this software and associated documentation files (the "Software"), to | |
| 8 | − * deal in the Software without restriction, including without limitation the | |
| 9 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 10 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 11 | − * furnished to do so, subject to the following conditions: | |
| 12 | − * | |
| 13 | − * The above copyright notice and this permission notice shall be included in | |
| 14 | − * all copies or substantial portions of the Software. | |
| 15 | − * | |
| 16 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 17 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 18 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 19 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 20 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 21 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 22 | − * DEALINGS IN THE SOFTWARE. | |
| 23 | − * | |
| 24 | 7 | * Tim Deegan and Andrew Warfield November 2004. |
| 25 | 8 | */ |
| 26 | 9 | |
| @@ -1,26 +1,9 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * sndif.h |
| 3 | 4 | * |
| 4 | 5 | * Unified sound-device I/O interface for Xen guest OSes. |
| 5 | 6 | * |
| 6 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 7 | − * of this software and associated documentation files (the "Software"), to | |
| 8 | − * deal in the Software without restriction, including without limitation the | |
| 9 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 10 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 11 | − * furnished to do so, subject to the following conditions: | |
| 12 | − * | |
| 13 | − * The above copyright notice and this permission notice shall be included in | |
| 14 | − * all copies or substantial portions of the Software. | |
| 15 | − * | |
| 16 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 17 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 18 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 19 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 20 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 21 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 22 | − * DEALINGS IN THE SOFTWARE. | |
| 23 | − * | |
| 24 | 7 | * Copyright (C) 2013-2015 GlobalLogic Inc. |
| 25 | 8 | * Copyright (C) 2016-2017 EPAM Systems Inc. |
| 26 | 9 | * |
| @@ -1,26 +1,9 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * vscsiif.h |
| 3 | 4 | * |
| 4 | 5 | * Based on the blkif.h code. |
| 5 | 6 | * |
| 6 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 7 | − * of this software and associated documentation files (the "Software"), to | |
| 8 | − * deal in the Software without restriction, including without limitation the | |
| 9 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 10 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 11 | − * furnished to do so, subject to the following conditions: | |
| 12 | − * | |
| 13 | − * The above copyright notice and this permission notice shall be included in | |
| 14 | − * all copies or substantial portions of the Software. | |
| 15 | − * | |
| 16 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 17 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 18 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 19 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 20 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 21 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 22 | − * DEALINGS IN THE SOFTWARE. | |
| 23 | − * | |
| 24 | 7 | * Copyright(c) FUJITSU Limited 2008. |
| 25 | 8 | */ |
| 26 | 9 | |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | 2 | /***************************************************************************** |
| 3 | 3 | * xenbus.h |
| 4 | 4 | * |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | 2 | /* |
| 3 | 3 | * Details of the "wire" protocol between Xen Store Daemon and client |
| 4 | 4 | * library or guest kernel. |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | 2 | /****************************************************************************** |
| 3 | 3 | * memory.h |
| 4 | 4 | * |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | 2 | /****************************************************************************** |
| 3 | 3 | * nmi.h |
| 4 | 4 | * |
| @@ -1,22 +1,4 @@ | ||
| 1 | −/* | |
| 2 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 3 | − * of this software and associated documentation files (the "Software"), to | |
| 4 | − * deal in the Software without restriction, including without limitation the | |
| 5 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 6 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 7 | − * furnished to do so, subject to the following conditions: | |
| 8 | − * | |
| 9 | − * The above copyright notice and this permission notice shall be included in | |
| 10 | − * all copies or substantial portions of the Software. | |
| 11 | − * | |
| 12 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 13 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 14 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 15 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 16 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 17 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 18 | − * DEALINGS IN THE SOFTWARE. | |
| 19 | − */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 20 | 2 | |
| 21 | 3 | #ifndef __XEN_PUBLIC_PHYSDEV_H__ |
| 22 | 4 | #define __XEN_PUBLIC_PHYSDEV_H__ |
| @@ -1,26 +1,9 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * platform.h |
| 3 | 4 | * |
| 4 | 5 | * Hardware platform operations. Intended for use by domain-0 kernel. |
| 5 | 6 | * |
| 6 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 7 | − * of this software and associated documentation files (the "Software"), to | |
| 8 | − * deal in the Software without restriction, including without limitation the | |
| 9 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 10 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 11 | − * furnished to do so, subject to the following conditions: | |
| 12 | − * | |
| 13 | − * The above copyright notice and this permission notice shall be included in | |
| 14 | − * all copies or substantial portions of the Software. | |
| 15 | − * | |
| 16 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 17 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 18 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 19 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 20 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 21 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 22 | − * DEALINGS IN THE SOFTWARE. | |
| 23 | − * | |
| 24 | 7 | * Copyright (c) 2002-2006, K Fraser |
| 25 | 8 | */ |
| 26 | 9 | |
| @@ -1,26 +1,9 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * sched.h |
| 3 | 4 | * |
| 4 | 5 | * Scheduler state interactions |
| 5 | 6 | * |
| 6 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 7 | − * of this software and associated documentation files (the "Software"), to | |
| 8 | − * deal in the Software without restriction, including without limitation the | |
| 9 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 10 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 11 | − * furnished to do so, subject to the following conditions: | |
| 12 | − * | |
| 13 | − * The above copyright notice and this permission notice shall be included in | |
| 14 | − * all copies or substantial portions of the Software. | |
| 15 | − * | |
| 16 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 17 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 18 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 19 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 20 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 21 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 22 | − * DEALINGS IN THE SOFTWARE. | |
| 23 | − * | |
| 24 | 7 | * Copyright (c) 2005, Keir Fraser <keir@xensource.com> |
| 25 | 8 | */ |
| 26 | 9 | |
| @@ -1,26 +1,9 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * vcpu.h |
| 3 | 4 | * |
| 4 | 5 | * VCPU initialisation, query, and hotplug. |
| 5 | 6 | * |
| 6 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 7 | − * of this software and associated documentation files (the "Software"), to | |
| 8 | − * deal in the Software without restriction, including without limitation the | |
| 9 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 10 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 11 | − * furnished to do so, subject to the following conditions: | |
| 12 | − * | |
| 13 | − * The above copyright notice and this permission notice shall be included in | |
| 14 | − * all copies or substantial portions of the Software. | |
| 15 | − * | |
| 16 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 17 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 18 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 19 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 20 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 21 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 22 | − * DEALINGS IN THE SOFTWARE. | |
| 23 | − * | |
| 24 | 7 | * Copyright (c) 2005, Keir Fraser <keir@xensource.com> |
| 25 | 8 | */ |
| 26 | 9 | |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | 2 | /****************************************************************************** |
| 3 | 3 | * version.h |
| 4 | 4 | * |
| @@ -1,3 +1,4 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * arch-x86/mca.h |
| 3 | 4 | * Guest OS machine check interface to x86 Xen. |
| @@ -1,26 +1,9 @@ | ||
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 1 | 2 | /****************************************************************************** |
| 2 | 3 | * xen.h |
| 3 | 4 | * |
| 4 | 5 | * Guest OS interface to Xen. |
| 5 | 6 | * |
| 6 | − * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| 7 | − * of this software and associated documentation files (the "Software"), to | |
| 8 | − * deal in the Software without restriction, including without limitation the | |
| 9 | − * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or | |
| 10 | − * sell copies of the Software, and to permit persons to whom the Software is | |
| 11 | − * furnished to do so, subject to the following conditions: | |
| 12 | − * | |
| 13 | − * The above copyright notice and this permission notice shall be included in | |
| 14 | − * all copies or substantial portions of the Software. | |
| 15 | − * | |
| 16 | − * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
| 17 | − * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
| 18 | − * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
| 19 | − * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
| 20 | − * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | |
| 21 | − * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | |
| 22 | − * DEALINGS IN THE SOFTWARE. | |
| 23 | − * | |
| 24 | 7 | * Copyright (c) 2004, K A Fraser |
| 25 | 8 | */ |
| 26 | 9 | |
| @@ -1,4 +1,4 @@ | ||
| 1 | −/* SPDX-License-Identifier: GPL-2.0 */ | |
| 1 | +/* SPDX-License-Identifier: MIT */ | |
| 2 | 2 | #ifndef __XEN_PUBLIC_XENPMU_H__ |
| 3 | 3 | #define __XEN_PUBLIC_XENPMU_H__ |
| 4 | 4 | |
| @@ -0,0 +1,28 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0 */ | |
| 2 | + | |
| 3 | +#ifndef __XEN_PCI_H__ | |
| 4 | +#define __XEN_PCI_H__ | |
| 5 | + | |
| 6 | +#if defined(CONFIG_XEN_DOM0) | |
| 7 | +int xen_find_device_domain_owner(struct pci_dev *dev); | |
| 8 | +int xen_register_device_domain_owner(struct pci_dev *dev, uint16_t domain); | |
| 9 | +int xen_unregister_device_domain_owner(struct pci_dev *dev); | |
| 10 | +#else | |
| 11 | +static inline int xen_find_device_domain_owner(struct pci_dev *dev) | |
| 12 | +{ | |
| 13 | + return -1; | |
| 14 | +} | |
| 15 | + | |
| 16 | +static inline int xen_register_device_domain_owner(struct pci_dev *dev, | |
| 17 | + uint16_t domain) | |
| 18 | +{ | |
| 19 | + return -1; | |
| 20 | +} | |
| 21 | + | |
| 22 | +static inline int xen_unregister_device_domain_owner(struct pci_dev *dev) | |
| 23 | +{ | |
| 24 | + return -1; | |
| 25 | +} | |
| 26 | +#endif | |
| 27 | + | |
| 28 | +#endif | |
| @@ -52,13 +52,7 @@ bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, · 51 unmodified lines | ||
| 52 | 52 | extern u64 xen_saved_max_mem_size; |
| 53 | 53 | #endif |
| 54 | 54 | |
| 55 | −#ifdef CONFIG_XEN_UNPOPULATED_ALLOC | |
| 56 | 55 | int xen_alloc_unpopulated_pages(unsigned int nr_pages, struct page **pages); |
| 57 | 56 | void xen_free_unpopulated_pages(unsigned int nr_pages, struct page **pages); |
| 58 | −#else | |
| 59 | −#define xen_alloc_unpopulated_pages alloc_xenballooned_pages | |
| 60 | −#define xen_free_unpopulated_pages free_xenballooned_pages | |
| 61 | −#include <xen/balloon.h> | |
| 62 | −#endif | |
| 63 | 57 | |
| 64 | 58 | #endif /* _XEN_XEN_H */ |